useClaimNFT
Claim an NFT to a specific wallet
Example
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: claimNFT,
isLoading,
error,
} = useClaimNFT(contract);
if (error) {
console.error("failed to claim nft", error);
}
return (
<button
disabled={isLoading}
onClick={() =>
claimNFT({ to: "{{wallet_address}}", quantity: 1 })
}
>
Claim NFT!
</button>
);
};
Parameters
Returns
a mutation object that can be used to claim a NFT to the wallet specificed in the params