How to create Tatum NF(royal)Ts

Create specialized NFTs that pay out a set amount to the creator for each subsequent transaction. Forever.

The ERC-721 token is a standardized smart contract with a predefined set of features. The tokens are non-fungible, which means that each one is unique. You can think of them as one-of-a-kind collectibles.

How can creators keep getting paid?

NFTs have surged in popularity, and many NFT marketplaces have implemented functionality to allow creators to receive a portion of every subsequent sale of their work. This is great for creators, as it allows them to continue getting paid each time their NFT changes hands.

However, there's one critical flaw. Once the NFT leaves the marketplace on which it was originally sold, the creator has no way to collect any money ever again. This is because the mechanism for collecting portions of subsequent sales is only implemented at the application level, not at the blockchain level.

For this reason, we have created a new type of NFT that implements this functionality at the blockchain level. Payouts for subsequent sales to the original creators happen automatically, and forever. Creators will keep getting paid for as long as their NFT exists. Tatum NF(royal)Ts are the first and only tokens to implement this type of functionality.

Tatum NF(royal)Ts are ERC-721 tokens with specialized smart contracts that pay creators back a designated amount for each subsequent transaction. The amount is set as an absolute value, not a percentage of each subsequent sale.

The reason why we have used absolute value instead of percentage is that the real-time agreed-upon value of the NFT can not be known by the blockchain itself at the time of future transactions. However, percentage-based creator shares can be implemented at the application level, and once the NFT leaves the application/marketplace, absolute value royalties will still continue to be paid out forever.

We've made it simple for you.

As with everything in Tatum, we have greatly simplified the process for you. In order to deploy smart contracts and mint NFTs, developers would need to learn a great deal about blockchain development. We've made it possible with just a few simple API calls. Tatum NF(royal)Ts can currently be created on Ethereum, Celo, and Binance Smart Chain.

Here's how to do it.

Creating an NFT Smart Contract

To create and deploy NF(royal)Ts using Tatum, all you need is one simple API call. This API call deploys a standard, validated NFT smart contract to the blockchain of your choice.

In this example, we are using Celo because it is fast, cheap and you can pay for transactions with a stable coin (cUSD). The required parameters are the name and symbol of the deployed token, the initial supply of the tokens, and the recipient address where the initial supply will be transferred.

Blockchain transactions are signed using a private key via API, which is not a secure way of signing transactions. Your private keys and mnemonics should never leave your security perimeter. To correctly and securely sign a transaction, you can use Tatum CLI from the command line, a specific language library like Tatum JS, the local middleware API, or our complex key management system, Tatum KMS.

Request
Response
Request
curl --location --request POST 'https://api-eu1.tatum.io/v3/nft/deploy' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"symbol": "COLLECTIBLE",
"name": "CollectibleToken",
"chain": "CELO",
"fromPrivateKey": "0x4874827a55d87f2309c55b835af509e3427aa4d52321eeb49a2b93b5c0f8edfb",
"feeCurrency": "CUSD"
}'
Response
{
"txId": "0xe9d62746dba8d39035142420eeb25dcaed717e615e06ed797118dc55aa5863f9"
}

Getting the details of the blockchain transaction

The response is the transaction ID from which the created token's address can be obtained. You can see the property contractAddress, which is the address of the NFT.

Request
Response
Request
curl --location --request GET 'https://api-eu1.tatum.io/v3/nft/transaction/CELO/0xe9d62746dba8d39035142420eeb25dcaed717e615e06ed797118dc55aa5863f9' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"blockHash": "0xb67611ef02119da1082883acd6453ebc64655ed31c3b345d184050a808c3bebc",
"blockNumber": 9814820,
"contractAddress": "0x1860Cf5A199892BC527A0698e7be08a7C6Bc6064",
"gas": 4500000,
"gasPrice": "119000000000",
"gasUsed": 4446222,
...
...
}

Minting a new unique ERC-721 token

When your NFT smart contract is deployed and you know the contract address, you can issue new unique tokens with the Mint NFT endpoint. This endpoint will create a new token with a unique identifier. Every token should have metadata as a JSON schema containing additional information about the token, like the image URL, description, etc. If you want to enable the royalty feature, you need to enter two new properties - authorAddresses and cashbackValues. You can define a list of recipients of the cashback for every subsequent transfer of the token. These values are absolute and are in the currency of the underlying blockchain.

