chore: simplified cli imports in examples (#15904)

This commit is contained in:
Soubhik Singha Mahapatra
2025-04-25 00:00:07 +05:30
committed by GitHub
parent 70c5d12b4b
commit 26e467442c
20 changed files with 45 additions and 39 deletions

3
Cargo.lock generated
View File

@@ -3344,7 +3344,6 @@ dependencies = [
"clap",
"futures-util",
"mev-share-sse",
"reth",
"reth-ethereum",
"tokio",
"tracing",
@@ -3609,7 +3608,6 @@ version = "0.0.0"
dependencies = [
"clap",
"jsonrpsee",
"reth",
"reth-ethereum",
"tokio",
]
@@ -3618,7 +3616,6 @@ dependencies = [
name = "example-node-event-hooks"
version = "0.0.0"
dependencies = [
"reth",
"reth-ethereum",
]

View File

@@ -7,7 +7,7 @@ license.workspace = true
[dependencies]
reth.workspace = true
reth-ethereum = { workspace = true, features = ["node", "pool"] }
reth-ethereum = { workspace = true, features = ["node", "pool", "cli"] }
alloy-rpc-types-beacon.workspace = true
alloy-primitives.workspace = true

View File

@@ -22,8 +22,12 @@ use alloy_primitives::B256;
use clap::Parser;
use futures_util::{stream::FuturesUnordered, StreamExt};
use mined_sidecar::MinedSidecarStream;
use reth::{builder::NodeHandle, chainspec::EthereumChainSpecParser, cli::Cli};
use reth_ethereum::{node::EthereumNode, provider::CanonStateSubscriptions};
use reth::builder::NodeHandle;
use reth_ethereum::{
cli::{chainspec::EthereumChainSpecParser, interface::Cli},
node::EthereumNode,
provider::CanonStateSubscriptions,
};
pub mod mined_sidecar;

View File

@@ -6,8 +6,7 @@ edition.workspace = true
license.workspace = true
[dependencies]
reth.workspace = true
reth-ethereum = { workspace = true, features = ["node"] }
reth-ethereum = { workspace = true, features = ["node", "cli"] }
alloy-rpc-types-beacon.workspace = true

View File

@@ -21,8 +21,10 @@ use alloy_rpc_types_beacon::events::PayloadAttributesEvent;
use clap::Parser;
use futures_util::stream::StreamExt;
use mev_share_sse::{client::EventStream, EventClient};
use reth::{chainspec::EthereumChainSpecParser, cli::Cli};
use reth_ethereum::node::EthereumNode;
use reth_ethereum::{
cli::{chainspec::EthereumChainSpecParser, interface::Cli},
node::EthereumNode,
};
use std::net::{IpAddr, Ipv4Addr};
use tracing::{info, warn};

View File

@@ -7,7 +7,7 @@ license.workspace = true
[dependencies]
reth.workspace = true
reth-ethereum = { workspace = true, features = ["node", "node-api", "evm"] }
reth-ethereum = { workspace = true, features = ["node", "node-api", "evm", "cli"] }
alloy-evm.workspace = true
alloy-sol-macro.workspace = true

View File

@@ -13,11 +13,11 @@ use alloy_sol_macro::sol;
use alloy_sol_types::SolCall;
use reth::{
builder::{components::ExecutorBuilder, BuilderContext},
cli::Cli,
primitives::SealedBlock,
};
use reth_ethereum::{
chainspec::ChainSpec,
cli::interface::Cli,
evm::{
primitives::{
execute::{BlockExecutionError, BlockExecutor, InternalBlockExecutionError},

View File

@@ -7,7 +7,7 @@ license.workspace = true
[dependencies]
reth.workspace = true
reth-ethereum = { workspace = true, features = ["node", "evm", "pool"] }
reth-ethereum = { workspace = true, features = ["node", "evm", "pool", "cli"] }
alloy-rpc-types-eth.workspace = true
clap = { workspace = true, features = ["derive"] }
futures-util.workspace = true

View File

@@ -16,8 +16,9 @@ use alloy_primitives::Address;
use alloy_rpc_types_eth::{state::EvmOverrides, TransactionRequest};
use clap::Parser;
use futures_util::StreamExt;
use reth::{builder::NodeHandle, chainspec::EthereumChainSpecParser, cli::Cli};
use reth::builder::NodeHandle;
use reth_ethereum::{
cli::{chainspec::EthereumChainSpecParser, interface::Cli},
evm::{
primitives::ConfigureEvm,
revm::revm::{

View File

@@ -7,7 +7,7 @@ license.workspace = true
[dependencies]
reth.workspace = true
reth-ethereum = { workspace = true, features = ["node", "pool", "node-api"] }
reth-ethereum = { workspace = true, features = ["node", "pool", "node-api", "cli"] }
reth-tracing.workspace = true
eyre.workspace = true

View File

@@ -2,12 +2,10 @@
#![warn(unused_crate_dependencies)]
use reth::{
builder::{components::PoolBuilder, BuilderContext, FullNodeTypes},
cli::Cli,
};
use reth::builder::{components::PoolBuilder, BuilderContext, FullNodeTypes};
use reth_ethereum::{
chainspec::ChainSpec,
cli::interface::Cli,
node::{api::NodeTypes, node::EthereumAddOns, EthereumNode},
pool::{
blobstore::InMemoryBlobStore, EthTransactionPool, PoolConfig,

View File

@@ -9,7 +9,7 @@ license.workspace = true
reth.workspace = true
reth-basic-payload-builder.workspace = true
reth-payload-builder.workspace = true
reth-ethereum = { workspace = true, features = ["node", "pool"] }
reth-ethereum = { workspace = true, features = ["node", "pool", "cli"] }
reth-ethereum-payload-builder.workspace = true
alloy-eips.workspace = true

View File

@@ -12,14 +12,17 @@
#![warn(unused_crate_dependencies)]
use crate::generator::EmptyBlockPayloadJobGenerator;
use reth::{
builder::{components::PayloadServiceBuilder, node::FullNodeTypes, BuilderContext},
cli::{config::PayloadBuilderConfig, Cli},
};
use reth::builder::{components::PayloadServiceBuilder, BuilderContext};
use reth_basic_payload_builder::BasicPayloadJobGeneratorConfig;
use reth_ethereum::{
chainspec::ChainSpec,
node::{api::NodeTypes, node::EthereumAddOns, EthEngineTypes, EthEvmConfig, EthereumNode},
cli::interface::Cli,
node::{
api::{node::FullNodeTypes, NodeTypes},
core::cli::config::PayloadBuilderConfig,
node::EthereumAddOns,
EthEngineTypes, EthEvmConfig, EthereumNode,
},
pool::{PoolTransaction, TransactionPool},
provider::CanonStateSubscriptions,
EthPrimitives, TransactionSigned,

View File

@@ -14,10 +14,11 @@ mod subprotocol;
use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};
use reth::{builder::NodeHandle, network::config::rng_secret_key};
use reth::builder::NodeHandle;
use reth_ethereum::{
network::{
api::{test_utils::PeersHandleProvider, NetworkInfo},
config::rng_secret_key,
protocol::IntoRlpxSubProtocol,
NetworkConfig, NetworkManager, NetworkProtocols,
},

View File

@@ -6,8 +6,7 @@ edition.workspace = true
license.workspace = true
[dependencies]
reth.workspace = true
reth-ethereum = { workspace = true, features = ["node", "pool"] }
reth-ethereum = { workspace = true, features = ["node", "pool", "cli"] }
clap = { workspace = true, features = ["derive"] }
jsonrpsee = { workspace = true, features = ["server", "macros"] }

View File

@@ -20,8 +20,11 @@ use jsonrpsee::{
proc_macros::rpc,
PendingSubscriptionSink, SubscriptionMessage,
};
use reth::{chainspec::EthereumChainSpecParser, cli::Cli};
use reth_ethereum::{node::EthereumNode, pool::TransactionPool};
use reth_ethereum::{
cli::{chainspec::EthereumChainSpecParser, interface::Cli},
node::EthereumNode,
pool::TransactionPool,
};
use std::time::Duration;
use tokio::time::sleep;

View File

@@ -6,5 +6,4 @@ edition.workspace = true
license.workspace = true
[dependencies]
reth.workspace = true
reth-ethereum = { workspace = true, features = ["node"] }
reth-ethereum = { workspace = true, features = ["node", "cli"] }

View File

@@ -13,8 +13,7 @@
#![warn(unused_crate_dependencies)]
use reth::cli::Cli;
use reth_ethereum::node::EthereumNode;
use reth_ethereum::{cli::interface::Cli, node::EthereumNode};
fn main() {
Cli::parse_args()

View File

@@ -7,7 +7,7 @@ license.workspace = true
[dependencies]
reth.workspace = true
reth-ethereum = { workspace = true, features = ["node", "pool"] }
reth-ethereum = { workspace = true, features = ["node", "pool", "cli"] }
alloy-rpc-types-trace.workspace = true
clap = { workspace = true, features = ["derive"] }
futures-util.workspace = true

View File

@@ -14,11 +14,12 @@ use alloy_primitives::Address;
use alloy_rpc_types_trace::{parity::TraceType, tracerequest::TraceCallRequest};
use clap::Parser;
use futures_util::StreamExt;
use reth::{
builder::NodeHandle, chainspec::EthereumChainSpecParser, cli::Cli,
rpc::types::TransactionRequest,
use reth::{builder::NodeHandle, rpc::types::TransactionRequest};
use reth_ethereum::{
cli::{chainspec::EthereumChainSpecParser, interface::Cli},
node::EthereumNode,
pool::TransactionPool,
};
use reth_ethereum::{node::EthereumNode, pool::TransactionPool};
fn main() {
Cli::<EthereumChainSpecParser, RethCliTxpoolExt>::parse()