mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
* Allow Sufficient Assets for XCM Fee Payment on Statemint #1884 * Revert of removed payment.clone().into() * Fixes * Bring AssetFeeAsExistentialDepositMultiplier to test_asset_xcm_trader * Fixes
This commit is contained in:
@@ -24,9 +24,12 @@ use frame_support::{
|
||||
use pallet_xcm::XcmPassthrough;
|
||||
use parachains_common::{
|
||||
impls::ToStakingPot,
|
||||
xcm_config::{DenyReserveTransferToRelayChain, DenyThenTry},
|
||||
xcm_config::{
|
||||
AssetFeeAsExistentialDepositMultiplier, DenyReserveTransferToRelayChain, DenyThenTry,
|
||||
},
|
||||
};
|
||||
use polkadot_parachain::primitives::Sibling;
|
||||
use sp_runtime::traits::ConvertInto;
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_builder::{
|
||||
AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom,
|
||||
@@ -154,6 +157,12 @@ pub type Barrier = DenyThenTry<
|
||||
),
|
||||
>;
|
||||
|
||||
pub type AssetFeeAsExistentialDepositMultiplierFeeCharger = AssetFeeAsExistentialDepositMultiplier<
|
||||
Runtime,
|
||||
WeightToFee,
|
||||
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto>,
|
||||
>;
|
||||
|
||||
pub struct XcmConfig;
|
||||
impl xcm_executor::Config for XcmConfig {
|
||||
type RuntimeCall = RuntimeCall;
|
||||
@@ -172,8 +181,25 @@ impl xcm_executor::Config for XcmConfig {
|
||||
RuntimeCall,
|
||||
MaxInstructions,
|
||||
>;
|
||||
type Trader =
|
||||
UsingComponents<WeightToFee, DotLocation, AccountId, Balances, ToStakingPot<Runtime>>;
|
||||
type Trader = (
|
||||
UsingComponents<WeightToFee, DotLocation, AccountId, Balances, ToStakingPot<Runtime>>,
|
||||
cumulus_primitives_utility::TakeFirstAssetTrader<
|
||||
AccountId,
|
||||
AssetFeeAsExistentialDepositMultiplierFeeCharger,
|
||||
ConvertedConcreteAssetId<
|
||||
AssetId,
|
||||
Balance,
|
||||
AsPrefixedGeneralIndex<AssetsPalletLocation, AssetId, JustTry>,
|
||||
JustTry,
|
||||
>,
|
||||
Assets,
|
||||
cumulus_primitives_utility::XcmFeesTo32ByteAccount<
|
||||
FungiblesTransactor,
|
||||
AccountId,
|
||||
XcmAssetFeesReceiver,
|
||||
>,
|
||||
>,
|
||||
);
|
||||
type ResponseHandler = PolkadotXcm;
|
||||
type AssetTrap = PolkadotXcm;
|
||||
type AssetClaims = PolkadotXcm;
|
||||
|
||||
Reference in New Issue
Block a user