From 9223aed471d458da1a940a3b064674d1d865d3fd Mon Sep 17 00:00:00 2001 From: dr-frmr Date: Tue, 5 Mar 2024 17:14:08 -0300 Subject: [PATCH] sync with runtime --- src/eth.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/eth.rs b/src/eth.rs index 07f27fb..8dfd266 100644 --- a/src/eth.rs +++ b/src/eth.rs @@ -7,7 +7,7 @@ pub use alloy_rpc_types::{ TransactionReceipt, }; use serde::{Deserialize, Serialize}; -use std::collections::HashSet; +use std::collections::{HashMap, HashSet}; // // types mirrored from runtime module @@ -121,6 +121,8 @@ pub enum EthConfigAction { GetProviders, /// Get the current access settings. GetAccessSettings, + /// Get the state of calls and subscriptions. Used for debugging. + GetState, } /// Response type from an [`EthConfigAction`] request. @@ -135,6 +137,11 @@ pub enum EthConfigResponse { AccessSettings(AccessSettings), /// Permission denied due to missing capability PermissionDenied, + /// Response from a GetState request + State { + active_subscriptions: HashMap>>, // None if local, Some(node_provider_name) if remote + outstanding_requests: HashSet, + }, } /// Settings for our ETH provider