Create a Non-Fungible Token (NFT) on Binance Smart Chain Mainnet and Arweave

How to mint an NFT on Binance Smart Chain Mainnet with the image and token metadata stored on Arweave, all in one line of code.

To use this method, you need an idexo API key that has been upgraded to a customer API key. To upgrade, please contact us.

You will also need the address of a NFT minter contract to use. You can create one here.

Assuming you have installed the SDK, you can use the following code in your file (instructions on modifying it follows - for more information on how to use it see our Getting Started tutorial):

const ido = require('idexo-sdk')
ido.Multi.mintBscAr(contractAddress, mintToAddress, imagepath, nftName, nftDescription, apiKey, attributes)
.then((res) => console.log(res.data))

To use the above code, you need to set values for:

  • contractAddress: the address of the NFT minter contract

  • mintToAddress: the address of the wallet you want to mint the NFT to

  • imagepath: the path in your directory to the image file you want to use, e.g. './sample.png'

  • nftName: the name to give this NFT

  • nftDescription: the description to give this NFT

  • apiKey: your idexo API key‚Äč

  • attributes: an optional attributes object e.g. { simplicity: 10 }

To see an example transaction that used the above code, see: https://bscscan.com/tx/0x065c92b6b5a880a29734ccd94c6eb0d5b9ddd401f54519387336f7c53c5c05d0.

The method in summary is:

ido.Multi.mintBscAr(contractAddress, addressToMintTo, imagepath, nftName, nftDescription, apiKey, attributes)