frequency_runtime/xcm/
parameters.rs1use crate::{
2 polkadot_xcm_fee::default_fee_per_second, Balance, ParachainInfo, RuntimeOrigin,
3 MAXIMUM_BLOCK_WEIGHT,
4};
5use cumulus_primitives_core::AggregateMessageOrigin;
6use frame_support::parameter_types;
7use staging_xcm::latest::{prelude::*, WESTEND_GENESIS_HASH};
8
9pub const MICROUNIT: Balance = 1_000_000;
10pub const RELAY_GENESIS: [u8; 32] = WESTEND_GENESIS_HASH;
11const ASSET_HUB_ID: u32 = 1000;
12
13pub type ForeignAssetsAssetId = Location;
14
15parameter_types! {
16 pub const RelayLocation: Location = Location::parent();
17 pub const RootLocation: Location = Location::here();
18 pub FeeAssetId: AssetId = AssetId(RelayLocation::get());
19 pub const BaseDeliveryFee: u128 = (1_000_000_000_000u128 / 100).saturating_mul(3);
20 pub const TransactionByteFee: Balance = 10 * MICROUNIT;
21 pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);
22 pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);
23 pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent;
24 pub const RelayNetwork: NetworkId = NetworkId::ByGenesis(RELAY_GENESIS);
25 pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
26 pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into();
27
28 pub RelayPerSecondAndByte: (AssetId, u128,u128) = (Location::new(1,Here).into(), default_fee_per_second(), 1024);
29 pub HereLocation: Location = Location::here();
30
31 pub NativeToken: AssetId = AssetId(Location::here());
32 pub NativeTokenFilter: AssetFilter = Wild(AllOf { fun: WildFungible, id: NativeToken::get() });
33 pub AssetHubLocation: Location = Location::new(1, [Parachain(ASSET_HUB_ID)]);
34 pub NativeForAssetHub: (AssetFilter, Location) = (NativeTokenFilter::get(), AssetHubLocation::get());
35 pub const MaxAssetsIntoHolding: u32 = 2;
36}