You want to set up a cashback token for 1 author 0x8cb76aed9c5e336ef961265c6079c14e9cd3d2ea with value 0.1. This address will receive the cashback of 0.1 CELO for every token transfer.

Request
Response
Request
curl --location --request POST 'https://api-eu1.tatum.io/v3/nft/mint' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"tokenId": "1",
"to": "0x8cb76aed9c5e336ef961265c6079c14e9cd3d2ea",
"chain": "CELO",
"contractAddress": "0xd2A6B389eBE69208636B20b2abAcFC1eE0C3fF57",
"cashbackValues": ["1"],
"authorAddresses": ["0x8cb76aed9c5e336ef961265c6079c14e9cd3d2ea"],
"url": "https://my_token_data.com",
"fromPrivateKey": "0x4874827a55d87f2309c55b835af509e3427aa4d52321eeb49a2b93b5c0f8edfb",
"feeCurrency": "CUSD"
}'
Response
{
"txId": "0xc13b89f8f270e7848d2a8897582a01f1db60bb30918044d5fa3a0744b455a5a6"
}

Transferring a specific ERC-721 token

To transfer tokens from the address where they were issued to another blockchain address, you can use the Transfer NFT token endpoint. You need the private key of the address where the tokens are located (address from the first call where the initial supply is distributed). You need to provide the value for the transfer transaction - it's the sum of all the royalties that should be paid to the authors.

Request
Response
Request
curl --location --request POST 'https://api-eu1.tatum.io/v3/nft/transaction' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"tokenId": "1",
"chain": "CELO",
"value": "1",
"to": "0xfb99F8aE9b70A0C8Cd96aE665BBaf85A7E01a2ef",
"contractAddress": "0xd2A6B389eBE69208636B20b2abAcFC1eE0C3fF57",
"fromPrivateKey": "0x4874827a55d87f2309c55b835af509e3427aa4d52321eeb49a2b93b5c0f8edfb",
"feeCurrency": "CUSD"
}'
Response
{
"txId": "0x06d2f647c52f7a71b7f157dda4b3e9bd4beb7dff1f1910fa32ed5dc479fd5183"
}

Again, the result is a blockchain transaction with an ID. In this detail, you can see, that the token was transferred to another recipient and the royalty cashback was paid to the author.

Request
Response
Request
curl --location --request GET 'https://api-eu1.tatum.io/v3/nft/transaction/CELO/0xe9d62746dba8d39035142420eeb25dcaed717e615e06ed797118dc55aa5863f9' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"blockHash": "0xb67611ef02119da1082883acd6453ebc64655ed31c3b345d184050a808c3bebc",
"blockNumber": 9814820,
"contractAddress": "0x1860Cf5A199892BC527A0698e7be08a7C6Bc6064",
"gas": 4500000,
"gasPrice": "119000000000",
"gasUsed": 4446222,
...
...
}

Getting a list of tokens that belong to the address

If you want to display a list of tokens, that someone possesses, you can use the Get NFT Account balance endpoint.

Request
Response
Request
curl --location --request GET 'https://api-eu1.tatum.io/v3/nft/balance/CELO/0xd2A6B389eBE69208636B20b2abAcFC1eE0C3fF57/0xfb99F8aE9b70A0C8Cd96aE665BBaf85A7E01a2ef' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"data": ["1"]
}

Obtaining metadata for a specific token

If you want to obtain a metadata URL for a token, you can use the Get NFT Token metadata endpoint.

Request
Response
Request
curl --location --request GET 'https://api-eu1.tatum.io/v3/nft/royalty/CELO/0xd2A6B389eBE69208636B20b2abAcFC1eE0C3fF57/1' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"data": "https://my_token_data.com"
}

Obtaining royalty details for a specific token

If you want to obtain royalty details for a token, you can use the Get NFT Royalty data endpoint.

Request
Response
Request
curl --location --request GET 'https://api-eu1.tatum.io/v3/nft/metadata/CELO/0x1860Cf5A199892BC527A0698e7be08a7C6Bc6064/1' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"addresses": [
"0x8cb76aEd9C5e336ef961265c6079C14e9cD3D2eA"
],
"values": [
"1"
]
}

Tatum NF(royal)Ts are the only tokens in existence that payout to creators forever. They're easy to deploy, easy to work with, and provide enormous benefits for users. We look forward to the marketplaces you will create with them!

To find out more about the API calls we have just used, visit our API Reference.