Beta
an instance of a NFTContract
a mutation object that can be used to transfer NFTs
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: transferNFT,
isLoading,
error,
} = useTransferNFT(contract);
if (error) {
console.error("failed to transfer NFT", error);
}
return (
<button
disabled={isLoading}
onClick={() => transferNFT({
to: "{{wallet_address}}",
tokenId: 2
})}
>
Transfer
</button>
);
};
ERC721 | ERC1155
Generated using TypeDoc
Transfer an NFT