diff --git a/Cargo.lock b/Cargo.lock index edf96ad8aced..3072281fb77c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8593,6 +8593,7 @@ name = "reth-rpc-eth-api" version = "1.0.7" dependencies = [ "alloy-dyn-abi", + "alloy-eips", "alloy-json-rpc", "alloy-network", "alloy-primitives", @@ -8633,6 +8634,7 @@ name = "reth-rpc-eth-types" version = "1.0.7" dependencies = [ "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types", "alloy-rpc-types-eth", diff --git a/crates/primitives/src/basefee.rs b/crates/primitives/src/basefee.rs deleted file mode 100644 index aa52b02a035e..000000000000 --- a/crates/primitives/src/basefee.rs +++ /dev/null @@ -1,5 +0,0 @@ -//! Helpers for working with EIP-1559 base fee - -// re-export -#[doc(inline)] -pub use alloy_eips::eip1559::calc_next_block_base_fee; diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index 6c8e6b17c8de..1ef0d0253d5b 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -23,7 +23,6 @@ extern crate alloc; #[cfg(feature = "alloy-compat")] mod alloy_compat; -pub mod basefee; mod block; #[cfg(feature = "reth-codec")] mod compression; diff --git a/crates/rpc/rpc-eth-api/Cargo.toml b/crates/rpc/rpc-eth-api/Cargo.toml index a551ff0b51cf..88cff48c2ee8 100644 --- a/crates/rpc/rpc-eth-api/Cargo.toml +++ b/crates/rpc/rpc-eth-api/Cargo.toml @@ -40,6 +40,7 @@ alloy-primitives.workspace = true alloy-rpc-types-eth.workspace = true alloy-rpc-types.workspace = true alloy-rpc-types-mev.workspace = true +alloy-eips.workspace = true # rpc jsonrpsee = { workspace = true, features = ["server", "macros"] } diff --git a/crates/rpc/rpc-eth-api/src/helpers/call.rs b/crates/rpc/rpc-eth-api/src/helpers/call.rs index 416b29df04f9..b9b7e45a7c56 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/call.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/call.rs @@ -4,6 +4,7 @@ use crate::{ AsEthApiError, FromEthApiError, FromEvmError, FullEthApiTypes, IntoEthApiError, RpcBlock, }; +use alloy_eips::eip1559::calc_next_block_base_fee; use alloy_primitives::{Bytes, TxKind, B256, U256}; use alloy_rpc_types::{ simulate::{SimBlock, SimulatePayload, SimulatedBlock}, @@ -15,7 +16,6 @@ use futures::Future; use reth_chainspec::{EthChainSpec, MIN_TRANSACTION_GAS}; use reth_evm::{ConfigureEvm, ConfigureEvmEnv}; use reth_primitives::{ - basefee::calc_next_block_base_fee, revm_primitives::{ BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, ExecutionResult, HaltReason, ResultAndState, TransactTo, TxEnv, diff --git a/crates/rpc/rpc-eth-types/Cargo.toml b/crates/rpc/rpc-eth-types/Cargo.toml index 9d913b285806..1e2265589fae 100644 --- a/crates/rpc/rpc-eth-types/Cargo.toml +++ b/crates/rpc/rpc-eth-types/Cargo.toml @@ -38,6 +38,7 @@ revm-inspectors.workspace = true revm-primitives = { workspace = true, features = ["dev"] } alloy-rpc-types.workspace = true alloy-serde.workspace = true +alloy-eips.workspace = true # rpc jsonrpsee-core.workspace = true diff --git a/crates/rpc/rpc-eth-types/src/fee_history.rs b/crates/rpc/rpc-eth-types/src/fee_history.rs index f41379768251..c5afa2013a00 100644 --- a/crates/rpc/rpc-eth-types/src/fee_history.rs +++ b/crates/rpc/rpc-eth-types/src/fee_history.rs @@ -6,6 +6,7 @@ use std::{ sync::{atomic::Ordering::SeqCst, Arc}, }; +use alloy_eips::eip1559::calc_next_block_base_fee; use alloy_primitives::B256; use alloy_rpc_types::TxGasAndReward; use futures::{ @@ -16,7 +17,6 @@ use metrics::atomics::AtomicU64; use reth_chain_state::CanonStateNotification; use reth_chainspec::{ChainSpecProvider, EthChainSpec}; use reth_primitives::{ - basefee::calc_next_block_base_fee, eip4844::{calc_blob_gasprice, calculate_excess_blob_gas}, Receipt, SealedBlock, TransactionSigned, };