git.delta.rocks / unique-network / refs/commits / 982476ef99fe

difftreelog

feautres: Pending interval is now tied to relay blocks, contract sponsors and `stopAppPromotion` added. Preparing to integrate the `app-promotion` palette to integrate with Unique and Quartz.

PraetorP2022-08-29parent: #9d0f344.patch.diff
in: master

13 files changed

modifiedpallets/app-promotion/src/lib.rsdiffbeforeafterboth
--- a/pallets/app-promotion/src/lib.rs
+++ b/pallets/app-promotion/src/lib.rs
@@ -37,9 +37,10 @@
 pub mod weights;
 
 use sp_std::{vec::Vec, iter::Sum, borrow::ToOwned};
+use sp_core::H160;
 use codec::EncodeLike;
 use pallet_balances::BalanceLock;
-pub use types::ExtendedLockableCurrency;
+pub use types::*;
 
 // use up_common::constants::{DAYS, UNIQUE};
 use up_data_structs::CollectionId;
@@ -78,7 +79,6 @@
 	use super::*;
 	use frame_support::{Blake2_128Concat, Twox64Concat, pallet_prelude::*, storage::Key, PalletId};
 	use frame_system::pallet_prelude::*;
-	use types::CollectionHandler;
 
 	#[pallet::config]
 	pub trait Config: frame_system::Config + pallet_evm::account::Config {
@@ -89,6 +89,8 @@
 			CollectionId = CollectionId,
 		>;
 
+		type ContractHandler: ContractHandler<AccountId = Self::CrossAccountId, ContractId = H160>;
+
 		type TreasuryAccountId: Get<Self::AccountId>;
 
 		/// The app's pallet id, used for deriving its sovereign account ID.
@@ -98,7 +100,7 @@
 		/// In relay blocks.
 		#[pallet::constant]
 		type RecalculationInterval: Get<Self::BlockNumber>;
-		/// In chain blocks.
+		/// In relay blocks.
 		#[pallet::constant]
 		type PendingInterval: Get<Self::BlockNumber>;
 
@@ -120,13 +122,6 @@
 
 		/// Events compatible with [`frame_system::Config::Event`].
 		type Event: IsType<<Self as frame_system::Config>::Event> + From<Event<Self>>;
-
-		// /// Number of blocks that pass between treasury balance updates due to inflation
-		// #[pallet::constant]
-		// type InterestBlockInterval: Get<Self::BlockNumber>;
-
-		// // Weight information for functions of this pallet.
-		// type WeightInfo: WeightInfo;
 	}
 
 	#[pallet::pallet]
@@ -146,13 +141,14 @@
 
 	#[pallet::error]
 	pub enum Error<T> {
+		/// Error due to action requiring admin to be set
 		AdminNotSet,
-		/// No permission to perform action
+		/// No permission to perform an action
 		NoPermission,
 		/// Insufficient funds to perform an action
 		NotSufficientFounds,
+		/// An error related to the fact that an invalid argument was passed to perform an action
 		InvalidArgument,
-		AlreadySponsored,
 	}
 
 	#[pallet::storage]
@@ -183,7 +179,7 @@
 		QueryKind = ValueQuery,
 	>;
 
-	/// A block when app-promotion has started
+	/// A block when app-promotion has started .I think this is redundant, because we only need `NextInterestBlock`.
 	#[pallet::storage]
 	pub type StartBlock<T: Config> = StorageValue<Value = T::BlockNumber, QueryKind = ValueQuery>;
 
@@ -285,6 +281,21 @@
 			Ok(())
 		}
 
+		#[pallet::weight(0)]
+		pub fn stop_app_promotion(origin: OriginFor<T>) -> DispatchResult
+		where
+			<T as frame_system::Config>::BlockNumber: From<u32>,
+		{
+			ensure_root(origin)?;
+
+			if <StartBlock<T>>::get() != 0u32.into() {
+				<StartBlock<T>>::set(T::BlockNumber::default());
+				<NextInterestBlock<T>>::set(T::BlockNumber::default());
+			}
+
+			Ok(())
+		}
+
 		#[pallet::weight(T::WeightInfo::stake())]
 		pub fn stake(staker: OriginFor<T>, amount: BalanceOf<T>) -> DispatchResult {
 			let staker_id = ensure_signed(staker)?;
@@ -341,7 +352,8 @@
 					.ok_or(ArithmeticError::Underflow)?,
 			);
 
-			let block = frame_system::Pallet::<T>::block_number() + T::PendingInterval::get();
+			let block =
+				T::RelayBlockNumberProvider::current_block_number() + T::PendingInterval::get();
 			<PendingUnstake<T>>::insert(
 				(&staker_id, block),
 				<PendingUnstake<T>>::get((&staker_id, block))
@@ -415,113 +427,46 @@
 			);
 			T::CollectionHandler::remove_collection_sponsor(collection_id)
 		}
