Use new MultiLocation syntax everywhere (#570)

* Use new MultiLocation syntax everywhere

* Make tests compile
This commit is contained in:
Keith Yeung
2021-08-12 11:26:49 +02:00
committed by GitHub
parent 38f7e93d82
commit da5634a712
13 changed files with 358 additions and 324 deletions
@@ -257,10 +257,10 @@ impl parachain_info::Config for Runtime {}
impl cumulus_pallet_aura_ext::Config for Runtime {}
parameter_types! {
pub const RocLocation: MultiLocation = X1(Parent);
pub const RocLocation: MultiLocation = MultiLocation::parent();
pub const RococoNetwork: NetworkId = NetworkId::Polkadot;
pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();
pub Ancestry: MultiLocation = X1(Parachain(ParachainInfo::parachain_id().into()));
pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
}
/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used
@@ -317,12 +317,13 @@ parameter_types! {
// One XCM operation is 1_000_000 weight - almost certainly a conservative estimate.
pub UnitWeightCost: Weight = 1_000_000;
// One ROC buys 1 second of weight.
pub const WeightPrice: (MultiLocation, u128) = (X1(Parent), ROC);
pub const WeightPrice: (MultiLocation, u128) = (MultiLocation::parent(), ROC);
}
match_type! {
pub type ParentOrParentsUnitPlurality: impl Contains<MultiLocation> = {
X1(Parent) | X2(Parent, Plurality { id: BodyId::Unit, .. })
MultiLocation { parents: 1, interior: Here } |
MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Unit, .. }) }
};
}