git.delta.rocks / unique-network / refs/commits / fc5b26af3046

difftreelog

fix runtime benchmarks, `payout_stakers` logic, bencmarkr for payout_stakers

PraetorP2022-09-06parent: #ebc4cdb.patch.diff
in: master

15 files changed

modifiedpallets/app-promotion/Cargo.tomldiffbeforeafterboth
--- a/pallets/app-promotion/Cargo.toml
+++ b/pallets/app-promotion/Cargo.toml
@@ -20,18 +20,23 @@
     'frame-benchmarking',
     'frame-support/runtime-benchmarks',
     'frame-system/runtime-benchmarks',
+    # 'pallet-unique/runtime-benchmarks',
 ]
 std = [
     'codec/std',
-    'serde/std',
+    'frame-benchmarking/std',
     'frame-support/std',
     'frame-system/std',
     'pallet-balances/std',
     'pallet-timestamp/std',
     'pallet-randomness-collective-flip/std',
+    'pallet-evm/std',
+    'sp-io/std',
     'sp-std/std',
     'sp-runtime/std',
-    'frame-benchmarking/std',
+    'sp-core/std',
+    'serde/std',
+
 ]
 
 ################################################################################
@@ -108,24 +113,24 @@
 # local dependencies
 [dependencies.up-data-structs]
 default-features = false
-path =  "../../primitives/data-structs"
+path = "../../primitives/data-structs"
 
 [dependencies.pallet-common]
 default-features = false
-path =  "../common"
+path = "../common"
 
 [dependencies.pallet-unique]
 default-features = false
-path =  "../unique"
+path = "../unique"
 
 [dependencies.pallet-evm-contract-helpers]
 default-features = false
-path =  "../evm-contract-helpers"
+path = "../evm-contract-helpers"
 
 [dev-dependencies]
 [dependencies.pallet-evm-migration]
 default-features = false
-path =  "../evm-migration"
+path = "../evm-migration"
 
 
 ################################################################################
modifiedpallets/app-promotion/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/app-promotion/src/benchmarking.rs
+++ b/pallets/app-promotion/src/benchmarking.rs
@@ -28,11 +28,8 @@
 use pallet_unique::benchmarking::create_nft_collection;
 use pallet_evm_migration::Pallet as EvmMigrationPallet;
 
-// trait BenchmarkingConfig: Config + pallet_unique::Config { }
-
-// impl<T: Config + pallet_unique::Config> BenchmarkingConfig for T { }
+const SEED: u32 = 0;
 
-const SEED: u32 = 0;
 benchmarks! {
 	where_clause{
 		where T:  Config + pallet_unique::Config + pallet_evm_migration::Config ,
@@ -53,18 +50,32 @@
 	} : {PromototionPallet::<T>::set_admin_address(RawOrigin::Root.into(), T::CrossAccountId::from_sub(pallet_admin))?}
 
 	payout_stakers{
+		let b in 1..101;
+
 		let pallet_admin = account::<T::AccountId>("admin", 0, SEED);
-		let share = Perbill::from_rational(1u32, 100);
+		let share = Perbill::from_rational(1u32, 20);
 		PromototionPallet::<T>::set_admin_address(RawOrigin::Root.into(), T::CrossAccountId::from_sub(pallet_admin.clone()))?;
-		let _ = <T as Config>::Currency::make_free_balance_be(&pallet_admin,  Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());
+		<T as Config>::Currency::make_free_balance_be(&pallet_admin,  Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());
+
 		let staker: T::AccountId = account("caller", 0, SEED);
-		let stakers: Vec<T::AccountId> = (0..100).map(|index| account("staker", index, SEED)).collect();
+		<T as Config>::Currency::make_free_balance_be(&staker,  Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());
+		let stakers: Vec<T::AccountId> = (0..b).map(|index| account("staker", index, SEED)).collect();
 		stakers.iter().for_each(|staker| {
 			<T as Config>::Currency::make_free_balance_be(&staker,  Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());
 		});
-		let _ = <T as Config>::Currency::make_free_balance_be(&staker,  Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());
-		let _ = PromototionPallet::<T>::stake(RawOrigin::Signed(staker.clone()).into(), share * <T as Config>::Currency::total_balance(&staker))?;
-	} : {PromototionPallet::<T>::payout_stakers(RawOrigin::Signed(pallet_admin.clone()).into(), Some(1))?}
+		(0..10).try_for_each(|_| {
+			stakers.iter()
+				.map(|staker| {
+				
+					PromototionPallet::<T>::stake(RawOrigin::Signed(staker.clone()).into(), Into::<BalanceOf<T>>::into(100u128) * T::Nominal::get())
+				}).collect::<Result<Vec<_>, _>>()?;
+			<frame_system::Pallet<T>>::finalize();
+			Result::<(), sp_runtime::DispatchError>::Ok(())
+		})?;
+
+		// let _ = <T as Config>::Currency::make_free_balance_be(&staker,  Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());
+		// let _ = PromototionPallet::<T>::stake(RawOrigin::Signed(staker.clone()).into(), share * <T as Config>::Currency::total_balance(&staker))?;
+	} : {PromototionPallet::<T>::payout_stakers(RawOrigin::Signed(pallet_admin.clone()).into(), Some(b as u8))?}
 
 	stake {
 		let caller = account::<T::AccountId>("caller", 0, SEED);
@@ -76,7 +87,10 @@
 		let caller = account::<T::AccountId>("caller", 0, SEED);
 		let share = Perbill::from_rational(1u32, 20);
 		let _ = <T as Config>::Currency::make_free_balance_be(&caller,  Perbill::from_rational(1u32, 2) * BalanceOf::<T>::max_value());
-		(0..10).map(|_| PromototionPallet::<T>::stake(RawOrigin::Signed(caller.clone()).into(), share * <T as Config>::Currency::total_balance(&caller))).collect::<Result<Vec<_>, _>>()?;
+		(0..10).map(|_| {
+			<frame_system::Pallet<T>>::finalize();
+			PromototionPallet::<T>::stake(RawOrigin::Signed(caller.clone()).into(), share * <T as Config>::Currency::total_balance(&caller))
+		}).collect::<Result<Vec<_>, _>>()?;
 
 	} : {PromototionPallet::<T>::unstake(RawOrigin::Signed(caller.clone()).into())?}
 
modifiedpallets/app-promotion/src/lib.rsdiffbeforeafterboth
--- a/pallets/app-promotion/src/lib.rs
+++ b/pallets/app-promotion/src/lib.rs
@@ -157,7 +157,7 @@
 		/// No permission to perform an action
 		NoPermission,
 		/// Insufficient funds to perform an action
-		NotSufficientFounds,
+		NotSufficientFunds,
 		PendingForBlockOverflow,
 		/// An error related to the fact that an invalid argument was passed to perform an action
 		InvalidArgument,
@@ -285,14 +285,23 @@
 			<<T as Config>::Currency as Currency<T::AccountId>>::ensure_can_withdraw(
 				&staker_id,
 				amount,
-				WithdrawReasons::all(),
+				WithdrawReasons::RESERVE,
 				balance - amount,
 			)?;
 
 			Self::add_lock_balance(&staker_id, amount)?;
 
 			let block_number = T::RelayBlockNumberProvider::current_block_number();
