git.delta.rocks / unique-network / refs/commits / 7fd4751d0ab2

difftreelog

Merge pull request #784 from UniqueNetwork/fix/enable-foreign-assets-qtz-and-minor-fixes

kozyrevdev2022-12-16parents: #9a4bd0b #f08f3da.patch.diff
in: master
Fix/enable foreign assets qtz and minor fixes

6 files changed

modifiedpallets/app-promotion/src/lib.rsdiffbeforeafterboth
--- a/pallets/app-promotion/src/lib.rs
+++ b/pallets/app-promotion/src/lib.rs
@@ -564,7 +564,7 @@
 		/// # Arguments
 		///
 		/// * `stakers_number`: the number of stakers for which recalculation will be performed
-		#[pallet::weight(<T as Config>::WeightInfo::payout_stakers(stakers_number.unwrap_or(20) as u32))]
+		#[pallet::weight(<T as Config>::WeightInfo::payout_stakers(stakers_number.unwrap_or(DEFAULT_NUMBER_PAYOUTS) as u32))]
 		pub fn payout_stakers(admin: OriginFor<T>, stakers_number: Option<u8>) -> DispatchResult {
 			let admin_id = ensure_signed(admin)?;
 
modifiedpallets/configuration/src/lib.rsdiffbeforeafterboth
--- a/pallets/configuration/src/lib.rs
+++ b/pallets/configuration/src/lib.rs
@@ -52,7 +52,7 @@
 		type DefaultMinGasPrice: Get<u64>;
 
 		#[pallet::constant]
-		type MaxOverridedAllowedLocations: Get<u32>;
+		type MaxXcmAllowedLocations: Get<u32>;
 		#[pallet::constant]
 		type AppPromotionDailyRate: Get<Perbill>;
 		#[pallet::constant]
@@ -77,7 +77,7 @@
 
 	#[pallet::storage]
 	pub type XcmAllowedLocationsOverride<T: Config> = StorageValue<
-		Value = BoundedVec<MultiLocation, T::MaxOverridedAllowedLocations>,
+		Value = BoundedVec<MultiLocation, T::MaxXcmAllowedLocations>,
 		QueryKind = OptionQuery,
 	>;
 
@@ -118,7 +118,7 @@
 		#[pallet::weight(T::DbWeight::get().writes(1))]
 		pub fn set_xcm_allowed_locations(
 			origin: OriginFor<T>,
-			locations: Option<BoundedVec<MultiLocation, T::MaxOverridedAllowedLocations>>,
+			locations: Option<BoundedVec<MultiLocation, T::MaxXcmAllowedLocations>>,
 		) -> DispatchResult {
 			ensure_root(origin)?;
 			<XcmAllowedLocationsOverride<T>>::set(locations);
modifiedruntime/common/config/pallets/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -106,7 +106,7 @@
 impl pallet_configuration::Config for Runtime {
 	type DefaultWeightToFeeCoefficient = ConstU32<{ up_common::constants::WEIGHT_TO_FEE_COEFF }>;
 	type DefaultMinGasPrice = ConstU64<{ up_common::constants::MIN_GAS_PRICE }>;
-	type MaxOverridedAllowedLocations = ConstU32<16>;
+	type MaxXcmAllowedLocations = ConstU32<16>;
 	type AppPromotionDailyRate = AppPromotionDailyRate;
 	type DayRelayBlocks = DayRelayBlocks;
 }
modifiedruntime/common/construct_runtime/mod.rsdiffbeforeafterboth
--- a/runtime/common/construct_runtime/mod.rs
+++ b/runtime/common/construct_runtime/mod.rs
@@ -82,7 +82,7 @@
                 #[runtimes(opal, quartz)]
                 AppPromotion: pallet_app_promotion::{Pallet, Call, Storage, Event<T>} = 73,
 
-                #[runtimes(opal)]
+                #[runtimes(opal, quartz)]
                 ForeignAssets: pallet_foreign_assets::{Pallet, Call, Storage, Event<T>} = 80,
 
                 // Frontier
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
169 "pallet-maintenance/std",169 "pallet-maintenance/std",
170]170]
171limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']171limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
172quartz-runtime = ['refungible', 'app-promotion']172quartz-runtime = ['refungible', 'app-promotion', 'foreign-assets']
173173
174refungible = []174refungible = []
175scheduler = []175scheduler = []
modifiedtests/src/pallet-presence.test.tsdiffbeforeafterboth
--- a/tests/src/pallet-presence.test.ts
+++ b/tests/src/pallet-presence.test.ts
@@ -80,6 +80,7 @@
         requiredPallets.push(
           refungible,
           appPromotion,
+          foreignAssets,
         );
       } else if (chain.eq('UNIQUE')) {
         // Insert Unique additional pallets here