Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable PRAGUE on bsc #90

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
feat: enable PRAGUE on bsc
j75689 committed Dec 26, 2024
commit d24ce213417fdba02f15b18fd2d9bf0b099f060d
5 changes: 4 additions & 1 deletion crates/precompile/src/lib.rs
Original file line number Diff line number Diff line change
@@ -77,8 +77,8 @@ impl Precompiles {
PrecompileSpecId::HERTZ => Self::hertz(),
PrecompileSpecId::FEYNMAN => Self::feynman(),
PrecompileSpecId::CANCUN => Self::cancun(),
PrecompileSpecId::PRAGUE => Self::prague(),
PrecompileSpecId::HABER => Self::haber(),
PrecompileSpecId::PRAGUE => Self::prague(),
PrecompileSpecId::LATEST => Self::latest(),
}
}
@@ -308,6 +308,9 @@ impl Precompiles {
pub fn prague() -> &'static Self {
static INSTANCE: OnceBox<Precompiles> = OnceBox::new();
INSTANCE.get_or_init(|| {
#[cfg(feature = "bsc")]
let precompiles = Self::haber().clone();
#[cfg(not(feature = "bsc"))]
let precompiles = Self::cancun().clone();

// Don't include BLS12-381 precompiles in no_std builds.
4 changes: 2 additions & 2 deletions crates/primitives/src/specification.rs
Original file line number Diff line number Diff line change
@@ -118,14 +118,14 @@ pub enum SpecId {
HABER = 30, // Haber timestamp(1718863500)
HABER_FIX = 31, // HaberFix timestamp(1720591588)
BOHR = 32, // Bohr timestamp(1720591588)
PRAGUE = 33, // Prague TBD

/// Not enabled in bsc
DAO_FORK = 100,
ARROW_GLACIER = 101,
GRAY_GLACIER = 102,
MERGE = 103,
PRAGUE = 104,
OSAKA = 106,
OSAKA = 104,
#[default]
LATEST = u8::MAX,
}