@@ -38,13 +38,14 @@ use parity_scale_codec::{Decode, Encode};
3838use polkadot_runtime_common:: xcm_sender:: NoPriceForMessageDelivery ;
3939use primitives:: evm:: is_system_contract;
4040use runtime_common:: {
41- local_currency_location, native_currency_location, AcalaDropAssets , EnsureRootOrHalfGeneralCouncil ,
41+ local_currency_location, native_currency_location, xcm_config:: RelayLocationFilter ,
42+ xcm_impl:: IsBridgedConcreteAssetFrom , AcalaDropAssets , EnsureRootOrHalfGeneralCouncil ,
4243 EnsureRootOrThreeFourthsGeneralCouncil , FixedRateOfAsset , RuntimeBlockWeights ,
4344} ;
4445use sp_runtime:: Perbill ;
4546use xcm:: { prelude:: * , v3:: Weight as XcmWeight } ;
4647use xcm_builder:: {
47- EnsureXcmOrigin , FixedRateOfFungible , FixedWeightBounds , FrameTransactionalProcessor , SignedToAccountId32 ,
48+ Case , EnsureXcmOrigin , FixedRateOfFungible , FixedWeightBounds , FrameTransactionalProcessor , SignedToAccountId32 ,
4849} ;
4950
5051parameter_types ! {
@@ -136,8 +137,24 @@ parameter_types! {
136137 ) ;
137138
138139 pub BaseRate : u128 = kar_per_second( ) ;
140+
141+ /// Location of Asset Hub
142+ pub AssetHubLocation : Location = Location :: new( 1 , [ Parachain ( 1000 ) ] ) ;
143+ pub RelayChainNativeAssetFromAssetHub : ( AssetFilter , Location ) = (
144+ RelayLocationFilter :: get( ) ,
145+ AssetHubLocation :: get( )
146+ ) ;
139147}
140148
149+ type Reserves = (
150+ // Assets bridged from different consensus systems held in reserve on Asset Hub.
151+ IsBridgedConcreteAssetFrom < AssetHubLocation > ,
152+ // Relaychain (DOT) from Asset Hub
153+ Case < RelayChainNativeAssetFromAssetHub > ,
154+ // Assets which the reserve is the same as the origin.
155+ MultiNativeAsset < AbsoluteReserveProvider > ,
156+ ) ;
157+
141158pub type Trader = (
142159 FixedRateOfAsset < BaseRate , ToTreasury , BuyWeightRateOfTransactionFeePool < Runtime , CurrencyIdConvert > > ,
143160 FixedRateOfFungible < KarPerSecond , ToTreasury > ,
@@ -162,7 +179,7 @@ impl xcm_executor::Config for XcmConfig {
162179 // How to withdraw and deposit an asset.
163180 type AssetTransactor = LocalAssetTransactor ;
164181 type OriginConverter = XcmOriginToCallOrigin ;
165- type IsReserve = MultiNativeAsset < AbsoluteReserveProvider > ;
182+ type IsReserve = Reserves ;
166183 type IsTeleporter = runtime_common:: xcm_config:: TrustedTeleporters ;
167184 type UniversalLocation = UniversalLocation ;
168185 type Barrier = Barrier ;
0 commit comments