This mutation enables the configuration of a Dutch auction in the Mojito system after setting it up in the Mojito smart contract. It stores all Dutch auction settings in the backend, including starting price, reserve price, and auction duration. The mutation can be used by passing the necessary parameters in the API request.
Integration Guidance
Inorder to setup Onchain Dutch Auction, please follow below steps.
- Blockchain Setup
- You can refer the following script from mojito public repository https://github.com/mojitoinc/mojito-contracts-scripts/blob/main/scripts/dutchAuction/buy-by-Eth.ts and complete blockchain transaction on one of the applicable blockchain network.
- Once the blockchain integration is done, you can use the following mutation for updating and registering to mojito backend system.
Sample Mutation
mutation SaveDutchAuction($orgID: UUID1!, $input: dutchAuctionSettingInput! $lotInput: DutchAuctionLot){
saveDutchAuction(
orgID:$orgID
input:$input
lotInput:$lotInput
lotID:"cd711230-f9cb-42dd-aa34-bc3b8532c51c"
){
id
marketplaceAuctionLotID
nftContractAddress
tokenID
quantityOf1155
tokenOwnerAddress
startingBidCryptoPrice
reservedPrice
paymentCurrency
whitelistedBuyers
blacklistedBuyers
paymentSettlementAddress
taxSettlementAddress
commissionAddress
platformSettlementAddress
commissionFeePercentage
platformFeePercentage
endAuctionStatus
networkID
endTransactionHash
tokenType
supportedCurrencyID
halfLifeTime
availableQuantity
totalQuantity
reduceByAmount
reduceByInterval
walletLimit
transactionLimit
isInstantDelivery
fromTokenID
toTokenID
rebateEnabled
}
}
Sample Variable
{
"orgID": "5a198d09-e243-491f-991a-f79e1cecdcc3",
"input":{
"nftContractAddress":"0x3e9D45aD0da57683b5375d0F3D5BC606429128F9",
"tokenOwnerAddress":"0x796BbA22aCDF7d3b7ea00c8c1729717CbDB99Ad1",
"startingBidCryptoPrice": 0.01,
"reservedPrice":0.001,
"paymentCurrency":"0x0000000000000000000000000000000000000000",
"paymentSettlementAddress":"0xbA76fcAC5D4D926A72E23970935E79718a5D6453",
"taxSettlementAddress":"0xbA76fcAC5D4D926A72E23970935E79718a5D6453",
"commissionAddress":"0xbA76fcAC5D4D926A72E23970935E79718a5D6453",
"platformSettlementAddress":"0xbA76fcAC5D4D926A72E23970935E79718a5D6453",
"commissionFeePercentage":2,
"platformFeePercentage":2,
"networkID":"b260424b-bb37-4a3e-86d0-0866175e5e68",
"tokenType": "ERC721",
"supportedCurrencyID":"501796ca-8f03-4cf6-8c36-2b1c50e6489b",
"halfLifeTime":"2023-05-25T04:10:00Z",
"totalQuantity":5,
"reduceByAmount":0.001,
"reduceByInterval":600,
"walletLimit":2,
"transactionLimit":1,
"isInstantDelivery":true,
"fromTokenID":0,
"toTokenID":0,
"rebateEnabled":true,
"quantity":0,
"isMint": true
},
"lotInput":{
"name":"MDAT-9",
"description":"Mercedes dutch auction test 9",
"startDate":"2023-05-25T03:45:00Z",
"endDate":"2023-05-25T04:45:00Z",
"thumbnailImageID":"778007bf-05f3-4924-9d0f-c9663a5a6217",
"collectionID":"37a01613-e2d3-4782-b52f-f0e77a99a52b",
"saleType":"Auction",
"delivery": {
"deliveryMethod":"ERC721Provenance",
"ERC721Provenance":{
"nftContractId":"ed107a9a-406c-48c7-bc04-5f87359b79aa",
"extensionAddress":"0xbA76fcAC5D4D926A72E23970935E79718a5D6453"
}
}
}
}
Sample Response
{
"data": {
"saveDutchAuction": {
"id": "e736e98a-e9f5-483c-855b-559973a8959e",
"marketplaceAuctionLotID": "cd711230-f9cb-42dd-aa34-bc3b8532c51c",
"nftContractAddress": "0x3e9D45aD0da57683b5375d0F3D5BC606429128F9",
"tokenID": 0,
"quantityOf1155": 0,
"tokenOwnerAddress": "0x796BbA22aCDF7d3b7ea00c8c1729717CbDB99Ad1",
"startingBidCryptoPrice": 0.01,
"reservedPrice": 0.001,
"paymentCurrency": "0x000000000000",
"whitelistedBuyers": "",
"blacklistedBuyers": "",
"paymentSettlementAddress": "0xbA76fcAC5D4D926A72E23970935E79718a5D6453",
"taxSettlementAddress": "0xbA76fcAC5D4D926A72E23970935E79718a5D6453",
"commissionAddress": "0xbA76fcAC5D4D926A72E23970935E79718a5D6453",
"platformSettlementAddress": "0xbA76fcAC5D4D926A72E23970935E79718a5D6453",
"commissionFeePercentage": 2,
"platformFeePercentage": 2,
"endAuctionStatus": "COMPLETED",
"networkID": "b260424b-bb37-4a3e-86d0-0866175e5e68",
"endTransactionHash": "",
"tokenType": "ERC721",
"supportedCurrencyID": "501796ca-8f03-4cf6-8c36-2b1c50e6489b",
"halfLifeTime": "2023-05-25T04:10:00Z",
"availableQuantity": 5,
"totalQuantity": 5,
"reduceByAmount": 0.001,
"reduceByInterval": 600,
"walletLimit": 2,
"transactionLimit": 1,
"isInstantDelivery": true,
"fromTokenID": 0,
"toTokenID": 0,
"rebateEnabled": true
}
}
}
Arguments
Name | Type | Description |
---|---|---|
lotID | UUID | Auction lot id. if provided search and updates the existing lot. |
orgID | UUID | The organization id. |
input | Object | Contains all the information from dutchAuctionSettingInput such as contract address, token id, bid amount and etc. |
lotInput | Object | Contains all the information to create or update lotInput . |
Fields
Name | Type | Description |
---|---|---|
MarketplaceAuctionOnChainSettings | Object | Contains all information on dutch-auction MarketplaceAuctionOnChainSettings such as contract address and token id, token type, payment currency and etc. |