Phase 3 - Auction Pallet #89
ipapandinas
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Auction Pallet
This document specifies the design choices took for the Auction pallet implementation in the Indexer and SDK.
Feel free to comment on certain misunderstandings and new suggestions are warm welcomed.
Sections:
Events
In order to make the returned events datas usefull, we provide both the native format and a friendly ready to use format design format :
7 events are triggered by the chain in the module auction
SDK events
Additional events will be added to the EventType enum in src > events.ts in the SDK:
Extrinsics
7 extrinsics will be implemented from the auction pallet.
Each helperTx will be duplicated by another helper version with 2 additional parameters: the keyring that will be used to sign and submit the transaction, and a waitUntil callback parameter, to define at which point we want to get the results of the transaction execution.
Constants
7 constants getters will be implemented from the auction pallet.
Storage
3 storage getters will be implemented for the auction pallet.
Schema
The Indexer schema for the new
AuctionEntity
is detailed here below. It introduces a new typeBidder
type that contains bidder data: address and bid amount.Linking upgrades
The integration of the auction pallet introduces new links to existing entities: the
NftEntity
and theMarketplaceEntity
.New NFT operations
The auction pallet introduces 7 new NFT operations. The
NftOperationEntity
remains the same and the fulfilled fields for each new operation are listed below.createAuction
typeOfTransaction
='createAuction',marketplaceId
cancelAuction
typeOfTransaction
='cancelAuction'completeAuction
typeOfTransaction
='completeAuction',marketplaceId
,to
,price
,priceRounded
,marketplaceCut
,marketplaceCutRounded
,royaltyCut
,royaltyCutRounded
addBid
typeOfTransaction
='addBid',price
,priceRounded
removeBid
typeOfTransaction
='removeBid'updateBid
typeOfTransaction
='updateBid',price
,priceRounded
auctionBuyItNow
typeOfTransaction
='auctionBuyItNow',marketplaceId
,to
,price
,priceRounded
,marketplaceCut
,marketplaceCutRounded
,royaltyCut
,royaltyCutRounded
Beta Was this translation helpful? Give feedback.
All reactions