Skip to main content

BuildPendingEnv

Trait BuildPendingEnv 

Source
pub trait BuildPendingEnv<Header> {
    // Required method
    fn build_pending_env(
        parent: &SealedHeader<Header>,
        block_overrides: Option<&BlockOverrides>,
    ) -> Self;
}
Available on crate feature rpc only.
Expand description

Trait that should be implemented on ConfigureEvm::NextBlockEnvCtx to provide a way for it to build an environment for pending block.

This assumes that next environment building doesn’t require any additional context, for more complex implementations one should implement PendingEnvBuilder on their custom type.

Required Methods§

Source

fn build_pending_env( parent: &SealedHeader<Header>, block_overrides: Option<&BlockOverrides>, ) -> Self

Builds a ConfigureEvm::NextBlockEnvCtx for a pending block.

block_overrides can be used for values that need to be part of the next block context before the EVM environment is constructed. Other block overrides are applied directly to the EVM environment after construction.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§