Skip to content

Commit

Permalink
feat: add Pascal upgrade for BSC
Browse files Browse the repository at this point in the history
  • Loading branch information
yutianwu committed Sep 9, 2024
1 parent dc4cc14 commit f072a2c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions crates/precompile/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,8 @@ impl PrecompileSpecId {
HABER_FIX => Self::HABER,
#[cfg(feature = "bsc")]
BOHR => Self::HABER,
#[cfg(feature = "bsc")]
PASCAL => Self::HABER,
LATEST => Self::LATEST,
}
}
Expand Down
7 changes: 6 additions & 1 deletion crates/primitives/src/specification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ pub enum SpecId {
HABER = 30, // Haber timestamp(1718863500)
HABER_FIX = 31, // HaberFix timestamp(1720591588)
BOHR = 32, // Bohr timestamp(1720591588)
Pascal = 33, // Pascal timestamp(1720591588)

/// Not enabled in bsc
DAO_FORK = 100,
Expand Down Expand Up @@ -217,6 +218,8 @@ impl From<&str> for SpecId {
"HaberFix" => SpecId::HABER_FIX,
#[cfg(feature = "bsc")]
"Bohr" => SpecId::BOHR,
#[cfg(feature = "bsc")]
"Pascal" => SpecId::PASCAL,
#[cfg(feature = "opbnb")]
"Wright" => SpecId::WRIGHT,
_ => Self::LATEST,
Expand Down Expand Up @@ -299,6 +302,8 @@ impl From<SpecId> for &'static str {
SpecId::HABER_FIX => "HaberFix",
#[cfg(feature = "bsc")]
SpecId::BOHR => "Bohr",
#[cfg(feature = "bsc")]
SpecId::PASCAL => "Pascal",
SpecId::LATEST => "Latest",
}
}
Expand Down Expand Up @@ -662,7 +667,7 @@ macro_rules! spec_to_generic {
use $crate::PragueEofSpec as SPEC;
$e
}
$crate::SpecId::HABER | $crate::SpecId::HABER_FIX | $crate::SpecId::BOHR => {
$crate::SpecId::HABER | $crate::SpecId::HABER_FIX | $crate::SpecId::BOHR | $crate::SpecId::PASCAL => {
use $crate::HaberSpec as SPEC;
$e
}
Expand Down

0 comments on commit f072a2c

Please sign in to comment.