From f072a2cefbc512e3b21dcf110f625837e60e2414 Mon Sep 17 00:00:00 2001 From: yutianwu Date: Mon, 9 Sep 2024 15:48:34 +0800 Subject: [PATCH 1/3] feat: add Pascal upgrade for BSC --- crates/precompile/src/lib.rs | 2 ++ crates/primitives/src/specification.rs | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/precompile/src/lib.rs b/crates/precompile/src/lib.rs index a214d9f9..64355468 100644 --- a/crates/precompile/src/lib.rs +++ b/crates/precompile/src/lib.rs @@ -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, } } diff --git a/crates/primitives/src/specification.rs b/crates/primitives/src/specification.rs index 9976a2d0..03f011ad 100644 --- a/crates/primitives/src/specification.rs +++ b/crates/primitives/src/specification.rs @@ -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, @@ -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, @@ -299,6 +302,8 @@ impl From for &'static str { SpecId::HABER_FIX => "HaberFix", #[cfg(feature = "bsc")] SpecId::BOHR => "Bohr", + #[cfg(feature = "bsc")] + SpecId::PASCAL => "Pascal", SpecId::LATEST => "Latest", } } @@ -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 } From dac0fd36a5d712789a793debfe91a7bc340458d4 Mon Sep 17 00:00:00 2001 From: yutianwu Date: Mon, 9 Sep 2024 15:50:17 +0800 Subject: [PATCH 2/3] fix ci --- crates/primitives/src/specification.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/primitives/src/specification.rs b/crates/primitives/src/specification.rs index 03f011ad..a8e51bb4 100644 --- a/crates/primitives/src/specification.rs +++ b/crates/primitives/src/specification.rs @@ -667,7 +667,10 @@ macro_rules! spec_to_generic { use $crate::PragueEofSpec as SPEC; $e } - $crate::SpecId::HABER | $crate::SpecId::HABER_FIX | $crate::SpecId::BOHR | $crate::SpecId::PASCAL => { + $crate::SpecId::HABER + | $crate::SpecId::HABER_FIX + | $crate::SpecId::BOHR + | $crate::SpecId::PASCAL => { use $crate::HaberSpec as SPEC; $e } From f29bb0ed6c3114fc79df5509bd393010bc7ae817 Mon Sep 17 00:00:00 2001 From: yutianwu Date: Mon, 9 Sep 2024 15:52:48 +0800 Subject: [PATCH 3/3] fix ci --- crates/primitives/src/specification.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/primitives/src/specification.rs b/crates/primitives/src/specification.rs index a8e51bb4..e8c7806c 100644 --- a/crates/primitives/src/specification.rs +++ b/crates/primitives/src/specification.rs @@ -116,7 +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) + PASCAL = 33, // Pascal timestamp(1720591588) /// Not enabled in bsc DAO_FORK = 100,