encodeERC20TransferCall static method
- EthereumAddress address,
- EthereumAddress recipient,
- EtherAmount amount
Encodes the calldata for ERC20 transfer.
address
: The 4337 wallet address.recipient
: The address of the recipient.amount
: The amount to transfer.
Returns a Uint8List representing the calldata.
Implementation
static Uint8List encodeERC20TransferCall(
EthereumAddress address,
EthereumAddress recipient,
EtherAmount amount,
) {
return encodeFunctionCall(
'transfer',
address,
ContractAbis.get('ERC20'),
[recipient, amount.getInWei],
);
}