frequency_runtime/xcm/
asset_transactor.rs1use crate::{AccountId, Balances, ForeignAssets, PolkadotXcm};
2use staging_xcm::latest::prelude::*;
3use staging_xcm_builder::{
4 FungibleAdapter, FungiblesAdapter, IsConcrete, IsParentsOnly, MatchedConvertedConcreteId,
5 MintLocation, NoChecking,
6};
7
8use crate::xcm::location_converter::LocationToAccountId;
9
10use frame_support::{parameter_types, traits::ConstU8};
11
12parameter_types! {
13 pub HereLocation: Location = Location::here();
14 pub CheckingAccount: AccountId = PolkadotXcm::check_account();
15 pub Checking: (AccountId, MintLocation) = (CheckingAccount::get(), MintLocation::Local);
16}
17
18pub type LocalAssetTransactor = FungibleAdapter<
20 Balances,
22 IsConcrete<HereLocation>,
24 LocationToAccountId,
26 AccountId,
28 Checking,
30>;
31
32pub type ForeignAssetsAdapter = FungiblesAdapter<
35 ForeignAssets,
36 MatchedConvertedConcreteId<
38 Location,
39 u128,
40 IsParentsOnly<ConstU8<1>>,
41 xcm_executor::traits::JustTry,
42 xcm_executor::traits::JustTry,
43 >,
44 LocationToAccountId,
46 AccountId,
48 NoChecking,
50 CheckingAccount,
51>;
52
53pub type AssetTransactors = (LocalAssetTransactor, ForeignAssetsAdapter);