Skip to main content

resolve_execution_spec

Function resolve_execution_spec 

Source
pub fn resolve_execution_spec<SPEC, BLOCK>(
    config: &Config,
    networks: NetworkConfigs,
    evm_env: &mut EvmEnv<SPEC, BLOCK>,
    context: ExecutionSpecContext,
    explicit_spec: Option<SPEC>,
    explicit_hardfork: Option<FoundryHardfork>,
) -> Option<FoundryHardfork>
where SPEC: ExecutionSpec + Into<SpecId> + Copy, BLOCK: FoundryBlock,
Expand description

Resolves and applies the execution spec for an EVM environment.

A direct caller override takes precedence over a configured namespaced hardfork, followed by exact endpoint metadata and the hardfork selected from the source schedule. Local Ethereum forks retain Foundry’s configured EVM version, namespaced local networks follow their source identity, and historical execution always follows the source block’s identity.

Returns the exact namespaced hardfork, when applicable, so execution and trace decoding can use the same hardfork.