Skip to content

Commit

Permalink
chore: add bundle api helper (#5119)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Oct 21, 2023
1 parent 2045171 commit 3a8fe5a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/rpc/rpc-builder/src/lib.rs
Expand Up @@ -159,6 +159,7 @@ pub use crate::eth::{EthConfig, EthHandlers};
pub use jsonrpsee::server::ServerBuilder;
pub use reth_ipc::server::{Builder as IpcServerBuilder, Endpoint};
use reth_network_api::noop::NoopNetwork;
use reth_rpc::eth::EthBundle;
use reth_transaction_pool::noop::NoopTransactionPool;

/// Convenience function for starting a server in one step.
Expand Down Expand Up @@ -1076,6 +1077,12 @@ where
TraceApi::new(self.provider.clone(), eth.api, self.blocking_pool_guard.clone())
}

/// Instantiates [EthBundle] Api
pub fn bundle_api(&mut self) -> EthBundle<EthApi<Provider, Pool, Network>> {
let eth_api = self.eth_api();
EthBundle::new(eth_api, self.blocking_pool_guard.clone())
}

/// Instantiates OtterscanApi
pub fn otterscan_api(&mut self) -> OtterscanApi<EthApi<Provider, Pool, Network>> {
let eth_api = self.eth_api();
Expand Down

0 comments on commit 3a8fe5a

Please sign in to comment.