Companion for #3629 (XCM v2) (#571)

* Update .gitignore and bring into line with XCM v2's SendError

* type

* Some work

* Weighed responses

* extra fields to xcm pallet

* Fixes

* Bump
This commit is contained in:
Gavin Wood
2021-08-28 15:51:49 +02:00
committed by GitHub
parent cfa88fe9f2
commit 9cc277834c
12 changed files with 320 additions and 323 deletions
@@ -512,6 +512,7 @@ pub type XcmOriginToTransactDispatchOrigin = (
parameter_types! {
// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
pub UnitWeightCost: Weight = 1_000_000_000;
pub const MaxInstructions: u32 = 100;
}
match_type! {
@@ -539,7 +540,7 @@ impl Config for XcmConfig {
type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of KSM
type LocationInverter = LocationInverter<Ancestry>;
type Barrier = Barrier;
type Weigher = FixedWeightBounds<UnitWeightCost, Call>;
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
type Trader = UsingComponents<IdentityFee<Balance>, KsmLocation, AccountId, Balances, ()>;
type ResponseHandler = (); // Don't handle responses for now.
}
@@ -569,8 +570,10 @@ impl pallet_xcm::Config for Runtime {
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type Weigher = FixedWeightBounds<UnitWeightCost, Call>;
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
type LocationInverter = LocationInverter<Ancestry>;
type Origin = Origin;
type Call = Call;
}
impl cumulus_pallet_xcm::Config for Runtime {