Skip to content
Snippets Groups Projects
cli.rs 1.03 KiB
Newer Older
use sc_cli::RunCmd;
Pascal Engélibert's avatar
Pascal Engélibert committed
use structopt::StructOpt;

#[derive(Debug, StructOpt)]
pub struct Cli {
Pascal Engélibert's avatar
Pascal Engélibert committed
    #[structopt(subcommand)]
    pub subcommand: Option<Subcommand>,
Pascal Engélibert's avatar
Pascal Engélibert committed
    #[structopt(flatten)]
    pub run: RunCmd,

#[derive(Debug, StructOpt)]
pub enum Subcommand {
Pascal Engélibert's avatar
Pascal Engélibert committed
    /// Key management cli utilities
    Key(sc_cli::KeySubcommand),
    /// Build a chain specification.
    BuildSpec(sc_cli::BuildSpecCmd),
Pascal Engélibert's avatar
Pascal Engélibert committed
    /// Validate blocks.
    CheckBlock(sc_cli::CheckBlockCmd),
Pascal Engélibert's avatar
Pascal Engélibert committed
    /// Export blocks.
    ExportBlocks(sc_cli::ExportBlocksCmd),
Pascal Engélibert's avatar
Pascal Engélibert committed
    /// Export the state of a given block into a chain spec.
    ExportState(sc_cli::ExportStateCmd),
Pascal Engélibert's avatar
Pascal Engélibert committed
    /// Import blocks.
    ImportBlocks(sc_cli::ImportBlocksCmd),
Pascal Engélibert's avatar
Pascal Engélibert committed
    /// Remove the whole chain.
    PurgeChain(sc_cli::PurgeChainCmd),
Pascal Engélibert's avatar
Pascal Engélibert committed
    /// Revert the chain to a previous state.
    Revert(sc_cli::RevertCmd),
Pascal Engélibert's avatar
Pascal Engélibert committed
    /// The custom benchmark subcommmand benchmarking runtime pallets.
    #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]
    Benchmark(frame_benchmarking_cli::BenchmarkCmd),