Minting and burning

Minting

On version 1 of the NFT contracts, metadata definition and minting happen in a single step:

On version 2 of the NFT contracts, metadata definition and minting are separated. This allows for more scalability when minting a high number of tokens by eliminating redundant storage deposits, and it comes with an array of configurability around the mint.

Burning

To burn tokens, you can use the nft_batch_burn method:

function nft_batch_burn(token_ids: Array<string>);

This will remove the token from the on-chain storage! This means you can no longer use methods such as nft_token with this token ID, but storage requirements are being decreased by burning. To verify your identity, you are required to attach one yoctoNEAR to the method call.

Last updated