diff --git a/crates/optimism/rpc/src/eth/mod.rs b/crates/optimism/rpc/src/eth/mod.rs index 4304a2a374110..2e3c8903cfaf0 100644 --- a/crates/optimism/rpc/src/eth/mod.rs +++ b/crates/optimism/rpc/src/eth/mod.rs @@ -79,6 +79,16 @@ where + 'static, >, { + /// Returns the wrapped + pub fn inner(&self) -> &Arc> { + &self.inner + } + + /// Returns a reference to the [`EthApiNodeBackend`]. + pub fn eth_api(&self) -> &EthApiNodeBackend { + self.inner.eth_api() + } + /// Build a [`OpEthApi`] using [`OpEthApiBuilder`]. pub const fn builder() -> OpEthApiBuilder { OpEthApiBuilder::new() @@ -273,6 +283,18 @@ struct OpEthApiInner { sequencer_client: Option, } +impl OpEthApiInner { + /// Returns a reference to the [`EthApiNodeBackend`]. + pub fn eth_api(&self) -> &EthApiNodeBackend { + &self.eth_api + } + + /// Returns the configured sequencer client, if any. + pub fn sequencer_client(&self) -> Option<&SequencerClient> { + self.sequencer_client.as_ref() + } +} + /// A type that knows how to build a [`OpEthApi`]. #[derive(Debug, Default)] pub struct OpEthApiBuilder {