allowance method

Future<BigInt> allowance(
  1. EthereumAddress owner,
  2. EthereumAddress spender, {
  3. BlockNum? atBlock,
})

Returns the remaining number of tokens that spender will be allowed to spend on behalf of owner through transferFrom. This is zero by default. This value changes when approve or transferFrom are called.

The optional atBlock parameter can be used to view historical data. When set, the function will be evaluated in the specified block. By default, the latest on-chain block will be used.

Implementation

Future<BigInt> allowance(
    _i1.EthereumAddress owner, _i1.EthereumAddress spender,
    {_i1.BlockNum? atBlock}) async {
  final function = self.abi.functions[0];
  assert(checkSignature(function, 'dd62ed3e'));
  final params = [owner, spender];
  final response = await read(function, params, atBlock);
  return (response[0] as BigInt);
}