1919use super :: {
2020 parachains_origin, AccountId , AllPalletsWithSystem , Balances , Dmp , FellowshipAdmin ,
2121 GeneralAdmin , ParaId , Runtime , RuntimeCall , RuntimeEvent , RuntimeOrigin , StakingAdmin ,
22- TransactionByteFee , WeightToFee , XcmPallet ,
22+ TransactionByteFee , Treasury , WeightToFee , XcmPallet ,
2323} ;
2424use frame_support:: {
2525 match_types, parameter_types,
@@ -29,7 +29,9 @@ use frame_support::{
2929use frame_system:: EnsureRoot ;
3030use pallet_xcm:: XcmPassthrough ;
3131use polkadot_runtime_constants:: {
32- currency:: CENTS , system_parachain:: * , xcm:: body:: FELLOWSHIP_ADMIN_INDEX ,
32+ currency:: CENTS ,
33+ system_parachain:: { SystemParachains , * } ,
34+ xcm:: body:: FELLOWSHIP_ADMIN_INDEX ,
3335} ;
3436use runtime_common:: {
3537 crowdloan, paras_registrar,
@@ -44,7 +46,7 @@ use xcm_builder::{
4446 ChildParachainConvertsVia , CurrencyAdapter as XcmCurrencyAdapter , IsConcrete , MintLocation ,
4547 OriginToPluralityVoice , SignedAccountId32AsNative , SignedToAccountId32 ,
4648 SovereignSignedViaLocation , TakeWeightCredit , TrailingSetTopicAsId , UsingComponents ,
47- WeightInfoBounds , WithComputedOrigin , WithUniqueTopic ,
49+ WeightInfoBounds , WithComputedOrigin , WithUniqueTopic , XcmFeesToAccount ,
4850} ;
4951use xcm_executor:: traits:: WithOriginFilter ;
5052
@@ -61,6 +63,8 @@ parameter_types! {
6163 pub CheckAccount : AccountId = XcmPallet :: check_account( ) ;
6264 /// The Checking Account along with the indication that the local chain is able to mint tokens.
6365 pub LocalCheckAccount : ( AccountId , MintLocation ) = ( CheckAccount :: get( ) , MintLocation :: Local ) ;
66+ /// Account of the treasury pallet.
67+ pub TreasuryAccount : Option <AccountId > = Some ( Treasury :: account_id( ) ) ;
6468}
6569
6670/// The canonical means of converting a `MultiLocation` into an `AccountId`, used when we want to
@@ -131,7 +135,7 @@ pub type XcmRouter = WithUniqueTopic<(
131135
132136parameter_types ! {
133137 pub const Dot : MultiAssetFilter = Wild ( AllOf { fun: WildFungible , id: Concrete ( TokenLocation :: get( ) ) } ) ;
134- pub const StatemintLocation : MultiLocation = Parachain ( STATEMINT_ID ) . into_location( ) ;
138+ pub const StatemintLocation : MultiLocation = Parachain ( ASSET_HUB_ID ) . into_location( ) ;
135139 pub const DotForStatemint : ( MultiAssetFilter , MultiLocation ) = ( Dot :: get( ) , StatemintLocation :: get( ) ) ;
136140 pub const CollectivesLocation : MultiLocation = Parachain ( COLLECTIVES_ID ) . into_location( ) ;
137141 pub const DotForCollectives : ( MultiAssetFilter , MultiLocation ) = ( Dot :: get( ) , CollectivesLocation :: get( ) ) ;
@@ -340,7 +344,7 @@ impl xcm_executor::Config for XcmConfig {
340344 type SubscriptionService = XcmPallet ;
341345 type PalletInstancesInfo = AllPalletsWithSystem ;
342346 type MaxAssetsIntoHolding = MaxAssetsIntoHolding ;
343- type FeeManager = ( ) ;
347+ type FeeManager = XcmFeesToAccount < Self , SystemParachains , AccountId , TreasuryAccount > ;
344348 // No bridges yet...
345349 type MessageExporter = ( ) ;
346350 type UniversalAliases = Nothing ;
0 commit comments