Use NFT Express with Your Own Smart Contract

In its standard mode, NFT Express automatically uses Tatum’s smart contract to allow you to mint NFTs without cryptocurrencies. However, you can also use NFT Express with your own smart contract and still cover the fees with credits from the monthly credit allowance of your paid pricing plan.

To use your own smart contract for minting NFTs with NFT Express, you are going to use an NTF minter, a special blockchain address provided by Tatum that will cover the minting fees. The number of credits equivalent to the fees will be then deducted from your monthly credit allowance of your paid pricing plan.

Your smart contract must be deployed as a general NFT smart contract. You cannot use cashback and provenance smart contracts with NFT Express. For more information, see the API Reference on deploying NFT smart contracts.

Minting NFTs with the NFT minter is supported on the following blockchains:

  • BNB Smart Chain

  • Celo

  • Ethereum

  • Harmony

  • Klaytn

  • Polygon

Pricing plans

  • To mint NFTs with the NFT minter on the mainnet, you need an API key with a paid Tatum plan. Visit the Tatum Dashboard to sign up for one. For details about Tatum’s plans pricing and allowances, visit Pricing & Plans.

    • For Celo and Harmony, the Start Plan should be enough to mint plenty of NFTs.

    • For Polygon and BNB Smart Chain, we recommend the Basic Plan.

    • As transaction fees on Ethereum are very high, we recommend the Enterprise Plan that can be customized to cover your needs. Contact us for an individualized Enterprise Plan package.

  • On the testnet, you can mint NFTs with the NFT minter regardless of your pricing plan.

While you can use API calls directly, you can also install Tatum’s JavaScript SDK.

You must enter the API key in the environment variables in your IDE or into the header of the direct API request.

How to use NFT Express with your own smart contract

To use NFT Express with your own smart contract, complete the following steps:

Add the Tatum minter address as an NFT minter to your smart contract

To be able to use your own NFT smart contract and still cover the fees with credits, allow the Tatum minter address to mint NFTs on your smart contract. This ensures the fees will be paid from your credit allowance. To do so, use the API for adding a minter to an NFT smart contract.

While adding a minter to an NFT smart contract is a necessary step for getting NFT minted on your smart contract, it is not part of the NFT Express functionality. Therefore, you cannot cover the transaction fee with your credits and have to pay it yourself by signing the transaction with the private key of the blockchain address from which the fee will be deducted.

  • On the mainnet, the address of the Tatum NFT minter is 0x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94 for any of the supported blockchains.

  • On the testnet, the address of the Tatum NFT minter depends on the blockchain:

    • BNB Smart Chain: 0xc16ae5e8c985b906935a0cadf4e24f0400531883

    • Celo: 0xBC2eBA680EE50d685cc4Fe65f102AA70AfB27D3F

    • Ethereum: 0x53e8577C4347C365E4e0DA5B57A589cB6f2AB848

    • Harmony: 0x8906f62d40293ddca77fdf6714c3f63265deddf0

    • Klaytn: 0x80d8bac9a6901698b3749fe336bbd1385c1f98f2

    • Polygon: 0x542b9ac4945a3836fd12ad98acbc76a0c8b743f5

If a minter blockchain address on the testnet does not have sufficient funds to cover the transaction fee, add some amount to it using a crypto faucet of the blockchain.

The following sample request shows how to add the address of the Tatum NFT minter to the smart contract on Polygon (the mainnet):

curl -i -X POST \
  https://api.tatum.io/v3/nft/mint/add \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "chain": "MATIC",
    "contractAddress": "0xd3owv7qkfi7bg73dqn5ip56lgd6vhsbiqee7f7qk",
    "minter": "0x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94",
    "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2"
  }'
  • chain is the blockchain on which your NFT smart contract is deployed.

  • contractAddress is the address of your NFT smart contract.

  • minter is the mainnet address of the Tatum NFT minter.

  • fromPrivateKey is the private key of the blockchain address from which you want to pay the fee for adding the Tatum NFT minter to your smart contract.

The API returns the hash (ID) of the transaction:

{
  "txId": "0xa1bdc0008b6cce138cec38336a3cbbf1117cc56bcfe0004e14d6789a9d099b72"
}

Once you have added the Tatum NFT minter to your smart contract as an NFT minter, you can mint an NFT.

Mint NFTs

To mint an NFT, use the API for minting NFTs with the MintNftMinter schema of the request body.

The following sample request shows how to mint an NFT on the smart contract address, to which you previously added the Tatum NFT minter, on Polygon (the mainnet):

curl -i -X POST \
  https://api.tatum.io/v3/nft/mint \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "chain": "MATIC",
    "contractAddress": "0xd3owv7qkfi7bg73dqn5ip56lgd6vhsbiqee7f7qk",
    "minter": "0x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94",
    "to": "0x4a08bf00f83e6ada9a243dbf04a51aae10f1526b",
    "tokenId": "123123123",
    "url": "ipfs://bafkreibiqkirqhb3c7evrezmbhrzeupky7exycgeqmqrylxlkngwcy2oe4"
  }'
  • chain is the blockchain on which the NFT will be minted.

  • contractAddress is the address of your NFT smart contract.

  • minter is the address of the Tatum NFT minter that you have added as a minter to your smart contract.

  • to is the blockchain address of the recipient to whom the NFT will be sent.

  • tokenId is the identifier of the NTF that will be minted.

  • url is the URL of the metadata (image, audio, video, and so on) to be included in the NFT. For more information about how to upload metadata to IPFS for free using Tatum, see Store Metadata to IPFS and Include It in an NFT.

The API returns the hash (ID) of the minting transaction, from which you can get information about the minted NFT:

{
  "txId": "c33123d47a4f89d47b314d6748eb0e9bc9c83f8818db43d9ba4accfe454aa44f"
}

More information about the NFT minter

You can find more information about minting NFTs using the Tatum NFT minter in our blog article and in the API Reference on minting NFTs.

Last updated