Skip to content

Commit

Permalink
Add holocene mainnet time (#13419)
Browse files Browse the repository at this point in the history
  • Loading branch information
cody-wang-cb authored Dec 17, 2024
1 parent 952eeae commit 03649f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 7 additions & 3 deletions crates/optimism/chainspec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,11 @@ mod tests {
),
(
Head { number: 0, timestamp: 1726070401, ..Default::default() },
ForkId { hash: ForkHash([0xbc, 0x38, 0xf9, 0xca]), next: 0 },
ForkId { hash: ForkHash([0xbc, 0x38, 0xf9, 0xca]), next: 1736445601 },
),
(
Head { number: 0, timestamp: 1736445601, ..Default::default() },
ForkId { hash: ForkHash([0x3a, 0x2a, 0xf1, 0x83]), next: 0 },
),
],
);
Expand Down Expand Up @@ -689,7 +693,7 @@ mod tests {
#[test]
fn latest_base_mainnet_fork_id() {
assert_eq!(
ForkId { hash: ForkHash([0xbc, 0x38, 0xf9, 0xca]), next: 0 },
ForkId { hash: ForkHash([0x3a, 0x2a, 0xf1, 0x83]), next: 0 },
BASE_MAINNET.latest_fork_id()
)
}
Expand All @@ -698,7 +702,7 @@ mod tests {
fn latest_base_mainnet_fork_id_with_builder() {
let base_mainnet = OpChainSpecBuilder::base_mainnet().build();
assert_eq!(
ForkId { hash: ForkHash([0xbc, 0x38, 0xf9, 0xca]), next: 0 },
ForkId { hash: ForkHash([0x3a, 0x2a, 0xf1, 0x83]), next: 0 },
base_mainnet.latest_fork_id()
)
}
Expand Down
4 changes: 3 additions & 1 deletion crates/optimism/hardforks/src/hardfork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl OpHardfork {
Self::Ecotone => Some(1710374401),
Self::Fjord => Some(1720627201),
Self::Granite => Some(1726070401),
Self::Holocene => None,
Self::Holocene => Some(1736445601),
Self::Isthmus => todo!(),
},
)
Expand Down Expand Up @@ -230,6 +230,7 @@ impl OpHardfork {
(Self::Ecotone.boxed(), ForkCondition::Timestamp(1710374401)),
(Self::Fjord.boxed(), ForkCondition::Timestamp(1720627201)),
(Self::Granite.boxed(), ForkCondition::Timestamp(1726070401)),
(Self::Holocene.boxed(), ForkCondition::Timestamp(1736445601)),
])
}

Expand Down Expand Up @@ -325,6 +326,7 @@ impl OpHardfork {
(Self::Ecotone.boxed(), ForkCondition::Timestamp(1710374401)),
(Self::Fjord.boxed(), ForkCondition::Timestamp(1720627201)),
(Self::Granite.boxed(), ForkCondition::Timestamp(1726070401)),
(Self::Holocene.boxed(), ForkCondition::Timestamp(1736445601)),
])
}
}
Expand Down

0 comments on commit 03649f2

Please sign in to comment.