Skip to content

Commit

Permalink
Merge pull request #65 from anton-rs/rf/chore/alloy-map
Browse files Browse the repository at this point in the history
chore: Alloy Primitive Map
  • Loading branch information
refcell authored Sep 30, 2024
2 parents 4779985 + 31db803 commit 843e11a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
8 changes: 0 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ incremental = false

[dependencies]
# Alloy
alloy-primitives = { version = "0.8", default-features = false }
alloy-primitives = { version = "0.8", default-features = false, features = ["map"] }
op-alloy-genesis = { version = "0.3", default-features = false, features = ["serde"] }

# Misc
lazy_static = { version = "1.4.0", features = ["spin_no_std"] }
hashbrown = { version = "0.14.3", features = ["serde"] }

# Serialization
serde = { version = "1.0.203", default-features = false, features = ["derive", "alloc"] }
Expand Down
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

extern crate alloc;

use alloc::vec::Vec;
pub use hashbrown::HashMap;

pub use alloy_primitives::map::HashMap;
pub use op_alloy_genesis::{ChainConfig, RollupConfig};

pub mod chain_list;
Expand All @@ -28,7 +26,7 @@ lazy_static::lazy_static! {
static ref _INIT: Registry = Registry::from_chain_list();

/// Chain configurations exported from the registry
pub static ref CHAINS: Vec<Chain> = _INIT.chains.clone();
pub static ref CHAINS: alloc::vec::Vec<Chain> = _INIT.chains.clone();

/// OP Chain configurations exported from the registry
pub static ref OPCHAINS: HashMap<u64, ChainConfig> = _INIT.op_chains.clone();
Expand Down
3 changes: 1 addition & 2 deletions src/superchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

use super::Chain;
use alloc::{string::String, vec::Vec};
use alloy_primitives::Address;
use hashbrown::HashMap;
use alloy_primitives::{map::HashMap, Address};
use op_alloy_genesis::{chain::HardForkConfiguration, ChainConfig, RollupConfig};

/// A superchain configuration.
Expand Down

0 comments on commit 843e11a

Please sign in to comment.