mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 19:51:02 +00:00
Use WeightToFee when calculating cost of each weight unit in XCM trader (#1055)
* Use WeightToFee when calculating cost of each weight unit in XCM trader * Set the OnUnbalanced type parameter for XCM Traders
This commit is contained in:
@@ -15,14 +15,15 @@
|
||||
|
||||
use super::{
|
||||
AccountId, AssetId, Assets, Balance, Balances, Call, Event, Origin, ParachainInfo,
|
||||
ParachainSystem, PolkadotXcm, Runtime, XcmpQueue,
|
||||
ParachainSystem, PolkadotXcm, Runtime, WeightToFee, XcmpQueue,
|
||||
};
|
||||
use frame_support::{
|
||||
match_types, parameter_types,
|
||||
traits::{Everything, PalletInfoAccess},
|
||||
weights::{IdentityFee, Weight},
|
||||
weights::Weight,
|
||||
};
|
||||
use pallet_xcm::XcmPassthrough;
|
||||
use parachains_common::impls::ToStakingPot;
|
||||
use polkadot_parachain::primitives::Sibling;
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_builder::{
|
||||
@@ -156,7 +157,8 @@ impl xcm_executor::Config for XcmConfig {
|
||||
type LocationInverter = LocationInverter<Ancestry>;
|
||||
type Barrier = Barrier;
|
||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
||||
type Trader = UsingComponents<IdentityFee<Balance>, WestendLocation, AccountId, Balances, ()>;
|
||||
type Trader =
|
||||
UsingComponents<WeightToFee, WestendLocation, AccountId, Balances, ToStakingPot<Runtime>>;
|
||||
type ResponseHandler = PolkadotXcm;
|
||||
type AssetTrap = PolkadotXcm;
|
||||
type AssetClaims = PolkadotXcm;
|
||||
|
||||
Reference in New Issue
Block a user