Skip to content

Commit

Permalink
Merge pull request #63 from kinode-dao/dr/eth-type-add-get-state
Browse files Browse the repository at this point in the history
sync with runtime
  • Loading branch information
dr-frmr authored Mar 5, 2024
2 parents f6a2bda + 9223aed commit a02248c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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<crate::Address, HashMap<u64, Option<String>>>, // None if local, Some(node_provider_name) if remote
outstanding_requests: HashSet<u64>,
},
}

/// Settings for our ETH provider
Expand Down

0 comments on commit a02248c

Please sign in to comment.