Beta
an instance of a NFTContract
a mutation object that can be used to burn an NFT token from the connected wallet
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>
);
};
ERC721Burnable | ERC1155Burnable
Generated using TypeDoc
Burn an NFT