getBlockNumber method

Future<int> getBlockNumber()

Returns the number of the most recent block on the chain.

Implementation

Future<int> getBlockNumber() {
  return _makeRPCCall<String>('eth_blockNumber')
      .then((s) => hexToInt(s).toInt());
}