reth_provider

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§

Source§

impl EvmEnvProvider for MockEthProvider

Available on crate feature test-utils only.
§

impl<C, N> EvmEnvProvider<<N as NodePrimitives>::BlockHeader> for NoopProvider<C, N>
where C: Send + Sync, N: NodePrimitives,

Source§

impl<N: ProviderNodeTypes> EvmEnvProvider<<<N as NodeTypes>::Primitives as NodePrimitives>::BlockHeader> for BlockchainProvider2<N>

Source§

impl<N: ProviderNodeTypes> EvmEnvProvider<<<N as NodeTypes>::Primitives as NodePrimitives>::BlockHeader> for ProviderFactory<N>

Source§

impl<N: TreeNodeTypes> EvmEnvProvider for BlockchainProvider<N>

Source§

impl<TX: DbTx + 'static, N: NodeTypesForProvider> EvmEnvProvider<<<N as NodeTypes>::Primitives as NodePrimitives>::BlockHeader> for DatabaseProvider<TX, N>