-	}
-}
-
-impl<T: Config> Pallet<T> {
-	// pub fn stake(staker: &T::AccountId, amount: BalanceOf<T>) -> DispatchResult {
-	// 	let balance = <<T as Config>::Currency as Currency<T::AccountId>>::free_balance(staker);
-
-	// 	ensure!(balance >= amount, ArithmeticError::Underflow);
-
-	// 	Self::set_lock_unchecked(staker, amount);
-
-	// 	let block_number = <T::BlockNumberProvider as BlockNumberProvider>::current_block_number();
 
-	// 	<Staked<T>>::insert(
-	// 		(staker, block_number),
-	// 		<Staked<T>>::get((staker, block_number))
-	// 			.checked_add(&amount)
-	// 			.ok_or(ArithmeticError::Overflow)?,
-	// 	);
-
-	// 	<TotalStaked<T>>::set(
-	// 		<TotalStaked<T>>::get()
-	// 			.checked_add(&amount)
-	// 			.ok_or(ArithmeticError::Overflow)?,
-	// 	);
-
-	// 	Ok(())
-	// }
-
-	// pub fn unstake(staker: &T::AccountId, amount: BalanceOf<T>) -> DispatchResult {
-	// 	let mut stakes = Staked::<T>::iter_prefix((staker,)).collect::<Vec<_>>();
-
-	// 	let total_staked = stakes
-	// 		.iter()
-	// 		.fold(<BalanceOf<T>>::default(), |acc, (_, amount)| acc + *amount);
-
-	// 	ensure!(total_staked >= amount, ArithmeticError::Underflow);
-
-	// 	<TotalStaked<T>>::set(
-	// 		<TotalStaked<T>>::get()
-	// 			.checked_sub(&amount)
-	// 			.ok_or(ArithmeticError::Underflow)?,
-	// 	);
-
-	// 	let block = <T::BlockNumberProvider>::current_block_number() + WEEK.into();
-	// 	<PendingUnstake<T>>::insert(
-	// 		(staker, block),
-	// 		<PendingUnstake<T>>::get((staker, block))
-	// 			.checked_add(&amount)
-	// 			.ok_or(ArithmeticError::Overflow)?,
-	// 	);
-
-	// 	stakes.sort_by_key(|(block, _)| *block);
-
-	// 	let mut acc_amount = amount;
-	// 	let new_state = stakes
-	// 		.into_iter()
-	// 		.map_while(|(block, balance_per_block)| {
-	// 			if acc_amount == <BalanceOf<T>>::default() {
-	// 				return None;
-	// 			}
-	// 			if acc_amount <= balance_per_block {
-	// 				let res = (block, balance_per_block - acc_amount, acc_amount);
-	// 				acc_amount = <BalanceOf<T>>::default();
-	// 				return Some(res);
-	// 			} else {
-	// 				acc_amount -= balance_per_block;
-	// 				return Some((block, <BalanceOf<T>>::default(), acc_amount));
-	// 			}
-	// 		})
-	// 		.collect::<Vec<_>>();
-
-	// 	new_state
-	// 		.into_iter()
-	// 		.for_each(|(block, to_staked, _to_pending)| {
-	// 			if to_staked == <BalanceOf<T>>::default() {
-	// 				<Staked<T>>::remove((staker, block));
-	// 			} else {
-	// 				<Staked<T>>::insert((staker, block), to_staked);
-	// 			}
-	// 		});
+		#[pallet::weight(0)]
+		pub fn sponsor_conract(admin: OriginFor<T>, contract_id: H160) -> DispatchResult {
+			let admin_id = ensure_signed(admin)?;
 
-	// 	Ok(())
-	// }
+			ensure!(
+				admin_id == Admin::<T>::get().ok_or(Error::<T>::AdminNotSet)?,
+				Error::<T>::NoPermission
+			);
 
-	// pub fn sponsor_collection(admin: T::AccountId, collection_id: u32) -> DispatchResult {
-	// 	Ok(())
-	// }
+			T::ContractHandler::set_sponsor(
+				T::CrossAccountId::from_sub(Self::account_id()),
+				contract_id,
+			)
+		}
 
-	// pub fn stop_sponsorign_collection(admin: T::AccountId, collection_id: u32) -> DispatchResult {
-	// 	Ok(())
-	// }
+		#[pallet::weight(0)]
+		pub fn stop_sponsorign_contract(admin: OriginFor<T>, contract_id: H160) -> DispatchResult {
+			let admin_id = ensure_signed(admin)?;
 
-	pub fn sponsor_conract(admin: T::AccountId, app_id: u32) -> DispatchResult {
-		Ok(())
-	}
+			ensure!(
+				admin_id == Admin::<T>::get().ok_or(Error::<T>::AdminNotSet)?,
+				Error::<T>::NoPermission
+			);
 
-	pub fn stop_sponsorign_contract(admin: T::AccountId, app_id: u32) -> DispatchResult {
-		Ok(())
+			ensure!(
+				T::ContractHandler::get_sponsor(contract_id)?.ok_or(<Error<T>>::InvalidArgument)?
+					== T::CrossAccountId::from_sub(Self::account_id()),
+				<Error<T>>::NoPermission
+			);
+			T::ContractHandler::remove_contract_sponsor(contract_id)
+		}
 	}
+}
 
+impl<T: Config> Pallet<T> {
 	pub fn account_id() -> T::AccountId {
 		T::PalletId::get().into_account_truncating()
 	}
-}
 
-impl<T: Config> Pallet<T> {
 	fn unlock_balance_unchecked(staker: &T::AccountId, amount: BalanceOf<T>) {
 		let mut locked_balance = Self::get_locked_balance(staker).map(|l| l.amount).unwrap();
 		locked_balance -= amount;
modifiedpallets/app-promotion/src/types.rsdiffbeforeafterboth
--- a/pallets/app-promotion/src/types.rs
+++ b/pallets/app-promotion/src/types.rs
@@ -9,7 +9,7 @@
 use sp_runtime::DispatchError;
 use up_data_structs::{CollectionId, SponsorshipState};
 use sp_std::borrow::ToOwned;
-
+use pallet_evm_contract_helpers::{Pallet as EvmHelpersPallet, Config as EvmHelpersConfig, Sponsoring};
 
 pub trait ExtendedLockableCurrency<AccountId: Parameter>: LockableCurrency<AccountId> {
 	fn locks<KArg>(who: KArg) -> WeakBoundedVec<BalanceLock<Self::Balance>, Self::MaxLocks>
@@ -94,3 +94,40 @@
 			.map(|acc| acc.to_owned()))
 	}
 }
+
+pub trait ContractHandler {
+	type ContractId;
+	type AccountId;
+
+	fn set_sponsor(sponsor_id: Self::AccountId, contract_id: Self::ContractId) -> DispatchResult;
+
+	fn remove_contract_sponsor(collection_id: Self::ContractId) -> DispatchResult;
+
+	fn get_sponsor(contract_id: Self::ContractId)
+		-> Result<Option<Self::AccountId>, DispatchError>;
+}
+
+impl<T: EvmHelpersConfig> ContractHandler for EvmHelpersPallet<T> {
+	type ContractId = sp_core::H160;
+
+	type AccountId = T::CrossAccountId;
+
+	fn set_sponsor(sponsor_id: Self::AccountId, contract_id: Self::ContractId) -> DispatchResult {
+		Sponsoring::<T>::insert(
+			contract_id,
+			SponsorshipState::<T::CrossAccountId>::Confirmed(sponsor_id),
+		);
+		Ok(())
+	}
+
+	fn remove_contract_sponsor(contract_id: Self::ContractId) -> DispatchResult {
+		Sponsoring::<T>::remove(contract_id);
+		Ok(())
+	}
+
+	fn get_sponsor(
+		contract_id: Self::ContractId,
+	) -> Result<Option<Self::AccountId>, DispatchError> {
+		Ok(Self::get_sponsor(contract_id))
+	}
+}
modifiedpallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/lib.rs
+++ b/pallets/evm-contract-helpers/src/lib.rs
@@ -75,7 +75,7 @@
 	/// * **Key** - contract address.
 	/// * **Value** - sponsorship state.
 	#[pallet::storage]
-	pub(super) type Sponsoring<T: Config> = StorageMap<
+	pub type Sponsoring<T: Config> = StorageMap<
 		Hasher = Twox64Concat,
 		Key = H160,
 		Value = SponsorshipState<T::CrossAccountId>,
modifiedprimitives/common/src/constants.rsdiffbeforeafterboth
--- a/primitives/common/src/constants.rs
+++ b/primitives/common/src/constants.rs
@@ -22,6 +22,7 @@
 use crate::types::{BlockNumber, Balance};
 
 pub const MILLISECS_PER_BLOCK: u64 = 12000;
