mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-10 05:17:59 +00:00
merge from cumulus release branch inc extra commit (#940)
* Revert "Companion for substrate#10632 (#895)" This reverts commitfd145766d4. * Revert "Companion for paritytech/polkadot#4712 (#901)" This reverts commit9c977d66a3. * Prepare branch * Make sure to use `state_version = 0` for now * Fix lock file * Minimising changes to cargo lock * updating to include weights update. Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
@@ -21,13 +21,13 @@ path = "src/main.rs"
|
||||
|
||||
[features]
|
||||
runtime-benchmarks = ["parachain-template-runtime/runtime-benchmarks"]
|
||||
try-runtime = ["parachain-template-runtime/try-runtime"]
|
||||
try-runtime = [ "parachain-template-runtime/try-runtime" ]
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "3.0", features = ["derive"] }
|
||||
derive_more = "0.99.2"
|
||||
log = "0.4.14"
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||
structopt = "0.3.8"
|
||||
serde = { version = "1.0.132", features = ["derive"] }
|
||||
hex-literal = "0.3.1"
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
use crate::chain_spec;
|
||||
use clap::{AppSettings, Parser};
|
||||
use std::path::PathBuf;
|
||||
use structopt::StructOpt;
|
||||
|
||||
/// Sub-commands supported by the collator.
|
||||
#[derive(Debug, clap::Subcommand)]
|
||||
#[derive(Debug, StructOpt)]
|
||||
pub enum Subcommand {
|
||||
/// Export the genesis state of the parachain.
|
||||
#[clap(name = "export-genesis-state")]
|
||||
#[structopt(name = "export-genesis-state")]
|
||||
ExportGenesisState(ExportGenesisStateCommand),
|
||||
|
||||
/// Export the genesis wasm of the parachain.
|
||||
#[clap(name = "export-genesis-wasm")]
|
||||
#[structopt(name = "export-genesis-wasm")]
|
||||
ExportGenesisWasm(ExportGenesisWasmCommand),
|
||||
|
||||
/// Build a chain specification.
|
||||
@@ -35,7 +35,7 @@ pub enum Subcommand {
|
||||
Revert(sc_cli::RevertCmd),
|
||||
|
||||
/// The custom benchmark subcommmand benchmarking runtime pallets.
|
||||
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
|
||||
#[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]
|
||||
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
||||
|
||||
/// Try some testing command against a specified runtime state.
|
||||
@@ -43,52 +43,52 @@ pub enum Subcommand {
|
||||
}
|
||||
|
||||
/// Command for exporting the genesis state of the parachain
|
||||
#[derive(Debug, Parser)]
|
||||
#[derive(Debug, StructOpt)]
|
||||
pub struct ExportGenesisStateCommand {
|
||||
/// Output file name or stdout if unspecified.
|
||||
#[clap(parse(from_os_str))]
|
||||
#[structopt(parse(from_os_str))]
|
||||
pub output: Option<PathBuf>,
|
||||
|
||||
/// Write output in binary. Default is to write in hex.
|
||||
#[clap(short, long)]
|
||||
#[structopt(short, long)]
|
||||
pub raw: bool,
|
||||
|
||||
/// The name of the chain for that the genesis state should be exported.
|
||||
#[clap(long)]
|
||||
#[structopt(long)]
|
||||
pub chain: Option<String>,
|
||||
}
|
||||
|
||||
/// Command for exporting the genesis wasm file.
|
||||
#[derive(Debug, Parser)]
|
||||
#[derive(Debug, StructOpt)]
|
||||
pub struct ExportGenesisWasmCommand {
|
||||
/// Output file name or stdout if unspecified.
|
||||
#[clap(parse(from_os_str))]
|
||||
#[structopt(parse(from_os_str))]
|
||||
pub output: Option<PathBuf>,
|
||||
|
||||
/// Write output in binary. Default is to write in hex.
|
||||
#[clap(short, long)]
|
||||
#[structopt(short, long)]
|
||||
pub raw: bool,
|
||||
|
||||
/// The name of the chain for that the genesis wasm file should be exported.
|
||||
#[clap(long)]
|
||||
#[structopt(long)]
|
||||
pub chain: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[clap(setting(
|
||||
AppSettings::PropagateVersion |
|
||||
AppSettings::ArgsNegateSubcommands |
|
||||
AppSettings::SubcommandsNegateReqs,
|
||||
))]
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[structopt(settings = &[
|
||||
structopt::clap::AppSettings::GlobalVersion,
|
||||
structopt::clap::AppSettings::ArgsNegateSubcommands,
|
||||
structopt::clap::AppSettings::SubcommandsNegateReqs,
|
||||
])]
|
||||
pub struct Cli {
|
||||
#[clap(subcommand)]
|
||||
#[structopt(subcommand)]
|
||||
pub subcommand: Option<Subcommand>,
|
||||
|
||||
#[clap(flatten)]
|
||||
#[structopt(flatten)]
|
||||
pub run: cumulus_client_cli::RunCmd,
|
||||
|
||||
/// Relay chain arguments
|
||||
#[clap(raw = true)]
|
||||
#[structopt(raw = true)]
|
||||
pub relay_chain_args: Vec<String>,
|
||||
}
|
||||
|
||||
@@ -113,6 +113,6 @@ impl RelayChainCli {
|
||||
let extension = chain_spec::Extensions::try_get(&*para_config.chain_spec);
|
||||
let chain_id = extension.map(|e| e.relay_chain.clone());
|
||||
let base_path = para_config.base_path.as_ref().map(|x| x.path().join("polkadot"));
|
||||
Self { base_path, chain_id, base: polkadot_cli::RunCmd::parse_from(relay_chain_args) }
|
||||
Self { base_path, chain_id, base: polkadot_cli::RunCmd::from_iter(relay_chain_args) }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user