mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: move EvmEnvProvider (#8420)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6989,6 +6989,7 @@ dependencies = [
|
||||
name = "reth-evm"
|
||||
version = "0.2.0-beta.7"
|
||||
dependencies = [
|
||||
"auto_impl",
|
||||
"futures-util",
|
||||
"parking_lot 0.12.3",
|
||||
"reth-execution-errors",
|
||||
|
||||
@ -19,6 +19,7 @@ reth-storage-errors.workspace = true
|
||||
|
||||
revm.workspace = true
|
||||
|
||||
auto_impl.workspace = true
|
||||
futures-util.workspace = true
|
||||
parking_lot = { workspace = true, optional = true }
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ use revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, SpecId,
|
||||
|
||||
pub mod either;
|
||||
pub mod execute;
|
||||
pub mod provider;
|
||||
|
||||
#[cfg(any(test, feature = "test-utils"))]
|
||||
/// test helpers for mocking executor
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
use reth_evm::ConfigureEvmEnv;
|
||||
//! Provider trait for populating the EVM environment.
|
||||
|
||||
use crate::ConfigureEvmEnv;
|
||||
use reth_primitives::{BlockHashOrNumber, Header};
|
||||
use reth_storage_errors::provider::ProviderResult;
|
||||
use revm::primitives::{BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, SpecId};
|
||||
|
||||
/// A provider type that knows chain specific information required to configure an
|
||||
/// A provider type that knows chain specific information required to configure a
|
||||
/// [CfgEnvWithHandlerCfg].
|
||||
///
|
||||
/// This type is mainly used to provide required data to configure the EVM environment.
|
||||
/// This type is mainly used to provide required data to configure the EVM environment that is
|
||||
/// usually stored on disk.
|
||||
#[auto_impl::auto_impl(&, Arc)]
|
||||
pub trait EvmEnvProvider: Send + Sync {
|
||||
/// Fills the [CfgEnvWithHandlerCfg] and [BlockEnv] fields with values specific to the given
|
||||
@ -18,8 +18,8 @@ pub use block_hash::BlockHashReader;
|
||||
mod block_id;
|
||||
pub use block_id::{BlockIdReader, BlockNumReader};
|
||||
|
||||
mod evm_env;
|
||||
pub use evm_env::EvmEnvProvider;
|
||||
// Re-export for convenience
|
||||
pub use reth_evm::provider::EvmEnvProvider;
|
||||
|
||||
mod chain_info;
|
||||
pub use chain_info::CanonChainTracker;
|
||||
|
||||
Reference in New Issue
Block a user