+pub const MILLISECS_PER_RELAY_BLOCK: u64 = 6000;
 
 pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;
 
@@ -30,6 +31,11 @@
 pub const HOURS: BlockNumber = MINUTES * 60;
 pub const DAYS: BlockNumber = HOURS * 24;
 
+// These time units are defined in number of relay blocks.
+pub const RELAY_MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_RELAY_BLOCK as BlockNumber);
+pub const RELAY_HOURS: BlockNumber = RELAY_MINUTES * 60;
+pub const RELAY_DAYS: BlockNumber = RELAY_HOURS * 24;
+
 pub const MICROUNIQUE: Balance = 1_000_000_000_000;
 pub const MILLIUNIQUE: Balance = 1_000 * MICROUNIQUE;
 pub const CENTIUNIQUE: Balance = 10 * MILLIUNIQUE;
modifiedruntime/common/config/pallets/app_promotion.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/app_promotion.rs
+++ b/runtime/common/config/pallets/app_promotion.rs
@@ -16,28 +16,40 @@
 
 use crate::{
 	runtime_common::config::pallets::{TreasuryAccountId, RelayChainBlockNumberProvider},
-	Runtime, Balances, BlockNumber, Unique, Event,
+	Runtime, Balances, BlockNumber, Unique, Event, EvmContractHelpers,
 };
 
 use frame_support::{parameter_types, PalletId};
 use sp_arithmetic::Perbill;
 use up_common::{
-	constants::{DAYS, UNIQUE},
+	constants::{DAYS, UNIQUE, RELAY_DAYS},
 	types::Balance,
 };
 
+#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]
 parameter_types! {
 	pub const AppPromotionId: PalletId = PalletId(*b"appstake");
 	pub const RecalculationInterval: BlockNumber = 20;
-	pub const PendingInterval: BlockNumber = 10;
+	pub const PendingInterval: BlockNumber = 20;
 	pub const Nominal: Balance = UNIQUE;
 	pub const Day: BlockNumber = DAYS;
-	pub IntervalIncome: Perbill = Perbill::from_rational(RecalculationInterval::get(), 2 * DAYS) * Perbill::from_rational(5u32, 10_000);
+	pub IntervalIncome: Perbill = Perbill::from_rational(RecalculationInterval::get(), RELAY_DAYS) * Perbill::from_rational(5u32, 10_000);
+}
+
+#[cfg(any(feature = "unique-runtime", feature = "quartz-runtime"))]
+parameter_types! {
+	pub const AppPromotionId: PalletId = PalletId(*b"appstake");
+	pub const RecalculationInterval: BlockNumber = RELAY_DAYS;
+	pub const PendingInterval: BlockNumber = 7 * RELAY_DAYS;
+	pub const Nominal: Balance = UNIQUE;
+	pub const Day: BlockNumber = RELAY_DAYS;
+	pub IntervalIncome: Perbill = Perbill::from_rational(5u32, 10_000);
 }
 
 impl pallet_app_promotion::Config for Runtime {
 	type PalletId = AppPromotionId;
 	type CollectionHandler = Unique;
+	type ContractHandler = EvmContractHelpers;
 	type Currency = Balances;
 	type WeightInfo = pallet_app_promotion::weights::SubstrateWeight<Self>;
 	type TreasuryAccountId = TreasuryAccountId;
modifiedtests/src/app-promotion.test.tsdiffbeforeafterboth
--- a/tests/src/app-promotion.test.ts
+++ b/tests/src/app-promotion.test.ts
@@ -706,6 +706,12 @@
       nominal = helper.balance.getOneTokenNominal();
     });
   });
+
+  after(async function () {
+    await usingPlaygrounds(async (helper) => {
+      await helper.signTransaction(alice, helper.api!.tx.sudo.sudo(helper.api!.tx.promotion.stopAppPromotion()));
+    });
+  });
   
   it('will credit 0.05% for staking period', async () => {
     // arrange: bob.stake(10000);
@@ -770,39 +776,24 @@
       const staker = await createUser(40n * nominal);
       
       await waitForRecalculationBlock(helper.api!);
-      // const foo = await helper.api!.registry.getChainProperties().
+      
 
       await expect(helper.signTransaction(staker, helper.api!.tx.promotion.stake(10n * nominal))).to.be.eventually.fulfilled;
-      // await waitNewBlocks(helper.api!, 1);
+      
       await expect(helper.signTransaction(staker, helper.api!.tx.promotion.stake(10n * nominal))).to.be.eventually.fulfilled;
-      // await waitNewBlocks(helper.api!, 1);
+      
       await expect(helper.signTransaction(staker, helper.api!.tx.promotion.stake(10n * nominal))).to.be.eventually.fulfilled;
-      // console.log(await helper.balance.getSubstrate(staker.address));
-      // await waitNewBlocks(helper.api!, 17);
+      
       await waitForRelayBlock(helper.api!, 34);
       expect((await helper.api!.rpc.unique.totalStakedPerBlock(normalizeAccountId(staker)))
         .map(([_, amount]) => amount.toBigInt()))
         .to.be.deep.equal([calculateIncome(10n * nominal, 10n), calculateIncome(10n * nominal, 10n), calculateIncome(10n * nominal, 10n)]);
       
-      // console.log(await getBlockNumber(helper.api!));
-      // console.log((await helper.api!.rpc.unique.totalStakedPerBlock(normalizeAccountId(staker))).map(([block, amount]) => [block.toBigInt(), amount.toBigInt()]));
-      // console.log(`${calculateIncome(10n * nominal, 10n)} || ${calculateIncome(10n * nominal, 10n, 2)}`);
-      // await waitNewBlocks(helper.api!, 10);
       await waitForRelayBlock(helper.api!, 20);
-      // console.log((await helper.api!.rpc.unique.totalStakedPerBlock(normalizeAccountId(staker))).map(([_, amount]) => amount.toBigInt()));
-      // console.log(await helper.balance.getSubstrate(staker.address));
       await expect(helper.signTransaction(staker, helper.api!.tx.promotion.unstake(calculateIncome(10n * nominal, 10n, 2) - 10n * nominal))).to.be.eventually.fulfilled;
-      // console.log(calculateIncome(10n * nominal, 10n, 2));
-      // console.log(calculateIncome(10n * nominal, 10n, 3));
-      // console.log(calculateIncome(10n * nominal, 10n, 4));
-      // console.log(calculateIncome(10n * nominal, 10n, 5));
       expect((await helper.api!.rpc.unique.totalStakedPerBlock(normalizeAccountId(staker)))
         .map(([_, amount]) => amount.toBigInt()))
         .to.be.deep.equal([10n * nominal, calculateIncome(10n * nominal, 10n, 2), calculateIncome(10n * nominal, 10n, 2)]);
-      
-      // console.log((await helper.api!.rpc.unique.totalStakedPerBlock(normalizeAccountId(staker))).map(([_, amount]) => amount.toBigInt()));
-      
-      // console.log(await helper.balance.getSubstrate(staker.address));
     });
     
   });
