encodeERC721ApproveCall static method

Uint8List encodeERC721ApproveCall(
  1. EthereumAddress contractAddress,
  2. EthereumAddress to,
  3. BigInt tokenId
)

Encodes the calldata for ERC721 approval.

  • contractAddress: The address of the contract.
  • to: The address to approve.
  • tokenId: The tokenId to approve.

Returns a Uint8List representing the calldata.

Implementation

static Uint8List encodeERC721ApproveCall(
    EthereumAddress contractAddress, EthereumAddress to, BigInt tokenId) {
  return encodeFunctionCall("approve", contractAddress,
      ContractAbis.get("ERC721"), [to.hex, tokenId]);
}