newPendingTransactionFilter method

Future<int?> newPendingTransactionFilter()

New pending transaction filter Creates a filter in the node, to notify when a new pending transaction arrives. To check if the state has changed, call getFilterChanges. Returns a filter id.

Implementation

Future<int?> newPendingTransactionFilter() async {
  final params = <String>[];
  const method = EthereumRpcMethods.newPendingTransactionFilter;
  final dynamic res = await _client.rpcClient.request(method, params);
  if (res != null && res.containsKey(EthereumConstants.ethResultKey)) {
    return EthereumUtilities.hexToInt(res[EthereumConstants.ethResultKey]);
  }
  _client.processError(method, res);
  return null;
}