feat(mev): Enable mev_ namespace. (#14457)

This commit is contained in:
Ryan Schneider
2025-02-12 13:01:00 -08:00
committed by GitHub
parent 1e965caf5f
commit 15dff0f6a6
3 changed files with 11 additions and 2 deletions

View File

@ -247,6 +247,7 @@ pub use eth::EthHandlers;
// Rpc server metrics
mod metrics;
pub use metrics::{MeteredRequestFuture, RpcRequestMetricsService};
use reth_rpc::eth::sim_bundle::EthSimBundle;
// Rpc rate limiter
pub mod rate_limiter;
@ -1338,6 +1339,11 @@ where
// TODO: can we get rid of this here?
RethRpcModule::Flashbots => Default::default(),
RethRpcModule::Miner => MinerApi::default().into_rpc().into(),
RethRpcModule::Mev => {
EthSimBundle::new(eth_api.clone(), self.blocking_pool_guard.clone())
.into_rpc()
.into()
}
})
.clone()
})

View File

@ -271,6 +271,8 @@ pub enum RethRpcModule {
Flashbots,
/// `miner_` module
Miner,
/// `mev_` module
Mev,
}
// === impl RethRpcModule ===
@ -321,6 +323,7 @@ impl FromStr for RethRpcModule {
"ots" => Self::Ots,
"flashbots" => Self::Flashbots,
"miner" => Self::Miner,
"mev" => Self::Mev,
_ => return Err(ParseError::VariantNotFound),
})
}