mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 19:51:02 +00:00
[cumulus] parachains-common testnet constants cleaning (#3134)
The `parachains-common` contains a lots of constants and type definitions which are used for `polkadot-sdk`'s testnet runtimes and also for `polkadot-fellows`'s production [SP runtimes](https://github.com/polkadot-fellows/runtimes/tree/main/system-parachains/constants). This PR cleans `parachains-common` module to contain only common and generic functionality. Testnet-specific constants have been moved to the separate module dedicated just for testnets: `polkadot-sdk/cumulus/parachains/runtimes/constants/` Part of: https://github.com/paritytech/polkadot-sdk/issues/3054 --------- Co-authored-by: georgepisaltu <george.pisaltu@parity.io>
This commit is contained in:
Generated
+37
-4
@@ -813,6 +813,7 @@ dependencies = [
|
||||
"parachains-common",
|
||||
"rococo-emulated-chain",
|
||||
"sp-core",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -836,6 +837,7 @@ dependencies = [
|
||||
"sp-runtime",
|
||||
"staging-xcm",
|
||||
"staging-xcm-executor",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -915,6 +917,7 @@ dependencies = [
|
||||
"staging-xcm-builder",
|
||||
"staging-xcm-executor",
|
||||
"substrate-wasm-builder",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -927,6 +930,7 @@ dependencies = [
|
||||
"frame-support",
|
||||
"parachains-common",
|
||||
"sp-core",
|
||||
"testnet-parachains-constants",
|
||||
"westend-emulated-chain",
|
||||
]
|
||||
|
||||
@@ -953,6 +957,7 @@ dependencies = [
|
||||
"sp-runtime",
|
||||
"staging-xcm",
|
||||
"staging-xcm-executor",
|
||||
"testnet-parachains-constants",
|
||||
"westend-runtime",
|
||||
"westend-system-emulated-network",
|
||||
]
|
||||
@@ -1029,6 +1034,7 @@ dependencies = [
|
||||
"staging-xcm-builder",
|
||||
"staging-xcm-executor",
|
||||
"substrate-wasm-builder",
|
||||
"testnet-parachains-constants",
|
||||
"westend-runtime-constants",
|
||||
]
|
||||
|
||||
@@ -1922,6 +1928,7 @@ dependencies = [
|
||||
"frame-support",
|
||||
"parachains-common",
|
||||
"sp-core",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1956,6 +1963,7 @@ dependencies = [
|
||||
"sp-runtime",
|
||||
"staging-xcm",
|
||||
"staging-xcm-executor",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2052,6 +2060,7 @@ dependencies = [
|
||||
"staging-xcm-executor",
|
||||
"static_assertions",
|
||||
"substrate-wasm-builder",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2102,6 +2111,7 @@ dependencies = [
|
||||
"frame-support",
|
||||
"parachains-common",
|
||||
"sp-core",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2206,6 +2216,7 @@ dependencies = [
|
||||
"staging-xcm-executor",
|
||||
"static_assertions",
|
||||
"substrate-wasm-builder",
|
||||
"testnet-parachains-constants",
|
||||
"westend-runtime-constants",
|
||||
]
|
||||
|
||||
@@ -2694,6 +2705,7 @@ dependencies = [
|
||||
"frame-support",
|
||||
"parachains-common",
|
||||
"sp-core",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2765,6 +2777,7 @@ dependencies = [
|
||||
"staging-xcm-builder",
|
||||
"staging-xcm-executor",
|
||||
"substrate-wasm-builder",
|
||||
"testnet-parachains-constants",
|
||||
"westend-runtime-constants",
|
||||
]
|
||||
|
||||
@@ -3008,6 +3021,7 @@ dependencies = [
|
||||
"staging-xcm-builder",
|
||||
"staging-xcm-executor",
|
||||
"substrate-wasm-builder",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3102,6 +3116,7 @@ dependencies = [
|
||||
"staging-xcm-builder",
|
||||
"staging-xcm-executor",
|
||||
"substrate-wasm-builder",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3163,6 +3178,7 @@ dependencies = [
|
||||
"staging-xcm-builder",
|
||||
"staging-xcm-executor",
|
||||
"substrate-wasm-builder",
|
||||
"testnet-parachains-constants",
|
||||
"westend-runtime-constants",
|
||||
]
|
||||
|
||||
@@ -6131,6 +6147,7 @@ dependencies = [
|
||||
"staging-xcm-builder",
|
||||
"staging-xcm-executor",
|
||||
"substrate-wasm-builder",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -11283,11 +11300,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",
|
||||
@@ -11297,7 +11311,6 @@ dependencies = [
|
||||
"staging-xcm",
|
||||
"staging-xcm-executor",
|
||||
"substrate-wasm-builder",
|
||||
"westend-runtime-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -11596,6 +11609,7 @@ dependencies = [
|
||||
"staging-xcm-builder",
|
||||
"staging-xcm-executor",
|
||||
"substrate-wasm-builder",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -11608,6 +11622,7 @@ dependencies = [
|
||||
"parachains-common",
|
||||
"people-rococo-runtime",
|
||||
"sp-core",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -11692,6 +11707,7 @@ dependencies = [
|
||||
"staging-xcm-builder",
|
||||
"staging-xcm-executor",
|
||||
"substrate-wasm-builder",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -11704,6 +11720,7 @@ dependencies = [
|
||||
"parachains-common",
|
||||
"people-westend-runtime",
|
||||
"sp-core",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -11787,6 +11804,7 @@ dependencies = [
|
||||
"staging-xcm-builder",
|
||||
"staging-xcm-executor",
|
||||
"substrate-wasm-builder",
|
||||
"testnet-parachains-constants",
|
||||
"westend-runtime-constants",
|
||||
]
|
||||
|
||||
@@ -13005,6 +13023,7 @@ dependencies = [
|
||||
"substrate-prometheus-endpoint",
|
||||
"substrate-state-trie-migration-rpc",
|
||||
"tempfile",
|
||||
"testnet-parachains-constants",
|
||||
"tokio",
|
||||
"wait-timeout",
|
||||
]
|
||||
@@ -14765,6 +14784,7 @@ dependencies = [
|
||||
"staging-xcm-builder",
|
||||
"staging-xcm-executor",
|
||||
"substrate-wasm-builder",
|
||||
"testnet-parachains-constants",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -19970,6 +19990,19 @@ dependencies = [
|
||||
"sp-weights",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "testnet-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"
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
+2
-3
@@ -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-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] }
|
||||
|
||||
+1
-1
@@ -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_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = asset_hub_rococo_runtime::RuntimeGenesisConfig {
|
||||
|
||||
+2
-3
@@ -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-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] }
|
||||
|
||||
+1
-1
@@ -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_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = asset_hub_westend_runtime::RuntimeGenesisConfig {
|
||||
|
||||
+2
-3
@@ -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-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] }
|
||||
|
||||
+1
-1
@@ -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_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = bridge_hub_rococo_runtime::RuntimeGenesisConfig {
|
||||
|
||||
+2
-3
@@ -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-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] }
|
||||
|
||||
+1
-1
@@ -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_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = bridge_hub_westend_runtime::RuntimeGenesisConfig {
|
||||
|
||||
+2
-3
@@ -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-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] }
|
||||
|
||||
+1
-1
@@ -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_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = collectives_westend_runtime::RuntimeGenesisConfig {
|
||||
|
||||
+2
-3
@@ -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-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["rococo"] }
|
||||
|
||||
+1
-1
@@ -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_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = people_rococo_runtime::RuntimeGenesisConfig {
|
||||
|
||||
+2
-3
@@ -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-parachains-constants = { path = "../../../../../../runtimes/constants", features = ["westend"] }
|
||||
|
||||
+1
-1
@@ -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_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn genesis() -> Storage {
|
||||
let genesis_config = people_westend_runtime::RuntimeGenesisConfig {
|
||||
|
||||
+1
-3
@@ -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" }
|
||||
|
||||
@@ -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::<sr25519::Public>("Alice"),
|
||||
get_from_seed::<AssetHubPolkadotAuraId>("Alice"),
|
||||
),
|
||||
(
|
||||
get_account_id_from_seed::<sr25519::Public>("Bob"),
|
||||
get_from_seed::<AssetHubPolkadotAuraId>("Bob"),
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
pub fn invulnerables() -> Vec<(AccountId, AuraId)> {
|
||||
vec![
|
||||
(
|
||||
|
||||
@@ -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-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" }
|
||||
|
||||
+1
-1
@@ -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_parachains_constants::rococo::fee::WeightToFee
|
||||
);
|
||||
|
||||
+1
-2
@@ -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() {
|
||||
<AssetHubRococo as Chain>::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(),
|
||||
|
||||
+1
@@ -32,6 +32,7 @@ westend-runtime = { path = "../../../../../../../polkadot/runtime/westend" }
|
||||
|
||||
# Cumulus
|
||||
parachains-common = { path = "../../../../../../parachains/common" }
|
||||
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" }
|
||||
|
||||
+1
-1
@@ -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_parachains_constants::westend::fee::WeightToFee
|
||||
);
|
||||
|
||||
+1
@@ -35,6 +35,7 @@ bp-messages = { path = "../../../../../../../bridges/primitives/messages", defau
|
||||
|
||||
# Cumulus
|
||||
parachains-common = { path = "../../../../../../parachains/common" }
|
||||
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 }
|
||||
|
||||
+1
-1
@@ -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_parachains_constants::rococo::snowbridge::EthereumNetwork;
|
||||
|
||||
const INITIAL_FUND: u128 = 5_000_000_000 * ROCOCO_ED;
|
||||
const CHAIN_ID: u64 = 11155111;
|
||||
|
||||
@@ -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-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-parachains-constants/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
|
||||
@@ -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_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_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee};
|
||||
use xcm_config::{
|
||||
ForeignAssetsConvertedConcreteId, ForeignCreatorsSovereignAccountOf, GovernanceLocation,
|
||||
PoolAssetsConvertedConcreteId, TokenLocation, TokenLocationV3,
|
||||
@@ -1721,9 +1721,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_parachains_constants::rococo::fee;
|
||||
|
||||
/// We can fit at least 1000 transfers in a block.
|
||||
#[test]
|
||||
|
||||
@@ -21,7 +21,6 @@ use super::{
|
||||
XcmpQueue,
|
||||
};
|
||||
use assets_common::{
|
||||
local_and_foreign_assets::MatchesLocalAndForeignAssetsLocation,
|
||||
matching::{FromNetwork, FromSiblingParachain, IsForeignConcreteAsset},
|
||||
TrustBackedAssetsAsLocation,
|
||||
};
|
||||
@@ -36,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,
|
||||
@@ -47,6 +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, INBOUND_QUEUE_PALLET_INDEX,
|
||||
};
|
||||
use xcm::latest::prelude::*;
|
||||
#[allow(deprecated)]
|
||||
use xcm_builder::CurrencyAdapter;
|
||||
@@ -229,30 +230,6 @@ pub type AssetTransactors = (
|
||||
UniquesTransactor,
|
||||
);
|
||||
|
||||
/// Simple `Location` matcher for Local and Foreign asset `Location`.
|
||||
pub struct LocalAndForeignAssetsLocationMatcher;
|
||||
impl MatchesLocalAndForeignAssetsLocation<xcm::v3::Location>
|
||||
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<xcm::v3::Location> 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.
|
||||
@@ -875,7 +852,7 @@ pub mod bridging {
|
||||
1,
|
||||
[
|
||||
Parachain(SiblingBridgeHubParaId::get()),
|
||||
PalletInstance(parachains_common::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX)
|
||||
PalletInstance(INBOUND_QUEUE_PALLET_INDEX)
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -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_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};
|
||||
|
||||
@@ -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-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-parachains-constants/std",
|
||||
"westend-runtime-constants/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
|
||||
@@ -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_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee};
|
||||
use xcm_config::{
|
||||
ForeignAssetsConvertedConcreteId, PoolAssetsConvertedConcreteId,
|
||||
TrustBackedAssetsConvertedConcreteId, TrustBackedAssetsPalletLocationV3, WestendLocation,
|
||||
|
||||
@@ -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<xcm::v3::Location>
|
||||
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<xcm::v3::Location> 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.
|
||||
|
||||
@@ -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_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};
|
||||
|
||||
@@ -52,8 +52,3 @@ where
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub trait MatchesLocalAndForeignAssetsLocation<L = Location> {
|
||||
fn is_local(location: &L) -> bool;
|
||||
fn is_foreign(location: &L) -> bool;
|
||||
}
|
||||
|
||||
@@ -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-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-parachains-constants/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
|
||||
+2
-1
@@ -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_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
|
||||
|
||||
+1
-1
@@ -15,8 +15,8 @@
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::{xcm_config::UniversalLocation, Runtime};
|
||||
use parachains_common::rococo::snowbridge::EthereumNetwork;
|
||||
use snowbridge_router_primitives::outbound::EthereumBlobExporter;
|
||||
use testnet_parachains_constants::rococo::snowbridge::EthereumNetwork;
|
||||
|
||||
/// Exports message to the Ethereum Gateway contract.
|
||||
pub type SnowbridgeExporter = EthereumBlobExporter<
|
||||
|
||||
+2
-1
@@ -252,7 +252,8 @@ mod tests {
|
||||
AssertCompleteBridgeConstants,
|
||||
},
|
||||
};
|
||||
use parachains_common::{rococo, Balance};
|
||||
use parachains_common::Balance;
|
||||
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
|
||||
|
||||
@@ -93,10 +93,11 @@ 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_parachains_constants::rococo::{
|
||||
consensus::*, currency::*, fee::WeightToFee, snowbridge::INBOUND_QUEUE_PALLET_INDEX,
|
||||
};
|
||||
|
||||
use polkadot_runtime_common::prod_or_fast;
|
||||
@@ -497,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 = parachains_common::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX;
|
||||
pub Parameters: PricingParameters<u128> = PricingParameters {
|
||||
exchange_rate: FixedU128::from_rational(1, 400),
|
||||
fee_per_gas: gwei(20),
|
||||
@@ -558,7 +558,7 @@ impl snowbridge_pallet_inbound_queue::Config for Runtime {
|
||||
type MessageConverter = MessageToXcm<
|
||||
CreateAssetCall,
|
||||
CreateAssetDeposit,
|
||||
InboundQueuePalletInstance,
|
||||
ConstU8<INBOUND_QUEUE_PALLET_INDEX>,
|
||||
AccountId,
|
||||
Balance,
|
||||
>;
|
||||
|
||||
@@ -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_parachains_constants::rococo::snowbridge::EthereumNetwork;
|
||||
use xcm::latest::prelude::*;
|
||||
#[allow(deprecated)]
|
||||
use xcm_builder::{
|
||||
|
||||
@@ -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_parachains_constants::rococo::{
|
||||
consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee,
|
||||
};
|
||||
use xcm::latest::prelude::*;
|
||||
|
||||
parameter_types! {
|
||||
|
||||
@@ -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-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-parachains-constants/std",
|
||||
"westend-runtime-constants/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
|
||||
+2
-1
@@ -287,7 +287,8 @@ mod tests {
|
||||
AssertCompleteBridgeConstants,
|
||||
},
|
||||
};
|
||||
use parachains_common::{westend, Balance};
|
||||
use parachains_common::Balance;
|
||||
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
|
||||
|
||||
@@ -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_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee};
|
||||
|
||||
/// The address format for describing accounts.
|
||||
pub type Address = MultiAddress<AccountId, ()>;
|
||||
|
||||
@@ -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_parachains_constants::westend::{
|
||||
consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee,
|
||||
};
|
||||
use xcm::latest::prelude::*;
|
||||
|
||||
// Para id of sibling chain used in tests.
|
||||
|
||||
@@ -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-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-parachains-constants/std",
|
||||
"westend-runtime-constants/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
|
||||
@@ -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_parachains_constants::westend::{account, currency::GRAND};
|
||||
use westend_runtime_constants::time::HOURS;
|
||||
use xcm::prelude::*;
|
||||
use xcm_builder::{AliasesIntoAccountId32, PayOverXcm};
|
||||
@@ -55,7 +53,7 @@ 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;
|
||||
use testnet_parachains_constants::westend::currency::DOLLARS;
|
||||
|
||||
/// The Fellowship members' ranks.
|
||||
pub mod ranks {
|
||||
|
||||
@@ -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_parachains_constants::westend::{
|
||||
account::*, consensus::*, currency::*, fee::WeightToFee,
|
||||
};
|
||||
use xcm_config::{
|
||||
GovernanceLocation, LocationToAccountId, TreasurerBodyId, XcmOriginToTransactDispatchOrigin,
|
||||
};
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
[package]
|
||||
name = "testnet-parachains-constants"
|
||||
version = "1.0.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
description = "Common constants for Testnet 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"]
|
||||
@@ -0,0 +1,21 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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)]
|
||||
|
||||
#[cfg(feature = "rococo")]
|
||||
pub mod rococo;
|
||||
#[cfg(feature = "westend")]
|
||||
pub mod westend;
|
||||
@@ -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-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-parachains-constants/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
|
||||
@@ -26,7 +26,7 @@ use pallet_contracts::{
|
||||
};
|
||||
use sp_runtime::Perbill;
|
||||
|
||||
pub use parachains_common::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`.
|
||||
|
||||
@@ -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_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee};
|
||||
use xcm_config::CollatorSelectionUpdateOrigin;
|
||||
|
||||
#[cfg(any(feature = "std", test))]
|
||||
|
||||
@@ -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_parachains_constants::rococo::currency::CENTS;
|
||||
use xcm::latest::prelude::*;
|
||||
#[allow(deprecated)]
|
||||
use xcm_builder::CurrencyAdapter;
|
||||
|
||||
@@ -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-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-parachains-constants/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
|
||||
@@ -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_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee};
|
||||
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_config::{
|
||||
|
||||
@@ -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-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-parachains-constants/std",
|
||||
"westend-runtime-constants/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
|
||||
@@ -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_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee};
|
||||
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_config::{
|
||||
|
||||
@@ -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-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-parachains-constants/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
|
||||
@@ -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-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-parachains-constants/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
|
||||
@@ -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_parachains_constants::rococo::{consensus::*, currency::*, fee::WeightToFee};
|
||||
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
|
||||
use xcm::latest::prelude::BodyId;
|
||||
use xcm_config::{
|
||||
|
||||
@@ -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-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-parachains-constants/std",
|
||||
"westend-runtime-constants/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
|
||||
@@ -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_parachains_constants::westend::{consensus::*, currency::*, fee::WeightToFee};
|
||||
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
|
||||
use xcm::latest::prelude::BodyId;
|
||||
use xcm_config::{
|
||||
|
||||
@@ -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-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-parachains-constants/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
|
||||
@@ -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_parachains_constants::rococo::snowbridge::EthereumNetwork;
|
||||
use xcm::latest::prelude::*;
|
||||
#[allow(deprecated)]
|
||||
use xcm_builder::{
|
||||
|
||||
@@ -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-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-parachains-constants/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
|
||||
@@ -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-parachains-constants = { path = "../parachains/runtimes/constants", default-features = false, features = ["rococo", "westend"] }
|
||||
|
||||
# Substrate
|
||||
frame-benchmarking = { path = "../../substrate/frame/benchmarking" }
|
||||
|
||||
@@ -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::<sr25519::Public>("Alice//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
|
||||
],
|
||||
parachains_common::westend::currency::UNITS * 1_000_000,
|
||||
testnet_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::<sr25519::Public>("Eve//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
|
||||
],
|
||||
parachains_common::westend::currency::UNITS * 1_000_000,
|
||||
testnet_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::<sr25519::Public>("Alice//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
|
||||
],
|
||||
parachains_common::rococo::currency::UNITS * 1_000_000,
|
||||
testnet_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::<sr25519::Public>("Eve//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
|
||||
],
|
||||
parachains_common::rococo::currency::UNITS * 1_000_000,
|
||||
testnet_parachains_constants::rococo::currency::UNITS * 1_000_000,
|
||||
para_id.into(),
|
||||
))
|
||||
.with_properties(properties)
|
||||
|
||||
@@ -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<ModifyProperties: Fn(&mut sc_chain_spec::Properties)>(
|
||||
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,
|
||||
|
||||
@@ -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.
|
||||
///
|
||||
|
||||
@@ -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_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT;
|
||||
|
||||
pub fn contracts_rococo_development_config() -> GenericChainSpec {
|
||||
let mut properties = sc_chain_spec::Properties::new();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user