pub trait EvmEnvProvider<H = Header>: Send + Sync {
// Required method
fn env_with_header<EvmConfig>(
&self,
header: &H,
evm_config: EvmConfig,
) -> ProviderResult<EvmEnv>
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§
Sourcefn env_with_header<EvmConfig>(
&self,
header: &H,
evm_config: EvmConfig,
) -> ProviderResult<EvmEnv>where
EvmConfig: ConfigureEvmEnv<Header = H>,
fn env_with_header<EvmConfig>(
&self,
header: &H,
evm_config: EvmConfig,
) -> ProviderResult<EvmEnv>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§
Source§impl<'a, H, T: 'a + EvmEnvProvider<H> + ?Sized> EvmEnvProvider<H> for &'a T
impl<'a, H, T: 'a + EvmEnvProvider<H> + ?Sized> EvmEnvProvider<H> for &'a T
fn env_with_header<EvmConfig>(
&self,
header: &H,
evm_config: EvmConfig,
) -> ProviderResult<EvmEnv>where
EvmConfig: ConfigureEvmEnv<Header = H>,
Source§impl<C: Send + Sync, N: NodePrimitives> EvmEnvProvider<<N as NodePrimitives>::BlockHeader> for NoopProvider<C, N>
Available on crate feature test-utils
only.
impl<C: Send + Sync, N: NodePrimitives> EvmEnvProvider<<N as NodePrimitives>::BlockHeader> for NoopProvider<C, N>
Available on crate feature
test-utils
only.