transferFrom method
Future<String>
transferFrom(
- EthereumAddress sender,
- EthereumAddress recipient,
- BigInt amount, {
- required Credentials credentials,
- Transaction? transaction,
Moves amount
tokens from sender
to recipient
using the allowance mechanism. amount
is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a Transfer event.
The optional transaction
parameter can be used to override parameters
like the gas price, nonce and max gas. The data
and to
fields will be
set by the contract.
Implementation
Future<String> transferFrom(
_i1.EthereumAddress sender, _i1.EthereumAddress recipient, BigInt amount,
{required _i1.Credentials credentials,
_i1.Transaction? transaction}) async {
final function = self.abi.functions[8];
assert(checkSignature(function, '23b872dd'));
final params = [sender, recipient, amount];
return write(credentials, transaction, function, params);
}