From e68b0518c043c15eb9b78c9fd675545d26e5c90d Mon Sep 17 00:00:00 2001 From: Guantong <04637@163.com> Date: Wed, 30 Nov 2022 17:33:27 +0800 Subject: [PATCH] Fix #72 (#79) --- core/primitives/src/lib.rs | 3 +++ runtime/crab/src/pallets/polkadot_xcm.rs | 2 +- runtime/darwinia/src/pallets/polkadot_xcm.rs | 2 +- runtime/pangolin/src/pallets/polkadot_xcm.rs | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/primitives/src/lib.rs b/core/primitives/src/lib.rs index 411a8f719..c927ec585 100644 --- a/core/primitives/src/lib.rs +++ b/core/primitives/src/lib.rs @@ -97,3 +97,6 @@ pub const MWEI: Balance = 1_000 * KWEI; pub const KWEI: Balance = 1_000 * WEI; /// 1 wei — 1 pub const WEI: Balance = 1; + +/// Base balance required for the XCM unit weight +pub const BASE_WEIGHT_FEE: Balance = GWEI; diff --git a/runtime/crab/src/pallets/polkadot_xcm.rs b/runtime/crab/src/pallets/polkadot_xcm.rs index b4f1ccc66..15fa2c0b0 100644 --- a/runtime/crab/src/pallets/polkadot_xcm.rs +++ b/runtime/crab/src/pallets/polkadot_xcm.rs @@ -121,7 +121,7 @@ impl xcm_executor::Config for XcmExecutorConfig { type RuntimeCall = RuntimeCall; type SubscriptionService = PolkadotXcm; type Trader = UsingComponents< - WeightToFee, + ConstantMultiplier>, AnchoringSelfReserve, AccountId, Balances, diff --git a/runtime/darwinia/src/pallets/polkadot_xcm.rs b/runtime/darwinia/src/pallets/polkadot_xcm.rs index d95fff635..308f7a10f 100644 --- a/runtime/darwinia/src/pallets/polkadot_xcm.rs +++ b/runtime/darwinia/src/pallets/polkadot_xcm.rs @@ -121,7 +121,7 @@ impl xcm_executor::Config for XcmExecutorConfig { type RuntimeCall = RuntimeCall; type SubscriptionService = PolkadotXcm; type Trader = UsingComponents< - WeightToFee, + ConstantMultiplier>, AnchoringSelfReserve, AccountId, Balances, diff --git a/runtime/pangolin/src/pallets/polkadot_xcm.rs b/runtime/pangolin/src/pallets/polkadot_xcm.rs index b0e91ea36..08fe7222f 100644 --- a/runtime/pangolin/src/pallets/polkadot_xcm.rs +++ b/runtime/pangolin/src/pallets/polkadot_xcm.rs @@ -121,7 +121,7 @@ impl xcm_executor::Config for XcmExecutorConfig { type RuntimeCall = RuntimeCall; type SubscriptionService = PolkadotXcm; type Trader = UsingComponents< - WeightToFee, + ConstantMultiplier>, AnchoringSelfReserve, AccountId, Balances,