getPastVotes method

Future<BigInt> getPastVotes(
  1. EthereumAddress account,
  2. BigInt blockNumber, {
  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> getPastVotes(_i1.EthereumAddress account, BigInt blockNumber,
    {_i1.BlockNum? atBlock}) async {
  final function = self.abi.functions[14];
  assert(checkSignature(function, '3a46b1a8'));
  final params = [account, blockNumber];
  final response = await read(function, params, atBlock);
  return (response[0] as BigInt);
}