useClaimToken
Claim tokens to a specific wallet
Example
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>
);
};
Parameters
Returns
a mutation object that can be used to tokens to the wallet specified in the params