mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
chore: add bundle api helper (#5119)
This commit is contained in:
@ -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.
|
||||
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user