🔥Burn NFTs

How to delete (burn) your existing NFTs

For burning already minted NFTs, there is a method in the NFT class.

// NFT class instance
await nft.burn();

This will create a registry in the Scheduler. As in other examples, you can get notified when an NFT is burned.

sdk.waitFor({
    type: MTMEvent.burn,
    smartContractId: sc.data._id
}).subscribe({smartContractId, idNFT} => {
    console.log('Burned NFT');
});

You can also use the object oriented method.

nft.onBurn().subscribe(() => console.log('Burned!'));

Self burn

You can also perform by yourself the action of burning an NFT.

// Some NFT class instance
await nft.burn(true); // Self burn = tru

MAKE SURE DEPLOY IS EXECUTED ON A BROWSER WITH METAMASK

Last updated