@@ -80,7 +80,7 @@ pub mod pallet {
8080 type WeightInfo : WeightInfo ;
8181
8282 /// Universal location of this runtime.
83- type UniversalLocation : Get < InteriorMultiLocation > ;
83+ type UniversalLocation : Get < InteriorLocation > ;
8484 /// The bridged network that this config is for if specified.
8585 /// Also used for filtering `Bridges` by `BridgedNetworkId`.
8686 /// If not specified, allows all networks pass through.
@@ -235,9 +235,9 @@ type ViaBridgeHubExporter<T, I> = SovereignPaidRemoteExporter<
235235impl < T : Config < I > , I : ' static > ExporterFor for Pallet < T , I > {
236236 fn exporter_for (
237237 network : & NetworkId ,
238- remote_location : & InteriorMultiLocation ,
238+ remote_location : & InteriorLocation ,
239239 message : & Xcm < ( ) > ,
240- ) -> Option < ( MultiLocation , Option < MultiAsset > ) > {
240+ ) -> Option < ( Location , Option < Asset > ) > {
241241 // ensure that the message is sent to the expected bridged network (if specified).
242242 if let Some ( bridged_network) = T :: BridgedNetworkId :: get ( ) {
243243 if * network != bridged_network {
@@ -268,7 +268,7 @@ impl<T: Config<I>, I: 'static> ExporterFor for Pallet<T, I> {
268268 // take `base_fee` from `T::Brides`, but it has to be the same `T::FeeAsset`
269269 let base_fee = match maybe_payment {
270270 Some ( payment) => match payment {
271- MultiAsset { fun : Fungible ( amount) , id } if id. eq ( & T :: FeeAsset :: get ( ) ) => amount,
271+ Asset { fun : Fungible ( amount) , id } if id. eq ( & T :: FeeAsset :: get ( ) ) => amount,
272272 invalid_asset => {
273273 log:: error!(
274274 target: LOG_TARGET ,
@@ -318,7 +318,7 @@ impl<T: Config<I>, I: 'static> SendXcm for Pallet<T, I> {
318318 type Ticket = ( u32 , <T :: ToBridgeHubSender as SendXcm >:: Ticket ) ;
319319
320320 fn validate (
321- dest : & mut Option < MultiLocation > ,
321+ dest : & mut Option < Location > ,
322322 xcm : & mut Option < Xcm < ( ) > > ,
323323 ) -> SendResult < Self :: Ticket > {
324324 // `dest` and `xcm` are required here
@@ -446,7 +446,7 @@ mod tests {
446446 run_test ( || {
447447 assert_eq ! (
448448 send_xcm:: <XcmBridgeHubRouter >(
449- MultiLocation :: new( 2 , X2 ( GlobalConsensus ( Rococo ) , Parachain ( 1000 ) ) ) ,
449+ Location :: new( 2 , [ GlobalConsensus ( Rococo ) , Parachain ( 1000 ) ] ) ,
450450 vec![ ] . into( ) ,
451451 ) ,
452452 Err ( SendError :: NotApplicable ) ,
@@ -459,7 +459,7 @@ mod tests {
459459 run_test ( || {
460460 assert_eq ! (
461461 send_xcm:: <XcmBridgeHubRouter >(
462- MultiLocation :: new( 2 , X2 ( GlobalConsensus ( Rococo ) , Parachain ( 1000 ) ) ) ,
462+ Location :: new( 2 , [ GlobalConsensus ( Rococo ) , Parachain ( 1000 ) ] ) ,
463463 vec![ ClearOrigin ; HARD_MESSAGE_SIZE_LIMIT as usize ] . into( ) ,
464464 ) ,
465465 Err ( SendError :: ExceedsMaxMessageSize ) ,
@@ -483,14 +483,14 @@ mod tests {
483483 #[ test]
484484 fn returns_proper_delivery_price ( ) {
485485 run_test ( || {
486- let dest = MultiLocation :: new ( 2 , X1 ( GlobalConsensus ( BridgedNetworkId :: get ( ) ) ) ) ;
486+ let dest = Location :: new ( 2 , [ GlobalConsensus ( BridgedNetworkId :: get ( ) ) ] ) ;
487487 let xcm: Xcm < ( ) > = vec ! [ ClearOrigin ] . into ( ) ;
488488 let msg_size = xcm. encoded_size ( ) ;
489489
490490 // initially the base fee is used: `BASE_FEE + BYTE_FEE * msg_size + HRMP_FEE`
491491 let expected_fee = BASE_FEE + BYTE_FEE * ( msg_size as u128 ) + HRMP_FEE ;
492492 assert_eq ! (
493- XcmBridgeHubRouter :: validate( & mut Some ( dest) , & mut Some ( xcm. clone( ) ) )
493+ XcmBridgeHubRouter :: validate( & mut Some ( dest. clone ( ) ) , & mut Some ( xcm. clone( ) ) )
494494 . unwrap( )
495495 . 1
496496 . get( 0 ) ,
@@ -518,10 +518,7 @@ mod tests {
518518 run_test ( || {
519519 let old_bridge = XcmBridgeHubRouter :: bridge ( ) ;
520520 assert_ok ! ( send_xcm:: <XcmBridgeHubRouter >(
521- MultiLocation :: new(
522- 2 ,
523- X2 ( GlobalConsensus ( BridgedNetworkId :: get( ) ) , Parachain ( 1000 ) )
524- ) ,
521+ Location :: new( 2 , [ GlobalConsensus ( BridgedNetworkId :: get( ) ) , Parachain ( 1000 ) ] ) ,
525522 vec![ ClearOrigin ] . into( ) ,
526523 )
527524 . map( drop) ) ;
@@ -538,10 +535,7 @@ mod tests {
538535
539536 let old_bridge = XcmBridgeHubRouter :: bridge ( ) ;
540537 assert_ok ! ( send_xcm:: <XcmBridgeHubRouter >(
541- MultiLocation :: new(
542- 2 ,
543- X2 ( GlobalConsensus ( BridgedNetworkId :: get( ) ) , Parachain ( 1000 ) )
544- ) ,
538+ Location :: new( 2 , [ GlobalConsensus ( BridgedNetworkId :: get( ) ) , Parachain ( 1000 ) ] ) ,
545539 vec![ ClearOrigin ] . into( ) ,
546540 )
547541 . map( drop) ) ;
@@ -560,10 +554,7 @@ mod tests {
560554
561555 let old_bridge = XcmBridgeHubRouter :: bridge ( ) ;
562556 assert_ok ! ( send_xcm:: <XcmBridgeHubRouter >(
563- MultiLocation :: new(
564- 2 ,
565- X2 ( GlobalConsensus ( BridgedNetworkId :: get( ) ) , Parachain ( 1000 ) )
566- ) ,
557+ Location :: new( 2 , [ GlobalConsensus ( BridgedNetworkId :: get( ) ) , Parachain ( 1000 ) ] ) ,
567558 vec![ ClearOrigin ] . into( ) ,
568559 )
569560 . map( drop) ) ;
0 commit comments