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
before · tests/src/interfaces/augment-api-errors.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/errors';78import type { ApiTypes, AugmentedError } from '@polkadot/api-base/types';910export type __AugmentedError<ApiType extends ApiTypes> = AugmentedError<ApiType>;1112declare module '@polkadot/api-base/types/errors' {13  interface AugmentedErrors<ApiType extends ApiTypes> {14    appPromotion: {15      /**16       * Error due to action requiring admin to be set17       **/18      AdminNotSet: AugmentedError<ApiType>;19      /**20       * An error related to the fact that an invalid argument was passed to perform an action21       **/22      InvalidArgument: AugmentedError<ApiType>;23      /**24       * No permission to perform an action25       **/26      NoPermission: AugmentedError<ApiType>;27      /**28       * Insufficient funds to perform an action29       **/30      NotSufficientFounds: AugmentedError<ApiType>;31      PendingForBlockOverflow: AugmentedError<ApiType>;32      /**33       * Generic error34       **/35      [key: string]: AugmentedError<ApiType>;36    };37    balances: {38      /**39       * Beneficiary account must pre-exist40       **/41      DeadAccount: AugmentedError<ApiType>;42      /**43       * Value too low to create account due to existential deposit44       **/45      ExistentialDeposit: AugmentedError<ApiType>;46      /**47       * A vesting schedule already exists for this account48       **/49      ExistingVestingSchedule: AugmentedError<ApiType>;50      /**51       * Balance too low to send value52       **/53      InsufficientBalance: AugmentedError<ApiType>;54      /**55       * Transfer/payment would kill account56       **/57      KeepAlive: AugmentedError<ApiType>;58      /**59       * Account liquidity restrictions prevent withdrawal60       **/61      LiquidityRestrictions: AugmentedError<ApiType>;62      /**63       * Number of named reserves exceed MaxReserves64       **/65      TooManyReserves: AugmentedError<ApiType>;66      /**67       * Vesting balance too high to send value68       **/69      VestingBalance: AugmentedError<ApiType>;70      /**71       * Generic error72       **/73      [key: string]: AugmentedError<ApiType>;74    };75    common: {76      /**77       * Account token limit exceeded per collection78       **/79      AccountTokenLimitExceeded: AugmentedError<ApiType>;80      /**81       * Can't transfer tokens to ethereum zero address82       **/83      AddressIsZero: AugmentedError<ApiType>;84      /**85       * Address is not in allow list.86       **/87      AddressNotInAllowlist: AugmentedError<ApiType>;88      /**89       * Requested value is more than the approved90       **/91      ApprovedValueTooLow: AugmentedError<ApiType>;92      /**93       * Tried to approve more than owned94       **/95      CantApproveMoreThanOwned: AugmentedError<ApiType>;96      /**97       * Destroying only empty collections is allowed98       **/99      CantDestroyNotEmptyCollection: AugmentedError<ApiType>;100      /**101       * Exceeded max admin count102       **/103      CollectionAdminCountExceeded: AugmentedError<ApiType>;104      /**105       * Collection description can not be longer than 255 char.106       **/107      CollectionDescriptionLimitExceeded: AugmentedError<ApiType>;108      /**109       * Tried to store more data than allowed in collection field110       **/111      CollectionFieldSizeExceeded: AugmentedError<ApiType>;112      /**113       * Tried to access an external collection with an internal API114       **/115      CollectionIsExternal: AugmentedError<ApiType>;116      /**117       * Tried to access an internal collection with an external API118       **/119      CollectionIsInternal: AugmentedError<ApiType>;120      /**121       * Collection limit bounds per collection exceeded122       **/123      CollectionLimitBoundsExceeded: AugmentedError<ApiType>;124      /**125       * Collection name can not be longer than 63 char.126       **/127      CollectionNameLimitExceeded: AugmentedError<ApiType>;128      /**129       * This collection does not exist.130       **/131      CollectionNotFound: AugmentedError<ApiType>;132      /**133       * Collection token limit exceeded134       **/135      CollectionTokenLimitExceeded: AugmentedError<ApiType>;136      /**137       * Token prefix can not be longer than 15 char.138       **/139      CollectionTokenPrefixLimitExceeded: AugmentedError<ApiType>;140      /**141       * Empty property keys are forbidden142       **/143      EmptyPropertyKey: AugmentedError<ApiType>;144      /**145       * Only ASCII letters, digits, and symbols `_`, `-`, and `.` are allowed146       **/147      InvalidCharacterInPropertyKey: AugmentedError<ApiType>;148      /**149       * Metadata flag frozen150       **/151      MetadataFlagFrozen: AugmentedError<ApiType>;152      /**153       * Sender parameter and item owner must be equal.154       **/155      MustBeTokenOwner: AugmentedError<ApiType>;156      /**157       * No permission to perform action158       **/159      NoPermission: AugmentedError<ApiType>;160      /**161       * Tried to store more property data than allowed162       **/163      NoSpaceForProperty: AugmentedError<ApiType>;164      /**165       * Insufficient funds to perform an action166       **/167      NotSufficientFounds: AugmentedError<ApiType>;168      /**169       * Tried to enable permissions which are only permitted to be disabled170       **/171      OwnerPermissionsCantBeReverted: AugmentedError<ApiType>;172      /**173       * Property key is too long174       **/175      PropertyKeyIsTooLong: AugmentedError<ApiType>;176      /**177       * Tried to store more property keys than allowed178       **/179      PropertyLimitReached: AugmentedError<ApiType>;180      /**181       * Collection is not in mint mode.182       **/183      PublicMintingNotAllowed: AugmentedError<ApiType>;184      /**185       * Only tokens from specific collections may nest tokens under this one186       **/187      SourceCollectionIsNotAllowedToNest: AugmentedError<ApiType>;188      /**189       * Item does not exist190       **/191      TokenNotFound: AugmentedError<ApiType>;192      /**193       * Item is balance not enough194       **/195      TokenValueTooLow: AugmentedError<ApiType>;196      /**197       * Total collections bound exceeded.198       **/199      TotalCollectionsLimitExceeded: AugmentedError<ApiType>;200      /**201       * Collection settings not allowing items transferring202       **/203      TransferNotAllowed: AugmentedError<ApiType>;204      /**205       * The operation is not supported206       **/207      UnsupportedOperation: AugmentedError<ApiType>;208      /**209       * User does not satisfy the nesting rule210       **/211      UserIsNotAllowedToNest: AugmentedError<ApiType>;212      /**213       * Generic error214       **/215      [key: string]: AugmentedError<ApiType>;216    };217    cumulusXcm: {218      /**219       * Generic error220       **/221      [key: string]: AugmentedError<ApiType>;222    };223    dmpQueue: {224      /**225       * The amount of weight given is possibly not enough for executing the message.226       **/227      OverLimit: AugmentedError<ApiType>;228      /**229       * The message index given is unknown.230       **/231      Unknown: AugmentedError<ApiType>;232      /**233       * Generic error234       **/235      [key: string]: AugmentedError<ApiType>;236    };237    ethereum: {238      /**239       * Signature is invalid.240       **/241      InvalidSignature: AugmentedError<ApiType>;242      /**243       * Pre-log is present, therefore transact is not allowed.244       **/245      PreLogExists: AugmentedError<ApiType>;246      /**247       * Generic error248       **/249      [key: string]: AugmentedError<ApiType>;250    };251    evm: {252      /**253       * Not enough balance to perform action254       **/255      BalanceLow: AugmentedError<ApiType>;256      /**257       * Calculating total fee overflowed258       **/259      FeeOverflow: AugmentedError<ApiType>;260      /**261       * Gas price is too low.262       **/263      GasPriceTooLow: AugmentedError<ApiType>;264      /**265       * Nonce is invalid266       **/267      InvalidNonce: AugmentedError<ApiType>;268      /**269       * Calculating total payment overflowed270       **/271      PaymentOverflow: AugmentedError<ApiType>;272      /**273       * Withdraw fee failed274       **/275      WithdrawFailed: AugmentedError<ApiType>;276      /**277       * Generic error278       **/279      [key: string]: AugmentedError<ApiType>;280    };281    evmCoderSubstrate: {282      OutOfFund: AugmentedError<ApiType>;283      OutOfGas: AugmentedError<ApiType>;284      /**285       * Generic error286       **/287      [key: string]: AugmentedError<ApiType>;288    };289    evmContractHelpers: {290      /**291       * No pending sponsor for contract.292       **/293      NoPendingSponsor: AugmentedError<ApiType>;294      /**295       * This method is only executable by contract owner296       **/297      NoPermission: AugmentedError<ApiType>;298      /**299       * Generic error300       **/301      [key: string]: AugmentedError<ApiType>;302    };303    evmMigration: {304      /**305       * Migration of this account is not yet started, or already finished.306       **/307      AccountIsNotMigrating: AugmentedError<ApiType>;308      /**309       * Can only migrate to empty address.310       **/311      AccountNotEmpty: AugmentedError<ApiType>;312      /**313       * Generic error314       **/315      [key: string]: AugmentedError<ApiType>;316    };317    fungible: {318      /**319       * Fungible token does not support nesting.320       **/321      FungibleDisallowsNesting: AugmentedError<ApiType>;322      /**323       * Tried to set data for fungible item.324       **/325      FungibleItemsDontHaveData: AugmentedError<ApiType>;326      /**327       * Fungible tokens hold no ID, and the default value of TokenId for Fungible collection is 0.328       **/329      FungibleItemsHaveNoId: AugmentedError<ApiType>;330      /**331       * Not Fungible item data used to mint in Fungible collection.332       **/333      NotFungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;334      /**335       * Setting item properties is not allowed.336       **/337      SettingPropertiesNotAllowed: AugmentedError<ApiType>;338      /**339       * Generic error340       **/341      [key: string]: AugmentedError<ApiType>;342    };343    nonfungible: {344      /**345       * Unable to burn NFT with children346       **/347      CantBurnNftWithChildren: AugmentedError<ApiType>;348      /**349       * Used amount > 1 with NFT350       **/351      NonfungibleItemsHaveNoAmount: AugmentedError<ApiType>;352      /**353       * Not Nonfungible item data used to mint in Nonfungible collection.354       **/355      NotNonfungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;356      /**357       * Generic error358       **/359      [key: string]: AugmentedError<ApiType>;360    };361    parachainSystem: {362      /**363       * The inherent which supplies the host configuration did not run this block364       **/365      HostConfigurationNotAvailable: AugmentedError<ApiType>;366      /**367       * No code upgrade has been authorized.368       **/369      NothingAuthorized: AugmentedError<ApiType>;370      /**371       * No validation function upgrade is currently scheduled.372       **/373      NotScheduled: AugmentedError<ApiType>;374      /**375       * Attempt to upgrade validation function while existing upgrade pending376       **/377      OverlappingUpgrades: AugmentedError<ApiType>;378      /**379       * Polkadot currently prohibits this parachain from upgrading its validation function380       **/381      ProhibitedByPolkadot: AugmentedError<ApiType>;382      /**383       * The supplied validation function has compiled into a blob larger than Polkadot is384       * willing to run385       **/386      TooBig: AugmentedError<ApiType>;387      /**388       * The given code upgrade has not been authorized.389       **/390      Unauthorized: AugmentedError<ApiType>;391      /**392       * The inherent which supplies the validation data did not run this block393       **/394      ValidationDataNotAvailable: AugmentedError<ApiType>;395      /**396       * Generic error397       **/398      [key: string]: AugmentedError<ApiType>;399    };400    polkadotXcm: {401      /**402       * The location is invalid since it already has a subscription from us.403       **/404      AlreadySubscribed: AugmentedError<ApiType>;405      /**406       * The given location could not be used (e.g. because it cannot be expressed in the407       * desired version of XCM).408       **/409      BadLocation: AugmentedError<ApiType>;410      /**411       * The version of the `Versioned` value used is not able to be interpreted.412       **/413      BadVersion: AugmentedError<ApiType>;414      /**415       * Could not re-anchor the assets to declare the fees for the destination chain.416       **/417      CannotReanchor: AugmentedError<ApiType>;418      /**419       * The destination `MultiLocation` provided cannot be inverted.420       **/421      DestinationNotInvertible: AugmentedError<ApiType>;422      /**423       * The assets to be sent are empty.424       **/425      Empty: AugmentedError<ApiType>;426      /**427       * The message execution fails the filter.428       **/429      Filtered: AugmentedError<ApiType>;430      /**431       * Origin is invalid for sending.432       **/433      InvalidOrigin: AugmentedError<ApiType>;434      /**435       * The referenced subscription could not be found.436       **/437      NoSubscription: AugmentedError<ApiType>;438      /**439       * There was some other issue (i.e. not to do with routing) in sending the message. Perhaps440       * a lack of space for buffering the message.441       **/442      SendFailure: AugmentedError<ApiType>;443      /**444       * Too many assets have been attempted for transfer.445       **/446      TooManyAssets: AugmentedError<ApiType>;447      /**448       * The desired destination was unreachable, generally because there is a no way of routing449       * to it.450       **/451      Unreachable: AugmentedError<ApiType>;452      /**453       * The message's weight could not be determined.454       **/455      UnweighableMessage: AugmentedError<ApiType>;456      /**457       * Generic error458       **/459      [key: string]: AugmentedError<ApiType>;460    };461    refungible: {462      /**463       * Not Refungible item data used to mint in Refungible collection.464       **/465      NotRefungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;466      /**467       * Refungible token can't nest other tokens.468       **/469      RefungibleDisallowsNesting: AugmentedError<ApiType>;470      /**471       * Refungible token can't be repartitioned by user who isn't owns all pieces.472       **/473      RepartitionWhileNotOwningAllPieces: AugmentedError<ApiType>;474      /**475       * Setting item properties is not allowed.476       **/477      SettingPropertiesNotAllowed: AugmentedError<ApiType>;478      /**479       * Maximum refungibility exceeded.480       **/481      WrongRefungiblePieces: AugmentedError<ApiType>;482      /**483       * Generic error484       **/485      [key: string]: AugmentedError<ApiType>;486    };487    rmrkCore: {488      /**489       * Not the target owner of the sent NFT.490       **/491      CannotAcceptNonOwnedNft: AugmentedError<ApiType>;492      /**493       * Not the target owner of the sent NFT.494       **/495      CannotRejectNonOwnedNft: AugmentedError<ApiType>;496      /**497       * NFT was not sent and is not pending.498       **/499      CannotRejectNonPendingNft: AugmentedError<ApiType>;500      /**501       * If an NFT is sent to a descendant, that would form a nesting loop, an ouroboros.502       * Sending to self is redundant.503       **/504      CannotSendToDescendentOrSelf: AugmentedError<ApiType>;505      /**506       * Too many tokens created in the collection, no new ones are allowed.507       **/508      CollectionFullOrLocked: AugmentedError<ApiType>;509      /**510       * Only destroying collections without tokens is allowed.511       **/512      CollectionNotEmpty: AugmentedError<ApiType>;513      /**514       * Collection does not exist, has a wrong type, or does not map to a Unique ID.515       **/516      CollectionUnknown: AugmentedError<ApiType>;517      /**518       * Property of the type of RMRK collection could not be read successfully.519       **/520      CorruptedCollectionType: AugmentedError<ApiType>;521      /**522       * Could not find an ID for a collection. It is likely there were too many collections created on the chain, causing an overflow.523       **/524      NoAvailableCollectionId: AugmentedError<ApiType>;525      /**526       * Token does not exist, or there is no suitable ID for it, likely too many tokens were created in a collection, causing an overflow.527       **/528      NoAvailableNftId: AugmentedError<ApiType>;529      /**530       * Could not find an ID for the resource. It is likely there were too many resources created on an NFT, causing an overflow.531       **/532      NoAvailableResourceId: AugmentedError<ApiType>;533      /**534       * Token is marked as non-transferable, and thus cannot be transferred.535       **/536      NonTransferable: AugmentedError<ApiType>;537      /**538       * No permission to perform action.539       **/540      NoPermission: AugmentedError<ApiType>;541      /**542       * No such resource found.543       **/544      ResourceDoesntExist: AugmentedError<ApiType>;545      /**546       * Resource is not pending for the operation.547       **/548      ResourceNotPending: AugmentedError<ApiType>;549      /**550       * Could not find a property by the supplied key.551       **/552      RmrkPropertyIsNotFound: AugmentedError<ApiType>;553      /**554       * Too many symbols supplied as the property key. The maximum is [256](up_data_structs::MAX_PROPERTY_KEY_LENGTH).555       **/556      RmrkPropertyKeyIsTooLong: AugmentedError<ApiType>;557      /**558       * Too many bytes supplied as the property value. The maximum is [32768](up_data_structs::MAX_PROPERTY_VALUE_LENGTH).559       **/560      RmrkPropertyValueIsTooLong: AugmentedError<ApiType>;561      /**562       * Something went wrong when decoding encoded data from the storage.563       * Perhaps, there was a wrong key supplied for the type, or the data was improperly stored.564       **/565      UnableToDecodeRmrkData: AugmentedError<ApiType>;566      /**567       * Generic error568       **/569      [key: string]: AugmentedError<ApiType>;570    };571    rmrkEquip: {572      /**573       * Base collection linked to this ID does not exist.574       **/575      BaseDoesntExist: AugmentedError<ApiType>;576      /**577       * No Theme named "default" is associated with the Base.578       **/579      NeedsDefaultThemeFirst: AugmentedError<ApiType>;580      /**581       * Could not find an ID for a Base collection. It is likely there were too many collections created on the chain, causing an overflow.582       **/583      NoAvailableBaseId: AugmentedError<ApiType>;584      /**585       * Could not find a suitable ID for a Part, likely too many Part tokens were created in the Base, causing an overflow586       **/587      NoAvailablePartId: AugmentedError<ApiType>;588      /**589       * Cannot assign equippables to a fixed Part.590       **/591      NoEquippableOnFixedPart: AugmentedError<ApiType>;592      /**593       * Part linked to this ID does not exist.594       **/595      PartDoesntExist: AugmentedError<ApiType>;596      /**597       * No permission to perform action.598       **/599      PermissionError: AugmentedError<ApiType>;600      /**601       * Generic error602       **/603      [key: string]: AugmentedError<ApiType>;604    };605    scheduler: {606      /**607       * Failed to schedule a call608       **/609      FailedToSchedule: AugmentedError<ApiType>;610      /**611       * Cannot find the scheduled call.612       **/613      NotFound: AugmentedError<ApiType>;614      /**615       * Reschedule failed because it does not change scheduled time.616       **/617      RescheduleNoChange: AugmentedError<ApiType>;618      /**619       * Given target block number is in the past.620       **/621      TargetBlockNumberInPast: AugmentedError<ApiType>;622      /**623       * Generic error624       **/625      [key: string]: AugmentedError<ApiType>;626    };627    structure: {628      /**629       * While nesting, reached the breadth limit of nesting, exceeding the provided budget.630       **/631      BreadthLimit: AugmentedError<ApiType>;632      /**633       * While nesting, reached the depth limit of nesting, exceeding the provided budget.634       **/635      DepthLimit: AugmentedError<ApiType>;636      /**637       * While nesting, encountered an already checked account, detecting a loop.638       **/639      OuroborosDetected: AugmentedError<ApiType>;640      /**641       * Couldn't find the token owner that is itself a token.642       **/643      TokenNotFound: AugmentedError<ApiType>;644      /**645       * Generic error646       **/647      [key: string]: AugmentedError<ApiType>;648    };649    sudo: {650      /**651       * Sender must be the Sudo account652       **/653      RequireSudo: AugmentedError<ApiType>;654      /**655       * Generic error656       **/657      [key: string]: AugmentedError<ApiType>;658    };659    system: {660      /**661       * The origin filter prevent the call to be dispatched.662       **/663      CallFiltered: AugmentedError<ApiType>;664      /**665       * Failed to extract the runtime version from the new runtime.666       * 667       * Either calling `Core_version` or decoding `RuntimeVersion` failed.668       **/669      FailedToExtractRuntimeVersion: AugmentedError<ApiType>;670      /**671       * The name of specification does not match between the current runtime672       * and the new runtime.673       **/674      InvalidSpecName: AugmentedError<ApiType>;675      /**676       * Suicide called when the account has non-default composite data.677       **/678      NonDefaultComposite: AugmentedError<ApiType>;679      /**680       * There is a non-zero reference count preventing the account from being purged.681       **/682      NonZeroRefCount: AugmentedError<ApiType>;683      /**684       * The specification version is not allowed to decrease between the current runtime685       * and the new runtime.686       **/687      SpecVersionNeedsToIncrease: AugmentedError<ApiType>;688      /**689       * Generic error690       **/691      [key: string]: AugmentedError<ApiType>;692    };693    treasury: {694      /**695       * The spend origin is valid but the amount it is allowed to spend is lower than the696       * amount to be spent.697       **/698      InsufficientPermission: AugmentedError<ApiType>;699      /**700       * Proposer's balance is too low.701       **/702      InsufficientProposersBalance: AugmentedError<ApiType>;703      /**704       * No proposal or bounty at that index.705       **/706      InvalidIndex: AugmentedError<ApiType>;707      /**708       * Proposal has not been approved.709       **/710      ProposalNotApproved: AugmentedError<ApiType>;711      /**712       * Too many approvals in the queue.713       **/714      TooManyApprovals: AugmentedError<ApiType>;715      /**716       * Generic error717       **/718      [key: string]: AugmentedError<ApiType>;719    };720    unique: {721      /**722       * Decimal_points parameter must be lower than [`up_data_structs::MAX_DECIMAL_POINTS`].723       **/724      CollectionDecimalPointLimitExceeded: AugmentedError<ApiType>;725      /**726       * This address is not set as sponsor, use setCollectionSponsor first.727       **/728      ConfirmUnsetSponsorFail: AugmentedError<ApiType>;729      /**730       * Length of items properties must be greater than 0.731       **/732      EmptyArgument: AugmentedError<ApiType>;733      /**734       * Repertition is only supported by refungible collection.735       **/736      RepartitionCalledOnNonRefungibleCollection: AugmentedError<ApiType>;737      /**738       * Generic error739       **/740      [key: string]: AugmentedError<ApiType>;741    };742    vesting: {743      /**744       * The vested transfer amount is too low745       **/746      AmountLow: AugmentedError<ApiType>;747      /**748       * Insufficient amount of balance to lock749       **/750      InsufficientBalanceToLock: AugmentedError<ApiType>;751      /**752       * Failed because the maximum vesting schedules was exceeded753       **/754      MaxVestingSchedulesExceeded: AugmentedError<ApiType>;755      /**756       * This account have too many vesting schedules757       **/758      TooManyVestingSchedules: AugmentedError<ApiType>;759      /**760       * Vesting period is zero761       **/762      ZeroVestingPeriod: AugmentedError<ApiType>;763      /**764       * Number of vests is zero765       **/766      ZeroVestingPeriodCount: AugmentedError<ApiType>;767      /**768       * Generic error769       **/770      [key: string]: AugmentedError<ApiType>;771    };772    xcmpQueue: {773      /**774       * Bad overweight index.775       **/776      BadOverweightIndex: AugmentedError<ApiType>;777      /**778       * Bad XCM data.779       **/780      BadXcm: AugmentedError<ApiType>;781      /**782       * Bad XCM origin.783       **/784      BadXcmOrigin: AugmentedError<ApiType>;785      /**786       * Failed to send XCM message.787       **/788      FailedToSend: AugmentedError<ApiType>;789      /**790       * Provided weight is possibly not enough to execute the message.791       **/792      WeightOverLimit: AugmentedError<ApiType>;793      /**794       * Generic error795       **/796      [key: string]: AugmentedError<ApiType>;797    };798  } // AugmentedErrors799} // declare module
after · tests/src/interfaces/augment-api-errors.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/errors';78import type { ApiTypes, AugmentedError } from '@polkadot/api-base/types';910export type __AugmentedError<ApiType extends ApiTypes> = AugmentedError<ApiType>;1112declare module '@polkadot/api-base/types/errors' {13  interface AugmentedErrors<ApiType extends ApiTypes> {14    appPromotion: {15      /**16       * Error due to action requiring admin to be set17       **/18      AdminNotSet: AugmentedError<ApiType>;19      /**20       * An error related to the fact that an invalid argument was passed to perform an action21       **/22      InvalidArgument: AugmentedError<ApiType>;23      /**24       * No permission to perform an action25       **/26      NoPermission: AugmentedError<ApiType>;27      /**28       * Insufficient funds to perform an action29       **/30      NotSufficientFunds: AugmentedError<ApiType>;31      PendingForBlockOverflow: AugmentedError<ApiType>;32      /**33       * Generic error34       **/35      [key: string]: AugmentedError<ApiType>;36    };37    balances: {38      /**39       * Beneficiary account must pre-exist40       **/41      DeadAccount: AugmentedError<ApiType>;42      /**43       * Value too low to create account due to existential deposit44       **/45      ExistentialDeposit: AugmentedError<ApiType>;46      /**47       * A vesting schedule already exists for this account48       **/49      ExistingVestingSchedule: AugmentedError<ApiType>;50      /**51       * Balance too low to send value52       **/53      InsufficientBalance: AugmentedError<ApiType>;54      /**55       * Transfer/payment would kill account56       **/57      KeepAlive: AugmentedError<ApiType>;58      /**59       * Account liquidity restrictions prevent withdrawal60       **/61      LiquidityRestrictions: AugmentedError<ApiType>;62      /**63       * Number of named reserves exceed MaxReserves64       **/65      TooManyReserves: AugmentedError<ApiType>;66      /**67       * Vesting balance too high to send value68       **/69      VestingBalance: AugmentedError<ApiType>;70      /**71       * Generic error72       **/73      [key: string]: AugmentedError<ApiType>;74    };75    common: {76      /**77       * Account token limit exceeded per collection78       **/79      AccountTokenLimitExceeded: AugmentedError<ApiType>;80      /**81       * Can't transfer tokens to ethereum zero address82       **/83      AddressIsZero: AugmentedError<ApiType>;84      /**85       * Address is not in allow list.86       **/87      AddressNotInAllowlist: AugmentedError<ApiType>;88      /**89       * Requested value is more than the approved90       **/91      ApprovedValueTooLow: AugmentedError<ApiType>;92      /**93       * Tried to approve more than owned94       **/95      CantApproveMoreThanOwned: AugmentedError<ApiType>;96      /**97       * Destroying only empty collections is allowed98       **/99      CantDestroyNotEmptyCollection: AugmentedError<ApiType>;100      /**101       * Exceeded max admin count102       **/103      CollectionAdminCountExceeded: AugmentedError<ApiType>;104      /**105       * Collection description can not be longer than 255 char.106       **/107      CollectionDescriptionLimitExceeded: AugmentedError<ApiType>;108      /**109       * Tried to store more data than allowed in collection field110       **/111      CollectionFieldSizeExceeded: AugmentedError<ApiType>;112      /**113       * Tried to access an external collection with an internal API114       **/115      CollectionIsExternal: AugmentedError<ApiType>;116      /**117       * Tried to access an internal collection with an external API118       **/119      CollectionIsInternal: AugmentedError<ApiType>;120      /**121       * Collection limit bounds per collection exceeded122       **/123      CollectionLimitBoundsExceeded: AugmentedError<ApiType>;124      /**125       * Collection name can not be longer than 63 char.126       **/127      CollectionNameLimitExceeded: AugmentedError<ApiType>;128      /**129       * This collection does not exist.130       **/131      CollectionNotFound: AugmentedError<ApiType>;132      /**133       * Collection token limit exceeded134       **/135      CollectionTokenLimitExceeded: AugmentedError<ApiType>;136      /**137       * Token prefix can not be longer than 15 char.138       **/139      CollectionTokenPrefixLimitExceeded: AugmentedError<ApiType>;140      /**141       * Empty property keys are forbidden142       **/143      EmptyPropertyKey: AugmentedError<ApiType>;144      /**145       * Only ASCII letters, digits, and symbols `_`, `-`, and `.` are allowed146       **/147      InvalidCharacterInPropertyKey: AugmentedError<ApiType>;148      /**149       * Metadata flag frozen150       **/151      MetadataFlagFrozen: AugmentedError<ApiType>;152      /**153       * Sender parameter and item owner must be equal.154       **/155      MustBeTokenOwner: AugmentedError<ApiType>;156      /**157       * No permission to perform action158       **/159      NoPermission: AugmentedError<ApiType>;160      /**161       * Tried to store more property data than allowed162       **/163      NoSpaceForProperty: AugmentedError<ApiType>;164      /**165       * Insufficient funds to perform an action166       **/167      NotSufficientFounds: AugmentedError<ApiType>;168      /**169       * Tried to enable permissions which are only permitted to be disabled170       **/171      OwnerPermissionsCantBeReverted: AugmentedError<ApiType>;172      /**173       * Property key is too long174       **/175      PropertyKeyIsTooLong: AugmentedError<ApiType>;176      /**177       * Tried to store more property keys than allowed178       **/179      PropertyLimitReached: AugmentedError<ApiType>;180      /**181       * Collection is not in mint mode.182       **/183      PublicMintingNotAllowed: AugmentedError<ApiType>;184      /**185       * Only tokens from specific collections may nest tokens under this one186       **/187      SourceCollectionIsNotAllowedToNest: AugmentedError<ApiType>;188      /**189       * Item does not exist190       **/191      TokenNotFound: AugmentedError<ApiType>;192      /**193       * Item is balance not enough194       **/195      TokenValueTooLow: AugmentedError<ApiType>;196      /**197       * Total collections bound exceeded.198       **/199      TotalCollectionsLimitExceeded: AugmentedError<ApiType>;200      /**201       * Collection settings not allowing items transferring202       **/203      TransferNotAllowed: AugmentedError<ApiType>;204      /**205       * The operation is not supported206       **/207      UnsupportedOperation: AugmentedError<ApiType>;208      /**209       * User does not satisfy the nesting rule210       **/211      UserIsNotAllowedToNest: AugmentedError<ApiType>;212      /**213       * Generic error214       **/215      [key: string]: AugmentedError<ApiType>;216    };217    cumulusXcm: {218      /**219       * Generic error220       **/221      [key: string]: AugmentedError<ApiType>;222    };223    dmpQueue: {224      /**225       * The amount of weight given is possibly not enough for executing the message.226       **/227      OverLimit: AugmentedError<ApiType>;228      /**229       * The message index given is unknown.230       **/231      Unknown: AugmentedError<ApiType>;232      /**233       * Generic error234       **/235      [key: string]: AugmentedError<ApiType>;236    };237    ethereum: {238      /**239       * Signature is invalid.240       **/241      InvalidSignature: AugmentedError<ApiType>;242      /**243       * Pre-log is present, therefore transact is not allowed.244       **/245      PreLogExists: AugmentedError<ApiType>;246      /**247       * Generic error248       **/249      [key: string]: AugmentedError<ApiType>;250    };251    evm: {252      /**253       * Not enough balance to perform action254       **/255      BalanceLow: AugmentedError<ApiType>;256      /**257       * Calculating total fee overflowed258       **/259      FeeOverflow: AugmentedError<ApiType>;260      /**261       * Gas price is too low.262       **/263      GasPriceTooLow: AugmentedError<ApiType>;264      /**265       * Nonce is invalid266       **/267      InvalidNonce: AugmentedError<ApiType>;268      /**269       * Calculating total payment overflowed270       **/271      PaymentOverflow: AugmentedError<ApiType>;272      /**273       * Withdraw fee failed274       **/275      WithdrawFailed: AugmentedError<ApiType>;276      /**277       * Generic error278       **/279      [key: string]: AugmentedError<ApiType>;280    };281    evmCoderSubstrate: {282      OutOfFund: AugmentedError<ApiType>;283      OutOfGas: AugmentedError<ApiType>;284      /**285       * Generic error286       **/287      [key: string]: AugmentedError<ApiType>;288    };289    evmContractHelpers: {290      /**291       * No pending sponsor for contract.292       **/293      NoPendingSponsor: AugmentedError<ApiType>;294      /**295       * This method is only executable by contract owner296       **/297      NoPermission: AugmentedError<ApiType>;298      /**299       * Generic error300       **/301      [key: string]: AugmentedError<ApiType>;302    };303    evmMigration: {304      /**305       * Migration of this account is not yet started, or already finished.306       **/307      AccountIsNotMigrating: AugmentedError<ApiType>;308      /**309       * Can only migrate to empty address.310       **/311      AccountNotEmpty: AugmentedError<ApiType>;312      /**313       * Generic error314       **/315      [key: string]: AugmentedError<ApiType>;316    };317    fungible: {318      /**319       * Fungible token does not support nesting.320       **/321      FungibleDisallowsNesting: AugmentedError<ApiType>;322      /**323       * Tried to set data for fungible item.324       **/325      FungibleItemsDontHaveData: AugmentedError<ApiType>;326      /**327       * Fungible tokens hold no ID, and the default value of TokenId for Fungible collection is 0.328       **/329      FungibleItemsHaveNoId: AugmentedError<ApiType>;330      /**331       * Not Fungible item data used to mint in Fungible collection.332       **/333      NotFungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;334      /**335       * Setting item properties is not allowed.336       **/337      SettingPropertiesNotAllowed: AugmentedError<ApiType>;338      /**339       * Generic error340       **/341      [key: string]: AugmentedError<ApiType>;342    };343    nonfungible: {344      /**345       * Unable to burn NFT with children346       **/347      CantBurnNftWithChildren: AugmentedError<ApiType>;348      /**349       * Used amount > 1 with NFT350       **/351      NonfungibleItemsHaveNoAmount: AugmentedError<ApiType>;352      /**353       * Not Nonfungible item data used to mint in Nonfungible collection.354       **/355      NotNonfungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;356      /**357       * Generic error358       **/359      [key: string]: AugmentedError<ApiType>;360    };361    parachainSystem: {362      /**363       * The inherent which supplies the host configuration did not run this block364       **/365      HostConfigurationNotAvailable: AugmentedError<ApiType>;366      /**367       * No code upgrade has been authorized.368       **/369      NothingAuthorized: AugmentedError<ApiType>;370      /**371       * No validation function upgrade is currently scheduled.372       **/373      NotScheduled: AugmentedError<ApiType>;374      /**375       * Attempt to upgrade validation function while existing upgrade pending376       **/377      OverlappingUpgrades: AugmentedError<ApiType>;378      /**379       * Polkadot currently prohibits this parachain from upgrading its validation function380       **/381      ProhibitedByPolkadot: AugmentedError<ApiType>;382      /**383       * The supplied validation function has compiled into a blob larger than Polkadot is384       * willing to run385       **/386      TooBig: AugmentedError<ApiType>;387      /**388       * The given code upgrade has not been authorized.389       **/390      Unauthorized: AugmentedError<ApiType>;391      /**392       * The inherent which supplies the validation data did not run this block393       **/394      ValidationDataNotAvailable: AugmentedError<ApiType>;395      /**396       * Generic error397       **/398      [key: string]: AugmentedError<ApiType>;399    };400    polkadotXcm: {401      /**402       * The location is invalid since it already has a subscription from us.403       **/404      AlreadySubscribed: AugmentedError<ApiType>;405      /**406       * The given location could not be used (e.g. because it cannot be expressed in the407       * desired version of XCM).408       **/409      BadLocation: AugmentedError<ApiType>;410      /**411       * The version of the `Versioned` value used is not able to be interpreted.412       **/413      BadVersion: AugmentedError<ApiType>;414      /**415       * Could not re-anchor the assets to declare the fees for the destination chain.416       **/417      CannotReanchor: AugmentedError<ApiType>;418      /**419       * The destination `MultiLocation` provided cannot be inverted.420       **/421      DestinationNotInvertible: AugmentedError<ApiType>;422      /**423       * The assets to be sent are empty.424       **/425      Empty: AugmentedError<ApiType>;426      /**427       * The message execution fails the filter.428       **/429      Filtered: AugmentedError<ApiType>;430      /**431       * Origin is invalid for sending.432       **/433      InvalidOrigin: AugmentedError<ApiType>;434      /**435       * The referenced subscription could not be found.436       **/437      NoSubscription: AugmentedError<ApiType>;438      /**439       * There was some other issue (i.e. not to do with routing) in sending the message. Perhaps440       * a lack of space for buffering the message.441       **/442      SendFailure: AugmentedError<ApiType>;443      /**444       * Too many assets have been attempted for transfer.445       **/446      TooManyAssets: AugmentedError<ApiType>;447      /**448       * The desired destination was unreachable, generally because there is a no way of routing449       * to it.450       **/451      Unreachable: AugmentedError<ApiType>;452      /**453       * The message's weight could not be determined.454       **/455      UnweighableMessage: AugmentedError<ApiType>;456      /**457       * Generic error458       **/459      [key: string]: AugmentedError<ApiType>;460    };461    refungible: {462      /**463       * Not Refungible item data used to mint in Refungible collection.464       **/465      NotRefungibleDataUsedToMintFungibleCollectionToken: AugmentedError<ApiType>;466      /**467       * Refungible token can't nest other tokens.468       **/469      RefungibleDisallowsNesting: AugmentedError<ApiType>;470      /**471       * Refungible token can't be repartitioned by user who isn't owns all pieces.472       **/473      RepartitionWhileNotOwningAllPieces: AugmentedError<ApiType>;474      /**475       * Setting item properties is not allowed.476       **/477      SettingPropertiesNotAllowed: AugmentedError<ApiType>;478      /**479       * Maximum refungibility exceeded.480       **/481      WrongRefungiblePieces: AugmentedError<ApiType>;482      /**483       * Generic error484       **/485      [key: string]: AugmentedError<ApiType>;486    };487    rmrkCore: {488      /**489       * Not the target owner of the sent NFT.490       **/491      CannotAcceptNonOwnedNft: AugmentedError<ApiType>;492      /**493       * Not the target owner of the sent NFT.494       **/495      CannotRejectNonOwnedNft: AugmentedError<ApiType>;496      /**497       * NFT was not sent and is not pending.498       **/499      CannotRejectNonPendingNft: AugmentedError<ApiType>;500      /**501       * If an NFT is sent to a descendant, that would form a nesting loop, an ouroboros.502       * Sending to self is redundant.503       **/504      CannotSendToDescendentOrSelf: AugmentedError<ApiType>;505      /**506       * Too many tokens created in the collection, no new ones are allowed.507       **/508      CollectionFullOrLocked: AugmentedError<ApiType>;509      /**510       * Only destroying collections without tokens is allowed.511       **/512      CollectionNotEmpty: AugmentedError<ApiType>;513      /**514       * Collection does not exist, has a wrong type, or does not map to a Unique ID.515       **/516      CollectionUnknown: AugmentedError<ApiType>;517      /**518       * Property of the type of RMRK collection could not be read successfully.519       **/520      CorruptedCollectionType: AugmentedError<ApiType>;521      /**522       * Could not find an ID for a collection. It is likely there were too many collections created on the chain, causing an overflow.523       **/524      NoAvailableCollectionId: AugmentedError<ApiType>;525      /**526       * Token does not exist, or there is no suitable ID for it, likely too many tokens were created in a collection, causing an overflow.527       **/528      NoAvailableNftId: AugmentedError<ApiType>;529      /**530       * Could not find an ID for the resource. It is likely there were too many resources created on an NFT, causing an overflow.531       **/532      NoAvailableResourceId: AugmentedError<ApiType>;533      /**534       * Token is marked as non-transferable, and thus cannot be transferred.535       **/536      NonTransferable: AugmentedError<ApiType>;537      /**538       * No permission to perform action.539       **/540      NoPermission: AugmentedError<ApiType>;541      /**542       * No such resource found.543       **/544      ResourceDoesntExist: AugmentedError<ApiType>;545      /**546       * Resource is not pending for the operation.547       **/548      ResourceNotPending: AugmentedError<ApiType>;549      /**550       * Could not find a property by the supplied key.551       **/552      RmrkPropertyIsNotFound: AugmentedError<ApiType>;553      /**554       * Too many symbols supplied as the property key. The maximum is [256](up_data_structs::MAX_PROPERTY_KEY_LENGTH).555       **/556      RmrkPropertyKeyIsTooLong: AugmentedError<ApiType>;557      /**558       * Too many bytes supplied as the property value. The maximum is [32768](up_data_structs::MAX_PROPERTY_VALUE_LENGTH).559       **/560      RmrkPropertyValueIsTooLong: AugmentedError<ApiType>;561      /**562       * Something went wrong when decoding encoded data from the storage.563       * Perhaps, there was a wrong key supplied for the type, or the data was improperly stored.564       **/565      UnableToDecodeRmrkData: AugmentedError<ApiType>;566      /**567       * Generic error568       **/569      [key: string]: AugmentedError<ApiType>;570    };571    rmrkEquip: {572      /**573       * Base collection linked to this ID does not exist.574       **/575      BaseDoesntExist: AugmentedError<ApiType>;576      /**577       * No Theme named "default" is associated with the Base.578       **/579      NeedsDefaultThemeFirst: AugmentedError<ApiType>;580      /**581       * Could not find an ID for a Base collection. It is likely there were too many collections created on the chain, causing an overflow.582       **/583      NoAvailableBaseId: AugmentedError<ApiType>;584      /**585       * Could not find a suitable ID for a Part, likely too many Part tokens were created in the Base, causing an overflow586       **/587      NoAvailablePartId: AugmentedError<ApiType>;588      /**589       * Cannot assign equippables to a fixed Part.590       **/591      NoEquippableOnFixedPart: AugmentedError<ApiType>;592      /**593       * Part linked to this ID does not exist.594       **/595      PartDoesntExist: AugmentedError<ApiType>;596      /**597       * No permission to perform action.598       **/599      PermissionError: AugmentedError<ApiType>;600      /**601       * Generic error602       **/603      [key: string]: AugmentedError<ApiType>;604    };605    scheduler: {606      /**607       * Failed to schedule a call608       **/609      FailedToSchedule: AugmentedError<ApiType>;610      /**611       * Cannot find the scheduled call.612       **/613      NotFound: AugmentedError<ApiType>;614      /**615       * Reschedule failed because it does not change scheduled time.616       **/617      RescheduleNoChange: AugmentedError<ApiType>;618      /**619       * Given target block number is in the past.620       **/621      TargetBlockNumberInPast: AugmentedError<ApiType>;622      /**623       * Generic error624       **/625      [key: string]: AugmentedError<ApiType>;626    };627    structure: {628      /**629       * While nesting, reached the breadth limit of nesting, exceeding the provided budget.630       **/631      BreadthLimit: AugmentedError<ApiType>;632      /**633       * While nesting, reached the depth limit of nesting, exceeding the provided budget.634       **/635      DepthLimit: AugmentedError<ApiType>;636      /**637       * While nesting, encountered an already checked account, detecting a loop.638       **/639      OuroborosDetected: AugmentedError<ApiType>;640      /**641       * Couldn't find the token owner that is itself a token.642       **/643      TokenNotFound: AugmentedError<ApiType>;644      /**645       * Generic error646       **/647      [key: string]: AugmentedError<ApiType>;648    };649    sudo: {650      /**651       * Sender must be the Sudo account652       **/653      RequireSudo: AugmentedError<ApiType>;654      /**655       * Generic error656       **/657      [key: string]: AugmentedError<ApiType>;658    };659    system: {660      /**661       * The origin filter prevent the call to be dispatched.662       **/663      CallFiltered: AugmentedError<ApiType>;664      /**665       * Failed to extract the runtime version from the new runtime.666       * 667       * Either calling `Core_version` or decoding `RuntimeVersion` failed.668       **/669      FailedToExtractRuntimeVersion: AugmentedError<ApiType>;670      /**671       * The name of specification does not match between the current runtime672       * and the new runtime.673       **/674      InvalidSpecName: AugmentedError<ApiType>;675      /**676       * Suicide called when the account has non-default composite data.677       **/678      NonDefaultComposite: AugmentedError<ApiType>;679      /**680       * There is a non-zero reference count preventing the account from being purged.681       **/682      NonZeroRefCount: AugmentedError<ApiType>;683      /**684       * The specification version is not allowed to decrease between the current runtime685       * and the new runtime.686       **/687      SpecVersionNeedsToIncrease: AugmentedError<ApiType>;688      /**689       * Generic error690       **/691      [key: string]: AugmentedError<ApiType>;692    };693    treasury: {694      /**695       * The spend origin is valid but the amount it is allowed to spend is lower than the696       * amount to be spent.697       **/698      InsufficientPermission: AugmentedError<ApiType>;699      /**700       * Proposer's balance is too low.701       **/702      InsufficientProposersBalance: AugmentedError<ApiType>;703      /**704       * No proposal or bounty at that index.705       **/706      InvalidIndex: AugmentedError<ApiType>;707      /**708       * Proposal has not been approved.709       **/710      ProposalNotApproved: AugmentedError<ApiType>;711      /**712       * Too many approvals in the queue.713       **/714      TooManyApprovals: AugmentedError<ApiType>;715      /**716       * Generic error717       **/718      [key: string]: AugmentedError<ApiType>;719    };720    unique: {721      /**722       * Decimal_points parameter must be lower than [`up_data_structs::MAX_DECIMAL_POINTS`].723       **/724      CollectionDecimalPointLimitExceeded: AugmentedError<ApiType>;725      /**726       * This address is not set as sponsor, use setCollectionSponsor first.727       **/728      ConfirmUnsetSponsorFail: AugmentedError<ApiType>;729      /**730       * Length of items properties must be greater than 0.731       **/732      EmptyArgument: AugmentedError<ApiType>;733      /**734       * Repertition is only supported by refungible collection.735       **/736      RepartitionCalledOnNonRefungibleCollection: AugmentedError<ApiType>;737      /**738       * Generic error739       **/740      [key: string]: AugmentedError<ApiType>;741    };742    vesting: {743      /**744       * The vested transfer amount is too low745       **/746      AmountLow: AugmentedError<ApiType>;747      /**748       * Insufficient amount of balance to lock749       **/750      InsufficientBalanceToLock: AugmentedError<ApiType>;751      /**752       * Failed because the maximum vesting schedules was exceeded753       **/754      MaxVestingSchedulesExceeded: AugmentedError<ApiType>;755      /**756       * This account have too many vesting schedules757       **/758      TooManyVestingSchedules: AugmentedError<ApiType>;759      /**760       * Vesting period is zero761       **/762      ZeroVestingPeriod: AugmentedError<ApiType>;763      /**764       * Number of vests is zero765       **/766      ZeroVestingPeriodCount: AugmentedError<ApiType>;767      /**768       * Generic error769       **/770      [key: string]: AugmentedError<ApiType>;771    };772    xcmpQueue: {773      /**774       * Bad overweight index.775       **/776      BadOverweightIndex: AugmentedError<ApiType>;777      /**778       * Bad XCM data.779       **/780      BadXcm: AugmentedError<ApiType>;781      /**782       * Bad XCM origin.783       **/784      BadXcmOrigin: AugmentedError<ApiType>;785      /**786       * Failed to send XCM message.787       **/788      FailedToSend: AugmentedError<ApiType>;789      /**790       * Provided weight is possibly not enough to execute the message.791       **/792      WeightOverLimit: AugmentedError<ApiType>;793      /**794       * Generic error795       **/796      [key: string]: AugmentedError<ApiType>;797    };798  } // AugmentedErrors799} // declare module
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
--- a/tests/src/interfaces/augment-api-query.ts
+++ b/tests/src/interfaces/augment-api-query.ts
@@ -36,10 +36,6 @@
        * Amount of stakes for an Account
        **/
       stakesPerAccount: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<u8>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
-      /**
-       * A block when app-promotion has started .I think this is redundant, because we only need `NextInterestBlock`.
-       **/
-      startBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
       totalStaked: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
       /**
        * Generic query
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) */