import { useContract, useTransferNFT, Web3Button, } from "@thirdweb-dev/react"; // Your NFT collection contract address const contractAddress = "{{contract_address}}"; const walletAddress = "{{wallet_address}}"; const tokenId = "{{token_id}}"; function App() { // Contract must be an ERC-721 or ERC-1155 contract const { contract } = useContract(contractAddress); const { mutateAsync: transferNFT, isLoading, error, } = useTransferNFT(contract); return ( <Web3Button contractAddress={contractAddress} action={() => transferNFT({ to: walletAddress, // Address to transfer the token to tokenId: tokenId, // Token ID to transfer }) } > Transfer </Web3Button> ); }
See Also
ERC- 1155 VS ERC-721 - Which is Better for NFT StandardsERC721Supply | thirdweb contractNFT Image Size: Correct Dimensions for NFT Art [With Examples] - EbutemetaverseERC721 NFTs Decoded: Understanding approvals and ownership