frontier_template_node/
cli.rs

1use crate::service::EthConfiguration;
2
3/// Available Sealing methods.
4#[derive(Copy, Clone, Debug, Default, clap::ValueEnum)]
5pub enum Sealing {
6	/// Seal using rpc method.
7	#[default]
8	Manual,
9	/// Seal when transaction is executed.
10	Instant,
11}
12
13#[derive(Debug, clap::Parser)]
14pub struct Cli {
15	#[command(subcommand)]
16	pub subcommand: Option<Subcommand>,
17
18	#[allow(missing_docs)]
19	#[command(flatten)]
20	pub run: sc_cli::RunCmd,
21
22	/// Choose sealing method.
23	#[arg(long, value_enum, ignore_case = true)]
24	pub sealing: Option<Sealing>,
25
26	#[command(flatten)]
27	pub eth: EthConfiguration,
28}
29
30#[derive(Debug, clap::Subcommand)]
31pub enum Subcommand {
32	/// Key management cli utilities
33	#[command(subcommand)]
34	Key(sc_cli::KeySubcommand),
35
36	/// Build a chain specification.
37	BuildSpec(sc_cli::BuildSpecCmd),
38
39	/// Validate blocks.
40	CheckBlock(sc_cli::CheckBlockCmd),
41
42	/// Export blocks.
43	ExportBlocks(sc_cli::ExportBlocksCmd),
44
45	/// Export the state of a given block into a chain spec.
46	ExportState(sc_cli::ExportStateCmd),
47
48	/// Import blocks.
49	ImportBlocks(sc_cli::ImportBlocksCmd),
50
51	/// Remove the whole chain.
52	PurgeChain(sc_cli::PurgeChainCmd),
53
54	/// Revert the chain to a previous state.
55	Revert(sc_cli::RevertCmd),
56
57	/// Sub-commands concerned with benchmarking.
58	#[cfg(feature = "runtime-benchmarks")]
59	#[command(subcommand)]
60	Benchmark(frame_benchmarking_cli::BenchmarkCmd),
61
62	/// Sub-commands concerned with benchmarking.
63	#[cfg(not(feature = "runtime-benchmarks"))]
64	Benchmark,
65
66	/// Db meta columns information.
67	FrontierDb(fc_cli::FrontierDbCmd),
68}