modifiedtests/src/interfaces/augment-api-consts.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-consts.ts
+++ b/tests/src/interfaces/augment-api-consts.ts
@@ -78,7 +78,7 @@
        **/
       palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
       /**
-       * In chain blocks.
+       * In relay blocks.
        **/
       pendingInterval: u32 & 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
@@ -430,11 +430,16 @@
       [key: string]: AugmentedError<ApiType>;
     };
     promotion: {
+      /**
+       * Error due to action requiring admin to be set
+       **/
       AdminNotSet: AugmentedError<ApiType>;
-      AlreadySponsored: AugmentedError<ApiType>;
+      /**
+       * An error related to the fact that an invalid argument was passed to perform an action
+       **/
       InvalidArgument: AugmentedError<ApiType>;
       /**
-       * No permission to perform action
+       * No permission to perform an action
        **/
       NoPermission: AugmentedError<ApiType>;
       /**
modifiedtests/src/interfaces/augment-api-query.tsdiffbeforeafterboth
before · 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 } 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    balances: {21      /**22       * The Balances pallet example of storing the balance of an account.23       * 24       * # Example25       * 26       * ```nocompile27       * impl pallet_balances::Config for Runtime {28       * type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>29       * }30       * ```31       * 32       * You can also store the balance of an account in the `System` pallet.33       * 34       * # Example35       * 36       * ```nocompile37       * impl pallet_balances::Config for Runtime {38       * type AccountStore = System39       * }40       * ```41       * 42       * But this comes with tradeoffs, storing account balances in the system pallet stores43       * `frame_system` data alongside the account data contrary to storing account balances in the44       * `Balances` pallet, which uses a `StorageMap` to store balances data only.45       * NOTE: This is only used in the case that this pallet is used to store balances.46       **/47      account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;48      /**49       * Any liquidity locks on some account balances.50       * NOTE: Should only be accessed when setting, changing and freeing a lock.51       **/52      locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesBalanceLock>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;53      /**54       * Named reserves on some account balances.55       **/56      reserves: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesReserveData>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;57      /**58       * Storage version of the pallet.59       * 60       * This is set to v2.0.0 for new networks.61       **/62      storageVersion: AugmentedQuery<ApiType, () => Observable<PalletBalancesReleases>, []> & QueryableStorageEntry<ApiType, []>;63      /**64       * The total units issued in the system.65       **/66      totalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;67      /**68       * Generic query69       **/70      [key: string]: QueryableStorageEntry<ApiType>;71    };72    charging: {73      /**74       * Generic query75       **/76      [key: string]: QueryableStorageEntry<ApiType>;77    };78    common: {79      /**80       * Storage of the amount of collection admins.81       **/82      adminAmount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;83      /**84       * Allowlisted collection users.85       **/86      allowlist: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;87      /**88       * Storage of collection info.89       **/90      collectionById: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<UpDataStructsCollection>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;91      /**92       * Storage of collection properties.93       **/94      collectionProperties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;95      /**96       * Storage of token property permissions of a collection.97       **/98      collectionPropertyPermissions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<BTreeMap<Bytes, UpDataStructsPropertyPermission>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;99      /**100       * Storage of the count of created collections. Essentially contains the last collection ID.101       **/102      createdCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;103      /**104       * Storage of the count of deleted collections.105       **/106      destroyedCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;107      /**108       * Not used by code, exists only to provide some types to metadata.109       **/110      dummyStorageValue: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[UpDataStructsCollectionStats, u32, u32, UpDataStructsTokenChild, PhantomTypeUpDataStructs]>>>, []> & QueryableStorageEntry<ApiType, []>;111      /**112       * List of collection admins.113       **/114      isAdmin: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;115      /**116       * Generic query117       **/118      [key: string]: QueryableStorageEntry<ApiType>;119    };120    configuration: {121      minGasPriceOverride: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;122      weightToFeeCoefficientOverride: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;123      /**124       * Generic query125       **/126      [key: string]: QueryableStorageEntry<ApiType>;127    };128    dmpQueue: {129      /**130       * The configuration.131       **/132      configuration: AugmentedQuery<ApiType, () => Observable<CumulusPalletDmpQueueConfigData>, []> & QueryableStorageEntry<ApiType, []>;133      /**134       * The overweight messages.135       **/136      overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;137      /**138       * The page index.139       **/140      pageIndex: AugmentedQuery<ApiType, () => Observable<CumulusPalletDmpQueuePageIndexData>, []> & QueryableStorageEntry<ApiType, []>;141      /**142       * The queue pages.143       **/144      pages: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, Bytes]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;145      /**146       * Generic query147       **/148      [key: string]: QueryableStorageEntry<ApiType>;149    };150    ethereum: {151      blockHash: AugmentedQuery<ApiType, (arg: U256 | AnyNumber | Uint8Array) => Observable<H256>, [U256]> & QueryableStorageEntry<ApiType, [U256]>;152      /**153       * The current Ethereum block.154       **/155      currentBlock: AugmentedQuery<ApiType, () => Observable<Option<EthereumBlock>>, []> & QueryableStorageEntry<ApiType, []>;156      /**157       * The current Ethereum receipts.158       **/159      currentReceipts: AugmentedQuery<ApiType, () => Observable<Option<Vec<EthereumReceiptReceiptV3>>>, []> & QueryableStorageEntry<ApiType, []>;160      /**161       * The current transaction statuses.162       **/163      currentTransactionStatuses: AugmentedQuery<ApiType, () => Observable<Option<Vec<FpRpcTransactionStatus>>>, []> & QueryableStorageEntry<ApiType, []>;164      /**165       * Injected transactions should have unique nonce, here we store current166       **/167      injectedNonce: AugmentedQuery<ApiType, () => Observable<U256>, []> & QueryableStorageEntry<ApiType, []>;168      /**169       * Current building block's transactions and receipts.170       **/171      pending: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EthereumTransactionTransactionV2, FpRpcTransactionStatus, EthereumReceiptReceiptV3]>>>, []> & QueryableStorageEntry<ApiType, []>;172      /**173       * Generic query174       **/175      [key: string]: QueryableStorageEntry<ApiType>;176    };177    evm: {178      accountCodes: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<Bytes>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;179      accountStorages: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<H256>, [H160, H256]> & QueryableStorageEntry<ApiType, [H160, H256]>;180      /**181       * Written on log, reset after transaction182       * Should be empty between transactions183       **/184      currentLogs: AugmentedQuery<ApiType, () => Observable<Vec<EthereumLog>>, []> & QueryableStorageEntry<ApiType, []>;185      /**186       * Generic query187       **/188      [key: string]: QueryableStorageEntry<ApiType>;189    };190    evmCoderSubstrate: {191      /**192       * Generic query193       **/194      [key: string]: QueryableStorageEntry<ApiType>;195    };196    evmContractHelpers: {197      /**198       * Storage for users that allowed for sponsorship.199       * 200       * ### Usage201       * Prefer to delete record from storage if user no more allowed for sponsorship.202       * 203       * * **Key1** - contract address.204       * * **Key2** - user that allowed for sponsorship.205       * * **Value** - allowance for sponsorship.206       **/207      allowlist: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<bool>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;208      /**209       * Storege for contracts with [`Allowlisted`](SponsoringModeT::Allowlisted) sponsoring mode.210       * 211       * ### Usage212       * Prefer to delete collection from storage if mode chaged to non `Allowlisted`, than set **Value** to **false**.213       * 214       * * **Key** - contract address.215       * * **Value** - is contract in [`Allowlisted`](SponsoringModeT::Allowlisted) mode.216       **/217      allowlistEnabled: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;218      /**219       * Store owner for contract.220       * 221       * * **Key** - contract address.222       * * **Value** - owner for contract.223       **/224      owner: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<H160>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;225      selfSponsoring: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;226      /**227       * Storage for last sponsored block.228       * 229       * * **Key1** - contract address.230       * * **Key2** - sponsored user address.231       * * **Value** - last sponsored block number.232       **/233      sponsorBasket: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<Option<u32>>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;234      /**235       * Store for contract sponsorship state.236       * 237       * * **Key** - contract address.238       * * **Value** - sponsorship state.239       **/240      sponsoring: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<UpDataStructsSponsorshipStateBasicCrossAccountIdRepr>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;241      /**242       * Store for sponsoring mode.243       * 244       * ### Usage245       * Prefer to delete collection from storage if mode chaged to [`Disabled`](SponsoringModeT::Disabled).246       * 247       * * **Key** - contract address.248       * * **Value** - [`sponsoring mode`](SponsoringModeT).249       **/250      sponsoringMode: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<Option<PalletEvmContractHelpersSponsoringModeT>>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;251      /**252       * Storage for sponsoring rate limit in blocks.253       * 254       * * **Key** - contract address.255       * * **Value** - amount of sponsored blocks.256       **/257      sponsoringRateLimit: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<u32>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;258      /**259       * Generic query260       **/261      [key: string]: QueryableStorageEntry<ApiType>;262    };263    evmMigration: {264      migrationPending: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;265      /**266       * Generic query267       **/268      [key: string]: QueryableStorageEntry<ApiType>;269    };270    fungible: {271      /**272       * Storage for assets delegated to a limited extent to other users.273       **/274      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]>;275      /**276       * Amount of tokens owned by an account inside a collection.277       **/278      balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;279      /**280       * Total amount of fungible tokens inside a collection.281       **/282      totalSupply: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;283      /**284       * Generic query285       **/286      [key: string]: QueryableStorageEntry<ApiType>;287    };288    inflation: {289      /**290       * Current inflation for `InflationBlockInterval` number of blocks291       **/292      blockInflation: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;293      /**294       * Next target (relay) block when inflation will be applied295       **/296      nextInflationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;297      /**298       * Next target (relay) block when inflation is recalculated299       **/300      nextRecalculationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;301      /**302       * Relay block when inflation has started303       **/304      startBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;305      /**306       * starting year total issuance307       **/308      startingYearTotalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;309      /**310       * Generic query311       **/312      [key: string]: QueryableStorageEntry<ApiType>;313    };314    nonfungible: {315      /**316       * Amount of tokens owned by an account in a collection.317       **/318      accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;319      /**320       * Allowance set by a token owner for another user to perform one of certain transactions on a token.321       **/322      allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;323      /**324       * Used to enumerate tokens owned by account.325       **/326      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]>;327      /**328       * Custom data of a token that is serialized to bytes,329       * primarily reserved for on-chain operations,330       * normally obscured from the external users.331       * 332       * Auxiliary properties are slightly different from333       * usual [`TokenProperties`] due to an unlimited number334       * and separately stored and written-to key-value pairs.335       * 336       * Currently used to store RMRK data.337       **/338      tokenAuxProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: UpDataStructsPropertyScope | 'None' | 'Rmrk' | 'Eth' | number | Uint8Array, arg4: Bytes | string | Uint8Array) => Observable<Option<Bytes>>, [u32, u32, UpDataStructsPropertyScope, Bytes]> & QueryableStorageEntry<ApiType, [u32, u32, UpDataStructsPropertyScope, Bytes]>;339      /**340       * Used to enumerate token's children.341       **/342      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]>]>;343      /**344       * Token data, used to partially describe a token.345       **/346      tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNonfungibleItemData>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;347      /**348       * Map of key-value pairs, describing the metadata of a token.349       **/350      tokenProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;351      /**352       * Amount of burnt tokens in a collection.353       **/354      tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;355      /**356       * Total amount of minted tokens in a collection.357       **/358      tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;359      /**360       * Generic query361       **/362      [key: string]: QueryableStorageEntry<ApiType>;363    };364    parachainInfo: {365      parachainId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;366      /**367       * Generic query368       **/369      [key: string]: QueryableStorageEntry<ApiType>;370    };371    parachainSystem: {372      /**373       * The number of HRMP messages we observed in `on_initialize` and thus used that number for374       * announcing the weight of `on_initialize` and `on_finalize`.375       **/376      announcedHrmpMessagesPerCandidate: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;377      /**378       * The next authorized upgrade, if there is one.379       **/380      authorizedUpgrade: AugmentedQuery<ApiType, () => Observable<Option<H256>>, []> & QueryableStorageEntry<ApiType, []>;381      /**382       * A custom head data that should be returned as result of `validate_block`.383       * 384       * See [`Pallet::set_custom_validation_head_data`] for more information.385       **/386      customValidationHeadData: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;387      /**388       * Were the validation data set to notify the relay chain?389       **/390      didSetValidationCode: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;391      /**392       * The parachain host configuration that was obtained from the relay parent.393       * 394       * This field is meant to be updated each block with the validation data inherent. Therefore,395       * before processing of the inherent, e.g. in `on_initialize` this data may be stale.396       * 397       * This data is also absent from the genesis.398       **/399      hostConfiguration: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2AbridgedHostConfiguration>>, []> & QueryableStorageEntry<ApiType, []>;400      /**401       * HRMP messages that were sent in a block.402       * 403       * This will be cleared in `on_initialize` of each new block.404       **/405      hrmpOutboundMessages: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotCorePrimitivesOutboundHrmpMessage>>, []> & QueryableStorageEntry<ApiType, []>;406      /**407       * HRMP watermark that was set in a block.408       * 409       * This will be cleared in `on_initialize` of each new block.410       **/411      hrmpWatermark: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;412      /**413       * The last downward message queue chain head we have observed.414       * 415       * This value is loaded before and saved after processing inbound downward messages carried416       * by the system inherent.417       **/418      lastDmqMqcHead: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;419      /**420       * The message queue chain heads we have observed per each channel incoming channel.421       * 422       * This value is loaded before and saved after processing inbound downward messages carried423       * by the system inherent.424       **/425      lastHrmpMqcHeads: AugmentedQuery<ApiType, () => Observable<BTreeMap<u32, H256>>, []> & QueryableStorageEntry<ApiType, []>;426      /**427       * The relay chain block number associated with the last parachain block.428       **/429      lastRelayChainBlockNumber: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;430      /**431       * Validation code that is set by the parachain and is to be communicated to collator and432       * consequently the relay-chain.433       * 434       * This will be cleared in `on_initialize` of each new block if no other pallet already set435       * the value.436       **/437      newValidationCode: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;438      /**439       * Upward messages that are still pending and not yet send to the relay chain.440       **/441      pendingUpwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;442      /**443       * In case of a scheduled upgrade, this storage field contains the validation code to be applied.444       * 445       * As soon as the relay chain gives us the go-ahead signal, we will overwrite the [`:code`][well_known_keys::CODE]446       * which will result the next block process with the new validation code. This concludes the upgrade process.447       * 448       * [well_known_keys::CODE]: sp_core::storage::well_known_keys::CODE449       **/450      pendingValidationCode: AugmentedQuery<ApiType, () => Observable<Bytes>, []> & QueryableStorageEntry<ApiType, []>;451      /**452       * Number of downward messages processed in a block.453       * 454       * This will be cleared in `on_initialize` of each new block.455       **/456      processedDownwardMessages: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;457      /**458       * The state proof for the last relay parent block.459       * 460       * This field is meant to be updated each block with the validation data inherent. Therefore,461       * before processing of the inherent, e.g. in `on_initialize` this data may be stale.462       * 463       * This data is also absent from the genesis.464       **/465      relayStateProof: AugmentedQuery<ApiType, () => Observable<Option<SpTrieStorageProof>>, []> & QueryableStorageEntry<ApiType, []>;466      /**467       * The snapshot of some state related to messaging relevant to the current parachain as per468       * the relay parent.469       * 470       * This field is meant to be updated each block with the validation data inherent. Therefore,471       * before processing of the inherent, e.g. in `on_initialize` this data may be stale.472       * 473       * This data is also absent from the genesis.474       **/475      relevantMessagingState: AugmentedQuery<ApiType, () => Observable<Option<CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot>>, []> & QueryableStorageEntry<ApiType, []>;476      /**477       * The weight we reserve at the beginning of the block for processing DMP messages. This478       * overrides the amount set in the Config trait.479       **/480      reservedDmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []> & QueryableStorageEntry<ApiType, []>;481      /**482       * The weight we reserve at the beginning of the block for processing XCMP messages. This483       * overrides the amount set in the Config trait.484       **/485      reservedXcmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []> & QueryableStorageEntry<ApiType, []>;486      /**487       * An option which indicates if the relay-chain restricts signalling a validation code upgrade.488       * In other words, if this is `Some` and [`NewValidationCode`] is `Some` then the produced489       * candidate will be invalid.490       * 491       * This storage item is a mirror of the corresponding value for the current parachain from the492       * relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is493       * set after the inherent.494       **/495      upgradeRestrictionSignal: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2UpgradeRestriction>>, []> & QueryableStorageEntry<ApiType, []>;496      /**497       * Upward messages that were sent in a block.498       * 499       * This will be cleared in `on_initialize` of each new block.500       **/501      upwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;502      /**503       * The [`PersistedValidationData`] set for this block.504       * This value is expected to be set only once per block and it's never stored505       * in the trie.506       **/507      validationData: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2PersistedValidationData>>, []> & QueryableStorageEntry<ApiType, []>;508      /**509       * Generic query510       **/511      [key: string]: QueryableStorageEntry<ApiType>;512    };513    promotion: {514      admin: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;515      /**516       * Next target block when interest is recalculated517       **/518      nextInterestBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;519      /**520       * Amount of tokens pending unstake per user per block.521       **/522      pendingUnstake: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<u128>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>;523      /**524       * Amount of tokens staked by account in the blocknumber.525       **/526      staked: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<u128>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>;527      /**528       * A block when app-promotion has started529       **/530      startBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;531      totalStaked: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;532      /**533       * Generic query534       **/535      [key: string]: QueryableStorageEntry<ApiType>;536    };537    randomnessCollectiveFlip: {538      /**539       * Series of block headers from the last 81 blocks that acts as random seed material. This540       * is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of541       * the oldest hash.542       **/543      randomMaterial: AugmentedQuery<ApiType, () => Observable<Vec<H256>>, []> & QueryableStorageEntry<ApiType, []>;544      /**545       * Generic query546       **/547      [key: string]: QueryableStorageEntry<ApiType>;548    };549    refungible: {550      /**551       * Amount of tokens (not pieces) partially owned by an account within a collection.552       **/553      accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;554      /**555       * Allowance set by a token owner for another user to perform one of certain transactions on a number of pieces of a token.556       **/557      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]>;558      /**559       * Amount of token pieces owned by account.560       **/561      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]>;562      /**563       * Used to enumerate tokens owned by account.564       **/565      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]>;566      /**567       * Token data, used to partially describe a token.568       **/569      tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<PalletRefungibleItemData>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;570      /**571       * Amount of pieces a refungible token is split into.572       **/573      tokenProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;574      /**575       * Amount of tokens burnt in a collection.576       **/577      tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;578      /**579       * Total amount of minted tokens in a collection.580       **/581      tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;582      /**583       * Total amount of pieces for token584       **/585      totalSupply: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;586      /**587       * Generic query588       **/589      [key: string]: QueryableStorageEntry<ApiType>;590    };591    rmrkCore: {592      /**593       * Latest yet-unused collection ID.594       **/595      collectionIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;596      /**597       * Mapping from RMRK collection ID to Unique's.598       **/599      uniqueCollectionId: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;600      /**601       * Generic query602       **/603      [key: string]: QueryableStorageEntry<ApiType>;604    };605    rmrkEquip: {606      /**607       * Checkmark that a Base has a Theme NFT named "default".608       **/609      baseHasDefaultTheme: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;610      /**611       * Map of a Base ID and a Part ID to an NFT in the Base collection serving as the Part.612       **/613      inernalPartId: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;614      /**615       * Generic query616       **/617      [key: string]: QueryableStorageEntry<ApiType>;618    };619    scheduler: {620      /**621       * Items to be executed, indexed by the block number that they should be executed on.622       **/623      agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletUniqueSchedulerScheduledV3>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;624      /**625       * Lookup from identity to the block number and index of the task.626       **/627      lookup: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;628      /**629       * Generic query630       **/631      [key: string]: QueryableStorageEntry<ApiType>;632    };633    structure: {634      /**635       * Generic query636       **/637      [key: string]: QueryableStorageEntry<ApiType>;638    };639    sudo: {640      /**641       * The `AccountId` of the sudo key.642       **/643      key: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;644      /**645       * Generic query646       **/647      [key: string]: QueryableStorageEntry<ApiType>;648    };649    system: {650      /**651       * The full account information for a particular account ID.652       **/653      account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<FrameSystemAccountInfo>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;654      /**655       * Total length (in bytes) for all extrinsics put together, for the current block.656       **/657      allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;658      /**659       * Map of block numbers to block hashes.660       **/661      blockHash: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<H256>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;662      /**663       * The current weight for the block.664       **/665      blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;666      /**667       * Digest of the current block, also part of the block header.668       **/669      digest: AugmentedQuery<ApiType, () => Observable<SpRuntimeDigest>, []> & QueryableStorageEntry<ApiType, []>;670      /**671       * The number of events in the `Events<T>` list.672       **/673      eventCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;674      /**675       * Events deposited for the current block.676       * 677       * NOTE: The item is unbound and should therefore never be read on chain.678       * It could otherwise inflate the PoV size of a block.679       * 680       * Events have a large in-memory size. Box the events to not go out-of-memory681       * just in case someone still reads them from within the runtime.682       **/683      events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;684      /**685       * Mapping between a topic (represented by T::Hash) and a vector of indexes686       * of events in the `<Events<T>>` list.687       * 688       * All topic vectors have deterministic storage locations depending on the topic. This689       * allows light-clients to leverage the changes trie storage tracking mechanism and690       * in case of changes fetch the list of events of interest.691       * 692       * The value has the type `(T::BlockNumber, EventIndex)` because if we used only just693       * the `EventIndex` then in case if the topic has the same contents on the next block694       * no notification will be triggered thus the event might be lost.695       **/696      eventTopics: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Vec<ITuple<[u32, u32]>>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;697      /**698       * The execution phase of the block.699       **/700      executionPhase: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemPhase>>, []> & QueryableStorageEntry<ApiType, []>;701      /**702       * Total extrinsics count for the current block.703       **/704      extrinsicCount: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;705      /**706       * Extrinsics data for the current block (maps an extrinsic's index to its data).707       **/708      extrinsicData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;709      /**710       * Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.711       **/712      lastRuntimeUpgrade: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemLastRuntimeUpgradeInfo>>, []> & QueryableStorageEntry<ApiType, []>;713      /**714       * The current block number being processed. Set by `execute_block`.715       **/716      number: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;717      /**718       * Hash of the previous block.719       **/720      parentHash: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;721      /**722       * True if we have upgraded so that AccountInfo contains three types of `RefCount`. False723       * (default) if not.724       **/725      upgradedToTripleRefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;726      /**727       * True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.728       **/729      upgradedToU32RefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;730      /**731       * Generic query732       **/733      [key: string]: QueryableStorageEntry<ApiType>;734    };735    timestamp: {736      /**737       * Did the timestamp get updated in this block?738       **/739      didUpdate: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;740      /**741       * Current time for the current block.742       **/743      now: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;744      /**745       * Generic query746       **/747      [key: string]: QueryableStorageEntry<ApiType>;748    };749    transactionPayment: {750      nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;751      storageVersion: AugmentedQuery<ApiType, () => Observable<PalletTransactionPaymentReleases>, []> & QueryableStorageEntry<ApiType, []>;752      /**753       * Generic query754       **/755      [key: string]: QueryableStorageEntry<ApiType>;756    };757    treasury: {758      /**759       * Proposal indices that have been approved but not yet awarded.760       **/761      approvals: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;762      /**763       * Number of proposals that have been made.764       **/765      proposalCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;766      /**767       * Proposals that have been made.768       **/769      proposals: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletTreasuryProposal>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;770      /**771       * Generic query772       **/773      [key: string]: QueryableStorageEntry<ApiType>;774    };775    unique: {776      /**777       * Used for migrations778       **/779      chainVersion: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;780      /**781       * (Collection id (controlled?2), who created (real))782       * TODO: Off chain worker should remove from this map when collection gets removed783       **/784      createItemBasket: AugmentedQuery<ApiType, (arg: ITuple<[u32, AccountId32]> | [u32 | AnyNumber | Uint8Array, AccountId32 | string | Uint8Array]) => Observable<Option<u32>>, [ITuple<[u32, AccountId32]>]> & QueryableStorageEntry<ApiType, [ITuple<[u32, AccountId32]>]>;785      /**786       * Last sponsoring of fungible tokens approval in a collection787       **/788      fungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;789      /**790       * Collection id (controlled?2), owning user (real)791       **/792      fungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;793      /**794       * Last sponsoring of NFT approval in a collection795       **/796      nftApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;797      /**798       * Collection id (controlled?2), token id (controlled?2)799       **/800      nftTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;801      /**802       * Last sponsoring of RFT approval in a collection803       **/804      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]>;805      /**806       * Collection id (controlled?2), token id (controlled?2)807       **/808      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]>;809      /**810       * Last sponsoring of token property setting // todo:doc rephrase this and the following811       **/812      tokenPropertyBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;813      /**814       * Variable metadata sponsoring815       * Collection id (controlled?2), token id (controlled?2)816       **/817      variableMetaDataBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;818      /**819       * Generic query820       **/821      [key: string]: QueryableStorageEntry<ApiType>;822    };823    vesting: {824      /**825       * Vesting schedules of an account.826       * 827       * VestingSchedules: map AccountId => Vec<VestingSchedule>828       **/829      vestingSchedules: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<OrmlVestingVestingSchedule>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;830      /**831       * Generic query832       **/833      [key: string]: QueryableStorageEntry<ApiType>;834    };835    xcmpQueue: {836      /**837       * Inbound aggregate XCMP messages. It can only be one per ParaId/block.838       **/839      inboundXcmpMessages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;840      /**841       * Status of the inbound XCMP channels.842       **/843      inboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletXcmpQueueInboundChannelDetails>>, []> & QueryableStorageEntry<ApiType, []>;844      /**845       * The messages outbound in a given XCMP channel.846       **/847      outboundXcmpMessages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u16 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32, u16]> & QueryableStorageEntry<ApiType, [u32, u16]>;848      /**849       * The non-empty XCMP channels in order of becoming non-empty, and the index of the first850       * and last outbound message. If the two indices are equal, then it indicates an empty851       * queue and there must be a non-`Ok` `OutboundStatus`. We assume queues grow no greater852       * than 65535 items. Queue indices for normal messages begin at one; zero is reserved in853       * case of the need to send a high-priority signal message this block.854       * The bool is true if there is a signal message waiting to be sent.855       **/856      outboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletXcmpQueueOutboundChannelDetails>>, []> & QueryableStorageEntry<ApiType, []>;857      /**858       * The messages that exceeded max individual message weight budget.859       * 860       * These message stay in this storage map until they are manually dispatched via861       * `service_overweight`.862       **/863      overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;864      /**865       * The number of overweight messages ever recorded in `Overweight`. Also doubles as the next866       * available free overweight index.867       **/868      overweightCount: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;869      /**870       * The configuration which controls the dynamics of the outbound queue.871       **/872      queueConfig: AugmentedQuery<ApiType, () => Observable<CumulusPalletXcmpQueueQueueConfigData>, []> & QueryableStorageEntry<ApiType, []>;873      /**874       * Whether or not the XCMP queue is suspended from executing incoming XCMs or not.875       **/876      queueSuspended: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;877      /**878       * Any signal messages waiting to be sent.879       **/880      signalMessages: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;881      /**882       * Generic query883       **/884      [key: string]: QueryableStorageEntry<ApiType>;885    };886  } // AugmentedQueries887} // declare module
modifiedtests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -365,9 +365,12 @@
     promotion: {
       setAdminAddress: AugmentedSubmittable<(admin: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr]>;
       sponsorCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
+      sponsorConract: AugmentedSubmittable<(contractId: H160 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160]>;
       stake: AugmentedSubmittable<(amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128]>;
       startAppPromotion: AugmentedSubmittable<(promotionStartRelayBlock: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
+      stopAppPromotion: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
       stopSponsorignCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
+      stopSponsorignContract: AugmentedSubmittable<(contractId: H160 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160]>;
       unstake: AugmentedSubmittable<(amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128]>;
       /**
        * Generic tx
modifiedtests/src/interfaces/default/types.tsdiffbeforeafterboth
--- a/tests/src/interfaces/default/types.ts
+++ b/tests/src/interfaces/default/types.ts
@@ -816,6 +816,7 @@
   readonly asStartAppPromotion: {
     readonly promotionStartRelayBlock: Option<u32>;
   } & Struct;
+  readonly isStopAppPromotion: boolean;
   readonly isStake: boolean;
   readonly asStake: {
     readonly amount: u128;
@@ -832,7 +833,15 @@
   readonly asStopSponsorignCollection: {
     readonly collectionId: u32;
   } & Struct;
-  readonly type: 'SetAdminAddress' | 'StartAppPromotion' | 'Stake' | 'Unstake' | 'SponsorCollection' | 'StopSponsorignCollection';
+  readonly isSponsorConract: boolean;
+  readonly asSponsorConract: {
+    readonly contractId: H160;
+  } & Struct;
+  readonly isStopSponsorignContract: boolean;
+  readonly asStopSponsorignContract: {
+    readonly contractId: H160;
+  } & Struct;
+  readonly type: 'SetAdminAddress' | 'StartAppPromotion' | 'StopAppPromotion' | 'Stake' | 'Unstake' | 'SponsorCollection' | 'StopSponsorignCollection' | 'SponsorConract' | 'StopSponsorignContract';
 }
 
 /** @name PalletAppPromotionError */
@@ -841,8 +850,7 @@
   readonly isNoPermission: boolean;
   readonly isNotSufficientFounds: boolean;
   readonly isInvalidArgument: boolean;
-  readonly isAlreadySponsored: boolean;
-  readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFounds' | 'InvalidArgument' | 'AlreadySponsored';
+  readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFounds' | 'InvalidArgument';
 }
 
 /** @name PalletAppPromotionEvent */
modifiedtests/src/interfaces/lookup.tsdiffbeforeafterboth
--- a/tests/src/interfaces/lookup.ts
+++ b/tests/src/interfaces/lookup.ts
@@ -2463,6 +2463,7 @@
       start_app_promotion: {
         promotionStartRelayBlock: 'Option<u32>',
       },
+      stop_app_promotion: 'Null',
       stake: {
         amount: 'u128',
       },
@@ -2473,7 +2474,13 @@
         collectionId: 'u32',
       },
       stop_sponsorign_collection: {
-        collectionId: 'u32'
+        collectionId: 'u32',
+      },
+      sponsor_conract: {
+        contractId: 'H160',
+      },
+      stop_sponsorign_contract: {
+        contractId: 'H160'
       }
     }
   },
