reth::providers

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>,

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

§

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>
where T: EvmEnvProvider<H> + ?Sized, Arc<T>: Send + Sync,

§

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

Implementors§