Beta
an instance of a TokenContract
a mutation object that can be used to transfer batch tokens
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: transferBatchTokens,
isLoading,
error,
} = useTransferToken(contract);
if (error) {
console.error("failed to transfer batch tokens", error);
}
return (
<button
disabled={isLoading}
onClick={() => transferBatchTokens([{ to: "{{wallet_address}}", amount: 1000 }, { to: "{{wallet_address}}", amount: 2000 }])}
>
Airdrop
</button>
);
};
ERC20
Generated using TypeDoc
Airdrop tokens to a list of wallets