difftreelog
add rpc methods + tests
in: master
17 files changed
client/rpc/src/lib.rsdiffbeforeafterboth--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -262,6 +262,14 @@
#[method(name = "unique_totalStakingLocked")]
fn total_staking_locked(&self, staker: CrossAccountId, at: Option<BlockHash>)
-> Result<String>;
+
+ /// Return the total amount locked by staking tokens.
+ #[method(name = "unique_pendingUnstake")]
+ fn pending_unstake(
+ &self,
+ staker: Option<CrossAccountId>,
+ at: Option<BlockHash>,
+ ) -> Result<String>;
}
mod rmrk_unique_rpc {
@@ -548,6 +556,7 @@
.map(|(b, a)| (b, a.to_string()))
.collect::<Vec<_>>(), unique_api);
pass_method!(total_staking_locked(staker: CrossAccountId) -> String => |v| v.to_string(), unique_api);
+ pass_method!(pending_unstake(staker: Option<CrossAccountId>) -> String => |v| v.to_string(), unique_api);
}
#[allow(deprecated)]
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -63,7 +63,7 @@
use fc_rpc_core::types::FilterPool;
use fc_mapping_sync::{MappingSyncWorker, SyncStrategy};
-use unique_runtime_common::types::{
+use up_common::types::opaque::{
AuraId, RuntimeInstance, AccountId, Balance, Index, Hash, Block, BlockNumber,
};
pallets/app-promotion/src/lib.rsdiffbeforeafterboth--- a/pallets/app-promotion/src/lib.rs
+++ b/pallets/app-promotion/src/lib.rs
@@ -31,12 +31,12 @@
#[cfg(feature = "runtime-benchmarks")]
mod benchmarking;
-pub mod types;
-
#[cfg(test)]
mod tests;
+pub mod types;
+pub mod weights;
-use sp_std::vec::Vec;
+use sp_std::{vec::Vec, iter::Sum};
use codec::EncodeLike;
use pallet_balances::BalanceLock;
pub use types::ExtendedLockableCurrency;
@@ -48,6 +48,9 @@
},
ensure,
};
+
+use weights::WeightInfo;
+
pub use pallet::*;
use pallet_evm::account::CrossAccountId;
use sp_runtime::{
@@ -79,6 +82,9 @@
type TreasuryAccountId: Get<Self::AccountId>;
+ /// Weight information for extrinsics in this pallet.
+ type WeightInfo: WeightInfo;
+
// The block number provider
type BlockNumberProvider: BlockNumberProvider<BlockNumber = Self::BlockNumber>;
@@ -136,6 +142,7 @@
fn on_initialize(current_block: T::BlockNumber) -> Weight
where
<T as frame_system::Config>::BlockNumber: From<u32>,
+ // <<T as pallet::Config>::Currency as Currency<T::AccountId>>::Balance: Sum,
{
PendingUnstake::<T>::iter()
.filter_map(|((staker, block), amount)| {
@@ -172,7 +179,7 @@
#[pallet::call]
impl<T: Config> Pallet<T> {
- #[pallet::weight(0)]
+ #[pallet::weight(T::WeightInfo::set_admin_address())]
pub fn set_admin_address(origin: OriginFor<T>, admin: T::AccountId) -> DispatchResult {
ensure_root(origin)?;
<Admin<T>>::set(Some(admin));
@@ -180,7 +187,7 @@
Ok(())
}
- #[pallet::weight(0)]
+ #[pallet::weight(T::WeightInfo::start_app_promotion())]
pub fn start_app_promotion(
origin: OriginFor<T>,
promotion_start_relay_block: T::BlockNumber,
@@ -201,7 +208,7 @@
Ok(())
}
- #[pallet::weight(0)]
+ #[pallet::weight(T::WeightInfo::stake())]
pub fn stake(staker: OriginFor<T>, amount: BalanceOf<T>) -> DispatchResult {
let staker_id = ensure_signed(staker)?;
@@ -210,10 +217,16 @@
ensure!(balance >= amount, ArithmeticError::Underflow);
- Self::set_lock_unchecked(&staker_id, amount);
+ <<T as Config>::Currency as Currency<T::AccountId>>::ensure_can_withdraw(
+ &staker_id,
+ amount,
+ WithdrawReasons::all(),
+ balance - amount,
+ )?;
+
+ Self::add_lock_balance(&staker_id, amount)?;
- let block_number =
- <T::BlockNumberProvider as BlockNumberProvider>::current_block_number();
+ let block_number = frame_system::Pallet::<T>::block_number();
<Staked<T>>::insert(
(&staker_id, block_number),
@@ -231,7 +244,7 @@
Ok(())
}
- #[pallet::weight(0)]
+ #[pallet::weight(T::WeightInfo::unstake())]
pub fn unstake(staker: OriginFor<T>, amount: BalanceOf<T>) -> DispatchResult {
let staker_id = ensure_signed(staker)?;
@@ -249,7 +262,7 @@
.ok_or(ArithmeticError::Underflow)?,
);
- let block = <T::BlockNumberProvider>::current_block_number() + WEEK.into();
+ let block = frame_system::Pallet::<T>::block_number() + WEEK.into();
<PendingUnstake<T>>::insert(
(&staker_id, block),
<PendingUnstake<T>>::get((&staker_id, block))
@@ -400,8 +413,8 @@
fn add_lock_balance(staker: &T::AccountId, amount: BalanceOf<T>) -> DispatchResult {
Self::get_locked_balance(staker)
- .map(|l| l.amount)
- .and_then(|b| b.checked_add(&amount))
+ .map_or(<BalanceOf<T>>::default(), |l| l.amount)
+ .checked_add(&amount)
.map(|new_lock| Self::set_lock_unchecked(staker, new_lock))
.ok_or(ArithmeticError::Overflow.into())
}
@@ -437,10 +450,11 @@
pub fn total_staked_by_id_per_block(
staker: impl EncodeLike<T::AccountId>,
) -> Option<Vec<(T::BlockNumber, BalanceOf<T>)>> {
- let staked = Staked::<T>::iter_prefix((staker,))
+ let mut staked = Staked::<T>::iter_prefix((staker,))
.into_iter()
.map(|(block, amount)| (block, amount))
.collect::<Vec<_>>();
+ staked.sort_by_key(|(block, _)| *block);
if !staked.is_empty() {
Some(staked)
} else {
@@ -495,3 +509,14 @@
day_rate * base
}
}
+
+impl<T: Config> Pallet<T>
+where
+ <<T as pallet::Config>::Currency as Currency<T::AccountId>>::Balance: Sum,
+{
+ pub fn cross_id_pending_unstake(staker: Option<T::CrossAccountId>) -> BalanceOf<T> {
+ staker.map_or(PendingUnstake::<T>::iter_values().sum(), |s| {
+ PendingUnstake::<T>::iter_prefix_values((s.as_sub(),)).sum()
+ })
+ }
+}
primitives/rpc/src/lib.rsdiffbeforeafterboth--- a/primitives/rpc/src/lib.rs
+++ b/primitives/rpc/src/lib.rs
@@ -129,5 +129,6 @@
fn total_staked(staker: Option<CrossAccountId>) -> Result<u128>;
fn total_staked_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>>;
fn total_staking_locked(staker: CrossAccountId) -> Result<u128>;
+ fn pending_unstake(staker: Option<CrossAccountId>) -> Result<u128>;
}
}
runtime/common/config/pallets/app_promotion.rsdiffbeforeafterboth--- /dev/null
+++ b/runtime/common/config/pallets/app_promotion.rs
@@ -0,0 +1,27 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+use crate::{
+ runtime_common::config::pallets::{TreasuryAccountId, RelayChainBlockNumberProvider},
+ Runtime, Balances,
+};
+
+impl pallet_app_promotion::Config for Runtime {
+ type Currency = Balances;
+ type WeightInfo = pallet_app_promotion::weights::SubstrateWeight<Self>;
+ type TreasuryAccountId = TreasuryAccountId;
+ type BlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;
+}
runtime/common/config/pallets/mod.rsdiffbeforeafterboth--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -40,6 +40,9 @@
#[cfg(feature = "scheduler")]
pub mod scheduler;
+#[cfg(feature = "app-promotion")]
+pub mod app_promotion;
+
parameter_types! {
pub TreasuryAccountId: AccountId = TreasuryModuleId::get().into_account_truncating();
pub const CollectionCreationPrice: Balance = 2 * UNIQUE;
runtime/common/construct_runtime/mod.rsdiffbeforeafterboth--- a/runtime/common/construct_runtime/mod.rs
+++ b/runtime/common/construct_runtime/mod.rs
@@ -77,6 +77,9 @@
#[runtimes(opal)]
RmrkEquip: pallet_proxy_rmrk_equip::{Pallet, Call, Storage, Event<T>} = 72,
+ #[runtimes(opal)]
+ Promotion: pallet_app_promotion::{Pallet, Call, Storage} = 73,
+
// Frontier
EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,
Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 101,
runtime/common/runtime_apis.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617#[macro_export]18macro_rules! dispatch_unique_runtime {19 ($collection:ident.$method:ident($($name:ident),*)) => {{20 let collection = <Runtime as pallet_common::Config>::CollectionDispatch::dispatch(<pallet_common::CollectionHandle<Runtime>>::try_get($collection)?);21 let dispatch = collection.as_dyn();2223 Ok::<_, DispatchError>(dispatch.$method($($name),*))24 }};25}2627#[macro_export]28macro_rules! impl_common_runtime_apis {29 (30 $(31 #![custom_apis]3233 $($custom_apis:tt)+34 )?35 ) => {36 use sp_std::prelude::*;37 use sp_api::impl_runtime_apis;38 use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H256, U256, H160};39 use sp_runtime::{40 Permill,41 traits::Block as BlockT,42 transaction_validity::{TransactionSource, TransactionValidity},43 ApplyExtrinsicResult, DispatchError,44 };45 use fp_rpc::TransactionStatus;46 use pallet_transaction_payment::{47 FeeDetails, RuntimeDispatchInfo,48 };49 use pallet_evm::{50 Runner, account::CrossAccountId as _,51 Account as EVMAccount, FeeCalculator,52 };53 use runtime_common::{54 sponsoring::{SponsorshipPredict, UniqueSponsorshipPredict},55 dispatch::CollectionDispatch,56 config::ethereum::CrossAccountId,57 };58 use up_data_structs::*;596061 impl_runtime_apis! {62 $($($custom_apis)+)?6364 impl up_rpc::UniqueApi<Block, BlockNumber, CrossAccountId, AccountId> for Runtime {65 fn account_tokens(collection: CollectionId, account: CrossAccountId) -> Result<Vec<TokenId>, DispatchError> {66 dispatch_unique_runtime!(collection.account_tokens(account))67 }68 fn collection_tokens(collection: CollectionId) -> Result<Vec<TokenId>, DispatchError> {69 dispatch_unique_runtime!(collection.collection_tokens())70 }71 fn token_exists(collection: CollectionId, token: TokenId) -> Result<bool, DispatchError> {72 dispatch_unique_runtime!(collection.token_exists(token))73 }7475 fn token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>, DispatchError> {76 dispatch_unique_runtime!(collection.token_owner(token))77 }7879 fn token_owners(collection: CollectionId, token: TokenId) -> Result<Vec::<CrossAccountId>, DispatchError> {80 dispatch_unique_runtime!(collection.token_owners(token))81 }8283 fn topmost_token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>, DispatchError> {84 let budget = up_data_structs::budget::Value::new(10);8586 Ok(Some(<pallet_structure::Pallet<Runtime>>::find_topmost_owner(collection, token, &budget)?))87 }88 fn token_children(collection: CollectionId, token: TokenId) -> Result<Vec<TokenChild>, DispatchError> {89 Ok(<pallet_nonfungible::Pallet<Runtime>>::token_children_ids(collection, token))90 }91 fn collection_properties(92 collection: CollectionId,93 keys: Option<Vec<Vec<u8>>>94 ) -> Result<Vec<Property>, DispatchError> {95 let keys = keys.map(96 |keys| Common::bytes_keys_to_property_keys(keys)97 ).transpose()?;9899 Common::filter_collection_properties(collection, keys)100 }101102 fn token_properties(103 collection: CollectionId,104 token_id: TokenId,105 keys: Option<Vec<Vec<u8>>>106 ) -> Result<Vec<Property>, DispatchError> {107 let keys = keys.map(108 |keys| Common::bytes_keys_to_property_keys(keys)109 ).transpose()?;110111 dispatch_unique_runtime!(collection.token_properties(token_id, keys))112 }113114 fn property_permissions(115 collection: CollectionId,116 keys: Option<Vec<Vec<u8>>>117 ) -> Result<Vec<PropertyKeyPermission>, DispatchError> {118 let keys = keys.map(119 |keys| Common::bytes_keys_to_property_keys(keys)120 ).transpose()?;121122 Common::filter_property_permissions(collection, keys)123 }124125 fn token_data(126 collection: CollectionId,127 token_id: TokenId,128 keys: Option<Vec<Vec<u8>>>129 ) -> Result<TokenData<CrossAccountId>, DispatchError> {130 let token_data = TokenData {131 properties: Self::token_properties(collection, token_id, keys)?,132 owner: Self::token_owner(collection, token_id)?,133 pieces: Self::total_pieces(collection, token_id)?.unwrap_or(0),134 };135136 Ok(token_data)137 }138139 fn total_supply(collection: CollectionId) -> Result<u32, DispatchError> {140 dispatch_unique_runtime!(collection.total_supply())141 }142 fn account_balance(collection: CollectionId, account: CrossAccountId) -> Result<u32, DispatchError> {143 dispatch_unique_runtime!(collection.account_balance(account))144 }145 fn balance(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<u128, DispatchError> {146 dispatch_unique_runtime!(collection.balance(account, token))147 }148 fn allowance(149 collection: CollectionId,150 sender: CrossAccountId,151 spender: CrossAccountId,152 token: TokenId,153 ) -> Result<u128, DispatchError> {154 dispatch_unique_runtime!(collection.allowance(sender, spender, token))155 }156157 fn adminlist(collection: CollectionId) -> Result<Vec<CrossAccountId>, DispatchError> {158 Ok(<pallet_common::Pallet<Runtime>>::adminlist(collection))159 }160 fn allowlist(collection: CollectionId) -> Result<Vec<CrossAccountId>, DispatchError> {161 Ok(<pallet_common::Pallet<Runtime>>::allowlist(collection))162 }163 fn allowed(collection: CollectionId, user: CrossAccountId) -> Result<bool, DispatchError> {164 Ok(<pallet_common::Pallet<Runtime>>::allowed(collection, user))165 }166 fn last_token_id(collection: CollectionId) -> Result<TokenId, DispatchError> {167 dispatch_unique_runtime!(collection.last_token_id())168 }169 fn collection_by_id(collection: CollectionId) -> Result<Option<RpcCollection<AccountId>>, DispatchError> {170 Ok(<pallet_common::Pallet<Runtime>>::rpc_collection(collection))171 }172 fn collection_stats() -> Result<CollectionStats, DispatchError> {173 Ok(<pallet_common::Pallet<Runtime>>::collection_stats())174 }175 fn next_sponsored(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<Option<u64>, DispatchError> {176 Ok(<UniqueSponsorshipPredict<Runtime> as SponsorshipPredict<Runtime>>::predict(177 collection,178 account,179 token180 ))181 }182183 fn effective_collection_limits(collection: CollectionId) -> Result<Option<CollectionLimits>, DispatchError> {184 Ok(<pallet_common::Pallet<Runtime>>::effective_collection_limits(collection))185 }186187 fn total_pieces(collection: CollectionId, token_id: TokenId) -> Result<Option<u128>, DispatchError> {188 dispatch_unique_runtime!(collection.total_pieces(token_id))189 }190191 fn total_staked(staker: Option<CrossAccountId>) -> Result<u128, DispatchError> {192 Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked(staker).unwrap_or_default())193 // Ok(0)194 }195196 fn total_staked_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>, DispatchError> {197 Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked_per_block(staker))198 }199200 fn total_staking_locked(staker: CrossAccountId) -> Result<u128, DispatchError> {201 // Ok(0)202 Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_locked_balance(staker))203 }204 }205206 impl rmrk_rpc::RmrkApi<207 Block,208 AccountId,209 RmrkCollectionInfo<AccountId>,210 RmrkInstanceInfo<AccountId>,211 RmrkResourceInfo,212 RmrkPropertyInfo,213 RmrkBaseInfo<AccountId>,214 RmrkPartType,215 RmrkTheme216 > for Runtime {217 fn last_collection_idx() -> Result<RmrkCollectionId, DispatchError> {218 #[cfg(feature = "rmrk")]219 return pallet_proxy_rmrk_core::rpc::last_collection_idx::<Runtime>();220221 #[cfg(not(feature = "rmrk"))]222 return unsupported!();223 }224225 #[allow(unused_variables)]226 fn collection_by_id(collection_id: RmrkCollectionId) -> Result<Option<RmrkCollectionInfo<AccountId>>, DispatchError> {227 #[cfg(feature = "rmrk")]228 return pallet_proxy_rmrk_core::rpc::collection_by_id::<Runtime>(collection_id);229230 #[cfg(not(feature = "rmrk"))]231 return unsupported!();232 }233234 #[allow(unused_variables)]235 fn nft_by_id(collection_id: RmrkCollectionId, nft_by_id: RmrkNftId) -> Result<Option<RmrkInstanceInfo<AccountId>>, DispatchError> {236 #[cfg(feature = "rmrk")]237 return pallet_proxy_rmrk_core::rpc::nft_by_id::<Runtime>(collection_id, nft_by_id);238239 #[cfg(not(feature = "rmrk"))]240 return unsupported!();241 }242243 #[allow(unused_variables)]244 fn account_tokens(account_id: AccountId, collection_id: RmrkCollectionId) -> Result<Vec<RmrkNftId>, DispatchError> {245 #[cfg(feature = "rmrk")]246 return pallet_proxy_rmrk_core::rpc::account_tokens::<Runtime>(account_id, collection_id);247248 #[cfg(not(feature = "rmrk"))]249 return unsupported!();250 }251252 #[allow(unused_variables)]253 fn nft_children(collection_id: RmrkCollectionId, nft_id: RmrkNftId) -> Result<Vec<RmrkNftChild>, DispatchError> {254 #[cfg(feature = "rmrk")]255 return pallet_proxy_rmrk_core::rpc::nft_children::<Runtime>(collection_id, nft_id);256257 #[cfg(not(feature = "rmrk"))]258 return unsupported!();259 }260261 #[allow(unused_variables)]262 fn collection_properties(263 collection_id: RmrkCollectionId,264 filter_keys: Option<Vec<RmrkPropertyKey>>265 ) -> Result<Vec<RmrkPropertyInfo>, DispatchError> {266 #[cfg(feature = "rmrk")]267 return pallet_proxy_rmrk_core::rpc::collection_properties::<Runtime>(collection_id, filter_keys);268269 #[cfg(not(feature = "rmrk"))]270 return unsupported!();271 }272273 #[allow(unused_variables)]274 fn nft_properties(275 collection_id: RmrkCollectionId,276 nft_id: RmrkNftId,277 filter_keys: Option<Vec<RmrkPropertyKey>>278 ) -> Result<Vec<RmrkPropertyInfo>, DispatchError> {279 #[cfg(feature = "rmrk")]280 return pallet_proxy_rmrk_core::rpc::nft_properties::<Runtime>(collection_id, nft_id, filter_keys);281282 #[cfg(not(feature = "rmrk"))]283 return unsupported!();284 }285286 #[allow(unused_variables)]287 fn nft_resources(collection_id: RmrkCollectionId,nft_id: RmrkNftId) -> Result<Vec<RmrkResourceInfo>, DispatchError> {288 #[cfg(feature = "rmrk")]289 return pallet_proxy_rmrk_core::rpc::nft_resources::<Runtime>(collection_id, nft_id);290291 #[cfg(not(feature = "rmrk"))]292 return unsupported!();293 }294295 #[allow(unused_variables)]296 fn nft_resource_priority(297 collection_id: RmrkCollectionId,298 nft_id: RmrkNftId,299 resource_id: RmrkResourceId300 ) -> Result<Option<u32>, DispatchError> {301 #[cfg(feature = "rmrk")]302 return pallet_proxy_rmrk_core::rpc::nft_resource_priority::<Runtime>(collection_id, nft_id, resource_id);303304 #[cfg(not(feature = "rmrk"))]305 return unsupported!();306 }307308 #[allow(unused_variables)]309 fn base(base_id: RmrkBaseId) -> Result<Option<RmrkBaseInfo<AccountId>>, DispatchError> {310 #[cfg(feature = "rmrk")]311 return pallet_proxy_rmrk_equip::rpc::base::<Runtime>(base_id);312313 #[cfg(not(feature = "rmrk"))]314 return unsupported!();315 }316317 #[allow(unused_variables)]318 fn base_parts(base_id: RmrkBaseId) -> Result<Vec<RmrkPartType>, DispatchError> {319 #[cfg(feature = "rmrk")]320 return pallet_proxy_rmrk_equip::rpc::base_parts::<Runtime>(base_id);321322 #[cfg(not(feature = "rmrk"))]323 return unsupported!();324 }325326 #[allow(unused_variables)]327 fn theme_names(base_id: RmrkBaseId) -> Result<Vec<RmrkThemeName>, DispatchError> {328 #[cfg(feature = "rmrk")]329 return pallet_proxy_rmrk_equip::rpc::theme_names::<Runtime>(base_id);330331 #[cfg(not(feature = "rmrk"))]332 return unsupported!();333 }334335 #[allow(unused_variables)]336 fn theme(337 base_id: RmrkBaseId,338 theme_name: RmrkThemeName,339 filter_keys: Option<Vec<RmrkPropertyKey>>340 ) -> Result<Option<RmrkTheme>, DispatchError> {341 #[cfg(feature = "rmrk")]342 return pallet_proxy_rmrk_equip::rpc::theme::<Runtime>(base_id, theme_name, filter_keys);343344 #[cfg(not(feature = "rmrk"))]345 return unsupported!();346 }347 }348349 impl sp_api::Core<Block> for Runtime {350 fn version() -> RuntimeVersion {351 VERSION352 }353354 fn execute_block(block: Block) {355 Executive::execute_block(block)356 }357358 fn initialize_block(header: &<Block as BlockT>::Header) {359 Executive::initialize_block(header)360 }361 }362363 impl sp_api::Metadata<Block> for Runtime {364 fn metadata() -> OpaqueMetadata {365 OpaqueMetadata::new(Runtime::metadata().into())366 }367 }368369 impl sp_block_builder::BlockBuilder<Block> for Runtime {370 fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {371 Executive::apply_extrinsic(extrinsic)372 }373374 fn finalize_block() -> <Block as BlockT>::Header {375 Executive::finalize_block()376 }377378 fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {379 data.create_extrinsics()380 }381382 fn check_inherents(383 block: Block,384 data: sp_inherents::InherentData,385 ) -> sp_inherents::CheckInherentsResult {386 data.check_extrinsics(&block)387 }388389 // fn random_seed() -> <Block as BlockT>::Hash {390 // RandomnessCollectiveFlip::random_seed().0391 // }392 }393394 impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {395 fn validate_transaction(396 source: TransactionSource,397 tx: <Block as BlockT>::Extrinsic,398 hash: <Block as BlockT>::Hash,399 ) -> TransactionValidity {400 Executive::validate_transaction(source, tx, hash)401 }402 }403404 impl sp_offchain::OffchainWorkerApi<Block> for Runtime {405 fn offchain_worker(header: &<Block as BlockT>::Header) {406 Executive::offchain_worker(header)407 }408 }409410 impl fp_rpc::EthereumRuntimeRPCApi<Block> for Runtime {411 fn chain_id() -> u64 {412 <Runtime as pallet_evm::Config>::ChainId::get()413 }414415 fn account_basic(address: H160) -> EVMAccount {416 let (account, _) = EVM::account_basic(&address);417 account418 }419420 fn gas_price() -> U256 {421 let (price, _) = <Runtime as pallet_evm::Config>::FeeCalculator::min_gas_price();422 price423 }424425 fn account_code_at(address: H160) -> Vec<u8> {426 EVM::account_codes(address)427 }428429 fn author() -> H160 {430 <pallet_evm::Pallet<Runtime>>::find_author()431 }432433 fn storage_at(address: H160, index: U256) -> H256 {434 let mut tmp = [0u8; 32];435 index.to_big_endian(&mut tmp);436 EVM::account_storages(address, H256::from_slice(&tmp[..]))437 }438439 #[allow(clippy::redundant_closure)]440 fn call(441 from: H160,442 to: H160,443 data: Vec<u8>,444 value: U256,445 gas_limit: U256,446 max_fee_per_gas: Option<U256>,447 max_priority_fee_per_gas: Option<U256>,448 nonce: Option<U256>,449 estimate: bool,450 access_list: Option<Vec<(H160, Vec<H256>)>>,451 ) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {452 let config = if estimate {453 let mut config = <Runtime as pallet_evm::Config>::config().clone();454 config.estimate = true;455 Some(config)456 } else {457 None458 };459460 let is_transactional = false;461 <Runtime as pallet_evm::Config>::Runner::call(462 CrossAccountId::from_eth(from),463 to,464 data,465 value,466 gas_limit.low_u64(),467 max_fee_per_gas,468 max_priority_fee_per_gas,469 nonce,470 access_list.unwrap_or_default(),471 is_transactional,472 config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),473 ).map_err(|err| err.error.into())474 }475476 #[allow(clippy::redundant_closure)]477 fn create(478 from: H160,479 data: Vec<u8>,480 value: U256,481 gas_limit: U256,482 max_fee_per_gas: Option<U256>,483 max_priority_fee_per_gas: Option<U256>,484 nonce: Option<U256>,485 estimate: bool,486 access_list: Option<Vec<(H160, Vec<H256>)>>,487 ) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {488 let config = if estimate {489 let mut config = <Runtime as pallet_evm::Config>::config().clone();490 config.estimate = true;491 Some(config)492 } else {493 None494 };495496 let is_transactional = false;497 <Runtime as pallet_evm::Config>::Runner::create(498 CrossAccountId::from_eth(from),499 data,500 value,501 gas_limit.low_u64(),502 max_fee_per_gas,503 max_priority_fee_per_gas,504 nonce,505 access_list.unwrap_or_default(),506 is_transactional,507 config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),508 ).map_err(|err| err.error.into())509 }510511 fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {512 Ethereum::current_transaction_statuses()513 }514515 fn current_block() -> Option<pallet_ethereum::Block> {516 Ethereum::current_block()517 }518519 fn current_receipts() -> Option<Vec<pallet_ethereum::Receipt>> {520 Ethereum::current_receipts()521 }522523 fn current_all() -> (524 Option<pallet_ethereum::Block>,525 Option<Vec<pallet_ethereum::Receipt>>,526 Option<Vec<TransactionStatus>>527 ) {528 (529 Ethereum::current_block(),530 Ethereum::current_receipts(),531 Ethereum::current_transaction_statuses()532 )533 }534535 fn extrinsic_filter(xts: Vec<<Block as sp_api::BlockT>::Extrinsic>) -> Vec<pallet_ethereum::Transaction> {536 xts.into_iter().filter_map(|xt| match xt.0.function {537 Call::Ethereum(pallet_ethereum::Call::transact { transaction }) => Some(transaction),538 _ => None539 }).collect()540 }541542 fn elasticity() -> Option<Permill> {543 None544 }545 }546547 impl fp_rpc::ConvertTransactionRuntimeApi<Block> for Runtime {548 fn convert_transaction(transaction: pallet_ethereum::Transaction) -> <Block as BlockT>::Extrinsic {549 UncheckedExtrinsic::new_unsigned(550 pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),551 )552 }553 }554555 impl sp_session::SessionKeys<Block> for Runtime {556 fn decode_session_keys(557 encoded: Vec<u8>,558 ) -> Option<Vec<(Vec<u8>, KeyTypeId)>> {559 SessionKeys::decode_into_raw_public_keys(&encoded)560 }561562 fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {563 SessionKeys::generate(seed)564 }565 }566567 impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {568 fn slot_duration() -> sp_consensus_aura::SlotDuration {569 sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration())570 }571572 fn authorities() -> Vec<AuraId> {573 Aura::authorities().to_vec()574 }575 }576577 impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {578 fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {579 ParachainSystem::collect_collation_info(header)580 }581 }582583 impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {584 fn account_nonce(account: AccountId) -> Index {585 System::account_nonce(account)586 }587 }588589 impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {590 fn query_info(uxt: <Block as BlockT>::Extrinsic, len: u32) -> RuntimeDispatchInfo<Balance> {591 TransactionPayment::query_info(uxt, len)592 }593 fn query_fee_details(uxt: <Block as BlockT>::Extrinsic, len: u32) -> FeeDetails<Balance> {594 TransactionPayment::query_fee_details(uxt, len)595 }596 }597598 /*599 impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash>600 for Runtime601 {602 fn call(603 origin: AccountId,604 dest: AccountId,605 value: Balance,606 gas_limit: u64,607 input_data: Vec<u8>,608 ) -> pallet_contracts_primitives::ContractExecResult {609 Contracts::bare_call(origin, dest, value, gas_limit, input_data, false)610 }611612 fn instantiate(613 origin: AccountId,614 endowment: Balance,615 gas_limit: u64,616 code: pallet_contracts_primitives::Code<Hash>,617 data: Vec<u8>,618 salt: Vec<u8>,619 ) -> pallet_contracts_primitives::ContractInstantiateResult<AccountId, BlockNumber>620 {621 Contracts::bare_instantiate(origin, endowment, gas_limit, code, data, salt, true, false)622 }623624 fn get_storage(625 address: AccountId,626 key: [u8; 32],627 ) -> pallet_contracts_primitives::GetStorageResult {628 Contracts::get_storage(address, key)629 }630631 fn rent_projection(632 address: AccountId,633 ) -> pallet_contracts_primitives::RentProjectionResult<BlockNumber> {634 Contracts::rent_projection(address)635 }636 }637 */638639 #[cfg(feature = "runtime-benchmarks")]640 impl frame_benchmarking::Benchmark<Block> for Runtime {641 fn benchmark_metadata(extra: bool) -> (642 Vec<frame_benchmarking::BenchmarkList>,643 Vec<frame_support::traits::StorageInfo>,644 ) {645 use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList};646 use frame_support::traits::StorageInfoTrait;647648 let mut list = Vec::<BenchmarkList>::new();649650 list_benchmark!(list, extra, pallet_evm_migration, EvmMigration);651 list_benchmark!(list, extra, pallet_common, Common);652 list_benchmark!(list, extra, pallet_unique, Unique);653 list_benchmark!(list, extra, pallet_structure, Structure);654 list_benchmark!(list, extra, pallet_inflation, Inflation);655 list_benchmark!(list, extra, pallet_app_promotion, Promotion);656 list_benchmark!(list, extra, pallet_fungible, Fungible);657 list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);658659 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]660 list_benchmark!(list, extra, pallet_refungible, Refungible);661662 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]663 list_benchmark!(list, extra, pallet_unique_scheduler, Scheduler);664665 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]666 list_benchmark!(list, extra, pallet_proxy_rmrk_core, RmrkCore);667668 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]669 list_benchmark!(list, extra, pallet_proxy_rmrk_equip, RmrkEquip);670671 // list_benchmark!(list, extra, pallet_evm_coder_substrate, EvmCoderSubstrate);672673 let storage_info = AllPalletsReversedWithSystemFirst::storage_info();674675 return (list, storage_info)676 }677678 fn dispatch_benchmark(679 config: frame_benchmarking::BenchmarkConfig680 ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {681 use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};682683 let allowlist: Vec<TrackedStorageKey> = vec![684 // Total Issuance685 hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),686687 // Block Number688 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),689 // Execution Phase690 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),691 // Event Count692 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),693 // System Events694 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),695696 // Evm CurrentLogs697 hex_literal::hex!("1da53b775b270400e7e61ed5cbc5a146547f210cec367e9af919603343b9cb56").to_vec().into(),698699 // Transactional depth700 hex_literal::hex!("3a7472616e73616374696f6e5f6c6576656c3a").to_vec().into(),701 ];702703 let mut batches = Vec::<BenchmarkBatch>::new();704 let params = (&config, &allowlist);705706 add_benchmark!(params, batches, pallet_evm_migration, EvmMigration);707 add_benchmark!(params, batches, pallet_common, Common);708 add_benchmark!(params, batches, pallet_unique, Unique);709 add_benchmark!(params, batches, pallet_structure, Structure);710 add_benchmark!(params, batches, pallet_inflation, Inflation);711 add_benchmark!(params, batches, pallet_app_promotion, Promotion);712 add_benchmark!(params, batches, pallet_fungible, Fungible);713 add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);714715 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]716 add_benchmark!(params, batches, pallet_refungible, Refungible);717718 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]719 add_benchmark!(params, batches, pallet_unique_scheduler, Scheduler);720721 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]722 add_benchmark!(params, batches, pallet_proxy_rmrk_core, RmrkCore);723724 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]725 add_benchmark!(params, batches, pallet_proxy_rmrk_equip, RmrkEquip);726727 // add_benchmark!(params, batches, pallet_evm_coder_substrate, EvmCoderSubstrate);728729 if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }730 Ok(batches)731 }732 }733734 #[cfg(feature = "try-runtime")]735 impl frame_try_runtime::TryRuntime<Block> for Runtime {736 fn on_runtime_upgrade() -> (frame_support::pallet_prelude::Weight, frame_support::pallet_prelude::Weight) {737 log::info!("try-runtime::on_runtime_upgrade unique-chain.");738 let weight = Executive::try_runtime_upgrade().unwrap();739 (weight, crate::config::substrate::RuntimeBlockWeights::get().max_block)740 }741742 fn execute_block_no_check(block: Block) -> frame_support::pallet_prelude::Weight {743 Executive::execute_block_no_check(block)744 }745 }746 }747 }748}runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -124,11 +124,12 @@
"orml-vesting/std",
]
limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
-opal-runtime = ['refungible', 'scheduler', 'rmrk']
+opal-runtime = ['refungible', 'scheduler', 'rmrk', 'app-promotion']
refungible = []
scheduler = []
rmrk = []
+app-promotion = []
################################################################################
# Substrate Dependencies
tests/src/app-promotion.test.tsdiffbeforeafterboth--- a/tests/src/app-promotion.test.ts
+++ b/tests/src/app-promotion.test.ts
@@ -15,7 +15,7 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
import {default as usingApi, submitTransactionAsync} from './substrate/substrate-api';
-import {IKeyringPair} from '@polkadot/types/types';
+import {IKeyringPair, ITuple} from '@polkadot/types/types';
import {
createMultipleItemsExpectSuccess,
@@ -33,26 +33,38 @@
U128_MAX,
burnFromExpectSuccess,
UNIQUE,
+ getModuleNames,
+ Pallets,
+ getBlockNumber,
} from './util/helpers';
-import chai from 'chai';
+import chai, {use} from 'chai';
import chaiAsPromised from 'chai-as-promised';
-import getBalance from './substrate/get-balance';
-import { unique } from './interfaces/definitions';
+import getBalance, {getBalanceSingle} from './substrate/get-balance';
+import {unique} from './interfaces/definitions';
+import {usingPlaygrounds} from './util/playgrounds';
+import {default as waitNewBlocks} from './substrate/wait-new-blocks';
+
+import BN from 'bn.js';
+import {mnemonicGenerate} from '@polkadot/util-crypto';
+import {UniqueHelper} from './util/playgrounds/unique';
chai.use(chaiAsPromised);
const expect = chai.expect;
let alice: IKeyringPair;
let bob: IKeyringPair;
let palletAdmin: IKeyringPair;
+let nominal: bigint;
describe('integration test: AppPromotion', () => {
- before(async () => {
- await usingApi(async (api, privateKeyWrapper) => {
+ before(async function() {
+ await usingPlaygrounds(async (helper, privateKeyWrapper) => {
+ if (!getModuleNames(helper.api!).includes(Pallets.AppPromotion)) this.skip();
alice = privateKeyWrapper('//Alice');
bob = privateKeyWrapper('//Bob');
palletAdmin = privateKeyWrapper('//palletAdmin');
- const tx = api.tx.sudo.sudo(api.tx.promotion.setAdminAddress(palletAdmin.addressRaw));
+ const tx = helper.api!.tx.sudo.sudo(helper.api!.tx.promotion.setAdminAddress(palletAdmin.addressRaw));
+ nominal = helper.balance.getOneTokenNominal();
await submitTransactionAsync(alice, tx);
});
});
@@ -69,22 +81,110 @@
// assert: query appPromotion.staked(Alice) equal [100, 200]
// assert: query appPromotion.totalStaked() increased by 200
- await usingApi(async (api, privateKeyWrapper) => {
- await submitTransactionAsync(alice, api.tx.balances.transfer(bob.addressRaw, 10n * UNIQUE));
- const [alicesBalanceBefore, bobsBalanceBefore] = await getBalance(api, [alice.address, bob.address]);
+ await usingPlaygrounds(async (helper, privateKeyWrapper) => {
+ const totalStakedBefore = (await helper.api!.rpc.unique.totalStaked()).toBigInt();
+ const staker = await createUser();
+
+ const firstStakedBlock = await helper.chain.getLatestBlockNumber();
+
+ await expect(submitTransactionAsync(staker, helper.api!.tx.promotion.stake(1n * nominal))).to.be.eventually.fulfilled;
+ expect((await helper.api!.rpc.unique.totalStakingLocked(normalizeAccountId(staker))).toBigInt()).to.be.equal(nominal);
+ expect(9n * nominal - await helper.balance.getSubstrate(staker.address) <= nominal / 2n).to.be.true;
+ expect((await helper.api!.rpc.unique.totalStaked(normalizeAccountId(staker))).toBigInt()).to.be.equal(nominal);
+ expect((await helper.api!.rpc.unique.totalStaked()).toBigInt()).to.be.equal(totalStakedBefore + nominal);
- console.log(`alice: ${alicesBalanceBefore} \n bob: ${bobsBalanceBefore}`);
+ await waitNewBlocks(helper.api!, 1);
+ const secondStakedBlock = await helper.chain.getLatestBlockNumber();
- await submitTransactionAsync(alice, api.tx.promotion.stake(1n * UNIQUE));
- await submitTransactionAsync(bob, api.tx.promotion.stake(1n * UNIQUE));
- const alice_total_staked = (await (api.rpc.unique.totalStaked(normalizeAccountId(alice)))).toBigInt();
- const bob_total_staked = (await api.rpc.unique.totalStaked(normalizeAccountId(bob))).toBigInt();
-
- console.log(`alice staked: ${alice_total_staked} \n bob staked: ${bob_total_staked}, total staked: ${(await api.rpc.unique.totalStaked()).toBigInt()}`);
+ await expect(submitTransactionAsync(staker, helper.api!.tx.promotion.stake(2n * nominal))).to.be.eventually.fulfilled;
+ expect((await helper.api!.rpc.unique.totalStakingLocked(normalizeAccountId(staker))).toBigInt()).to.be.equal(3n * nominal);
+
+ const stakedPerBlock = (await helper.api!.rpc.unique.totalStakedPerBlock(normalizeAccountId(staker))).map(([block, amount]) => [block.toBigInt(), amount.toBigInt()]);
+ expect(stakedPerBlock.map((x) => x[1])).to.be.deep.equal([nominal, 2n * nominal]);
+ });
+ });
+
+ it('will throws if stake amount is more than total free balance', async () => {
+ // arrange: Alice balance = 1000
+ // assert: Alice calls appPromotion.stake(1000) throws /// because Alice needs some fee
+
+ // act: Alice calls appPromotion.stake(700)
+ // assert: Alice calls appPromotion.stake(400) throws /// because Alice has ~300 free QTZ and 700 locked
+
+ await usingPlaygrounds(async helper => {
+ const staker = await createUser();
+ await expect(submitTransactionAsync(staker, helper.api!.tx.promotion.stake(10n * nominal))).to.be.eventually.rejected;
+ await expect(submitTransactionAsync(staker, helper.api!.tx.promotion.stake(7n * nominal))).to.be.eventually.fulfilled;
+ await expect(submitTransactionAsync(staker, helper.api!.tx.promotion.stake(4n * nominal))).to.be.eventually.rejected;
});
});
+
+ it.skip('for different accounts in one block is possible', async () => {
+ // arrange: Alice, Bob, Charlie, Dave balance = 1000
+ // arrange: Alice, Bob, Charlie, Dave calls appPromotion.stake(100) in the same time
+
+ // assert: query appPromotion.staked(Alice/Bob/Charlie/Dave) equal [100]
+ await usingPlaygrounds(async helper => {
+ const crowd = await creteAccounts([10n, 10n, 10n, 10n], alice, helper);
+ // const promises = crowd.map(async user => submitTransactionAsync(user, helper.api!.tx.promotion.stake(nominal)));
+ // await expect(Promise.all(promises)).to.be.eventually.fulfilled;
+ });
+ });
+
+});
+
+describe.skip('unstake balance extrinsic', () => {
+ before(async function() {
+ await usingPlaygrounds(async (helper, privateKeyWrapper) => {
+ if (!getModuleNames(helper.api!).includes(Pallets.AppPromotion)) this.skip();
+ alice = privateKeyWrapper('//Alice');
+ bob = privateKeyWrapper('//Bob');
+ palletAdmin = privateKeyWrapper('//palletAdmin');
+ const tx = helper.api!.tx.sudo.sudo(helper.api!.tx.promotion.setAdminAddress(palletAdmin.addressRaw));
+ nominal = helper.balance.getOneTokenNominal();
+ await submitTransactionAsync(alice, tx);
+ });
+ });
+ it('will change balance state to "reserved", add it to "pendingUnstake" map, and subtract it from totalStaked', async () => {
+ // arrange: Alice balance = 1000
+ // arrange: Alice calls appPromotion.stake(Alice, 500)
+
+ // act: Alice calls appPromotion.unstake(300)
+ // assert: Alice reserved balance to equal 300
+ // assert: query appPromotion.staked(Alice) equal [200] /// 500 - 300
+ // assert: query appPromotion.pendingUnstake(Alice) to equal [300]
+ // assert: query appPromotion.totalStaked() decreased by 300
+ });
+});
+
+
+
+async function createUser(amount?: bigint) {
+ return await usingPlaygrounds(async (helper, privateKeyWrapper) => {
+ const user: IKeyringPair = privateKeyWrapper(`//Alice+${(new Date()).getTime()}`);
+ await helper.balance.transferToSubstrate(alice, user.address, amount ? amount : 10n * helper.balance.getOneTokenNominal());
+ return user;
+ });
+}
+
+const creteAccounts = async (balances: bigint[], donor: IKeyringPair, helper: UniqueHelper) => {
+ let nonce = await helper.chain.getNonce(donor.address);
+ const tokenNominal = helper.balance.getOneTokenNominal();
+ const transactions = [];
+ const accounts = [];
+ for (const balance of balances) {
+ const recepient = helper.util.fromSeed(mnemonicGenerate());
+ accounts.push(recepient);
+ if (balance !== 0n){
+ const tx = helper.constructApiCall('api.tx.balances.transfer', [{Id: recepient.address}, balance * tokenNominal]);
+ transactions.push(helper.signTransaction(donor, tx, 'account generation', {nonce}));
+ nonce++;
+ }
+ }
-});
\ No newline at end of file
+ await Promise.all(transactions);
+ return accounts;
+};
\ No newline at end of file
tests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-rpc.ts
+++ b/tests/src/interfaces/augment-api-rpc.ts
@@ -703,6 +703,10 @@
**/
nextSponsored: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<u64>>>;
/**
+ * Returns the total amount of unstaked tokens
+ **/
+ pendingUnstake: AugmentedRpc<(staker?: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;
+ /**
* Get property permissions, optionally limited to the provided keys
**/
propertyPermissions: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsPropertyKeyPermission>>>;
tests/src/interfaces/lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/lookup.ts
+++ b/tests/src/interfaces/lookup.ts
@@ -5,1266 +5,8 @@
export default {
/**
- * Lookup3: frame_system::AccountInfo<Index, pallet_balances::AccountData<Balance>>
- **/
- FrameSystemAccountInfo: {
- nonce: 'u32',
- consumers: 'u32',
- providers: 'u32',
- sufficients: 'u32',
- data: 'PalletBalancesAccountData'
- },
- /**
- * Lookup5: pallet_balances::AccountData<Balance>
- **/
- PalletBalancesAccountData: {
- free: 'u128',
- reserved: 'u128',
- miscFrozen: 'u128',
- feeFrozen: 'u128'
- },
- /**
- * Lookup7: frame_support::weights::PerDispatchClass<T>
- **/
- FrameSupportWeightsPerDispatchClassU64: {
- normal: 'u64',
- operational: 'u64',
- mandatory: 'u64'
- },
- /**
- * Lookup11: sp_runtime::generic::digest::Digest
- **/
- SpRuntimeDigest: {
- logs: 'Vec<SpRuntimeDigestDigestItem>'
- },
- /**
- * Lookup13: sp_runtime::generic::digest::DigestItem
- **/
- SpRuntimeDigestDigestItem: {
- _enum: {
- Other: 'Bytes',
- __Unused1: 'Null',
- __Unused2: 'Null',
- __Unused3: 'Null',
- Consensus: '([u8;4],Bytes)',
- Seal: '([u8;4],Bytes)',
- PreRuntime: '([u8;4],Bytes)',
- __Unused7: 'Null',
- RuntimeEnvironmentUpdated: 'Null'
- }
- },
- /**
- * Lookup16: frame_system::EventRecord<opal_runtime::Event, primitive_types::H256>
- **/
- FrameSystemEventRecord: {
- phase: 'FrameSystemPhase',
- event: 'Event',
- topics: 'Vec<H256>'
- },
- /**
- * Lookup18: frame_system::pallet::Event<T>
- **/
- FrameSystemEvent: {
- _enum: {
- ExtrinsicSuccess: {
- dispatchInfo: 'FrameSupportWeightsDispatchInfo',
- },
- ExtrinsicFailed: {
- dispatchError: 'SpRuntimeDispatchError',
- dispatchInfo: 'FrameSupportWeightsDispatchInfo',
- },
- CodeUpdated: 'Null',
- NewAccount: {
- account: 'AccountId32',
- },
- KilledAccount: {
- account: 'AccountId32',
- },
- Remarked: {
- _alias: {
- hash_: 'hash',
- },
- sender: 'AccountId32',
- hash_: 'H256'
- }
- }
- },
- /**
- * Lookup19: frame_support::weights::DispatchInfo
- **/
- FrameSupportWeightsDispatchInfo: {
- weight: 'u64',
- class: 'FrameSupportWeightsDispatchClass',
- paysFee: 'FrameSupportWeightsPays'
- },
- /**
- * Lookup20: frame_support::weights::DispatchClass
- **/
- FrameSupportWeightsDispatchClass: {
- _enum: ['Normal', 'Operational', 'Mandatory']
- },
- /**
- * Lookup21: frame_support::weights::Pays
- **/
- FrameSupportWeightsPays: {
- _enum: ['Yes', 'No']
- },
- /**
- * Lookup22: sp_runtime::DispatchError
- **/
- SpRuntimeDispatchError: {
- _enum: {
- Other: 'Null',
- CannotLookup: 'Null',
- BadOrigin: 'Null',
- Module: 'SpRuntimeModuleError',
- ConsumerRemaining: 'Null',
- NoProviders: 'Null',
- TooManyConsumers: 'Null',
- Token: 'SpRuntimeTokenError',
- Arithmetic: 'SpRuntimeArithmeticError',
- Transactional: 'SpRuntimeTransactionalError'
- }
- },
- /**
- * Lookup23: sp_runtime::ModuleError
- **/
- SpRuntimeModuleError: {
- index: 'u8',
- error: '[u8;4]'
- },
- /**
- * Lookup24: sp_runtime::TokenError
- **/
- SpRuntimeTokenError: {
- _enum: ['NoFunds', 'WouldDie', 'BelowMinimum', 'CannotCreate', 'UnknownAsset', 'Frozen', 'Unsupported']
- },
- /**
- * Lookup25: sp_runtime::ArithmeticError
- **/
- SpRuntimeArithmeticError: {
- _enum: ['Underflow', 'Overflow', 'DivisionByZero']
- },
- /**
- * Lookup26: sp_runtime::TransactionalError
- **/
- SpRuntimeTransactionalError: {
- _enum: ['LimitReached', 'NoLayer']
- },
- /**
- * Lookup27: cumulus_pallet_parachain_system::pallet::Event<T>
- **/
- CumulusPalletParachainSystemEvent: {
- _enum: {
- ValidationFunctionStored: 'Null',
- ValidationFunctionApplied: {
- relayChainBlockNum: 'u32',
- },
- ValidationFunctionDiscarded: 'Null',
- UpgradeAuthorized: {
- codeHash: 'H256',
- },
- DownwardMessagesReceived: {
- count: 'u32',
- },
- DownwardMessagesProcessed: {
- weightUsed: 'u64',
- dmqHead: 'H256'
- }
- }
- },
- /**
- * Lookup28: pallet_balances::pallet::Event<T, I>
- **/
- PalletBalancesEvent: {
- _enum: {
- Endowed: {
- account: 'AccountId32',
- freeBalance: 'u128',
- },
- DustLost: {
- account: 'AccountId32',
- amount: 'u128',
- },
- Transfer: {
- from: 'AccountId32',
- to: 'AccountId32',
- amount: 'u128',
- },
- BalanceSet: {
- who: 'AccountId32',
- free: 'u128',
- reserved: 'u128',
- },
- Reserved: {
- who: 'AccountId32',
- amount: 'u128',
- },
- Unreserved: {
- who: 'AccountId32',
- amount: 'u128',
- },
- ReserveRepatriated: {
- from: 'AccountId32',
- to: 'AccountId32',
- amount: 'u128',
- destinationStatus: 'FrameSupportTokensMiscBalanceStatus',
- },
- Deposit: {
- who: 'AccountId32',
- amount: 'u128',
- },
- Withdraw: {
- who: 'AccountId32',
- amount: 'u128',
- },
- Slashed: {
- who: 'AccountId32',
- amount: 'u128'
- }
- }
- },
- /**
- * Lookup29: frame_support::traits::tokens::misc::BalanceStatus
- **/
- FrameSupportTokensMiscBalanceStatus: {
- _enum: ['Free', 'Reserved']
- },
- /**
- * Lookup30: pallet_transaction_payment::pallet::Event<T>
- **/
- PalletTransactionPaymentEvent: {
- _enum: {
- TransactionFeePaid: {
- who: 'AccountId32',
- actualFee: 'u128',
- tip: 'u128'
- }
- }
- },
- /**
- * Lookup31: pallet_treasury::pallet::Event<T, I>
- **/
- PalletTreasuryEvent: {
- _enum: {
- Proposed: {
- proposalIndex: 'u32',
- },
- Spending: {
- budgetRemaining: 'u128',
- },
- Awarded: {
- proposalIndex: 'u32',
- award: 'u128',
- account: 'AccountId32',
- },
- Rejected: {
- proposalIndex: 'u32',
- slashed: 'u128',
- },
- Burnt: {
- burntFunds: 'u128',
- },
- Rollover: {
- rolloverBalance: 'u128',
- },
- Deposit: {
- value: 'u128',
- },
- SpendApproved: {
- proposalIndex: 'u32',
- amount: 'u128',
- beneficiary: 'AccountId32'
- }
- }
- },
- /**
- * Lookup32: pallet_sudo::pallet::Event<T>
- **/
- PalletSudoEvent: {
- _enum: {
- Sudid: {
- sudoResult: 'Result<Null, SpRuntimeDispatchError>',
- },
- KeyChanged: {
- oldSudoer: 'Option<AccountId32>',
- },
- SudoAsDone: {
- sudoResult: 'Result<Null, SpRuntimeDispatchError>'
- }
- }
- },
- /**
- * Lookup36: orml_vesting::module::Event<T>
- **/
- OrmlVestingModuleEvent: {
- _enum: {
- VestingScheduleAdded: {
- from: 'AccountId32',
- to: 'AccountId32',
- vestingSchedule: 'OrmlVestingVestingSchedule',
- },
- Claimed: {
- who: 'AccountId32',
- amount: 'u128',
- },
- VestingSchedulesUpdated: {
- who: 'AccountId32'
- }
- }
- },
- /**
- * Lookup37: orml_vesting::VestingSchedule<BlockNumber, Balance>
- **/
- OrmlVestingVestingSchedule: {
- start: 'u32',
- period: 'u32',
- periodCount: 'u32',
- perPeriod: 'Compact<u128>'
- },
- /**
- * Lookup39: cumulus_pallet_xcmp_queue::pallet::Event<T>
- **/
- CumulusPalletXcmpQueueEvent: {
- _enum: {
- Success: {
- messageHash: 'Option<H256>',
- weight: 'u64',
- },
- Fail: {
- messageHash: 'Option<H256>',
- error: 'XcmV2TraitsError',
- weight: 'u64',
- },
- BadVersion: {
- messageHash: 'Option<H256>',
- },
- BadFormat: {
- messageHash: 'Option<H256>',
- },
- UpwardMessageSent: {
- messageHash: 'Option<H256>',
- },
- XcmpMessageSent: {
- messageHash: 'Option<H256>',
- },
- OverweightEnqueued: {
- sender: 'u32',
- sentAt: 'u32',
- index: 'u64',
- required: 'u64',
- },
- OverweightServiced: {
- index: 'u64',
- used: 'u64'
- }
- }
- },
- /**
- * Lookup41: xcm::v2::traits::Error
- **/
- XcmV2TraitsError: {
- _enum: {
- Overflow: 'Null',
- Unimplemented: 'Null',
- UntrustedReserveLocation: 'Null',
- UntrustedTeleportLocation: 'Null',
- MultiLocationFull: 'Null',
- MultiLocationNotInvertible: 'Null',
- BadOrigin: 'Null',
- InvalidLocation: 'Null',
- AssetNotFound: 'Null',
- FailedToTransactAsset: 'Null',
- NotWithdrawable: 'Null',
- LocationCannotHold: 'Null',
- ExceedsMaxMessageSize: 'Null',
- DestinationUnsupported: 'Null',
- Transport: 'Null',
- Unroutable: 'Null',
- UnknownClaim: 'Null',
- FailedToDecode: 'Null',
- MaxWeightInvalid: 'Null',
- NotHoldingFees: 'Null',
- TooExpensive: 'Null',
- Trap: 'u64',
- UnhandledXcmVersion: 'Null',
- WeightLimitReached: 'u64',
- Barrier: 'Null',
- WeightNotComputable: 'Null'
- }
- },
- /**
- * Lookup43: pallet_xcm::pallet::Event<T>
- **/
- PalletXcmEvent: {
- _enum: {
- Attempted: 'XcmV2TraitsOutcome',
- Sent: '(XcmV1MultiLocation,XcmV1MultiLocation,XcmV2Xcm)',
- UnexpectedResponse: '(XcmV1MultiLocation,u64)',
- ResponseReady: '(u64,XcmV2Response)',
- Notified: '(u64,u8,u8)',
- NotifyOverweight: '(u64,u8,u8,u64,u64)',
- NotifyDispatchError: '(u64,u8,u8)',
- NotifyDecodeFailed: '(u64,u8,u8)',
- InvalidResponder: '(XcmV1MultiLocation,u64,Option<XcmV1MultiLocation>)',
- InvalidResponderVersion: '(XcmV1MultiLocation,u64)',
- ResponseTaken: 'u64',
- AssetsTrapped: '(H256,XcmV1MultiLocation,XcmVersionedMultiAssets)',
- VersionChangeNotified: '(XcmV1MultiLocation,u32)',
- SupportedVersionChanged: '(XcmV1MultiLocation,u32)',
- NotifyTargetSendFail: '(XcmV1MultiLocation,u64,XcmV2TraitsError)',
- NotifyTargetMigrationFail: '(XcmVersionedMultiLocation,u64)'
- }
- },
- /**
- * Lookup44: xcm::v2::traits::Outcome
- **/
- XcmV2TraitsOutcome: {
- _enum: {
- Complete: 'u64',
- Incomplete: '(u64,XcmV2TraitsError)',
- Error: 'XcmV2TraitsError'
- }
- },
- /**
- * Lookup45: xcm::v1::multilocation::MultiLocation
- **/
- XcmV1MultiLocation: {
- parents: 'u8',
- interior: 'XcmV1MultilocationJunctions'
- },
- /**
- * Lookup46: xcm::v1::multilocation::Junctions
- **/
- XcmV1MultilocationJunctions: {
- _enum: {
- Here: 'Null',
- X1: 'XcmV1Junction',
- X2: '(XcmV1Junction,XcmV1Junction)',
- X3: '(XcmV1Junction,XcmV1Junction,XcmV1Junction)',
- X4: '(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)',
- X5: '(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)',
- X6: '(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)',
- X7: '(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)',
- X8: '(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)'
- }
- },
- /**
- * Lookup47: xcm::v1::junction::Junction
- **/
- XcmV1Junction: {
- _enum: {
- Parachain: 'Compact<u32>',
- AccountId32: {
- network: 'XcmV0JunctionNetworkId',
- id: '[u8;32]',
- },
- AccountIndex64: {
- network: 'XcmV0JunctionNetworkId',
- index: 'Compact<u64>',
- },
- AccountKey20: {
- network: 'XcmV0JunctionNetworkId',
- key: '[u8;20]',
- },
- PalletInstance: 'u8',
- GeneralIndex: 'Compact<u128>',
- GeneralKey: 'Bytes',
- OnlyChild: 'Null',
- Plurality: {
- id: 'XcmV0JunctionBodyId',
- part: 'XcmV0JunctionBodyPart'
- }
- }
- },
- /**
- * Lookup49: xcm::v0::junction::NetworkId
- **/
- XcmV0JunctionNetworkId: {
- _enum: {
- Any: 'Null',
- Named: 'Bytes',
- Polkadot: 'Null',
- Kusama: 'Null'
- }
- },
- /**
- * Lookup53: xcm::v0::junction::BodyId
- **/
- XcmV0JunctionBodyId: {
- _enum: {
- Unit: 'Null',
- Named: 'Bytes',
- Index: 'Compact<u32>',
- Executive: 'Null',
- Technical: 'Null',
- Legislative: 'Null',
- Judicial: 'Null'
- }
- },
- /**
- * Lookup54: xcm::v0::junction::BodyPart
- **/
- XcmV0JunctionBodyPart: {
- _enum: {
- Voice: 'Null',
- Members: {
- count: 'Compact<u32>',
- },
- Fraction: {
- nom: 'Compact<u32>',
- denom: 'Compact<u32>',
- },
- AtLeastProportion: {
- nom: 'Compact<u32>',
- denom: 'Compact<u32>',
- },
- MoreThanProportion: {
- nom: 'Compact<u32>',
- denom: 'Compact<u32>'
- }
- }
- },
- /**
- * Lookup55: xcm::v2::Xcm<Call>
- **/
- XcmV2Xcm: 'Vec<XcmV2Instruction>',
- /**
- * Lookup57: xcm::v2::Instruction<Call>
- **/
- XcmV2Instruction: {
- _enum: {
- WithdrawAsset: 'XcmV1MultiassetMultiAssets',
- ReserveAssetDeposited: 'XcmV1MultiassetMultiAssets',
- ReceiveTeleportedAsset: 'XcmV1MultiassetMultiAssets',
- QueryResponse: {
- queryId: 'Compact<u64>',
- response: 'XcmV2Response',
- maxWeight: 'Compact<u64>',
- },
- TransferAsset: {
- assets: 'XcmV1MultiassetMultiAssets',
- beneficiary: 'XcmV1MultiLocation',
- },
- TransferReserveAsset: {
- assets: 'XcmV1MultiassetMultiAssets',
- dest: 'XcmV1MultiLocation',
- xcm: 'XcmV2Xcm',
- },
- Transact: {
- originType: 'XcmV0OriginKind',
- requireWeightAtMost: 'Compact<u64>',
- call: 'XcmDoubleEncoded',
- },
- HrmpNewChannelOpenRequest: {
- sender: 'Compact<u32>',
- maxMessageSize: 'Compact<u32>',
- maxCapacity: 'Compact<u32>',
- },
- HrmpChannelAccepted: {
- recipient: 'Compact<u32>',
- },
- HrmpChannelClosing: {
- initiator: 'Compact<u32>',
- sender: 'Compact<u32>',
- recipient: 'Compact<u32>',
- },
- ClearOrigin: 'Null',
- DescendOrigin: 'XcmV1MultilocationJunctions',
- ReportError: {
- queryId: 'Compact<u64>',
- dest: 'XcmV1MultiLocation',
- maxResponseWeight: 'Compact<u64>',
- },
- DepositAsset: {
- assets: 'XcmV1MultiassetMultiAssetFilter',
- maxAssets: 'Compact<u32>',
- beneficiary: 'XcmV1MultiLocation',
- },
- DepositReserveAsset: {
- assets: 'XcmV1MultiassetMultiAssetFilter',
- maxAssets: 'Compact<u32>',
- dest: 'XcmV1MultiLocation',
- xcm: 'XcmV2Xcm',
- },
- ExchangeAsset: {
- give: 'XcmV1MultiassetMultiAssetFilter',
- receive: 'XcmV1MultiassetMultiAssets',
- },
- InitiateReserveWithdraw: {
- assets: 'XcmV1MultiassetMultiAssetFilter',
- reserve: 'XcmV1MultiLocation',
- xcm: 'XcmV2Xcm',
- },
- InitiateTeleport: {
- assets: 'XcmV1MultiassetMultiAssetFilter',
- dest: 'XcmV1MultiLocation',
- xcm: 'XcmV2Xcm',
- },
- QueryHolding: {
- queryId: 'Compact<u64>',
- dest: 'XcmV1MultiLocation',
- assets: 'XcmV1MultiassetMultiAssetFilter',
- maxResponseWeight: 'Compact<u64>',
- },
- BuyExecution: {
- fees: 'XcmV1MultiAsset',
- weightLimit: 'XcmV2WeightLimit',
- },
- RefundSurplus: 'Null',
- SetErrorHandler: 'XcmV2Xcm',
- SetAppendix: 'XcmV2Xcm',
- ClearError: 'Null',
- ClaimAsset: {
- assets: 'XcmV1MultiassetMultiAssets',
- ticket: 'XcmV1MultiLocation',
- },
- Trap: 'Compact<u64>',
- SubscribeVersion: {
- queryId: 'Compact<u64>',
- maxResponseWeight: 'Compact<u64>',
- },
- UnsubscribeVersion: 'Null'
- }
- },
- /**
- * Lookup58: xcm::v1::multiasset::MultiAssets
- **/
- XcmV1MultiassetMultiAssets: 'Vec<XcmV1MultiAsset>',
- /**
- * Lookup60: xcm::v1::multiasset::MultiAsset
- **/
- XcmV1MultiAsset: {
- id: 'XcmV1MultiassetAssetId',
- fun: 'XcmV1MultiassetFungibility'
- },
- /**
- * Lookup61: xcm::v1::multiasset::AssetId
- **/
- XcmV1MultiassetAssetId: {
- _enum: {
- Concrete: 'XcmV1MultiLocation',
- Abstract: 'Bytes'
- }
- },
- /**
- * Lookup62: xcm::v1::multiasset::Fungibility
- **/
- XcmV1MultiassetFungibility: {
- _enum: {
- Fungible: 'Compact<u128>',
- NonFungible: 'XcmV1MultiassetAssetInstance'
- }
- },
- /**
- * Lookup63: xcm::v1::multiasset::AssetInstance
- **/
- XcmV1MultiassetAssetInstance: {
- _enum: {
- Undefined: 'Null',
- Index: 'Compact<u128>',
- Array4: '[u8;4]',
- Array8: '[u8;8]',
- Array16: '[u8;16]',
- Array32: '[u8;32]',
- Blob: 'Bytes'
- }
- },
- /**
- * Lookup66: xcm::v2::Response
- **/
- XcmV2Response: {
- _enum: {
- Null: 'Null',
- Assets: 'XcmV1MultiassetMultiAssets',
- ExecutionResult: 'Option<(u32,XcmV2TraitsError)>',
- Version: 'u32'
- }
- },
- /**
- * Lookup69: xcm::v0::OriginKind
- **/
- XcmV0OriginKind: {
- _enum: ['Native', 'SovereignAccount', 'Superuser', 'Xcm']
- },
- /**
- * Lookup70: xcm::double_encoded::DoubleEncoded<T>
- **/
- XcmDoubleEncoded: {
- encoded: 'Bytes'
- },
- /**
- * Lookup71: xcm::v1::multiasset::MultiAssetFilter
- **/
- XcmV1MultiassetMultiAssetFilter: {
- _enum: {
- Definite: 'XcmV1MultiassetMultiAssets',
- Wild: 'XcmV1MultiassetWildMultiAsset'
- }
- },
- /**
- * Lookup72: xcm::v1::multiasset::WildMultiAsset
- **/
- XcmV1MultiassetWildMultiAsset: {
- _enum: {
- All: 'Null',
- AllOf: {
- id: 'XcmV1MultiassetAssetId',
- fun: 'XcmV1MultiassetWildFungibility'
- }
- }
- },
- /**
- * Lookup73: xcm::v1::multiasset::WildFungibility
- **/
- XcmV1MultiassetWildFungibility: {
- _enum: ['Fungible', 'NonFungible']
- },
- /**
- * Lookup74: xcm::v2::WeightLimit
- **/
- XcmV2WeightLimit: {
- _enum: {
- Unlimited: 'Null',
- Limited: 'Compact<u64>'
- }
- },
- /**
- * Lookup76: xcm::VersionedMultiAssets
- **/
- XcmVersionedMultiAssets: {
- _enum: {
- V0: 'Vec<XcmV0MultiAsset>',
- V1: 'XcmV1MultiassetMultiAssets'
- }
- },
- /**
- * Lookup78: xcm::v0::multi_asset::MultiAsset
- **/
- XcmV0MultiAsset: {
- _enum: {
- None: 'Null',
- All: 'Null',
- AllFungible: 'Null',
- AllNonFungible: 'Null',
- AllAbstractFungible: {
- id: 'Bytes',
- },
- AllAbstractNonFungible: {
- class: 'Bytes',
- },
- AllConcreteFungible: {
- id: 'XcmV0MultiLocation',
- },
- AllConcreteNonFungible: {
- class: 'XcmV0MultiLocation',
- },
- AbstractFungible: {
- id: 'Bytes',
- amount: 'Compact<u128>',
- },
- AbstractNonFungible: {
- class: 'Bytes',
- instance: 'XcmV1MultiassetAssetInstance',
- },
- ConcreteFungible: {
- id: 'XcmV0MultiLocation',
- amount: 'Compact<u128>',
- },
- ConcreteNonFungible: {
- class: 'XcmV0MultiLocation',
- instance: 'XcmV1MultiassetAssetInstance'
- }
- }
- },
- /**
- * Lookup79: xcm::v0::multi_location::MultiLocation
- **/
- XcmV0MultiLocation: {
- _enum: {
- Null: 'Null',
- X1: 'XcmV0Junction',
- X2: '(XcmV0Junction,XcmV0Junction)',
- X3: '(XcmV0Junction,XcmV0Junction,XcmV0Junction)',
- X4: '(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)',
- X5: '(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)',
- X6: '(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)',
- X7: '(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)',
- X8: '(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)'
- }
- },
- /**
- * Lookup80: xcm::v0::junction::Junction
- **/
- XcmV0Junction: {
- _enum: {
- Parent: 'Null',
- Parachain: 'Compact<u32>',
- AccountId32: {
- network: 'XcmV0JunctionNetworkId',
- id: '[u8;32]',
- },
- AccountIndex64: {
- network: 'XcmV0JunctionNetworkId',
- index: 'Compact<u64>',
- },
- AccountKey20: {
- network: 'XcmV0JunctionNetworkId',
- key: '[u8;20]',
- },
- PalletInstance: 'u8',
- GeneralIndex: 'Compact<u128>',
- GeneralKey: 'Bytes',
- OnlyChild: 'Null',
- Plurality: {
- id: 'XcmV0JunctionBodyId',
- part: 'XcmV0JunctionBodyPart'
- }
- }
- },
- /**
- * Lookup81: xcm::VersionedMultiLocation
- **/
- XcmVersionedMultiLocation: {
- _enum: {
- V0: 'XcmV0MultiLocation',
- V1: 'XcmV1MultiLocation'
- }
- },
- /**
- * Lookup82: cumulus_pallet_xcm::pallet::Event<T>
- **/
- CumulusPalletXcmEvent: {
- _enum: {
- InvalidFormat: '[u8;8]',
- UnsupportedVersion: '[u8;8]',
- ExecutedDownward: '([u8;8],XcmV2TraitsOutcome)'
- }
- },
- /**
- * Lookup83: cumulus_pallet_dmp_queue::pallet::Event<T>
- **/
- CumulusPalletDmpQueueEvent: {
- _enum: {
- InvalidFormat: {
- messageId: '[u8;32]',
- },
- UnsupportedVersion: {
- messageId: '[u8;32]',
- },
- ExecutedDownward: {
- messageId: '[u8;32]',
- outcome: 'XcmV2TraitsOutcome',
- },
- WeightExhausted: {
- messageId: '[u8;32]',
- remainingWeight: 'u64',
- requiredWeight: 'u64',
- },
- OverweightEnqueued: {
- messageId: '[u8;32]',
- overweightIndex: 'u64',
- requiredWeight: 'u64',
- },
- OverweightServiced: {
- overweightIndex: 'u64',
- weightUsed: 'u64'
- }
- }
- },
- /**
- * Lookup84: pallet_unique::RawEvent<sp_core::crypto::AccountId32, pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
- **/
- PalletUniqueRawEvent: {
- _enum: {
- CollectionSponsorRemoved: 'u32',
- CollectionAdminAdded: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',
- CollectionOwnedChanged: '(u32,AccountId32)',
- CollectionSponsorSet: '(u32,AccountId32)',
- SponsorshipConfirmed: '(u32,AccountId32)',
- CollectionAdminRemoved: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',
- AllowListAddressRemoved: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',
- AllowListAddressAdded: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',
- CollectionLimitSet: 'u32',
- CollectionPermissionSet: 'u32'
- }
- },
- /**
- * Lookup85: pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>
- **/
- PalletEvmAccountBasicCrossAccountIdRepr: {
- _enum: {
- Substrate: 'AccountId32',
- Ethereum: 'H160'
- }
- },
- /**
- * Lookup88: pallet_unique_scheduler::pallet::Event<T>
- **/
- PalletUniqueSchedulerEvent: {
- _enum: {
- Scheduled: {
- when: 'u32',
- index: 'u32',
- },
- Canceled: {
- when: 'u32',
- index: 'u32',
- },
- Dispatched: {
- task: '(u32,u32)',
- id: 'Option<[u8;16]>',
- result: 'Result<Null, SpRuntimeDispatchError>',
- },
- CallLookupFailed: {
- task: '(u32,u32)',
- id: 'Option<[u8;16]>',
- error: 'FrameSupportScheduleLookupError'
- }
- }
- },
- /**
- * Lookup91: frame_support::traits::schedule::LookupError
- **/
- FrameSupportScheduleLookupError: {
- _enum: ['Unknown', 'BadFormat']
- },
- /**
- * Lookup92: pallet_common::pallet::Event<T>
- **/
- PalletCommonEvent: {
- _enum: {
- CollectionCreated: '(u32,u8,AccountId32)',
- CollectionDestroyed: 'u32',
- ItemCreated: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,u128)',
- ItemDestroyed: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,u128)',
- Transfer: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,u128)',
- Approved: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,u128)',
- CollectionPropertySet: '(u32,Bytes)',
- CollectionPropertyDeleted: '(u32,Bytes)',
- TokenPropertySet: '(u32,u32,Bytes)',
- TokenPropertyDeleted: '(u32,u32,Bytes)',
- PropertyPermissionSet: '(u32,Bytes)'
- }
- },
- /**
- * Lookup95: pallet_structure::pallet::Event<T>
- **/
- PalletStructureEvent: {
- _enum: {
- Executed: 'Result<Null, SpRuntimeDispatchError>'
- }
- },
- /**
- * Lookup96: pallet_rmrk_core::pallet::Event<T>
- **/
- PalletRmrkCoreEvent: {
- _enum: {
- CollectionCreated: {
- issuer: 'AccountId32',
- collectionId: 'u32',
- },
- CollectionDestroyed: {
- issuer: 'AccountId32',
- collectionId: 'u32',
- },
- IssuerChanged: {
- oldIssuer: 'AccountId32',
- newIssuer: 'AccountId32',
- collectionId: 'u32',
- },
- CollectionLocked: {
- issuer: 'AccountId32',
- collectionId: 'u32',
- },
- NftMinted: {
- owner: 'AccountId32',
- collectionId: 'u32',
- nftId: 'u32',
- },
- NFTBurned: {
- owner: 'AccountId32',
- nftId: 'u32',
- },
- NFTSent: {
- sender: 'AccountId32',
- recipient: 'RmrkTraitsNftAccountIdOrCollectionNftTuple',
- collectionId: 'u32',
- nftId: 'u32',
- approvalRequired: 'bool',
- },
- NFTAccepted: {
- sender: 'AccountId32',
- recipient: 'RmrkTraitsNftAccountIdOrCollectionNftTuple',
- collectionId: 'u32',
- nftId: 'u32',
- },
- NFTRejected: {
- sender: 'AccountId32',
- collectionId: 'u32',
- nftId: 'u32',
- },
- PropertySet: {
- collectionId: 'u32',
- maybeNftId: 'Option<u32>',
- key: 'Bytes',
- value: 'Bytes',
- },
- ResourceAdded: {
- nftId: 'u32',
- resourceId: 'u32',
- },
- ResourceRemoval: {
- nftId: 'u32',
- resourceId: 'u32',
- },
- ResourceAccepted: {
- nftId: 'u32',
- resourceId: 'u32',
- },
- ResourceRemovalAccepted: {
- nftId: 'u32',
- resourceId: 'u32',
- },
- PrioritySet: {
- collectionId: 'u32',
- nftId: 'u32'
- }
- }
- },
- /**
- * Lookup97: rmrk_traits::nft::AccountIdOrCollectionNftTuple<sp_core::crypto::AccountId32>
- **/
- RmrkTraitsNftAccountIdOrCollectionNftTuple: {
- _enum: {
- AccountId: 'AccountId32',
- CollectionAndNftTuple: '(u32,u32)'
- }
- },
- /**
- * Lookup102: pallet_rmrk_equip::pallet::Event<T>
- **/
- PalletRmrkEquipEvent: {
- _enum: {
- BaseCreated: {
- issuer: 'AccountId32',
- baseId: 'u32',
- },
- EquippablesUpdated: {
- baseId: 'u32',
- slotId: 'u32'
- }
- }
- },
- /**
- * Lookup103: pallet_evm::pallet::Event<T>
- **/
- PalletEvmEvent: {
- _enum: {
- Log: 'EthereumLog',
- Created: 'H160',
- CreatedFailed: 'H160',
- Executed: 'H160',
- ExecutedFailed: 'H160',
- BalanceDeposit: '(AccountId32,H160,U256)',
- BalanceWithdraw: '(AccountId32,H160,U256)'
- }
- },
- /**
- * Lookup104: ethereum::log::Log
- **/
- EthereumLog: {
- address: 'H160',
- topics: 'Vec<H256>',
- data: 'Bytes'
- },
- /**
- * Lookup108: pallet_ethereum::pallet::Event
- **/
- PalletEthereumEvent: {
- _enum: {
- Executed: '(H160,H160,H256,EvmCoreErrorExitReason)'
- }
- },
- /**
- * Lookup109: evm_core::error::ExitReason
- **/
- EvmCoreErrorExitReason: {
- _enum: {
- Succeed: 'EvmCoreErrorExitSucceed',
- Error: 'EvmCoreErrorExitError',
- Revert: 'EvmCoreErrorExitRevert',
- Fatal: 'EvmCoreErrorExitFatal'
- }
- },
- /**
- * Lookup110: evm_core::error::ExitSucceed
- **/
- EvmCoreErrorExitSucceed: {
- _enum: ['Stopped', 'Returned', 'Suicided']
- },
- /**
- * Lookup111: evm_core::error::ExitError
- **/
- EvmCoreErrorExitError: {
- _enum: {
- StackUnderflow: 'Null',
- StackOverflow: 'Null',
- InvalidJump: 'Null',
- InvalidRange: 'Null',
- DesignatedInvalid: 'Null',
- CallTooDeep: 'Null',
- CreateCollision: 'Null',
- CreateContractLimit: 'Null',
- OutOfOffset: 'Null',
- OutOfGas: 'Null',
- OutOfFund: 'Null',
- PCUnderflow: 'Null',
- CreateEmpty: 'Null',
- Other: 'Text',
- InvalidCode: 'Null'
- }
- },
- /**
- * Lookup114: evm_core::error::ExitRevert
- **/
- EvmCoreErrorExitRevert: {
- _enum: ['Reverted']
- },
- /**
- * Lookup115: evm_core::error::ExitFatal
- **/
- EvmCoreErrorExitFatal: {
- _enum: {
- NotSupported: 'Null',
- UnhandledInterrupt: 'Null',
- CallErrorAsFatal: 'EvmCoreErrorExitError',
- Other: 'Text'
- }
- },
- /**
- * Lookup116: frame_system::Phase
- **/
- FrameSystemPhase: {
- _enum: {
- ApplyExtrinsic: 'u32',
- Finalization: 'Null',
- Initialization: 'Null'
- }
- },
- /**
- * Lookup118: frame_system::LastRuntimeUpgradeInfo
- **/
- FrameSystemLastRuntimeUpgradeInfo: {
- specVersion: 'Compact<u32>',
- specName: 'Text'
- },
- /**
- * Lookup119: frame_system::pallet::Call<T>
- **/
- FrameSystemCall: {
- _enum: {
- fill_block: {
- ratio: 'Perbill',
- },
- remark: {
- remark: 'Bytes',
- },
- set_heap_pages: {
- pages: 'u64',
- },
- set_code: {
- code: 'Bytes',
- },
- set_code_without_checks: {
- code: 'Bytes',
- },
- set_storage: {
- items: 'Vec<(Bytes,Bytes)>',
- },
- kill_storage: {
- _alias: {
- keys_: 'keys',
- },
- keys_: 'Vec<Bytes>',
- },
- kill_prefix: {
- prefix: 'Bytes',
- subkeys: 'u32',
- },
- remark_with_event: {
- remark: 'Bytes'
- }
- }
- },
- /**
- * Lookup124: frame_system::limits::BlockWeights
- **/
- FrameSystemLimitsBlockWeights: {
- baseBlock: 'u64',
- maxBlock: 'u64',
- perClass: 'FrameSupportWeightsPerDispatchClassWeightsPerClass'
- },
- /**
- * Lookup125: frame_support::weights::PerDispatchClass<frame_system::limits::WeightsPerClass>
- **/
- FrameSupportWeightsPerDispatchClassWeightsPerClass: {
- normal: 'FrameSystemLimitsWeightsPerClass',
- operational: 'FrameSystemLimitsWeightsPerClass',
- mandatory: 'FrameSystemLimitsWeightsPerClass'
- },
- /**
- * Lookup126: frame_system::limits::WeightsPerClass
- **/
- FrameSystemLimitsWeightsPerClass: {
- baseExtrinsic: 'u64',
- maxExtrinsic: 'Option<u64>',
- maxTotal: 'Option<u64>',
- reserved: 'Option<u64>'
- },
- /**
- * Lookup128: frame_system::limits::BlockLength
+ * Lookup2: polkadot_primitives::v2::PersistedValidationData<primitive_types::H256, N>
**/
- FrameSystemLimitsBlockLength: {
- max: 'FrameSupportWeightsPerDispatchClassU32'
- },
- /**
- * Lookup129: frame_support::weights::PerDispatchClass<T>
- **/
- FrameSupportWeightsPerDispatchClassU32: {
- normal: 'u32',
- operational: 'u32',
- mandatory: 'u32'
- },
- /**
- * Lookup130: frame_support::weights::RuntimeDbWeight
- **/
- FrameSupportWeightsRuntimeDbWeight: {
- read: 'u64',
- write: 'u64'
- },
- /**
- * Lookup131: sp_version::RuntimeVersion
- **/
- SpVersionRuntimeVersion: {
- specName: 'Text',
- implName: 'Text',
- authoringVersion: 'u32',
- specVersion: 'u32',
- implVersion: 'u32',
- apis: 'Vec<([u8;8],u32)>',
- transactionVersion: 'u32',
- stateVersion: 'u8'
- },
- /**
- * Lookup136: frame_system::pallet::Error<T>
- **/
- FrameSystemError: {
- _enum: ['InvalidSpecName', 'SpecVersionNeedsToIncrease', 'FailedToExtractRuntimeVersion', 'NonDefaultComposite', 'NonZeroRefCount', 'CallFiltered']
- },
- /**
- * Lookup137: polkadot_primitives::v2::PersistedValidationData<primitive_types::H256, N>
- **/
PolkadotPrimitivesV2PersistedValidationData: {
parentHead: 'Bytes',
relayParentNumber: 'u32',
@@ -1272,19 +14,19 @@
maxPovSize: 'u32'
},
/**
- * Lookup140: polkadot_primitives::v2::UpgradeRestriction
+ * Lookup9: polkadot_primitives::v2::UpgradeRestriction
**/
PolkadotPrimitivesV2UpgradeRestriction: {
_enum: ['Present']
},
/**
- * Lookup141: sp_trie::storage_proof::StorageProof
+ * Lookup10: sp_trie::storage_proof::StorageProof
**/
SpTrieStorageProof: {
trieNodes: 'BTreeSet<Bytes>'
},
/**
- * Lookup143: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot
+ * Lookup13: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot
**/
CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot: {
dmqMqcHead: 'H256',
@@ -1293,7 +35,7 @@
egressChannels: 'Vec<(u32,PolkadotPrimitivesV2AbridgedHrmpChannel)>'
},
/**
- * Lookup146: polkadot_primitives::v2::AbridgedHrmpChannel
+ * Lookup18: polkadot_primitives::v2::AbridgedHrmpChannel
**/
PolkadotPrimitivesV2AbridgedHrmpChannel: {
maxCapacity: 'u32',
@@ -1304,7 +46,7 @@
mqcHead: 'Option<H256>'
},
/**
- * Lookup147: polkadot_primitives::v2::AbridgedHostConfiguration
+ * Lookup20: polkadot_primitives::v2::AbridgedHostConfiguration
**/
PolkadotPrimitivesV2AbridgedHostConfiguration: {
maxCodeSize: 'u32',
@@ -1318,14 +60,14 @@
validationUpgradeDelay: 'u32'
},
/**
- * Lookup153: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>
+ * Lookup26: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>
**/
PolkadotCorePrimitivesOutboundHrmpMessage: {
recipient: 'u32',
data: 'Bytes'
},
/**
- * Lookup154: cumulus_pallet_parachain_system::pallet::Call<T>
+ * Lookup28: cumulus_pallet_parachain_system::pallet::Call<T>
**/
CumulusPalletParachainSystemCall: {
_enum: {
@@ -1344,7 +86,7 @@
}
},
/**
- * Lookup155: cumulus_primitives_parachain_inherent::ParachainInherentData
+ * Lookup29: cumulus_primitives_parachain_inherent::ParachainInherentData
**/
CumulusPrimitivesParachainInherentParachainInherentData: {
validationData: 'PolkadotPrimitivesV2PersistedValidationData',
@@ -1353,27 +95,58 @@
horizontalMessages: 'BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>'
},
/**
- * Lookup157: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>
+ * Lookup31: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>
**/
PolkadotCorePrimitivesInboundDownwardMessage: {
sentAt: 'u32',
msg: 'Bytes'
},
/**
- * Lookup160: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>
+ * Lookup34: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>
**/
PolkadotCorePrimitivesInboundHrmpMessage: {
sentAt: 'u32',
data: 'Bytes'
},
/**
- * Lookup163: cumulus_pallet_parachain_system::pallet::Error<T>
+ * Lookup37: cumulus_pallet_parachain_system::pallet::Event<T>
+ **/
+ CumulusPalletParachainSystemEvent: {
+ _enum: {
+ ValidationFunctionStored: 'Null',
+ ValidationFunctionApplied: {
+ relayChainBlockNum: 'u32',
+ },
+ ValidationFunctionDiscarded: 'Null',
+ UpgradeAuthorized: {
+ codeHash: 'H256',
+ },
+ DownwardMessagesReceived: {
+ count: 'u32',
+ },
+ DownwardMessagesProcessed: {
+ weightUsed: 'u64',
+ dmqHead: 'H256'
+ }
+ }
+ },
+ /**
+ * Lookup38: cumulus_pallet_parachain_system::pallet::Error<T>
**/
CumulusPalletParachainSystemError: {
_enum: ['OverlappingUpgrades', 'ProhibitedByPolkadot', 'TooBig', 'ValidationDataNotAvailable', 'HostConfigurationNotAvailable', 'NotScheduled', 'NothingAuthorized', 'Unauthorized']
},
/**
- * Lookup165: pallet_balances::BalanceLock<Balance>
+ * Lookup41: pallet_balances::AccountData<Balance>
+ **/
+ PalletBalancesAccountData: {
+ free: 'u128',
+ reserved: 'u128',
+ miscFrozen: 'u128',
+ feeFrozen: 'u128'
+ },
+ /**
+ * Lookup43: pallet_balances::BalanceLock<Balance>
**/
PalletBalancesBalanceLock: {
id: '[u8;8]',
@@ -1381,13 +154,13 @@
reasons: 'PalletBalancesReasons'
},
/**
- * Lookup166: pallet_balances::Reasons
+ * Lookup45: pallet_balances::Reasons
**/
PalletBalancesReasons: {
_enum: ['Fee', 'Misc', 'All']
},
/**
- * Lookup169: pallet_balances::ReserveData<ReserveIdentifier, Balance>
+ * Lookup48: pallet_balances::ReserveData<ReserveIdentifier, Balance>
**/
PalletBalancesReserveData: {
id: '[u8;16]',
@@ -2706,13 +1479,13 @@
_enum: ['Unknown', 'OverLimit']
},
/**
- * Lookup347: pallet_unique::Error<T>
+ * Lookup346: pallet_unique::Error<T>
**/
PalletUniqueError: {
_enum: ['CollectionDecimalPointLimitExceeded', 'ConfirmUnsetSponsorFail', 'EmptyArgument', 'RepartitionCalledOnNonRefungibleCollection']
},
/**
- * Lookup350: pallet_unique_scheduler::ScheduledV3<frame_support::traits::schedule::MaybeHashed<opal_runtime::Call, primitive_types::H256>, BlockNumber, opal_runtime::OriginCaller, sp_core::crypto::AccountId32>
+ * Lookup349: pallet_unique_scheduler::ScheduledV3<frame_support::traits::schedule::MaybeHashed<opal_runtime::Call, primitive_types::H256>, BlockNumber, opal_runtime::OriginCaller, sp_core::crypto::AccountId32>
**/
PalletUniqueSchedulerScheduledV3: {
maybeId: 'Option<[u8;16]>',
@@ -2722,7 +1495,7 @@
origin: 'OpalRuntimeOriginCaller'
},
/**
- * Lookup351: opal_runtime::OriginCaller
+ * Lookup350: opal_runtime::OriginCaller
**/
OpalRuntimeOriginCaller: {
_enum: {
@@ -2831,7 +1604,7 @@
}
},
/**
- * Lookup352: frame_support::dispatch::RawOrigin<sp_core::crypto::AccountId32>
+ * Lookup351: frame_support::dispatch::RawOrigin<sp_core::crypto::AccountId32>
**/
FrameSupportDispatchRawOrigin: {
_enum: {
@@ -2841,7 +1614,7 @@
}
},
/**
- * Lookup353: pallet_xcm::pallet::Origin
+ * Lookup352: pallet_xcm::pallet::Origin
**/
PalletXcmOrigin: {
_enum: {
@@ -2850,7 +1623,7 @@
}
},
/**
- * Lookup354: cumulus_pallet_xcm::pallet::Origin
+ * Lookup353: cumulus_pallet_xcm::pallet::Origin
**/
CumulusPalletXcmOrigin: {
_enum: {
@@ -2859,7 +1632,7 @@
}
},
/**
- * Lookup355: pallet_ethereum::RawOrigin
+ * Lookup354: pallet_ethereum::RawOrigin
**/
PalletEthereumRawOrigin: {
_enum: {
@@ -2867,17 +1640,17 @@
}
},
/**
- * Lookup356: sp_core::Void
+ * Lookup355: sp_core::Void
**/
SpCoreVoid: 'Null',
/**
- * Lookup357: pallet_unique_scheduler::pallet::Error<T>
+ * Lookup356: pallet_unique_scheduler::pallet::Error<T>
**/
PalletUniqueSchedulerError: {
_enum: ['FailedToSchedule', 'NotFound', 'TargetBlockNumberInPast', 'RescheduleNoChange']
},
/**
- * Lookup358: up_data_structs::Collection<sp_core::crypto::AccountId32>
+ * Lookup357: up_data_structs::Collection<sp_core::crypto::AccountId32>
**/
UpDataStructsCollection: {
owner: 'AccountId32',
@@ -2891,7 +1664,7 @@
externalCollection: 'bool'
},
/**
- * Lookup359: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>
+ * Lookup358: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>
**/
UpDataStructsSponsorshipState: {
_enum: {
@@ -2901,7 +1674,7 @@
}
},
/**
- * Lookup360: up_data_structs::Properties
+ * Lookup359: up_data_structs::Properties
**/
UpDataStructsProperties: {
map: 'UpDataStructsPropertiesMapBoundedVec',
@@ -2909,7 +1682,7 @@
spaceLimit: 'u32'
},
/**
- * Lookup361: up_data_structs::PropertiesMap<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup360: up_data_structs::PropertiesMap<frame_support::storage::bounded_vec::BoundedVec<T, S>>
**/
UpDataStructsPropertiesMapBoundedVec: 'BTreeMap<Bytes, Bytes>',
/**
@@ -2917,7 +1690,7 @@
**/
UpDataStructsPropertiesMapPropertyPermission: 'BTreeMap<Bytes, UpDataStructsPropertyPermission>',
/**
- * Lookup373: up_data_structs::CollectionStats
+ * Lookup372: up_data_structs::CollectionStats
**/
UpDataStructsCollectionStats: {
created: 'u32',
@@ -2925,18 +1698,18 @@
alive: 'u32'
},
/**
- * Lookup374: up_data_structs::TokenChild
+ * Lookup373: up_data_structs::TokenChild
**/
UpDataStructsTokenChild: {
token: 'u32',
collection: 'u32'
},
/**
- * Lookup375: PhantomType::up_data_structs<T>
+ * Lookup374: PhantomType::up_data_structs<T>
**/
PhantomTypeUpDataStructs: '[(UpDataStructsTokenData,UpDataStructsRpcCollection,RmrkTraitsCollectionCollectionInfo,RmrkTraitsNftNftInfo,RmrkTraitsResourceResourceInfo,RmrkTraitsPropertyPropertyInfo,RmrkTraitsBaseBaseInfo,RmrkTraitsPartPartType,RmrkTraitsTheme,RmrkTraitsNftNftChild);0]',
/**
- * Lookup377: up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup376: up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
UpDataStructsTokenData: {
properties: 'Vec<UpDataStructsProperty>',
@@ -2944,7 +1717,7 @@
pieces: 'u128'
},
/**
- * Lookup379: up_data_structs::RpcCollection<sp_core::crypto::AccountId32>
+ * Lookup378: up_data_structs::RpcCollection<sp_core::crypto::AccountId32>
**/
UpDataStructsRpcCollection: {
owner: 'AccountId32',
@@ -2960,7 +1733,7 @@
readOnly: 'bool'
},
/**
- * Lookup380: rmrk_traits::collection::CollectionInfo<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_core::crypto::AccountId32>
+ * Lookup379: rmrk_traits::collection::CollectionInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>, sp_core::crypto::AccountId32>
**/
RmrkTraitsCollectionCollectionInfo: {
issuer: 'AccountId32',
@@ -2970,7 +1743,7 @@
nftsCount: 'u32'
},
/**
- * Lookup381: rmrk_traits::nft::NftInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup380: rmrk_traits::nft::NftInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill, frame_support::storage::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsNftNftInfo: {
owner: 'RmrkTraitsNftAccountIdOrCollectionNftTuple',
@@ -2980,14 +1753,14 @@
pending: 'bool'
},
/**
- * Lookup383: rmrk_traits::nft::RoyaltyInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill>
+ * Lookup382: rmrk_traits::nft::RoyaltyInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill>
**/
RmrkTraitsNftRoyaltyInfo: {
recipient: 'AccountId32',
amount: 'Permill'
},
/**
- * Lookup384: rmrk_traits::resource::ResourceInfo<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup383: rmrk_traits::resource::ResourceInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsResourceResourceInfo: {
id: 'u32',
@@ -2996,14 +1769,14 @@
pendingRemoval: 'bool'
},
/**
- * Lookup385: rmrk_traits::property::PropertyInfo<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup384: rmrk_traits::property::PropertyInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsPropertyPropertyInfo: {
key: 'Bytes',
value: 'Bytes'
},
/**
- * Lookup386: rmrk_traits::base::BaseInfo<sp_core::crypto::AccountId32, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
+ * Lookup385: rmrk_traits::base::BaseInfo<sp_core::crypto::AccountId32, frame_support::storage::bounded_vec::BoundedVec<T, S>>
**/
RmrkTraitsBaseBaseInfo: {
issuer: 'AccountId32',
@@ -3011,80 +1784,80 @@
symbol: 'Bytes'
},
/**
- * Lookup387: rmrk_traits::nft::NftChild
+ * Lookup386: rmrk_traits::nft::NftChild
**/
RmrkTraitsNftNftChild: {
collectionId: 'u32',
nftId: 'u32'
},
/**
- * Lookup389: pallet_common::pallet::Error<T>
+ * Lookup388: pallet_common::pallet::Error<T>
**/
PalletCommonError: {
_enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'CantDestroyNotEmptyCollection', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsZero', 'UnsupportedOperation', 'NotSufficientFounds', 'UserIsNotAllowedToNest', 'SourceCollectionIsNotAllowedToNest', 'CollectionFieldSizeExceeded', 'NoSpaceForProperty', 'PropertyLimitReached', 'PropertyKeyIsTooLong', 'InvalidCharacterInPropertyKey', 'EmptyPropertyKey', 'CollectionIsExternal', 'CollectionIsInternal']
},
/**
- * Lookup391: pallet_fungible::pallet::Error<T>
+ * Lookup390: pallet_fungible::pallet::Error<T>
**/
PalletFungibleError: {
_enum: ['NotFungibleDataUsedToMintFungibleCollectionToken', 'FungibleItemsHaveNoId', 'FungibleItemsDontHaveData', 'FungibleDisallowsNesting', 'SettingPropertiesNotAllowed']
},
/**
- * Lookup392: pallet_refungible::ItemData
+ * Lookup391: pallet_refungible::ItemData
**/
PalletRefungibleItemData: {
constData: 'Bytes'
},
/**
- * Lookup397: pallet_refungible::pallet::Error<T>
+ * Lookup394: pallet_refungible::pallet::Error<T>
**/
PalletRefungibleError: {
_enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces', 'RepartitionWhileNotOwningAllPieces', 'RefungibleDisallowsNesting', 'SettingPropertiesNotAllowed']
},
/**
- * Lookup398: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup395: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
PalletNonfungibleItemData: {
owner: 'PalletEvmAccountBasicCrossAccountIdRepr'
},
/**
- * Lookup400: up_data_structs::PropertyScope
+ * Lookup397: up_data_structs::PropertyScope
**/
UpDataStructsPropertyScope: {
_enum: ['None', 'Rmrk', 'Eth']
},
/**
- * Lookup402: pallet_nonfungible::pallet::Error<T>
+ * Lookup399: pallet_nonfungible::pallet::Error<T>
**/
PalletNonfungibleError: {
_enum: ['NotNonfungibleDataUsedToMintFungibleCollectionToken', 'NonfungibleItemsHaveNoAmount', 'CantBurnNftWithChildren']
},
/**
- * Lookup403: pallet_structure::pallet::Error<T>
+ * Lookup400: pallet_structure::pallet::Error<T>
**/
PalletStructureError: {
_enum: ['OuroborosDetected', 'DepthLimit', 'BreadthLimit', 'TokenNotFound']
},
/**
- * Lookup404: pallet_rmrk_core::pallet::Error<T>
+ * Lookup401: pallet_rmrk_core::pallet::Error<T>
**/
PalletRmrkCoreError: {
_enum: ['CorruptedCollectionType', 'RmrkPropertyKeyIsTooLong', 'RmrkPropertyValueIsTooLong', 'RmrkPropertyIsNotFound', 'UnableToDecodeRmrkData', 'CollectionNotEmpty', 'NoAvailableCollectionId', 'NoAvailableNftId', 'CollectionUnknown', 'NoPermission', 'NonTransferable', 'CollectionFullOrLocked', 'ResourceDoesntExist', 'CannotSendToDescendentOrSelf', 'CannotAcceptNonOwnedNft', 'CannotRejectNonOwnedNft', 'CannotRejectNonPendingNft', 'ResourceNotPending', 'NoAvailableResourceId']
},
/**
- * Lookup406: pallet_rmrk_equip::pallet::Error<T>
+ * Lookup403: pallet_rmrk_equip::pallet::Error<T>
**/
PalletRmrkEquipError: {
_enum: ['PermissionError', 'NoAvailableBaseId', 'NoAvailablePartId', 'BaseDoesntExist', 'NeedsDefaultThemeFirst', 'PartDoesntExist', 'NoEquippableOnFixedPart']
},
/**
- * Lookup409: pallet_evm::pallet::Error<T>
+ * Lookup406: pallet_evm::pallet::Error<T>
**/
PalletEvmError: {
_enum: ['BalanceLow', 'FeeOverflow', 'PaymentOverflow', 'WithdrawFailed', 'GasPriceTooLow', 'InvalidNonce']
},
/**
- * Lookup412: fp_rpc::TransactionStatus
+ * Lookup409: fp_rpc::TransactionStatus
**/
FpRpcTransactionStatus: {
transactionHash: 'H256',
@@ -3096,11 +1869,11 @@
logsBloom: 'EthbloomBloom'
},
/**
- * Lookup414: ethbloom::Bloom
+ * Lookup411: ethbloom::Bloom
**/
EthbloomBloom: '[u8;256]',
/**
- * Lookup416: ethereum::receipt::ReceiptV3
+ * Lookup413: ethereum::receipt::ReceiptV3
**/
EthereumReceiptReceiptV3: {
_enum: {
@@ -3110,7 +1883,7 @@
}
},
/**
- * Lookup417: ethereum::receipt::EIP658ReceiptData
+ * Lookup414: ethereum::receipt::EIP658ReceiptData
**/
EthereumReceiptEip658ReceiptData: {
statusCode: 'u8',
@@ -3119,7 +1892,7 @@
logs: 'Vec<EthereumLog>'
},
/**
- * Lookup418: ethereum::block::Block<ethereum::transaction::TransactionV2>
+ * Lookup415: ethereum::block::Block<ethereum::transaction::TransactionV2>
**/
EthereumBlock: {
header: 'EthereumHeader',
@@ -3127,7 +1900,7 @@
ommers: 'Vec<EthereumHeader>'
},
/**
- * Lookup419: ethereum::header::Header
+ * Lookup416: ethereum::header::Header
**/
EthereumHeader: {
parentHash: 'H256',
@@ -3147,41 +1920,41 @@
nonce: 'EthereumTypesHashH64'
},
/**
- * Lookup420: ethereum_types::hash::H64
+ * Lookup417: ethereum_types::hash::H64
**/
EthereumTypesHashH64: '[u8;8]',
/**
- * Lookup425: pallet_ethereum::pallet::Error<T>
+ * Lookup422: pallet_ethereum::pallet::Error<T>
**/
PalletEthereumError: {
_enum: ['InvalidSignature', 'PreLogExists']
},
/**
- * Lookup426: pallet_evm_coder_substrate::pallet::Error<T>
+ * Lookup423: pallet_evm_coder_substrate::pallet::Error<T>
**/
PalletEvmCoderSubstrateError: {
_enum: ['OutOfGas', 'OutOfFund']
},
/**
- * Lookup427: pallet_evm_contract_helpers::SponsoringModeT
+ * Lookup424: pallet_evm_contract_helpers::SponsoringModeT
**/
PalletEvmContractHelpersSponsoringModeT: {
_enum: ['Disabled', 'Allowlisted', 'Generous']
},
/**
- * Lookup429: pallet_evm_contract_helpers::pallet::Error<T>
+ * Lookup426: pallet_evm_contract_helpers::pallet::Error<T>
**/
PalletEvmContractHelpersError: {
_enum: ['NoPermission']
},
/**
- * Lookup430: pallet_evm_migration::pallet::Error<T>
+ * Lookup427: pallet_evm_migration::pallet::Error<T>
**/
PalletEvmMigrationError: {
_enum: ['AccountNotEmpty', 'AccountIsNotMigrating']
},
/**
- * Lookup432: sp_runtime::MultiSignature
+ * Lookup429: sp_runtime::MultiSignature
**/
SpRuntimeMultiSignature: {
_enum: {
@@ -3191,43 +1964,43 @@
}
},
/**
- * Lookup433: sp_core::ed25519::Signature
+ * Lookup430: sp_core::ed25519::Signature
**/
SpCoreEd25519Signature: '[u8;64]',
/**
- * Lookup435: sp_core::sr25519::Signature
+ * Lookup434: sp_core::sr25519::Signature
**/
SpCoreSr25519Signature: '[u8;64]',
/**
- * Lookup436: sp_core::ecdsa::Signature
+ * Lookup435: sp_core::ecdsa::Signature
**/
SpCoreEcdsaSignature: '[u8;65]',
/**
- * Lookup439: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
+ * Lookup438: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
**/
FrameSystemExtensionsCheckSpecVersion: 'Null',
/**
- * Lookup440: frame_system::extensions::check_genesis::CheckGenesis<T>
+ * Lookup439: frame_system::extensions::check_genesis::CheckGenesis<T>
**/
FrameSystemExtensionsCheckGenesis: 'Null',
/**
- * Lookup443: frame_system::extensions::check_nonce::CheckNonce<T>
+ * Lookup442: frame_system::extensions::check_nonce::CheckNonce<T>
**/
FrameSystemExtensionsCheckNonce: 'Compact<u32>',
/**
- * Lookup444: frame_system::extensions::check_weight::CheckWeight<T>
+ * Lookup443: frame_system::extensions::check_weight::CheckWeight<T>
**/
FrameSystemExtensionsCheckWeight: 'Null',
/**
- * Lookup445: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>
+ * Lookup444: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>
**/
PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact<u128>',
/**
- * Lookup446: opal_runtime::Runtime
+ * Lookup445: opal_runtime::Runtime
**/
OpalRuntimeRuntime: 'Null',
/**
- * Lookup447: pallet_ethereum::FakeTransactionFinalizer<opal_runtime::Runtime>
+ * Lookup444: pallet_ethereum::FakeTransactionFinalizer<opal_runtime::Runtime>
**/
PalletEthereumFakeTransactionFinalizer: 'Null'
};
tests/src/interfaces/types-lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/types-lookup.ts
+++ b/tests/src/interfaces/types-lookup.ts
@@ -1393,28 +1393,7 @@
readonly type: 'StartInflation';
}
- /** @name PalletAppPromotionCall (148) */
- export interface PalletAppPromotionCall extends Enum {
- readonly isSetAdminAddress: boolean;
- readonly asSetAdminAddress: {
- readonly admin: AccountId32;
- } & Struct;
- readonly isStartAppPromotion: boolean;
- readonly asStartAppPromotion: {
- readonly promotionStartRelayBlock: u32;
- } & Struct;
- readonly isStake: boolean;
- readonly asStake: {
- readonly amount: u128;
- } & Struct;
- readonly isUnstake: boolean;
- readonly asUnstake: {
- readonly amount: u128;
- } & Struct;
- readonly type: 'SetAdminAddress' | 'StartAppPromotion' | 'Stake' | 'Unstake';
- }
-
- /** @name PalletUniqueCall (149) */
+ /** @name PalletUniqueCall (148) */
export interface PalletUniqueCall extends Enum {
readonly isCreateCollection: boolean;
readonly asCreateCollection: {
@@ -1629,164 +1608,28 @@
readonly nftId: u32;
readonly resourceId: u32;
} & Struct;
- readonly isResourceRemovalAccepted: boolean;
- readonly asResourceRemovalAccepted: {
- readonly nftId: u32;
- readonly resourceId: u32;
- } & Struct;
- readonly isPrioritySet: boolean;
- readonly asPrioritySet: {
+ readonly isCreateMultipleItemsEx: boolean;
+ readonly asCreateMultipleItemsEx: {
readonly collectionId: u32;
- readonly nftId: u32;
- } & Struct;
- readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'IssuerChanged' | 'CollectionLocked' | 'NftMinted' | 'NftBurned' | 'NftSent' | 'NftAccepted' | 'NftRejected' | 'PropertySet' | 'ResourceAdded' | 'ResourceRemoval' | 'ResourceAccepted' | 'ResourceRemovalAccepted' | 'PrioritySet';
- }
-
-<<<<<<< HEAD
- /** @name RmrkTraitsNftAccountIdOrCollectionNftTuple (97) */
- interface RmrkTraitsNftAccountIdOrCollectionNftTuple extends Enum {
- readonly isAccountId: boolean;
- readonly asAccountId: AccountId32;
- readonly isCollectionAndNftTuple: boolean;
- readonly asCollectionAndNftTuple: ITuple<[u32, u32]>;
- readonly type: 'AccountId' | 'CollectionAndNftTuple';
- }
-
- /** @name PalletRmrkEquipEvent (102) */
- interface PalletRmrkEquipEvent extends Enum {
- readonly isBaseCreated: boolean;
- readonly asBaseCreated: {
- readonly issuer: AccountId32;
- readonly baseId: u32;
+ readonly data: UpDataStructsCreateItemExData;
} & Struct;
- readonly isEquippablesUpdated: boolean;
- readonly asEquippablesUpdated: {
- readonly baseId: u32;
- readonly slotId: u32;
- } & Struct;
- readonly type: 'BaseCreated' | 'EquippablesUpdated';
- }
-
- /** @name PalletEvmEvent (103) */
- interface PalletEvmEvent extends Enum {
- readonly isLog: boolean;
- readonly asLog: EthereumLog;
- readonly isCreated: boolean;
- readonly asCreated: H160;
- readonly isCreatedFailed: boolean;
- readonly asCreatedFailed: H160;
- readonly isExecuted: boolean;
- readonly asExecuted: H160;
- readonly isExecutedFailed: boolean;
- readonly asExecutedFailed: H160;
- readonly isBalanceDeposit: boolean;
- readonly asBalanceDeposit: ITuple<[AccountId32, H160, U256]>;
- readonly isBalanceWithdraw: boolean;
- readonly asBalanceWithdraw: ITuple<[AccountId32, H160, U256]>;
- readonly type: 'Log' | 'Created' | 'CreatedFailed' | 'Executed' | 'ExecutedFailed' | 'BalanceDeposit' | 'BalanceWithdraw';
- }
-
- /** @name EthereumLog (104) */
- interface EthereumLog extends Struct {
- readonly address: H160;
- readonly topics: Vec<H256>;
- readonly data: Bytes;
- }
-
- /** @name PalletEthereumEvent (108) */
- interface PalletEthereumEvent extends Enum {
- readonly isExecuted: boolean;
- readonly asExecuted: ITuple<[H160, H160, H256, EvmCoreErrorExitReason]>;
- readonly type: 'Executed';
- }
-
- /** @name EvmCoreErrorExitReason (109) */
- interface EvmCoreErrorExitReason extends Enum {
- readonly isSucceed: boolean;
- readonly asSucceed: EvmCoreErrorExitSucceed;
- readonly isError: boolean;
- readonly asError: EvmCoreErrorExitError;
- readonly isRevert: boolean;
- readonly asRevert: EvmCoreErrorExitRevert;
- readonly isFatal: boolean;
- readonly asFatal: EvmCoreErrorExitFatal;
- readonly type: 'Succeed' | 'Error' | 'Revert' | 'Fatal';
- }
-
- /** @name EvmCoreErrorExitSucceed (110) */
- interface EvmCoreErrorExitSucceed extends Enum {
- readonly isStopped: boolean;
- readonly isReturned: boolean;
- readonly isSuicided: boolean;
- readonly type: 'Stopped' | 'Returned' | 'Suicided';
- }
-
- /** @name EvmCoreErrorExitError (111) */
- interface EvmCoreErrorExitError extends Enum {
- readonly isStackUnderflow: boolean;
- readonly isStackOverflow: boolean;
- readonly isInvalidJump: boolean;
- readonly isInvalidRange: boolean;
- readonly isDesignatedInvalid: boolean;
- readonly isCallTooDeep: boolean;
- readonly isCreateCollision: boolean;
- readonly isCreateContractLimit: boolean;
- readonly isOutOfOffset: boolean;
- readonly isOutOfGas: boolean;
- readonly isOutOfFund: boolean;
- readonly isPcUnderflow: boolean;
- readonly isCreateEmpty: boolean;
- readonly isOther: boolean;
- readonly asOther: Text;
- readonly isInvalidCode: boolean;
- readonly type: 'StackUnderflow' | 'StackOverflow' | 'InvalidJump' | 'InvalidRange' | 'DesignatedInvalid' | 'CallTooDeep' | 'CreateCollision' | 'CreateContractLimit' | 'OutOfOffset' | 'OutOfGas' | 'OutOfFund' | 'PcUnderflow' | 'CreateEmpty' | 'Other' | 'InvalidCode';
- }
-
- /** @name EvmCoreErrorExitRevert (114) */
- interface EvmCoreErrorExitRevert extends Enum {
- readonly isReverted: boolean;
- readonly type: 'Reverted';
- }
-
- /** @name EvmCoreErrorExitFatal (115) */
- interface EvmCoreErrorExitFatal extends Enum {
- readonly isNotSupported: boolean;
- readonly isUnhandledInterrupt: boolean;
- readonly isCallErrorAsFatal: boolean;
- readonly asCallErrorAsFatal: EvmCoreErrorExitError;
- readonly isOther: boolean;
- readonly asOther: Text;
- readonly type: 'NotSupported' | 'UnhandledInterrupt' | 'CallErrorAsFatal' | 'Other';
- }
-
- /** @name FrameSystemPhase (116) */
- interface FrameSystemPhase extends Enum {
- readonly isApplyExtrinsic: boolean;
- readonly asApplyExtrinsic: u32;
- readonly isFinalization: boolean;
- readonly isInitialization: boolean;
- readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization';
- }
-
- /** @name FrameSystemLastRuntimeUpgradeInfo (118) */
- interface FrameSystemLastRuntimeUpgradeInfo extends Struct {
- readonly specVersion: Compact<u32>;
- readonly specName: Text;
- }
-
- /** @name FrameSystemCall (119) */
- interface FrameSystemCall extends Enum {
- readonly isFillBlock: boolean;
- readonly asFillBlock: {
- readonly ratio: Perbill;
+ readonly isSetTransfersEnabledFlag: boolean;
+ readonly asSetTransfersEnabledFlag: {
+ readonly collectionId: u32;
+ readonly value: bool;
} & Struct;
- readonly isRemark: boolean;
- readonly asRemark: {
- readonly remark: Bytes;
+ readonly isBurnItem: boolean;
+ readonly asBurnItem: {
+ readonly collectionId: u32;
+ readonly itemId: u32;
+ readonly value: u128;
} & Struct;
- readonly isSetHeapPages: boolean;
- readonly asSetHeapPages: {
- readonly pages: u64;
+ readonly isBurnFrom: boolean;
+ readonly asBurnFrom: {
+ readonly collectionId: u32;
+ readonly from: PalletEvmAccountBasicCrossAccountIdRepr;
+ readonly itemId: u32;
+ readonly value: u128;
} & Struct;
readonly isSetCode: boolean;
readonly asSetCode: {
@@ -1813,21 +1656,7 @@
readonly asRemarkWithEvent: {
readonly remark: Bytes;
} & Struct;
- readonly type: 'FillBlock' | 'Remark' | 'SetHeapPages' | 'SetCode' | 'SetCodeWithoutChecks' | 'SetStorage' | 'KillStorage' | 'KillPrefix' | 'RemarkWithEvent';
- }
-
- /** @name FrameSystemLimitsBlockWeights (124) */
- interface FrameSystemLimitsBlockWeights extends Struct {
- readonly baseBlock: u64;
- readonly maxBlock: u64;
- readonly perClass: FrameSupportWeightsPerDispatchClassWeightsPerClass;
- }
-
- /** @name FrameSupportWeightsPerDispatchClassWeightsPerClass (125) */
- interface FrameSupportWeightsPerDispatchClassWeightsPerClass extends Struct {
- readonly normal: FrameSystemLimitsWeightsPerClass;
- readonly operational: FrameSystemLimitsWeightsPerClass;
- readonly mandatory: FrameSystemLimitsWeightsPerClass;
+ readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition';
}
/** @name UpDataStructsCollectionMode (155) */
@@ -1839,7 +1668,7 @@
readonly type: 'Nft' | 'Fungible' | 'ReFungible';
}
- /** @name UpDataStructsCreateCollectionData (156) */
+ /** @name UpDataStructsCreateCollectionData (155) */
export interface UpDataStructsCreateCollectionData extends Struct {
readonly mode: UpDataStructsCollectionMode;
readonly access: Option<UpDataStructsAccessMode>;
@@ -1853,14 +1682,14 @@
readonly properties: Vec<UpDataStructsProperty>;
}
- /** @name UpDataStructsAccessMode (158) */
+ /** @name UpDataStructsAccessMode (157) */
export interface UpDataStructsAccessMode extends Enum {
readonly isNormal: boolean;
readonly isAllowList: boolean;
readonly type: 'Normal' | 'AllowList';
}
- /** @name UpDataStructsCollectionLimits (161) */
+ /** @name UpDataStructsCollectionLimits (160) */
export interface UpDataStructsCollectionLimits extends Struct {
readonly accountTokenOwnershipLimit: Option<u32>;
readonly sponsoredDataSize: Option<u32>;
@@ -1873,7 +1702,7 @@
readonly transfersEnabled: Option<bool>;
}
- /** @name UpDataStructsSponsoringRateLimit (163) */
+ /** @name UpDataStructsSponsoringRateLimit (162) */
export interface UpDataStructsSponsoringRateLimit extends Enum {
readonly isSponsoringDisabled: boolean;
readonly isBlocks: boolean;
@@ -1881,43 +1710,43 @@
readonly type: 'SponsoringDisabled' | 'Blocks';
}
- /** @name UpDataStructsCollectionPermissions (166) */
+ /** @name UpDataStructsCollectionPermissions (165) */
export interface UpDataStructsCollectionPermissions extends Struct {
readonly access: Option<UpDataStructsAccessMode>;
readonly mintMode: Option<bool>;
readonly nesting: Option<UpDataStructsNestingPermissions>;
}
- /** @name UpDataStructsNestingPermissions (168) */
+ /** @name UpDataStructsNestingPermissions (167) */
export interface UpDataStructsNestingPermissions extends Struct {
readonly tokenOwner: bool;
readonly collectionAdmin: bool;
readonly restricted: Option<UpDataStructsOwnerRestrictedSet>;
}
- /** @name UpDataStructsOwnerRestrictedSet (170) */
+ /** @name UpDataStructsOwnerRestrictedSet (169) */
export interface UpDataStructsOwnerRestrictedSet extends BTreeSet<u32> {}
- /** @name UpDataStructsPropertyKeyPermission (176) */
+ /** @name UpDataStructsPropertyKeyPermission (175) */
export interface UpDataStructsPropertyKeyPermission extends Struct {
readonly key: Bytes;
readonly permission: UpDataStructsPropertyPermission;
}
- /** @name UpDataStructsPropertyPermission (178) */
+ /** @name UpDataStructsPropertyPermission (177) */
export interface UpDataStructsPropertyPermission extends Struct {
readonly mutable: bool;
readonly collectionAdmin: bool;
readonly tokenOwner: bool;
}
- /** @name UpDataStructsProperty (181) */
+ /** @name UpDataStructsProperty (180) */
export interface UpDataStructsProperty extends Struct {
readonly key: Bytes;
readonly value: Bytes;
}
- /** @name PalletEvmAccountBasicCrossAccountIdRepr (184) */
+ /** @name PalletEvmAccountBasicCrossAccountIdRepr (183) */
export interface PalletEvmAccountBasicCrossAccountIdRepr extends Enum {
readonly isSubstrate: boolean;
readonly asSubstrate: AccountId32;
@@ -1926,7 +1755,7 @@
readonly type: 'Substrate' | 'Ethereum';
}
- /** @name UpDataStructsCreateItemData (186) */
+ /** @name UpDataStructsCreateItemData (185) */
export interface UpDataStructsCreateItemData extends Enum {
readonly isNft: boolean;
readonly asNft: UpDataStructsCreateNftData;
@@ -1937,17 +1766,17 @@
readonly type: 'Nft' | 'Fungible' | 'ReFungible';
}
- /** @name UpDataStructsCreateNftData (187) */
+ /** @name UpDataStructsCreateNftData (186) */
export interface UpDataStructsCreateNftData extends Struct {
readonly properties: Vec<UpDataStructsProperty>;
}
- /** @name UpDataStructsCreateFungibleData (188) */
+ /** @name UpDataStructsCreateFungibleData (187) */
export interface UpDataStructsCreateFungibleData extends Struct {
readonly value: u128;
}
- /** @name UpDataStructsCreateReFungibleData (189) */
+ /** @name UpDataStructsCreateReFungibleData (188) */
export interface UpDataStructsCreateReFungibleData extends Struct {
readonly pieces: u128;
readonly properties: Vec<UpDataStructsProperty>;
@@ -2028,7 +1857,7 @@
readonly properties: Vec<UpDataStructsProperty>;
}
- /** @name PalletUniqueSchedulerCall (205) */
+ /** @name PalletUniqueSchedulerCall (204) */
export interface PalletUniqueSchedulerCall extends Enum {
readonly isScheduleNamed: boolean;
readonly asScheduleNamed: {
@@ -2053,7 +1882,7 @@
readonly type: 'ScheduleNamed' | 'CancelNamed' | 'ScheduleNamedAfter';
}
- /** @name FrameSupportScheduleMaybeHashed (207) */
+ /** @name FrameSupportScheduleMaybeHashed (206) */
export interface FrameSupportScheduleMaybeHashed extends Enum {
readonly isValue: boolean;
readonly asValue: Call;
@@ -2062,13 +1891,13 @@
readonly type: 'Value' | 'Hash';
}
- /** @name PalletTemplateTransactionPaymentCall (208) */
+ /** @name PalletTemplateTransactionPaymentCall (207) */
export type PalletTemplateTransactionPaymentCall = Null;
- /** @name PalletStructureCall (209) */
+ /** @name PalletStructureCall (208) */
export type PalletStructureCall = Null;
- /** @name PalletRmrkCoreCall (210) */
+ /** @name PalletRmrkCoreCall (209) */
export interface PalletRmrkCoreCall extends Enum {
readonly isCreateCollection: boolean;
readonly asCreateCollection: {
@@ -2174,7 +2003,7 @@
readonly type: 'CreateCollection' | 'DestroyCollection' | 'ChangeCollectionIssuer' | 'LockCollection' | 'MintNft' | 'BurnNft' | 'Send' | 'AcceptNft' | 'RejectNft' | 'AcceptResource' | 'AcceptResourceRemoval' | 'SetProperty' | 'SetPriority' | 'AddBasicResource' | 'AddComposableResource' | 'AddSlotResource' | 'RemoveResource';
}
- /** @name RmrkTraitsResourceResourceTypes (216) */
+ /** @name RmrkTraitsResourceResourceTypes (215) */
export interface RmrkTraitsResourceResourceTypes extends Enum {
readonly isBasic: boolean;
readonly asBasic: RmrkTraitsResourceBasicResource;
@@ -2185,7 +2014,7 @@
readonly type: 'Basic' | 'Composable' | 'Slot';
}
- /** @name RmrkTraitsResourceBasicResource (218) */
+ /** @name RmrkTraitsResourceBasicResource (217) */
export interface RmrkTraitsResourceBasicResource extends Struct {
readonly src: Option<Bytes>;
readonly metadata: Option<Bytes>;
@@ -2193,7 +2022,7 @@
readonly thumb: Option<Bytes>;
}
- /** @name RmrkTraitsResourceComposableResource (220) */
+ /** @name RmrkTraitsResourceComposableResource (219) */
export interface RmrkTraitsResourceComposableResource extends Struct {
readonly parts: Vec<u32>;
readonly base: u32;
@@ -2203,7 +2032,7 @@
readonly thumb: Option<Bytes>;
}
- /** @name RmrkTraitsResourceSlotResource (221) */
+ /** @name RmrkTraitsResourceSlotResource (220) */
export interface RmrkTraitsResourceSlotResource extends Struct {
readonly base: u32;
readonly src: Option<Bytes>;
@@ -2213,7 +2042,7 @@
readonly thumb: Option<Bytes>;
}
- /** @name RmrkTraitsNftAccountIdOrCollectionNftTuple (223) */
+ /** @name RmrkTraitsNftAccountIdOrCollectionNftTuple (222) */
export interface RmrkTraitsNftAccountIdOrCollectionNftTuple extends Enum {
readonly isAccountId: boolean;
readonly asAccountId: AccountId32;
@@ -2222,7 +2051,7 @@
readonly type: 'AccountId' | 'CollectionAndNftTuple';
}
- /** @name PalletRmrkEquipCall (227) */
+ /** @name PalletRmrkEquipCall (226) */
export interface PalletRmrkEquipCall extends Enum {
readonly isCreateBase: boolean;
readonly asCreateBase: {
@@ -2244,7 +2073,7 @@
readonly type: 'CreateBase' | 'ThemeAdd' | 'Equippable';
}
- /** @name RmrkTraitsPartPartType (230) */
+ /** @name RmrkTraitsPartPartType (229) */
export interface RmrkTraitsPartPartType extends Enum {
readonly isFixedPart: boolean;
readonly asFixedPart: RmrkTraitsPartFixedPart;
@@ -2253,14 +2082,14 @@
readonly type: 'FixedPart' | 'SlotPart';
}
- /** @name RmrkTraitsPartFixedPart (232) */
+ /** @name RmrkTraitsPartFixedPart (231) */
export interface RmrkTraitsPartFixedPart extends Struct {
readonly id: u32;
readonly z: u32;
readonly src: Bytes;
}
- /** @name RmrkTraitsPartSlotPart (233) */
+ /** @name RmrkTraitsPartSlotPart (232) */
export interface RmrkTraitsPartSlotPart extends Struct {
readonly id: u32;
readonly equippable: RmrkTraitsPartEquippableList;
@@ -2268,25 +2097,46 @@
readonly z: u32;
}
- /** @name RmrkTraitsPartEquippableList (234) */
+ /** @name RmrkTraitsPartEquippableList (233) */
export interface RmrkTraitsPartEquippableList extends Enum {
readonly isAll: boolean;
readonly type: 'Fee' | 'Misc' | 'All';
}
- /** @name RmrkTraitsTheme (236) */
+ /** @name RmrkTraitsTheme (235) */
export interface RmrkTraitsTheme extends Struct {
readonly name: Bytes;
readonly properties: Vec<RmrkTraitsThemeThemeProperty>;
readonly inherit: bool;
}
- /** @name RmrkTraitsThemeThemeProperty (238) */
+ /** @name RmrkTraitsThemeThemeProperty (237) */
export interface RmrkTraitsThemeThemeProperty extends Struct {
readonly key: Bytes;
readonly value: Bytes;
}
+ /** @name PalletAppPromotionCall (239) */
+ export interface PalletAppPromotionCall extends Enum {
+ readonly isSetAdminAddress: boolean;
+ readonly asSetAdminAddress: {
+ readonly admin: AccountId32;
+ } & Struct;
+ readonly isStartAppPromotion: boolean;
+ readonly asStartAppPromotion: {
+ readonly promotionStartRelayBlock: u32;
+ } & Struct;
+ readonly isStake: boolean;
+ readonly asStake: {
+ readonly amount: u128;
+ } & Struct;
+ readonly isUnstake: boolean;
+ readonly asUnstake: {
+ readonly amount: u128;
+ } & Struct;
+ readonly type: 'SetAdminAddress' | 'StartAppPromotion' | 'Stake' | 'Unstake';
+ }
+
/** @name PalletEvmCall (240) */
export interface PalletEvmCall extends Enum {
readonly isWithdraw: boolean;
@@ -3213,7 +3063,7 @@
readonly type: 'Unknown' | 'OverLimit';
}
- /** @name PalletUniqueError (346) */
+ /** @name PalletUniqueError (345) */
export interface PalletUniqueError extends Enum {
readonly isCollectionDecimalPointLimitExceeded: boolean;
readonly isConfirmUnsetSponsorFail: boolean;
@@ -3222,7 +3072,7 @@
readonly type: 'CollectionDecimalPointLimitExceeded' | 'ConfirmUnsetSponsorFail' | 'EmptyArgument' | 'RepartitionCalledOnNonRefungibleCollection';
}
- /** @name PalletUniqueSchedulerScheduledV3 (349) */
+ /** @name PalletUniqueSchedulerScheduledV3 (348) */
export interface PalletUniqueSchedulerScheduledV3 extends Struct {
readonly maybeId: Option<U8aFixed>;
readonly priority: u8;
@@ -3231,7 +3081,7 @@
readonly origin: OpalRuntimeOriginCaller;
}
- /** @name OpalRuntimeOriginCaller (350) */
+ /** @name OpalRuntimeOriginCaller (349) */
export interface OpalRuntimeOriginCaller extends Enum {
readonly isVoid: boolean;
readonly isSystem: boolean;
@@ -3246,7 +3096,7 @@
readonly type: 'System' | 'Void' | 'PolkadotXcm' | 'CumulusXcm' | 'Ethereum';
}
- /** @name FrameSupportDispatchRawOrigin (351) */
+ /** @name FrameSupportDispatchRawOrigin (350) */
export interface FrameSupportDispatchRawOrigin extends Enum {
readonly isRoot: boolean;
readonly isSigned: boolean;
@@ -3255,7 +3105,7 @@
readonly type: 'Root' | 'Signed' | 'None';
}
- /** @name PalletXcmOrigin (352) */
+ /** @name PalletXcmOrigin (351) */
export interface PalletXcmOrigin extends Enum {
readonly isXcm: boolean;
readonly asXcm: XcmV1MultiLocation;
@@ -3264,7 +3114,7 @@
readonly type: 'Xcm' | 'Response';
}
- /** @name CumulusPalletXcmOrigin (353) */
+ /** @name CumulusPalletXcmOrigin (352) */
export interface CumulusPalletXcmOrigin extends Enum {
readonly isRelay: boolean;
readonly isSiblingParachain: boolean;
@@ -3272,17 +3122,17 @@
readonly type: 'Relay' | 'SiblingParachain';
}
- /** @name PalletEthereumRawOrigin (354) */
+ /** @name PalletEthereumRawOrigin (353) */
export interface PalletEthereumRawOrigin extends Enum {
readonly isEthereumTransaction: boolean;
readonly asEthereumTransaction: H160;
readonly type: 'EthereumTransaction';
}
- /** @name SpCoreVoid (355) */
+ /** @name SpCoreVoid (354) */
export type SpCoreVoid = Null;
- /** @name PalletUniqueSchedulerError (356) */
+ /** @name PalletUniqueSchedulerError (355) */
export interface PalletUniqueSchedulerError extends Enum {
readonly isFailedToSchedule: boolean;
readonly isNotFound: boolean;
@@ -3291,7 +3141,7 @@
readonly type: 'FailedToSchedule' | 'NotFound' | 'TargetBlockNumberInPast' | 'RescheduleNoChange';
}
- /** @name UpDataStructsCollection (357) */
+ /** @name UpDataStructsCollection (356) */
export interface UpDataStructsCollection extends Struct {
readonly owner: AccountId32;
readonly mode: UpDataStructsCollectionMode;
@@ -3304,7 +3154,7 @@
readonly externalCollection: bool;
}
- /** @name UpDataStructsSponsorshipState (358) */
+ /** @name UpDataStructsSponsorshipState (357) */
export interface UpDataStructsSponsorshipState extends Enum {
readonly isDisabled: boolean;
readonly isUnconfirmed: boolean;
@@ -3314,43 +3164,43 @@
readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';
}
- /** @name UpDataStructsProperties (359) */
+ /** @name UpDataStructsProperties (358) */
export interface UpDataStructsProperties extends Struct {
readonly map: UpDataStructsPropertiesMapBoundedVec;
readonly consumedSpace: u32;
readonly spaceLimit: u32;
}
- /** @name UpDataStructsPropertiesMapBoundedVec (360) */
+ /** @name UpDataStructsPropertiesMapBoundedVec (359) */
export interface UpDataStructsPropertiesMapBoundedVec extends BTreeMap<Bytes, Bytes> {}
- /** @name UpDataStructsPropertiesMapPropertyPermission (365) */
+ /** @name UpDataStructsPropertiesMapPropertyPermission (364) */
export interface UpDataStructsPropertiesMapPropertyPermission extends BTreeMap<Bytes, UpDataStructsPropertyPermission> {}
- /** @name UpDataStructsCollectionStats (372) */
+ /** @name UpDataStructsCollectionStats (371) */
export interface UpDataStructsCollectionStats extends Struct {
readonly created: u32;
readonly destroyed: u32;
readonly alive: u32;
}
- /** @name UpDataStructsTokenChild (373) */
+ /** @name UpDataStructsTokenChild (372) */
export interface UpDataStructsTokenChild extends Struct {
readonly token: u32;
readonly collection: u32;
}
- /** @name PhantomTypeUpDataStructs (374) */
+ /** @name PhantomTypeUpDataStructs (373) */
export interface PhantomTypeUpDataStructs extends Vec<ITuple<[UpDataStructsTokenData, UpDataStructsRpcCollection, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftNftInfo, RmrkTraitsResourceResourceInfo, RmrkTraitsPropertyPropertyInfo, RmrkTraitsBaseBaseInfo, RmrkTraitsPartPartType, RmrkTraitsTheme, RmrkTraitsNftNftChild]>> {}
- /** @name UpDataStructsTokenData (376) */
+ /** @name UpDataStructsTokenData (375) */
export interface UpDataStructsTokenData extends Struct {
readonly properties: Vec<UpDataStructsProperty>;
readonly owner: Option<PalletEvmAccountBasicCrossAccountIdRepr>;
readonly pieces: u128;
}
- /** @name UpDataStructsRpcCollection (378) */
+ /** @name UpDataStructsRpcCollection (377) */
export interface UpDataStructsRpcCollection extends Struct {
readonly owner: AccountId32;
readonly mode: UpDataStructsCollectionMode;
@@ -3365,7 +3215,7 @@
readonly readOnly: bool;
}
- /** @name RmrkTraitsCollectionCollectionInfo (379) */
+ /** @name RmrkTraitsCollectionCollectionInfo (378) */
export interface RmrkTraitsCollectionCollectionInfo extends Struct {
readonly issuer: AccountId32;
readonly metadata: Bytes;
@@ -3374,7 +3224,7 @@
readonly nftsCount: u32;
}
- /** @name RmrkTraitsNftNftInfo (380) */
+ /** @name RmrkTraitsNftNftInfo (379) */
export interface RmrkTraitsNftNftInfo extends Struct {
readonly owner: RmrkTraitsNftAccountIdOrCollectionNftTuple;
readonly royalty: Option<RmrkTraitsNftRoyaltyInfo>;
@@ -3383,13 +3233,13 @@
readonly pending: bool;
}
- /** @name RmrkTraitsNftRoyaltyInfo (382) */
+ /** @name RmrkTraitsNftRoyaltyInfo (381) */
export interface RmrkTraitsNftRoyaltyInfo extends Struct {
readonly recipient: AccountId32;
readonly amount: Permill;
}
- /** @name RmrkTraitsResourceResourceInfo (383) */
+ /** @name RmrkTraitsResourceResourceInfo (382) */
export interface RmrkTraitsResourceResourceInfo extends Struct {
readonly id: u32;
readonly resource: RmrkTraitsResourceResourceTypes;
@@ -3397,26 +3247,26 @@
readonly pendingRemoval: bool;
}
- /** @name RmrkTraitsPropertyPropertyInfo (384) */
+ /** @name RmrkTraitsPropertyPropertyInfo (383) */
export interface RmrkTraitsPropertyPropertyInfo extends Struct {
readonly key: Bytes;
readonly value: Bytes;
}
- /** @name RmrkTraitsBaseBaseInfo (385) */
+ /** @name RmrkTraitsBaseBaseInfo (384) */
export interface RmrkTraitsBaseBaseInfo extends Struct {
readonly issuer: AccountId32;
readonly baseType: Bytes;
readonly symbol: Bytes;
}
- /** @name RmrkTraitsNftNftChild (386) */
+ /** @name RmrkTraitsNftNftChild (385) */
export interface RmrkTraitsNftNftChild extends Struct {
readonly collectionId: u32;
readonly nftId: u32;
}
- /** @name PalletCommonError (388) */
+ /** @name PalletCommonError (387) */
export interface PalletCommonError extends Enum {
readonly isCollectionNotFound: boolean;
readonly isMustBeTokenOwner: boolean;
@@ -3455,7 +3305,7 @@
readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'CantDestroyNotEmptyCollection' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'UserIsNotAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey' | 'CollectionIsExternal' | 'CollectionIsInternal';
}
- /** @name PalletFungibleError (390) */
+ /** @name PalletFungibleError (389) */
export interface PalletFungibleError extends Enum {
readonly isNotFungibleDataUsedToMintFungibleCollectionToken: boolean;
readonly isFungibleItemsHaveNoId: boolean;
@@ -3465,13 +3315,13 @@
readonly type: 'NotFungibleDataUsedToMintFungibleCollectionToken' | 'FungibleItemsHaveNoId' | 'FungibleItemsDontHaveData' | 'FungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';
}
- /** @name PalletRefungibleItemData (391) */
+ /** @name PalletRefungibleItemData (390) */
export interface PalletRefungibleItemData extends Struct {
readonly constData: Bytes;
}
- /** @name PalletRefungibleError (397) */
- interface PalletRefungibleError extends Enum {
+ /** @name PalletRefungibleError (394) */
+ export interface PalletRefungibleError extends Enum {
readonly isNotRefungibleDataUsedToMintFungibleCollectionToken: boolean;
readonly isWrongRefungiblePieces: boolean;
readonly isRepartitionWhileNotOwningAllPieces: boolean;
@@ -3480,29 +3330,29 @@
readonly type: 'NotRefungibleDataUsedToMintFungibleCollectionToken' | 'WrongRefungiblePieces' | 'RepartitionWhileNotOwningAllPieces' | 'RefungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';
}
- /** @name PalletNonfungibleItemData (398) */
- interface PalletNonfungibleItemData extends Struct {
+ /** @name PalletNonfungibleItemData (395) */
+ export interface PalletNonfungibleItemData extends Struct {
readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
}
- /** @name UpDataStructsPropertyScope (400) */
- interface UpDataStructsPropertyScope extends Enum {
+ /** @name UpDataStructsPropertyScope (397) */
+ export interface UpDataStructsPropertyScope extends Enum {
readonly isNone: boolean;
readonly isRmrk: boolean;
readonly isEth: boolean;
readonly type: 'None' | 'Rmrk' | 'Eth';
}
- /** @name PalletNonfungibleError (402) */
- interface PalletNonfungibleError extends Enum {
+ /** @name PalletNonfungibleError (399) */
+ export interface PalletNonfungibleError extends Enum {
readonly isNotNonfungibleDataUsedToMintFungibleCollectionToken: boolean;
readonly isNonfungibleItemsHaveNoAmount: boolean;
readonly isCantBurnNftWithChildren: boolean;
readonly type: 'NotNonfungibleDataUsedToMintFungibleCollectionToken' | 'NonfungibleItemsHaveNoAmount' | 'CantBurnNftWithChildren';
}
- /** @name PalletStructureError (403) */
- interface PalletStructureError extends Enum {
+ /** @name PalletStructureError (400) */
+ export interface PalletStructureError extends Enum {
readonly isOuroborosDetected: boolean;
readonly isDepthLimit: boolean;
readonly isBreadthLimit: boolean;
@@ -3510,8 +3360,8 @@
readonly type: 'OuroborosDetected' | 'DepthLimit' | 'BreadthLimit' | 'TokenNotFound';
}
- /** @name PalletRmrkCoreError (404) */
- interface PalletRmrkCoreError extends Enum {
+ /** @name PalletRmrkCoreError (401) */
+ export interface PalletRmrkCoreError extends Enum {
readonly isCorruptedCollectionType: boolean;
readonly isRmrkPropertyKeyIsTooLong: boolean;
readonly isRmrkPropertyValueIsTooLong: boolean;
@@ -3534,8 +3384,8 @@
readonly type: 'CorruptedCollectionType' | 'RmrkPropertyKeyIsTooLong' | 'RmrkPropertyValueIsTooLong' | 'RmrkPropertyIsNotFound' | 'UnableToDecodeRmrkData' | 'CollectionNotEmpty' | 'NoAvailableCollectionId' | 'NoAvailableNftId' | 'CollectionUnknown' | 'NoPermission' | 'NonTransferable' | 'CollectionFullOrLocked' | 'ResourceDoesntExist' | 'CannotSendToDescendentOrSelf' | 'CannotAcceptNonOwnedNft' | 'CannotRejectNonOwnedNft' | 'CannotRejectNonPendingNft' | 'ResourceNotPending' | 'NoAvailableResourceId';
}
- /** @name PalletRmrkEquipError (406) */
- interface PalletRmrkEquipError extends Enum {
+ /** @name PalletRmrkEquipError (403) */
+ export interface PalletRmrkEquipError extends Enum {
readonly isPermissionError: boolean;
readonly isNoAvailableBaseId: boolean;
readonly isNoAvailablePartId: boolean;
@@ -3546,8 +3396,8 @@
readonly type: 'PermissionError' | 'NoAvailableBaseId' | 'NoAvailablePartId' | 'BaseDoesntExist' | 'NeedsDefaultThemeFirst' | 'PartDoesntExist' | 'NoEquippableOnFixedPart';
}
- /** @name PalletEvmError (409) */
- interface PalletEvmError extends Enum {
+ /** @name PalletEvmError (406) */
+ export interface PalletEvmError extends Enum {
readonly isBalanceLow: boolean;
readonly isFeeOverflow: boolean;
readonly isPaymentOverflow: boolean;
@@ -3557,8 +3407,8 @@
readonly type: 'BalanceLow' | 'FeeOverflow' | 'PaymentOverflow' | 'WithdrawFailed' | 'GasPriceTooLow' | 'InvalidNonce';
}
- /** @name FpRpcTransactionStatus (412) */
- interface FpRpcTransactionStatus extends Struct {
+ /** @name FpRpcTransactionStatus (409) */
+ export interface FpRpcTransactionStatus extends Struct {
readonly transactionHash: H256;
readonly transactionIndex: u32;
readonly from: H160;
@@ -3568,11 +3418,11 @@
readonly logsBloom: EthbloomBloom;
}
- /** @name EthbloomBloom (414) */
- interface EthbloomBloom extends U8aFixed {}
+ /** @name EthbloomBloom (411) */
+ export interface EthbloomBloom extends U8aFixed {}
- /** @name EthereumReceiptReceiptV3 (416) */
- interface EthereumReceiptReceiptV3 extends Enum {
+ /** @name EthereumReceiptReceiptV3 (413) */
+ export interface EthereumReceiptReceiptV3 extends Enum {
readonly isLegacy: boolean;
readonly asLegacy: EthereumReceiptEip658ReceiptData;
readonly isEip2930: boolean;
@@ -3582,23 +3432,23 @@
readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';
}
- /** @name EthereumReceiptEip658ReceiptData (417) */
- interface EthereumReceiptEip658ReceiptData extends Struct {
+ /** @name EthereumReceiptEip658ReceiptData (414) */
+ export interface EthereumReceiptEip658ReceiptData extends Struct {
readonly statusCode: u8;
readonly usedGas: U256;
readonly logsBloom: EthbloomBloom;
readonly logs: Vec<EthereumLog>;
}
- /** @name EthereumBlock (418) */
- interface EthereumBlock extends Struct {
+ /** @name EthereumBlock (415) */
+ export interface EthereumBlock extends Struct {
readonly header: EthereumHeader;
readonly transactions: Vec<EthereumTransactionTransactionV2>;
readonly ommers: Vec<EthereumHeader>;
}
- /** @name EthereumHeader (419) */
- interface EthereumHeader extends Struct {
+ /** @name EthereumHeader (416) */
+ export interface EthereumHeader extends Struct {
readonly parentHash: H256;
readonly ommersHash: H256;
readonly beneficiary: H160;
@@ -3616,46 +3466,46 @@
readonly nonce: EthereumTypesHashH64;
}
- /** @name EthereumTypesHashH64 (420) */
- interface EthereumTypesHashH64 extends U8aFixed {}
+ /** @name EthereumTypesHashH64 (417) */
+ export interface EthereumTypesHashH64 extends U8aFixed {}
- /** @name PalletEthereumError (425) */
- interface PalletEthereumError extends Enum {
+ /** @name PalletEthereumError (422) */
+ export interface PalletEthereumError extends Enum {
readonly isInvalidSignature: boolean;
readonly isPreLogExists: boolean;
readonly type: 'InvalidSignature' | 'PreLogExists';
}
- /** @name PalletEvmCoderSubstrateError (426) */
- interface PalletEvmCoderSubstrateError extends Enum {
+ /** @name PalletEvmCoderSubstrateError (423) */
+ export interface PalletEvmCoderSubstrateError extends Enum {
readonly isOutOfGas: boolean;
readonly isOutOfFund: boolean;
readonly type: 'OutOfGas' | 'OutOfFund';
}
- /** @name PalletEvmContractHelpersSponsoringModeT (427) */
- interface PalletEvmContractHelpersSponsoringModeT extends Enum {
+ /** @name PalletEvmContractHelpersSponsoringModeT (424) */
+ export interface PalletEvmContractHelpersSponsoringModeT extends Enum {
readonly isDisabled: boolean;
readonly isAllowlisted: boolean;
readonly isGenerous: boolean;
readonly type: 'Disabled' | 'Allowlisted' | 'Generous';
}
- /** @name PalletEvmContractHelpersError (429) */
- interface PalletEvmContractHelpersError extends Enum {
+ /** @name PalletEvmContractHelpersError (426) */
+ export interface PalletEvmContractHelpersError extends Enum {
readonly isNoPermission: boolean;
readonly type: 'NoPermission';
}
- /** @name PalletEvmMigrationError (430) */
- interface PalletEvmMigrationError extends Enum {
+ /** @name PalletEvmMigrationError (427) */
+ export interface PalletEvmMigrationError extends Enum {
readonly isAccountNotEmpty: boolean;
readonly isAccountIsNotMigrating: boolean;
readonly type: 'AccountNotEmpty' | 'AccountIsNotMigrating';
}
- /** @name SpRuntimeMultiSignature (432) */
- interface SpRuntimeMultiSignature extends Enum {
+ /** @name SpRuntimeMultiSignature (429) */
+ export interface SpRuntimeMultiSignature extends Enum {
readonly isEd25519: boolean;
readonly asEd25519: SpCoreEd25519Signature;
readonly isSr25519: boolean;
@@ -3665,34 +3515,34 @@
readonly type: 'Ed25519' | 'Sr25519' | 'Ecdsa';
}
- /** @name SpCoreEd25519Signature (433) */
- interface SpCoreEd25519Signature extends U8aFixed {}
+ /** @name SpCoreEd25519Signature (430) */
+ export interface SpCoreEd25519Signature extends U8aFixed {}
- /** @name SpCoreSr25519Signature (435) */
- interface SpCoreSr25519Signature extends U8aFixed {}
+ /** @name SpCoreSr25519Signature (434) */
+ export interface SpCoreSr25519Signature extends U8aFixed {}
- /** @name SpCoreEcdsaSignature (436) */
- interface SpCoreEcdsaSignature extends U8aFixed {}
+ /** @name SpCoreEcdsaSignature (435) */
+ export interface SpCoreEcdsaSignature extends U8aFixed {}
- /** @name FrameSystemExtensionsCheckSpecVersion (439) */
- type FrameSystemExtensionsCheckSpecVersion = Null;
+ /** @name FrameSystemExtensionsCheckSpecVersion (438) */
+ export type FrameSystemExtensionsCheckSpecVersion = Null;
- /** @name FrameSystemExtensionsCheckGenesis (440) */
- type FrameSystemExtensionsCheckGenesis = Null;
+ /** @name FrameSystemExtensionsCheckGenesis (439) */
+ export type FrameSystemExtensionsCheckGenesis = Null;
- /** @name FrameSystemExtensionsCheckNonce (443) */
- interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}
+ /** @name FrameSystemExtensionsCheckNonce (442) */
+ export interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}
- /** @name FrameSystemExtensionsCheckWeight (444) */
- type FrameSystemExtensionsCheckWeight = Null;
+ /** @name FrameSystemExtensionsCheckWeight (443) */
+ export type FrameSystemExtensionsCheckWeight = Null;
- /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (445) */
- interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact<u128> {}
+ /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (444) */
+ export interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact<u128> {}
- /** @name OpalRuntimeRuntime (446) */
- type OpalRuntimeRuntime = Null;
+ /** @name OpalRuntimeRuntime (445) */
+ export type OpalRuntimeRuntime = Null;
- /** @name PalletEthereumFakeTransactionFinalizer (447) */
- type PalletEthereumFakeTransactionFinalizer = Null;
+ /** @name PalletEthereumFakeTransactionFinalizer (444) */
+ export type PalletEthereumFakeTransactionFinalizer = Null;
} // declare module
tests/src/interfaces/unique/definitions.tsdiffbeforeafterboth--- a/tests/src/interfaces/unique/definitions.ts
+++ b/tests/src/interfaces/unique/definitions.ts
@@ -190,5 +190,10 @@
[crossAccountParam('staker')],
'u128',
),
+ pendingUnstake: fun(
+ 'Returns the total amount of unstaked tokens',
+ [{name: 'staker', type: CROSS_ACCOUNT_ID_TYPE, isOptional: true}],
+ 'u128',
+ ),
},
};
tests/src/pallet-presence.test.tsdiffbeforeafterboth--- a/tests/src/pallet-presence.test.ts
+++ b/tests/src/pallet-presence.test.ts
@@ -68,9 +68,10 @@
const refungible = 'refungible';
const scheduler = 'scheduler';
const rmrkPallets = ['rmrkcore', 'rmrkequip'];
+ const appPromotion = 'promotion';
if (chain.eq('OPAL by UNIQUE')) {
- requiredPallets.push(refungible, scheduler, ...rmrkPallets);
+ requiredPallets.push(refungible, scheduler, appPromotion, ...rmrkPallets);
} else if (chain.eq('QUARTZ by UNIQUE')) {
// Insert Quartz additional pallets here
} else if (chain.eq('UNIQUE')) {
tests/src/util/helpers.tsdiffbeforeafterboth--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -48,6 +48,7 @@
Fungible = 'fungible',
NFT = 'nonfungible',
Scheduler = 'scheduler',
+ AppPromotion = 'promotion',
}
export async function isUnique(): Promise<boolean> {
tests/src/util/playgrounds/index.tsdiffbeforeafterboth--- a/tests/src/util/playgrounds/index.ts
+++ b/tests/src/util/playgrounds/index.ts
@@ -4,7 +4,10 @@
import {IKeyringPair} from '@polkadot/types/types';
import config from '../../config';
import '../../interfaces/augment-api-events';
-import {DevUniqueHelper} from './unique.dev';
+import * as defs from '../../interfaces/definitions';
+import {ApiPromise, WsProvider} from '@polkadot/api';
+import { UniqueHelper } from './unique';
+
class SilentLogger {
log(msg: any, level: any): void { }
@@ -15,13 +18,53 @@
};
}
-export const usingPlaygrounds = async (code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise<void>) => {
+
+class DevUniqueHelper extends UniqueHelper {
+ async connect(wsEndpoint: string, listeners?: any): Promise<void> {
+ const wsProvider = new WsProvider(wsEndpoint);
+ this.api = new ApiPromise({
+ provider: wsProvider,
+ signedExtensions: {
+ ContractHelpers: {
+ extrinsic: {},
+ payload: {},
+ },
+ FakeTransactionFinalizer: {
+ extrinsic: {},
+ payload: {},
+ },
+ },
+ rpc: {
+ unique: defs.unique.rpc,
+ rmrk: defs.rmrk.rpc,
+ eth: {
+ feeHistory: {
+ description: 'Dummy',
+ params: [],
+ type: 'u8',
+ },
+ maxPriorityFeePerGas: {
+ description: 'Dummy',
+ params: [],
+ type: 'u8',
+ },
+ },
+ },
+ });
+ await this.api.isReadyOrError;
+ this.network = await UniqueHelper.detectNetwork(this.api);
+ }
+}
+
+
+export const usingPlaygrounds = async <T = void> (code: (helper: UniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise<T>) => {
// TODO: Remove, this is temporary: Filter unneeded API output
// (Jaco promised it will be removed in the next version)
const consoleErr = console.error;
const consoleLog = console.log;
const consoleWarn = console.warn;
-
+ let result: T = null as unknown as T;
+
const outFn = (printer: any) => (...args: any[]) => {
for (const arg of args) {
if (typeof arg !== 'string')
@@ -41,7 +84,7 @@
await helper.connect(config.substrateUrl);
const ss58Format = helper.chain.getChainProperties().ss58Format;
const privateKey = (seed: string) => helper.util.fromSeed(seed, ss58Format);
- await code(helper, privateKey);
+ result = await code(helper, privateKey);
}
finally {
await helper.disconnect();
@@ -49,4 +92,5 @@
console.log = consoleLog;
console.warn = consoleWarn;
}
+ return result as T;
};
\ No newline at end of file