How to Mint Multi Tokens (ERC-1155)

To mint an NFT you need a Collection to which said NFT must belong. Once you have the Collection SmartContract, minting NFTs just takes a few steps.

Minting a Multi Token

  1. Select the network you want the NFTs to exist.
  2. Have ready a Collection (SmartContract) for your Multi Token to belong.
  3. Have ready an address with its privatekey with native assets. Required to pay for the minting.
  4. Have ready the URI Structure in your Web Server.
  5. Mint the Multi Token.

Steps

Example request to mint a Multi Token (CELO Testnet)

Step_1: Set up the URI Structure

Find additional information in the following article.

Step_2: Have ready the Multi Token Smart Contract

Find additional information in the following article.

Step_3: Mint the Multi Token

Example request:

curl --location --request POST 'https://api.tatum.io/v3/multitoken/mint/' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data-raw '{
    "to": "0x8cb76aed9c5e336ef961265c6079c14e9cd3d2ea",
    "contractAddress": "0x7e8fada7108d0DBbE8C6aca50d0FFb13CC34Eb81",
    "tokenId": "1",
    "amount": "10",
    "chain": "CELO",
    "fromPrivateKey": "####",
    "nonce": 0,
    "fee": {
      "gasLimit": "40000",
      "gasPrice": "40"
    }
}'
//Response:
{
    "txId": "0x67e5f725726c3bd7fc6689797be8ef41f59aa535ef33e4d7135874be4e820289"
}

Step_4: Mint Multi Tokens in batches (Optional)

ERC-1155 smart contracts can include multiple tokens for the same ID, you can also mint multiple tokens for multiple IDs

Example request:

curl --location --request POST 'https://api.tatum.io/v3/multitoken/mint/batch' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data-raw '{
    "to": ["0x8cb76aed9c5e336ef961265c6079c14e9cd3d2ea", "0x8cb76aed9c5e336ef961265c6079c14e9cd3d2ea"],
    "contractAddress": "0x7e8fada7108d0DBbE8C6aca50d0FFb13CC34Eb81",
    "tokenId": [["1"], ["2"]],
    "amounts": [["10"], ["20"]],
    "chain": "CELO",
    "fromPrivateKey": "####",
    "fee": {
      "gasLimit": "40000",
      "gasPrice": "40"
    }
}'
//Response:
{
    "txId": "0x0b4e6281b7710e6d0b4fdbed463a265f87ab3ac41c8f3e8e75b7b56331e3e091"
}