Tatum

Tatum is a blockchain development platform that offers developers exceptional tools for developing blockchain applications.

Paying gas fees to mint NFTs from custom smart contracts in fiat

Evan Vischi
Tatum
Published in
4 min readApr 12, 2022

--

Why do I need crypto to mint NFTs?

If you want to mint NFTs, you need to pay blockchain transaction fees (gas fees). These gas fees must be paid, or else you will not be able to create NFTs. Gas fees are paid in the native currency of the blockchain on which you are minting. For example, on Ethereum, the native currency is ETH, for Polygon, it’s called MATIC. So if you want to make NFTs from within your app, or allow your users to do mint their own, you’ll need to obtain crypto to pay for them.

Why is this a problem?

This may seem simple enough if you’re just minting a few NFTs, but if you want to mint at any sort of large scale, you might run into a few obstacles:

  1. To obtain crypto, you’ll most likely have to buy it from an exchange. Many banks don’t like this, and you’ll be subject to regulations in most countries. Some banks will even shut down your account if you are using it to buy crypto.
  2. You’ll need to hold crypto on each blockchain you want to mint on, which makes building multichain NFT apps and marketplaces a nightmare.
  3. To send the crypto to pay the gas fees, you need to use something called “private keys.” If you want to enable your app’s end-users to mint NFTs, you’ll need to figure out a way to handle their private keys securely. Building a rock-solid security system can take months.

How to mint NFTs without holding crypto.

To overcome these obstacles, we’ve created a feature called NFT Express. It allows you to mint NFTs and deducts the gas fees from your paid Tatum plan, which you can pay for in fiat currencies. You no longer need to buy or hold crypto, and you don’t need to worry about dealing with private keys. Tatum takes care of all of that for you.

You can mint NFTs from Tatum’s smart contracts, or you can even use NFT Express to pay for the gas fees for minting from your own smart contracts. Here’s how to do it:

  1. First, you’ll need to get an API key with a paid Tatum plan. Please visit the Tatum Dashboard to sign up for one. To mint NFTs on Celo and Harmony, a $9/month Start Plan should be enough to mint plenty of NFTs. For Polygon and BSC, we’d recommend a $49/month Basic Plan. Since gas fees on Ethereum are very high, please contact us to get an Enterprise Plan that will suit your needs.
  2. Next, enter the API key in the environment variables in your IDE or into the header of the direct API request. To use JavaScript, please download and install the Tatum JavaScript SDK.
  3. Now, add Tatum’s address as a minter role to your NFT smart contract. (NOTE: In order to use this feature, your smart contract MUST include a minter role, otherwise it will not work).
  4. Finally, you can now mint NFTs from your contract and we will deduct the gas fees from your Tatum plan. Use the following API call to do so:

The required parameters are:

chain — The blockchain on which the NFT will be minted. In the example above, we have used Polygon (MATIC), but you can also mint NFTs on Ethereum (ETH), Celo (CELO), Harmony (ONE), and Binance Smart Chain (BSC).

to — The recipient’s address to which the NFT will be sent

url — The URL of the metadata (image, audio, video, etc.) to be included in the NFT. For more on how to upload metadata to IPFS for free using Tatum, please refer to our full guide.

contractAddress — the address of your smart contract.

tokenId — a unique ID number of the token being minted.

minter — Tatum’s minter address on the respective blockchain. Here are the addresses for all blockchains that currently support NFT Express:

  • MATIC — 0xcf9e127455d28e7362380aec1b92ddee8200b295
  • BSC — 0xcf9e127455d28e7362380aec1b92ddee8200b295
  • ONE — 0xcf9e127455d28e7362380aec1b92ddee8200b295
  • ETH — 0xcf9e127455d28e7362380aec1b92ddee8200b295
  • CELO — 0xcf9e127455d28e7362380aec1b92ddee8200b295
  • KLAY — 0xcf9e127455d28e7362380aec1b92ddee8200b295

And that’s it!

Now you can mint as many NFTs as you want from your own smart contracts and not ever worry about holding crypto to pay for gas fees or sending private keys. Everything is taken care of on Tatum’s end, so you can just mint to your heart’s content…

To learn more about NFT Express, check out our full guide, and if you have any questions or need any help, hop onto our Discord and one of our devs will get back to you asap.

--

--

Tatum
Tatum

Published in Tatum

Tatum is a blockchain development platform that offers developers exceptional tools for developing blockchain applications.

Evan Vischi
Evan Vischi

Written by Evan Vischi

Community Manager at Tatum. We are the fastest way to build blockchain apps. Support for over 40+ blockchain protocols, no blockchain experience required.

No responses yet