difftreelog
fix runtime benchmarks, `payout_stakers` logic, bencmarkr for payout_stakers
in: master
15 files changed
pallets/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"
################################################################################
pallets/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())?}
pallets/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(¤t_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(
+ // ¤t_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(¤t_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(
pallets/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;
pallets/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))
}
pallets/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",
+]
runtime/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,
};
runtime/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);
tests/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>;
/**
tests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -27,7 +27,7 @@
/**
* Insufficient funds to perform an action
**/
- NotSufficientFounds: AugmentedError<ApiType>;
+ NotSufficientFunds: AugmentedError<ApiType>;
PendingForBlockOverflow: AugmentedError<ApiType>;
/**
* Generic error
tests/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
**/
tests/src/interfaces/augment-api-query.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */34// import type lookup before we augment - in some environments5// this is required to allow for ambient/previous definitions6import '@polkadot/api-base/types/storage';78import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';9import type { BTreeMap, Bytes, Option, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';10import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';11import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';12import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumLog, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletUniqueSchedulerScheduledV3, PhantomTypeUpDataStructs, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, SpRuntimeDigest, SpTrieStorageProof, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsProperties, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild } from '@polkadot/types/lookup';13import type { Observable } from '@polkadot/types/types';1415export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;16export type __QueryableStorageEntry<ApiType extends ApiTypes> = QueryableStorageEntry<ApiType>;1718declare module '@polkadot/api-base/types/storage' {19 interface AugmentedQueries<ApiType extends ApiTypes> {20 appPromotion: {21 admin: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;22 /**23 * Stores hash a record for which the last revenue recalculation was performed.24 * If `None`, then recalculation has not yet been performed or calculations have been completed for all stakers.25 **/26 nextCalculatedRecord: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[AccountId32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;27 /**28 * Amount of tokens pending unstake per user per block.29 **/30 pendingUnstake: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[AccountId32, u128]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;31 /**32 * Amount of tokens staked by account in the blocknumber.33 **/34 staked: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<ITuple<[u128, u32]>>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>;35 /**36 * Amount of stakes for an Account37 **/38 stakesPerAccount: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<u8>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;39 /**40 * A block when app-promotion has started .I think this is redundant, because we only need `NextInterestBlock`.41 **/42 startBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;43 totalStaked: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;44 /**45 * Generic query46 **/47 [key: string]: QueryableStorageEntry<ApiType>;48 };49 balances: {50 /**51 * The Balances pallet example of storing the balance of an account.52 * 53 * # Example54 * 55 * ```nocompile56 * impl pallet_balances::Config for Runtime {57 * type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>58 * }59 * ```60 * 61 * You can also store the balance of an account in the `System` pallet.62 * 63 * # Example64 * 65 * ```nocompile66 * impl pallet_balances::Config for Runtime {67 * type AccountStore = System68 * }69 * ```70 * 71 * But this comes with tradeoffs, storing account balances in the system pallet stores72 * `frame_system` data alongside the account data contrary to storing account balances in the73 * `Balances` pallet, which uses a `StorageMap` to store balances data only.74 * NOTE: This is only used in the case that this pallet is used to store balances.75 **/76 account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;77 /**78 * Any liquidity locks on some account balances.79 * NOTE: Should only be accessed when setting, changing and freeing a lock.80 **/81 locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesBalanceLock>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;82 /**83 * Named reserves on some account balances.84 **/85 reserves: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesReserveData>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;86 /**87 * Storage version of the pallet.88 * 89 * This is set to v2.0.0 for new networks.90 **/91 storageVersion: AugmentedQuery<ApiType, () => Observable<PalletBalancesReleases>, []> & QueryableStorageEntry<ApiType, []>;92 /**93 * The total units issued in the system.94 **/95 totalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;96 /**97 * Generic query98 **/99 [key: string]: QueryableStorageEntry<ApiType>;100 };101 charging: {102 /**103 * Generic query104 **/105 [key: string]: QueryableStorageEntry<ApiType>;106 };107 common: {108 /**109 * Storage of the amount of collection admins.110 **/111 adminAmount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;112 /**113 * Allowlisted collection users.114 **/115 allowlist: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;116 /**117 * Storage of collection info.118 **/119 collectionById: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<UpDataStructsCollection>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;120 /**121 * Storage of collection properties.122 **/123 collectionProperties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;124 /**125 * Storage of token property permissions of a collection.126 **/127 collectionPropertyPermissions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<BTreeMap<Bytes, UpDataStructsPropertyPermission>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;128 /**129 * Storage of the count of created collections. Essentially contains the last collection ID.130 **/131 createdCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;132 /**133 * Storage of the count of deleted collections.134 **/135 destroyedCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;136 /**137 * Not used by code, exists only to provide some types to metadata.138 **/139 dummyStorageValue: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[UpDataStructsCollectionStats, u32, u32, UpDataStructsTokenChild, PhantomTypeUpDataStructs]>>>, []> & QueryableStorageEntry<ApiType, []>;140 /**141 * List of collection admins.142 **/143 isAdmin: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;144 /**145 * Generic query146 **/147 [key: string]: QueryableStorageEntry<ApiType>;148 };149 configuration: {150 minGasPriceOverride: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;151 weightToFeeCoefficientOverride: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;152 /**153 * Generic query154 **/155 [key: string]: QueryableStorageEntry<ApiType>;156 };157 dmpQueue: {158 /**159 * The configuration.160 **/161 configuration: AugmentedQuery<ApiType, () => Observable<CumulusPalletDmpQueueConfigData>, []> & QueryableStorageEntry<ApiType, []>;162 /**163 * The overweight messages.164 **/165 overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;166 /**167 * The page index.168 **/169 pageIndex: AugmentedQuery<ApiType, () => Observable<CumulusPalletDmpQueuePageIndexData>, []> & QueryableStorageEntry<ApiType, []>;170 /**171 * The queue pages.172 **/173 pages: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, Bytes]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;174 /**175 * Generic query176 **/177 [key: string]: QueryableStorageEntry<ApiType>;178 };179 ethereum: {180 blockHash: AugmentedQuery<ApiType, (arg: U256 | AnyNumber | Uint8Array) => Observable<H256>, [U256]> & QueryableStorageEntry<ApiType, [U256]>;181 /**182 * The current Ethereum block.183 **/184 currentBlock: AugmentedQuery<ApiType, () => Observable<Option<EthereumBlock>>, []> & QueryableStorageEntry<ApiType, []>;185 /**186 * The current Ethereum receipts.187 **/188 currentReceipts: AugmentedQuery<ApiType, () => Observable<Option<Vec<EthereumReceiptReceiptV3>>>, []> & QueryableStorageEntry<ApiType, []>;189 /**190 * The current transaction statuses.191 **/192 currentTransactionStatuses: AugmentedQuery<ApiType, () => Observable<Option<Vec<FpRpcTransactionStatus>>>, []> & QueryableStorageEntry<ApiType, []>;193 /**194 * Injected transactions should have unique nonce, here we store current195 **/196 injectedNonce: AugmentedQuery<ApiType, () => Observable<U256>, []> & QueryableStorageEntry<ApiType, []>;197 /**198 * Current building block's transactions and receipts.199 **/200 pending: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EthereumTransactionTransactionV2, FpRpcTransactionStatus, EthereumReceiptReceiptV3]>>>, []> & QueryableStorageEntry<ApiType, []>;201 /**202 * Generic query203 **/204 [key: string]: QueryableStorageEntry<ApiType>;205 };206 evm: {207 accountCodes: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<Bytes>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;208 accountStorages: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<H256>, [H160, H256]> & QueryableStorageEntry<ApiType, [H160, H256]>;209 /**210 * Written on log, reset after transaction211 * Should be empty between transactions212 **/213 currentLogs: AugmentedQuery<ApiType, () => Observable<Vec<EthereumLog>>, []> & QueryableStorageEntry<ApiType, []>;214 /**215 * Generic query216 **/217 [key: string]: QueryableStorageEntry<ApiType>;218 };219 evmCoderSubstrate: {220 /**221 * Generic query222 **/223 [key: string]: QueryableStorageEntry<ApiType>;224 };225 evmContractHelpers: {226 /**227 * Storage for users that allowed for sponsorship.228 * 229 * ### Usage230 * Prefer to delete record from storage if user no more allowed for sponsorship.231 * 232 * * **Key1** - contract address.233 * * **Key2** - user that allowed for sponsorship.234 * * **Value** - allowance for sponsorship.235 **/236 allowlist: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<bool>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;237 /**238 * Storege for contracts with [`Allowlisted`](SponsoringModeT::Allowlisted) sponsoring mode.239 * 240 * ### Usage241 * Prefer to delete collection from storage if mode chaged to non `Allowlisted`, than set **Value** to **false**.242 * 243 * * **Key** - contract address.244 * * **Value** - is contract in [`Allowlisted`](SponsoringModeT::Allowlisted) mode.245 **/246 allowlistEnabled: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;247 /**248 * Store owner for contract.249 * 250 * * **Key** - contract address.251 * * **Value** - owner for contract.252 **/253 owner: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<H160>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;254 selfSponsoring: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;255 /**256 * Storage for last sponsored block.257 * 258 * * **Key1** - contract address.259 * * **Key2** - sponsored user address.260 * * **Value** - last sponsored block number.261 **/262 sponsorBasket: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<Option<u32>>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;263 /**264 * Store for contract sponsorship state.265 * 266 * * **Key** - contract address.267 * * **Value** - sponsorship state.268 **/269 sponsoring: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<UpDataStructsSponsorshipStateBasicCrossAccountIdRepr>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;270 /**271 * Store for sponsoring mode.272 * 273 * ### Usage274 * Prefer to delete collection from storage if mode chaged to [`Disabled`](SponsoringModeT::Disabled).275 * 276 * * **Key** - contract address.277 * * **Value** - [`sponsoring mode`](SponsoringModeT).278 **/279 sponsoringMode: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<Option<PalletEvmContractHelpersSponsoringModeT>>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;280 /**281 * Storage for sponsoring rate limit in blocks.282 * 283 * * **Key** - contract address.284 * * **Value** - amount of sponsored blocks.285 **/286 sponsoringRateLimit: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<u32>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;287 /**288 * Generic query289 **/290 [key: string]: QueryableStorageEntry<ApiType>;291 };292 evmMigration: {293 migrationPending: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;294 /**295 * Generic query296 **/297 [key: string]: QueryableStorageEntry<ApiType>;298 };299 fungible: {300 /**301 * Storage for assets delegated to a limited extent to other users.302 **/303 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]>;304 /**305 * Amount of tokens owned by an account inside a collection.306 **/307 balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;308 /**309 * Total amount of fungible tokens inside a collection.310 **/311 totalSupply: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;312 /**313 * Generic query314 **/315 [key: string]: QueryableStorageEntry<ApiType>;316 };317 inflation: {318 /**319 * Current inflation for `InflationBlockInterval` number of blocks320 **/321 blockInflation: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;322 /**323 * Next target (relay) block when inflation will be applied324 **/325 nextInflationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;326 /**327 * Next target (relay) block when inflation is recalculated328 **/329 nextRecalculationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;330 /**331 * Relay block when inflation has started332 **/333 startBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;334 /**335 * starting year total issuance336 **/337 startingYearTotalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;338 /**339 * Generic query340 **/341 [key: string]: QueryableStorageEntry<ApiType>;342 };343 nonfungible: {344 /**345 * Amount of tokens owned by an account in a collection.346 **/347 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;348 /**349 * Allowance set by a token owner for another user to perform one of certain transactions on a token.350 **/351 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;352 /**353 * Used to enumerate tokens owned by account.354 **/355 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]>;356 /**357 * Custom data of a token that is serialized to bytes,358 * primarily reserved for on-chain operations,359 * normally obscured from the external users.360 * 361 * Auxiliary properties are slightly different from362 * usual [`TokenProperties`] due to an unlimited number363 * and separately stored and written-to key-value pairs.364 * 365 * Currently used to store RMRK data.366 **/367 tokenAuxProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: UpDataStructsPropertyScope | 'None' | 'Rmrk' | number | Uint8Array, arg4: Bytes | string | Uint8Array) => Observable<Option<Bytes>>, [u32, u32, UpDataStructsPropertyScope, Bytes]> & QueryableStorageEntry<ApiType, [u32, u32, UpDataStructsPropertyScope, Bytes]>;368 /**369 * Used to enumerate token's children.370 **/371 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]>]>;372 /**373 * Token data, used to partially describe a token.374 **/375 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNonfungibleItemData>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;376 /**377 * Map of key-value pairs, describing the metadata of a token.378 **/379 tokenProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;380 /**381 * Amount of burnt tokens in a collection.382 **/383 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;384 /**385 * Total amount of minted tokens in a collection.386 **/387 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;388 /**389 * Generic query390 **/391 [key: string]: QueryableStorageEntry<ApiType>;392 };393 parachainInfo: {394 parachainId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;395 /**396 * Generic query397 **/398 [key: string]: QueryableStorageEntry<ApiType>;399 };400 parachainSystem: {401 /**402 * The number of HRMP messages we observed in `on_initialize` and thus used that number for403 * announcing the weight of `on_initialize` and `on_finalize`.404 **/405 announcedHrmpMessagesPerCandidate: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;406 /**407 * The next authorized upgrade, if there is one.408 **/409 authorizedUpgrade: AugmentedQuery<ApiType, () => Observable<Option<H256>>, []> & QueryableStorageEntry<ApiType, []>;410 /**411 * A custom head data that should be returned as result of `validate_block`.412 * 413 * See [`Pallet::set_custom_validation_head_data`] for more information.414 **/415 customValidationHeadData: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;416 /**417 * Were the validation data set to notify the relay chain?418 **/419 didSetValidationCode: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;420 /**421 * The parachain host configuration that was obtained from the relay parent.422 * 423 * This field is meant to be updated each block with the validation data inherent. Therefore,424 * before processing of the inherent, e.g. in `on_initialize` this data may be stale.425 * 426 * This data is also absent from the genesis.427 **/428 hostConfiguration: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2AbridgedHostConfiguration>>, []> & QueryableStorageEntry<ApiType, []>;429 /**430 * HRMP messages that were sent in a block.431 * 432 * This will be cleared in `on_initialize` of each new block.433 **/434 hrmpOutboundMessages: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotCorePrimitivesOutboundHrmpMessage>>, []> & QueryableStorageEntry<ApiType, []>;435 /**436 * HRMP watermark that was set in a block.437 * 438 * This will be cleared in `on_initialize` of each new block.439 **/440 hrmpWatermark: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;441 /**442 * The last downward message queue chain head we have observed.443 * 444 * This value is loaded before and saved after processing inbound downward messages carried445 * by the system inherent.446 **/447 lastDmqMqcHead: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;448 /**449 * The message queue chain heads we have observed per each channel incoming channel.450 * 451 * This value is loaded before and saved after processing inbound downward messages carried452 * by the system inherent.453 **/454 lastHrmpMqcHeads: AugmentedQuery<ApiType, () => Observable<BTreeMap<u32, H256>>, []> & QueryableStorageEntry<ApiType, []>;455 /**456 * The relay chain block number associated with the last parachain block.457 **/458 lastRelayChainBlockNumber: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;459 /**460 * Validation code that is set by the parachain and is to be communicated to collator and461 * consequently the relay-chain.462 * 463 * This will be cleared in `on_initialize` of each new block if no other pallet already set464 * the value.465 **/466 newValidationCode: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;467 /**468 * Upward messages that are still pending and not yet send to the relay chain.469 **/470 pendingUpwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;471 /**472 * In case of a scheduled upgrade, this storage field contains the validation code to be applied.473 * 474 * As soon as the relay chain gives us the go-ahead signal, we will overwrite the [`:code`][well_known_keys::CODE]475 * which will result the next block process with the new validation code. This concludes the upgrade process.476 * 477 * [well_known_keys::CODE]: sp_core::storage::well_known_keys::CODE478 **/479 pendingValidationCode: AugmentedQuery<ApiType, () => Observable<Bytes>, []> & QueryableStorageEntry<ApiType, []>;480 /**481 * Number of downward messages processed in a block.482 * 483 * This will be cleared in `on_initialize` of each new block.484 **/485 processedDownwardMessages: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;486 /**487 * The state proof for the last relay parent block.488 * 489 * This field is meant to be updated each block with the validation data inherent. Therefore,490 * before processing of the inherent, e.g. in `on_initialize` this data may be stale.491 * 492 * This data is also absent from the genesis.493 **/494 relayStateProof: AugmentedQuery<ApiType, () => Observable<Option<SpTrieStorageProof>>, []> & QueryableStorageEntry<ApiType, []>;495 /**496 * The snapshot of some state related to messaging relevant to the current parachain as per497 * the relay parent.498 * 499 * This field is meant to be updated each block with the validation data inherent. Therefore,500 * before processing of the inherent, e.g. in `on_initialize` this data may be stale.501 * 502 * This data is also absent from the genesis.503 **/504 relevantMessagingState: AugmentedQuery<ApiType, () => Observable<Option<CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot>>, []> & QueryableStorageEntry<ApiType, []>;505 /**506 * The weight we reserve at the beginning of the block for processing DMP messages. This507 * overrides the amount set in the Config trait.508 **/509 reservedDmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []> & QueryableStorageEntry<ApiType, []>;510 /**511 * The weight we reserve at the beginning of the block for processing XCMP messages. This512 * overrides the amount set in the Config trait.513 **/514 reservedXcmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []> & QueryableStorageEntry<ApiType, []>;515 /**516 * An option which indicates if the relay-chain restricts signalling a validation code upgrade.517 * In other words, if this is `Some` and [`NewValidationCode`] is `Some` then the produced518 * candidate will be invalid.519 * 520 * This storage item is a mirror of the corresponding value for the current parachain from the521 * relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is522 * set after the inherent.523 **/524 upgradeRestrictionSignal: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2UpgradeRestriction>>, []> & QueryableStorageEntry<ApiType, []>;525 /**526 * Upward messages that were sent in a block.527 * 528 * This will be cleared in `on_initialize` of each new block.529 **/530 upwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;531 /**532 * The [`PersistedValidationData`] set for this block.533 * This value is expected to be set only once per block and it's never stored534 * in the trie.535 **/536 validationData: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2PersistedValidationData>>, []> & QueryableStorageEntry<ApiType, []>;537 /**538 * Generic query539 **/540 [key: string]: QueryableStorageEntry<ApiType>;541 };542 randomnessCollectiveFlip: {543 /**544 * Series of block headers from the last 81 blocks that acts as random seed material. This545 * is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of546 * the oldest hash.547 **/548 randomMaterial: AugmentedQuery<ApiType, () => Observable<Vec<H256>>, []> & QueryableStorageEntry<ApiType, []>;549 /**550 * Generic query551 **/552 [key: string]: QueryableStorageEntry<ApiType>;553 };554 refungible: {555 /**556 * Amount of tokens (not pieces) partially owned by an account within a collection.557 **/558 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;559 /**560 * Allowance set by a token owner for another user to perform one of certain transactions on a number of pieces of a token.561 **/562 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]>;563 /**564 * Amount of token pieces owned by account.565 **/566 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]>;567 /**568 * Used to enumerate tokens owned by account.569 **/570 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]>;571 /**572 * Token data, used to partially describe a token.573 **/574 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<PalletRefungibleItemData>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;575 /**576 * Amount of pieces a refungible token is split into.577 **/578 tokenProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;579 /**580 * Amount of tokens burnt in a collection.581 **/582 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;583 /**584 * Total amount of minted tokens in a collection.585 **/586 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;587 /**588 * Total amount of pieces for token589 **/590 totalSupply: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;591 /**592 * Generic query593 **/594 [key: string]: QueryableStorageEntry<ApiType>;595 };596 rmrkCore: {597 /**598 * Latest yet-unused collection ID.599 **/600 collectionIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;601 /**602 * Mapping from RMRK collection ID to Unique's.603 **/604 uniqueCollectionId: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;605 /**606 * Generic query607 **/608 [key: string]: QueryableStorageEntry<ApiType>;609 };610 rmrkEquip: {611 /**612 * Checkmark that a Base has a Theme NFT named "default".613 **/614 baseHasDefaultTheme: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;615 /**616 * Map of a Base ID and a Part ID to an NFT in the Base collection serving as the Part.617 **/618 inernalPartId: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;619 /**620 * Generic query621 **/622 [key: string]: QueryableStorageEntry<ApiType>;623 };624 scheduler: {625 /**626 * Items to be executed, indexed by the block number that they should be executed on.627 **/628 agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletUniqueSchedulerScheduledV3>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;629 /**630 * Lookup from identity to the block number and index of the task.631 **/632 lookup: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;633 /**634 * Generic query635 **/636 [key: string]: QueryableStorageEntry<ApiType>;637 };638 structure: {639 /**640 * Generic query641 **/642 [key: string]: QueryableStorageEntry<ApiType>;643 };644 sudo: {645 /**646 * The `AccountId` of the sudo key.647 **/648 key: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;649 /**650 * Generic query651 **/652 [key: string]: QueryableStorageEntry<ApiType>;653 };654 system: {655 /**656 * The full account information for a particular account ID.657 **/658 account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<FrameSystemAccountInfo>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;659 /**660 * Total length (in bytes) for all extrinsics put together, for the current block.661 **/662 allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;663 /**664 * Map of block numbers to block hashes.665 **/666 blockHash: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<H256>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;667 /**668 * The current weight for the block.669 **/670 blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;671 /**672 * Digest of the current block, also part of the block header.673 **/674 digest: AugmentedQuery<ApiType, () => Observable<SpRuntimeDigest>, []> & QueryableStorageEntry<ApiType, []>;675 /**676 * The number of events in the `Events<T>` list.677 **/678 eventCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;679 /**680 * Events deposited for the current block.681 * 682 * NOTE: The item is unbound and should therefore never be read on chain.683 * It could otherwise inflate the PoV size of a block.684 * 685 * Events have a large in-memory size. Box the events to not go out-of-memory686 * just in case someone still reads them from within the runtime.687 **/688 events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;689 /**690 * Mapping between a topic (represented by T::Hash) and a vector of indexes691 * of events in the `<Events<T>>` list.692 * 693 * All topic vectors have deterministic storage locations depending on the topic. This694 * allows light-clients to leverage the changes trie storage tracking mechanism and695 * in case of changes fetch the list of events of interest.696 * 697 * The value has the type `(T::BlockNumber, EventIndex)` because if we used only just698 * the `EventIndex` then in case if the topic has the same contents on the next block699 * no notification will be triggered thus the event might be lost.700 **/701 eventTopics: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Vec<ITuple<[u32, u32]>>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;702 /**703 * The execution phase of the block.704 **/705 executionPhase: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemPhase>>, []> & QueryableStorageEntry<ApiType, []>;706 /**707 * Total extrinsics count for the current block.708 **/709 extrinsicCount: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;710 /**711 * Extrinsics data for the current block (maps an extrinsic's index to its data).712 **/713 extrinsicData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;714 /**715 * Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.716 **/717 lastRuntimeUpgrade: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemLastRuntimeUpgradeInfo>>, []> & QueryableStorageEntry<ApiType, []>;718 /**719 * The current block number being processed. Set by `execute_block`.720 **/721 number: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;722 /**723 * Hash of the previous block.724 **/725 parentHash: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;726 /**727 * True if we have upgraded so that AccountInfo contains three types of `RefCount`. False728 * (default) if not.729 **/730 upgradedToTripleRefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;731 /**732 * True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.733 **/734 upgradedToU32RefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;735 /**736 * Generic query737 **/738 [key: string]: QueryableStorageEntry<ApiType>;739 };740 timestamp: {741 /**742 * Did the timestamp get updated in this block?743 **/744 didUpdate: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;745 /**746 * Current time for the current block.747 **/748 now: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;749 /**750 * Generic query751 **/752 [key: string]: QueryableStorageEntry<ApiType>;753 };754 transactionPayment: {755 nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;756 storageVersion: AugmentedQuery<ApiType, () => Observable<PalletTransactionPaymentReleases>, []> & QueryableStorageEntry<ApiType, []>;757 /**758 * Generic query759 **/760 [key: string]: QueryableStorageEntry<ApiType>;761 };762 treasury: {763 /**764 * Proposal indices that have been approved but not yet awarded.765 **/766 approvals: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;767 /**768 * Number of proposals that have been made.769 **/770 proposalCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;771 /**772 * Proposals that have been made.773 **/774 proposals: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletTreasuryProposal>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;775 /**776 * Generic query777 **/778 [key: string]: QueryableStorageEntry<ApiType>;779 };780 unique: {781 /**782 * Used for migrations783 **/784 chainVersion: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;785 /**786 * (Collection id (controlled?2), who created (real))787 * TODO: Off chain worker should remove from this map when collection gets removed788 **/789 createItemBasket: AugmentedQuery<ApiType, (arg: ITuple<[u32, AccountId32]> | [u32 | AnyNumber | Uint8Array, AccountId32 | string | Uint8Array]) => Observable<Option<u32>>, [ITuple<[u32, AccountId32]>]> & QueryableStorageEntry<ApiType, [ITuple<[u32, AccountId32]>]>;790 /**791 * Last sponsoring of fungible tokens approval in a collection792 **/793 fungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;794 /**795 * Collection id (controlled?2), owning user (real)796 **/797 fungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;798 /**799 * Last sponsoring of NFT approval in a collection800 **/801 nftApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;802 /**803 * Collection id (controlled?2), token id (controlled?2)804 **/805 nftTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;806 /**807 * Last sponsoring of RFT approval in a collection808 **/809 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]>;810 /**811 * Collection id (controlled?2), token id (controlled?2)812 **/813 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]>;814 /**815 * Last sponsoring of token property setting // todo:doc rephrase this and the following816 **/817 tokenPropertyBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;818 /**819 * Variable metadata sponsoring820 * Collection id (controlled?2), token id (controlled?2)821 **/822 variableMetaDataBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;823 /**824 * Generic query825 **/826 [key: string]: QueryableStorageEntry<ApiType>;827 };828 vesting: {829 /**830 * Vesting schedules of an account.831 * 832 * VestingSchedules: map AccountId => Vec<VestingSchedule>833 **/834 vestingSchedules: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<OrmlVestingVestingSchedule>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;835 /**836 * Generic query837 **/838 [key: string]: QueryableStorageEntry<ApiType>;839 };840 xcmpQueue: {841 /**842 * Inbound aggregate XCMP messages. It can only be one per ParaId/block.843 **/844 inboundXcmpMessages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;845 /**846 * Status of the inbound XCMP channels.847 **/848 inboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletXcmpQueueInboundChannelDetails>>, []> & QueryableStorageEntry<ApiType, []>;849 /**850 * The messages outbound in a given XCMP channel.851 **/852 outboundXcmpMessages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u16 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32, u16]> & QueryableStorageEntry<ApiType, [u32, u16]>;853 /**854 * The non-empty XCMP channels in order of becoming non-empty, and the index of the first855 * and last outbound message. If the two indices are equal, then it indicates an empty856 * queue and there must be a non-`Ok` `OutboundStatus`. We assume queues grow no greater857 * than 65535 items. Queue indices for normal messages begin at one; zero is reserved in858 * case of the need to send a high-priority signal message this block.859 * The bool is true if there is a signal message waiting to be sent.860 **/861 outboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletXcmpQueueOutboundChannelDetails>>, []> & QueryableStorageEntry<ApiType, []>;862 /**863 * The messages that exceeded max individual message weight budget.864 * 865 * These message stay in this storage map until they are manually dispatched via866 * `service_overweight`.867 **/868 overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;869 /**870 * The number of overweight messages ever recorded in `Overweight`. Also doubles as the next871 * available free overweight index.872 **/873 overweightCount: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;874 /**875 * The configuration which controls the dynamics of the outbound queue.876 **/877 queueConfig: AugmentedQuery<ApiType, () => Observable<CumulusPalletXcmpQueueQueueConfigData>, []> & QueryableStorageEntry<ApiType, []>;878 /**879 * Whether or not the XCMP queue is suspended from executing incoming XCMs or not.880 **/881 queueSuspended: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;882 /**883 * Any signal messages waiting to be sent.884 **/885 signalMessages: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;886 /**887 * Generic query888 **/889 [key: string]: QueryableStorageEntry<ApiType>;890 };891 } // AugmentedQueries892} // declare moduletests/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 */
tests/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>
tests/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) */