diff --git a/Cargo.lock b/Cargo.lock index be6c367..bcfa370 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1549,7 +1549,7 @@ dependencies = [ [[package]] name = "hyperware_process_lib" -version = "1.0.5" +version = "1.0.6" dependencies = [ "alloy", "alloy-primitives", diff --git a/Cargo.toml b/Cargo.toml index 4fd1c75..ad382f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "hyperware_process_lib" authors = ["Sybil Technologies AG"] -version = "1.0.5" +version = "1.0.6" edition = "2021" description = "A library for writing Hyperware processes in Rust." homepage = "https://hyperware.ai" @@ -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" diff --git a/src/hypermap.rs b/src/hypermap.rs index 7ad150a..a7c3c29 100644 --- a/src/hypermap.rs +++ b/src/hypermap.rs @@ -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";