Skip to main content

ERC721 - Burn NFTs

You can utilize these features of the SDK if your contract implements the ERC721Burnable standard.

Burn NFTs

Burn (transfer to a non-recoverable address) an NFT.

Burning

Burning does not "delete" the NFT; the token ID and metadata will still be available on-chain.

const Component = () => {
const { contract } = useContract(<ContractAddress>);
const {
mutate: burnNft,
isLoading,
error,
} = useBurnNFT(contract);

if (error) {
console.error("failed to burn nft", error);
}

return (
<button
disabled={isLoading}
onClick={() => burnNft({ tokenId: 0 })}
>
Burn!
</button>
);
};

This snippet is for v3 of the SDK. Learn how to upgrade.

View in React SDK Documentation