Skip to content

Commit

Permalink
Add fjord activation times/blocks for Base (#8619)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianBland authored Jun 5, 2024
1 parent ad80ad8 commit 8fc5f84
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions crates/ethereum-forks/src/hardfork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ impl Hardfork {
Self::Regolith => Some(0),
Self::Shanghai | Self::Canyon => Some(2106456),
Self::Cancun | Self::Ecotone => Some(6383256),
Self::Fjord => Some(10615056),
_ => None,
}
}
Expand Down Expand Up @@ -485,6 +486,7 @@ impl Hardfork {
Self::Regolith => Some(1695768288),
Self::Shanghai | Self::Canyon => Some(1699981200),
Self::Cancun | Self::Ecotone => Some(1708534800),
Self::Fjord => Some(1716998400),
_ => None,
}
}
Expand Down Expand Up @@ -513,6 +515,7 @@ impl Hardfork {
Self::Regolith => Some(1686789347),
Self::Shanghai | Self::Canyon => Some(1704992401),
Self::Cancun | Self::Ecotone => Some(1710374401),
Self::Fjord => Some(1720627201),
_ => None,
}
}
Expand Down Expand Up @@ -548,6 +551,8 @@ impl FromStr for Hardfork {
"canyon" => Self::Canyon,
#[cfg(feature = "optimism")]
"ecotone" => Self::Ecotone,
#[cfg(feature = "optimism")]
"fjord" => Self::Fjord,
"prague" => Self::Prague,
// "arbos11" => Hardfork::ArbOS11,
// "arbos20atlas" => Hardfork::ArbOS20Atlas,
Expand Down Expand Up @@ -618,9 +623,14 @@ mod tests {
#[test]
#[cfg(feature = "optimism")]
fn check_op_hardfork_from_str() {
let hardfork_str = ["beDrOck", "rEgOlITH", "cAnYoN", "eCoToNe"];
let expected_hardforks =
[Hardfork::Bedrock, Hardfork::Regolith, Hardfork::Canyon, Hardfork::Ecotone];
let hardfork_str = ["beDrOck", "rEgOlITH", "cAnYoN", "eCoToNe", "FJorD"];
let expected_hardforks = [
Hardfork::Bedrock,
Hardfork::Regolith,
Hardfork::Canyon,
Hardfork::Ecotone,
Hardfork::Fjord,
];

let hardforks: Vec<Hardfork> =
hardfork_str.iter().map(|h| Hardfork::from_str(h).unwrap()).collect();
Expand Down Expand Up @@ -655,8 +665,13 @@ mod tests {
let pos_hardforks = [Hardfork::Paris, Hardfork::Shanghai, Hardfork::Cancun];

#[cfg(feature = "optimism")]
let op_hardforks =
[Hardfork::Bedrock, Hardfork::Regolith, Hardfork::Canyon, Hardfork::Ecotone];
let op_hardforks = [
Hardfork::Bedrock,
Hardfork::Regolith,
Hardfork::Canyon,
Hardfork::Ecotone,
Hardfork::Fjord,
];

for hardfork in &pow_hardforks {
assert_eq!(hardfork.consensus_type(), ConsensusType::ProofOfWork);
Expand Down

0 comments on commit 8fc5f84

Please sign in to comment.