Trait EvmEnvProvider
pub trait EvmEnvProvider<H = Header>: Send + Sync {
// Required method
fn env_with_header<EvmConfig>(
&self,
header: &H,
evm_config: EvmConfig,
) -> Result<EvmEnv, ProviderError>
where EvmConfig: ConfigureEvmEnv<Header = H>;
}
Expand description
A provider type that knows chain specific information required to configure a
[EvmEnv
].
This type is mainly used to provide required data to configure the EVM environment that is not part of the block and stored separately (on disk), for example the total difficulty.
Required Methods§
fn env_with_header<EvmConfig>(
&self,
header: &H,
evm_config: EvmConfig,
) -> Result<EvmEnv, ProviderError>where
EvmConfig: ConfigureEvmEnv<Header = H>,
fn env_with_header<EvmConfig>(
&self,
header: &H,
evm_config: EvmConfig,
) -> Result<EvmEnv, ProviderError>where
EvmConfig: ConfigureEvmEnv<Header = H>,
Fills the default [EvmEnv
] fields with values specific to the
given block header.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
§impl<'a, H, T> EvmEnvProvider<H> for &'a T
impl<'a, H, T> EvmEnvProvider<H> for &'a T
fn env_with_header<EvmConfig>(
&self,
header: &H,
evm_config: EvmConfig,
) -> Result<EvmEnv, ProviderError>where
EvmConfig: ConfigureEvmEnv<Header = H>,
§impl<H, T> EvmEnvProvider<H> for Arc<T>
impl<H, T> EvmEnvProvider<H> for Arc<T>
fn env_with_header<EvmConfig>(
&self,
header: &H,
evm_config: EvmConfig,
) -> Result<EvmEnv, ProviderError>where
EvmConfig: ConfigureEvmEnv<Header = H>,
Implementors§
impl EvmEnvProvider for MockEthProvider
Available on crate feature
test-utils
only.