2020-09-23 00:24:35 +00:00
|
|
|
use sc_cli::RunCmd;
|
2020-03-05 16:53:25 +00:00
|
|
|
|
2022-02-24 18:09:06 +00:00
|
|
|
#[derive(Debug, clap::Parser)]
|
2020-03-05 16:53:25 +00:00
|
|
|
pub struct Cli {
|
2022-11-03 18:48:26 +00:00
|
|
|
#[command(subcommand)]
|
2020-03-05 16:53:25 +00:00
|
|
|
pub subcommand: Option<Subcommand>,
|
|
|
|
|
2022-02-24 18:09:06 +00:00
|
|
|
#[clap(flatten)]
|
2020-03-05 16:53:25 +00:00
|
|
|
pub run: RunCmd,
|
|
|
|
}
|
2020-09-23 00:24:35 +00:00
|
|
|
|
2022-02-24 18:09:06 +00:00
|
|
|
#[derive(Debug, clap::Subcommand)]
|
2020-09-23 00:24:35 +00:00
|
|
|
pub enum Subcommand {
|
2021-02-24 14:12:24 +00:00
|
|
|
/// Key management cli utilities
|
2022-11-03 18:48:26 +00:00
|
|
|
#[command(subcommand)]
|
2021-02-24 14:12:24 +00:00
|
|
|
Key(sc_cli::KeySubcommand),
|
2022-02-24 18:09:06 +00:00
|
|
|
|
2020-09-23 00:24:35 +00:00
|
|
|
/// Build a chain specification.
|
|
|
|
BuildSpec(sc_cli::BuildSpecCmd),
|
|
|
|
|
|
|
|
/// Validate blocks.
|
|
|
|
CheckBlock(sc_cli::CheckBlockCmd),
|
|
|
|
|
|
|
|
/// Export blocks.
|
|
|
|
ExportBlocks(sc_cli::ExportBlocksCmd),
|
|
|
|
|
|
|
|
/// Export the state of a given block into a chain spec.
|
|
|
|
ExportState(sc_cli::ExportStateCmd),
|
|
|
|
|
|
|
|
/// Import blocks.
|
|
|
|
ImportBlocks(sc_cli::ImportBlocksCmd),
|
|
|
|
|
|
|
|
/// Remove the whole chain.
|
|
|
|
PurgeChain(sc_cli::PurgeChainCmd),
|
|
|
|
|
|
|
|
/// Revert the chain to a previous state.
|
|
|
|
Revert(sc_cli::RevertCmd),
|
|
|
|
|
2022-04-20 20:15:29 +00:00
|
|
|
/// Sub-commands concerned with benchmarking.
|
2022-11-03 18:48:26 +00:00
|
|
|
#[command(subcommand)]
|
2020-09-23 00:24:35 +00:00
|
|
|
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
2022-03-21 20:01:15 +00:00
|
|
|
|
|
|
|
/// Try some command against runtime state.
|
|
|
|
#[cfg(feature = "try-runtime")]
|
|
|
|
TryRuntime(try_runtime_cli::TryRuntimeCmd),
|
|
|
|
|
|
|
|
/// Try some command against runtime state. Note: `try-runtime` feature must be enabled.
|
|
|
|
#[cfg(not(feature = "try-runtime"))]
|
|
|
|
TryRuntime,
|
2022-05-21 15:19:48 +00:00
|
|
|
|
|
|
|
/// Db meta columns information.
|
|
|
|
ChainInfo(sc_cli::ChainInfoCmd),
|
2020-09-23 00:24:35 +00:00
|
|
|
}
|