approveNFTToken method

Future<ISendUserOperationResponse> approveNFTToken(
  1. EthereumAddress nftContractAddress,
  2. EthereumAddress spender,
  3. BigInt tokenId, [
  4. TxOptions? options,
])

Approves a spender to transfer or withdraw a specific NFT tokenId on behalf of the user.

nftContractAddress - Address of the token contract. spender - Address which will spend the tokens. tokenId - NFT token ID of item in the collection to approve. options - Additional transaction options.

Implementation

Future<ISendUserOperationResponse> approveNFTToken(
  EthereumAddress nftContractAddress,
  EthereumAddress spender,
  BigInt tokenId, [
  TxOptions? options,
]) {
  return _executeTokenOperation(
    nftContractAddress,
    spender,
    tokenId,
    ContractsUtils.encodeERC721ApproveCall,
    options,
  );
}