Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
272c31d
Introduce XcmFeesToAccount fee manager
KiChjang Apr 4, 2023
13f5944
Fixes
KiChjang Apr 4, 2023
3d0cfde
Fixes
KiChjang Apr 4, 2023
c28700d
Put system parachain IDs into consts
KiChjang Apr 4, 2023
d5b760b
Fixes
KiChjang Apr 4, 2023
a2d3604
Remove XcmFeesToAccount config for Westend
KiChjang Apr 4, 2023
7e99987
Include Encointer as a system parachain
KiChjang Apr 4, 2023
04d4410
Emit warning when deposit_asset fails
KiChjang Apr 5, 2023
5d6e2c2
Add comment on what happens when deposit_asset errors
KiChjang Apr 5, 2023
7e4cc0a
Fixes
KiChjang Apr 5, 2023
17c0f5c
Move SystemParachains to constants
KiChjang Apr 6, 2023
12b816e
Fixes
KiChjang Apr 6, 2023
d22046f
Fixes
KiChjang Apr 6, 2023
6c9f3f9
cargo fmt
KiChjang Apr 7, 2023
424c903
Added BridgeHubs constants (#7053)
bkontur Apr 12, 2023
7b140f0
Merge remote-tracking branch 'origin/master' into kckyeung/xcm-fee-ma…
KiChjang Apr 13, 2023
a852957
Add SystemParachain type to Westmint
KiChjang Apr 13, 2023
e1b6af0
Fixes
KiChjang Apr 20, 2023
20b4f66
Merge remote-tracking branch 'origin/master' into kckyeung/xcm-fee-ma…
KiChjang Apr 20, 2023
09828da
Fixes
KiChjang Apr 24, 2023
0e06f73
Waive fee handling during benchmarking
KiChjang Apr 28, 2023
6a4fd76
Fixes
KiChjang Apr 28, 2023
6eccb05
Fixes
KiChjang Apr 28, 2023
2df8cbf
Merge remote-tracking branch 'origin/master' into kckyeung/xcm-fee-ma…
KiChjang Apr 28, 2023
de0e397
Rename to ASSET_HUB_ID
KiChjang Jun 22, 2023
8bb8fb9
Rename all asset parachains to AssetHub
KiChjang Jun 22, 2023
3ea877f
Merge branch 'master' into kckyeung/xcm-fee-manager
KiChjang Jun 22, 2023
4843e58
Fix typo
KiChjang Jun 22, 2023
7c3bb1a
".git/.scripts/commands/fmt/fmt.sh"
Jun 22, 2023
50a008e
Merge remote-tracking branch 'origin/master' into kckyeung/xcm-fee-ma…
Jul 4, 2023
76a4cd0
Merge branch 'master' into kckyeung/xcm-fee-manager
KiChjang Aug 2, 2023
7d61d2e
Fixes
KiChjang Aug 2, 2023
18945f8
Fixes
KiChjang Aug 2, 2023
6f4a8bb
Merge remote-tracking branch 'origin/master' into kckyeung/xcm-fee-ma…
KiChjang Aug 3, 2023
4fa5016
Merge remote-tracking branch 'origin/master' into kckyeung/xcm-fee-ma…
Aug 8, 2023
88b9582
Merge remote-tracking branch 'origin/master' into kckyeung/xcm-fee-ma…
Aug 13, 2023
2c7d14c
Merge remote-tracking branch 'origin/master' into kckyeung/xcm-fee-ma…
Aug 15, 2023
57b3a6d
Merge remote-tracking branch 'origin/master' into kckyeung/xcm-fee-ma…
Aug 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions runtime/kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use super::{
parachains_origin, AccountId, AllPalletsWithSystem, Balances, Fellows, ParaId, Runtime,
RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, WeightToFee, XcmPallet,
RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, Treasury, WeightToFee, XcmPallet,
};
use frame_support::{
match_types, parameter_types,
Expand All @@ -36,7 +36,7 @@ use xcm_builder::{
CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds, IsChildSystemParachain, IsConcrete,
MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds,
WithComputedOrigin,
WithComputedOrigin, XcmFeesToAccount,
};
use xcm_executor::traits::WithOriginFilter;

Expand All @@ -55,6 +55,8 @@ parameter_types! {
pub CheckAccount: AccountId = XcmPallet::check_account();
/// The check account that is allowed to mint assets locally.
pub LocalCheckAccount: (AccountId, MintLocation) = (CheckAccount::get(), MintLocation::Local);
/// The treasury account where XCM fees would be sent to.
pub TreasuryAccount: Option<AccountId> = Some(Treasury::account_id());
}

/// The canonical means of converting a `MultiLocation` into an `AccountId`, used when we want to determine
Expand Down Expand Up @@ -125,6 +127,9 @@ match_types! {
pub type OnlyParachains: impl Contains<MultiLocation> = {
MultiLocation { parents: 0, interior: X1(Parachain(_)) }
};
pub type SystemParachains: impl Contains<MultiLocation> = {
MultiLocation { parents: 0, interior: X1(Parachain(1000)) }
}
}

/// The barriers one of which must be passed for an XCM message to be executed.
Expand Down Expand Up @@ -335,7 +340,7 @@ impl xcm_executor::Config for XcmConfig {
type SubscriptionService = XcmPallet;
type PalletInstancesInfo = AllPalletsWithSystem;
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
type FeeManager = ();
type FeeManager = XcmFeesToAccount<Self, SystemParachains, AccountId, TreasuryAccount>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with this change () -> XcmFeesToAccount
Is there any change or consequence for non-system parachains or end users?
I mean, is there anything which will start failing after this is upgraded on-live?
Something like: non-system parachain should drip their sovereign account on relay chain?
If so, maybe should be part of release notes or something like that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There shouldn't be -- with or without a FeeManager, we've still been collecting fees, the only difference here is that previously we were just burning them after collecting them, but with this change, we simply deposit them to the treasury account.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actual impl FeeManager for () here behaves as everything is waived now,
so, iiuc charge_fees and takes_fee they never do AssetTransactor::withdraw_asset, but now with XcmFeesToAccount they will do AssetTransactor::withdraw_asset,

so I think this is the change, that origin needs to have some balance > ED + fees, but I dont know how much this is a really issue. I can imaging just some scenarios/calls from some non-system parachain that does not have sovereign account with balance on relay chain, so after this change they will need to drip some DOTs/KSMs to pass

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, so I just took a look at where we collect fees in the XCM executor: it looks like any instruction where it creates and sends an XCM back to the origin would require the origin to pay for fees, and this includes the Query* instructions, the Report* instructions, the ExportMessage instruction and most of the cross-chain asset transfer instructions (e.g. InitiateTeleport).

This isn't a huge deal, I think what we do need to do is to display delivery fees in the UI clearly so that users are informed about how much they need to pay, otherwise their XCM would fail to be sent.

// No bridges yet...
type MessageExporter = ();
type UniversalAliases = Nothing;
Expand Down
11 changes: 8 additions & 3 deletions runtime/polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use super::{
parachains_origin, AccountId, AllPalletsWithSystem, Balances, CouncilCollective,
FellowshipAdmin, ParaId, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin,
WeightToFee, XcmPallet,
Treasury, WeightToFee, XcmPallet,
};
use frame_support::{
match_types, parameter_types,
Expand All @@ -38,7 +38,7 @@ use xcm_builder::{
ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter,
FixedWeightBounds, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,
WithComputedOrigin,
WithComputedOrigin, XcmFeesToAccount,
};
use xcm_executor::traits::WithOriginFilter;

Expand All @@ -55,6 +55,8 @@ parameter_types! {
pub CheckAccount: AccountId = XcmPallet::check_account();
/// The Checking Account along with the indication that the local chain is able to mint tokens.
pub LocalCheckAccount: (AccountId, MintLocation) = (CheckAccount::get(), MintLocation::Local);
/// The treasury account where XCM fees would be sent to.
pub TreasuryAccount: Option<AccountId> = Some(Treasury::account_id());
}

/// The canonical means of converting a `MultiLocation` into an `AccountId`, used when we want to determine
Expand Down Expand Up @@ -135,6 +137,9 @@ match_types! {
MultiLocation { parents: 0, interior: X1(Parachain(COLLECTIVES_ID)) } |
MultiLocation { parents: 0, interior: X2(Parachain(COLLECTIVES_ID), Plurality { id: BodyId::Technical, .. }) }
};
pub type SystemParachains: impl Contains<MultiLocation> = {
MultiLocation { parents: 0, interior: X1(Parachain(STATEMINT_ID | COLLECTIVES_ID)) }
}
}

/// The barriers one of which must be passed for an XCM message to be executed.
Expand Down Expand Up @@ -354,7 +359,7 @@ impl xcm_executor::Config for XcmConfig {
type SubscriptionService = XcmPallet;
type PalletInstancesInfo = AllPalletsWithSystem;
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
type FeeManager = ();
type FeeManager = XcmFeesToAccount<Self, SystemParachains, AccountId, TreasuryAccount>;
// No bridges yet...
type MessageExporter = ();
type UniversalAliases = Nothing;
Expand Down
10 changes: 7 additions & 3 deletions runtime/rococo/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use super::{
parachains_origin, AccountId, AllPalletsWithSystem, Balances, CouncilCollective, ParaId,
Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmPallet,
Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, WeightToFee, XcmPallet,
};
use frame_support::{
match_types, parameter_types,
Expand All @@ -35,7 +35,7 @@ use xcm_builder::{
ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds, IsChildSystemParachain, IsConcrete,
MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation,
TakeWeightCredit, UsingComponents, WeightInfoBounds, WithComputedOrigin,
TakeWeightCredit, UsingComponents, WeightInfoBounds, WithComputedOrigin, XcmFeesToAccount,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};

Expand All @@ -45,6 +45,7 @@ parameter_types! {
pub UniversalLocation: InteriorMultiLocation = ThisNetwork::get().into();
pub CheckAccount: AccountId = XcmPallet::check_account();
pub LocalCheckAccount: (AccountId, MintLocation) = (CheckAccount::get(), MintLocation::Local);
pub TreasuryAccount: Option<AccountId> = Some(Treasury::account_id());
}

pub type LocationConverter =
Expand Down Expand Up @@ -120,6 +121,9 @@ match_types! {
pub type OnlyParachains: impl Contains<MultiLocation> = {
MultiLocation { parents: 0, interior: X1(Parachain(_)) }
};
pub type SystemParachains: impl Contains<MultiLocation> = {
MultiLocation { parents: 0, interior: X1(Parachain(1000 | 1002)) }
};
}

/// The barriers one of which must be passed for an XCM message to be executed.
Expand Down Expand Up @@ -313,7 +317,7 @@ impl xcm_executor::Config for XcmConfig {
type SubscriptionService = XcmPallet;
type PalletInstancesInfo = AllPalletsWithSystem;
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
type FeeManager = ();
type FeeManager = XcmFeesToAccount<Self, SystemParachains, AccountId, TreasuryAccount>;
type MessageExporter = ();
type UniversalAliases = Nothing;
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
Expand Down
15 changes: 11 additions & 4 deletions runtime/westend/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

use super::{
parachains_origin, weights, AccountId, AllPalletsWithSystem, Balances, ParaId, Runtime,
RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmPallet,
RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, WeightToFee, XcmPallet,
};
use frame_support::{
parameter_types,
match_types, parameter_types,
traits::{Contains, Everything, Nothing},
};
use frame_system::EnsureRoot;
Expand All @@ -34,7 +34,7 @@ use xcm_builder::{
ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
CurrencyAdapter as XcmCurrencyAdapter, IsChildSystemParachain, IsConcrete, MintLocation,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
UsingComponents, WeightInfoBounds, WithComputedOrigin,
UsingComponents, WeightInfoBounds, WithComputedOrigin, XcmFeesToAccount,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};

Expand All @@ -44,6 +44,7 @@ parameter_types! {
pub UniversalLocation: InteriorMultiLocation = ThisNetwork::get().into();
pub CheckAccount: AccountId = XcmPallet::check_account();
pub LocalCheckAccount: (AccountId, MintLocation) = (CheckAccount::get(), MintLocation::Local);
pub TreasuryAccount: Option<AccountId> = Some(Treasury::account_id());
}

pub type LocationConverter =
Expand Down Expand Up @@ -228,6 +229,12 @@ impl Contains<RuntimeCall> for SafeCallFilter {
}
}

match_types! {
pub type SystemParachains: impl Contains<MultiLocation> = {
MultiLocation { parents: 0, interior: X1(Parachain(1000 | 1001)) }
};
}

pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
Expand All @@ -250,7 +257,7 @@ impl xcm_executor::Config for XcmConfig {
type SubscriptionService = XcmPallet;
type PalletInstancesInfo = AllPalletsWithSystem;
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
type FeeManager = ();
type FeeManager = XcmFeesToAccount<Self, SystemParachains, AccountId, TreasuryAccount>;
type MessageExporter = ();
type UniversalAliases = Nothing;
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
Expand Down
30 changes: 3 additions & 27 deletions xcm/pallet-xcm-benchmarks/src/fungible/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,7 @@ benchmarks_instance_pallet! {
let worst_case_holding = T::worst_case_holding(0);
let asset = T::get_multi_asset();

<AssetTransactorOf<T>>::deposit_asset(
&asset,
&sender_location,
&XcmContext {
origin: Some(sender_location.clone()),
message_hash: [0; 32],
topic: None,
},
).unwrap();
<AssetTransactorOf<T>>::deposit_asset(&asset, &sender_location, &None).unwrap();
// check the assets of origin.
assert!(!T::TransactAsset::balance(&sender_account).is_zero());

Expand All @@ -77,15 +69,7 @@ benchmarks_instance_pallet! {
let dest_location = T::valid_destination()?;
let dest_account = T::AccountIdConverter::convert(dest_location.clone()).unwrap();

<AssetTransactorOf<T>>::deposit_asset(
&asset,
&sender_location,
&XcmContext {
origin: Some(sender_location.clone()),
message_hash: [0; 32],
topic: None,
},
).unwrap();
<AssetTransactorOf<T>>::deposit_asset(&asset, &sender_location, &None).unwrap();
assert!(T::TransactAsset::balance(&dest_account).is_zero());

let mut executor = new_executor::<T>(sender_location);
Expand All @@ -104,15 +88,7 @@ benchmarks_instance_pallet! {
let dest_account = T::AccountIdConverter::convert(dest_location.clone()).unwrap();

let asset = T::get_multi_asset();
<AssetTransactorOf<T>>::deposit_asset(
&asset,
&sender_location,
&XcmContext {
origin: Some(sender_location.clone()),
message_hash: [0; 32],
topic: None,
},
).unwrap();
<AssetTransactorOf<T>>::deposit_asset(&asset, &sender_location, &None).unwrap();
let assets: MultiAssets = vec![ asset ].into();
assert!(T::TransactAsset::balance(&dest_account).is_zero());

Expand Down
6 changes: 5 additions & 1 deletion xcm/pallet-xcm-benchmarks/src/generic/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ impl frame_system::Config for Test {
/// The benchmarks in this pallet should never need an asset transactor to begin with.
pub struct NoAssetTransactor;
impl xcm_executor::traits::TransactAsset for NoAssetTransactor {
fn deposit_asset(_: &MultiAsset, _: &MultiLocation, _: &XcmContext) -> Result<(), XcmError> {
fn deposit_asset(
_: &MultiAsset,
_: &MultiLocation,
_: Option<&XcmContext>,
) -> Result<(), XcmError> {
unreachable!();
}

Expand Down
6 changes: 5 additions & 1 deletion xcm/xcm-builder/src/currency_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ impl<
}
}

fn deposit_asset(what: &MultiAsset, who: &MultiLocation, _context: &XcmContext) -> Result {
fn deposit_asset(
what: &MultiAsset,
who: &MultiLocation,
_context: Option<&XcmContext>,
) -> Result {
log::trace!(target: "xcm::currency_adapter", "deposit_asset what: {:?}, who: {:?}", what, who);
// Check we handle this asset.
let amount = Matcher::matches_fungible(&what).ok_or(Error::AssetNotHandled)?;
Expand Down
51 changes: 51 additions & 0 deletions xcm/xcm-builder/src/fee_handling.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Copyright Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Polkadot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

use core::marker::PhantomData;
use frame_support::traits::{Contains, Get};
use xcm::prelude::*;
use xcm_executor::traits::{FeeManager, FeeReason, TransactAsset};

/// A `FeeManager` implementation that simply deposits the fees handled into a specific on-chain
/// `ReceiverAccount`.
///
/// It reuses the `AssetTransactor` configured on the XCM executor to deposit fee assets, and also
/// permits specifying `WaivedLocations` for locations that are privileged to not pay for fees.
pub struct XcmFeesToAccount<XcmConfig, WaivedLocations, AccountId, ReceiverAccount>(
PhantomData<(XcmConfig, WaivedLocations, AccountId, ReceiverAccount)>,
);
impl<
XcmConfig: xcm_executor::Config,
WaivedLocations: Contains<MultiLocation>,
AccountId: Clone + Into<[u8; 32]>,
ReceiverAccount: Get<Option<AccountId>>,
> FeeManager for XcmFeesToAccount<XcmConfig, WaivedLocations, AccountId, ReceiverAccount>
{
fn is_waived(origin: Option<&MultiLocation>, _: FeeReason) -> bool {
let Some(loc) = origin else { return false };
WaivedLocations::contains(loc)
}

fn handle_fee(fees: MultiAssets, context: Option<&XcmContext>) {
if let Some(receiver) = ReceiverAccount::get() {
let dest = AccountId32 { network: None, id: receiver.into() }.into();
for asset in fees.into_inner() {
let ok = XcmConfig::AssetTransactor::deposit_asset(&asset, &dest, context).is_ok();
debug_assert!(ok, "`deposit_asset` cannot generally fail");
}
}
}
}
12 changes: 10 additions & 2 deletions xcm/xcm-builder/src/fungibles_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,11 @@ impl<
}
}

fn deposit_asset(what: &MultiAsset, who: &MultiLocation, _context: &XcmContext) -> XcmResult {
fn deposit_asset(
what: &MultiAsset,
who: &MultiLocation,
_context: Option<&XcmContext>,
) -> XcmResult {
log::trace!(
target: "xcm::fungibles_adapter",
"deposit_asset what: {:?}, who: {:?}",
Expand Down Expand Up @@ -371,7 +375,11 @@ impl<
>::check_out(dest, what, context)
}

fn deposit_asset(what: &MultiAsset, who: &MultiLocation, context: &XcmContext) -> XcmResult {
fn deposit_asset(
what: &MultiAsset,
who: &MultiLocation,
context: Option<&XcmContext>,
) -> XcmResult {
FungiblesMutateAdapter::<
Assets,
Matcher,
Expand Down
3 changes: 3 additions & 0 deletions xcm/xcm-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ pub use barriers::{
mod currency_adapter;
pub use currency_adapter::CurrencyAdapter;

mod fee_handling;
pub use fee_handling::XcmFeesToAccount;

mod fungibles_adapter;
pub use fungibles_adapter::{
AssetChecking, DualMint, FungiblesAdapter, FungiblesMutateAdapter, FungiblesTransferAdapter,
Expand Down
12 changes: 10 additions & 2 deletions xcm/xcm-builder/src/nonfungibles_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,11 @@ impl<
}
}

fn deposit_asset(what: &MultiAsset, who: &MultiLocation, context: &XcmContext) -> XcmResult {
fn deposit_asset(
what: &MultiAsset,
who: &MultiLocation,
context: Option<&XcmContext>,
) -> XcmResult {
log::trace!(
target: "xcm::fungibles_adapter",
"deposit_asset what: {:?}, who: {:?}, context: {:?}",
Expand Down Expand Up @@ -288,7 +292,11 @@ impl<
>::check_out(dest, what, context)
}

fn deposit_asset(what: &MultiAsset, who: &MultiLocation, context: &XcmContext) -> XcmResult {
fn deposit_asset(
what: &MultiAsset,
who: &MultiLocation,
context: Option<&XcmContext>,
) -> XcmResult {
NonFungiblesMutateAdapter::<
Assets,
Matcher,
Expand Down
4 changes: 2 additions & 2 deletions xcm/xcm-builder/src/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ impl TransactAsset for TestAssetTransactor {
fn deposit_asset(
what: &MultiAsset,
who: &MultiLocation,
_context: &XcmContext,
_context: Option<&XcmContext>,
) -> Result<(), XcmError> {
add_asset(who.clone(), what.clone());
Ok(())
Expand Down Expand Up @@ -441,7 +441,7 @@ impl FeeManager for TestFeeManager {
fn is_waived(_: Option<&MultiLocation>, r: FeeReason) -> bool {
IS_WAIVED.with(|l| l.borrow().contains(&r))
}
fn handle_fee(_: MultiAssets) {}
fn handle_fee(_: MultiAssets, _: Option<&XcmContext>) {}
}

#[derive(Clone, Eq, PartialEq, Debug)]
Expand Down
Loading