feat(rpc): Start to implement flashbots_validateBuilderSubmissionV3 (#12061)

This commit is contained in:
Ryan Schneider
2024-10-26 09:15:08 -07:00
committed by GitHub
parent 09ebecffc7
commit f616de6d94
8 changed files with 121 additions and 4 deletions

View File

@ -180,7 +180,7 @@ use reth_provider::{
};
use reth_rpc::{
AdminApi, DebugApi, EngineEthApi, EthBundle, NetApi, OtterscanApi, RPCApi, RethApi, TraceApi,
TxPoolApi, Web3Api,
TxPoolApi, ValidationApi, Web3Api,
};
use reth_rpc_api::servers::*;
use reth_rpc_eth_api::{
@ -1067,6 +1067,11 @@ where
pub fn reth_api(&self) -> RethApi<Provider> {
RethApi::new(self.provider.clone(), Box::new(self.executor.clone()))
}
/// Instantiates `ValidationApi`
pub fn validation_api(&self) -> ValidationApi<Provider> {
ValidationApi::new(self.provider.clone())
}
}
impl<Provider, Pool, Network, Tasks, Events, EthApi, BlockExecutor>
@ -1223,6 +1228,9 @@ where
.into_rpc()
.into()
}
RethRpcModule::Flashbots => {
ValidationApi::new(self.provider.clone()).into_rpc().into()
}
})
.clone()
})