mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 09:51:02 +00:00
Extract Runtime Constants into Separate Crates (#4456)
* kusama-runtime-constants created * polkadot_runtime_constants added * runtime constants extracted * update node * cargo +nightly fmt * Delete constants.rs * update Cargo.toml * 2021 * runtime constants update * utils * utils * node test service * Update runtime/rococo/constants/Cargo.toml Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * runtime-native * bridge messages * re-export DOLLARS * Update runtime/westend/Cargo.toml Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update runtime/test-runtime/Cargo.toml Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * std feature Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -5,9 +5,13 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
polkadot-runtime = { version = "0.9.8", path = "../../../runtime/polkadot" }
|
||||
kusama-runtime = { version = "0.9.8", path = "../../../runtime/kusama" }
|
||||
westend-runtime = { version = "0.9.8", path = "../../../runtime/westend" }
|
||||
polkadot-runtime = { version = "0.9.13", path = "../../../runtime/polkadot" }
|
||||
kusama-runtime = { version = "0.9.13", path = "../../../runtime/kusama" }
|
||||
westend-runtime = { version = "0.9.13", path = "../../../runtime/westend" }
|
||||
polkadot-runtime-constants = { version = "0.9.13", path = "../../../runtime/polkadot/constants" }
|
||||
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" }
|
||||
|
||||
@@ -83,15 +83,18 @@ async fn main() {
|
||||
|
||||
match (options.runtime, options.command) {
|
||||
(Runtime::Kusama, Command::CheckMigration) => {
|
||||
use kusama_runtime::{constants::currency::UNITS, Block, Runtime};
|
||||
use kusama_runtime::{Block, Runtime};
|
||||
use kusama_runtime_constants::currency::UNITS;
|
||||
migration::execute::<Runtime, Block>(UNITS as u64, "KSM", options.uri.clone()).await;
|
||||
},
|
||||
(Runtime::Kusama, Command::SanityCheck) => {
|
||||
use kusama_runtime::{constants::currency::UNITS, Block, Runtime};
|
||||
use kusama_runtime::{Block, Runtime};
|
||||
use kusama_runtime_constants::currency::UNITS;
|
||||
sanity_check::execute::<Runtime, Block>(UNITS as u64, "KSM", options.uri.clone()).await;
|
||||
},
|
||||
(Runtime::Kusama, Command::Snapshot) => {
|
||||
use kusama_runtime::{constants::currency::UNITS, Block, Runtime};
|
||||
use kusama_runtime::{Block, Runtime};
|
||||
use kusama_runtime_constants::currency::UNITS;
|
||||
snapshot::execute::<Runtime, Block>(
|
||||
options.snapshot_limit,
|
||||
UNITS.try_into().unwrap(),
|
||||
@@ -101,15 +104,18 @@ async fn main() {
|
||||
},
|
||||
|
||||
(Runtime::Westend, Command::CheckMigration) => {
|
||||
use westend_runtime::{constants::currency::UNITS, Block, Runtime};
|
||||
use westend_runtime::{Block, Runtime};
|
||||
use westend_runtime_constants::currency::UNITS;
|
||||
migration::execute::<Runtime, Block>(UNITS as u64, "WND", options.uri.clone()).await;
|
||||
},
|
||||
(Runtime::Westend, Command::SanityCheck) => {
|
||||
use westend_runtime::{constants::currency::UNITS, Block, Runtime};
|
||||
use westend_runtime::{Block, Runtime};
|
||||
use westend_runtime_constants::currency::UNITS;
|
||||
sanity_check::execute::<Runtime, Block>(UNITS as u64, "WND", options.uri.clone()).await;
|
||||
},
|
||||
(Runtime::Westend, Command::Snapshot) => {
|
||||
use westend_runtime::{constants::currency::UNITS, Block, Runtime};
|
||||
use westend_runtime::{Block, Runtime};
|
||||
use westend_runtime_constants::currency::UNITS;
|
||||
snapshot::execute::<Runtime, Block>(
|
||||
options.snapshot_limit,
|
||||
UNITS.try_into().unwrap(),
|
||||
@@ -119,15 +125,18 @@ async fn main() {
|
||||
},
|
||||
|
||||
(Runtime::Polkadot, Command::CheckMigration) => {
|
||||
use polkadot_runtime::{constants::currency::UNITS, Block, Runtime};
|
||||
use polkadot_runtime::{Block, Runtime};
|
||||
use polkadot_runtime_constants::currency::UNITS;
|
||||
migration::execute::<Runtime, Block>(UNITS as u64, "DOT", options.uri.clone()).await;
|
||||
},
|
||||
(Runtime::Polkadot, Command::SanityCheck) => {
|
||||
use polkadot_runtime::{constants::currency::UNITS, Block, Runtime};
|
||||
use polkadot_runtime::{Block, Runtime};
|
||||
use polkadot_runtime_constants::currency::UNITS;
|
||||
sanity_check::execute::<Runtime, Block>(UNITS as u64, "DOT", options.uri.clone()).await;
|
||||
},
|
||||
(Runtime::Polkadot, Command::Snapshot) => {
|
||||
use polkadot_runtime::{constants::currency::UNITS, Block, Runtime};
|
||||
use polkadot_runtime::{Block, Runtime};
|
||||
use polkadot_runtime_constants::currency::UNITS;
|
||||
snapshot::execute::<Runtime, Block>(
|
||||
options.snapshot_limit,
|
||||
UNITS.try_into().unwrap(),
|
||||
|
||||
Reference in New Issue
Block a user