encodeERC721SafeTransferCall static method

Uint8List encodeERC721SafeTransferCall(
  1. EthereumAddress contractAddress,
  2. EthereumAddress from,
  3. EthereumAddress to,
  4. BigInt tokenId
)

Encodes the calldata for ERC721 safe transfer.

  • contractAddress: The address of the contract.
  • from: The address to transfer from.

Returns a Uint8List representing the calldata.

Implementation

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