getFilterChanges method

Future<EthereumFilter?> getFilterChanges(
  1. int? filterId
)

Get filter changes Polling method for a filter, which returns an list of logs which occurred since last poll. Filter Id Returns an EthereumFilter object or null

Implementation

Future<EthereumFilter?> getFilterChanges(int? filterId) async {
  if (filterId == null) {
    throw ArgumentError.notNull('Ethereum::getFilterChanges - filterId');
  }
  final params = <String>[EthereumUtilities.intToHex(filterId)];
  const method = EthereumRpcMethods.getFilterChanges;
  final dynamic res = await _client.rpcClient.request(method, params);
  if (res != null && res.containsKey(EthereumConstants.ethResultKey)) {
    return EthereumFilter.fromMap(res[EthereumConstants.ethResultKey]);
  }
  _client.processError(method, res);
  return null;
}