reth_evm::provider

Trait EvmEnvProvider

Source
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§

Source

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
where &'a T: Send + Sync,

Source§

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.
Source§

fn env_with_header<EvmConfig>( &self, header: &N::BlockHeader, evm_config: EvmConfig, ) -> ProviderResult<EvmEnv>
where EvmConfig: ConfigureEvmEnv<Header = N::BlockHeader>,

Source§

impl<H, T: EvmEnvProvider<H> + ?Sized> EvmEnvProvider<H> for Arc<T>
where Arc<T>: Send + Sync,

Source§

fn env_with_header<EvmConfig>( &self, header: &H, evm_config: EvmConfig, ) -> ProviderResult<EvmEnv>
where EvmConfig: ConfigureEvmEnv<Header = H>,

Implementors§