Skip to content

Commit 23d0b40

Browse files
authored
chore(op): Add osaka fork so EOF can be activated (#2122)
1 parent 58de79e commit 23d0b40

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

crates/optimism/src/handler/precompiles.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl<CTX> OpPrecompileProvider<CTX> {
4040
| OpSpecId::ECOTONE) => Self::new(Precompiles::new(spec.into_eth_spec().into())),
4141
OpSpecId::FJORD => Self::new(fjord()),
4242
OpSpecId::GRANITE | OpSpecId::HOLOCENE => Self::new(granite()),
43-
OpSpecId::ISTHMUS | OpSpecId::INTEROP => Self::new(isthumus()),
43+
OpSpecId::ISTHMUS | OpSpecId::INTEROP | OpSpecId::OSAKA => Self::new(isthumus()),
4444
}
4545
}
4646
}

crates/optimism/src/spec.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use revm::specification::hardfork::SpecId;
1+
use revm::specification::hardfork::{name as eth_name, SpecId};
22

33
#[repr(u8)]
44
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Default)]
@@ -15,6 +15,7 @@ pub enum OpSpecId {
1515
#[default]
1616
ISTHMUS,
1717
INTEROP,
18+
OSAKA,
1819
}
1920

2021
impl OpSpecId {
@@ -25,6 +26,7 @@ impl OpSpecId {
2526
Self::CANYON => SpecId::SHANGHAI,
2627
Self::ECOTONE | Self::FJORD | Self::GRANITE | Self::HOLOCENE => SpecId::CANCUN,
2728
Self::ISTHMUS | Self::INTEROP => SpecId::PRAGUE,
29+
Self::OSAKA => SpecId::OSAKA,
2830
}
2931
}
3032

@@ -50,6 +52,10 @@ impl TryFrom<&str> for OpSpecId {
5052
name::ECOTONE => Ok(OpSpecId::ECOTONE),
5153
name::FJORD => Ok(OpSpecId::FJORD),
5254
name::GRANITE => Ok(OpSpecId::GRANITE),
55+
name::HOLOCENE => Ok(OpSpecId::HOLOCENE),
56+
name::ISTHMUS => Ok(OpSpecId::ISTHMUS),
57+
name::INTEROP => Ok(OpSpecId::INTEROP),
58+
eth_name::OSAKA => Ok(OpSpecId::OSAKA),
5359
_ => Err(()),
5460
}
5561
}
@@ -67,6 +73,7 @@ impl From<OpSpecId> for &'static str {
6773
OpSpecId::HOLOCENE => name::HOLOCENE,
6874
OpSpecId::ISTHMUS => name::ISTHMUS,
6975
OpSpecId::INTEROP => name::INTEROP,
76+
OpSpecId::OSAKA => eth_name::OSAKA,
7077
}
7178
}
7279
}

0 commit comments

Comments
 (0)