getBlockByNumber method

Future<Map<String, dynamic>?> getBlockByNumber(
  1. String blockTag, {
  2. bool fullTransactions = false,
})

Implementation

Future<Map<String, dynamic>?> getBlockByNumber(String blockTag,
    {bool fullTransactions = false}) async {
  final result =
      await _rpc('eth_getBlockByNumber', [blockTag, fullTransactions]);
  if (result == null) return null;
  return Map<String, dynamic>.from(result as Map);
}