blockNumber method
Block number, the number of most recent block.
Implementation
Future<int?> blockNumber() async {
const method = EthereumRpcMethods.blockNumber;
final dynamic res = await _client.rpcClient.request(method);
if (res != null && res.containsKey(EthereumConstants.ethResultKey)) {
return EthereumUtilities.hexToInt(res[EthereumConstants.ethResultKey]);
}
_client.processError(method, res);
return null;
}