Support XCM v1 (Companion to #2815) (#561)

* support for XCM v1

* Fixes

* Fix.

* Use `xcm::latest`

* Bump Polkadot

Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
Gavin Wood
2021-08-06 21:13:33 +02:00
committed by GitHub
parent 4f936689ef
commit 6283c1fce9
12 changed files with 313 additions and 306 deletions
+4 -2
View File
@@ -56,7 +56,7 @@ pub use sp_runtime::{Perbill, Permill};
// XCM imports
use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough};
use polkadot_parachain::primitives::Sibling;
use xcm::v0::{BodyId, Junction::*, MultiAsset, MultiLocation, MultiLocation::*, NetworkId, Xcm};
use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,
EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset,
@@ -356,7 +356,7 @@ pub type LocalOriginToLocation = SignedToAccountId32<Origin, AccountId, RococoNe
/// queues.
pub type XcmRouter = (
// Two routers - use UMP to communicate with the relay chain:
cumulus_primitives_utility::ParentAsUmp<ParachainSystem>,
cumulus_primitives_utility::ParentAsUmp<ParachainSystem, ()>,
// ..and XCMP to communicate with the sibling chains.
XcmpQueue,
);
@@ -371,6 +371,7 @@ impl pallet_xcm::Config for Runtime {
type XcmTeleportFilter = All<(MultiLocation, Vec<MultiAsset>)>;
type XcmReserveTransferFilter = ();
type Weigher = FixedWeightBounds<UnitWeightCost, Call>;
type LocationInverter = LocationInverter<Ancestry>;
}
impl cumulus_pallet_xcm::Config for Runtime {
@@ -382,6 +383,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type Event = Event;
type XcmExecutor = XcmExecutor<XcmConfig>;
type ChannelInfo = ParachainSystem;
type VersionWrapper = ();
}
impl cumulus_pallet_dmp_queue::Config for Runtime {