2022-07-15 00:05:00 -04:00
|
|
|
use sc_cli::RunCmd;
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, clap::Parser)]
|
|
|
|
|
pub struct Cli {
|
|
|
|
|
#[clap(subcommand)]
|
|
|
|
|
pub subcommand: Option<Subcommand>,
|
|
|
|
|
|
|
|
|
|
#[clap(flatten)]
|
|
|
|
|
pub run: RunCmd,
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-13 07:57:45 -04:00
|
|
|
#[allow(clippy::large_enum_variant)]
|
2022-07-15 00:05:00 -04:00
|
|
|
#[derive(Debug, clap::Subcommand)]
|
|
|
|
|
pub enum Subcommand {
|
2022-09-29 05:25:29 -04:00
|
|
|
// Key management CLI utilities
|
2022-07-15 00:05:00 -04:00
|
|
|
#[clap(subcommand)]
|
|
|
|
|
Key(sc_cli::KeySubcommand),
|
|
|
|
|
|
2022-09-29 05:25:29 -04:00
|
|
|
// Build a chain specification
|
2022-07-15 00:05:00 -04:00
|
|
|
BuildSpec(sc_cli::BuildSpecCmd),
|
|
|
|
|
|
2022-09-29 05:25:29 -04:00
|
|
|
// Validate blocks
|
2022-07-15 00:05:00 -04:00
|
|
|
CheckBlock(sc_cli::CheckBlockCmd),
|
|
|
|
|
|
2022-09-29 05:25:29 -04:00
|
|
|
// Export blocks
|
2022-07-15 00:05:00 -04:00
|
|
|
ExportBlocks(sc_cli::ExportBlocksCmd),
|
|
|
|
|
|
2022-09-29 05:25:29 -04:00
|
|
|
// Export the state of a given block into a chain spec
|
2022-07-15 00:05:00 -04:00
|
|
|
ExportState(sc_cli::ExportStateCmd),
|
|
|
|
|
|
2022-09-29 05:25:29 -04:00
|
|
|
// Import blocks
|
2022-07-15 00:05:00 -04:00
|
|
|
ImportBlocks(sc_cli::ImportBlocksCmd),
|
|
|
|
|
|
2022-09-29 05:25:29 -04:00
|
|
|
// Remove the entire chain
|
2022-07-15 00:05:00 -04:00
|
|
|
PurgeChain(sc_cli::PurgeChainCmd),
|
|
|
|
|
|
2022-09-29 05:25:29 -04:00
|
|
|
// Revert the chain to a previous state
|
2022-07-15 00:05:00 -04:00
|
|
|
Revert(sc_cli::RevertCmd),
|
|
|
|
|
|
2022-09-29 05:25:29 -04:00
|
|
|
// DB meta columns information
|
2022-07-15 00:05:00 -04:00
|
|
|
ChainInfo(sc_cli::ChainInfoCmd),
|
|
|
|
|
}
|