Transfer NFT
Transfer NFT
To transfer an ERC721 (NFT) asset, use the transferNFT()
method. The method takes the following parameters as inputs:
Parameter | Type | Description |
---|---|---|
nftContractAddress | address | The contract address of the ERC721 asset |
recipientAddress | address | The recipient's wallet address |
tokenId | number | The ID of the asset you wish to transfer |
final tokenId = 1;
final res = await fuseSDK.transferNFT(
EthereumAddress.fromHex('NFT_CONTRACT_ADDRESS'),
EthereumAddress.fromHex('RECIPIENT_ADDRESS'),
tokenId,
);
print('UserOpHash: ${res.userOpHash}');
print('Waiting for transaction...');
final ev = await res.wait();
print('Transaction hash: ${ev?.transactionHash}');
Code example
For more code examples on using the Fuse Wallet SDK for Flutter for NFT Transfer, you can check out the official Flutter SDK repository.