Skip to content

Commit 68c8800

Browse files
authored
Merge pull request #141 from hyperware-ai/hf/add-simulation-mode
hypermap: add simulation-mode
2 parents 079fc1b + c50e92c commit 68c8800

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ license = "Apache-2.0"
1010

1111
[features]
1212
logging = ["dep:color-eyre", "dep:tracing", "dep:tracing-error", "dep:tracing-subscriber"]
13+
simulation-mode = []
1314

1415
[dependencies]
1516
alloy-primitives = "0.8.15"

src/hypermap.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@ use std::str::FromStr;
1414
/// hypermap deployment address on base
1515
pub const HYPERMAP_ADDRESS: &'static str = "0x000000000044C6B8Cb4d8f0F889a3E47664EAeda";
1616
/// base chain id
17-
pub const HYPERMAP_CHAIN_ID: u64 = 8453;
17+
#[cfg(not(feature = "simulation-mode"))]
18+
pub const HYPERMAP_CHAIN_ID: u64 = 8453; // base
19+
#[cfg(feature = "simulation-mode")]
20+
pub const HYPERMAP_CHAIN_ID: u64 = 31337; // fakenet
1821
/// first block (minus one) of hypermap deployment on base
22+
#[cfg(not(feature = "simulation-mode"))]
1923
pub const HYPERMAP_FIRST_BLOCK: u64 = 27_270_411;
24+
#[cfg(feature = "simulation-mode")]
25+
pub const HYPERMAP_FIRST_BLOCK: u64 = 0;
2026
/// the root hash of hypermap, empty bytes32
2127
pub const HYPERMAP_ROOT_HASH: &'static str =
2228
"0x0000000000000000000000000000000000000000000000000000000000000000";

0 commit comments

Comments
 (0)