Skip to content

Commit

Permalink
chore: use the official alloy-chains dep (bnb-chain#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
forcodedancing authored Sep 23, 2024
1 parent 0493eac commit df14d9a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
7 changes: 4 additions & 3 deletions Cargo.lock

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

11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ members = [
"examples/txpool-tracing/",
"examples/custom-rlpx-subprotocol",
"testing/ef-tests/",
"testing/testing-utils",
"testing/testing-utils",
]
default-members = ["bin/reth"]

Expand Down Expand Up @@ -338,7 +338,7 @@ reth-network-p2p = { path = "crates/net/p2p" }
reth-nippy-jar = { path = "crates/storage/nippy-jar" }
reth-node-api = { path = "crates/node/api" }
reth-node-builder = { path = "crates/node/builder" }
reth-node-bsc= { path = "crates/bsc/node" }
reth-node-bsc = { path = "crates/bsc/node" }
reth-node-core = { path = "crates/node/core" }
reth-node-ethereum = { path = "crates/ethereum/node" }
reth-node-events = { path = "crates/node/events" }
Expand Down Expand Up @@ -399,7 +399,7 @@ revm-primitives = { version = "7.1.0", features = [
revm-inspectors = "0.5"

# eth
alloy-chains = "0.1.18"
alloy-chains = "0.1.33"
alloy-primitives = "0.7.2"
alloy-dyn-abi = "0.7.2"
alloy-json-abi = "0.7.2"
Expand Down Expand Up @@ -464,9 +464,9 @@ serde_with = "3.3.0"
humantime = "2.1"
humantime-serde = "1.1"
rand = "0.8.5"
rustc-hash = { version = "2.0", default-features = false }
rustc-hash = { version = "2.0", default-features = false }
schnellru = "0.2"
strum = { version = "0.26", default-features = false }
strum = { version = "0.26", default-features = false }
strum_macros = "=0.26.4"
rayon = "1.7"
itertools = "0.13"
Expand Down Expand Up @@ -560,7 +560,6 @@ revm = { git = "https://github.com/bnb-chain/revm", tag = "v1.0.2" }
revm-interpreter = { git = "https://github.com/bnb-chain/revm", tag = "v1.0.2" }
revm-precompile = { git = "https://github.com/bnb-chain/revm", tag = "v1.0.2" }
revm-primitives = { git = "https://github.com/bnb-chain/revm", tag = "v1.0.2" }
alloy-chains = { git = "https://github.com/bnb-chain/alloy-chains-rs.git", tag = "v1.0.0" }
alloy-rpc-types-eth = { git = "https://github.com/bnb-chain/alloy", tag = "v1.0.0" }
alloy-consensus = { git = "https://github.com/bnb-chain/alloy", tag = "v1.0.0" }
alloy-eips = { git = "https://github.com/bnb-chain/alloy", tag = "v1.0.0" }
Expand Down
8 changes: 4 additions & 4 deletions crates/chainspec/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use reth_network_peers::{opbnb_mainnet_nodes, opbnb_testnet_nodes};
#[cfg(feature = "bsc")]
pub static BSC_MAINNET: Lazy<Arc<ChainSpec>> = Lazy::new(|| {
ChainSpec {
chain: Chain::from_named(NamedChain::BNBSmartChain),
chain: Chain::from_named(NamedChain::BinanceSmartChain),
genesis: serde_json::from_str(include_str!("../res/genesis/bsc_mainnet.json"))
.expect("Can't deserialize BSC Mainnet genesis json"),
genesis_hash: Some(b256!(
Expand All @@ -61,7 +61,7 @@ pub static BSC_MAINNET: Lazy<Arc<ChainSpec>> = Lazy::new(|| {
#[cfg(feature = "bsc")]
pub static BSC_TESTNET: Lazy<Arc<ChainSpec>> = Lazy::new(|| {
ChainSpec {
chain: Chain::from_named(NamedChain::BNBSmartChainTestnet),
chain: Chain::from_named(NamedChain::BinanceSmartChainTestnet),
genesis: serde_json::from_str(include_str!("../res/genesis/bsc_testnet.json"))
.expect("Can't deserialize BSC Testnet genesis json"),
genesis_hash: Some(b256!(
Expand Down Expand Up @@ -842,9 +842,9 @@ impl ChainSpec {
C::BaseGoerli | C::BaseSepolia => Some(base_testnet_nodes()),
C::OptimismSepolia | C::OptimismGoerli | C::OptimismKovan => Some(op_testnet_nodes()),
#[cfg(feature = "bsc")]
C::BNBSmartChain => Some(bsc_mainnet_nodes()),
C::BinanceSmartChain => Some(bsc_mainnet_nodes()),
#[cfg(feature = "bsc")]
C::BNBSmartChainTestnet => Some(bsc_testnet_nodes()),
C::BinanceSmartChainTestnet => Some(bsc_testnet_nodes()),
#[cfg(all(feature = "optimism", feature = "opbnb"))]
C::OpBNBTestnet => Some(opbnb_testnet_nodes()),
#[cfg(all(feature = "optimism", feature = "opbnb"))]
Expand Down
4 changes: 2 additions & 2 deletions crates/net/eth-wire-types/src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ mod tests {
let expected = hex!("f850423884024190faa0f8514c4680ef27700751b08f37645309ce65a449616a3ea966bf39dd935bb27ba00d21840abff46b96c84b2ac9e10e4f5cdaeb5693cb665db62a2f3b02d2d57b5bc6845d43d2fd80");
let status = Status {
version: EthVersion::Eth66 as u8,
chain: Chain::from_named(NamedChain::BNBSmartChain),
chain: Chain::from_named(NamedChain::BinanceSmartChain),
total_difficulty: U256::from(37851386u64),
blockhash: B256::from_str(
"f8514c4680ef27700751b08f37645309ce65a449616a3ea966bf39dd935bb27b",
Expand All @@ -307,7 +307,7 @@ mod tests {
let data = hex!("f850423884024190faa0f8514c4680ef27700751b08f37645309ce65a449616a3ea966bf39dd935bb27ba00d21840abff46b96c84b2ac9e10e4f5cdaeb5693cb665db62a2f3b02d2d57b5bc6845d43d2fd80");
let expected = Status {
version: EthVersion::Eth66 as u8,
chain: Chain::from_named(NamedChain::BNBSmartChain),
chain: Chain::from_named(NamedChain::BinanceSmartChain),
total_difficulty: U256::from(37851386u64),
blockhash: B256::from_str(
"f8514c4680ef27700751b08f37645309ce65a449616a3ea966bf39dd935bb27b",
Expand Down

0 comments on commit df14d9a

Please sign in to comment.