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("{{contract_address}}");
const {
mutate: burnNFT,
isLoading,
error,
} = useBurnNFT(contract);

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

return (
<button
disabled={isLoading}
onClick={() => burnNFT({ tokenId: 0, amount: 1 })}
>
Burn!
</button>
);
};

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

View in React SDK Documentation