nftTransferOperation static method

UserOperation nftTransferOperation(
  1. EthereumAddress contractAddress,
  2. EthereumAddress owner,
  3. EthereumAddress recipient,
  4. 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));
}