Skip to content

Commit

Permalink
use SpecId::Osaka in place of PragueEOF
Browse files Browse the repository at this point in the history
  • Loading branch information
yash-atreya committed Oct 22, 2024
1 parent 2c63361 commit 64e72d7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion crates/anvil/src/hardfork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ impl From<EthereumHardfork> for SpecId {
EthereumHardfork::Cancun | EthereumHardfork::Latest => Self::CANCUN,
EthereumHardfork::Prague => Self::PRAGUE,
// TODO: switch to latest after activation
EthereumHardfork::PragueEOF => Self::PRAGUE,
// EOF is included in OSAKA from Revm 16.0.0
EthereumHardfork::PragueEOF => Self::OSAKA,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/cheatcodes/src/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub trait CheatcodesExecutor {
evm.context.evm.inner.journaled_state.depth += 1;

// Handle EOF bytecode
let first_frame_or_result = if evm.handler.cfg.spec_id.is_enabled_in(SpecId::PRAGUE) &&
let first_frame_or_result = if evm.handler.cfg.spec_id.is_enabled_in(SpecId::OSAKA) &&
inputs.scheme == CreateScheme::Create &&
inputs.init_code.starts_with(&EOF_MAGIC_BYTES)
{
Expand Down
4 changes: 2 additions & 2 deletions crates/config/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ impl FromStr for Numeric {
#[inline]
pub fn evm_spec_id(evm_version: &EvmVersion, alphanet: bool) -> SpecId {
if alphanet {
return SpecId::PRAGUE;
return SpecId::OSAKA;
}
match evm_version {
EvmVersion::Homestead => SpecId::HOMESTEAD,
Expand All @@ -316,7 +316,7 @@ pub fn evm_spec_id(evm_version: &EvmVersion, alphanet: bool) -> SpecId {
EvmVersion::Paris => SpecId::MERGE,
EvmVersion::Shanghai => SpecId::SHANGHAI,
EvmVersion::Cancun => SpecId::CANCUN,
EvmVersion::Prague => SpecId::PRAGUE,
EvmVersion::Prague => SpecId::OSAKA, // Osaka enables EOF
}
}

Expand Down

0 comments on commit 64e72d7

Please sign in to comment.