Beta
an instance of a TokenContract
a mutation object that can be used to burn tokens from the connected wallet
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: burnTokens,
isLoading,
error,
} = useBurnToken(contract);
if (error) {
console.error("failed to burn tokens", error);
}
return (
<button
disabled={isLoading}
onClick={() => burnTokens({ amount: 1000 })}
>
Burn!
</button>
);
};
ERC20Burnable
Generated using TypeDoc
Burn tokens