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
564 /// # Arguments564 /// # Arguments
565 ///565 ///
566 /// * `stakers_number`: the number of stakers for which recalculation will be performed566 /// * `stakers_number`: the number of stakers for which recalculation will be performed
567 #[pallet::weight(<T as Config>::WeightInfo::payout_stakers(stakers_number.unwrap_or(20) as u32))]567 #[pallet::weight(<T as Config>::WeightInfo::payout_stakers(stakers_number.unwrap_or(DEFAULT_NUMBER_PAYOUTS) as u32))]
568 pub fn payout_stakers(admin: OriginFor<T>, stakers_number: Option<u8>) -> DispatchResult {568 pub fn payout_stakers(admin: OriginFor<T>, stakers_number: Option<u8>) -> DispatchResult {
569 let admin_id = ensure_signed(admin)?;569 let admin_id = ensure_signed(admin)?;
570570
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
106impl pallet_configuration::Config for Runtime {106impl pallet_configuration::Config for Runtime {
107 type DefaultWeightToFeeCoefficient = ConstU32<{ up_common::constants::WEIGHT_TO_FEE_COEFF }>;107 type DefaultWeightToFeeCoefficient = ConstU32<{ up_common::constants::WEIGHT_TO_FEE_COEFF }>;
108 type DefaultMinGasPrice = ConstU64<{ up_common::constants::MIN_GAS_PRICE }>;108 type DefaultMinGasPrice = ConstU64<{ up_common::constants::MIN_GAS_PRICE }>;
109 type MaxOverridedAllowedLocations = ConstU32<16>;109 type MaxXcmAllowedLocations = ConstU32<16>;
110 type AppPromotionDailyRate = AppPromotionDailyRate;110 type AppPromotionDailyRate = AppPromotionDailyRate;
111 type DayRelayBlocks = DayRelayBlocks;111 type DayRelayBlocks = DayRelayBlocks;
112}112}
modifiedruntime/common/construct_runtime/mod.rsdiffbeforeafterboth
82 #[runtimes(opal, quartz)]82 #[runtimes(opal, quartz)]
83 AppPromotion: pallet_app_promotion::{Pallet, Call, Storage, Event<T>} = 73,83 AppPromotion: pallet_app_promotion::{Pallet, Call, Storage, Event<T>} = 73,
8484
85 #[runtimes(opal)]85 #[runtimes(opal, quartz)]
86 ForeignAssets: pallet_foreign_assets::{Pallet, Call, Storage, Event<T>} = 80,86 ForeignAssets: pallet_foreign_assets::{Pallet, Call, Storage, Event<T>} = 80,
8787
88 // Frontier88 // 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
80 requiredPallets.push(80 requiredPallets.push(
81 refungible,81 refungible,
82 appPromotion,82 appPromotion,
83 foreignAssets,
83 );84 );
84 } else if (chain.eq('UNIQUE')) {85 } else if (chain.eq('UNIQUE')) {
85 // Insert Unique additional pallets here86 // Insert Unique additional pallets here