[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:
Branislav Kontur
2024-01-31 01:08:52 +01:00
committed by GitHub
parent 5b7f24fca1
commit 4450b61571
76 changed files with 246 additions and 219 deletions
-13
View File
@@ -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"]
-4
View File
@@ -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::*;
@@ -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"] }
@@ -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 {
@@ -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"] }
@@ -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 {
@@ -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"] }
@@ -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 {
@@ -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"] }
@@ -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 {
@@ -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"] }
@@ -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 {
@@ -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"] }
@@ -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 {
@@ -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"] }
@@ -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 {
@@ -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" }
@@ -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
);
@@ -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(),
@@ -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" }
@@ -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
);
@@ -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 }
@@ -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",
@@ -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
@@ -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<
@@ -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",
@@ -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",