difftreelog
added the ability to configure pallet `app-promotion` via the `configuration` palette
in: master
14 files changed
Cargo.lockdiffbeforeafterboth552455245525[[package]]5525[[package]]5526name = "pallet-app-promotion"5526name = "pallet-app-promotion"5527version = "0.1.0"5527version = "0.1.1"5528dependencies = [5528dependencies = [5529 "frame-benchmarking",5529 "frame-benchmarking",5530 "frame-support",5530 "frame-support",5531 "frame-system",5531 "frame-system",5532 "pallet-balances",5532 "pallet-balances",5533 "pallet-common",5533 "pallet-common",5534 "pallet-configuration",5534 "pallet-evm",5535 "pallet-evm",5535 "pallet-evm-contract-helpers",5536 "pallet-evm-contract-helpers",5536 "pallet-evm-migration",5537 "pallet-evm-migration",578457855785[[package]]5786[[package]]5786name = "pallet-configuration"5787name = "pallet-configuration"5787version = "0.1.1"5788version = "0.1.2"5788dependencies = [5789dependencies = [5789 "fp-evm",5790 "fp-evm",5790 "frame-support",5791 "frame-support",pallets/app-promotion/CHANGELOG.mddiffbeforeafterbothno changes
pallets/app-promotion/Cargo.tomldiffbeforeafterboth9license = 'GPLv3'9license = 'GPLv3'10name = 'pallet-app-promotion'10name = 'pallet-app-promotion'11repository = 'https://github.com/UniqueNetwork/unique-chain'11repository = 'https://github.com/UniqueNetwork/unique-chain'12version = '0.1.0'12version = '0.1.1'131314[package.metadata.docs.rs]14[package.metadata.docs.rs]15targets = ['x86_64-unknown-linux-gnu']15targets = ['x86_64-unknown-linux-gnu']686869up-data-structs = { default-features = false, path = "../../primitives/data-structs" }69up-data-structs = { default-features = false, path = "../../primitives/data-structs" }70pallet-common = { default-features = false, path = "../common" }70pallet-common = { default-features = false, path = "../common" }71pallet-configuration = { default-features = false, path = "../configuration" }71pallet-unique = { default-features = false, path = "../unique" }72pallet-unique = { default-features = false, path = "../unique" }72pallet-evm-contract-helpers = { default-features = false, path = "../evm-contract-helpers" }73pallet-evm-contract-helpers = { default-features = false, path = "../evm-contract-helpers" }73pallet-evm-migration = { default-features = false, path = "../evm-migration" }74pallet-evm-migration = { default-features = false, path = "../evm-migration" }pallets/app-promotion/src/lib.rsdiffbeforeafterboth103103104 #[pallet::config]104 #[pallet::config]105 pub trait Config: frame_system::Config + pallet_evm::Config {105 pub trait Config:106 frame_system::Config + pallet_evm::Config + pallet_configuration::Config107 {106 /// Type to interact with the native token108 /// Type to interact with the native token107 type Currency: ExtendedLockableCurrency<Self::AccountId>109 type Currency: ExtendedLockableCurrency<Self::AccountId>330 amount >= <BalanceOf<T>>::from(100u128) * T::Nominal::get(),332 amount >= <BalanceOf<T>>::from(100u128) * T::Nominal::get(),331 ArithmeticError::Underflow333 ArithmeticError::Underflow332 );334 );335 let config = <PalletConfiguration<T>>::get();333336334 let balance =337 let balance =335 <<T as Config>::Currency as Currency<T::AccountId>>::free_balance(&staker_id);338 <<T as Config>::Currency as Currency<T::AccountId>>::free_balance(&staker_id);351 // Calculation of the number of recalculation periods,354 // Calculation of the number of recalculation periods,352 // after how much the first interest calculation should be performed for the stake355 // after how much the first interest calculation should be performed for the stake353 let recalculate_after_interval: T::BlockNumber =356 let recalculate_after_interval: T::BlockNumber =354 if block_number % T::RecalculationInterval::get() == 0u32.into() {357 if block_number % config.recalculation_interval == 0u32.into() {355 1u32.into()358 1u32.into()356 } else {359 } else {357 2u32.into()360 2u32.into()358 };361 };359362360 // Сalculation of the number of the relay block363 // Сalculation of the number of the relay block361 // in which it is necessary to accrue remuneration for the stake.364 // in which it is necessary to accrue remuneration for the stake.362 let recalc_block = (block_number / T::RecalculationInterval::get()365 let recalc_block = (block_number / config.recalculation_interval363 + recalculate_after_interval)366 + recalculate_after_interval)364 * T::RecalculationInterval::get();367 * config.recalculation_interval;365368366 <Staked<T>>::insert((&staker_id, block_number), {369 <Staked<T>>::insert((&staker_id, block_number), {367 let mut balance_and_recalc_block = <Staked<T>>::get((&staker_id, block_number));370 let mut balance_and_recalc_block = <Staked<T>>::get((&staker_id, block_number));393 #[pallet::weight(<T as Config>::WeightInfo::unstake())]396 #[pallet::weight(<T as Config>::WeightInfo::unstake())]394 pub fn unstake(staker: OriginFor<T>) -> DispatchResultWithPostInfo {397 pub fn unstake(staker: OriginFor<T>) -> DispatchResultWithPostInfo {395 let staker_id = ensure_signed(staker)?;398 let staker_id = ensure_signed(staker)?;399 let config = <PalletConfiguration<T>>::get();396400397 // calculate block number where the sum would be free401 // calculate block number where the sum would be free398 let block = <frame_system::Pallet<T>>::block_number() + T::PendingInterval::get();402 let block = <frame_system::Pallet<T>>::block_number() + config.pending_interval;399403400 let mut pendings = <PendingUnstake<T>>::get(block);404 let mut pendings = <PendingUnstake<T>>::get(block);401405568 admin_id == Admin::<T>::get().ok_or(Error::<T>::AdminNotSet)?,572 admin_id == Admin::<T>::get().ok_or(Error::<T>::AdminNotSet)?,569 Error::<T>::NoPermission573 Error::<T>::NoPermission570 );574 );575 let config = <PalletConfiguration<T>>::get();576577 let mut stakers_number = stakers_number.unwrap_or(DEFAULT_NUMBER_PAYOUTS);578579 ensure!(580 stakers_number <= config.max_stakers_per_calculation,581 Error::<T>::NoPermission582 );571583572 // calculate the number of the current recalculation block,584 // calculate the number of the current recalculation block,573 // this is necessary in order to understand which stakers we should calculate interest585 // this is necessary in order to understand which stakers we should calculate interest574 let current_recalc_block =586 let current_recalc_block = Self::get_current_recalc_block(575 Self::get_current_recalc_block(T::RelayBlockNumberProvider::current_block_number());587 T::RelayBlockNumberProvider::current_block_number(),588 &config,589 );576590577 // calculate the number of the next recalculation block,591 // calculate the number of the next recalculation block,578 // this value is set for the stakers to whom the recalculation will be performed592 // this value is set for the stakers to whom the recalculation will be performed579 let next_recalc_block = current_recalc_block + T::RecalculationInterval::get();593 let next_recalc_block = current_recalc_block + config.recalculation_interval;580594581 let mut storage_iterator = Self::get_next_calculated_key()595 let mut storage_iterator = Self::get_next_calculated_key()582 .map_or(Staked::<T>::iter(), |key| Staked::<T>::iter_from(key));596 .map_or(Staked::<T>::iter(), |key| Staked::<T>::iter_from(key));583597584 NextCalculatedRecord::<T>::set(None);598 NextCalculatedRecord::<T>::set(None);585599586 {600 {587 let mut stakers_number = stakers_number.unwrap_or(20);588 let last_id = RefCell::new(None);601 let last_id = RefCell::new(None);589 let income_acc = RefCell::new(BalanceOf::<T>::default());602 let income_acc = RefCell::new(BalanceOf::<T>::default());590 let amount_acc = RefCell::new(BalanceOf::<T>::default());603 let amount_acc = RefCell::new(BalanceOf::<T>::default());644 next_recalc_block,657 next_recalc_block,645 amount,658 amount,646 ((current_recalc_block - next_recalc_block_for_stake)659 ((current_recalc_block - next_recalc_block_for_stake)647 / T::RecalculationInterval::get())660 / config.recalculation_interval)648 .into() + 1,661 .into() + 1,649 &mut *income_acc.borrow_mut(),662 &mut *income_acc.borrow_mut(),650 );663 );810 where823 where811 I: EncodeLike<BalanceOf<T>> + Balance,824 I: EncodeLike<BalanceOf<T>> + Balance,812 {825 {826 let config = <PalletConfiguration<T>>::get();813 let mut income = base;827 let mut income = base;814828815 (0..iters).for_each(|_| income += T::IntervalIncome::get() * income);829 (0..iters).for_each(|_| income += config.interval_income * income);816830817 income - base831 income - base818 }832 }819833820 fn get_current_recalc_block(current_relay_block: T::BlockNumber) -> T::BlockNumber {834 fn get_current_recalc_block(835 current_relay_block: T::BlockNumber,836 config: &PalletConfiguration<T>,837 ) -> T::BlockNumber {821 (current_relay_block / T::RecalculationInterval::get()) * T::RecalculationInterval::get()838 (current_relay_block / config.recalculation_interval) * config.recalculation_interval822 }839 }823840824 fn get_next_calculated_key() -> Option<Vec<u8>> {841 fn get_next_calculated_key() -> Option<Vec<u8>> {pallets/app-promotion/src/types.rsdiffbeforeafterboth4use pallet_balances::{BalanceLock, Config as BalancesConfig, Pallet as PalletBalances};4use pallet_balances::{BalanceLock, Config as BalancesConfig, Pallet as PalletBalances};5use pallet_common::CollectionHandle;5use pallet_common::CollectionHandle;667use sp_runtime::DispatchError;7use sp_runtime::{DispatchError, Perbill};8use up_data_structs::{CollectionId};8use up_data_structs::{CollectionId};9use sp_std::borrow::ToOwned;9use sp_std::borrow::ToOwned;10use pallet_evm_contract_helpers::{Pallet as EvmHelpersPallet, Config as EvmHelpersConfig};10use pallet_evm_contract_helpers::{Pallet as EvmHelpersPallet, Config as EvmHelpersConfig};11use pallet_configuration::{AppPromomotionConfigurationOverride};12use sp_core::Get;1314const MAX_NUMBER_PAYOUTS: u8 = 100;15pub(crate) const DEFAULT_NUMBER_PAYOUTS: u8 = 20;111612/// This trait was defined because `LockableCurrency`17/// This trait was defined because `LockableCurrency`13/// has no way to know the state of the lock for an account.18/// has no way to know the state of the lock for an account.128 Ok(Self::get_sponsor(contract_address))133 Ok(Self::get_sponsor(contract_address))129 }134 }130}135}136pub(crate) struct PalletConfiguration<T: crate::Config> {137 /// In relay blocks.138 pub recalculation_interval: T::BlockNumber,139 /// In parachain blocks.140 pub pending_interval: T::BlockNumber,141 /// Value for `RecalculationInterval` based on 0.05% per 24h.142 pub interval_income: Perbill,143 /// Maximum allowable number of stakers calculated per call of the `app-promotion::PayoutStakers` extrinsic.144 pub max_stakers_per_calculation: u8,145}146impl<T: crate::Config> PalletConfiguration<T> {147 pub fn get() -> Self {148 let config = <AppPromomotionConfigurationOverride<T>>::get().unwrap_or_default();149 Self {150 recalculation_interval: config.0.unwrap_or(T::RecalculationInterval::get()),151 pending_interval: config.2.unwrap_or(T::PendingInterval::get()),152 interval_income: config.1.unwrap_or(T::IntervalIncome::get()),153 max_stakers_per_calculation: config.3.unwrap_or(MAX_NUMBER_PAYOUTS),154 }155 }156}131157pallets/configuration/CHANGELOG.mddiffbeforeafterboth1<!-- bureaucrate goes here -->1<!-- bureaucrate goes here -->2## [0.1.2] - 2022-12-1334### Added56- The ability to configure pallet `app-promotion` via the `configuration` palette72## [v0.1.1] 2022-08-168## [v0.1.1] 2022-08-16394### Other changes10### Other changespallets/configuration/Cargo.tomldiffbeforeafterboth1[package]1[package]2name = "pallet-configuration"2name = "pallet-configuration"3version = "0.1.1"3version = "0.1.2"4edition = "2021"4edition = "2021"556[dependencies]6[dependencies]pallets/configuration/src/lib.rsdiffbeforeafterboth515152 #[pallet::constant]52 #[pallet::constant]53 type MaxOverridedAllowedLocations: Get<u32>;53 type MaxOverridedAllowedLocations: Get<u32>;54 #[pallet::constant]55 type AppPromotionDailyRate: Get<Perbill>;56 #[pallet::constant]57 type DayRelayBlocks: Get<Self::BlockNumber>;54 }58 }555956 #[pallet::storage]60 #[pallet::storage]70 QueryKind = OptionQuery,74 QueryKind = OptionQuery,71 >;75 >;7677 #[pallet::storage]78 pub type AppPromomotionConfigurationOverride<T: Config> = StorageValue<79 Value = (80 Option<T::BlockNumber>,81 Option<Perbill>,82 Option<T::BlockNumber>,83 Option<u8>,84 ),85 QueryKind = OptionQuery,86 >;728773 #[pallet::call]88 #[pallet::call]74 impl<T: Config> Pallet<T> {89 impl<T: Config> Pallet<T> {110 Ok(())125 Ok(())111 }126 }127128 #[pallet::weight(T::DbWeight::get().writes(1))]129 pub fn set_app_promotion_configuration_override(130 origin: OriginFor<T>,131 recalculation_interval: Option<T::BlockNumber>,132 pending_interval: Option<T::BlockNumber>,133 stakers_payout_limit: Option<u8>,134 ) -> DispatchResult {135 let _sender = ensure_root(origin)?;136137 if recalculation_interval.is_none()138 && pending_interval.is_none()139 && stakers_payout_limit.is_none()140 {141 <AppPromomotionConfigurationOverride<T>>::kill();142 } else {143 let mut current_config =144 <AppPromomotionConfigurationOverride<T>>::take().unwrap_or_default();145146 recalculation_interval.map(|b| {147 current_config.0 = Some(b);148 current_config.1 = Some(149 Perbill::from_rational(b, T::DayRelayBlocks::get())150 * T::AppPromotionDailyRate::get(),151 )152 });153 pending_interval.map(|b| current_config.2 = Some(b));154 stakers_payout_limit.map(|p| current_config.3 = Some(p));155 <AppPromomotionConfigurationOverride<T>>::set(Some(current_config));156 }157158 Ok(())159 }112 }160 }113161114 #[pallet::pallet]162 #[pallet::pallet]runtime/common/config/pallets/app_promotion.rsdiffbeforeafterboth26 types::Balance,26 types::Balance,27};27};282829#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]30parameter_types! {31 pub const AppPromotionId: PalletId = PalletId(*b"appstake");32 pub const RecalculationInterval: BlockNumber = 8;33 pub const PendingInterval: BlockNumber = 4;34 pub const Nominal: Balance = UNIQUE;35 pub IntervalIncome: Perbill = Perbill::from_rational(RecalculationInterval::get(), RELAY_DAYS) * Perbill::from_rational(5u32, 10_000);36}3738#[cfg(any(feature = "unique-runtime", feature = "quartz-runtime"))]39parameter_types! {29parameter_types! {40 pub const AppPromotionId: PalletId = PalletId(*b"appstake");30 pub const AppPromotionId: PalletId = PalletId(*b"appstake");41 pub const RecalculationInterval: BlockNumber = RELAY_DAYS;31 pub const RecalculationInterval: BlockNumber = RELAY_DAYS;runtime/common/config/pallets/mod.rsdiffbeforeafterboth33use up_data_structs::{33use up_data_structs::{34 mapping::{EvmTokenAddressMapping, CrossTokenAddressMapping},34 mapping::{EvmTokenAddressMapping, CrossTokenAddressMapping},35};35};36use sp_arithmetic::Perbill;363737#[cfg(feature = "rmrk")]38#[cfg(feature = "rmrk")]38pub mod rmrk;39pub mod rmrk;98 type RefungibleExtensionsWeightInfo = CommonWeights<Self>;99 type RefungibleExtensionsWeightInfo = CommonWeights<Self>;99}100}100101102parameter_types! {103 pub AppPromotionDailyRate: Perbill = Perbill::from_rational(5u32, 10_000);104 pub const DayRelayBlocks: BlockNumber = RELAY_DAYS;105}101impl pallet_configuration::Config for Runtime {106impl pallet_configuration::Config for Runtime {102 type DefaultWeightToFeeCoefficient = ConstU32<{ up_common::constants::WEIGHT_TO_FEE_COEFF }>;107 type DefaultWeightToFeeCoefficient = ConstU32<{ up_common::constants::WEIGHT_TO_FEE_COEFF }>;103 type DefaultMinGasPrice = ConstU64<{ up_common::constants::MIN_GAS_PRICE }>;108 type DefaultMinGasPrice = ConstU64<{ up_common::constants::MIN_GAS_PRICE }>;104 type MaxOverridedAllowedLocations = ConstU32<16>;109 type MaxOverridedAllowedLocations = ConstU32<16>;110 type AppPromotionDailyRate = AppPromotionDailyRate;111 type DayRelayBlocks = DayRelayBlocks;105}112}106113107impl pallet_maintenance::Config for Runtime {114impl pallet_maintenance::Config for Runtime {tests/src/app-promotion.test.tsdiffbeforeafterboth31 before(async function () {31 before(async function () {32 await usingPlaygrounds(async (helper, privateKey) => {32 await usingPlaygrounds(async (helper, privateKey) => {33 requirePalletsOrSkip(this, helper, [Pallets.AppPromotion]);33 requirePalletsOrSkip(this, helper, [Pallets.AppPromotion]);34 const alice = await privateKey('//Alice');34 donor = await privateKey({filename: __filename});35 donor = await privateKey({filename: __filename});35 palletAddress = helper.arrange.calculatePalletAddress('appstake');36 palletAddress = helper.arrange.calculatePalletAddress('appstake');36 palletAdmin = await privateKey('//PromotionAdmin');37 palletAdmin = await privateKey('//PromotionAdmin');37 nominal = helper.balance.getOneTokenNominal();38 nominal = helper.balance.getOneTokenNominal();38 accounts = await helper.arrange.createCrowd(100, 1000n, donor); // create accounts-pool to speed up tests39 accounts = await helper.arrange.createCrowd(100, 1000n, donor); // create accounts-pool to speed up tests40 const api = helper.getApi();41 await helper.signTransaction(alice, api.tx.sudo.sudo(api.tx.configuration.setAppPromotionConfigurationOverride(LOCKING_PERIOD, UNLOCKING_PERIOD, null)));39 });42 });40 });43 });4144tests/src/interfaces/augment-api-consts.tsdiffbeforeafterboth79 [key: string]: Codec;79 [key: string]: Codec;80 };80 };81 configuration: {81 configuration: {82 appPromotionDailyRate: Perbill & AugmentedConst<ApiType>;83 dayRelayBlocks: u32 & AugmentedConst<ApiType>;82 defaultMinGasPrice: u64 & AugmentedConst<ApiType>;84 defaultMinGasPrice: u64 & AugmentedConst<ApiType>;83 defaultWeightToFeeCoefficient: u32 & AugmentedConst<ApiType>;85 defaultWeightToFeeCoefficient: u32 & AugmentedConst<ApiType>;84 maxOverridedAllowedLocations: u32 & AugmentedConst<ApiType>;86 maxOverridedAllowedLocations: u32 & AugmentedConst<ApiType>;tests/src/interfaces/augment-api-query.tsdiffbeforeafterboth8import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';8import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';9import type { BTreeMap, Bytes, Option, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';9import type { BTreeMap, Bytes, Option, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';10import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';10import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';11<<<<<<< HEAD11import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';12import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';12import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumLog, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlTokensAccountData, OrmlTokensBalanceLock, OrmlTokensReserveData, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletUniqueSchedulerV2BlockAgenda, PhantomTypeUpDataStructs, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, SpRuntimeDigest, SpTrieStorageProof, SpWeightsWeightV2Weight, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsProperties, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild, XcmV1MultiLocation } from '@polkadot/types/lookup';13import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumLog, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlTokensAccountData, OrmlTokensBalanceLock, OrmlTokensReserveData, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletUniqueSchedulerV2BlockAgenda, PhantomTypeUpDataStructs, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, SpRuntimeDigest, SpTrieStorageProof, SpWeightsWeightV2Weight, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsProperties, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild, XcmV1MultiLocation } from '@polkadot/types/lookup';14=======15import type { AccountId32, H160, H256, Perbill, Weight } from '@polkadot/types/interfaces/runtime';16import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumLog, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlTokensAccountData, OrmlTokensBalanceLock, OrmlTokensReserveData, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletUniqueSchedulerV2BlockAgenda, PhantomTypeUpDataStructs, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, SpRuntimeDigest, SpTrieStorageProof, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsProperties, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild, XcmV1MultiLocation } from '@polkadot/types/lookup';17>>>>>>> added the ability to configure pallet `app-promotion` via the `configuration` palette13import type { Observable } from '@polkadot/types/types';18import type { Observable } from '@polkadot/types/types';141915export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;20export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;160 [key: string]: QueryableStorageEntry<ApiType>;165 [key: string]: QueryableStorageEntry<ApiType>;161 };166 };162 configuration: {167 configuration: {168 appPromomotionConfigurationOverride: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[Option<u32>, Option<Perbill>, Option<u32>, Option<u8>]>>>, []> & QueryableStorageEntry<ApiType, []>;163 minGasPriceOverride: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;169 minGasPriceOverride: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;164 weightToFeeCoefficientOverride: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;170 weightToFeeCoefficientOverride: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;165 xcmAllowedLocationsOverride: AugmentedQuery<ApiType, () => Observable<Option<Vec<XcmV1MultiLocation>>>, []> & QueryableStorageEntry<ApiType, []>;171 xcmAllowedLocationsOverride: AugmentedQuery<ApiType, () => Observable<Option<Vec<XcmV1MultiLocation>>>, []> & QueryableStorageEntry<ApiType, []>;tests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth215 [key: string]: SubmittableExtrinsicFunction<ApiType>;215 [key: string]: SubmittableExtrinsicFunction<ApiType>;216 };216 };217 configuration: {217 configuration: {218 setAppPromotionConfigurationOverride: AugmentedSubmittable<(recalculationInterval: Option<u32> | null | Uint8Array | u32 | AnyNumber, pendingInterval: Option<u32> | null | Uint8Array | u32 | AnyNumber, stakersPayoutLimit: Option<u8> | null | Uint8Array | u8 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>, Option<u32>, Option<u8>]>;218 setMinGasPriceOverride: AugmentedSubmittable<(coeff: Option<u64> | null | Uint8Array | u64 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u64>]>;219 setMinGasPriceOverride: AugmentedSubmittable<(coeff: Option<u64> | null | Uint8Array | u64 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u64>]>;219 setWeightToFeeCoefficientOverride: AugmentedSubmittable<(coeff: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;220 setWeightToFeeCoefficientOverride: AugmentedSubmittable<(coeff: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;220 setXcmAllowedLocations: AugmentedSubmittable<(locations: Option<Vec<XcmV1MultiLocation>> | null | Uint8Array | Vec<XcmV1MultiLocation> | (XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Option<Vec<XcmV1MultiLocation>>]>;221 setXcmAllowedLocations: AugmentedSubmittable<(locations: Option<Vec<XcmV1MultiLocation>> | null | Uint8Array | Vec<XcmV1MultiLocation> | (XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Option<Vec<XcmV1MultiLocation>>]>;