encodeERC20ApproveCall static method
Uint8List
encodeERC20ApproveCall(
- EthereumAddress tokenAddress,
- EthereumAddress spender,
- BigInt amount
Encodes the data for an ERC20 'approve' operation.
tokenAddress
- Address of the ERC20 token contract.
spender
- Address which will be approved to spend the tokens.
amount
- Amount of tokens to approve.
Implementation
static Uint8List encodeERC20ApproveCall(
EthereumAddress tokenAddress,
EthereumAddress spender,
BigInt amount,
) {
return _encodeContractCall(
'ERC20',
tokenAddress,
'approve',
[spender, amount],
);
}