1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use frame_support::dispatch::DispatchResult;
use xcm::latest::{prelude::*, Weight};
/// Abstraction over cross-chain token transfers.
pub trait XcmTransfer<AccountId, Balance, CurrencyId> {
/// Transfer native currencies.
fn transfer(
who: AccountId,
currency_id: CurrencyId,
amount: Balance,
dest: MultiLocation,
dest_weight: Weight,
) -> DispatchResult;
/// Transfer `MultiAsset`
fn transfer_multi_asset(
who: AccountId,
asset: MultiAsset,
dest: MultiLocation,
dest_weight: Weight,
) -> DispatchResult;
}