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.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/events';78import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';9import type { Bytes, Null, Option, Result, U256, U8aFixed, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';10import type { ITuple } from '@polkadot/types-codec/types';11import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';12import type { EthereumLog, EvmCoreErrorExitReason, FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, RmrkTraitsNftAccountIdOrCollectionNftTuple, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';1314export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;1516declare module '@polkadot/api-base/types/events' {17 interface AugmentedEvents<ApiType extends ApiTypes> {18 appPromotion: {19 StakingRecalculation: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;20 /**21 * Generic event22 **/23 [key: string]: AugmentedEvent<ApiType>;24 };25 balances: {26 /**27 * A balance was set by root.28 **/29 BalanceSet: AugmentedEvent<ApiType, [who: AccountId32, free: u128, reserved: u128], { who: AccountId32, free: u128, reserved: u128 }>;30 /**31 * Some amount was deposited (e.g. for transaction fees).32 **/33 Deposit: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;34 /**35 * An account was removed whose balance was non-zero but below ExistentialDeposit,36 * resulting in an outright loss.37 **/38 DustLost: AugmentedEvent<ApiType, [account: AccountId32, amount: u128], { account: AccountId32, amount: u128 }>;39 /**40 * An account was created with some free balance.41 **/42 Endowed: AugmentedEvent<ApiType, [account: AccountId32, freeBalance: u128], { account: AccountId32, freeBalance: u128 }>;43 /**44 * Some balance was reserved (moved from free to reserved).45 **/46 Reserved: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;47 /**48 * Some balance was moved from the reserve of the first account to the second account.49 * Final argument indicates the destination balance type.50 **/51 ReserveRepatriated: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus], { from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus }>;52 /**53 * Some amount was removed from the account (e.g. for misbehavior).54 **/55 Slashed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;56 /**57 * Transfer succeeded.58 **/59 Transfer: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128], { from: AccountId32, to: AccountId32, amount: u128 }>;60 /**61 * Some balance was unreserved (moved from reserved to free).62 **/63 Unreserved: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;64 /**65 * Some amount was withdrawn from the account (e.g. for transaction fees).66 **/67 Withdraw: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;68 /**69 * Generic event70 **/71 [key: string]: AugmentedEvent<ApiType>;72 };73 common: {74 /**75 * Amount pieces of token owned by `sender` was approved for `spender`.76 **/77 Approved: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;78 /**79 * New collection was created80 **/81 CollectionCreated: AugmentedEvent<ApiType, [u32, u8, AccountId32]>;82 /**83 * New collection was destroyed84 **/85 CollectionDestroyed: AugmentedEvent<ApiType, [u32]>;86 /**87 * The property has been deleted.88 **/89 CollectionPropertyDeleted: AugmentedEvent<ApiType, [u32, Bytes]>;90 /**91 * The colletion property has been added or edited.92 **/93 CollectionPropertySet: AugmentedEvent<ApiType, [u32, Bytes]>;94 /**95 * New item was created.96 **/97 ItemCreated: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;98 /**99 * Collection item was burned.100 **/101 ItemDestroyed: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;102 /**103 * The token property permission of a collection has been set.104 **/105 PropertyPermissionSet: AugmentedEvent<ApiType, [u32, Bytes]>;106 /**107 * The token property has been deleted.108 **/109 TokenPropertyDeleted: AugmentedEvent<ApiType, [u32, u32, Bytes]>;110 /**111 * The token property has been added or edited.112 **/113 TokenPropertySet: AugmentedEvent<ApiType, [u32, u32, Bytes]>;114 /**115 * Item was transferred116 **/117 Transfer: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;118 /**119 * Generic event120 **/121 [key: string]: AugmentedEvent<ApiType>;122 };123 cumulusXcm: {124 /**125 * Downward message executed with the given outcome.126 * \[ id, outcome \]127 **/128 ExecutedDownward: AugmentedEvent<ApiType, [U8aFixed, XcmV2TraitsOutcome]>;129 /**130 * Downward message is invalid XCM.131 * \[ id \]132 **/133 InvalidFormat: AugmentedEvent<ApiType, [U8aFixed]>;134 /**135 * Downward message is unsupported version of XCM.136 * \[ id \]137 **/138 UnsupportedVersion: AugmentedEvent<ApiType, [U8aFixed]>;139 /**140 * Generic event141 **/142 [key: string]: AugmentedEvent<ApiType>;143 };144 dmpQueue: {145 /**146 * Downward message executed with the given outcome.147 **/148 ExecutedDownward: AugmentedEvent<ApiType, [messageId: U8aFixed, outcome: XcmV2TraitsOutcome], { messageId: U8aFixed, outcome: XcmV2TraitsOutcome }>;149 /**150 * Downward message is invalid XCM.151 **/152 InvalidFormat: AugmentedEvent<ApiType, [messageId: U8aFixed], { messageId: U8aFixed }>;153 /**154 * Downward message is overweight and was placed in the overweight queue.155 **/156 OverweightEnqueued: AugmentedEvent<ApiType, [messageId: U8aFixed, overweightIndex: u64, requiredWeight: u64], { messageId: U8aFixed, overweightIndex: u64, requiredWeight: u64 }>;157 /**158 * Downward message from the overweight queue was executed.159 **/160 OverweightServiced: AugmentedEvent<ApiType, [overweightIndex: u64, weightUsed: u64], { overweightIndex: u64, weightUsed: u64 }>;161 /**162 * Downward message is unsupported version of XCM.163 **/164 UnsupportedVersion: AugmentedEvent<ApiType, [messageId: U8aFixed], { messageId: U8aFixed }>;165 /**166 * The weight limit for handling downward messages was reached.167 **/168 WeightExhausted: AugmentedEvent<ApiType, [messageId: U8aFixed, remainingWeight: u64, requiredWeight: u64], { messageId: U8aFixed, remainingWeight: u64, requiredWeight: u64 }>;169 /**170 * Generic event171 **/172 [key: string]: AugmentedEvent<ApiType>;173 };174 ethereum: {175 /**176 * An ethereum transaction was successfully executed. [from, to/contract_address, transaction_hash, exit_reason]177 **/178 Executed: AugmentedEvent<ApiType, [H160, H160, H256, EvmCoreErrorExitReason]>;179 /**180 * Generic event181 **/182 [key: string]: AugmentedEvent<ApiType>;183 };184 evm: {185 /**186 * A deposit has been made at a given address. \[sender, address, value\]187 **/188 BalanceDeposit: AugmentedEvent<ApiType, [AccountId32, H160, U256]>;189 /**190 * A withdrawal has been made from a given address. \[sender, address, value\]191 **/192 BalanceWithdraw: AugmentedEvent<ApiType, [AccountId32, H160, U256]>;193 /**194 * A contract has been created at given \[address\].195 **/196 Created: AugmentedEvent<ApiType, [H160]>;197 /**198 * A \[contract\] was attempted to be created, but the execution failed.199 **/200 CreatedFailed: AugmentedEvent<ApiType, [H160]>;201 /**202 * A \[contract\] has been executed successfully with states applied.203 **/204 Executed: AugmentedEvent<ApiType, [H160]>;205 /**206 * A \[contract\] has been executed with errors. States are reverted with only gas fees applied.207 **/208 ExecutedFailed: AugmentedEvent<ApiType, [H160]>;209 /**210 * Ethereum events from contracts.211 **/212 Log: AugmentedEvent<ApiType, [EthereumLog]>;213 /**214 * Generic event215 **/216 [key: string]: AugmentedEvent<ApiType>;217 };218 parachainSystem: {219 /**220 * Downward messages were processed using the given weight.221 **/222 DownwardMessagesProcessed: AugmentedEvent<ApiType, [weightUsed: u64, dmqHead: H256], { weightUsed: u64, dmqHead: H256 }>;223 /**224 * Some downward messages have been received and will be processed.225 **/226 DownwardMessagesReceived: AugmentedEvent<ApiType, [count: u32], { count: u32 }>;227 /**228 * An upgrade has been authorized.229 **/230 UpgradeAuthorized: AugmentedEvent<ApiType, [codeHash: H256], { codeHash: H256 }>;231 /**232 * The validation function was applied as of the contained relay chain block number.233 **/234 ValidationFunctionApplied: AugmentedEvent<ApiType, [relayChainBlockNum: u32], { relayChainBlockNum: u32 }>;235 /**236 * The relay-chain aborted the upgrade process.237 **/238 ValidationFunctionDiscarded: AugmentedEvent<ApiType, []>;239 /**240 * The validation function has been scheduled to apply.241 **/242 ValidationFunctionStored: AugmentedEvent<ApiType, []>;243 /**244 * Generic event245 **/246 [key: string]: AugmentedEvent<ApiType>;247 };248 polkadotXcm: {249 /**250 * Some assets have been placed in an asset trap.251 * 252 * \[ hash, origin, assets \]253 **/254 AssetsTrapped: AugmentedEvent<ApiType, [H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;255 /**256 * Execution of an XCM message was attempted.257 * 258 * \[ outcome \]259 **/260 Attempted: AugmentedEvent<ApiType, [XcmV2TraitsOutcome]>;261 /**262 * Expected query response has been received but the origin location of the response does263 * not match that expected. The query remains registered for a later, valid, response to264 * be received and acted upon.265 * 266 * \[ origin location, id, expected location \]267 **/268 InvalidResponder: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, Option<XcmV1MultiLocation>]>;269 /**270 * Expected query response has been received but the expected origin location placed in271 * storage by this runtime previously cannot be decoded. The query remains registered.272 * 273 * This is unexpected (since a location placed in storage in a previously executing274 * runtime should be readable prior to query timeout) and dangerous since the possibly275 * valid response will be dropped. Manual governance intervention is probably going to be276 * needed.277 * 278 * \[ origin location, id \]279 **/280 InvalidResponderVersion: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64]>;281 /**282 * Query response has been received and query is removed. The registered notification has283 * been dispatched and executed successfully.284 * 285 * \[ id, pallet index, call index \]286 **/287 Notified: AugmentedEvent<ApiType, [u64, u8, u8]>;288 /**289 * Query response has been received and query is removed. The dispatch was unable to be290 * decoded into a `Call`; this might be due to dispatch function having a signature which291 * is not `(origin, QueryId, Response)`.292 * 293 * \[ id, pallet index, call index \]294 **/295 NotifyDecodeFailed: AugmentedEvent<ApiType, [u64, u8, u8]>;296 /**297 * Query response has been received and query is removed. There was a general error with298 * dispatching the notification call.299 * 300 * \[ id, pallet index, call index \]301 **/302 NotifyDispatchError: AugmentedEvent<ApiType, [u64, u8, u8]>;303 /**304 * Query response has been received and query is removed. The registered notification could305 * not be dispatched because the dispatch weight is greater than the maximum weight306 * originally budgeted by this runtime for the query result.307 * 308 * \[ id, pallet index, call index, actual weight, max budgeted weight \]309 **/310 NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, u64, u64]>;311 /**312 * A given location which had a version change subscription was dropped owing to an error313 * migrating the location to our new XCM format.314 * 315 * \[ location, query ID \]316 **/317 NotifyTargetMigrationFail: AugmentedEvent<ApiType, [XcmVersionedMultiLocation, u64]>;318 /**319 * A given location which had a version change subscription was dropped owing to an error320 * sending the notification to it.321 * 322 * \[ location, query ID, error \]323 **/324 NotifyTargetSendFail: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, XcmV2TraitsError]>;325 /**326 * Query response has been received and is ready for taking with `take_response`. There is327 * no registered notification call.328 * 329 * \[ id, response \]330 **/331 ResponseReady: AugmentedEvent<ApiType, [u64, XcmV2Response]>;332 /**333 * Received query response has been read and removed.334 * 335 * \[ id \]336 **/337 ResponseTaken: AugmentedEvent<ApiType, [u64]>;338 /**339 * A XCM message was sent.340 * 341 * \[ origin, destination, message \]342 **/343 Sent: AugmentedEvent<ApiType, [XcmV1MultiLocation, XcmV1MultiLocation, XcmV2Xcm]>;344 /**345 * The supported version of a location has been changed. This might be through an346 * automatic notification or a manual intervention.347 * 348 * \[ location, XCM version \]349 **/350 SupportedVersionChanged: AugmentedEvent<ApiType, [XcmV1MultiLocation, u32]>;351 /**352 * Query response received which does not match a registered query. This may be because a353 * matching query was never registered, it may be because it is a duplicate response, or354 * because the query timed out.355 * 356 * \[ origin location, id \]357 **/358 UnexpectedResponse: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64]>;359 /**360 * An XCM version change notification message has been attempted to be sent.361 * 362 * \[ destination, result \]363 **/364 VersionChangeNotified: AugmentedEvent<ApiType, [XcmV1MultiLocation, u32]>;365 /**366 * Generic event367 **/368 [key: string]: AugmentedEvent<ApiType>;369 };370 rmrkCore: {371 CollectionCreated: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;372 CollectionDestroyed: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;373 CollectionLocked: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;374 IssuerChanged: AugmentedEvent<ApiType, [oldIssuer: AccountId32, newIssuer: AccountId32, collectionId: u32], { oldIssuer: AccountId32, newIssuer: AccountId32, collectionId: u32 }>;375 NFTAccepted: AugmentedEvent<ApiType, [sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32], { sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32 }>;376 NFTBurned: AugmentedEvent<ApiType, [owner: AccountId32, nftId: u32], { owner: AccountId32, nftId: u32 }>;377 NftMinted: AugmentedEvent<ApiType, [owner: AccountId32, collectionId: u32, nftId: u32], { owner: AccountId32, collectionId: u32, nftId: u32 }>;378 NFTRejected: AugmentedEvent<ApiType, [sender: AccountId32, collectionId: u32, nftId: u32], { sender: AccountId32, collectionId: u32, nftId: u32 }>;379 NFTSent: AugmentedEvent<ApiType, [sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32, approvalRequired: bool], { sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32, approvalRequired: bool }>;380 PrioritySet: AugmentedEvent<ApiType, [collectionId: u32, nftId: u32], { collectionId: u32, nftId: u32 }>;381 PropertySet: AugmentedEvent<ApiType, [collectionId: u32, maybeNftId: Option<u32>, key: Bytes, value: Bytes], { collectionId: u32, maybeNftId: Option<u32>, key: Bytes, value: Bytes }>;382 ResourceAccepted: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;383 ResourceAdded: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;384 ResourceRemoval: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;385 ResourceRemovalAccepted: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;386 /**387 * Generic event388 **/389 [key: string]: AugmentedEvent<ApiType>;390 };391 rmrkEquip: {392 BaseCreated: AugmentedEvent<ApiType, [issuer: AccountId32, baseId: u32], { issuer: AccountId32, baseId: u32 }>;393 EquippablesUpdated: AugmentedEvent<ApiType, [baseId: u32, slotId: u32], { baseId: u32, slotId: u32 }>;394 /**395 * Generic event396 **/397 [key: string]: AugmentedEvent<ApiType>;398 };399 scheduler: {400 /**401 * The call for the provided hash was not found so the task has been aborted.402 **/403 CallLookupFailed: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, error: FrameSupportScheduleLookupError], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, error: FrameSupportScheduleLookupError }>;404 /**405 * Canceled some task.406 **/407 Canceled: AugmentedEvent<ApiType, [when: u32, index: u32], { when: u32, index: u32 }>;408 /**409 * Dispatched some task.410 **/411 Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError> }>;412 /**413 * Scheduled some task.414 **/415 Scheduled: AugmentedEvent<ApiType, [when: u32, index: u32], { when: u32, index: u32 }>;416 /**417 * Generic event418 **/419 [key: string]: AugmentedEvent<ApiType>;420 };421 structure: {422 /**423 * Executed call on behalf of the token.424 **/425 Executed: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;426 /**427 * Generic event428 **/429 [key: string]: AugmentedEvent<ApiType>;430 };431 sudo: {432 /**433 * The \[sudoer\] just switched identity; the old key is supplied if one existed.434 **/435 KeyChanged: AugmentedEvent<ApiType, [oldSudoer: Option<AccountId32>], { oldSudoer: Option<AccountId32> }>;436 /**437 * A sudo just took place. \[result\]438 **/439 Sudid: AugmentedEvent<ApiType, [sudoResult: Result<Null, SpRuntimeDispatchError>], { sudoResult: Result<Null, SpRuntimeDispatchError> }>;440 /**441 * A sudo just took place. \[result\]442 **/443 SudoAsDone: AugmentedEvent<ApiType, [sudoResult: Result<Null, SpRuntimeDispatchError>], { sudoResult: Result<Null, SpRuntimeDispatchError> }>;444 /**445 * Generic event446 **/447 [key: string]: AugmentedEvent<ApiType>;448 };449 system: {450 /**451 * `:code` was updated.452 **/453 CodeUpdated: AugmentedEvent<ApiType, []>;454 /**455 * An extrinsic failed.456 **/457 ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo }>;458 /**459 * An extrinsic completed successfully.460 **/461 ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchInfo: FrameSupportWeightsDispatchInfo }>;462 /**463 * An account was reaped.464 **/465 KilledAccount: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;466 /**467 * A new account was created.468 **/469 NewAccount: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;470 /**471 * On on-chain remark happened.472 **/473 Remarked: AugmentedEvent<ApiType, [sender: AccountId32, hash_: H256], { sender: AccountId32, hash_: H256 }>;474 /**475 * Generic event476 **/477 [key: string]: AugmentedEvent<ApiType>;478 };479 transactionPayment: {480 /**481 * A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,482 * has been paid by `who`.483 **/484 TransactionFeePaid: AugmentedEvent<ApiType, [who: AccountId32, actualFee: u128, tip: u128], { who: AccountId32, actualFee: u128, tip: u128 }>;485 /**486 * Generic event487 **/488 [key: string]: AugmentedEvent<ApiType>;489 };490 treasury: {491 /**492 * Some funds have been allocated.493 **/494 Awarded: AugmentedEvent<ApiType, [proposalIndex: u32, award: u128, account: AccountId32], { proposalIndex: u32, award: u128, account: AccountId32 }>;495 /**496 * Some of our funds have been burnt.497 **/498 Burnt: AugmentedEvent<ApiType, [burntFunds: u128], { burntFunds: u128 }>;499 /**500 * Some funds have been deposited.501 **/502 Deposit: AugmentedEvent<ApiType, [value: u128], { value: u128 }>;503 /**504 * New proposal.505 **/506 Proposed: AugmentedEvent<ApiType, [proposalIndex: u32], { proposalIndex: u32 }>;507 /**508 * A proposal was rejected; funds were slashed.509 **/510 Rejected: AugmentedEvent<ApiType, [proposalIndex: u32, slashed: u128], { proposalIndex: u32, slashed: u128 }>;511 /**512 * Spending has finished; this is the amount that rolls over until next spend.513 **/514 Rollover: AugmentedEvent<ApiType, [rolloverBalance: u128], { rolloverBalance: u128 }>;515 /**516 * A new spend proposal has been approved.517 **/518 SpendApproved: AugmentedEvent<ApiType, [proposalIndex: u32, amount: u128, beneficiary: AccountId32], { proposalIndex: u32, amount: u128, beneficiary: AccountId32 }>;519 /**520 * We have ended a spend period and will now allocate funds.521 **/522 Spending: AugmentedEvent<ApiType, [budgetRemaining: u128], { budgetRemaining: u128 }>;523 /**524 * Generic event525 **/526 [key: string]: AugmentedEvent<ApiType>;527 };528 unique: {529 /**530 * Address was added to the allow list531 * 532 * # Arguments533 * * collection_id: ID of the affected collection.534 * * user: Address of the added account.535 **/536 AllowListAddressAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;537 /**538 * Address was removed from the allow list539 * 540 * # Arguments541 * * collection_id: ID of the affected collection.542 * * user: Address of the removed account.543 **/544 AllowListAddressRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;545 /**546 * Collection admin was added547 * 548 * # Arguments549 * * collection_id: ID of the affected collection.550 * * admin: Admin address.551 **/552 CollectionAdminAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;553 /**554 * Collection admin was removed555 * 556 * # Arguments557 * * collection_id: ID of the affected collection.558 * * admin: Removed admin address.559 **/560 CollectionAdminRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;561 /**562 * Collection limits were set563 * 564 * # Arguments565 * * collection_id: ID of the affected collection.566 **/567 CollectionLimitSet: AugmentedEvent<ApiType, [u32]>;568 /**569 * Collection owned was changed570 * 571 * # Arguments572 * * collection_id: ID of the affected collection.573 * * owner: New owner address.574 **/575 CollectionOwnedChanged: AugmentedEvent<ApiType, [u32, AccountId32]>;576 /**577 * Collection permissions were set578 * 579 * # Arguments580 * * collection_id: ID of the affected collection.581 **/582 CollectionPermissionSet: AugmentedEvent<ApiType, [u32]>;583 /**584 * Collection sponsor was removed585 * 586 * # Arguments587 * * collection_id: ID of the affected collection.588 **/589 CollectionSponsorRemoved: AugmentedEvent<ApiType, [u32]>;590 /**591 * Collection sponsor was set592 * 593 * # Arguments594 * * collection_id: ID of the affected collection.595 * * owner: New sponsor address.596 **/597 CollectionSponsorSet: AugmentedEvent<ApiType, [u32, AccountId32]>;598 /**599 * New sponsor was confirm600 * 601 * # Arguments602 * * collection_id: ID of the affected collection.603 * * sponsor: New sponsor address.604 **/605 SponsorshipConfirmed: AugmentedEvent<ApiType, [u32, AccountId32]>;606 /**607 * Generic event608 **/609 [key: string]: AugmentedEvent<ApiType>;610 };611 vesting: {612 /**613 * Claimed vesting.614 **/615 Claimed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;616 /**617 * Added new vesting schedule.618 **/619 VestingScheduleAdded: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, vestingSchedule: OrmlVestingVestingSchedule], { from: AccountId32, to: AccountId32, vestingSchedule: OrmlVestingVestingSchedule }>;620 /**621 * Updated vesting schedules.622 **/623 VestingSchedulesUpdated: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;624 /**625 * Generic event626 **/627 [key: string]: AugmentedEvent<ApiType>;628 };629 xcmpQueue: {630 /**631 * Bad XCM format used.632 **/633 BadFormat: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;634 /**635 * Bad XCM version used.636 **/637 BadVersion: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;638 /**639 * Some XCM failed.640 **/641 Fail: AugmentedEvent<ApiType, [messageHash: Option<H256>, error: XcmV2TraitsError, weight: u64], { messageHash: Option<H256>, error: XcmV2TraitsError, weight: u64 }>;642 /**643 * An XCM exceeded the individual message weight budget.644 **/645 OverweightEnqueued: AugmentedEvent<ApiType, [sender: u32, sentAt: u32, index: u64, required: u64], { sender: u32, sentAt: u32, index: u64, required: u64 }>;646 /**647 * An XCM from the overweight queue was executed with the given actual weight used.648 **/649 OverweightServiced: AugmentedEvent<ApiType, [index: u64, used: u64], { index: u64, used: u64 }>;650 /**651 * Some XCM was executed ok.652 **/653 Success: AugmentedEvent<ApiType, [messageHash: Option<H256>, weight: u64], { messageHash: Option<H256>, weight: u64 }>;654 /**655 * An upward message was sent to the relay chain.656 **/657 UpwardMessageSent: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;658 /**659 * An HRMP message was sent to a sibling parachain.660 **/661 XcmpMessageSent: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;662 /**663 * Generic event664 **/665 [key: string]: AugmentedEvent<ApiType>;666 };667 } // AugmentedEvents668} // declare module1// 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/events';78import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';9import type { Bytes, Null, Option, Result, U256, U8aFixed, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';10import type { ITuple } from '@polkadot/types-codec/types';11import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';12import type { EthereumLog, EvmCoreErrorExitReason, FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, RmrkTraitsNftAccountIdOrCollectionNftTuple, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';1314export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;1516declare module '@polkadot/api-base/types/events' {17 interface AugmentedEvents<ApiType extends ApiTypes> {18 appPromotion: {19 SetAdmin: AugmentedEvent<ApiType, [AccountId32]>;20 Stake: AugmentedEvent<ApiType, [AccountId32, u128]>;21 StakingRecalculation: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;22 Unstake: AugmentedEvent<ApiType, [AccountId32, u128]>;23 /**24 * Generic event25 **/26 [key: string]: AugmentedEvent<ApiType>;27 };28 balances: {29 /**30 * A balance was set by root.31 **/32 BalanceSet: AugmentedEvent<ApiType, [who: AccountId32, free: u128, reserved: u128], { who: AccountId32, free: u128, reserved: u128 }>;33 /**34 * Some amount was deposited (e.g. for transaction fees).35 **/36 Deposit: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;37 /**38 * An account was removed whose balance was non-zero but below ExistentialDeposit,39 * resulting in an outright loss.40 **/41 DustLost: AugmentedEvent<ApiType, [account: AccountId32, amount: u128], { account: AccountId32, amount: u128 }>;42 /**43 * An account was created with some free balance.44 **/45 Endowed: AugmentedEvent<ApiType, [account: AccountId32, freeBalance: u128], { account: AccountId32, freeBalance: u128 }>;46 /**47 * Some balance was reserved (moved from free to reserved).48 **/49 Reserved: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;50 /**51 * Some balance was moved from the reserve of the first account to the second account.52 * Final argument indicates the destination balance type.53 **/54 ReserveRepatriated: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus], { from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus }>;55 /**56 * Some amount was removed from the account (e.g. for misbehavior).57 **/58 Slashed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;59 /**60 * Transfer succeeded.61 **/62 Transfer: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128], { from: AccountId32, to: AccountId32, amount: u128 }>;63 /**64 * Some balance was unreserved (moved from reserved to free).65 **/66 Unreserved: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;67 /**68 * Some amount was withdrawn from the account (e.g. for transaction fees).69 **/70 Withdraw: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;71 /**72 * Generic event73 **/74 [key: string]: AugmentedEvent<ApiType>;75 };76 common: {77 /**78 * Amount pieces of token owned by `sender` was approved for `spender`.79 **/80 Approved: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;81 /**82 * New collection was created83 **/84 CollectionCreated: AugmentedEvent<ApiType, [u32, u8, AccountId32]>;85 /**86 * New collection was destroyed87 **/88 CollectionDestroyed: AugmentedEvent<ApiType, [u32]>;89 /**90 * The property has been deleted.91 **/92 CollectionPropertyDeleted: AugmentedEvent<ApiType, [u32, Bytes]>;93 /**94 * The colletion property has been added or edited.95 **/96 CollectionPropertySet: AugmentedEvent<ApiType, [u32, Bytes]>;97 /**98 * New item was created.99 **/100 ItemCreated: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;101 /**102 * Collection item was burned.103 **/104 ItemDestroyed: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;105 /**106 * The token property permission of a collection has been set.107 **/108 PropertyPermissionSet: AugmentedEvent<ApiType, [u32, Bytes]>;109 /**110 * The token property has been deleted.111 **/112 TokenPropertyDeleted: AugmentedEvent<ApiType, [u32, u32, Bytes]>;113 /**114 * The token property has been added or edited.115 **/116 TokenPropertySet: AugmentedEvent<ApiType, [u32, u32, Bytes]>;117 /**118 * Item was transferred119 **/120 Transfer: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;121 /**122 * Generic event123 **/124 [key: string]: AugmentedEvent<ApiType>;125 };126 cumulusXcm: {127 /**128 * Downward message executed with the given outcome.129 * \[ id, outcome \]130 **/131 ExecutedDownward: AugmentedEvent<ApiType, [U8aFixed, XcmV2TraitsOutcome]>;132 /**133 * Downward message is invalid XCM.134 * \[ id \]135 **/136 InvalidFormat: AugmentedEvent<ApiType, [U8aFixed]>;137 /**138 * Downward message is unsupported version of XCM.139 * \[ id \]140 **/141 UnsupportedVersion: AugmentedEvent<ApiType, [U8aFixed]>;142 /**143 * Generic event144 **/145 [key: string]: AugmentedEvent<ApiType>;146 };147 dmpQueue: {148 /**149 * Downward message executed with the given outcome.150 **/151 ExecutedDownward: AugmentedEvent<ApiType, [messageId: U8aFixed, outcome: XcmV2TraitsOutcome], { messageId: U8aFixed, outcome: XcmV2TraitsOutcome }>;152 /**153 * Downward message is invalid XCM.154 **/155 InvalidFormat: AugmentedEvent<ApiType, [messageId: U8aFixed], { messageId: U8aFixed }>;156 /**157 * Downward message is overweight and was placed in the overweight queue.158 **/159 OverweightEnqueued: AugmentedEvent<ApiType, [messageId: U8aFixed, overweightIndex: u64, requiredWeight: u64], { messageId: U8aFixed, overweightIndex: u64, requiredWeight: u64 }>;160 /**161 * Downward message from the overweight queue was executed.162 **/163 OverweightServiced: AugmentedEvent<ApiType, [overweightIndex: u64, weightUsed: u64], { overweightIndex: u64, weightUsed: u64 }>;164 /**165 * Downward message is unsupported version of XCM.166 **/167 UnsupportedVersion: AugmentedEvent<ApiType, [messageId: U8aFixed], { messageId: U8aFixed }>;168 /**169 * The weight limit for handling downward messages was reached.170 **/171 WeightExhausted: AugmentedEvent<ApiType, [messageId: U8aFixed, remainingWeight: u64, requiredWeight: u64], { messageId: U8aFixed, remainingWeight: u64, requiredWeight: u64 }>;172 /**173 * Generic event174 **/175 [key: string]: AugmentedEvent<ApiType>;176 };177 ethereum: {178 /**179 * An ethereum transaction was successfully executed. [from, to/contract_address, transaction_hash, exit_reason]180 **/181 Executed: AugmentedEvent<ApiType, [H160, H160, H256, EvmCoreErrorExitReason]>;182 /**183 * Generic event184 **/185 [key: string]: AugmentedEvent<ApiType>;186 };187 evm: {188 /**189 * A deposit has been made at a given address. \[sender, address, value\]190 **/191 BalanceDeposit: AugmentedEvent<ApiType, [AccountId32, H160, U256]>;192 /**193 * A withdrawal has been made from a given address. \[sender, address, value\]194 **/195 BalanceWithdraw: AugmentedEvent<ApiType, [AccountId32, H160, U256]>;196 /**197 * A contract has been created at given \[address\].198 **/199 Created: AugmentedEvent<ApiType, [H160]>;200 /**201 * A \[contract\] was attempted to be created, but the execution failed.202 **/203 CreatedFailed: AugmentedEvent<ApiType, [H160]>;204 /**205 * A \[contract\] has been executed successfully with states applied.206 **/207 Executed: AugmentedEvent<ApiType, [H160]>;208 /**209 * A \[contract\] has been executed with errors. States are reverted with only gas fees applied.210 **/211 ExecutedFailed: AugmentedEvent<ApiType, [H160]>;212 /**213 * Ethereum events from contracts.214 **/215 Log: AugmentedEvent<ApiType, [EthereumLog]>;216 /**217 * Generic event218 **/219 [key: string]: AugmentedEvent<ApiType>;220 };221 parachainSystem: {222 /**223 * Downward messages were processed using the given weight.224 **/225 DownwardMessagesProcessed: AugmentedEvent<ApiType, [weightUsed: u64, dmqHead: H256], { weightUsed: u64, dmqHead: H256 }>;226 /**227 * Some downward messages have been received and will be processed.228 **/229 DownwardMessagesReceived: AugmentedEvent<ApiType, [count: u32], { count: u32 }>;230 /**231 * An upgrade has been authorized.232 **/233 UpgradeAuthorized: AugmentedEvent<ApiType, [codeHash: H256], { codeHash: H256 }>;234 /**235 * The validation function was applied as of the contained relay chain block number.236 **/237 ValidationFunctionApplied: AugmentedEvent<ApiType, [relayChainBlockNum: u32], { relayChainBlockNum: u32 }>;238 /**239 * The relay-chain aborted the upgrade process.240 **/241 ValidationFunctionDiscarded: AugmentedEvent<ApiType, []>;242 /**243 * The validation function has been scheduled to apply.244 **/245 ValidationFunctionStored: AugmentedEvent<ApiType, []>;246 /**247 * Generic event248 **/249 [key: string]: AugmentedEvent<ApiType>;250 };251 polkadotXcm: {252 /**253 * Some assets have been placed in an asset trap.254 * 255 * \[ hash, origin, assets \]256 **/257 AssetsTrapped: AugmentedEvent<ApiType, [H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;258 /**259 * Execution of an XCM message was attempted.260 * 261 * \[ outcome \]262 **/263 Attempted: AugmentedEvent<ApiType, [XcmV2TraitsOutcome]>;264 /**265 * Expected query response has been received but the origin location of the response does266 * not match that expected. The query remains registered for a later, valid, response to267 * be received and acted upon.268 * 269 * \[ origin location, id, expected location \]270 **/271 InvalidResponder: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, Option<XcmV1MultiLocation>]>;272 /**273 * Expected query response has been received but the expected origin location placed in274 * storage by this runtime previously cannot be decoded. The query remains registered.275 * 276 * This is unexpected (since a location placed in storage in a previously executing277 * runtime should be readable prior to query timeout) and dangerous since the possibly278 * valid response will be dropped. Manual governance intervention is probably going to be279 * needed.280 * 281 * \[ origin location, id \]282 **/283 InvalidResponderVersion: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64]>;284 /**285 * Query response has been received and query is removed. The registered notification has286 * been dispatched and executed successfully.287 * 288 * \[ id, pallet index, call index \]289 **/290 Notified: AugmentedEvent<ApiType, [u64, u8, u8]>;291 /**292 * Query response has been received and query is removed. The dispatch was unable to be293 * decoded into a `Call`; this might be due to dispatch function having a signature which294 * is not `(origin, QueryId, Response)`.295 * 296 * \[ id, pallet index, call index \]297 **/298 NotifyDecodeFailed: AugmentedEvent<ApiType, [u64, u8, u8]>;299 /**300 * Query response has been received and query is removed. There was a general error with301 * dispatching the notification call.302 * 303 * \[ id, pallet index, call index \]304 **/305 NotifyDispatchError: AugmentedEvent<ApiType, [u64, u8, u8]>;306 /**307 * Query response has been received and query is removed. The registered notification could308 * not be dispatched because the dispatch weight is greater than the maximum weight309 * originally budgeted by this runtime for the query result.310 * 311 * \[ id, pallet index, call index, actual weight, max budgeted weight \]312 **/313 NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, u64, u64]>;314 /**315 * A given location which had a version change subscription was dropped owing to an error316 * migrating the location to our new XCM format.317 * 318 * \[ location, query ID \]319 **/320 NotifyTargetMigrationFail: AugmentedEvent<ApiType, [XcmVersionedMultiLocation, u64]>;321 /**322 * A given location which had a version change subscription was dropped owing to an error323 * sending the notification to it.324 * 325 * \[ location, query ID, error \]326 **/327 NotifyTargetSendFail: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, XcmV2TraitsError]>;328 /**329 * Query response has been received and is ready for taking with `take_response`. There is330 * no registered notification call.331 * 332 * \[ id, response \]333 **/334 ResponseReady: AugmentedEvent<ApiType, [u64, XcmV2Response]>;335 /**336 * Received query response has been read and removed.337 * 338 * \[ id \]339 **/340 ResponseTaken: AugmentedEvent<ApiType, [u64]>;341 /**342 * A XCM message was sent.343 * 344 * \[ origin, destination, message \]345 **/346 Sent: AugmentedEvent<ApiType, [XcmV1MultiLocation, XcmV1MultiLocation, XcmV2Xcm]>;347 /**348 * The supported version of a location has been changed. This might be through an349 * automatic notification or a manual intervention.350 * 351 * \[ location, XCM version \]352 **/353 SupportedVersionChanged: AugmentedEvent<ApiType, [XcmV1MultiLocation, u32]>;354 /**355 * Query response received which does not match a registered query. This may be because a356 * matching query was never registered, it may be because it is a duplicate response, or357 * because the query timed out.358 * 359 * \[ origin location, id \]360 **/361 UnexpectedResponse: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64]>;362 /**363 * An XCM version change notification message has been attempted to be sent.364 * 365 * \[ destination, result \]366 **/367 VersionChangeNotified: AugmentedEvent<ApiType, [XcmV1MultiLocation, u32]>;368 /**369 * Generic event370 **/371 [key: string]: AugmentedEvent<ApiType>;372 };373 rmrkCore: {374 CollectionCreated: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;375 CollectionDestroyed: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;376 CollectionLocked: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;377 IssuerChanged: AugmentedEvent<ApiType, [oldIssuer: AccountId32, newIssuer: AccountId32, collectionId: u32], { oldIssuer: AccountId32, newIssuer: AccountId32, collectionId: u32 }>;378 NFTAccepted: AugmentedEvent<ApiType, [sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32], { sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32 }>;379 NFTBurned: AugmentedEvent<ApiType, [owner: AccountId32, nftId: u32], { owner: AccountId32, nftId: u32 }>;380 NftMinted: AugmentedEvent<ApiType, [owner: AccountId32, collectionId: u32, nftId: u32], { owner: AccountId32, collectionId: u32, nftId: u32 }>;381 NFTRejected: AugmentedEvent<ApiType, [sender: AccountId32, collectionId: u32, nftId: u32], { sender: AccountId32, collectionId: u32, nftId: u32 }>;382 NFTSent: AugmentedEvent<ApiType, [sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32, approvalRequired: bool], { sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32, approvalRequired: bool }>;383 PrioritySet: AugmentedEvent<ApiType, [collectionId: u32, nftId: u32], { collectionId: u32, nftId: u32 }>;384 PropertySet: AugmentedEvent<ApiType, [collectionId: u32, maybeNftId: Option<u32>, key: Bytes, value: Bytes], { collectionId: u32, maybeNftId: Option<u32>, key: Bytes, value: Bytes }>;385 ResourceAccepted: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;386 ResourceAdded: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;387 ResourceRemoval: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;388 ResourceRemovalAccepted: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;389 /**390 * Generic event391 **/392 [key: string]: AugmentedEvent<ApiType>;393 };394 rmrkEquip: {395 BaseCreated: AugmentedEvent<ApiType, [issuer: AccountId32, baseId: u32], { issuer: AccountId32, baseId: u32 }>;396 EquippablesUpdated: AugmentedEvent<ApiType, [baseId: u32, slotId: u32], { baseId: u32, slotId: u32 }>;397 /**398 * Generic event399 **/400 [key: string]: AugmentedEvent<ApiType>;401 };402 scheduler: {403 /**404 * The call for the provided hash was not found so the task has been aborted.405 **/406 CallLookupFailed: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, error: FrameSupportScheduleLookupError], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, error: FrameSupportScheduleLookupError }>;407 /**408 * Canceled some task.409 **/410 Canceled: AugmentedEvent<ApiType, [when: u32, index: u32], { when: u32, index: u32 }>;411 /**412 * Dispatched some task.413 **/414 Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError> }>;415 /**416 * Scheduled some task.417 **/418 Scheduled: AugmentedEvent<ApiType, [when: u32, index: u32], { when: u32, index: u32 }>;419 /**420 * Generic event421 **/422 [key: string]: AugmentedEvent<ApiType>;423 };424 structure: {425 /**426 * Executed call on behalf of the token.427 **/428 Executed: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;429 /**430 * Generic event431 **/432 [key: string]: AugmentedEvent<ApiType>;433 };434 sudo: {435 /**436 * The \[sudoer\] just switched identity; the old key is supplied if one existed.437 **/438 KeyChanged: AugmentedEvent<ApiType, [oldSudoer: Option<AccountId32>], { oldSudoer: Option<AccountId32> }>;439 /**440 * A sudo just took place. \[result\]441 **/442 Sudid: AugmentedEvent<ApiType, [sudoResult: Result<Null, SpRuntimeDispatchError>], { sudoResult: Result<Null, SpRuntimeDispatchError> }>;443 /**444 * A sudo just took place. \[result\]445 **/446 SudoAsDone: AugmentedEvent<ApiType, [sudoResult: Result<Null, SpRuntimeDispatchError>], { sudoResult: Result<Null, SpRuntimeDispatchError> }>;447 /**448 * Generic event449 **/450 [key: string]: AugmentedEvent<ApiType>;451 };452 system: {453 /**454 * `:code` was updated.455 **/456 CodeUpdated: AugmentedEvent<ApiType, []>;457 /**458 * An extrinsic failed.459 **/460 ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo }>;461 /**462 * An extrinsic completed successfully.463 **/464 ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchInfo: FrameSupportWeightsDispatchInfo }>;465 /**466 * An account was reaped.467 **/468 KilledAccount: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;469 /**470 * A new account was created.471 **/472 NewAccount: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;473 /**474 * On on-chain remark happened.475 **/476 Remarked: AugmentedEvent<ApiType, [sender: AccountId32, hash_: H256], { sender: AccountId32, hash_: H256 }>;477 /**478 * Generic event479 **/480 [key: string]: AugmentedEvent<ApiType>;481 };482 transactionPayment: {483 /**484 * A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,485 * has been paid by `who`.486 **/487 TransactionFeePaid: AugmentedEvent<ApiType, [who: AccountId32, actualFee: u128, tip: u128], { who: AccountId32, actualFee: u128, tip: u128 }>;488 /**489 * Generic event490 **/491 [key: string]: AugmentedEvent<ApiType>;492 };493 treasury: {494 /**495 * Some funds have been allocated.496 **/497 Awarded: AugmentedEvent<ApiType, [proposalIndex: u32, award: u128, account: AccountId32], { proposalIndex: u32, award: u128, account: AccountId32 }>;498 /**499 * Some of our funds have been burnt.500 **/501 Burnt: AugmentedEvent<ApiType, [burntFunds: u128], { burntFunds: u128 }>;502 /**503 * Some funds have been deposited.504 **/505 Deposit: AugmentedEvent<ApiType, [value: u128], { value: u128 }>;506 /**507 * New proposal.508 **/509 Proposed: AugmentedEvent<ApiType, [proposalIndex: u32], { proposalIndex: u32 }>;510 /**511 * A proposal was rejected; funds were slashed.512 **/513 Rejected: AugmentedEvent<ApiType, [proposalIndex: u32, slashed: u128], { proposalIndex: u32, slashed: u128 }>;514 /**515 * Spending has finished; this is the amount that rolls over until next spend.516 **/517 Rollover: AugmentedEvent<ApiType, [rolloverBalance: u128], { rolloverBalance: u128 }>;518 /**519 * A new spend proposal has been approved.520 **/521 SpendApproved: AugmentedEvent<ApiType, [proposalIndex: u32, amount: u128, beneficiary: AccountId32], { proposalIndex: u32, amount: u128, beneficiary: AccountId32 }>;522 /**523 * We have ended a spend period and will now allocate funds.524 **/525 Spending: AugmentedEvent<ApiType, [budgetRemaining: u128], { budgetRemaining: u128 }>;526 /**527 * Generic event528 **/529 [key: string]: AugmentedEvent<ApiType>;530 };531 unique: {532 /**533 * Address was added to the allow list534 * 535 * # Arguments536 * * collection_id: ID of the affected collection.537 * * user: Address of the added account.538 **/539 AllowListAddressAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;540 /**541 * Address was removed from the allow list542 * 543 * # Arguments544 * * collection_id: ID of the affected collection.545 * * user: Address of the removed account.546 **/547 AllowListAddressRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;548 /**549 * Collection admin was added550 * 551 * # Arguments552 * * collection_id: ID of the affected collection.553 * * admin: Admin address.554 **/555 CollectionAdminAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;556 /**557 * Collection admin was removed558 * 559 * # Arguments560 * * collection_id: ID of the affected collection.561 * * admin: Removed admin address.562 **/563 CollectionAdminRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;564 /**565 * Collection limits were set566 * 567 * # Arguments568 * * collection_id: ID of the affected collection.569 **/570 CollectionLimitSet: AugmentedEvent<ApiType, [u32]>;571 /**572 * Collection owned was changed573 * 574 * # Arguments575 * * collection_id: ID of the affected collection.576 * * owner: New owner address.577 **/578 CollectionOwnedChanged: AugmentedEvent<ApiType, [u32, AccountId32]>;579 /**580 * Collection permissions were set581 * 582 * # Arguments583 * * collection_id: ID of the affected collection.584 **/585 CollectionPermissionSet: AugmentedEvent<ApiType, [u32]>;586 /**587 * Collection sponsor was removed588 * 589 * # Arguments590 * * collection_id: ID of the affected collection.591 **/592 CollectionSponsorRemoved: AugmentedEvent<ApiType, [u32]>;593 /**594 * Collection sponsor was set595 * 596 * # Arguments597 * * collection_id: ID of the affected collection.598 * * owner: New sponsor address.599 **/600 CollectionSponsorSet: AugmentedEvent<ApiType, [u32, AccountId32]>;601 /**602 * New sponsor was confirm603 * 604 * # Arguments605 * * collection_id: ID of the affected collection.606 * * sponsor: New sponsor address.607 **/608 SponsorshipConfirmed: AugmentedEvent<ApiType, [u32, AccountId32]>;609 /**610 * Generic event611 **/612 [key: string]: AugmentedEvent<ApiType>;613 };614 vesting: {615 /**616 * Claimed vesting.617 **/618 Claimed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;619 /**620 * Added new vesting schedule.621 **/622 VestingScheduleAdded: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, vestingSchedule: OrmlVestingVestingSchedule], { from: AccountId32, to: AccountId32, vestingSchedule: OrmlVestingVestingSchedule }>;623 /**624 * Updated vesting schedules.625 **/626 VestingSchedulesUpdated: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;627 /**628 * Generic event629 **/630 [key: string]: AugmentedEvent<ApiType>;631 };632 xcmpQueue: {633 /**634 * Bad XCM format used.635 **/636 BadFormat: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;637 /**638 * Bad XCM version used.639 **/640 BadVersion: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;641 /**642 * Some XCM failed.643 **/644 Fail: AugmentedEvent<ApiType, [messageHash: Option<H256>, error: XcmV2TraitsError, weight: u64], { messageHash: Option<H256>, error: XcmV2TraitsError, weight: u64 }>;645 /**646 * An XCM exceeded the individual message weight budget.647 **/648 OverweightEnqueued: AugmentedEvent<ApiType, [sender: u32, sentAt: u32, index: u64, required: u64], { sender: u32, sentAt: u32, index: u64, required: u64 }>;649 /**650 * An XCM from the overweight queue was executed with the given actual weight used.651 **/652 OverweightServiced: AugmentedEvent<ApiType, [index: u64, used: u64], { index: u64, used: u64 }>;653 /**654 * Some XCM was executed ok.655 **/656 Success: AugmentedEvent<ApiType, [messageHash: Option<H256>, weight: u64], { messageHash: Option<H256>, weight: u64 }>;657 /**658 * An upward message was sent to the relay chain.659 **/660 UpwardMessageSent: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;661 /**662 * An HRMP message was sent to a sibling parachain.663 **/664 XcmpMessageSent: AugmentedEvent<ApiType, [messageHash: Option<H256>], { messageHash: Option<H256> }>;665 /**666 * Generic event667 **/668 [key: string]: AugmentedEvent<ApiType>;669 };670 } // AugmentedEvents671} // declare moduletests/src/interfaces/augment-api-query.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-query.ts
+++ b/tests/src/interfaces/augment-api-query.ts
@@ -36,10 +36,6 @@
* Amount of stakes for an Account
**/
stakesPerAccount: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<u8>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
- /**
- * A block when app-promotion has started .I think this is redundant, because we only need `NextInterestBlock`.
- **/
- startBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
totalStaked: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
tests/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) */