mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(deps): rm reth-interfaces from rpc (#8444)
This commit is contained in:
3
Cargo.lock
generated
3
Cargo.lock
generated
@ -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",
|
||||
|
||||
@ -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 = [
|
||||
|
||||
@ -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},
|
||||
|
||||
@ -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<
|
||||
|
||||
2
crates/rpc/rpc/src/eth/cache/mod.rs
vendored
2
crates/rpc/rpc/src/eth/cache/mod.rs
vendored
@ -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,
|
||||
|
||||
@ -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(_) |
|
||||
|
||||
@ -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>>() {}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user