reth_seismic_evm/
config.rs

1//! Helpers for configuring the SeismicSpecId for the evm
2
3use crate::Header;
4use alloy_consensus::BlockHeader;
5use reth_chainspec::ChainSpec as SeismicChainSpec;
6use seismic_revm::SeismicSpecId;
7
8/// Map the latest active hardfork at the given header to a revm [`SeismicSpecId`].
9pub fn revm_spec(chain_spec: &SeismicChainSpec, header: &Header) -> SeismicSpecId {
10    revm_spec_by_timestamp_seismic(&chain_spec, header.timestamp())
11}
12
13/// Map the latest active hardfork at the given timestamp or block number to a revm
14/// [`SeismicSpecId`].
15///
16/// For now our only hardfork is MERCURY, so we only return MERCURY
17fn revm_spec_by_timestamp_seismic(
18    _chain_spec: &SeismicChainSpec,
19    _timestamp: u64,
20) -> SeismicSpecId {
21    SeismicSpecId::MERCURY
22}