Mint a Token

This describes how to mint a specified amount of tokens to a specified wallet address on the network specified, for the token contract specified.

To use this method, you need an idexo API keyarrow-up-right that has been upgraded to a customer API key. To upgrade, please contact usarrow-up-right.

You will also need the address of a deployed ERC20 token contract to use. You can create one herearrow-up-right.

Assuming you have installed the SDKarrow-up-right, 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 Startedarrow-up-right tutorial):

const ido = require('idexo-sdk')
ido.network.mintToken(apiKey, contractAddress, mintToAddress, amount)
.then((res) => console.log(res.data))

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

  • contractAddress: the address of the BEP20 token contract

  • mintToAddress: the address of the wallet you want to the tokens to

  • amount: the amount of tokens to mint

The method in summary is:

ido.Ethereum.mintERC20(contractAddress, addressToMintTo, image, apiKey)

Last updated

Was this helpful?