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
52 type DefaultMinGasPrice: Get<u64>;52 type DefaultMinGasPrice: Get<u64>;
5353
54 #[pallet::constant]54 #[pallet::constant]
55 type MaxOverridedAllowedLocations: Get<u32>;55 type MaxXcmAllowedLocations: Get<u32>;
56 #[pallet::constant]56 #[pallet::constant]
57 type AppPromotionDailyRate: Get<Perbill>;57 type AppPromotionDailyRate: Get<Perbill>;
58 #[pallet::constant]58 #[pallet::constant]
7777
78 #[pallet::storage]78 #[pallet::storage]
79 pub type XcmAllowedLocationsOverride<T: Config> = StorageValue<79 pub type XcmAllowedLocationsOverride<T: Config> = StorageValue<
80 Value = BoundedVec<MultiLocation, T::MaxOverridedAllowedLocations>,80 Value = BoundedVec<MultiLocation, T::MaxXcmAllowedLocations>,
81 QueryKind = OptionQuery,81 QueryKind = OptionQuery,
82 >;82 >;
8383
118 #[pallet::weight(T::DbWeight::get().writes(1))]118 #[pallet::weight(T::DbWeight::get().writes(1))]
119 pub fn set_xcm_allowed_locations(119 pub fn set_xcm_allowed_locations(
120 origin: OriginFor<T>,120 origin: OriginFor<T>,
121 locations: Option<BoundedVec<MultiLocation, T::MaxOverridedAllowedLocations>>,121 locations: Option<BoundedVec<MultiLocation, T::MaxXcmAllowedLocations>>,
122 ) -> DispatchResult {122 ) -> DispatchResult {
123 ensure_root(origin)?;123 ensure_root(origin)?;
124 <XcmAllowedLocationsOverride<T>>::set(locations);124 <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
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -169,7 +169,7 @@
     "pallet-maintenance/std",
 ]
 limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
-quartz-runtime = ['refungible', 'app-promotion']
+quartz-runtime = ['refungible', 'app-promotion', 'foreign-assets']
 
 refungible = []
 scheduler = []
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