Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/precompile/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ impl PrecompileSpecId {
BERLIN | LONDON | ARROW_GLACIER | GRAY_GLACIER | MERGE | SHANGHAI => Self::BERLIN,
CANCUN => Self::CANCUN,
PRAGUE => Self::PRAGUE,
OSAKA => Self::OSAKA,
OSAKA | AMSTERDAM => Self::OSAKA,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add a todo here?
but for now this seems okay

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fine without todo and we can add Amsterdam in PrecompileSpecId when EIPs for precompile gets included

}
}
}
Expand Down
7 changes: 7 additions & 0 deletions crates/primitives/src/hardfork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ pub enum SpecId {
/// Osaka hard fork
/// Activated at block TBD
OSAKA,
/// Amsterdam hard fork
/// Activated at block TBD
AMSTERDAM,
}

impl SpecId {
Expand Down Expand Up @@ -133,6 +136,8 @@ pub mod name {
pub const PRAGUE: &str = "Prague";
/// String identifier for the Osaka hardfork
pub const OSAKA: &str = "Osaka";
/// String identifier for the Amsterdam hardfork
pub const AMSTERDAM: &str = "Amsterdam";
/// String identifier for the latest hardfork
pub const LATEST: &str = "Latest";
}
Expand Down Expand Up @@ -166,6 +171,7 @@ impl FromStr for SpecId {
name::CANCUN => Ok(Self::CANCUN),
name::PRAGUE => Ok(Self::PRAGUE),
name::OSAKA => Ok(Self::OSAKA),
name::AMSTERDAM => Ok(Self::AMSTERDAM),
_ => Err(UnknownHardfork),
}
}
Expand Down Expand Up @@ -194,6 +200,7 @@ impl From<SpecId> for &'static str {
SpecId::CANCUN => name::CANCUN,
SpecId::PRAGUE => name::PRAGUE,
SpecId::OSAKA => name::OSAKA,
SpecId::AMSTERDAM => name::AMSTERDAM,
}
}
}
Expand Down
Loading