diff --git a/crates/rpc/rpc/Cargo.toml b/crates/rpc/rpc/Cargo.toml index 733f218a1a..5c2ebaa235 100644 --- a/crates/rpc/rpc/Cargo.toml +++ b/crates/rpc/rpc/Cargo.toml @@ -54,7 +54,6 @@ http-body.workspace = true hyper.workspace = true jsonwebtoken.workspace = true serde_json.workspace = true -jsonrpsee-types = { workspace = true, optional = true } # async async-trait.workspace = true @@ -91,6 +90,5 @@ optimism = [ "reth-provider/optimism", "reth-rpc-eth-api/optimism", "reth-revm/optimism", - "jsonrpsee-types", "reth-rpc-eth-types/optimism", ] diff --git a/crates/rpc/rpc/src/eth/helpers/mod.rs b/crates/rpc/rpc/src/eth/helpers/mod.rs index 175d72c764..f0a0cccb55 100644 --- a/crates/rpc/rpc/src/eth/helpers/mod.rs +++ b/crates/rpc/rpc/src/eth/helpers/mod.rs @@ -6,8 +6,6 @@ pub mod signer; mod block; mod call; mod fees; -#[cfg(feature = "optimism")] -pub mod optimism; mod pending_block; mod receipt; mod spec; diff --git a/crates/rpc/rpc/src/eth/helpers/optimism.rs b/crates/rpc/rpc/src/eth/helpers/optimism.rs deleted file mode 100644 index 03d45dbe47..0000000000 --- a/crates/rpc/rpc/src/eth/helpers/optimism.rs +++ /dev/null @@ -1,31 +0,0 @@ -//! Loads and formats OP transaction RPC response. - -use jsonrpsee_types::error::ErrorObject; -use reth_rpc_eth_types::EthApiError; -use reth_rpc_server_types::result::internal_rpc_err; -use reth_rpc_types::ToRpcError; - -/// Optimism specific errors, that extend [`EthApiError`]. -#[derive(Debug, thiserror::Error)] -pub enum OptimismEthApiError { - /// Thrown when calculating L1 gas fee. - #[error("failed to calculate l1 gas fee")] - L1BlockFeeError, - /// Thrown when calculating L1 gas used - #[error("failed to calculate l1 gas used")] - L1BlockGasError, -} - -impl ToRpcError for OptimismEthApiError { - fn to_rpc_error(&self) -> ErrorObject<'static> { - match self { - Self::L1BlockFeeError | Self::L1BlockGasError => internal_rpc_err(self.to_string()), - } - } -} - -impl From for EthApiError { - fn from(err: OptimismEthApiError) -> Self { - Self::other(err) - } -}