Beta
an instance of a TokenContract
a mutation object that can be used to tokens to the wallet specified in the params
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: claimTokens,
isLoading,
error,
} = useClaimToken(contract);
if (error) {
console.error("failed to claim tokens", error);
}
return (
<button
disabled={isLoading}
onClick={() => claimTokens({ to: "{{wallet_address}}", amount: 100 })}
>
Claim Tokens!
</button>
);
};
ERC20ClaimPhasesV2 | ERC20ClaimPhasesV1 | ERC20ClaimConditionsV2 | ERC20ClaimConditionsV1
Generated using TypeDoc
Claim tokens to a specific wallet