getLogs method

Future<JsonListNested> getLogs({
  1. required String address,
  2. required List<String?> topics,
  3. required dynamic fromBlock,
  4. required dynamic toBlock,
})

Returns the Logs

Implementation

Future<JsonListNested> getLogs({
  required String address,
  required List<String?> topics,
  required dynamic fromBlock,
  required dynamic toBlock,
}) async {
  final response = await _call<JsonList>(
    'eth_getLogs',
    args: [
      {
        'address': address,
        'topics': topics,
        'fromBlock': dynToHex(fromBlock),
        'toBlock': dynToHex(toBlock),
      }
    ],
  );

  return response.cast<Json>();
}