Tatum
Search…
How to migrate to Tatum’s updated NFT marketplace and auction features
Update your app's to our new workflow and leverage enhanced NFT features with your on-chain marketplaces and auctions.
With the launch of our new NFTs that pay royalties as percentages and record provenance data, we have updated the workflow for our instantly deployable NFT marketplace and NFT auction features. This new workflow now enables you to use the new NFT provenance and royalty functionality, and no longer requires users to send their NFTs to the marketplace or auction smart contracts. It also allows NFT creators to receive cashback in whatever custom ERC-20 they would like on whatever blockchain they’re minting on.
The old workflow will be discontinued, so it is necessary for all applications that use our NFT marketplace and auction functionality to migrate as soon as possible.

What’s changed?

Previously, to sell an NFT on a marketplace or auction, users would have to send the NFT to the marketplace or auction smart contracts prior to its sale. Now, users just need to give permission to the NFT marketplace or auction to transfer the NFT.
In addition, if they wish to leverage the percentage royalties functionality with an ERC-20 token, users must also give permission to the NFT smart contract to spend the ERC-20 token pay out royalties when the NFT is sold at a marketplace or auction.
And finally, if NFT creators want to receive cashback in a custom ERC-20 token, they can now add the smart contract address of the ERC-20 in the mint NFT call.

How to migrate

Our new NFT marketplace and auction workflows have just two different steps than the previous workflows, assuming you’d like to use provenance and percentage royalty functionality. It works like this, with the new steps in bold lettering:
  1. 1.
    Mint an NFT. For more information on how mint royalty NFTs with provenance data and percentage cashback, please refer to this guide.
  2. 2.
    If you’d like to set cashback to be paid out in any custom ERC-20 token on whatever blockchain you’re minting on, you can now do so by adding an “ERC20” property to the API endpoint body. In this field, enter the smart contract address of the ERC-20 token in which the cashback will be paid out. Please refer to our guide on how to create royalty NFTs with provenance data and percentage cashback for more information.
3. Give permission to the NFT marketplace or auction smart contract to transfer the NFT.
JavaScript
cURL + KMS
cURL + private key
1
console.log(await sendAuctionApproveNftTransfer(true, {
2
fromPrivateKey: '0xa488a82b8b57c3ece4307525741fd8256781906c5fad948b85f1d63000948236',
3
chain: Currency.CELO, contractAddress: '0x1214BEada6b25bc98f7494C7BDBf22C095FDCaBD',
4
isErc721: true, spender: '0x991dfc0db4cbe2480296eec5bcc6b3215a9b7038', tokenId
5
}, 'https://alfajores-forno.celo-testnet.org'));
6
7
const endedAt = (await celoGetCurrentBlock()) + 9;
Copied!
1
curl --request POST \
2
--url https://api-eu1.tatum.io/v3/blockchain/auction/approve \
3
--header 'content-type: application/json' \
4
--header 'x-api-key: REPLACE_KEY_VALUE' \
5
--data '{
6
"chain": "CELO",
7
"feeCurrency": "CELO",
8
"contractAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
9
"spender": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
10
"isErc721": true,
11
"tokenId": "100000",
12
"signatureId": "26d3883e-4e17-48b3-a0ee-09a3e484ac83",
13
"index": 0,
14
"nonce": 1,
15
"fee": {
16
"gasLimit": "40000",
17
"gasPrice": "20"
18
}
19
}
Copied!
1
curl --request POST \
2
--url https://api-eu1.tatum.io/v3/blockchain/auction/approve \
3
--header 'content-type: application/json' \
4
--header 'x-api-key: REPLACE_KEY_VALUE' \
5
--data '{
6
"chain": "CELO",
7
"feeCurrency": "CELO",
8
"contractAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
9
"spender": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
10
"isErc721": true,
11
"tokenId": "100000",
12
"fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2",
13
"nonce": 1,
14
"fee": {
15
"gasLimit": "40000",
16
"gasPrice": "20"
17
}
18
}
Copied!
4. Create a new marketplace or auction listing. For more information on how to do so, please refer to our guide on creating NFT marketplaces or our guide on creating NFT auctions.
5. If the NFT is listed as for sale for an ERC-20 token, the buyer must then give the ERC-20 smart contract permission to spend ERC-20 tokens at the marketplace or auction.
6. To pay the royalties as a percentage of the sale price at the NFT marketplace in an ERC-20 token, the buyer must then give permission to the NFT smart contract to spend the ERC-20 token and send royalties to the creators.
JavaScript
cURL + KMS
cURL + private key
1
const approve = new ApproveErc20();
2
approve.contractAddress = '0x874069Fa1Eb16D44d622F2e0Ca25eeA172369bC1';
3
approve.spender = '0x8cb76aEd9C5e336ef961265c6079C14e9cD3D2eA';
4
approve.chain = Currency.CELO;
5
approve.feeCurrency = Currency.CELO;
6
approve.amount = '0.001015';
7
approve.fromPrivateKey = '0x4874827a55d87f2309c55b835af509e3427aa4d52321eeb49a2b93b5c0f8edfb';
8
approve.fee = {gasPrice: '5', gasLimit: '300000'};
9
console.log(await sendAuctionApproveErc20Transfer(true, approve, 'https://alfajores-forno.celo-testnet.org'));
Copied!
1
curl --request POST \
2
--url https://api-eu1.tatum.io/v3/blockchain/token/approve \
3
--header 'content-type: application/json' \
4
--header 'x-api-key: REPLACE_KEY_VALUE' \
5
--header 'x-testnet-type: SOME_STRING_VALUE' \
6
--data '{
7
"chain": "CELO",
8
"amount": "100000",
9
"spender": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
10
"contractAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
11
"signatureId": "26d3883e-4e17-48b3-a0ee-09a3e484ac83",
12
"nonce": 0,
13
"feeCurrency": "CELO"
14
}
Copied!
1
curl --request POST \
2
--url https://api-eu1.tatum.io/v3/blockchain/token/approve \
3
--header 'content-type: application/json' \
4
--header 'x-api-key: REPLACE_KEY_VALUE' \
5
--header 'x-testnet-type: SOME_STRING_VALUE' \
6
--data '{
7
"chain": "CELO",
8
"amount": "100000",
9
"spender": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
10
"contractAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
11
"fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2",
12
"nonce": 0,
13
"feeCurrency": "CELO"
14
}
Copied!
7. Now, the buyer can use the buy asset on marketplace or the bid for asset on auction endpoints to purchase or bid for the NFT from the marketplace or auction.

And you’re good to go!

That’s it, just a couple new steps and you’re all updated with our latest NFT marketplace and auction features. We understand it might be a bit of hassle to migrate over to the new features, but we’re confident that the percentage-based royalty and provenance data features are worth it. Plus, instead of transferring NFTs to the marketplace and auction smart contracts, you only need to allow them to be transferred by the smart contract, which is much more efficient overall.
If you have any questions at all or need any help, our tech team is always ready to assist on the Tatum Discord or subreddit. We hope you enjoy the new features!