Skip to content

hypermap: add simulation-mode #141

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

Merged
merged 1 commit into from
Mar 29, 2025
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
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ license = "Apache-2.0"

[features]
logging = ["dep:color-eyre", "dep:tracing", "dep:tracing-error", "dep:tracing-subscriber"]
simulation-mode = []

[dependencies]
alloy-primitives = "0.8.15"
Expand Down
8 changes: 7 additions & 1 deletion src/hypermap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ use std::str::FromStr;
/// hypermap deployment address on base
pub const HYPERMAP_ADDRESS: &'static str = "0x000000000044C6B8Cb4d8f0F889a3E47664EAeda";
/// base chain id
pub const HYPERMAP_CHAIN_ID: u64 = 8453;
#[cfg(not(feature = "simulation-mode"))]
pub const HYPERMAP_CHAIN_ID: u64 = 8453; // base
#[cfg(feature = "simulation-mode")]
pub const HYPERMAP_CHAIN_ID: u64 = 31337; // fakenet
/// first block (minus one) of hypermap deployment on base
#[cfg(not(feature = "simulation-mode"))]
pub const HYPERMAP_FIRST_BLOCK: u64 = 27_270_411;
#[cfg(feature = "simulation-mode")]
pub const HYPERMAP_FIRST_BLOCK: u64 = 0;
/// the root hash of hypermap, empty bytes32
pub const HYPERMAP_ROOT_HASH: &'static str =
"0x0000000000000000000000000000000000000000000000000000000000000000";
Expand Down