getNonce method

Future<BigInt> getNonce(
  1. EthereumAddress sender,
  2. BigInt key,
  3. {BlockNum? atBlock}
)

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> getNonce(
  _i1.EthereumAddress sender,
  BigInt key, {
  _i1.BlockNum? atBlock,
}) async {
  final function = self.abi.functions[7];
  assert(checkSignature(function, '35567e1a'));
  final params = [
    sender,
    key,
  ];
  final response = await read(
    function,
    params,
    atBlock,
  );
  return (response[0] as BigInt);
}