mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 16:21:02 +00:00
Use new MultiLocation syntax everywhere (#570)
* Use new MultiLocation syntax everywhere * Make tests compile
This commit is contained in:
@@ -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, .. }) }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user