diff --git a/Cargo.lock b/Cargo.lock index 7e950dc0f..5b2e8aabb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,9 +97,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy-chains" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68b94c159bcc2ca5f758b8663d7b00fc7c5e40569984595ddf2221b0f7f7f6e" +checksum = "abf770dad29577cd3580f3dd09005799224a912b8cdfdd6dc04d030d42b3df4e" dependencies = [ "alloy-rlp", "arbitrary", @@ -4410,7 +4410,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -11162,7 +11162,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 318827a8d..959bcd36a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -417,7 +417,7 @@ revm-primitives = { version = "9.0.2", features = [ ], default-features = false } # eth -alloy-chains = "0.1.18" +alloy-chains = "0.1.32" alloy-dyn-abi = "0.8.0" alloy-primitives = { version = "0.8.0", default-features = false } alloy-rlp = "0.3.4" diff --git a/crates/chainspec/src/spec.rs b/crates/chainspec/src/spec.rs index 0a33db6b5..6706d1800 100644 --- a/crates/chainspec/src/spec.rs +++ b/crates/chainspec/src/spec.rs @@ -1,6 +1,6 @@ use crate::{constants::MAINNET_DEPOSIT_CONTRACT, once_cell_set, EthChainSpec}; use alloc::{boxed::Box, sync::Arc, vec::Vec}; -use alloy_chains::{Chain, ChainKind, NamedChain}; +use alloy_chains::{Chain, NamedChain}; use alloy_genesis::Genesis; use alloy_primitives::{address, b256, Address, BlockNumber, B256, U256}; use alloy_trie::EMPTY_ROOT_HASH; @@ -235,20 +235,8 @@ impl ChainSpec { /// Returns `true` if this chain contains Ethereum configuration. #[inline] - pub const fn is_eth(&self) -> bool { - matches!( - self.chain.kind(), - ChainKind::Named( - NamedChain::Mainnet | - NamedChain::Morden | - NamedChain::Ropsten | - NamedChain::Rinkeby | - NamedChain::Goerli | - NamedChain::Kovan | - NamedChain::Holesky | - NamedChain::Sepolia - ) - ) + pub const fn is_ethereum(&self) -> bool { + self.chain.is_ethereum() } /// Returns `true` if this chain contains Optimism configuration. diff --git a/crates/net/discv5/src/network_stack_id.rs b/crates/net/discv5/src/network_stack_id.rs index e41284c31..9943b38c8 100644 --- a/crates/net/discv5/src/network_stack_id.rs +++ b/crates/net/discv5/src/network_stack_id.rs @@ -25,7 +25,7 @@ impl NetworkStackId { pub fn id(chain: &ChainSpec) -> Option<&'static [u8]> { if chain.is_optimism() { return Some(Self::OPEL) - } else if chain.is_eth() { + } else if chain.is_ethereum() { return Some(Self::ETH) }