useBurnNFT
Burn an NFT
Example
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>
);
};
Parameters
Returns
a mutation object that can be used to burn an NFT token from the connected wallet