nftTransferOperation static method
- EthereumAddress contractAddress,
- EthereumAddress owner,
- EthereumAddress recipient,
- BigInt tokenId
Returns a UserOperation to transfer an NFT.
contractAddress
: The address of the contract.owner
: The address of the owner of the NFT.recipient
: The address of the recipient of the NFT.
Implementation
static UserOperation nftTransferOperation(EthereumAddress contractAddress,
EthereumAddress owner, EthereumAddress recipient, BigInt tokenId) {
final innerCallData = execute(owner,
to: contractAddress,
innerCallData: encodeERC721SafeTransferCall(
contractAddress,
owner,
recipient,
tokenId,
));
return UserOperation.partial(callData: hexlify(innerCallData));
}