-			let recalc_block = (block_number / T::RecalculationInterval::get() + 2u32.into())
+
+			let recalculate_after_interval: T::BlockNumber =
+				if block_number % T::RecalculationInterval::get() == 0u32.into() {
+					1u32.into()
+				} else {
+					2u32.into()
+				};
+
+			let recalc_block = (block_number / T::RecalculationInterval::get()
+				+ recalculate_after_interval)
 				* T::RecalculationInterval::get();
 
 			<Staked<T>>::insert((&staker_id, block_number), {
@@ -428,7 +437,7 @@
 			T::ContractHandler::remove_contract_sponsor(contract_id)
 		}
 
-		#[pallet::weight(0)]
+		#[pallet::weight(T::WeightInfo::payout_stakers(stakers_number.unwrap_or(20) as u32))]
 		pub fn payout_stakers(admin: OriginFor<T>, stakers_number: Option<u8>) -> DispatchResult {
 			let admin_id = ensure_signed(admin)?;
 
@@ -495,6 +504,74 @@
 			// 	}
 			// }
 
+			// {
+			// 	let mut stakers_number = stakers_number.unwrap_or(20);
+			// 	let last_id = RefCell::new(None);
+			// 	let income_acc = RefCell::new(BalanceOf::<T>::default());
+			// 	let amount_acc = RefCell::new(BalanceOf::<T>::default());
+
+			// 	let flush_stake = || -> DispatchResult {
+			// 		if let Some(last_id) = &*last_id.borrow() {
+			// 			if !income_acc.borrow().is_zero() {
+			// 				<T::Currency as Currency<T::AccountId>>::transfer(
+			// 					&T::TreasuryAccountId::get(),
+			// 					last_id,
+			// 					*income_acc.borrow(),
+			// 					ExistenceRequirement::KeepAlive,
+			// 				)
+			// 				.and_then(|_| {
+			// 					Self::add_lock_balance(last_id, *income_acc.borrow());
+			// 					<TotalStaked<T>>::try_mutate(|staked| {
+			// 						staked
+			// 							.checked_add(&*income_acc.borrow())
+			// 							.ok_or(ArithmeticError::Overflow.into())
+			// 					})
+			// 				})?;
+
+			// 				Self::deposit_event(Event::StakingRecalculation(
+			// 					last_id.clone(),
+			// 					*amount_acc.borrow(),
+			// 					*income_acc.borrow(),
+			// 				));
+			// 			}
+
+			// 			*income_acc.borrow_mut() = BalanceOf::<T>::default();
+			// 			*amount_acc.borrow_mut() = BalanceOf::<T>::default();
+			// 		}
+			// 		Ok(())
+			// 	};
+
+			// 	while let Some((
+			// 		(current_id, staked_block),
+			// 		(amount, next_recalc_block_for_stake),
+			// 	)) = storage_iterator.next()
+			// 	{
+			// 		if stakers_number == 0 {
+			// 			NextCalculatedRecord::<T>::set(Some((current_id, staked_block)));
+			// 			break;
+			// 		}
+			// 		stakers_number -= 1;
+			// 		if last_id.borrow().as_ref() != Some(&current_id) {
+			// 			flush_stake()?;
+			// 		};
+			// 		*last_id.borrow_mut() = Some(current_id.clone());
+			// 		if current_recalc_block >= next_recalc_block_for_stake {
+			// 			*amount_acc.borrow_mut() += amount;
+			// 			Self::recalculate_and_insert_stake(
+			// 				&current_id,
+			// 				staked_block,
+			// 				next_recalc_block,
+			// 				amount,
+			// 				((current_recalc_block - next_recalc_block_for_stake)
+			// 					/ T::RecalculationInterval::get())
+			// 				.into() + 1,
+			// 				&mut *income_acc.borrow_mut(),
+			// 			);
+			// 		}
+			// 	}
+			// 	flush_stake()?;
+			// }
+
 			{
 				let mut stakers_number = stakers_number.unwrap_or(20);
 				let last_id = RefCell::new(None);
@@ -510,7 +587,14 @@
 								*income_acc.borrow(),
 								ExistenceRequirement::KeepAlive,
 							)
-							.and_then(|_| Self::add_lock_balance(last_id, *income_acc.borrow()))?;
+							.and_then(|_| {
+								Self::add_lock_balance(last_id, *income_acc.borrow())?;
+								<TotalStaked<T>>::try_mutate(|staked| {
+									staked
+										.checked_add(&*income_acc.borrow())
+										.ok_or(ArithmeticError::Overflow.into())
+								})
+							})?;
 
 							Self::deposit_event(Event::StakingRecalculation(
 								last_id.clone(),
@@ -534,11 +618,11 @@
 						NextCalculatedRecord::<T>::set(Some((current_id, staked_block)));
 						break;
 					}
-					stakers_number -= 1;
 					if last_id.borrow().as_ref() != Some(&current_id) {
 						flush_stake()?;
+						*last_id.borrow_mut() = Some(current_id.clone());
+						stakers_number -= 1;
 					};
-					*last_id.borrow_mut() = Some(current_id.clone());
 					if current_recalc_block >= next_recalc_block_for_stake {
 						*amount_acc.borrow_mut() += amount;
 						Self::recalculate_and_insert_stake(
modifiedpallets/app-promotion/src/types.rsdiffbeforeafterboth
--- a/pallets/app-promotion/src/types.rs
+++ b/pallets/app-promotion/src/types.rs
@@ -1,7 +1,5 @@
 use codec::EncodeLike;
-use frame_support::{
-	traits::LockableCurrency, WeakBoundedVec, Parameter, dispatch::DispatchResult, ensure,
-};
+use frame_support::{traits::LockableCurrency, WeakBoundedVec, Parameter, dispatch::DispatchResult};
 
 use pallet_balances::{BalanceLock, Config as BalancesConfig, Pallet as PalletBalances};
 use pallet_common::CollectionHandle;
modifiedpallets/app-promotion/src/weights.rsdiffbeforeafterboth
--- a/pallets/app-promotion/src/weights.rs
+++ b/pallets/app-promotion/src/weights.rs
@@ -3,7 +3,7 @@
 //! Autogenerated weights for pallet_app_promotion
 //!
 //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2022-09-01, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2022-09-06, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
 //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
 
 // Executed Command:
@@ -35,7 +35,7 @@
 /// Weight functions needed for pallet_app_promotion.
 pub trait WeightInfo {
 	fn set_admin_address() -> Weight;
-	fn payout_stakers() -> Weight;
+	fn payout_stakers(b: u32, ) -> Weight;
 	fn stake() -> Weight;
 	fn unstake() -> Weight;
 	fn sponsor_collection() -> Weight;
@@ -47,66 +47,70 @@
 /// Weights for pallet_app_promotion using the Substrate node and recommended hardware.
 pub struct SubstrateWeight<T>(PhantomData<T>);
 impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
-	// Storage: Promotion Admin (r:0 w:1)
+	// Storage: AppPromotion Admin (r:0 w:1)
 	fn set_admin_address() -> Weight {
-		(515_000 as Weight)
+		(5_297_000 as Weight)
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
-	// Storage: Promotion Admin (r:1 w:0)
+	// Storage: AppPromotion Admin (r:1 w:0)
 	// Storage: ParachainSystem ValidationData (r:1 w:0)
-	// Storage: Promotion NextCalculatedRecord (r:1 w:1)
-	// Storage: Promotion Staked (r:2 w:0)
-	fn payout_stakers() -> Weight {
-		(8_475_000 as Weight)
-			.saturating_add(T::DbWeight::get().reads(5 as Weight))
+	// Storage: AppPromotion NextCalculatedRecord (r:1 w:1)
+	// Storage: AppPromotion Staked (r:2 w:0)
+	fn payout_stakers(b: u32, ) -> Weight {
+		(8_045_000 as Weight)
+			// Standard Error: 19_000
+			.saturating_add((4_778_000 as Weight).saturating_mul(b as Weight))
+			.saturating_add(T::DbWeight::get().reads(4 as Weight))
+			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: System Account (r:1 w:1)
-	// Storage: Promotion StakesPerAccount (r:1 w:1)
+	// Storage: AppPromotion StakesPerAccount (r:1 w:1)
 	// Storage: Balances Locks (r:1 w:1)
 	// Storage: ParachainSystem ValidationData (r:1 w:0)
-	// Storage: Promotion Staked (r:1 w:1)
-	// Storage: Promotion TotalStaked (r:1 w:1)
+	// Storage: AppPromotion Staked (r:1 w:1)
+	// Storage: AppPromotion TotalStaked (r:1 w:1)
 	fn stake() -> Weight {
-		(12_266_000 as Weight)
+		(17_623_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(6 as Weight))
 			.saturating_add(T::DbWeight::get().writes(5 as Weight))
 	}
-	// Storage: Promotion Staked (r:2 w:1)
-	// Storage: ParachainSystem ValidationData (r:1 w:0)
-	// Storage: Promotion PendingUnstake (r:1 w:1)
-	// Storage: Promotion TotalStaked (r:1 w:1)
-	// Storage: Promotion StakesPerAccount (r:0 w:1)
+	// Storage: AppPromotion PendingUnstake (r:1 w:1)
+	// Storage: AppPromotion Staked (r:2 w:1)
+	// Storage: Balances Locks (r:1 w:1)
+	// Storage: System Account (r:1 w:1)
+	// Storage: AppPromotion TotalStaked (r:1 w:1)
+	// Storage: AppPromotion StakesPerAccount (r:0 w:1)
 	fn unstake() -> Weight {
-		(10_663_000 as Weight)
-			.saturating_add(T::DbWeight::get().reads(5 as Weight))
-			.saturating_add(T::DbWeight::get().writes(4 as Weight))
+		(27_190_000 as Weight)
+			.saturating_add(T::DbWeight::get().reads(6 as Weight))
+			.saturating_add(T::DbWeight::get().writes(6 as Weight))
 	}
-	// Storage: Promotion Admin (r:1 w:0)
+	// Storage: AppPromotion Admin (r:1 w:0)
 	// Storage: Common CollectionById (r:1 w:1)
 	fn sponsor_collection() -> Weight {
-		(10_879_000 as Weight)
+		(11_351_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
-	// Storage: Promotion Admin (r:1 w:0)
+	// Storage: AppPromotion Admin (r:1 w:0)
 	// Storage: Common CollectionById (r:1 w:1)
 	fn stop_sponsoring_collection() -> Weight {
-		(10_548_000 as Weight)
+		(10_687_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
-	// Storage: Promotion Admin (r:1 w:0)
+	// Storage: AppPromotion Admin (r:1 w:0)
 	// Storage: EvmContractHelpers Sponsoring (r:0 w:1)
 	fn sponsor_contract() -> Weight {
-		(2_130_000 as Weight)
+		(2_332_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
-	// Storage: Promotion Admin (r:1 w:0)
+	// Storage: AppPromotion Admin (r:1 w:0)
 	// Storage: EvmContractHelpers Sponsoring (r:1 w:1)
 	fn stop_sponsoring_contract() -> Weight {
-		(3_509_000 as Weight)
+		(3_712_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
@@ -114,66 +118,70 @@
 
 // For backwards compatibility and tests
 impl WeightInfo for () {
-	// Storage: Promotion Admin (r:0 w:1)
+	// Storage: AppPromotion Admin (r:0 w:1)
 	fn set_admin_address() -> Weight {
-		(515_000 as Weight)
+		(5_297_000 as Weight)
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
-	// Storage: Promotion Admin (r:1 w:0)
+	// Storage: AppPromotion Admin (r:1 w:0)
 	// Storage: ParachainSystem ValidationData (r:1 w:0)
-	// Storage: Promotion NextCalculatedRecord (r:1 w:1)
-	// Storage: Promotion Staked (r:2 w:0)
-	fn payout_stakers() -> Weight {
-		(8_475_000 as Weight)
-			.saturating_add(RocksDbWeight::get().reads(5 as Weight))
+	// Storage: AppPromotion NextCalculatedRecord (r:1 w:1)
+	// Storage: AppPromotion Staked (r:2 w:0)
+	fn payout_stakers(b: u32, ) -> Weight {
+		(8_045_000 as Weight)
+			// Standard Error: 19_000
+			.saturating_add((4_778_000 as Weight).saturating_mul(b as Weight))
+			.saturating_add(RocksDbWeight::get().reads(4 as Weight))
+			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: System Account (r:1 w:1)
-	// Storage: Promotion StakesPerAccount (r:1 w:1)
+	// Storage: AppPromotion StakesPerAccount (r:1 w:1)
 	// Storage: Balances Locks (r:1 w:1)
 	// Storage: ParachainSystem ValidationData (r:1 w:0)
-	// Storage: Promotion Staked (r:1 w:1)
-	// Storage: Promotion TotalStaked (r:1 w:1)
+	// Storage: AppPromotion Staked (r:1 w:1)
+	// Storage: AppPromotion TotalStaked (r:1 w:1)
 	fn stake() -> Weight {
-		(12_266_000 as Weight)
+		(17_623_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(6 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(5 as Weight))
 	}
-	// Storage: Promotion Staked (r:2 w:1)
-	// Storage: ParachainSystem ValidationData (r:1 w:0)
-	// Storage: Promotion PendingUnstake (r:1 w:1)
-	// Storage: Promotion TotalStaked (r:1 w:1)
-	// Storage: Promotion StakesPerAccount (r:0 w:1)
+	// Storage: AppPromotion PendingUnstake (r:1 w:1)
+	// Storage: AppPromotion Staked (r:2 w:1)
+	// Storage: Balances Locks (r:1 w:1)
+	// Storage: System Account (r:1 w:1)
+	// Storage: AppPromotion TotalStaked (r:1 w:1)
+	// Storage: AppPromotion StakesPerAccount (r:0 w:1)
 	fn unstake() -> Weight {
-		(10_663_000 as Weight)
-			.saturating_add(RocksDbWeight::get().reads(5 as Weight))
-			.saturating_add(RocksDbWeight::get().writes(4 as Weight))
+		(27_190_000 as Weight)
+			.saturating_add(RocksDbWeight::get().reads(6 as Weight))
+			.saturating_add(RocksDbWeight::get().writes(6 as Weight))
 	}
-	// Storage: Promotion Admin (r:1 w:0)
+	// Storage: AppPromotion Admin (r:1 w:0)
 	// Storage: Common CollectionById (r:1 w:1)
 	fn sponsor_collection() -> Weight {
-		(10_879_000 as Weight)
+		(11_351_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
-	// Storage: Promotion Admin (r:1 w:0)
+	// Storage: AppPromotion Admin (r:1 w:0)
 	// Storage: Common CollectionById (r:1 w:1)
 	fn stop_sponsoring_collection() -> Weight {
-		(10_548_000 as Weight)
+		(10_687_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
-	// Storage: Promotion Admin (r:1 w:0)
+	// Storage: AppPromotion Admin (r:1 w:0)
 	// Storage: EvmContractHelpers Sponsoring (r:0 w:1)
 	fn sponsor_contract() -> Weight {
-		(2_130_000 as Weight)
+		(2_332_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
-	// Storage: Promotion Admin (r:1 w:0)
+	// Storage: AppPromotion Admin (r:1 w:0)
 	// Storage: EvmContractHelpers Sponsoring (r:1 w:1)
 	fn stop_sponsoring_contract() -> Weight {
-		(3_509_000 as Weight)
+		(3_712_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
modifiedpallets/common/Cargo.tomldiffbeforeafterboth
--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -40,4 +40,7 @@
     "up-data-structs/std",
     "pallet-evm/std",
 ]
-runtime-benchmarks = ["frame-benchmarking"]
+runtime-benchmarks = [
+    "frame-benchmarking/runtime-benchmarks",
+    "up-data-structs/runtime-benchmarks",
+]
modifiedruntime/common/config/pallets/app_promotion.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/app_promotion.rs
+++ b/runtime/common/config/pallets/app_promotion.rs
@@ -22,7 +22,7 @@
 use frame_support::{parameter_types, PalletId};
 use sp_arithmetic::Perbill;
 use up_common::{
-	constants::{ UNIQUE, RELAY_DAYS},
+	constants::{UNIQUE, RELAY_DAYS},
 	types::Balance,
 };
 
modifiedruntime/common/runtime_apis.rsdiffbeforeafterboth
--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -680,7 +680,7 @@
                     list_benchmark!(list, extra, pallet_unique, Unique);
                     list_benchmark!(list, extra, pallet_structure, Structure);
                     list_benchmark!(list, extra, pallet_inflation, Inflation);
-                    list_benchmark!(list, extra, pallet_app_promotion, Promotion);
+                    list_benchmark!(list, extra, pallet_app_promotion, AppPromotion);
                     list_benchmark!(list, extra, pallet_fungible, Fungible);
                     list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);
 
@@ -736,7 +736,7 @@
                     add_benchmark!(params, batches, pallet_unique, Unique);
                     add_benchmark!(params, batches, pallet_structure, Structure);
                     add_benchmark!(params, batches, pallet_inflation, Inflation);
-                    add_benchmark!(params, batches, pallet_app_promotion, Promotion);
+                    add_benchmark!(params, batches, pallet_app_promotion, AppPromotion);
                     add_benchmark!(params, batches, pallet_fungible, Fungible);
                     add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);
 
modifiedtests/src/interfaces/augment-api-consts.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-consts.ts
+++ b/tests/src/interfaces/augment-api-consts.ts
@@ -16,10 +16,6 @@
 declare module '@polkadot/api-base/types/consts' {
   interface AugmentedConsts<ApiType extends ApiTypes> {
     appPromotion: {
-      /**
-       * In chain blocks.
-       **/
-      day: u32 & AugmentedConst<ApiType>;
       intervalIncome: Perbill & AugmentedConst<ApiType>;
       nominal: u128 & AugmentedConst<ApiType>;
       /**
modifiedtests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -27,7 +27,7 @@
       /**
        * Insufficient funds to perform an action
        **/
-      NotSufficientFounds: AugmentedError<ApiType>;
+      NotSufficientFunds: AugmentedError<ApiType>;
       PendingForBlockOverflow: AugmentedError<ApiType>;
       /**
        * Generic error
modifiedtests/src/interfaces/augment-api-events.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-events.ts
+++ b/tests/src/interfaces/augment-api-events.ts
@@ -16,7 +16,10 @@
 declare module '@polkadot/api-base/types/events' {
   interface AugmentedEvents<ApiType extends ApiTypes> {
     appPromotion: {
+      SetAdmin: AugmentedEvent<ApiType, [AccountId32]>;
+      Stake: AugmentedEvent<ApiType, [AccountId32, u128]>;
       StakingRecalculation: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
+      Unstake: AugmentedEvent<ApiType, [AccountId32, u128]>;
       /**
        * Generic event
        **/
modifiedtests/src/interfaces/augment-api-query.tsdiffbeforeafterboth
after · tests/src/interfaces/augment-api-query.ts
1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */34// import type lookup before we augment - in some environments5// this is required to allow for ambient/previous definitions6import '@polkadot/api-base/types/storage';78import 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';10import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';11import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';12import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumLog, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletUniqueSchedulerScheduledV3, PhantomTypeUpDataStructs, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, SpRuntimeDigest, SpTrieStorageProof, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsProperties, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild } from '@polkadot/types/lookup';13import type { Observable } from '@polkadot/types/types';1415export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;16export type __QueryableStorageEntry<ApiType extends ApiTypes> = QueryableStorageEntry<ApiType>;1718declare module '@polkadot/api-base/types/storage' {19  interface AugmentedQueries<ApiType extends ApiTypes> {20    appPromotion: {21      admin: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;22      /**23       * Stores hash a record for which the last revenue recalculation was performed.24       * If `None`, then recalculation has not yet been performed or calculations have been completed for all stakers.25       **/26      nextCalculatedRecord: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[AccountId32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;27      /**28       * Amount of tokens pending unstake per user per block.29       **/30      pendingUnstake: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[AccountId32, u128]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;31      /**32       * Amount of tokens staked by account in the blocknumber.33       **/34      staked: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<ITuple<[u128, u32]>>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>;35      /**36       * Amount of stakes for an Account37       **/38      stakesPerAccount: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<u8>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;39      totalStaked: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;40      /**41       * Generic query42       **/43      [key: string]: QueryableStorageEntry<ApiType>;44    };45    balances: {46      /**47       * The Balances pallet example of storing the balance of an account.48       * 49       * # Example50       * 51       * ```nocompile52       * impl pallet_balances::Config for Runtime {53       * type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>54       * }55       * ```56       * 57       * You can also store the balance of an account in the `System` pallet.58       * 59       * # Example60       * 61       * ```nocompile62       * impl pallet_balances::Config for Runtime {63       * type AccountStore = System64       * }65       * ```66       * 67       * But this comes with tradeoffs, storing account balances in the system pallet stores68       * `frame_system` data alongside the account data contrary to storing account balances in the69       * `Balances` pallet, which uses a `StorageMap` to store balances data only.70       * NOTE: This is only used in the case that this pallet is used to store balances.71       **/72      account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;73      /**74       * Any liquidity locks on some account balances.75       * NOTE: Should only be accessed when setting, changing and freeing a lock.76       **/77      locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesBalanceLock>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;78      /**79       * Named reserves on some account balances.80       **/81      reserves: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesReserveData>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;82      /**83       * Storage version of the pallet.84       * 85       * This is set to v2.0.0 for new networks.86       **/87      storageVersion: AugmentedQuery<ApiType, () => Observable<PalletBalancesReleases>, []> & QueryableStorageEntry<ApiType, []>;88      /**89       * The total units issued in the system.90       **/91      totalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;92      /**93       * Generic query94       **/95      [key: string]: QueryableStorageEntry<ApiType>;96    };97    charging: {98      /**99       * Generic query100       **/101      [key: string]: QueryableStorageEntry<ApiType>;102    };103    common: {104      /**105       * Storage of the amount of collection admins.106       **/107      adminAmount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;108      /**109       * Allowlisted collection users.110       **/111      allowlist: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;112      /**113       * Storage of collection info.114       **/115      collectionById: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<UpDataStructsCollection>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;116      /**117       * Storage of collection properties.118       **/119      collectionProperties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;120      /**121       * Storage of token property permissions of a collection.122       **/123      collectionPropertyPermissions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<BTreeMap<Bytes, UpDataStructsPropertyPermission>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;124      /**125       * Storage of the count of created collections. Essentially contains the last collection ID.126       **/127      createdCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;128      /**129       * Storage of the count of deleted collections.130       **/131      destroyedCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;132      /**133       * Not used by code, exists only to provide some types to metadata.134       **/135      dummyStorageValue: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[UpDataStructsCollectionStats, u32, u32, UpDataStructsTokenChild, PhantomTypeUpDataStructs]>>>, []> & QueryableStorageEntry<ApiType, []>;136      /**137       * List of collection admins.138       **/139      isAdmin: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;140      /**141       * Generic query142       **/143      [key: string]: QueryableStorageEntry<ApiType>;144    };145    configuration: {146      minGasPriceOverride: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;147      weightToFeeCoefficientOverride: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;148      /**149       * Generic query150       **/151      [key: string]: QueryableStorageEntry<ApiType>;152    };153    dmpQueue: {154      /**155       * The configuration.156       **/157      configuration: AugmentedQuery<ApiType, () => Observable<CumulusPalletDmpQueueConfigData>, []> & QueryableStorageEntry<ApiType, []>;158      /**159       * The overweight messages.160       **/161      overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;162      /**163       * The page index.164       **/165      pageIndex: AugmentedQuery<ApiType, () => Observable<CumulusPalletDmpQueuePageIndexData>, []> & QueryableStorageEntry<ApiType, []>;166      /**167       * The queue pages.168       **/169      pages: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, Bytes]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;170      /**171       * Generic query172       **/173      [key: string]: QueryableStorageEntry<ApiType>;174    };175    ethereum: {176      blockHash: AugmentedQuery<ApiType, (arg: U256 | AnyNumber | Uint8Array) => Observable<H256>, [U256]> & QueryableStorageEntry<ApiType, [U256]>;177      /**178       * The current Ethereum block.179       **/180      currentBlock: AugmentedQuery<ApiType, () => Observable<Option<EthereumBlock>>, []> & QueryableStorageEntry<ApiType, []>;181      /**182       * The current Ethereum receipts.183       **/184      currentReceipts: AugmentedQuery<ApiType, () => Observable<Option<Vec<EthereumReceiptReceiptV3>>>, []> & QueryableStorageEntry<ApiType, []>;185      /**186       * The current transaction statuses.187       **/188      currentTransactionStatuses: AugmentedQuery<ApiType, () => Observable<Option<Vec<FpRpcTransactionStatus>>>, []> & QueryableStorageEntry<ApiType, []>;189      /**190       * Injected transactions should have unique nonce, here we store current191       **/192      injectedNonce: AugmentedQuery<ApiType, () => Observable<U256>, []> & QueryableStorageEntry<ApiType, []>;193      /**194       * Current building block's transactions and receipts.195       **/196      pending: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EthereumTransactionTransactionV2, FpRpcTransactionStatus, EthereumReceiptReceiptV3]>>>, []> & QueryableStorageEntry<ApiType, []>;197      /**198       * Generic query199       **/200      [key: string]: QueryableStorageEntry<ApiType>;201    };202    evm: {203      accountCodes: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<Bytes>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;204      accountStorages: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<H256>, [H160, H256]> & QueryableStorageEntry<ApiType, [H160, H256]>;205      /**206       * Written on log, reset after transaction207       * Should be empty between transactions208       **/209      currentLogs: AugmentedQuery<ApiType, () => Observable<Vec<EthereumLog>>, []> & QueryableStorageEntry<ApiType, []>;210      /**211       * Generic query212       **/213      [key: string]: QueryableStorageEntry<ApiType>;214    };215    evmCoderSubstrate: {216      /**217       * Generic query218       **/219      [key: string]: QueryableStorageEntry<ApiType>;220    };221    evmContractHelpers: {222      /**223       * Storage for users that allowed for sponsorship.224       * 225       * ### Usage226       * Prefer to delete record from storage if user no more allowed for sponsorship.227       * 228       * * **Key1** - contract address.229       * * **Key2** - user that allowed for sponsorship.230       * * **Value** - allowance for sponsorship.231       **/232      allowlist: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<bool>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;233      /**234       * Storege for contracts with [`Allowlisted`](SponsoringModeT::Allowlisted) sponsoring mode.235       * 236       * ### Usage237       * Prefer to delete collection from storage if mode chaged to non `Allowlisted`, than set **Value** to **false**.238       * 239       * * **Key** - contract address.240       * * **Value** - is contract in [`Allowlisted`](SponsoringModeT::Allowlisted) mode.241       **/242      allowlistEnabled: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;243      /**244       * Store owner for contract.245       * 246       * * **Key** - contract address.247       * * **Value** - owner for contract.248       **/249      owner: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<H160>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;250      selfSponsoring: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;251      /**252       * Storage for last sponsored block.253       * 254       * * **Key1** - contract address.255       * * **Key2** - sponsored user address.256       * * **Value** - last sponsored block number.257       **/258      sponsorBasket: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<Option<u32>>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;259      /**260       * Store for contract sponsorship state.261       * 262       * * **Key** - contract address.263       * * **Value** - sponsorship state.264       **/265      sponsoring: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<UpDataStructsSponsorshipStateBasicCrossAccountIdRepr>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;266      /**267       * Store for sponsoring mode.268       * 269       * ### Usage270       * Prefer to delete collection from storage if mode chaged to [`Disabled`](SponsoringModeT::Disabled).271       * 272       * * **Key** - contract address.273       * * **Value** - [`sponsoring mode`](SponsoringModeT).274       **/275      sponsoringMode: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<Option<PalletEvmContractHelpersSponsoringModeT>>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;276      /**277       * Storage for sponsoring rate limit in blocks.278       * 279       * * **Key** - contract address.280       * * **Value** - amount of sponsored blocks.281       **/282      sponsoringRateLimit: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<u32>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;283      /**284       * Generic query285       **/286      [key: string]: QueryableStorageEntry<ApiType>;287    };288    evmMigration: {289      migrationPending: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;290      /**291       * Generic query292       **/293      [key: string]: QueryableStorageEntry<ApiType>;294    };295    fungible: {296      /**297       * Storage for assets delegated to a limited extent to other users.298       **/299      allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;300      /**301       * Amount of tokens owned by an account inside a collection.302       **/303      balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;304      /**305       * Total amount of fungible tokens inside a collection.306       **/307      totalSupply: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;308      /**309       * Generic query310       **/311      [key: string]: QueryableStorageEntry<ApiType>;312    };313    inflation: {314      /**315       * Current inflation for `InflationBlockInterval` number of blocks316       **/317      blockInflation: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;318      /**319       * Next target (relay) block when inflation will be applied320       **/321      nextInflationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;322      /**323       * Next target (relay) block when inflation is recalculated324       **/325      nextRecalculationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;326      /**327       * Relay block when inflation has started328       **/329      startBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;330      /**331       * starting year total issuance332       **/333      startingYearTotalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;334      /**335       * Generic query336       **/337      [key: string]: QueryableStorageEntry<ApiType>;338    };339    nonfungible: {340      /**341       * Amount of tokens owned by an account in a collection.342       **/343      accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;344      /**345       * Allowance set by a token owner for another user to perform one of certain transactions on a token.346       **/347      allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;348      /**349       * Used to enumerate tokens owned by account.350       **/351      owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;352      /**353       * Custom data of a token that is serialized to bytes,354       * primarily reserved for on-chain operations,355       * normally obscured from the external users.356       * 357       * Auxiliary properties are slightly different from358       * usual [`TokenProperties`] due to an unlimited number359       * and separately stored and written-to key-value pairs.360       * 361       * Currently used to store RMRK data.362       **/363      tokenAuxProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: UpDataStructsPropertyScope | 'None' | 'Rmrk' | number | Uint8Array, arg4: Bytes | string | Uint8Array) => Observable<Option<Bytes>>, [u32, u32, UpDataStructsPropertyScope, Bytes]> & QueryableStorageEntry<ApiType, [u32, u32, UpDataStructsPropertyScope, Bytes]>;364      /**365       * Used to enumerate token's children.366       **/367      tokenChildren: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<bool>, [u32, u32, ITuple<[u32, u32]>]> & QueryableStorageEntry<ApiType, [u32, u32, ITuple<[u32, u32]>]>;368      /**369       * Token data, used to partially describe a token.370       **/371      tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNonfungibleItemData>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;372      /**373       * Map of key-value pairs, describing the metadata of a token.374       **/375      tokenProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;376      /**377       * Amount of burnt tokens in a collection.378       **/379      tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;380      /**381       * Total amount of minted tokens in a collection.382       **/383      tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;384      /**385       * Generic query386       **/387      [key: string]: QueryableStorageEntry<ApiType>;388    };389    parachainInfo: {390      parachainId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;391      /**392       * Generic query393       **/394      [key: string]: QueryableStorageEntry<ApiType>;395    };396    parachainSystem: {397      /**398       * The number of HRMP messages we observed in `on_initialize` and thus used that number for399       * announcing the weight of `on_initialize` and `on_finalize`.400       **/401      announcedHrmpMessagesPerCandidate: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;402      /**403       * The next authorized upgrade, if there is one.404       **/405      authorizedUpgrade: AugmentedQuery<ApiType, () => Observable<Option<H256>>, []> & QueryableStorageEntry<ApiType, []>;406      /**407       * A custom head data that should be returned as result of `validate_block`.408       * 409       * See [`Pallet::set_custom_validation_head_data`] for more information.410       **/411      customValidationHeadData: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;412      /**413       * Were the validation data set to notify the relay chain?414       **/415      didSetValidationCode: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;416      /**417       * The parachain host configuration that was obtained from the relay parent.418       * 419       * This field is meant to be updated each block with the validation data inherent. Therefore,420       * before processing of the inherent, e.g. in `on_initialize` this data may be stale.421       * 422       * This data is also absent from the genesis.423       **/424      hostConfiguration: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2AbridgedHostConfiguration>>, []> & QueryableStorageEntry<ApiType, []>;425      /**426       * HRMP messages that were sent in a block.427       * 428       * This will be cleared in `on_initialize` of each new block.429       **/430      hrmpOutboundMessages: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotCorePrimitivesOutboundHrmpMessage>>, []> & QueryableStorageEntry<ApiType, []>;431      /**432       * HRMP watermark that was set in a block.433       * 434       * This will be cleared in `on_initialize` of each new block.435       **/436      hrmpWatermark: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;437      /**438       * The last downward message queue chain head we have observed.439       * 440       * This value is loaded before and saved after processing inbound downward messages carried441       * by the system inherent.442       **/443      lastDmqMqcHead: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;444      /**445       * The message queue chain heads we have observed per each channel incoming channel.446       * 447       * This value is loaded before and saved after processing inbound downward messages carried448       * by the system inherent.449       **/450      lastHrmpMqcHeads: AugmentedQuery<ApiType, () => Observable<BTreeMap<u32, H256>>, []> & QueryableStorageEntry<ApiType, []>;451      /**452       * The relay chain block number associated with the last parachain block.453       **/454      lastRelayChainBlockNumber: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;455      /**456       * Validation code that is set by the parachain and is to be communicated to collator and457       * consequently the relay-chain.458       * 459       * This will be cleared in `on_initialize` of each new block if no other pallet already set460       * the value.461       **/462      newValidationCode: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;463      /**464       * Upward messages that are still pending and not yet send to the relay chain.465       **/466      pendingUpwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;467      /**468       * In case of a scheduled upgrade, this storage field contains the validation code to be applied.469       * 470       * As soon as the relay chain gives us the go-ahead signal, we will overwrite the [`:code`][well_known_keys::CODE]471       * which will result the next block process with the new validation code. This concludes the upgrade process.472       * 473       * [well_known_keys::CODE]: sp_core::storage::well_known_keys::CODE474       **/475      pendingValidationCode: AugmentedQuery<ApiType, () => Observable<Bytes>, []> & QueryableStorageEntry<ApiType, []>;476      /**477       * Number of downward messages processed in a block.478       * 479       * This will be cleared in `on_initialize` of each new block.480       **/481      processedDownwardMessages: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;482      /**483       * The state proof for the last relay parent block.484       * 485       * This field is meant to be updated each block with the validation data inherent. Therefore,486       * before processing of the inherent, e.g. in `on_initialize` this data may be stale.487       * 488       * This data is also absent from the genesis.489       **/490      relayStateProof: AugmentedQuery<ApiType, () => Observable<Option<SpTrieStorageProof>>, []> & QueryableStorageEntry<ApiType, []>;491      /**492       * The snapshot of some state related to messaging relevant to the current parachain as per493       * the relay parent.494       * 495       * This field is meant to be updated each block with the validation data inherent. Therefore,496       * before processing of the inherent, e.g. in `on_initialize` this data may be stale.497       * 498       * This data is also absent from the genesis.499       **/500      relevantMessagingState: AugmentedQuery<ApiType, () => Observable<Option<CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot>>, []> & QueryableStorageEntry<ApiType, []>;501      /**502       * The weight we reserve at the beginning of the block for processing DMP messages. This503       * overrides the amount set in the Config trait.504       **/505      reservedDmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []> & QueryableStorageEntry<ApiType, []>;506      /**507       * The weight we reserve at the beginning of the block for processing XCMP messages. This508       * overrides the amount set in the Config trait.509       **/510      reservedXcmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []> & QueryableStorageEntry<ApiType, []>;511      /**512       * An option which indicates if the relay-chain restricts signalling a validation code upgrade.513       * In other words, if this is `Some` and [`NewValidationCode`] is `Some` then the produced514       * candidate will be invalid.515       * 516       * This storage item is a mirror of the corresponding value for the current parachain from the517       * relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is518       * set after the inherent.519       **/520      upgradeRestrictionSignal: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2UpgradeRestriction>>, []> & QueryableStorageEntry<ApiType, []>;521      /**522       * Upward messages that were sent in a block.523       * 524       * This will be cleared in `on_initialize` of each new block.525       **/526      upwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;527      /**528       * The [`PersistedValidationData`] set for this block.529       * This value is expected to be set only once per block and it's never stored530       * in the trie.531       **/532      validationData: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2PersistedValidationData>>, []> & QueryableStorageEntry<ApiType, []>;533      /**534       * Generic query535       **/536      [key: string]: QueryableStorageEntry<ApiType>;537    };538    randomnessCollectiveFlip: {539      /**540       * Series of block headers from the last 81 blocks that acts as random seed material. This541       * is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of542       * the oldest hash.543       **/544      randomMaterial: AugmentedQuery<ApiType, () => Observable<Vec<H256>>, []> & QueryableStorageEntry<ApiType, []>;545      /**546       * Generic query547       **/548      [key: string]: QueryableStorageEntry<ApiType>;549    };550    refungible: {551      /**552       * Amount of tokens (not pieces) partially owned by an account within a collection.553       **/554      accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;555      /**556       * Allowance set by a token owner for another user to perform one of certain transactions on a number of pieces of a token.557       **/558      allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg4: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;559      /**560       * Amount of token pieces owned by account.561       **/562      balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]>;563      /**564       * Used to enumerate tokens owned by account.565       **/566      owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;567      /**568       * Token data, used to partially describe a token.569       **/570      tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<PalletRefungibleItemData>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;571      /**572       * Amount of pieces a refungible token is split into.573       **/574      tokenProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;575      /**576       * Amount of tokens burnt in a collection.577       **/578      tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;579      /**580       * Total amount of minted tokens in a collection.581       **/582      tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;583      /**584       * Total amount of pieces for token585       **/586      totalSupply: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;587      /**588       * Generic query589       **/590      [key: string]: QueryableStorageEntry<ApiType>;591    };592    rmrkCore: {593      /**594       * Latest yet-unused collection ID.595       **/596      collectionIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;597      /**598       * Mapping from RMRK collection ID to Unique's.599       **/600      uniqueCollectionId: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;601      /**602       * Generic query603       **/604      [key: string]: QueryableStorageEntry<ApiType>;605    };606    rmrkEquip: {607      /**608       * Checkmark that a Base has a Theme NFT named "default".609       **/610      baseHasDefaultTheme: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;611      /**612       * Map of a Base ID and a Part ID to an NFT in the Base collection serving as the Part.613       **/614      inernalPartId: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;615      /**616       * Generic query617       **/618      [key: string]: QueryableStorageEntry<ApiType>;619    };620    scheduler: {621      /**622       * Items to be executed, indexed by the block number that they should be executed on.623       **/624      agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletUniqueSchedulerScheduledV3>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;625      /**626       * Lookup from identity to the block number and index of the task.627       **/628      lookup: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;629      /**630       * Generic query631       **/632      [key: string]: QueryableStorageEntry<ApiType>;633    };634    structure: {635      /**636       * Generic query637       **/638      [key: string]: QueryableStorageEntry<ApiType>;639    };640    sudo: {641      /**642       * The `AccountId` of the sudo key.643       **/644      key: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;645      /**646       * Generic query647       **/648      [key: string]: QueryableStorageEntry<ApiType>;649    };650    system: {651      /**652       * The full account information for a particular account ID.653       **/654      account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<FrameSystemAccountInfo>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;655      /**656       * Total length (in bytes) for all extrinsics put together, for the current block.657       **/658      allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;659      /**660       * Map of block numbers to block hashes.661       **/662      blockHash: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<H256>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;663      /**664       * The current weight for the block.665       **/666      blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;667      /**668       * Digest of the current block, also part of the block header.669       **/670      digest: AugmentedQuery<ApiType, () => Observable<SpRuntimeDigest>, []> & QueryableStorageEntry<ApiType, []>;671      /**672       * The number of events in the `Events<T>` list.673       **/674      eventCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;675      /**676       * Events deposited for the current block.677       * 678       * NOTE: The item is unbound and should therefore never be read on chain.679       * It could otherwise inflate the PoV size of a block.680       * 681       * Events have a large in-memory size. Box the events to not go out-of-memory682       * just in case someone still reads them from within the runtime.683       **/684      events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;685      /**686       * Mapping between a topic (represented by T::Hash) and a vector of indexes687       * of events in the `<Events<T>>` list.688       * 689       * All topic vectors have deterministic storage locations depending on the topic. This690       * allows light-clients to leverage the changes trie storage tracking mechanism and691       * in case of changes fetch the list of events of interest.692       * 693       * The value has the type `(T::BlockNumber, EventIndex)` because if we used only just694       * the `EventIndex` then in case if the topic has the same contents on the next block695       * no notification will be triggered thus the event might be lost.696       **/697      eventTopics: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Vec<ITuple<[u32, u32]>>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;698      /**699       * The execution phase of the block.700       **/701      executionPhase: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemPhase>>, []> & QueryableStorageEntry<ApiType, []>;702      /**703       * Total extrinsics count for the current block.704       **/705      extrinsicCount: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;706      /**707       * Extrinsics data for the current block (maps an extrinsic's index to its data).708       **/709      extrinsicData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;710      /**711       * Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.712       **/713      lastRuntimeUpgrade: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemLastRuntimeUpgradeInfo>>, []> & QueryableStorageEntry<ApiType, []>;714      /**715       * The current block number being processed. Set by `execute_block`.716       **/717      number: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;718      /**719       * Hash of the previous block.720       **/721      parentHash: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;722      /**723       * True if we have upgraded so that AccountInfo contains three types of `RefCount`. False724       * (default) if not.725       **/726      upgradedToTripleRefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;727      /**728       * True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.729       **/730      upgradedToU32RefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;731      /**732       * Generic query733       **/734      [key: string]: QueryableStorageEntry<ApiType>;735    };736    timestamp: {737      /**738       * Did the timestamp get updated in this block?739       **/740      didUpdate: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;741      /**742       * Current time for the current block.743       **/744      now: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;745      /**746       * Generic query747       **/748      [key: string]: QueryableStorageEntry<ApiType>;749    };750    transactionPayment: {751      nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;752      storageVersion: AugmentedQuery<ApiType, () => Observable<PalletTransactionPaymentReleases>, []> & QueryableStorageEntry<ApiType, []>;753      /**754       * Generic query755       **/756      [key: string]: QueryableStorageEntry<ApiType>;757    };758    treasury: {759      /**760       * Proposal indices that have been approved but not yet awarded.761       **/762      approvals: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;763      /**764       * Number of proposals that have been made.765       **/766      proposalCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;767      /**768       * Proposals that have been made.769       **/770      proposals: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletTreasuryProposal>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;771      /**772       * Generic query773       **/774      [key: string]: QueryableStorageEntry<ApiType>;775    };776    unique: {777      /**778       * Used for migrations779       **/780      chainVersion: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;781      /**782       * (Collection id (controlled?2), who created (real))783       * TODO: Off chain worker should remove from this map when collection gets removed784       **/785      createItemBasket: AugmentedQuery<ApiType, (arg: ITuple<[u32, AccountId32]> | [u32 | AnyNumber | Uint8Array, AccountId32 | string | Uint8Array]) => Observable<Option<u32>>, [ITuple<[u32, AccountId32]>]> & QueryableStorageEntry<ApiType, [ITuple<[u32, AccountId32]>]>;786      /**787       * Last sponsoring of fungible tokens approval in a collection788       **/789      fungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;790      /**791       * Collection id (controlled?2), owning user (real)792       **/793      fungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;794      /**795       * Last sponsoring of NFT approval in a collection796       **/797      nftApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;798      /**799       * Collection id (controlled?2), token id (controlled?2)800       **/801      nftTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;802      /**803       * Last sponsoring of RFT approval in a collection804       **/805      refungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;806      /**807       * Collection id (controlled?2), token id (controlled?2)808       **/809      reFungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;810      /**811       * Last sponsoring of token property setting // todo:doc rephrase this and the following812       **/813      tokenPropertyBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;814      /**815       * Variable metadata sponsoring816       * Collection id (controlled?2), token id (controlled?2)817       **/818      variableMetaDataBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;819      /**820       * Generic query821       **/822      [key: string]: QueryableStorageEntry<ApiType>;823    };824    vesting: {825      /**826       * Vesting schedules of an account.827       * 828       * VestingSchedules: map AccountId => Vec<VestingSchedule>829       **/830      vestingSchedules: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<OrmlVestingVestingSchedule>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;831      /**832       * Generic query833       **/834      [key: string]: QueryableStorageEntry<ApiType>;835    };836    xcmpQueue: {837      /**838       * Inbound aggregate XCMP messages. It can only be one per ParaId/block.839       **/840      inboundXcmpMessages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;841      /**842       * Status of the inbound XCMP channels.843       **/844      inboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletXcmpQueueInboundChannelDetails>>, []> & QueryableStorageEntry<ApiType, []>;845      /**846       * The messages outbound in a given XCMP channel.847       **/848      outboundXcmpMessages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u16 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32, u16]> & QueryableStorageEntry<ApiType, [u32, u16]>;849      /**850       * The non-empty XCMP channels in order of becoming non-empty, and the index of the first851       * and last outbound message. If the two indices are equal, then it indicates an empty852       * queue and there must be a non-`Ok` `OutboundStatus`. We assume queues grow no greater853       * than 65535 items. Queue indices for normal messages begin at one; zero is reserved in854       * case of the need to send a high-priority signal message this block.855       * The bool is true if there is a signal message waiting to be sent.856       **/857      outboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletXcmpQueueOutboundChannelDetails>>, []> & QueryableStorageEntry<ApiType, []>;858      /**859       * The messages that exceeded max individual message weight budget.860       * 861       * These message stay in this storage map until they are manually dispatched via862       * `service_overweight`.863       **/864      overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;865      /**866       * The number of overweight messages ever recorded in `Overweight`. Also doubles as the next867       * available free overweight index.868       **/869      overweightCount: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;870      /**871       * The configuration which controls the dynamics of the outbound queue.872       **/873      queueConfig: AugmentedQuery<ApiType, () => Observable<CumulusPalletXcmpQueueQueueConfigData>, []> & QueryableStorageEntry<ApiType, []>;874      /**875       * Whether or not the XCMP queue is suspended from executing incoming XCMs or not.876       **/877      queueSuspended: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;878      /**879       * Any signal messages waiting to be sent.880       **/881      signalMessages: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;882      /**883       * Generic query884       **/885      [key: string]: QueryableStorageEntry<ApiType>;886    };887  } // AugmentedQueries888} // declare module
modifiedtests/src/interfaces/default/types.tsdiffbeforeafterboth
--- a/tests/src/interfaces/default/types.ts
+++ b/tests/src/interfaces/default/types.ts
@@ -844,17 +844,23 @@
 export interface PalletAppPromotionError extends Enum {
   readonly isAdminNotSet: boolean;
   readonly isNoPermission: boolean;
-  readonly isNotSufficientFounds: boolean;
+  readonly isNotSufficientFunds: boolean;
   readonly isPendingForBlockOverflow: boolean;
   readonly isInvalidArgument: boolean;
-  readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFounds' | 'PendingForBlockOverflow' | 'InvalidArgument';
+  readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFunds' | 'PendingForBlockOverflow' | 'InvalidArgument';
 }
 
 /** @name PalletAppPromotionEvent */
 export interface PalletAppPromotionEvent extends Enum {
   readonly isStakingRecalculation: boolean;
   readonly asStakingRecalculation: ITuple<[AccountId32, u128, u128]>;
-  readonly type: 'StakingRecalculation';
+  readonly isStake: boolean;
+  readonly asStake: ITuple<[AccountId32, u128]>;
+  readonly isUnstake: boolean;
+  readonly asUnstake: ITuple<[AccountId32, u128]>;
+  readonly isSetAdmin: boolean;
+  readonly asSetAdmin: AccountId32;
+  readonly type: 'StakingRecalculation' | 'Stake' | 'Unstake' | 'SetAdmin';
 }
 
 /** @name PalletBalancesAccountData */
modifiedtests/src/interfaces/lookup.tsdiffbeforeafterboth
--- a/tests/src/interfaces/lookup.ts
+++ b/tests/src/interfaces/lookup.ts
@@ -1061,7 +1061,10 @@
    **/
   PalletAppPromotionEvent: {
     _enum: {
-      StakingRecalculation: '(AccountId32,u128,u128)'
+      StakingRecalculation: '(AccountId32,u128,u128)',
+      Stake: '(AccountId32,u128)',
+      Unstake: '(AccountId32,u128)',
+      SetAdmin: 'AccountId32'
     }
   },
   /**
@@ -3102,7 +3105,7 @@
    * Lookup415: pallet_app_promotion::pallet::Error<T>
    **/
   PalletAppPromotionError: {
-    _enum: ['AdminNotSet', 'NoPermission', 'NotSufficientFounds', 'PendingForBlockOverflow', 'InvalidArgument']
+    _enum: ['AdminNotSet', 'NoPermission', 'NotSufficientFunds', 'PendingForBlockOverflow', 'InvalidArgument']
   },
   /**
    * Lookup418: pallet_evm::pallet::Error<T>
modifiedtests/src/interfaces/types-lookup.tsdiffbeforeafterboth
--- a/tests/src/interfaces/types-lookup.ts
+++ b/tests/src/interfaces/types-lookup.ts
@@ -1202,7 +1202,13 @@
   interface PalletAppPromotionEvent extends Enum {
     readonly isStakingRecalculation: boolean;
     readonly asStakingRecalculation: ITuple<[AccountId32, u128, u128]>;
-    readonly type: 'StakingRecalculation';
+    readonly isStake: boolean;
+    readonly asStake: ITuple<[AccountId32, u128]>;
+    readonly isUnstake: boolean;
+    readonly asUnstake: ITuple<[AccountId32, u128]>;
+    readonly isSetAdmin: boolean;
+    readonly asSetAdmin: AccountId32;
+    readonly type: 'StakingRecalculation' | 'Stake' | 'Unstake' | 'SetAdmin';
   }
 
   /** @name PalletEvmEvent (104) */
@@ -3290,10 +3296,10 @@
   interface PalletAppPromotionError extends Enum {
     readonly isAdminNotSet: boolean;
     readonly isNoPermission: boolean;
-    readonly isNotSufficientFounds: boolean;
+    readonly isNotSufficientFunds: boolean;
     readonly isPendingForBlockOverflow: boolean;
     readonly isInvalidArgument: boolean;
-    readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFounds' | 'PendingForBlockOverflow' | 'InvalidArgument';
+    readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFunds' | 'PendingForBlockOverflow' | 'InvalidArgument';
   }
 
   /** @name PalletEvmError (418) */