Companion for substrate#10632 (#4689)

* Companion for substrate#10632

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* cargo format

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Fix bags-list

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Update Substrate

* Fix

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Fix bridges test

* FMT

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
Qinxuan Chen
2022-01-25 18:58:17 +08:00
committed by GitHub
parent 6b7e40cd6c
commit f4ec9b0341
14 changed files with 335 additions and 358 deletions
@@ -12,13 +12,11 @@ polkadot-runtime-constants = { version = "0.9.13", path = "../../../runtime/polk
kusama-runtime-constants = { version = "0.9.13", path = "../../../runtime/kusama/constants" }
westend-runtime-constants = { version = "0.9.13", path = "../../../runtime/westend/constants" }
pallet-bags-list-remote-tests = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
clap = { version = "3.0", features = ["derive"] }
log = "0.4.14"
tokio = { version = "1", features = ["macros"] }
log = { version = "0.4.14" }
structopt = {version = "0.3.25" }
clap = { version = "2.34.0" }
@@ -16,43 +16,40 @@
//! Remote tests for bags-list pallet.
use clap::arg_enum;
use clap::{ArgEnum, Parser};
use std::convert::TryInto;
use structopt::StructOpt;
arg_enum! {
#[derive(Debug)]
enum Command {
CheckMigration,
SanityCheck,
Snapshot,
}
#[derive(Clone, Debug, ArgEnum)]
#[clap(rename_all = "PascalCase")]
enum Command {
CheckMigration,
SanityCheck,
Snapshot,
}
arg_enum! {
#[derive(Debug)]
enum Runtime {
Polkadot,
Kusama,
Westend,
}
#[derive(Clone, Debug, ArgEnum)]
#[clap(rename_all = "PascalCase")]
enum Runtime {
Polkadot,
Kusama,
Westend,
}
#[derive(StructOpt)]
#[derive(Parser)]
struct Cli {
#[structopt(long, short, default_value = "wss://kusama-rpc.polkadot.io:443")]
#[clap(long, short, default_value = "wss://kusama-rpc.polkadot.io:443")]
uri: String,
#[structopt(long, short, case_insensitive = true, possible_values = &Runtime::variants(), default_value = "kusama")]
#[clap(long, short, ignore_case = true, arg_enum, default_value = "kusama")]
runtime: Runtime,
#[structopt(long, short, case_insensitive = true, possible_values = &Command::variants(), default_value = "SanityCheck")]
#[clap(long, short, ignore_case = true, arg_enum, default_value = "SanityCheck")]
command: Command,
#[structopt(long, short)]
#[clap(long, short)]
snapshot_limit: Option<usize>,
}
#[tokio::main]
async fn main() {
let options = Cli::from_args();
let options = Cli::parse();
sp_tracing::try_init_simple();
log::info!(