totalSupply method

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

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