Skip to main content

ExecutionSpec

Trait ExecutionSpec 

Source
pub trait ExecutionSpec: FromEvmVersion {
    // Required methods
    fn evm_version_name(&self) -> String;
    fn from_foundry_hardfork(hardfork: FoundryHardfork) -> Option<Self>;

    // Provided methods
    fn from_network_hardfork(_: &str) -> Option<Self> { ... }
    fn historical_hardfork(
        chain_id: u64,
        timestamp: u64,
    ) -> Option<FoundryHardfork> { ... }
    fn fork_hardfork(
        chain_id: u64,
        timestamp: u64,
        endpoint_hardfork: Option<FoundryHardfork>,
    ) -> Option<FoundryHardfork> { ... }
    fn reported_hardfork(self) -> Option<FoundryHardfork> { ... }
}
Expand description

Conversion, hardfork scheduling, and trace metadata for a concrete execution spec.

Required Methods§

Provided Methods§

Source

fn from_network_hardfork(_: &str) -> Option<Self>

Source

fn historical_hardfork(chain_id: u64, timestamp: u64) -> Option<FoundryHardfork>

Returns this family’s hardfork at a historical source-chain timestamp. Unknown source chains return None; this never discovers another execution family.

Source

fn fork_hardfork( chain_id: u64, timestamp: u64, endpoint_hardfork: Option<FoundryHardfork>, ) -> Option<FoundryHardfork>

Resolves a local fork’s hardfork from compatible endpoint metadata or its source schedule. Ethereum overrides this to retain the configured EVM version for local forks.

Source

fn reported_hardfork(self) -> Option<FoundryHardfork>

Returns exact metadata for a directly selected spec, when the family requires it. Ethereum and Optimism retain their existing absence of metadata for direct spec overrides.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl ExecutionSpec for BaseSpecId

Available on crate feature base only.
Source§

impl ExecutionSpec for MonadHardfork

Available on crate feature monad only.
Source§

impl ExecutionSpec for OpSpecId

Available on crate feature optimism only.
Source§

impl ExecutionSpec for SpecId

Source§

fn evm_version_name(&self) -> String

Source§

fn from_network_hardfork(hardfork: &str) -> Option<SpecId>

Source§

fn from_foundry_hardfork(hardfork: FoundryHardfork) -> Option<SpecId>

Source§

fn fork_hardfork( _chain_id: u64, _timestamp: u64, _endpoint_hardfork: Option<FoundryHardfork>, ) -> Option<FoundryHardfork>

Source§

impl ExecutionSpec for TempoHardfork

Implementors§