reth_optimism_cli/commands/
mod.rs
1use crate::chainspec::OpChainSpecParser;
2use clap::Subcommand;
3use import::ImportOpCommand;
4use import_receipts::ImportReceiptsOpCommand;
5use reth_cli::chainspec::ChainSpecParser;
6use reth_cli_commands::{
7 config_cmd, db, dump_genesis, init_cmd,
8 node::{self, NoArgs},
9 p2p, prune, recover, stage,
10};
11use std::fmt;
12
13pub mod import;
14pub mod import_receipts;
15pub mod init_state;
16
17#[cfg(feature = "dev")]
18pub mod test_vectors;
19
20#[derive(Debug, Subcommand)]
22#[allow(clippy::large_enum_variant)]
23pub enum Commands<Spec: ChainSpecParser = OpChainSpecParser, Ext: clap::Args + fmt::Debug = NoArgs>
24{
25 #[command(name = "node")]
27 Node(Box<node::NodeCommand<Spec, Ext>>),
28 #[command(name = "init")]
30 Init(init_cmd::InitCommand<Spec>),
31 #[command(name = "init-state")]
33 InitState(init_state::InitStateCommandOp<Spec>),
34 #[command(name = "import-op")]
36 ImportOp(ImportOpCommand<Spec>),
37 #[command(name = "import-receipts-op")]
39 ImportReceiptsOp(ImportReceiptsOpCommand<Spec>),
40 DumpGenesis(dump_genesis::DumpGenesisCommand<Spec>),
42 #[command(name = "db")]
44 Db(db::Command<Spec>),
45 #[command(name = "stage")]
47 Stage(Box<stage::Command<Spec>>),
48 #[command(name = "p2p")]
50 P2P(p2p::Command<Spec>),
51 #[command(name = "config")]
53 Config(config_cmd::Command),
54 #[command(name = "recover")]
56 Recover(recover::Command<Spec>),
57 #[command(name = "prune")]
59 Prune(prune::PruneCommand<Spec>),
60 #[cfg(feature = "dev")]
62 #[command(name = "test-vectors")]
63 TestVectors(test_vectors::Command),
64}