From d1a12e41ba5725d88bffba31c47f3fbbe4be1c44 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 25 Jan 2024 13:29:20 +0100 Subject: [PATCH 01/11] Removed unused/leftover stuff for `asset-conversion` in testnet AssetHubs --- .../assets/asset-hub-rococo/src/xcm_config.rs | 25 ------------------ .../asset-hub-westend/src/xcm_config.rs | 26 ------------------- .../common/src/local_and_foreign_assets.rs | 5 ---- 3 files changed, 56 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs index f5da60d6c9d74..156ef81aedbd8 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs @@ -21,7 +21,6 @@ use super::{ XcmpQueue, }; use assets_common::{ - local_and_foreign_assets::MatchesLocalAndForeignAssetsLocation, matching::{FromNetwork, FromSiblingParachain, IsForeignConcreteAsset}, TrustBackedAssetsAsLocation, }; @@ -229,30 +228,6 @@ pub type AssetTransactors = ( UniquesTransactor, ); -/// Simple `Location` matcher for Local and Foreign asset `Location`. -pub struct LocalAndForeignAssetsLocationMatcher; -impl MatchesLocalAndForeignAssetsLocation - for LocalAndForeignAssetsLocationMatcher -{ - fn is_local(location: &xcm::v3::Location) -> bool { - use assets_common::fungible_conversion::MatchesLocation; - let latest_location: Location = - if let Ok(location) = (*location).try_into() { location } else { return false }; - TrustBackedAssetsConvertedConcreteId::contains(&latest_location) - } - fn is_foreign(location: &xcm::v3::Location) -> bool { - use assets_common::fungible_conversion::MatchesLocation; - let latest_location: Location = - if let Ok(location) = (*location).try_into() { location } else { return false }; - ForeignAssetsConvertedConcreteId::contains(&latest_location) - } -} -impl Contains for LocalAndForeignAssetsLocationMatcher { - fn contains(location: &xcm::v3::Location) -> bool { - Self::is_local(location) || Self::is_foreign(location) - } -} - /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, /// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can /// biases the kind of local `Origin` it will become. diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs index a3150a9fc369e..01437534c1fde 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs @@ -21,7 +21,6 @@ use super::{ XcmpQueue, }; use assets_common::{ - local_and_foreign_assets::MatchesLocalAndForeignAssetsLocation, matching::{FromSiblingParachain, IsForeignConcreteAsset}, TrustBackedAssetsAsLocation, }; @@ -224,31 +223,6 @@ pub type AssetTransactors = ( UniquesTransactor, ); -/// Simple `Location` matcher for Local and Foreign asset `Location`. -pub struct LocalAndForeignAssetsLocationMatcher; -impl MatchesLocalAndForeignAssetsLocation - for LocalAndForeignAssetsLocationMatcher -{ - fn is_local(location: &xcm::v3::Location) -> bool { - use assets_common::fungible_conversion::MatchesLocation; - let latest_location: Location = - if let Ok(location) = (*location).try_into() { location } else { return false }; - TrustBackedAssetsConvertedConcreteId::contains(&latest_location) - } - - fn is_foreign(location: &xcm::v3::Location) -> bool { - use assets_common::fungible_conversion::MatchesLocation; - let latest_location: Location = - if let Ok(location) = (*location).try_into() { location } else { return false }; - ForeignAssetsConvertedConcreteId::contains(&latest_location) - } -} -impl Contains for LocalAndForeignAssetsLocationMatcher { - fn contains(location: &xcm::v3::Location) -> bool { - Self::is_local(location) || Self::is_foreign(location) - } -} - /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, /// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can /// biases the kind of local `Origin` it will become. diff --git a/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs b/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs index 7c237660610fb..58f5d2d57a766 100644 --- a/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs +++ b/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs @@ -52,8 +52,3 @@ where } } } - -pub trait MatchesLocalAndForeignAssetsLocation { - fn is_local(location: &L) -> bool; - fn is_foreign(location: &L) -> bool; -} From 28aa010281cd19675b4f5f4ee3280634e99230fd Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 30 Jan 2024 12:30:15 +0100 Subject: [PATCH 02/11] [cumulus] `parachains-common` testnet constants cleaning --- Cargo.lock | 40 ++++++++++++++++-- cumulus/parachains/common/Cargo.toml | 13 ------ .../assets/asset-hub-rococo/Cargo.toml | 5 +-- .../assets/asset-hub-rococo/src/genesis.rs | 2 +- .../assets/asset-hub-westend/Cargo.toml | 5 +-- .../assets/asset-hub-westend/src/genesis.rs | 2 +- .../bridges/bridge-hub-rococo/Cargo.toml | 5 +-- .../bridges/bridge-hub-rococo/src/genesis.rs | 2 +- .../bridges/bridge-hub-westend/Cargo.toml | 5 +-- .../bridges/bridge-hub-westend/src/genesis.rs | 2 +- .../collectives-westend/Cargo.toml | 5 +-- .../collectives-westend/src/genesis.rs | 2 +- .../people/people-rococo/Cargo.toml | 5 +-- .../people/people-rococo/src/genesis.rs | 2 +- .../people/people-westend/Cargo.toml | 5 +-- .../people/people-westend/src/genesis.rs | 2 +- .../parachains/testing/penpal/Cargo.toml | 4 +- .../tests/assets/asset-hub-rococo/Cargo.toml | 1 + .../assets/asset-hub-rococo/src/tests/mod.rs | 2 +- .../assets/asset-hub-rococo/src/tests/swap.rs | 3 +- .../tests/assets/asset-hub-westend/Cargo.toml | 1 + .../assets/asset-hub-westend/src/tests/mod.rs | 2 +- .../bridges/bridge-hub-rococo/Cargo.toml | 1 + .../bridge-hub-rococo/src/tests/snowbridge.rs | 2 +- .../assets/asset-hub-rococo/Cargo.toml | 4 +- .../assets/asset-hub-rococo/src/lib.rs | 6 +-- .../assets/asset-hub-rococo/src/xcm_config.rs | 4 +- .../assets/asset-hub-rococo/tests/tests.rs | 8 ++-- .../assets/asset-hub-westend/Cargo.toml | 4 +- .../assets/asset-hub-westend/src/lib.rs | 10 ++--- .../assets/asset-hub-westend/tests/tests.rs | 8 ++-- .../bridge-hubs/bridge-hub-rococo/Cargo.toml | 5 ++- .../src/bridge_to_bulletin_config.rs | 3 +- .../src/bridge_to_ethereum_config.rs | 2 +- .../src/bridge_to_westend_config.rs | 3 +- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 9 ++-- .../bridge-hub-rococo/src/xcm_config.rs | 2 +- .../bridge-hub-rococo/tests/tests.rs | 8 ++-- .../bridge-hubs/bridge-hub-westend/Cargo.toml | 4 +- .../src/bridge_to_rococo_config.rs | 3 +- .../bridge-hubs/bridge-hub-westend/src/lib.rs | 7 ++-- .../bridge-hub-westend/tests/tests.rs | 8 ++-- .../collectives-westend/Cargo.toml | 4 +- .../collectives-westend/src/fellowship/mod.rs | 6 +-- .../collectives-westend/src/lib.rs | 4 +- .../parachains/runtimes/constants/Cargo.toml | 41 +++++++++++++++++++ .../parachains/runtimes/constants/src/lib.rs | 22 ++++++++++ .../constants}/src/rococo.rs | 0 .../constants}/src/westend.rs | 0 .../contracts/contracts-rococo/Cargo.toml | 4 +- .../coretime/coretime-rococo/Cargo.toml | 4 +- .../coretime/coretime-westend/Cargo.toml | 4 +- .../glutton/glutton-westend/Cargo.toml | 4 +- .../runtimes/people/people-rococo/Cargo.toml | 4 +- .../runtimes/people/people-rococo/src/lib.rs | 2 +- .../runtimes/people/people-westend/Cargo.toml | 4 +- .../runtimes/people/people-westend/src/lib.rs | 2 +- .../runtimes/testing/penpal/Cargo.toml | 4 +- .../runtimes/testing/penpal/src/xcm_config.rs | 2 +- .../testing/rococo-parachain/Cargo.toml | 4 +- 60 files changed, 215 insertions(+), 116 deletions(-) create mode 100644 cumulus/parachains/runtimes/constants/Cargo.toml create mode 100644 cumulus/parachains/runtimes/constants/src/lib.rs rename cumulus/parachains/{common => runtimes/constants}/src/rococo.rs (100%) rename cumulus/parachains/{common => runtimes/constants}/src/westend.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 3e7e59ac11743..18c84c8e37226 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -813,6 +813,7 @@ dependencies = [ "parachains-common", "rococo-emulated-chain", "sp-core", + "testnet-system-parachains-constants", ] [[package]] @@ -836,6 +837,7 @@ dependencies = [ "sp-runtime", "staging-xcm", "staging-xcm-executor", + "testnet-system-parachains-constants", ] [[package]] @@ -915,6 +917,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-system-parachains-constants", ] [[package]] @@ -927,6 +930,7 @@ dependencies = [ "frame-support", "parachains-common", "sp-core", + "testnet-system-parachains-constants", "westend-emulated-chain", ] @@ -953,6 +957,7 @@ dependencies = [ "sp-runtime", "staging-xcm", "staging-xcm-executor", + "testnet-system-parachains-constants", "westend-runtime", "westend-system-emulated-network", ] @@ -1029,6 +1034,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-system-parachains-constants", "westend-runtime-constants", ] @@ -1922,6 +1928,7 @@ dependencies = [ "frame-support", "parachains-common", "sp-core", + "testnet-system-parachains-constants", ] [[package]] @@ -1956,6 +1963,7 @@ dependencies = [ "sp-runtime", "staging-xcm", "staging-xcm-executor", + "testnet-system-parachains-constants", ] [[package]] @@ -2052,6 +2060,7 @@ dependencies = [ "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", + "testnet-system-parachains-constants", ] [[package]] @@ -2102,6 +2111,7 @@ dependencies = [ "frame-support", "parachains-common", "sp-core", + "testnet-system-parachains-constants", ] [[package]] @@ -2206,6 +2216,7 @@ dependencies = [ "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", + "testnet-system-parachains-constants", "westend-runtime-constants", ] @@ -2694,6 +2705,7 @@ dependencies = [ "frame-support", "parachains-common", "sp-core", + "testnet-system-parachains-constants", ] [[package]] @@ -2765,6 +2777,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-system-parachains-constants", "westend-runtime-constants", ] @@ -3008,6 +3021,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-system-parachains-constants", ] [[package]] @@ -3102,6 +3116,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-system-parachains-constants", ] [[package]] @@ -3163,6 +3178,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-system-parachains-constants", "westend-runtime-constants", ] @@ -6131,6 +6147,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-system-parachains-constants", ] [[package]] @@ -11282,11 +11299,8 @@ dependencies = [ "pallet-message-queue", "pallet-xcm", "parity-scale-codec", - "polkadot-core-primitives", "polkadot-primitives", - "rococo-runtime-constants", "scale-info", - "smallvec", "sp-consensus-aura", "sp-core", "sp-io", @@ -11296,7 +11310,6 @@ dependencies = [ "staging-xcm", "staging-xcm-executor", "substrate-wasm-builder", - "westend-runtime-constants", ] [[package]] @@ -11595,6 +11608,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-system-parachains-constants", ] [[package]] @@ -11607,6 +11621,7 @@ dependencies = [ "parachains-common", "people-rococo-runtime", "sp-core", + "testnet-system-parachains-constants", ] [[package]] @@ -11691,6 +11706,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-system-parachains-constants", ] [[package]] @@ -11703,6 +11719,7 @@ dependencies = [ "parachains-common", "people-westend-runtime", "sp-core", + "testnet-system-parachains-constants", ] [[package]] @@ -11786,6 +11803,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-system-parachains-constants", "westend-runtime-constants", ] @@ -14764,6 +14782,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-system-parachains-constants", ] [[package]] @@ -19969,6 +19988,19 @@ dependencies = [ "sp-weights", ] +[[package]] +name = "testnet-system-parachains-constants" +version = "1.0.0" +dependencies = [ + "frame-support", + "polkadot-core-primitives", + "rococo-runtime-constants", + "smallvec", + "sp-runtime", + "staging-xcm", + "westend-runtime-constants", +] + [[package]] name = "textwrap" version = "0.16.0" diff --git a/cumulus/parachains/common/Cargo.toml b/cumulus/parachains/common/Cargo.toml index 1abf82a50f0a6..fe5e24ee6079e 100644 --- a/cumulus/parachains/common/Cargo.toml +++ b/cumulus/parachains/common/Cargo.toml @@ -16,7 +16,6 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } log = { version = "0.4.19", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } -smallvec = "1.11.0" # Substrate frame-support = { path = "../../../substrate/frame/support", default-features = false } @@ -34,15 +33,10 @@ sp-std = { path = "../../../substrate/primitives/std", default-features = false # Polkadot pallet-xcm = { path = "../../../polkadot/xcm/pallet-xcm", default-features = false } -polkadot-core-primitives = { path = "../../../polkadot/core-primitives", default-features = false } polkadot-primitives = { path = "../../../polkadot/primitives", default-features = false } xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", default-features = false } xcm-executor = { package = "staging-xcm-executor", path = "../../../polkadot/xcm/xcm-executor", default-features = false } -# Polkadot - only for testnets -rococo-runtime-constants = { path = "../../../polkadot/runtime/rococo/constants", default-features = false, optional = true } -westend-runtime-constants = { path = "../../../polkadot/runtime/westend/constants", default-features = false, optional = true } - # Cumulus pallet-collator-selection = { path = "../../pallets/collator-selection", default-features = false } cumulus-primitives-core = { path = "../../primitives/core", default-features = false } @@ -73,16 +67,13 @@ std = [ "pallet-message-queue/std", "pallet-xcm/std", "parachain-info/std", - "polkadot-core-primitives/std", "polkadot-primitives/std", - "rococo-runtime-constants?/std", "scale-info/std", "sp-consensus-aura/std", "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-std/std", - "westend-runtime-constants?/std", "xcm-executor/std", "xcm/std", ] @@ -102,7 +93,3 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-executor/runtime-benchmarks", ] - -# Test runtimes specific features. -rococo = ["rococo-runtime-constants"] -westend = ["westend-runtime-constants"] diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml index 3c39932e14a02..3a7274e5da749 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml @@ -16,11 +16,10 @@ workspace = true sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false } frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false } -# Polakadot -parachains-common = { path = "../../../../../../../parachains/common" } - # Cumulus +parachains-common = { path = "../../../../../../../parachains/common" } cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false } emulated-integration-tests-common = { path = "../../../../common", default-features = false } asset-hub-rococo-runtime = { path = "../../../../../../runtimes/assets/asset-hub-rococo" } rococo-emulated-chain = { path = "../../../relays/rococo" } +testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] } \ No newline at end of file diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/src/genesis.rs index c19d05ec73075..98a2db10bbe90 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/src/genesis.rs @@ -23,7 +23,7 @@ use emulated_integration_tests_common::{ use parachains_common::Balance; pub const PARA_ID: u32 = 1000; -pub const ED: Balance = parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_system_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = asset_hub_rococo_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml index 65cc96018cdc3..97add5706f385 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml @@ -16,11 +16,10 @@ workspace = true sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false } frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false } -# Polakadot -parachains-common = { path = "../../../../../../../parachains/common" } - # Cumulus +parachains-common = { path = "../../../../../../../parachains/common" } cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false } emulated-integration-tests-common = { path = "../../../../common", default-features = false } asset-hub-westend-runtime = { path = "../../../../../../runtimes/assets/asset-hub-westend" } westend-emulated-chain = { path = "../../../relays/westend" } +testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/src/genesis.rs index 78d6478fdf1ea..b049a18b4b785 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/src/genesis.rs @@ -23,7 +23,7 @@ use emulated_integration_tests_common::{ use parachains_common::Balance; pub const PARA_ID: u32 = 1000; -pub const ED: Balance = parachains_common::westend::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_system_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = asset_hub_westend_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml index 8c5db67400b02..cbf39aeebfc74 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml @@ -16,10 +16,9 @@ workspace = true sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false } frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false } -# Polakadot -parachains-common = { path = "../../../../../../../parachains/common" } - # Cumulus +parachains-common = { path = "../../../../../../../parachains/common" } emulated-integration-tests-common = { path = "../../../../common", default-features = false } bridge-hub-rococo-runtime = { path = "../../../../../../runtimes/bridge-hubs/bridge-hub-rococo" } bridge-hub-common = { path = "../../../../../../runtimes/bridge-hubs/common", default-features = false } +testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] } \ No newline at end of file diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/src/genesis.rs index 3dd0cb10ab697..0d7a53a72f317 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/src/genesis.rs @@ -24,7 +24,7 @@ use parachains_common::Balance; pub const ASSETHUB_PARA_ID: u32 = 1000; pub const PARA_ID: u32 = 1013; -pub const ED: Balance = parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_system_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = bridge_hub_rococo_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml index 7215ecc77d6a7..cd3e60c116ec2 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml @@ -16,10 +16,9 @@ workspace = true sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false } frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false } -# Polakadot -parachains-common = { path = "../../../../../../../parachains/common" } - # Cumulus +parachains-common = { path = "../../../../../../../parachains/common" } emulated-integration-tests-common = { path = "../../../../common", default-features = false } bridge-hub-westend-runtime = { path = "../../../../../../runtimes/bridge-hubs/bridge-hub-westend" } bridge-hub-common = { path = "../../../../../../runtimes/bridge-hubs/common", default-features = false } +testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/src/genesis.rs index 2eb7e0ddbd29a..686d2d69f5464 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/src/genesis.rs @@ -23,7 +23,7 @@ use emulated_integration_tests_common::{ use parachains_common::Balance; pub const PARA_ID: u32 = 1002; -pub const ED: Balance = parachains_common::westend::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_system_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = bridge_hub_westend_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml index 5670bc4c099aa..aef1b5b3dc888 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml @@ -16,10 +16,9 @@ workspace = true sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false } frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false } -# Polakadot -parachains-common = { path = "../../../../../../../parachains/common" } - # Cumulus +parachains-common = { path = "../../../../../../../parachains/common" } cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false } emulated-integration-tests-common = { path = "../../../../common", default-features = false } collectives-westend-runtime = { path = "../../../../../../runtimes/collectives/collectives-westend" } +testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/src/genesis.rs index d79ef55072ae4..4528c674709ce 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/src/genesis.rs @@ -23,7 +23,7 @@ use emulated_integration_tests_common::{ use parachains_common::Balance; pub const PARA_ID: u32 = 1001; -pub const ED: Balance = parachains_common::westend::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_system_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = collectives_westend_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/Cargo.toml index da6642b1ed5b0..7ab2f60eb0907 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/Cargo.toml @@ -13,10 +13,9 @@ publish = false sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false } frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false } -# Polakadot -parachains-common = { path = "../../../../../../../parachains/common" } - # Cumulus +parachains-common = { path = "../../../../../../../parachains/common" } cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false } emulated-integration-tests-common = { path = "../../../../common", default-features = false } people-rococo-runtime = { path = "../../../../../../runtimes/people/people-rococo" } +testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] } diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/src/genesis.rs index 27d5531a0c7d3..da0ba7797f443 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/src/genesis.rs @@ -22,7 +22,7 @@ use emulated_integration_tests_common::{build_genesis_storage, collators, SAFE_X use parachains_common::Balance; pub const PARA_ID: u32 = 1004; -pub const ED: Balance = parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_system_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = people_rococo_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml index 88ccb4787d52c..be4447d106c55 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml @@ -13,10 +13,9 @@ publish = false sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false } frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false } -# Polakadot -parachains-common = { path = "../../../../../../../parachains/common" } - # Cumulus +parachains-common = { path = "../../../../../../../parachains/common" } cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false } emulated-integration-tests-common = { path = "../../../../common", default-features = false } people-westend-runtime = { path = "../../../../../../runtimes/people/people-westend" } +testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/src/genesis.rs index 612580c2b160e..76a9942c1ee01 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/src/genesis.rs @@ -22,7 +22,7 @@ use emulated_integration_tests_common::{build_genesis_storage, collators, SAFE_X use parachains_common::Balance; pub const PARA_ID: u32 = 1004; -pub const ED: Balance = parachains_common::westend::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_system_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = people_westend_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml index b99b33178ee02..a853825d8ef62 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml @@ -16,10 +16,8 @@ workspace = true sp-core = { path = "../../../../../../../../substrate/primitives/core", default-features = false } frame-support = { path = "../../../../../../../../substrate/frame/support", default-features = false } -# Polakadot -parachains-common = { path = "../../../../../../../parachains/common" } - # Cumulus +parachains-common = { path = "../../../../../../../parachains/common" } cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false } emulated-integration-tests-common = { path = "../../../../common", default-features = false } penpal-runtime = { path = "../../../../../../runtimes/testing/penpal" } diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml index 445395fc78307..460dfa8bfb97c 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml @@ -31,6 +31,7 @@ rococo-runtime = { path = "../../../../../../../polkadot/runtime/rococo" } # Cumulus asset-test-utils = { path = "../../../../../runtimes/assets/test-utils" } parachains-common = { path = "../../../../../../parachains/common" } +testnet-system-parachains-constants = { path = "../../../../../runtimes/constants", features = ["rococo"] } asset-hub-rococo-runtime = { path = "../../../../../runtimes/assets/asset-hub-rococo" } emulated-integration-tests-common = { path = "../../../common", default-features = false } rococo-system-emulated-network = { path = "../../../networks/rococo-system" } diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/mod.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/mod.rs index c9270934ddfe8..c5c5aa0781793 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/mod.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/mod.rs @@ -24,5 +24,5 @@ emulated_integration_tests_common::include_penpal_create_foreign_asset_on_asset_ PenpalA, AssetHubRococo, ROCOCO_ED, - parachains_common::rococo::fee::WeightToFee + testnet_system_parachains_constants::rococo::fee::WeightToFee ); diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/swap.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/swap.rs index d6aade68086d5..c6a10b252901c 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/swap.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/swap.rs @@ -14,7 +14,6 @@ // limitations under the License. use crate::*; -use parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT; use rococo_system_emulated_network::penpal_emulated_chain::LocalTeleportableToAssetHubV3 as PenpalLocalTeleportableToAssetHubV3; use sp_runtime::ModuleError; @@ -105,7 +104,7 @@ fn swap_locally_on_chain_using_local_assets() { ::RuntimeOrigin::signed(AssetHubRococoSender::get()), asset_native, asset_one, - 1414213562273 - EXISTENTIAL_DEPOSIT * 2, // all but the 2 EDs can't be retrieved. + 1414213562273 - ASSET_HUB_ROCOCO_ED * 2, // all but the 2 EDs can't be retrieved. 0, 0, AssetHubRococoSender::get().into(), diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml index 94981af353536..fdfa419d6233b 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml @@ -32,6 +32,7 @@ westend-runtime = { path = "../../../../../../../polkadot/runtime/westend" } # Cumulus parachains-common = { path = "../../../../../../parachains/common" } +testnet-system-parachains-constants = { path = "../../../../../runtimes/constants", features = ["westend"] } asset-hub-westend-runtime = { path = "../../../../../runtimes/assets/asset-hub-westend" } asset-test-utils = { path = "../../../../../runtimes/assets/test-utils" } cumulus-pallet-xcmp-queue = { default-features = false, path = "../../../../../../pallets/xcmp-queue" } diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs index ee720c2448041..e0db844a97d51 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs @@ -26,5 +26,5 @@ emulated_integration_tests_common::include_penpal_create_foreign_asset_on_asset_ PenpalB, AssetHubWestend, WESTEND_ED, - parachains_common::westend::fee::WeightToFee + testnet_system_parachains_constants::westend::fee::WeightToFee ); diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml index b609789461d95..c88c247bd00d0 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml @@ -35,6 +35,7 @@ bp-messages = { path = "../../../../../../../bridges/primitives/messages", defau # Cumulus parachains-common = { path = "../../../../../../parachains/common" } +testnet-system-parachains-constants = { path = "../../../../../runtimes/constants", features = ["rococo"] } cumulus-pallet-xcmp-queue = { path = "../../../../../../pallets/xcmp-queue", default-features = false } bridge-hub-rococo-runtime = { path = "../../../../../../parachains/runtimes/bridge-hubs/bridge-hub-rococo", default-features = false } emulated-integration-tests-common = { path = "../../../common", default-features = false } diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs index e217bca816cd9..59455554285d0 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs @@ -18,7 +18,6 @@ use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; use frame_support::pallet_prelude::TypeInfo; use hex_literal::hex; -use parachains_common::rococo::snowbridge::EthereumNetwork; use rococo_westend_system_emulated_network::BridgeHubRococoParaSender as BridgeHubRococoSender; use snowbridge_core::outbound::OperatingMode; use snowbridge_pallet_inbound_queue_fixtures::{ @@ -31,6 +30,7 @@ use snowbridge_pallet_system; use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; use sp_core::H256; use sp_runtime::{ArithmeticError::Underflow, DispatchError::Arithmetic}; +use testnet_system_parachains_constants::rococo::snowbridge::EthereumNetwork; const INITIAL_FUND: u128 = 5_000_000_000 * ROCOCO_ED; const CHAIN_ID: u64 = 11155111; diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml index 7cbfbbb16ac46..1deaf526549d1 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml @@ -80,7 +80,8 @@ cumulus-primitives-core = { path = "../../../../primitives/core", default-featur cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false } pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } -parachains-common = { path = "../../../common", default-features = false, features = ["rococo"] } +parachains-common = { path = "../../../common", default-features = false } +testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } assets-common = { path = "../common", default-features = false } # Bridges @@ -244,6 +245,7 @@ std = [ "sp-version/std", "sp-weights/std", "substrate-wasm-builder", + "testnet-system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index df84a5f67e768..165e7bdc85330 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -35,7 +35,6 @@ use assets_common::{ }; use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; use cumulus_primitives_core::AggregateMessageOrigin; -use parachains_common::rococo::snowbridge::EthereumNetwork; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ @@ -44,6 +43,7 @@ use sp_runtime::{ transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, Permill, }; +use testnet_system_parachains_constants::rococo::snowbridge::EthereumNetwork; use sp_std::prelude::*; #[cfg(feature = "std")] @@ -74,12 +74,12 @@ use pallet_nfts::PalletFeatures; use parachains_common::{ impls::DealWithFees, message_queue::{NarrowOriginToSibling, ParaIdToSibling}, - rococo::{consensus::*, currency::*, fee::WeightToFee}, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, CollectionId, Hash, Header, ItemId, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, NORMAL_DISPATCH_RATIO, }; use sp_runtime::{Perbill, RuntimeDebug}; +use testnet_system_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; use xcm_config::{ ForeignAssetsConvertedConcreteId, ForeignCreatorsSovereignAccountOf, GovernanceLocation, PoolAssetsConvertedConcreteId, TokenLocation, TokenLocationV3, @@ -1728,9 +1728,9 @@ fn ensure_key_ss58() { mod tests { use super::*; use crate::{CENTS, MILLICENTS}; - use parachains_common::rococo::fee; use sp_runtime::traits::Zero; use sp_weights::WeightToFee; + use testnet_system_parachains_constants::rococo::fee; /// We can fit at least 1000 transfers in a block. #[test] diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs index 156ef81aedbd8..1a12daae48d0f 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs @@ -35,7 +35,6 @@ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, - rococo::snowbridge::EthereumNetwork, xcm_config::{ AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, @@ -46,6 +45,7 @@ use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_common::xcm_sender::ExponentialPrice; use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; +use testnet_system_parachains_constants::rococo::snowbridge::EthereumNetwork; use xcm::latest::prelude::*; #[allow(deprecated)] use xcm_builder::CurrencyAdapter; @@ -850,7 +850,7 @@ pub mod bridging { 1, [ Parachain(SiblingBridgeHubParaId::get()), - PalletInstance(parachains_common::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX) + PalletInstance(testnet_system_parachains_constants::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX) ] ); diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/tests/tests.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/tests/tests.rs index e7ac37b2d5c95..168f09ee4269b 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/tests/tests.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/tests/tests.rs @@ -46,13 +46,13 @@ use frame_support::{ }, weights::{Weight, WeightToFee as WeightToFeeT}, }; -use parachains_common::{ - rococo::{consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, currency::UNITS, fee::WeightToFee}, - AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, -}; +use parachains_common::{AccountId, AssetIdForTrustBackedAssets, AuraId, Balance}; use sp_consensus_aura::SlotDuration; use sp_runtime::traits::MaybeEquivalence; use std::convert::Into; +use testnet_system_parachains_constants::rococo::{ + consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, currency::UNITS, fee::WeightToFee, +}; use xcm::latest::prelude::{Assets as XcmAssets, *}; use xcm_builder::V4V3LocationConverter; use xcm_executor::traits::{JustTry, WeightTrader}; diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml index 8b93e374fe66c..1a859c596912c 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml @@ -77,7 +77,8 @@ cumulus-primitives-core = { path = "../../../../primitives/core", default-featur cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false } pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } -parachains-common = { path = "../../../common", default-features = false, features = ["westend"] } +parachains-common = { path = "../../../common", default-features = false } +testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } assets-common = { path = "../common", default-features = false } # Bridges @@ -226,6 +227,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", + "testnet-system-parachains-constants/std", "westend-runtime-constants/std", "xcm-builder/std", "xcm-executor/std", diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index f87798ff29928..db8d70ccf4f86 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -56,12 +56,9 @@ use pallet_asset_conversion_tx_payment::AssetConversionAdapter; use pallet_nfts::{DestroyWitness, PalletFeatures}; use pallet_xcm::EnsureXcm; use parachains_common::{ - impls::DealWithFees, - message_queue::*, - westend::{consensus::*, currency::*, fee::WeightToFee}, - AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, CollectionId, Hash, - Header, ItemId, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, - MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, + impls::DealWithFees, message_queue::*, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, + BlockNumber, CollectionId, Hash, Header, ItemId, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, + DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; @@ -75,6 +72,7 @@ use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; +use testnet_system_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee}; use xcm_config::{ ForeignAssetsConvertedConcreteId, PoolAssetsConvertedConcreteId, TrustBackedAssetsConvertedConcreteId, TrustBackedAssetsPalletLocationV3, WestendLocation, diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/tests/tests.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/tests/tests.rs index 381b2867c9c65..c9f466a2c182f 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/tests/tests.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/tests/tests.rs @@ -47,13 +47,13 @@ use frame_support::{ }, weights::{Weight, WeightToFee as WeightToFeeT}, }; -use parachains_common::{ - westend::{consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, currency::UNITS, fee::WeightToFee}, - AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, SLOT_DURATION, -}; +use parachains_common::{AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, SLOT_DURATION}; use sp_consensus_aura::SlotDuration; use sp_runtime::traits::MaybeEquivalence; use std::convert::Into; +use testnet_system_parachains_constants::westend::{ + consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, currency::UNITS, fee::WeightToFee, +}; use xcm::latest::prelude::{Assets as XcmAssets, *}; use xcm_builder::V4V3LocationConverter; use xcm_executor::traits::{JustTry, WeightTrader}; diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml index d2efe1a418dae..de5d1b4d63ce2 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml @@ -80,7 +80,8 @@ cumulus-primitives-core = { path = "../../../../primitives/core", default-featur cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false } pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } -parachains-common = { path = "../../../common", default-features = false, features = ["rococo"] } +parachains-common = { path = "../../../common", default-features = false } +testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } # Bridges bp-asset-hub-rococo = { path = "../../../../../bridges/primitives/chain-asset-hub-rococo", default-features = false } @@ -212,7 +213,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", - "substrate-wasm-builder", + "testnet-system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs index 7630c2bf99b3f..81412fff5eb63 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs @@ -230,7 +230,8 @@ mod tests { use bridge_runtime_common::{ assert_complete_bridge_types, integrity::check_message_lane_weights, }; - use parachains_common::{rococo, Balance}; + use parachains_common::Balance; + use testnet_system_parachains_constants::rococo; /// Every additional message in the message delivery transaction boosts its priority. /// So the priority of transaction with `N+1` messages is larger than priority of diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs index d633da2a8e7c1..19c5a8f3be2da 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs @@ -15,8 +15,8 @@ // along with Cumulus. If not, see . use crate::{xcm_config::UniversalLocation, Runtime}; -use parachains_common::rococo::snowbridge::EthereumNetwork; use snowbridge_router_primitives::outbound::EthereumBlobExporter; +use testnet_system_parachains_constants::rococo::snowbridge::EthereumNetwork; /// Exports message to the Ethereum Gateway contract. pub type SnowbridgeExporter = EthereumBlobExporter< diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs index 697386b6a7d83..cc77f8c7bd9de 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs @@ -252,7 +252,8 @@ mod tests { AssertCompleteBridgeConstants, }, }; - use parachains_common::{rococo, Balance}; + use parachains_common::Balance; + use testnet_system_parachains_constants::rococo; /// Every additional message in the message delivery transaction boosts its priority. /// So the priority of transaction with `N+1` messages is larger than priority of diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 895cb6e8938a6..a074b8e44fb72 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -93,11 +93,10 @@ use xcm::latest::prelude::*; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, - rococo::{consensus::*, currency::*, fee::WeightToFee}, - AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, - HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, + impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, + AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; +use testnet_system_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; use polkadot_runtime_common::prod_or_fast; @@ -505,7 +504,7 @@ parameter_types! { parameter_types! { pub const CreateAssetCall: [u8;2] = [53, 0]; pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; - pub const InboundQueuePalletInstance: u8 = parachains_common::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX; + pub const InboundQueuePalletInstance: u8 = testnet_system_parachains_constants::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX; pub Parameters: PricingParameters = PricingParameters { exchange_rate: FixedU128::from_rational(1, 400), fee_per_gas: gwei(20), diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index de9afa5436ccd..915a2f30417cf 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -40,7 +40,6 @@ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, - rococo::snowbridge::EthereumNetwork, xcm_config::{ AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, @@ -53,6 +52,7 @@ use snowbridge_runtime_common::XcmExportFeeToSibling; use sp_core::Get; use sp_runtime::traits::AccountIdConversion; use sp_std::marker::PhantomData; +use testnet_system_parachains_constants::rococo::snowbridge::EthereumNetwork; use xcm::latest::prelude::*; #[allow(deprecated)] use xcm_builder::{ diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs index 4131dfbc3deb3..63b524d9e9107 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs @@ -27,10 +27,7 @@ use bridge_hub_rococo_runtime::{ use bridge_hub_test_utils::SlotDurations; use codec::{Decode, Encode}; use frame_support::{dispatch::GetDispatchInfo, parameter_types, traits::ConstU8}; -use parachains_common::{ - rococo::{consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee}, - AccountId, AuraId, Balance, SLOT_DURATION, -}; +use parachains_common::{AccountId, AuraId, Balance, SLOT_DURATION}; use snowbridge_core::ChannelId; use sp_consensus_aura::SlotDuration; use sp_core::H160; @@ -39,6 +36,9 @@ use sp_runtime::{ generic::{Era, SignedPayload}, AccountId32, }; +use testnet_system_parachains_constants::rococo::{ + consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, +}; use xcm::latest::prelude::*; parameter_types! { diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml index b90ba9366a87b..5f7623b156b08 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml @@ -72,7 +72,8 @@ cumulus-primitives-core = { path = "../../../../primitives/core", default-featur cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false } pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } -parachains-common = { path = "../../../common", default-features = false, features = ["westend"] } +parachains-common = { path = "../../../common", default-features = false } +testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } # Bridges bp-asset-hub-rococo = { path = "../../../../../bridges/primitives/chain-asset-hub-rococo", default-features = false } @@ -173,6 +174,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", + "testnet-system-parachains-constants/std", "westend-runtime-constants/std", "xcm-builder/std", "xcm-executor/std", diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs index c0c0976b52fd5..f5dba29904e4c 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs @@ -287,7 +287,8 @@ mod tests { AssertCompleteBridgeConstants, }, }; - use parachains_common::{westend, Balance}; + use parachains_common::Balance; + use testnet_system_parachains_constants::westend; /// Every additional message in the message delivery transaction boosts its priority. /// So the priority of transaction with `N+1` messages is larger than priority of diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index 43c825383bc61..b375886ec5afe 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -82,11 +82,10 @@ use xcm::latest::prelude::*; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use parachains_common::{ - impls::DealWithFees, - westend::{consensus::*, currency::*, fee::WeightToFee}, - AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, - HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, + impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, + AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; +use testnet_system_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee}; /// The address format for describing accounts. pub type Address = MultiAddress; diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs index 91d69b8042086..d8face597e5f7 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs @@ -33,16 +33,16 @@ use bridge_to_rococo_config::{ }; use codec::{Decode, Encode}; use frame_support::{dispatch::GetDispatchInfo, parameter_types, traits::ConstU8}; -use parachains_common::{ - westend::{consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee}, - AccountId, AuraId, Balance, SLOT_DURATION, -}; +use parachains_common::{AccountId, AuraId, Balance, SLOT_DURATION}; use sp_consensus_aura::SlotDuration; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, AccountId32, }; +use testnet_system_parachains_constants::westend::{ + consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, +}; use xcm::latest::prelude::*; // Para id of sibling chain used in tests. diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml b/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml index 6e12bedead180..619b830a6f0c6 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml @@ -79,7 +79,8 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } pallet-collective-content = { path = "../../../pallets/collective-content", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } -parachains-common = { path = "../../../common", default-features = false, features = ["westend"] } +parachains-common = { path = "../../../common", default-features = false } +testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } [build-dependencies] substrate-wasm-builder = { path = "../../../../../substrate/utils/wasm-builder", optional = true } @@ -222,6 +223,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", + "testnet-system-parachains-constants/std", "westend-runtime-constants/std", "xcm-builder/std", "xcm-executor/std", diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/fellowship/mod.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/fellowship/mod.rs index 273fa6a34150d..b17bc0aad8110 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/fellowship/mod.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/fellowship/mod.rs @@ -38,16 +38,14 @@ pub use origins::{ }; use pallet_ranked_collective::EnsureOfRank; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; -use parachains_common::{ - impls::ToParentTreasury, - westend::{account, currency::GRAND}, -}; +use parachains_common::impls::ToParentTreasury; use polkadot_runtime_common::impls::{ LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter, }; use sp_arithmetic::Permill; use sp_core::{ConstU128, ConstU32}; use sp_runtime::traits::{ConstU16, ConvertToValue, IdentityLookup, Replace, TakeFirst}; +use testnet_system_parachains_constants::westend::{account, currency::GRAND}; use westend_runtime_constants::time::HOURS; use xcm::prelude::*; use xcm_builder::{AliasesIntoAccountId32, PayOverXcm}; diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs index fb8e9ddf24e23..90d11c05aa9dc 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs @@ -83,12 +83,14 @@ pub use parachains_common as common; use parachains_common::{ impls::{DealWithFees, ToParentTreasury}, message_queue::*, - westend::{account::*, consensus::*, currency::*, fee::WeightToFee}, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, MINUTES, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; use sp_runtime::RuntimeDebug; +use testnet_system_parachains_constants::westend::{ + account::*, consensus::*, currency::*, fee::WeightToFee, +}; use xcm_config::{ GovernanceLocation, LocationToAccountId, TreasurerBodyId, XcmOriginToTransactDispatchOrigin, }; diff --git a/cumulus/parachains/runtimes/constants/Cargo.toml b/cumulus/parachains/runtimes/constants/Cargo.toml new file mode 100644 index 0000000000000..093949b15f406 --- /dev/null +++ b/cumulus/parachains/runtimes/constants/Cargo.toml @@ -0,0 +1,41 @@ +[package] +name = "testnet-system-parachains-constants" +version = "1.0.0" +authors.workspace = true +edition.workspace = true +description = "Common constants for Testnet System Parachains runtimes" +license = "Apache-2.0" + +[lints] +workspace = true + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] +smallvec = "1.11.0" + +# Substrate +frame-support = { path = "../../../../substrate/frame/support", default-features = false } +sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false } + +# Polkadot +polkadot-core-primitives = { path = "../../../../polkadot/core-primitives", default-features = false } +rococo-runtime-constants = { path = "../../../../polkadot/runtime/rococo/constants", default-features = false, optional = true } +westend-runtime-constants = { path = "../../../../polkadot/runtime/westend/constants", default-features = false, optional = true } +xcm = { package = "staging-xcm", path = "../../../../polkadot/xcm", default-features = false } + +[features] +default = [ "std" ] +std = [ + "frame-support/std", + "polkadot-core-primitives/std", + "rococo-runtime-constants?/std", + "sp-runtime/std", + "westend-runtime-constants?/std", + "xcm/std", +] + +# Test runtimes specific features. +rococo = ["rococo-runtime-constants"] +westend = ["westend-runtime-constants"] diff --git a/cumulus/parachains/runtimes/constants/src/lib.rs b/cumulus/parachains/runtimes/constants/src/lib.rs new file mode 100644 index 0000000000000..bb36bc0fd6828 --- /dev/null +++ b/cumulus/parachains/runtimes/constants/src/lib.rs @@ -0,0 +1,22 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +#![cfg_attr(not(feature = "std"), no_std)] + +#[cfg(feature = "rococo")] +pub mod rococo; +#[cfg(feature = "westend")] +pub mod westend; diff --git a/cumulus/parachains/common/src/rococo.rs b/cumulus/parachains/runtimes/constants/src/rococo.rs similarity index 100% rename from cumulus/parachains/common/src/rococo.rs rename to cumulus/parachains/runtimes/constants/src/rococo.rs diff --git a/cumulus/parachains/common/src/westend.rs b/cumulus/parachains/runtimes/constants/src/westend.rs similarity index 100% rename from cumulus/parachains/common/src/westend.rs rename to cumulus/parachains/runtimes/constants/src/westend.rs diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml b/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml index 2731059d23c3f..74d7dde50c865 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml @@ -75,7 +75,8 @@ cumulus-primitives-core = { path = "../../../../primitives/core", default-featur cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false } pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } -parachains-common = { path = "../../../common", default-features = false, features = ["rococo"] } +parachains-common = { path = "../../../common", default-features = false } +testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } [features] default = ["std"] @@ -131,6 +132,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", + "testnet-system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml b/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml index b394deb26b00f..71792c988c47b 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml @@ -74,7 +74,8 @@ cumulus-primitives-core = { path = "../../../../primitives/core", default-featur cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false } pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } -parachains-common = { path = "../../../common", default-features = false, features = ["rococo"] } +parachains-common = { path = "../../../common", default-features = false } +testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } [features] default = ["std"] @@ -132,6 +133,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", + "testnet-system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml b/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml index 9a108b308f64c..32bc3daa8dc10 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml @@ -73,7 +73,8 @@ cumulus-primitives-core = { path = "../../../../primitives/core", default-featur cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false } pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } -parachains-common = { path = "../../../common", default-features = false, features = ["westend"] } +parachains-common = { path = "../../../common", default-features = false } +testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } [features] default = ["std"] @@ -129,6 +130,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", + "testnet-system-parachains-constants/std", "westend-runtime-constants/std", "xcm-builder/std", "xcm-executor/std", diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml b/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml index 8c1070c2d71a3..8b61439d9cc55 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml @@ -53,7 +53,8 @@ cumulus-primitives-aura = { path = "../../../../primitives/aura", default-featur cumulus-primitives-core = { path = "../../../../primitives/core", default-features = false } cumulus-primitives-timestamp = { path = "../../../../primitives/timestamp", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } -parachains-common = { path = "../../../common", default-features = false, features = ["westend"] } +parachains-common = { path = "../../../common", default-features = false } +testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } [build-dependencies] substrate-wasm-builder = { path = "../../../../../substrate/utils/wasm-builder" } @@ -112,6 +113,7 @@ std = [ "sp-storage/std", "sp-transaction-pool/std", "sp-version/std", + "testnet-system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml b/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml index d8cd87dffd3cf..25f8a6abda088 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml @@ -70,7 +70,8 @@ cumulus-primitives-core = { path = "../../../../primitives/core", default-featur cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false } pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } -parachains-common = { path = "../../../common", default-features = false, features = ["rococo"] } +parachains-common = { path = "../../../common", default-features = false } +testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } [features] default = ["std"] @@ -127,6 +128,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", + "testnet-system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs index c038f8b4176db..218d5ce8c6447 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs @@ -43,7 +43,6 @@ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use parachains_common::{ impls::DealWithFees, message_queue::{NarrowOriginToSibling, ParaIdToSibling}, - rococo::{consensus::*, currency::*, fee::WeightToFee}, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; @@ -64,6 +63,7 @@ use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; +use testnet_system_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::BodyId; use xcm_config::{ diff --git a/cumulus/parachains/runtimes/people/people-westend/Cargo.toml b/cumulus/parachains/runtimes/people/people-westend/Cargo.toml index 3a15d92b487f0..33f0f730b0d17 100644 --- a/cumulus/parachains/runtimes/people/people-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/people/people-westend/Cargo.toml @@ -70,7 +70,8 @@ cumulus-primitives-core = { path = "../../../../primitives/core", default-featur cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false } pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } -parachains-common = { path = "../../../common", default-features = false, features = ["westend"] } +parachains-common = { path = "../../../common", default-features = false } +testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } [features] default = ["std"] @@ -126,6 +127,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", + "testnet-system-parachains-constants/std", "westend-runtime-constants/std", "xcm-builder/std", "xcm-executor/std", diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index 4d1f82be97f43..ee87f2d3ddf87 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -43,7 +43,6 @@ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use parachains_common::{ impls::DealWithFees, message_queue::{NarrowOriginToSibling, ParaIdToSibling}, - westend::{consensus::*, currency::*, fee::WeightToFee}, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; @@ -64,6 +63,7 @@ use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; +use testnet_system_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::BodyId; use xcm_config::{ diff --git a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml index 36fd28daae7df..8ba5cf91d6609 100644 --- a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml @@ -76,7 +76,8 @@ cumulus-primitives-core = { path = "../../../../primitives/core", default-featur cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false } pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } -parachains-common = { path = "../../../common", default-features = false, features = ["rococo"] } +parachains-common = { path = "../../../common", default-features = false } +testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } assets-common = { path = "../../assets/common", default-features = false } [features] @@ -132,6 +133,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", + "testnet-system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs index 25a437f3fc6ac..a74d1cc0923fb 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -40,10 +40,10 @@ use frame_system::EnsureRoot; use pallet_asset_tx_payment::HandleCredit; use pallet_assets::Instance1; use pallet_xcm::XcmPassthrough; -use parachains_common::rococo::snowbridge::EthereumNetwork; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_common::impls::ToAuthor; use sp_runtime::traits::Zero; +use testnet_system_parachains_constants::rococo::snowbridge::EthereumNetwork; use xcm::latest::prelude::*; #[allow(deprecated)] use xcm_builder::{ diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml index d32cc34fe89f1..f568e3926baa4 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml @@ -57,7 +57,8 @@ cumulus-ping = { path = "../../../pallets/ping", default-features = false } cumulus-primitives-aura = { path = "../../../../primitives/aura", default-features = false } cumulus-primitives-core = { path = "../../../../primitives/core", default-features = false } cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false } -parachains-common = { path = "../../../common", default-features = false, features = ["rococo"] } +parachains-common = { path = "../../../common", default-features = false } +testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } [build-dependencies] @@ -107,6 +108,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", + "testnet-system-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", From 60517517809432e832052fd4bc943e27f8bdbfa1 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 30 Jan 2024 12:34:39 +0100 Subject: [PATCH 03/11] removed `invulnerables_asset_hub_polkadot` --- .../integration-tests/emulated/common/src/lib.rs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/cumulus/parachains/integration-tests/emulated/common/src/lib.rs b/cumulus/parachains/integration-tests/emulated/common/src/lib.rs index 882a188e0f751..546f81ce8254e 100644 --- a/cumulus/parachains/integration-tests/emulated/common/src/lib.rs +++ b/cumulus/parachains/integration-tests/emulated/common/src/lib.rs @@ -34,7 +34,7 @@ use parachains_common::BlockNumber; use polkadot_runtime_parachains::configuration::HostConfiguration; // Cumulus -use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId}; +use parachains_common::{AccountId, AuraId}; use polkadot_primitives::{AssignmentId, ValidatorId}; use polkadot_service::chain_spec::get_authority_keys_from_seed_no_beefy; @@ -130,19 +130,6 @@ pub mod accounts { pub mod collators { use super::*; - pub fn invulnerables_asset_hub_polkadot() -> Vec<(AccountId, AssetHubPolkadotAuraId)> { - vec![ - ( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - ), - ( - get_account_id_from_seed::("Bob"), - get_from_seed::("Bob"), - ), - ] - } - pub fn invulnerables() -> Vec<(AccountId, AuraId)> { vec![ ( From c2733626d0885de4b7fbb0d31317f64200343f94 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 30 Jan 2024 13:05:48 +0100 Subject: [PATCH 04/11] More consts --- cumulus/parachains/common/src/lib.rs | 4 ---- .../runtimes/contracts/contracts-rococo/src/contracts.rs | 2 +- .../runtimes/contracts/contracts-rococo/src/lib.rs | 9 ++++----- .../contracts/contracts-rococo/src/xcm_config.rs | 2 +- .../runtimes/coretime/coretime-rococo/src/lib.rs | 2 +- .../runtimes/coretime/coretime-westend/src/lib.rs | 2 +- 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/cumulus/parachains/common/src/lib.rs b/cumulus/parachains/common/src/lib.rs index 0069fba344224..b01d623d2b93d 100644 --- a/cumulus/parachains/common/src/lib.rs +++ b/cumulus/parachains/common/src/lib.rs @@ -17,10 +17,6 @@ pub mod impls; pub mod message_queue; -#[cfg(feature = "rococo")] -pub mod rococo; -#[cfg(feature = "westend")] -pub mod westend; pub mod xcm_config; pub use constants::*; pub use opaque::*; diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs index 94f2d34b265a8..2e9df3b000b35 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs @@ -26,7 +26,7 @@ use pallet_contracts::{ }; use sp_runtime::Perbill; -pub use parachains_common::rococo::currency::deposit; +use testnet_system_parachains_constants::rococo::currency::deposit; // Prints debug output of the `contracts` pallet to stdout if the node is // started with `-lruntime::contracts=debug`. diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs index 605fa720370ba..a714efed15c51 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs @@ -57,13 +57,12 @@ use frame_support::{ use frame_system::limits::{BlockLength, BlockWeights}; pub use parachains_common as common; use parachains_common::{ - impls::DealWithFees, - message_queue::*, - rococo::{consensus::*, currency::*, fee::WeightToFee}, - AccountId, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, - MAXIMUM_BLOCK_WEIGHT, MINUTES, NORMAL_DISPATCH_RATIO, SLOT_DURATION, + impls::DealWithFees, message_queue::*, AccountId, BlockNumber, Hash, Header, Nonce, Signature, + AVERAGE_ON_INITIALIZE_RATIO, MAXIMUM_BLOCK_WEIGHT, MINUTES, NORMAL_DISPATCH_RATIO, + SLOT_DURATION, }; pub use parachains_common::{AuraId, Balance}; +use testnet_system_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; use xcm_config::CollatorSelectionUpdateOrigin; #[cfg(any(feature = "std", test))] diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index 9590f36e63747..7d66fe1404d15 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -17,7 +17,6 @@ use super::{ AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, TransactionByteFee, WeightToFee, XcmpQueue, }; -use crate::common::rococo::currency::CENTS; use cumulus_primitives_core::AggregateMessageOrigin; use frame_support::{ parameter_types, @@ -36,6 +35,7 @@ use parachains_common::{ use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_common::xcm_sender::ExponentialPrice; use sp_runtime::traits::AccountIdConversion; +use testnet_system_parachains_constants::rococo::currency::CENTS; use xcm::latest::prelude::*; #[allow(deprecated)] use xcm_builder::CurrencyAdapter; diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs index 06475849a5d2b..e0a57a115c5cc 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs @@ -52,7 +52,6 @@ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use parachains_common::{ impls::DealWithFees, message_queue::{NarrowOriginToSibling, ParaIdToSibling}, - rococo::{consensus::*, currency::*, fee::WeightToFee}, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; @@ -71,6 +70,7 @@ use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; +use testnet_system_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::*; use xcm_config::{ diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs index 96b0d2b476d6d..3020cad54244d 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs @@ -43,7 +43,6 @@ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use parachains_common::{ impls::DealWithFees, message_queue::{NarrowOriginToSibling, ParaIdToSibling}, - westend::{consensus::*, currency::*, fee::WeightToFee}, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; @@ -62,6 +61,7 @@ use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; +use testnet_system_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::*; use xcm_config::{ From a00c3a231aea3057c9a390bbf031c8fc16ad3e11 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 30 Jan 2024 13:27:31 +0100 Subject: [PATCH 05/11] More --- Cargo.lock | 1 + cumulus/polkadot-parachain/Cargo.toml | 1 + .../src/chain_spec/asset_hubs.rs | 14 ++++++-------- .../src/chain_spec/bridge_hubs.rs | 4 ++-- .../src/chain_spec/collectives.rs | 2 +- .../polkadot-parachain/src/chain_spec/contracts.rs | 2 +- .../polkadot-parachain/src/chain_spec/coretime.rs | 4 ++-- .../polkadot-parachain/src/chain_spec/people.rs | 8 ++++---- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 18c84c8e37226..40acc0163eb8f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13022,6 +13022,7 @@ dependencies = [ "substrate-prometheus-endpoint", "substrate-state-trie-migration-rpc", "tempfile", + "testnet-system-parachains-constants", "tokio", "wait-timeout", ] diff --git a/cumulus/polkadot-parachain/Cargo.toml b/cumulus/polkadot-parachain/Cargo.toml index 7381acb6aaa31..2fd1e32fa3342 100644 --- a/cumulus/polkadot-parachain/Cargo.toml +++ b/cumulus/polkadot-parachain/Cargo.toml @@ -42,6 +42,7 @@ jsonrpsee = { version = "0.20.3", features = ["server"] } people-rococo-runtime = { path = "../parachains/runtimes/people/people-rococo" } people-westend-runtime = { path = "../parachains/runtimes/people/people-westend" } parachains-common = { path = "../parachains/common" } +testnet-system-parachains-constants = { path = "../parachains/runtimes/constants", default-features = false, features = ["rococo", "westend"] } # Substrate frame-benchmarking = { path = "../../substrate/frame/benchmarking" } diff --git a/cumulus/polkadot-parachain/src/chain_spec/asset_hubs.rs b/cumulus/polkadot-parachain/src/chain_spec/asset_hubs.rs index f889e05a1661a..63712a9e46baa 100644 --- a/cumulus/polkadot-parachain/src/chain_spec/asset_hubs.rs +++ b/cumulus/polkadot-parachain/src/chain_spec/asset_hubs.rs @@ -24,10 +24,8 @@ use parachains_common::{AccountId, AuraId, Balance as AssetHubBalance}; use sc_service::ChainType; use sp_core::{crypto::UncheckedInto, sr25519}; -const ASSET_HUB_WESTEND_ED: AssetHubBalance = - parachains_common::westend::currency::EXISTENTIAL_DEPOSIT; -const ASSET_HUB_ROCOCO_ED: AssetHubBalance = - parachains_common::westend::currency::EXISTENTIAL_DEPOSIT; +const ASSET_HUB_WESTEND_ED: AssetHubBalance = asset_hub_westend_runtime::ExistentialDeposit::get(); +const ASSET_HUB_ROCOCO_ED: AssetHubBalance = asset_hub_rococo_runtime::ExistentialDeposit::get(); /// Generate the session keys from individual elements. /// @@ -68,7 +66,7 @@ pub fn asset_hub_westend_development_config() -> GenericChainSpec { get_account_id_from_seed::("Alice//stash"), get_account_id_from_seed::("Bob//stash"), ], - parachains_common::westend::currency::UNITS * 1_000_000, + testnet_system_parachains_constants::westend::currency::UNITS * 1_000_000, 1000.into(), )) .with_properties(properties) @@ -114,7 +112,7 @@ pub fn asset_hub_westend_local_config() -> GenericChainSpec { get_account_id_from_seed::("Eve//stash"), get_account_id_from_seed::("Ferdie//stash"), ], - parachains_common::westend::currency::UNITS * 1_000_000, + testnet_system_parachains_constants::westend::currency::UNITS * 1_000_000, 1000.into(), )) .with_properties(properties) @@ -243,7 +241,7 @@ fn asset_hub_rococo_like_development_config( get_account_id_from_seed::("Alice//stash"), get_account_id_from_seed::("Bob//stash"), ], - parachains_common::rococo::currency::UNITS * 1_000_000, + testnet_system_parachains_constants::rococo::currency::UNITS * 1_000_000, para_id.into(), )) .with_properties(properties) @@ -302,7 +300,7 @@ fn asset_hub_rococo_like_local_config( get_account_id_from_seed::("Eve//stash"), get_account_id_from_seed::("Ferdie//stash"), ], - parachains_common::rococo::currency::UNITS * 1_000_000, + testnet_system_parachains_constants::rococo::currency::UNITS * 1_000_000, para_id.into(), )) .with_properties(properties) diff --git a/cumulus/polkadot-parachain/src/chain_spec/bridge_hubs.rs b/cumulus/polkadot-parachain/src/chain_spec/bridge_hubs.rs index 1f43edf2243c0..1db826ea7daf8 100644 --- a/cumulus/polkadot-parachain/src/chain_spec/bridge_hubs.rs +++ b/cumulus/polkadot-parachain/src/chain_spec/bridge_hubs.rs @@ -133,7 +133,7 @@ pub mod rococo { pub(crate) const BRIDGE_HUB_ROCOCO_LOCAL: &str = "bridge-hub-rococo-local"; pub(crate) const BRIDGE_HUB_ROCOCO_DEVELOPMENT: &str = "bridge-hub-rococo-dev"; const BRIDGE_HUB_ROCOCO_ED: BridgeHubBalance = - parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT; + bridge_hub_rococo_runtime::ExistentialDeposit::get(); pub fn local_config( id: &str, @@ -257,7 +257,7 @@ pub mod westend { pub(crate) const BRIDGE_HUB_WESTEND_LOCAL: &str = "bridge-hub-westend-local"; pub(crate) const BRIDGE_HUB_WESTEND_DEVELOPMENT: &str = "bridge-hub-westend-dev"; const BRIDGE_HUB_WESTEND_ED: BridgeHubBalance = - parachains_common::westend::currency::EXISTENTIAL_DEPOSIT; + bridge_hub_westend_runtime::ExistentialDeposit::get(); pub fn local_config( id: &str, diff --git a/cumulus/polkadot-parachain/src/chain_spec/collectives.rs b/cumulus/polkadot-parachain/src/chain_spec/collectives.rs index dd67bf975f773..c0a9f195d89bc 100644 --- a/cumulus/polkadot-parachain/src/chain_spec/collectives.rs +++ b/cumulus/polkadot-parachain/src/chain_spec/collectives.rs @@ -24,7 +24,7 @@ use sc_service::ChainType; use sp_core::sr25519; const COLLECTIVES_WESTEND_ED: CollectivesBalance = - parachains_common::westend::currency::EXISTENTIAL_DEPOSIT; + collectives_westend_runtime::ExistentialDeposit::get(); /// Generate the session keys from individual elements. /// diff --git a/cumulus/polkadot-parachain/src/chain_spec/contracts.rs b/cumulus/polkadot-parachain/src/chain_spec/contracts.rs index 87ac1ed2fa189..9f48decbb8347 100644 --- a/cumulus/polkadot-parachain/src/chain_spec/contracts.rs +++ b/cumulus/polkadot-parachain/src/chain_spec/contracts.rs @@ -29,7 +29,7 @@ const CONTRACTS_PARACHAIN_ID: u32 = 1002; /// The existential deposit is determined by the runtime "contracts-rococo". const CONTRACTS_ROCOCO_ED: contracts_rococo_runtime::Balance = - parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT; + testnet_system_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT; pub fn contracts_rococo_development_config() -> GenericChainSpec { let mut properties = sc_chain_spec::Properties::new(); diff --git a/cumulus/polkadot-parachain/src/chain_spec/coretime.rs b/cumulus/polkadot-parachain/src/chain_spec/coretime.rs index fbce4e5bc21f9..f7c362cbd4576 100644 --- a/cumulus/polkadot-parachain/src/chain_spec/coretime.rs +++ b/cumulus/polkadot-parachain/src/chain_spec/coretime.rs @@ -120,7 +120,7 @@ pub mod rococo { pub(crate) const CORETIME_ROCOCO: &str = "coretime-rococo"; pub(crate) const CORETIME_ROCOCO_LOCAL: &str = "coretime-rococo-local"; pub(crate) const CORETIME_ROCOCO_DEVELOPMENT: &str = "coretime-rococo-dev"; - const CORETIME_ROCOCO_ED: Balance = parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT; + const CORETIME_ROCOCO_ED: Balance = coretime_rococo_runtime::ExistentialDeposit::get(); pub fn local_config(runtime_type: CoretimeRuntimeType, relay_chain: &str) -> GenericChainSpec { // Rococo defaults @@ -215,7 +215,7 @@ pub mod westend { pub(crate) const CORETIME_WESTEND_LOCAL: &str = "coretime-westend-local"; pub(crate) const CORETIME_WESTEND_DEVELOPMENT: &str = "coretime-westend-dev"; - const CORETIME_WESTEND_ED: Balance = parachains_common::westend::currency::EXISTENTIAL_DEPOSIT; + const CORETIME_WESTEND_ED: Balance = coretime_westend_runtime::ExistentialDeposit::get(); pub fn local_config(runtime_type: CoretimeRuntimeType, relay_chain: &str) -> GenericChainSpec { // westend defaults diff --git a/cumulus/polkadot-parachain/src/chain_spec/people.rs b/cumulus/polkadot-parachain/src/chain_spec/people.rs index aa78bfdb76f0f..75de38015c774 100644 --- a/cumulus/polkadot-parachain/src/chain_spec/people.rs +++ b/cumulus/polkadot-parachain/src/chain_spec/people.rs @@ -106,14 +106,14 @@ pub mod rococo { get_account_id_from_seed, get_collator_keys_from_seed, Extensions, GenericChainSpec, SAFE_XCM_VERSION, }; - use parachains_common::{rococo::currency::EXISTENTIAL_DEPOSIT, AccountId, AuraId}; + use parachains_common::{AccountId, AuraId}; use sc_chain_spec::ChainType; use sp_core::sr25519; pub(crate) const PEOPLE_ROCOCO: &str = "people-rococo"; pub(crate) const PEOPLE_ROCOCO_LOCAL: &str = "people-rococo-local"; pub(crate) const PEOPLE_ROCOCO_DEVELOPMENT: &str = "people-rococo-development"; - const PEOPLE_ROCOCO_ED: PeopleBalance = EXISTENTIAL_DEPOSIT; + const PEOPLE_ROCOCO_ED: PeopleBalance = people_rococo_runtime::ExistentialDeposit::get(); pub fn local_config( id: &str, @@ -216,14 +216,14 @@ pub mod westend { get_account_id_from_seed, get_collator_keys_from_seed, Extensions, GenericChainSpec, SAFE_XCM_VERSION, }; - use parachains_common::{westend::currency::EXISTENTIAL_DEPOSIT, AccountId, AuraId}; + use parachains_common::{AccountId, AuraId}; use sc_chain_spec::ChainType; use sp_core::sr25519; pub(crate) const PEOPLE_WESTEND: &str = "people-westend"; pub(crate) const PEOPLE_WESTEND_LOCAL: &str = "people-westend-local"; pub(crate) const PEOPLE_WESTEND_DEVELOPMENT: &str = "people-westend-development"; - const PEOPLE_WESTEND_ED: PeopleBalance = EXISTENTIAL_DEPOSIT; + const PEOPLE_WESTEND_ED: PeopleBalance = people_westend_runtime::ExistentialDeposit::get(); pub fn local_config( id: &str, From b8012ccc4bef2f78b28803abb8d828665b52f74c Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 30 Jan 2024 16:20:12 +0100 Subject: [PATCH 06/11] Rename + more compile fixes --- Cargo.lock | 50 +++++++++---------- .../assets/asset-hub-rococo/Cargo.toml | 2 +- .../assets/asset-hub-rococo/src/genesis.rs | 2 +- .../assets/asset-hub-westend/Cargo.toml | 2 +- .../assets/asset-hub-westend/src/genesis.rs | 2 +- .../bridges/bridge-hub-rococo/Cargo.toml | 2 +- .../bridges/bridge-hub-rococo/src/genesis.rs | 2 +- .../bridges/bridge-hub-westend/Cargo.toml | 2 +- .../bridges/bridge-hub-westend/src/genesis.rs | 2 +- .../collectives-westend/Cargo.toml | 2 +- .../collectives-westend/src/genesis.rs | 2 +- .../people/people-rococo/Cargo.toml | 2 +- .../people/people-rococo/src/genesis.rs | 2 +- .../people/people-westend/Cargo.toml | 2 +- .../people/people-westend/src/genesis.rs | 2 +- .../tests/assets/asset-hub-rococo/Cargo.toml | 2 +- .../assets/asset-hub-rococo/src/tests/mod.rs | 2 +- .../tests/assets/asset-hub-westend/Cargo.toml | 2 +- .../assets/asset-hub-westend/src/tests/mod.rs | 2 +- .../bridges/bridge-hub-rococo/Cargo.toml | 2 +- .../bridge-hub-rococo/src/tests/snowbridge.rs | 2 +- .../assets/asset-hub-rococo/Cargo.toml | 4 +- .../assets/asset-hub-rococo/src/lib.rs | 6 +-- .../assets/asset-hub-rococo/src/xcm_config.rs | 4 +- .../assets/asset-hub-rococo/tests/tests.rs | 2 +- .../assets/asset-hub-westend/Cargo.toml | 4 +- .../assets/asset-hub-westend/src/lib.rs | 2 +- .../assets/asset-hub-westend/tests/tests.rs | 2 +- .../bridge-hubs/bridge-hub-rococo/Cargo.toml | 4 +- .../src/bridge_to_bulletin_config.rs | 2 +- .../src/bridge_to_ethereum_config.rs | 2 +- .../src/bridge_to_westend_config.rs | 2 +- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 4 +- .../bridge-hub-rococo/src/xcm_config.rs | 2 +- .../bridge-hub-rococo/tests/tests.rs | 2 +- .../bridge-hubs/bridge-hub-westend/Cargo.toml | 4 +- .../src/bridge_to_rococo_config.rs | 2 +- .../bridge-hubs/bridge-hub-westend/src/lib.rs | 2 +- .../bridge-hub-westend/tests/tests.rs | 2 +- .../collectives-westend/Cargo.toml | 4 +- .../collectives-westend/src/fellowship/mod.rs | 8 ++- .../collectives-westend/src/lib.rs | 2 +- .../parachains/runtimes/constants/Cargo.toml | 4 +- .../contracts/contracts-rococo/Cargo.toml | 4 +- .../contracts-rococo/src/contracts.rs | 2 +- .../contracts/contracts-rococo/src/lib.rs | 2 +- .../contracts-rococo/src/xcm_config.rs | 2 +- .../coretime/coretime-rococo/Cargo.toml | 4 +- .../coretime/coretime-rococo/src/lib.rs | 2 +- .../coretime/coretime-westend/Cargo.toml | 4 +- .../coretime/coretime-westend/src/lib.rs | 2 +- .../glutton/glutton-westend/Cargo.toml | 4 +- .../runtimes/people/people-rococo/Cargo.toml | 4 +- .../runtimes/people/people-rococo/src/lib.rs | 2 +- .../runtimes/people/people-westend/Cargo.toml | 4 +- .../runtimes/people/people-westend/src/lib.rs | 2 +- .../runtimes/testing/penpal/Cargo.toml | 4 +- .../runtimes/testing/penpal/src/xcm_config.rs | 2 +- .../testing/rococo-parachain/Cargo.toml | 4 +- cumulus/polkadot-parachain/Cargo.toml | 2 +- .../src/chain_spec/asset_hubs.rs | 8 +-- .../src/chain_spec/contracts.rs | 2 +- 62 files changed, 109 insertions(+), 111 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 40acc0163eb8f..c3adb211d3f54 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -813,7 +813,7 @@ dependencies = [ "parachains-common", "rococo-emulated-chain", "sp-core", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -837,7 +837,7 @@ dependencies = [ "sp-runtime", "staging-xcm", "staging-xcm-executor", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -917,7 +917,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -930,7 +930,7 @@ dependencies = [ "frame-support", "parachains-common", "sp-core", - "testnet-system-parachains-constants", + "testnet-parachains-constants", "westend-emulated-chain", ] @@ -957,7 +957,7 @@ dependencies = [ "sp-runtime", "staging-xcm", "staging-xcm-executor", - "testnet-system-parachains-constants", + "testnet-parachains-constants", "westend-runtime", "westend-system-emulated-network", ] @@ -1034,7 +1034,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnet-system-parachains-constants", + "testnet-parachains-constants", "westend-runtime-constants", ] @@ -1928,7 +1928,7 @@ dependencies = [ "frame-support", "parachains-common", "sp-core", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -1963,7 +1963,7 @@ dependencies = [ "sp-runtime", "staging-xcm", "staging-xcm-executor", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -2060,7 +2060,7 @@ dependencies = [ "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -2111,7 +2111,7 @@ dependencies = [ "frame-support", "parachains-common", "sp-core", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -2216,7 +2216,7 @@ dependencies = [ "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "testnet-system-parachains-constants", + "testnet-parachains-constants", "westend-runtime-constants", ] @@ -2705,7 +2705,7 @@ dependencies = [ "frame-support", "parachains-common", "sp-core", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -2777,7 +2777,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnet-system-parachains-constants", + "testnet-parachains-constants", "westend-runtime-constants", ] @@ -3021,7 +3021,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -3116,7 +3116,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -3178,7 +3178,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnet-system-parachains-constants", + "testnet-parachains-constants", "westend-runtime-constants", ] @@ -6147,7 +6147,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -11608,7 +11608,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -11621,7 +11621,7 @@ dependencies = [ "parachains-common", "people-rococo-runtime", "sp-core", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -11706,7 +11706,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -11719,7 +11719,7 @@ dependencies = [ "parachains-common", "people-westend-runtime", "sp-core", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -11803,7 +11803,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnet-system-parachains-constants", + "testnet-parachains-constants", "westend-runtime-constants", ] @@ -13022,7 +13022,7 @@ dependencies = [ "substrate-prometheus-endpoint", "substrate-state-trie-migration-rpc", "tempfile", - "testnet-system-parachains-constants", + "testnet-parachains-constants", "tokio", "wait-timeout", ] @@ -14783,7 +14783,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnet-system-parachains-constants", + "testnet-parachains-constants", ] [[package]] @@ -19990,7 +19990,7 @@ dependencies = [ ] [[package]] -name = "testnet-system-parachains-constants" +name = "testnet-parachains-constants" version = "1.0.0" dependencies = [ "frame-support", diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml index 3a7274e5da749..be64482ba86d3 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml @@ -22,4 +22,4 @@ cumulus-primitives-core = { path = "../../../../../../../primitives/core", defau emulated-integration-tests-common = { path = "../../../../common", default-features = false } asset-hub-rococo-runtime = { path = "../../../../../../runtimes/assets/asset-hub-rococo" } rococo-emulated-chain = { path = "../../../relays/rococo" } -testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] } \ No newline at end of file +testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] } \ No newline at end of file diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/src/genesis.rs index 98a2db10bbe90..80db56444696a 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/src/genesis.rs @@ -23,7 +23,7 @@ use emulated_integration_tests_common::{ use parachains_common::Balance; pub const PARA_ID: u32 = 1000; -pub const ED: Balance = testnet_system_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = asset_hub_rococo_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml index 97add5706f385..b21b7366c79f9 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml @@ -22,4 +22,4 @@ cumulus-primitives-core = { path = "../../../../../../../primitives/core", defau emulated-integration-tests-common = { path = "../../../../common", default-features = false } asset-hub-westend-runtime = { path = "../../../../../../runtimes/assets/asset-hub-westend" } westend-emulated-chain = { path = "../../../relays/westend" } -testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file +testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/src/genesis.rs index b049a18b4b785..b2e4645ee0768 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/src/genesis.rs @@ -23,7 +23,7 @@ use emulated_integration_tests_common::{ use parachains_common::Balance; pub const PARA_ID: u32 = 1000; -pub const ED: Balance = testnet_system_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = asset_hub_westend_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml index cbf39aeebfc74..51a75ea37423a 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml @@ -21,4 +21,4 @@ parachains-common = { path = "../../../../../../../parachains/common" } emulated-integration-tests-common = { path = "../../../../common", default-features = false } bridge-hub-rococo-runtime = { path = "../../../../../../runtimes/bridge-hubs/bridge-hub-rococo" } bridge-hub-common = { path = "../../../../../../runtimes/bridge-hubs/common", default-features = false } -testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] } \ No newline at end of file +testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] } \ No newline at end of file diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/src/genesis.rs index 0d7a53a72f317..12778215b1320 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/src/genesis.rs @@ -24,7 +24,7 @@ use parachains_common::Balance; pub const ASSETHUB_PARA_ID: u32 = 1000; pub const PARA_ID: u32 = 1013; -pub const ED: Balance = testnet_system_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = bridge_hub_rococo_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml index cd3e60c116ec2..cb8a1eb9b0d02 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml @@ -21,4 +21,4 @@ parachains-common = { path = "../../../../../../../parachains/common" } emulated-integration-tests-common = { path = "../../../../common", default-features = false } bridge-hub-westend-runtime = { path = "../../../../../../runtimes/bridge-hubs/bridge-hub-westend" } bridge-hub-common = { path = "../../../../../../runtimes/bridge-hubs/common", default-features = false } -testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file +testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/src/genesis.rs index 686d2d69f5464..4be68e510f4d2 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/src/genesis.rs @@ -23,7 +23,7 @@ use emulated_integration_tests_common::{ use parachains_common::Balance; pub const PARA_ID: u32 = 1002; -pub const ED: Balance = testnet_system_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = bridge_hub_westend_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml index aef1b5b3dc888..d3092a96f6623 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml @@ -21,4 +21,4 @@ parachains-common = { path = "../../../../../../../parachains/common" } cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false } emulated-integration-tests-common = { path = "../../../../common", default-features = false } collectives-westend-runtime = { path = "../../../../../../runtimes/collectives/collectives-westend" } -testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file +testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/src/genesis.rs index 4528c674709ce..6a28b1a9dddb8 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/src/genesis.rs @@ -23,7 +23,7 @@ use emulated_integration_tests_common::{ use parachains_common::Balance; pub const PARA_ID: u32 = 1001; -pub const ED: Balance = testnet_system_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = collectives_westend_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/Cargo.toml index 7ab2f60eb0907..65a358d0ef2f6 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/Cargo.toml @@ -18,4 +18,4 @@ parachains-common = { path = "../../../../../../../parachains/common" } cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false } emulated-integration-tests-common = { path = "../../../../common", default-features = false } people-rococo-runtime = { path = "../../../../../../runtimes/people/people-rococo" } -testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] } +testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] } diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/src/genesis.rs index da0ba7797f443..b14009933029b 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/src/genesis.rs @@ -22,7 +22,7 @@ use emulated_integration_tests_common::{build_genesis_storage, collators, SAFE_X use parachains_common::Balance; pub const PARA_ID: u32 = 1004; -pub const ED: Balance = testnet_system_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = people_rococo_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml index be4447d106c55..22a4b09ca3d4f 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml @@ -18,4 +18,4 @@ parachains-common = { path = "../../../../../../../parachains/common" } cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false } emulated-integration-tests-common = { path = "../../../../common", default-features = false } people-westend-runtime = { path = "../../../../../../runtimes/people/people-westend" } -testnet-system-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file +testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/src/genesis.rs index 76a9942c1ee01..d385fbebc821c 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/src/genesis.rs @@ -22,7 +22,7 @@ use emulated_integration_tests_common::{build_genesis_storage, collators, SAFE_X use parachains_common::Balance; pub const PARA_ID: u32 = 1004; -pub const ED: Balance = testnet_system_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT; +pub const ED: Balance = testnet_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT; pub fn genesis() -> Storage { let genesis_config = people_westend_runtime::RuntimeGenesisConfig { diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml index 460dfa8bfb97c..99e9db6992d69 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml @@ -31,7 +31,7 @@ rococo-runtime = { path = "../../../../../../../polkadot/runtime/rococo" } # Cumulus asset-test-utils = { path = "../../../../../runtimes/assets/test-utils" } parachains-common = { path = "../../../../../../parachains/common" } -testnet-system-parachains-constants = { path = "../../../../../runtimes/constants", features = ["rococo"] } +testnet-parachains-constants = { path = "../../../../../runtimes/constants", features = ["rococo"] } asset-hub-rococo-runtime = { path = "../../../../../runtimes/assets/asset-hub-rococo" } emulated-integration-tests-common = { path = "../../../common", default-features = false } rococo-system-emulated-network = { path = "../../../networks/rococo-system" } diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/mod.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/mod.rs index c5c5aa0781793..21bed234304e2 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/mod.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/mod.rs @@ -24,5 +24,5 @@ emulated_integration_tests_common::include_penpal_create_foreign_asset_on_asset_ PenpalA, AssetHubRococo, ROCOCO_ED, - testnet_system_parachains_constants::rococo::fee::WeightToFee + testnet_parachains_constants::rococo::fee::WeightToFee ); diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml index fdfa419d6233b..0c920730d0fe6 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml @@ -32,7 +32,7 @@ westend-runtime = { path = "../../../../../../../polkadot/runtime/westend" } # Cumulus parachains-common = { path = "../../../../../../parachains/common" } -testnet-system-parachains-constants = { path = "../../../../../runtimes/constants", features = ["westend"] } +testnet-parachains-constants = { path = "../../../../../runtimes/constants", features = ["westend"] } asset-hub-westend-runtime = { path = "../../../../../runtimes/assets/asset-hub-westend" } asset-test-utils = { path = "../../../../../runtimes/assets/test-utils" } cumulus-pallet-xcmp-queue = { default-features = false, path = "../../../../../../pallets/xcmp-queue" } diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs index e0db844a97d51..a56cde8f2a2cb 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs @@ -26,5 +26,5 @@ emulated_integration_tests_common::include_penpal_create_foreign_asset_on_asset_ PenpalB, AssetHubWestend, WESTEND_ED, - testnet_system_parachains_constants::westend::fee::WeightToFee + testnet_parachains_constants::westend::fee::WeightToFee ); diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml index c88c247bd00d0..ddffe7686a2f1 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml @@ -35,7 +35,7 @@ bp-messages = { path = "../../../../../../../bridges/primitives/messages", defau # Cumulus parachains-common = { path = "../../../../../../parachains/common" } -testnet-system-parachains-constants = { path = "../../../../../runtimes/constants", features = ["rococo"] } +testnet-parachains-constants = { path = "../../../../../runtimes/constants", features = ["rococo"] } cumulus-pallet-xcmp-queue = { path = "../../../../../../pallets/xcmp-queue", default-features = false } bridge-hub-rococo-runtime = { path = "../../../../../../parachains/runtimes/bridge-hubs/bridge-hub-rococo", default-features = false } emulated-integration-tests-common = { path = "../../../common", default-features = false } diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs index 59455554285d0..5e1a2af660b0c 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs @@ -30,7 +30,7 @@ use snowbridge_pallet_system; use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; use sp_core::H256; use sp_runtime::{ArithmeticError::Underflow, DispatchError::Arithmetic}; -use testnet_system_parachains_constants::rococo::snowbridge::EthereumNetwork; +use testnet_parachains_constants::rococo::snowbridge::EthereumNetwork; const INITIAL_FUND: u128 = 5_000_000_000 * ROCOCO_ED; const CHAIN_ID: u64 = 11155111; diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml index 1deaf526549d1..cb6445a6316ab 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml @@ -81,7 +81,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } +testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } assets-common = { path = "../common", default-features = false } # Bridges @@ -245,7 +245,7 @@ std = [ "sp-version/std", "sp-weights/std", "substrate-wasm-builder", - "testnet-system-parachains-constants/std", + "testnet-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index fa6f9c40b2a12..b3d403fd33fd9 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -43,7 +43,7 @@ use sp_runtime::{ transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, Permill, }; -use testnet_system_parachains_constants::rococo::snowbridge::EthereumNetwork; +use testnet_parachains_constants::rococo::snowbridge::EthereumNetwork; use sp_std::prelude::*; #[cfg(feature = "std")] @@ -79,7 +79,7 @@ use parachains_common::{ NORMAL_DISPATCH_RATIO, }; use sp_runtime::{Perbill, RuntimeDebug}; -use testnet_system_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; +use testnet_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; use xcm_config::{ ForeignAssetsConvertedConcreteId, ForeignCreatorsSovereignAccountOf, GovernanceLocation, PoolAssetsConvertedConcreteId, TokenLocation, TokenLocationV3, @@ -1723,7 +1723,7 @@ mod tests { use crate::{CENTS, MILLICENTS}; use sp_runtime::traits::Zero; use sp_weights::WeightToFee; - use testnet_system_parachains_constants::rococo::fee; + use testnet_parachains_constants::rococo::fee; /// We can fit at least 1000 transfers in a block. #[test] diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs index 1a12daae48d0f..08ed6b92afe05 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs @@ -45,7 +45,7 @@ use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_common::xcm_sender::ExponentialPrice; use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; -use testnet_system_parachains_constants::rococo::snowbridge::EthereumNetwork; +use testnet_parachains_constants::rococo::snowbridge::EthereumNetwork; use xcm::latest::prelude::*; #[allow(deprecated)] use xcm_builder::CurrencyAdapter; @@ -850,7 +850,7 @@ pub mod bridging { 1, [ Parachain(SiblingBridgeHubParaId::get()), - PalletInstance(testnet_system_parachains_constants::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX) + PalletInstance(testnet_parachains_constants::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX) ] ); diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/tests/tests.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/tests/tests.rs index 168f09ee4269b..b70758eb653dd 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/tests/tests.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/tests/tests.rs @@ -50,7 +50,7 @@ use parachains_common::{AccountId, AssetIdForTrustBackedAssets, AuraId, Balance} use sp_consensus_aura::SlotDuration; use sp_runtime::traits::MaybeEquivalence; use std::convert::Into; -use testnet_system_parachains_constants::rococo::{ +use testnet_parachains_constants::rococo::{ consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, currency::UNITS, fee::WeightToFee, }; use xcm::latest::prelude::{Assets as XcmAssets, *}; diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml index 1a859c596912c..62db0b454db0b 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml @@ -78,7 +78,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } +testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } assets-common = { path = "../common", default-features = false } # Bridges @@ -227,7 +227,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", - "testnet-system-parachains-constants/std", + "testnet-parachains-constants/std", "westend-runtime-constants/std", "xcm-builder/std", "xcm-executor/std", diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 63b9be0ca3f22..baeb360ce224e 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -72,7 +72,7 @@ use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; -use testnet_system_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee}; +use testnet_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee}; use xcm_config::{ ForeignAssetsConvertedConcreteId, PoolAssetsConvertedConcreteId, TrustBackedAssetsConvertedConcreteId, TrustBackedAssetsPalletLocationV3, WestendLocation, diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/tests/tests.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/tests/tests.rs index c9f466a2c182f..7be21c99b986b 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/tests/tests.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/tests/tests.rs @@ -51,7 +51,7 @@ use parachains_common::{AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, use sp_consensus_aura::SlotDuration; use sp_runtime::traits::MaybeEquivalence; use std::convert::Into; -use testnet_system_parachains_constants::westend::{ +use testnet_parachains_constants::westend::{ consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, currency::UNITS, fee::WeightToFee, }; use xcm::latest::prelude::{Assets as XcmAssets, *}; diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml index de5d1b4d63ce2..3e2dadd11ca06 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml @@ -81,7 +81,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } +testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } # Bridges bp-asset-hub-rococo = { path = "../../../../../bridges/primitives/chain-asset-hub-rococo", default-features = false } @@ -213,7 +213,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", - "testnet-system-parachains-constants/std", + "testnet-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs index 81412fff5eb63..6dbf96edc2ab0 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs @@ -231,7 +231,7 @@ mod tests { assert_complete_bridge_types, integrity::check_message_lane_weights, }; use parachains_common::Balance; - use testnet_system_parachains_constants::rococo; + use testnet_parachains_constants::rococo; /// Every additional message in the message delivery transaction boosts its priority. /// So the priority of transaction with `N+1` messages is larger than priority of diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs index 19c5a8f3be2da..01a762d4b99f9 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs @@ -16,7 +16,7 @@ use crate::{xcm_config::UniversalLocation, Runtime}; use snowbridge_router_primitives::outbound::EthereumBlobExporter; -use testnet_system_parachains_constants::rococo::snowbridge::EthereumNetwork; +use testnet_parachains_constants::rococo::snowbridge::EthereumNetwork; /// Exports message to the Ethereum Gateway contract. pub type SnowbridgeExporter = EthereumBlobExporter< diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs index cc77f8c7bd9de..3a626e2cba7c1 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs @@ -253,7 +253,7 @@ mod tests { }, }; use parachains_common::Balance; - use testnet_system_parachains_constants::rococo; + use testnet_parachains_constants::rococo; /// Every additional message in the message delivery transaction boosts its priority. /// So the priority of transaction with `N+1` messages is larger than priority of diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index ef9fa27c9c109..f0eaf7168e19d 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -96,7 +96,7 @@ use parachains_common::{ impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; -use testnet_system_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; +use testnet_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; use polkadot_runtime_common::prod_or_fast; @@ -496,7 +496,7 @@ parameter_types! { parameter_types! { pub const CreateAssetCall: [u8;2] = [53, 0]; pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; - pub const InboundQueuePalletInstance: u8 = testnet_system_parachains_constants::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX; + pub const InboundQueuePalletInstance: u8 = testnet_parachains_constants::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX; pub Parameters: PricingParameters = PricingParameters { exchange_rate: FixedU128::from_rational(1, 400), fee_per_gas: gwei(20), diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 915a2f30417cf..b7d170707cfd4 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -52,7 +52,7 @@ use snowbridge_runtime_common::XcmExportFeeToSibling; use sp_core::Get; use sp_runtime::traits::AccountIdConversion; use sp_std::marker::PhantomData; -use testnet_system_parachains_constants::rococo::snowbridge::EthereumNetwork; +use testnet_parachains_constants::rococo::snowbridge::EthereumNetwork; use xcm::latest::prelude::*; #[allow(deprecated)] use xcm_builder::{ diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs index 63b524d9e9107..a68d0e6a10692 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs @@ -36,7 +36,7 @@ use sp_runtime::{ generic::{Era, SignedPayload}, AccountId32, }; -use testnet_system_parachains_constants::rococo::{ +use testnet_parachains_constants::rococo::{ consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, }; use xcm::latest::prelude::*; diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml index 5f7623b156b08..e6d3db1ba49a2 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml @@ -73,7 +73,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } +testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } # Bridges bp-asset-hub-rococo = { path = "../../../../../bridges/primitives/chain-asset-hub-rococo", default-features = false } @@ -174,7 +174,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", - "testnet-system-parachains-constants/std", + "testnet-parachains-constants/std", "westend-runtime-constants/std", "xcm-builder/std", "xcm-executor/std", diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs index f5dba29904e4c..4567494f82506 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs @@ -288,7 +288,7 @@ mod tests { }, }; use parachains_common::Balance; - use testnet_system_parachains_constants::westend; + use testnet_parachains_constants::westend; /// Every additional message in the message delivery transaction boosts its priority. /// So the priority of transaction with `N+1` messages is larger than priority of diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index 0d5ba625d420f..792b5b63391f2 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -85,7 +85,7 @@ use parachains_common::{ impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; -use testnet_system_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee}; +use testnet_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee}; /// The address format for describing accounts. pub type Address = MultiAddress; diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs index d8face597e5f7..22ade91334ca1 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs @@ -40,7 +40,7 @@ use sp_runtime::{ generic::{Era, SignedPayload}, AccountId32, }; -use testnet_system_parachains_constants::westend::{ +use testnet_parachains_constants::westend::{ consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, }; use xcm::latest::prelude::*; diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml b/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml index 619b830a6f0c6..21f4d2a1970c4 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml @@ -80,7 +80,7 @@ pallet-collator-selection = { path = "../../../../pallets/collator-selection", d pallet-collective-content = { path = "../../../pallets/collective-content", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } +testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } [build-dependencies] substrate-wasm-builder = { path = "../../../../../substrate/utils/wasm-builder", optional = true } @@ -223,7 +223,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", - "testnet-system-parachains-constants/std", + "testnet-parachains-constants/std", "westend-runtime-constants/std", "xcm-builder/std", "xcm-executor/std", diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/fellowship/mod.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/fellowship/mod.rs index b17bc0aad8110..715c9a9beda07 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/fellowship/mod.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/fellowship/mod.rs @@ -45,15 +45,13 @@ use polkadot_runtime_common::impls::{ use sp_arithmetic::Permill; use sp_core::{ConstU128, ConstU32}; use sp_runtime::traits::{ConstU16, ConvertToValue, IdentityLookup, Replace, TakeFirst}; -use testnet_system_parachains_constants::westend::{account, currency::GRAND}; +use testnet_parachains_constants::westend::{account, currency::GRAND}; use westend_runtime_constants::time::HOURS; use xcm::prelude::*; use xcm_builder::{AliasesIntoAccountId32, PayOverXcm}; #[cfg(feature = "runtime-benchmarks")] use crate::impls::benchmarks::{OpenHrmpChannel, PayWithEnsure}; -#[cfg(feature = "runtime-benchmarks")] -use parachains_common::westend::currency::DOLLARS; /// The Fellowship members' ranks. pub mod ranks { @@ -256,9 +254,9 @@ parameter_types! { // Benchmark bond. Needed to make `propose_spend` work. pub const TenPercent: Permill = Permill::from_percent(10); // Benchmark minimum. Needed to make `propose_spend` work. - pub const BenchmarkProposalBondMinimum: Balance = 1 * DOLLARS; + pub const BenchmarkProposalBondMinimum: Balance = 1 * testnet_parachains_constants::westend::currency::DOLLARS; // Benchmark maximum. Needed to make `propose_spend` work. - pub const BenchmarkProposalBondMaximum: Balance = 10 * DOLLARS; + pub const BenchmarkProposalBondMaximum: Balance = 10 * testnet_parachains_constants::westend::currency::DOLLARS; } /// [`PayOverXcm`] setup to pay the Fellowship Treasury. diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs index 0a7764f494c1c..52a5e79de8433 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs @@ -88,7 +88,7 @@ use parachains_common::{ SLOT_DURATION, }; use sp_runtime::RuntimeDebug; -use testnet_system_parachains_constants::westend::{ +use testnet_parachains_constants::westend::{ account::*, consensus::*, currency::*, fee::WeightToFee, }; use xcm_config::{ diff --git a/cumulus/parachains/runtimes/constants/Cargo.toml b/cumulus/parachains/runtimes/constants/Cargo.toml index 093949b15f406..f1c0a6dd4e2e3 100644 --- a/cumulus/parachains/runtimes/constants/Cargo.toml +++ b/cumulus/parachains/runtimes/constants/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "testnet-system-parachains-constants" +name = "testnet-parachains-constants" version = "1.0.0" authors.workspace = true edition.workspace = true -description = "Common constants for Testnet System Parachains runtimes" +description = "Common constants for Testnet Parachains runtimes" license = "Apache-2.0" [lints] diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml b/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml index 74d7dde50c865..b8da276567e03 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml @@ -76,7 +76,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } +testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } [features] default = ["std"] @@ -132,7 +132,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", - "testnet-system-parachains-constants/std", + "testnet-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs index 2e9df3b000b35..7b89f2df80773 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs @@ -26,7 +26,7 @@ use pallet_contracts::{ }; use sp_runtime::Perbill; -use testnet_system_parachains_constants::rococo::currency::deposit; +use testnet_parachains_constants::rococo::currency::deposit; // Prints debug output of the `contracts` pallet to stdout if the node is // started with `-lruntime::contracts=debug`. diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs index a70e1360ff577..eb428487b6296 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs @@ -62,7 +62,7 @@ use parachains_common::{ SLOT_DURATION, }; pub use parachains_common::{AuraId, Balance}; -use testnet_system_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; +use testnet_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; use xcm_config::CollatorSelectionUpdateOrigin; #[cfg(any(feature = "std", test))] diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index bae10928acb90..7919faf400f46 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -35,7 +35,7 @@ use parachains_common::{ use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_common::xcm_sender::ExponentialPrice; use sp_runtime::traits::AccountIdConversion; -use testnet_system_parachains_constants::rococo::currency::CENTS; +use testnet_parachains_constants::rococo::currency::CENTS; use xcm::latest::prelude::*; #[allow(deprecated)] use xcm_builder::CurrencyAdapter; diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml b/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml index 71792c988c47b..2c28f2296512e 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml @@ -75,7 +75,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } +testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } [features] default = ["std"] @@ -133,7 +133,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", - "testnet-system-parachains-constants/std", + "testnet-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs index 4b91a7734acd2..5a5aaea7387d9 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs @@ -70,7 +70,7 @@ use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; -use testnet_system_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; +use testnet_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::*; use xcm_config::{ diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml b/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml index 32bc3daa8dc10..f2e1757dd3ee6 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml @@ -74,7 +74,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } +testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } [features] default = ["std"] @@ -130,7 +130,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", - "testnet-system-parachains-constants/std", + "testnet-parachains-constants/std", "westend-runtime-constants/std", "xcm-builder/std", "xcm-executor/std", diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs index 9c6d6a6646e5c..d0277fcbfaea4 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs @@ -61,7 +61,7 @@ use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; -use testnet_system_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee}; +use testnet_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::*; use xcm_config::{ diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml b/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml index 8b61439d9cc55..23c5ce1c7f80d 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml @@ -54,7 +54,7 @@ cumulus-primitives-core = { path = "../../../../primitives/core", default-featur cumulus-primitives-timestamp = { path = "../../../../primitives/timestamp", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } +testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } [build-dependencies] substrate-wasm-builder = { path = "../../../../../substrate/utils/wasm-builder" } @@ -113,7 +113,7 @@ std = [ "sp-storage/std", "sp-transaction-pool/std", "sp-version/std", - "testnet-system-parachains-constants/std", + "testnet-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml b/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml index 25f8a6abda088..efb214fd491c6 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml @@ -71,7 +71,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } +testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } [features] default = ["std"] @@ -128,7 +128,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", - "testnet-system-parachains-constants/std", + "testnet-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs index 09a66cc6cdf78..37ab6af95686e 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs @@ -63,7 +63,7 @@ use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; -use testnet_system_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; +use testnet_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::BodyId; use xcm_config::{ diff --git a/cumulus/parachains/runtimes/people/people-westend/Cargo.toml b/cumulus/parachains/runtimes/people/people-westend/Cargo.toml index 33f0f730b0d17..b5d1d6d43d7f9 100644 --- a/cumulus/parachains/runtimes/people/people-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/people/people-westend/Cargo.toml @@ -71,7 +71,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } +testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["westend"] } [features] default = ["std"] @@ -127,7 +127,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", - "testnet-system-parachains-constants/std", + "testnet-parachains-constants/std", "westend-runtime-constants/std", "xcm-builder/std", "xcm-executor/std", diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index 871b303c3ba9e..7a39778150503 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -63,7 +63,7 @@ use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; -use testnet_system_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee}; +use testnet_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::BodyId; use xcm_config::{ diff --git a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml index 8ba5cf91d6609..dab687c527786 100644 --- a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml @@ -77,7 +77,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } +testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } assets-common = { path = "../../assets/common", default-features = false } [features] @@ -133,7 +133,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", - "testnet-system-parachains-constants/std", + "testnet-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs index a74d1cc0923fb..176c12e0df7a0 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -43,7 +43,7 @@ use pallet_xcm::XcmPassthrough; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_common::impls::ToAuthor; use sp_runtime::traits::Zero; -use testnet_system_parachains_constants::rococo::snowbridge::EthereumNetwork; +use testnet_parachains_constants::rococo::snowbridge::EthereumNetwork; use xcm::latest::prelude::*; #[allow(deprecated)] use xcm_builder::{ diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml index f568e3926baa4..42169e8949f55 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml @@ -58,7 +58,7 @@ cumulus-primitives-aura = { path = "../../../../primitives/aura", default-featur cumulus-primitives-core = { path = "../../../../primitives/core", default-features = false } cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false } parachains-common = { path = "../../../common", default-features = false } -testnet-system-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } +testnet-parachains-constants = { path = "../../constants", default-features = false, features = ["rococo"] } parachain-info = { package = "staging-parachain-info", path = "../../../pallets/parachain-info", default-features = false } [build-dependencies] @@ -108,7 +108,7 @@ std = [ "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", - "testnet-system-parachains-constants/std", + "testnet-parachains-constants/std", "xcm-builder/std", "xcm-executor/std", "xcm/std", diff --git a/cumulus/polkadot-parachain/Cargo.toml b/cumulus/polkadot-parachain/Cargo.toml index 2fd1e32fa3342..cc0bd47cc7733 100644 --- a/cumulus/polkadot-parachain/Cargo.toml +++ b/cumulus/polkadot-parachain/Cargo.toml @@ -42,7 +42,7 @@ jsonrpsee = { version = "0.20.3", features = ["server"] } people-rococo-runtime = { path = "../parachains/runtimes/people/people-rococo" } people-westend-runtime = { path = "../parachains/runtimes/people/people-westend" } parachains-common = { path = "../parachains/common" } -testnet-system-parachains-constants = { path = "../parachains/runtimes/constants", default-features = false, features = ["rococo", "westend"] } +testnet-parachains-constants = { path = "../parachains/runtimes/constants", default-features = false, features = ["rococo", "westend"] } # Substrate frame-benchmarking = { path = "../../substrate/frame/benchmarking" } diff --git a/cumulus/polkadot-parachain/src/chain_spec/asset_hubs.rs b/cumulus/polkadot-parachain/src/chain_spec/asset_hubs.rs index 63712a9e46baa..45920cdb6146b 100644 --- a/cumulus/polkadot-parachain/src/chain_spec/asset_hubs.rs +++ b/cumulus/polkadot-parachain/src/chain_spec/asset_hubs.rs @@ -66,7 +66,7 @@ pub fn asset_hub_westend_development_config() -> GenericChainSpec { get_account_id_from_seed::("Alice//stash"), get_account_id_from_seed::("Bob//stash"), ], - testnet_system_parachains_constants::westend::currency::UNITS * 1_000_000, + testnet_parachains_constants::westend::currency::UNITS * 1_000_000, 1000.into(), )) .with_properties(properties) @@ -112,7 +112,7 @@ pub fn asset_hub_westend_local_config() -> GenericChainSpec { get_account_id_from_seed::("Eve//stash"), get_account_id_from_seed::("Ferdie//stash"), ], - testnet_system_parachains_constants::westend::currency::UNITS * 1_000_000, + testnet_parachains_constants::westend::currency::UNITS * 1_000_000, 1000.into(), )) .with_properties(properties) @@ -241,7 +241,7 @@ fn asset_hub_rococo_like_development_config( get_account_id_from_seed::("Alice//stash"), get_account_id_from_seed::("Bob//stash"), ], - testnet_system_parachains_constants::rococo::currency::UNITS * 1_000_000, + testnet_parachains_constants::rococo::currency::UNITS * 1_000_000, para_id.into(), )) .with_properties(properties) @@ -300,7 +300,7 @@ fn asset_hub_rococo_like_local_config( get_account_id_from_seed::("Eve//stash"), get_account_id_from_seed::("Ferdie//stash"), ], - testnet_system_parachains_constants::rococo::currency::UNITS * 1_000_000, + testnet_parachains_constants::rococo::currency::UNITS * 1_000_000, para_id.into(), )) .with_properties(properties) diff --git a/cumulus/polkadot-parachain/src/chain_spec/contracts.rs b/cumulus/polkadot-parachain/src/chain_spec/contracts.rs index 9f48decbb8347..4e89b81d1be40 100644 --- a/cumulus/polkadot-parachain/src/chain_spec/contracts.rs +++ b/cumulus/polkadot-parachain/src/chain_spec/contracts.rs @@ -29,7 +29,7 @@ const CONTRACTS_PARACHAIN_ID: u32 = 1002; /// The existential deposit is determined by the runtime "contracts-rococo". const CONTRACTS_ROCOCO_ED: contracts_rococo_runtime::Balance = - testnet_system_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT; + testnet_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT; pub fn contracts_rococo_development_config() -> GenericChainSpec { let mut properties = sc_chain_spec::Properties::new(); From aca90d3c7aeca3831b5c133bbbcd39e58913ba4d Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 30 Jan 2024 16:27:03 +0100 Subject: [PATCH 07/11] Cargo.tomls with taplo --- .../chains/parachains/assets/asset-hub-rococo/Cargo.toml | 2 +- .../chains/parachains/assets/asset-hub-westend/Cargo.toml | 2 +- .../chains/parachains/bridges/bridge-hub-rococo/Cargo.toml | 2 +- .../chains/parachains/bridges/bridge-hub-westend/Cargo.toml | 2 +- .../parachains/collectives/collectives-westend/Cargo.toml | 2 +- .../emulated/chains/parachains/people/people-westend/Cargo.toml | 2 +- cumulus/parachains/runtimes/constants/Cargo.toml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml index be64482ba86d3..f4f8b3603ba61 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml @@ -22,4 +22,4 @@ cumulus-primitives-core = { path = "../../../../../../../primitives/core", defau emulated-integration-tests-common = { path = "../../../../common", default-features = false } asset-hub-rococo-runtime = { path = "../../../../../../runtimes/assets/asset-hub-rococo" } rococo-emulated-chain = { path = "../../../relays/rococo" } -testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] } \ No newline at end of file +testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] } diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml index b21b7366c79f9..d4764f63bf64d 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml @@ -22,4 +22,4 @@ cumulus-primitives-core = { path = "../../../../../../../primitives/core", defau emulated-integration-tests-common = { path = "../../../../common", default-features = false } asset-hub-westend-runtime = { path = "../../../../../../runtimes/assets/asset-hub-westend" } westend-emulated-chain = { path = "../../../relays/westend" } -testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file +testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml index 51a75ea37423a..322d8b44e6ea6 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml @@ -21,4 +21,4 @@ parachains-common = { path = "../../../../../../../parachains/common" } emulated-integration-tests-common = { path = "../../../../common", default-features = false } bridge-hub-rococo-runtime = { path = "../../../../../../runtimes/bridge-hubs/bridge-hub-rococo" } bridge-hub-common = { path = "../../../../../../runtimes/bridge-hubs/common", default-features = false } -testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] } \ No newline at end of file +testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] } diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml index cb8a1eb9b0d02..ec1386b7f6e2b 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml @@ -21,4 +21,4 @@ parachains-common = { path = "../../../../../../../parachains/common" } emulated-integration-tests-common = { path = "../../../../common", default-features = false } bridge-hub-westend-runtime = { path = "../../../../../../runtimes/bridge-hubs/bridge-hub-westend" } bridge-hub-common = { path = "../../../../../../runtimes/bridge-hubs/common", default-features = false } -testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file +testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml index d3092a96f6623..03f755b666afb 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml @@ -21,4 +21,4 @@ parachains-common = { path = "../../../../../../../parachains/common" } cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false } emulated-integration-tests-common = { path = "../../../../common", default-features = false } collectives-westend-runtime = { path = "../../../../../../runtimes/collectives/collectives-westend" } -testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file +testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml index 22a4b09ca3d4f..075698848bcf0 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml @@ -18,4 +18,4 @@ parachains-common = { path = "../../../../../../../parachains/common" } cumulus-primitives-core = { path = "../../../../../../../primitives/core", default-features = false } emulated-integration-tests-common = { path = "../../../../common", default-features = false } people-westend-runtime = { path = "../../../../../../runtimes/people/people-westend" } -testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } \ No newline at end of file +testnet-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] } diff --git a/cumulus/parachains/runtimes/constants/Cargo.toml b/cumulus/parachains/runtimes/constants/Cargo.toml index f1c0a6dd4e2e3..b9aea7ec48d66 100644 --- a/cumulus/parachains/runtimes/constants/Cargo.toml +++ b/cumulus/parachains/runtimes/constants/Cargo.toml @@ -26,7 +26,7 @@ westend-runtime-constants = { path = "../../../../polkadot/runtime/westend/const xcm = { package = "staging-xcm", path = "../../../../polkadot/xcm", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "frame-support/std", "polkadot-core-primitives/std", From 421fd96fc3f4d78bf443edf1e4bd9c6c37909ba3 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 30 Jan 2024 23:57:05 +0100 Subject: [PATCH 08/11] Licence header Co-authored-by: georgepisaltu --- .../parachains/runtimes/constants/src/lib.rs | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/cumulus/parachains/runtimes/constants/src/lib.rs b/cumulus/parachains/runtimes/constants/src/lib.rs index bb36bc0fd6828..40d799bac7bd3 100644 --- a/cumulus/parachains/runtimes/constants/src/lib.rs +++ b/cumulus/parachains/runtimes/constants/src/lib.rs @@ -1,18 +1,17 @@ // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// SPDX-License-Identifier: Apache-2.0 -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #![cfg_attr(not(feature = "std"), no_std)] From 406c5bf199a90838bb90dcd23d7bea89eb434ce9 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 31 Jan 2024 00:06:34 +0100 Subject: [PATCH 09/11] Changed imports --- .../runtimes/assets/asset-hub-rococo/src/xcm_config.rs | 6 ++++-- .../runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs | 7 ++++--- .../collectives/collectives-westend/src/fellowship/mod.rs | 6 ++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs index 08ed6b92afe05..693fd7c3fc78a 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs @@ -45,7 +45,9 @@ use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_common::xcm_sender::ExponentialPrice; use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; use sp_runtime::traits::{AccountIdConversion, ConvertInto}; -use testnet_parachains_constants::rococo::snowbridge::EthereumNetwork; +use testnet_parachains_constants::rococo::snowbridge::{ + EthereumNetwork, INBOUND_QUEUE_PALLET_INDEX, +}; use xcm::latest::prelude::*; #[allow(deprecated)] use xcm_builder::CurrencyAdapter; @@ -850,7 +852,7 @@ pub mod bridging { 1, [ Parachain(SiblingBridgeHubParaId::get()), - PalletInstance(testnet_parachains_constants::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX) + PalletInstance(INBOUND_QUEUE_PALLET_INDEX) ] ); diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index f0eaf7168e19d..e0204d1e75c94 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -96,7 +96,9 @@ use parachains_common::{ impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; -use testnet_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee}; +use testnet_parachains_constants::rococo::{ + consensus::*, currency::*, fee::WeightToFee, snowbridge::INBOUND_QUEUE_PALLET_INDEX, +}; use polkadot_runtime_common::prod_or_fast; @@ -496,7 +498,6 @@ parameter_types! { parameter_types! { pub const CreateAssetCall: [u8;2] = [53, 0]; pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT; - pub const InboundQueuePalletInstance: u8 = testnet_parachains_constants::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX; pub Parameters: PricingParameters = PricingParameters { exchange_rate: FixedU128::from_rational(1, 400), fee_per_gas: gwei(20), @@ -557,7 +558,7 @@ impl snowbridge_pallet_inbound_queue::Config for Runtime { type MessageConverter = MessageToXcm< CreateAssetCall, CreateAssetDeposit, - InboundQueuePalletInstance, + ConstU8, AccountId, Balance, >; diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/fellowship/mod.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/fellowship/mod.rs index ebe002e2cf723..8c2fa1427575c 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/fellowship/mod.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/fellowship/mod.rs @@ -52,6 +52,8 @@ use xcm_builder::{AliasesIntoAccountId32, PayOverXcm}; #[cfg(feature = "runtime-benchmarks")] use crate::impls::benchmarks::{OpenHrmpChannel, PayWithEnsure}; +#[cfg(feature = "runtime-benchmarks")] +use testnet_parachains_constants::westend::currency::DOLLARS; /// The Fellowship members' ranks. pub mod ranks { @@ -259,9 +261,9 @@ parameter_types! { // Benchmark bond. Needed to make `propose_spend` work. pub const TenPercent: Permill = Permill::from_percent(10); // Benchmark minimum. Needed to make `propose_spend` work. - pub const BenchmarkProposalBondMinimum: Balance = 1 * testnet_parachains_constants::westend::currency::DOLLARS; + pub const BenchmarkProposalBondMinimum: Balance = 1 * DOLLARS; // Benchmark maximum. Needed to make `propose_spend` work. - pub const BenchmarkProposalBondMaximum: Balance = 10 * testnet_parachains_constants::westend::currency::DOLLARS; + pub const BenchmarkProposalBondMaximum: Balance = 10 * DOLLARS; } /// [`PayOverXcm`] setup to pay the Fellowship Treasury. From 5fb9aace2d4a7fbe74b168832bb7c7c33d5449eb Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 31 Jan 2024 00:24:57 +0100 Subject: [PATCH 10/11] Nit --- bridges/snowbridge/parachain/runtime/test-common/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/snowbridge/parachain/runtime/test-common/src/lib.rs b/bridges/snowbridge/parachain/runtime/test-common/src/lib.rs index 50e727f886dfe..c9bbce98e575d 100644 --- a/bridges/snowbridge/parachain/runtime/test-common/src/lib.rs +++ b/bridges/snowbridge/parachain/runtime/test-common/src/lib.rs @@ -184,7 +184,7 @@ pub fn send_transfer_token_message_success( >::on_finalize(next_block_number); let included_head = >::finalize(); - let origin: ParaId = (assethub_parachain_id as u32).into(); + let origin: ParaId = assethub_parachain_id.into(); let channel_id: ChannelId = origin.into(); let nonce = snowbridge_pallet_outbound_queue::Nonce::::try_get(channel_id); From d9840fa22b891ca8e8d9f68800e0513b7a170276 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 31 Jan 2024 00:28:10 +0100 Subject: [PATCH 11/11] Revert nit --- bridges/snowbridge/parachain/runtime/test-common/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/snowbridge/parachain/runtime/test-common/src/lib.rs b/bridges/snowbridge/parachain/runtime/test-common/src/lib.rs index c9bbce98e575d..50e727f886dfe 100644 --- a/bridges/snowbridge/parachain/runtime/test-common/src/lib.rs +++ b/bridges/snowbridge/parachain/runtime/test-common/src/lib.rs @@ -184,7 +184,7 @@ pub fn send_transfer_token_message_success( >::on_finalize(next_block_number); let included_head = >::finalize(); - let origin: ParaId = assethub_parachain_id.into(); + let origin: ParaId = (assethub_parachain_id as u32).into(); let channel_id: ChannelId = origin.into(); let nonce = snowbridge_pallet_outbound_queue::Nonce::::try_get(channel_id);