Skip to content

Commit 80ed32d

Browse files
authored
feat:Make the XcmTransfer trait support transfer_multiasset_with_fee (#870)
1 parent 04e67e6 commit 80ed32d

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

traits/src/xcm_transfer.rs

+9
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,13 @@ pub trait XcmTransfer<AccountId, Balance, CurrencyId> {
1919
dest: MultiLocation,
2020
dest_weight_limit: WeightLimit,
2121
) -> DispatchResult;
22+
23+
/// Transfer `MultiAssetWithFee`
24+
fn transfer_multiasset_with_fee(
25+
who: AccountId,
26+
asset: MultiAsset,
27+
fee: MultiAsset,
28+
dest: MultiLocation,
29+
dest_weight_limit: WeightLimit,
30+
) -> DispatchResult;
2231
}

xtokens/src/lib.rs

+11
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,17 @@ pub mod module {
953953
) -> DispatchResult {
954954
Self::do_transfer_multiasset(who, asset, dest, dest_weight_limit)
955955
}
956+
957+
#[require_transactional]
958+
fn transfer_multiasset_with_fee(
959+
who: T::AccountId,
960+
asset: MultiAsset,
961+
fee: MultiAsset,
962+
dest: MultiLocation,
963+
dest_weight_limit: WeightLimit,
964+
) -> DispatchResult {
965+
Self::do_transfer_multiasset_with_fee(who, asset, fee, dest, dest_weight_limit)
966+
}
956967
}
957968
}
958969

0 commit comments

Comments
 (0)