chore(deps): rm reth-interfaces from rpc (#8444)

This commit is contained in:
Matthias Seitz
2024-05-28 19:50:58 +02:00
committed by GitHub
parent 409c15dde4
commit 0232221717
8 changed files with 16 additions and 15 deletions

3
Cargo.lock generated
View File

@ -7776,10 +7776,10 @@ dependencies = [
"pin-project",
"rand 0.8.5",
"reth-consensus-common",
"reth-errors",
"reth-evm",
"reth-evm-ethereum",
"reth-evm-optimism",
"reth-interfaces",
"reth-metrics",
"reth-network-api",
"reth-network-types",
@ -7791,6 +7791,7 @@ dependencies = [
"reth-rpc-types",
"reth-rpc-types-compat",
"reth-tasks",
"reth-testing-utils",
"reth-transaction-pool",
"revm",
"revm-inspectors",

View File

@ -13,10 +13,10 @@ workspace = true
[dependencies]
# reth
reth-interfaces.workspace = true
reth-primitives.workspace = true
reth-rpc-api.workspace = true
reth-rpc-types.workspace = true
reth-errors.workspace = true
reth-provider = { workspace = true, features = ["test-utils"] }
reth-transaction-pool = { workspace = true, features = ["test-utils"] }
reth-network-api.workspace = true
@ -81,10 +81,11 @@ dyn-clone.workspace = true
[dev-dependencies]
reth-evm-ethereum.workspace = true
reth-testing-utils.workspace = true
jsonrpsee = { workspace = true, features = ["client"] }
assert_matches.workspace = true
tempfile.workspace = true
reth-interfaces = { workspace = true, features = ["test-utils"] }
[features]
optimism = [

View File

@ -11,10 +11,9 @@ use crate::eth::{
gas_oracle::GasPriceOracle,
signer::EthSigner,
};
use async_trait::async_trait;
use reth_errors::{RethError, RethResult};
use reth_evm::ConfigureEvm;
use reth_interfaces::{RethError, RethResult};
use reth_network_api::NetworkInfo;
use reth_primitives::{
revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg},

View File

@ -435,7 +435,6 @@ mod tests {
};
use jsonrpsee::types::error::INVALID_PARAMS_CODE;
use reth_evm_ethereum::EthEvmConfig;
use reth_interfaces::test_utils::{generators, generators::Rng};
use reth_network_api::noop::NoopNetwork;
use reth_primitives::{
constants::ETHEREUM_BLOCK_GAS_LIMIT, BaseFeeParams, Block, BlockNumberOrTag, Header,
@ -448,6 +447,7 @@ mod tests {
use reth_rpc_api::EthApiServer;
use reth_rpc_types::FeeHistory;
use reth_tasks::pool::BlockingTaskPool;
use reth_testing_utils::{generators, generators::Rng};
use reth_transaction_pool::test_utils::{testing_pool, TestPool};
fn build_test_eth_api<

View File

@ -1,8 +1,8 @@
//! Async caching support for eth RPC
use futures::{future::Either, Stream, StreamExt};
use reth_errors::{ProviderError, ProviderResult};
use reth_evm::ConfigureEvm;
use reth_interfaces::provider::{ProviderError, ProviderResult};
use reth_primitives::{
Block, BlockHashOrNumber, BlockWithSenders, Receipt, SealedBlock, SealedBlockWithSenders,
TransactionSigned, TransactionSignedEcRecovered, B256,

View File

@ -3,7 +3,7 @@
use crate::result::{internal_rpc_err, invalid_params_rpc_err, rpc_err, rpc_error_with_code};
use alloy_sol_types::decode_revert_reason;
use jsonrpsee::types::{error::CALL_EXECUTION_FAILED_CODE, ErrorObject};
use reth_interfaces::RethError;
use reth_errors::RethError;
use reth_primitives::{revm_primitives::InvalidHeader, Address, Bytes};
use reth_rpc_types::{
error::EthRpcErrorCode, request::TransactionInputError, BlockError, ToRpcError,
@ -193,9 +193,9 @@ impl From<RethError> for EthApiError {
}
}
impl From<reth_interfaces::provider::ProviderError> for EthApiError {
fn from(error: reth_interfaces::provider::ProviderError) -> Self {
use reth_interfaces::provider::ProviderError;
impl From<reth_errors::ProviderError> for EthApiError {
fn from(error: reth_errors::ProviderError) -> Self {
use reth_errors::ProviderError;
match error {
ProviderError::HeaderNotFound(_) |
ProviderError::BlockHashNotFound(_) |

View File

@ -99,8 +99,8 @@ macro_rules! impl_to_rpc_result {
}
impl_to_rpc_result!(PayloadError);
impl_to_rpc_result!(reth_interfaces::RethError);
impl_to_rpc_result!(reth_interfaces::provider::ProviderError);
impl_to_rpc_result!(reth_errors::RethError);
impl_to_rpc_result!(reth_errors::ProviderError);
impl_to_rpc_result!(reth_network_api::NetworkError);
/// Constructs an invalid params JSON-RPC error.
@ -152,7 +152,7 @@ pub(crate) fn rpc_err(
#[cfg(test)]
mod tests {
use super::*;
use reth_interfaces::{RethError, RethResult};
use reth_errors::{RethError, RethResult};
fn assert_rpc_result<T, E, TRR: ToRpcResult<T, E>>() {}

View File

@ -1,7 +1,7 @@
use crate::eth::error::{EthApiError, EthResult};
use async_trait::async_trait;
use jsonrpsee::core::RpcResult;
use reth_interfaces::RethResult;
use reth_errors::RethResult;
use reth_primitives::{Address, BlockId, U256};
use reth_provider::{BlockReaderIdExt, ChangeSetReader, StateProviderFactory};
use reth_rpc_api::RethApiServer;