From 794f7f45bd1ef3c6a0b59afdb0d36f43ecf68715 Mon Sep 17 00:00:00 2001 From: nk_ysg Date: Fri, 5 Jul 2024 09:53:52 +0800 Subject: [PATCH] fix deps --- Cargo.toml | 2 +- crates/chainspec/Cargo.toml | 2 +- crates/chainspec/src/spec.rs | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f431365b94158..ce5452d3a28fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -417,7 +417,7 @@ alloy-transport-ws = { version = "0.1", default-features = false } alloy-transport-ipc = { version = "0.1", default-features = false } alloy-pubsub = { version = "0.1", default-features = false } alloy-json-rpc = { version = "0.1", default-features = false } -alloy-rpc-client = { version = "0.1", default-features = false } +alloy-rpc-client = "0.1" # op op-alloy-rpc-types = { version = "0.1", features = ["arbitrary"] } diff --git a/crates/chainspec/Cargo.toml b/crates/chainspec/Cargo.toml index a8250ff31013c..e4574acdace93 100644 --- a/crates/chainspec/Cargo.toml +++ b/crates/chainspec/Cargo.toml @@ -52,7 +52,7 @@ default = ["std"] optimism = [ "reth-ethereum-forks/optimism", "serde", - "op-alloy-rpc-types/arbitrary", + "dep:op-alloy-rpc-types", ] std = [] arbitrary = [ diff --git a/crates/chainspec/src/spec.rs b/crates/chainspec/src/spec.rs index da982728df1b7..d054d0debab68 100644 --- a/crates/chainspec/src/spec.rs +++ b/crates/chainspec/src/spec.rs @@ -39,9 +39,6 @@ use reth_network_peers::{ op_testnet_nodes, sepolia_nodes, }; -#[cfg(feature = "optimism")] -use op_alloy_rpc_types::genesis::OptimismChainInfo; - /// The Ethereum mainnet spec pub static MAINNET: Lazy> = Lazy::new(|| { ChainSpec { @@ -1091,7 +1088,7 @@ impl DepositContract { #[derive(Default, Debug, serde::Deserialize)] #[serde(rename_all = "camelCase")] struct OptimismGenesisInfo { - optimism_chain_info: OptimismChainInfo, + optimism_chain_info: op_alloy_rpc_types::genesis::OptimismChainInfo, #[serde(skip)] base_fee_params: BaseFeeParamsKind, } @@ -1101,7 +1098,9 @@ impl OptimismGenesisInfo { fn extract_from(genesis: &Genesis) -> Self { let mut optimism_genesis_info = Self::default(); if let Some(optimism_chain_info) = - OptimismChainInfo::extract_from(&genesis.config.extra_fields) + op_alloy_rpc_types::genesis::OptimismChainInfo::extract_from( + &genesis.config.extra_fields, + ) { if let Some(ref optimism_base_fee_info) = optimism_chain_info.base_fee_info { if let (Some(elasticity), Some(denominator)) = (