frequency_runtime/xcm/
teleporter.rs

1use frame_support::parameter_types;
2use staging_xcm::latest::prelude::*;
3use staging_xcm_builder::Case;
4
5/// The location of AssetHub on the relay network.
6pub const ASSET_HUB_ID: u32 = 1000;
7
8parameter_types! {
9	/// The location we use to represent native assets (e.g. XRQCY).
10	pub NativeTokenLocation: Location = Location::here();
11	/// A filter matching the native token only.
12	pub NativeTokenFilter: AssetFilter = Wild(AllOf {
13		fun: WildFungible,
14		id: AssetId(NativeTokenLocation::get()),
15	});
16
17	pub AssetHubLocation: Location = Location::new(1, [Parachain(ASSET_HUB_ID)]);
18
19	/// The specific (asset, destination) combination allowed for teleport.
20	pub NativeForAssetHub: (AssetFilter, Location) = (
21		NativeTokenFilter::get(),
22		AssetHubLocation::get(),
23	);
24}
25
26/// Assets allowed to teleport (e.g. native token to AssetHub)
27pub type TrustedTeleporters = Case<NativeForAssetHub>;