@@ -47,7 +47,7 @@ use frame_support::{
4747 traits:: { EnsureOrigin , Get } ,
4848 weights:: { constants:: WEIGHT_REF_TIME_PER_MILLIS , Weight } ,
4949} ;
50- use polkadot_runtime_common:: xcm_sender:: ConstantPrice ;
50+ use polkadot_runtime_common:: xcm_sender:: PriceForParachainDelivery ;
5151use rand_chacha:: {
5252 rand_core:: { RngCore , SeedableRng } ,
5353 ChaChaRng ,
@@ -107,7 +107,7 @@ pub mod pallet {
107107 type ControllerOriginConverter : ConvertOrigin < Self :: RuntimeOrigin > ;
108108
109109 /// The price for delivering an XCM to a sibling parachain destination.
110- type PriceForSiblingDelivery : PriceForSiblingDelivery ;
110+ type PriceForSiblingDelivery : PriceForParachainDelivery ;
111111
112112 /// The weight information of this pallet.
113113 type WeightInfo : WeightInfo ;
@@ -1137,22 +1137,6 @@ impl<T: Config> XcmpMessageSource for Pallet<T> {
11371137 }
11381138}
11391139
1140- pub trait PriceForSiblingDelivery {
1141- fn price_for_sibling_delivery ( id : ParaId , message : & Xcm < ( ) > ) -> MultiAssets ;
1142- }
1143-
1144- impl PriceForSiblingDelivery for ( ) {
1145- fn price_for_sibling_delivery ( _: ParaId , _: & Xcm < ( ) > ) -> MultiAssets {
1146- MultiAssets :: new ( )
1147- }
1148- }
1149-
1150- impl < T : Get < MultiAssets > > PriceForSiblingDelivery for ConstantPrice < T > {
1151- fn price_for_sibling_delivery ( _: ParaId , _: & Xcm < ( ) > ) -> MultiAssets {
1152- T :: get ( )
1153- }
1154- }
1155-
11561140/// Xcm sender for sending to a sibling parachain.
11571141impl < T : Config > SendXcm for Pallet < T > {
11581142 type Ticket = ( ParaId , VersionedXcm < ( ) > ) ;
@@ -1168,7 +1152,7 @@ impl<T: Config> SendXcm for Pallet<T> {
11681152 MultiLocation { parents : 1 , interior : X1 ( Parachain ( id) ) } => {
11691153 let xcm = msg. take ( ) . ok_or ( SendError :: MissingArgument ) ?;
11701154 let id = ParaId :: from ( * id) ;
1171- let price = T :: PriceForSiblingDelivery :: price_for_sibling_delivery ( id, & xcm) ;
1155+ let price = T :: PriceForSiblingDelivery :: price_for_parachain_delivery ( id, & xcm) ;
11721156 let versioned_xcm = T :: VersionWrapper :: wrap_version ( & d, xcm)
11731157 . map_err ( |( ) | SendError :: DestinationUnsupported ) ?;
11741158 Ok ( ( ( id, versioned_xcm) , price) )
0 commit comments