@@ -3098,7 +3105,7 @@
    * Lookup410: pallet_app_promotion::pallet::Error<T>
    **/
   PalletAppPromotionError: {
-    _enum: ['AdminNotSet', 'NoPermission', 'NotSufficientFounds', 'InvalidArgument', 'AlreadySponsored']
+    _enum: ['AdminNotSet', 'NoPermission', 'NotSufficientFounds', 'InvalidArgument']
   },
   /**
    * Lookup413: 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
@@ -2669,6 +2669,7 @@
     readonly asStartAppPromotion: {
       readonly promotionStartRelayBlock: Option<u32>;
     } & Struct;
+    readonly isStopAppPromotion: boolean;
     readonly isStake: boolean;
     readonly asStake: {
       readonly amount: u128;
@@ -2685,7 +2686,15 @@
     readonly asStopSponsorignCollection: {
       readonly collectionId: u32;
     } & Struct;
-    readonly type: 'SetAdminAddress' | 'StartAppPromotion' | 'Stake' | 'Unstake' | 'SponsorCollection' | 'StopSponsorignCollection';
+    readonly isSponsorConract: boolean;
+    readonly asSponsorConract: {
+      readonly contractId: H160;
+    } & Struct;
+    readonly isStopSponsorignContract: boolean;
+    readonly asStopSponsorignContract: {
+      readonly contractId: H160;
+    } & Struct;
+    readonly type: 'SetAdminAddress' | 'StartAppPromotion' | 'StopAppPromotion' | 'Stake' | 'Unstake' | 'SponsorCollection' | 'StopSponsorignCollection' | 'SponsorConract' | 'StopSponsorignContract';
   }
 
   /** @name PalletEvmCall (305) */
@@ -3288,8 +3297,7 @@
     readonly isNoPermission: boolean;
     readonly isNotSufficientFounds: boolean;
     readonly isInvalidArgument: boolean;
-    readonly isAlreadySponsored: boolean;
-    readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFounds' | 'InvalidArgument' | 'AlreadySponsored';
+    readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFounds' | 'InvalidArgument';
   }
 
   /** @name PalletEvmError (413) */