From 4d07c60d3d95f593acad6f54a9f5c08555046a1e Mon Sep 17 00:00:00 2001 From: PraetorP Date: Wed, 17 Aug 2022 07:02:51 +0000 Subject: [PATCH] add rpc methods + tests --- --- 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) -> Result; + + /// Return the total amount locked by staking tokens. + #[method(name = "unique_pendingUnstake")] + fn pending_unstake( + &self, + staker: Option, + at: Option, + ) -> Result; } mod rmrk_unique_rpc { @@ -548,6 +556,7 @@ .map(|(b, a)| (b, a.to_string())) .collect::>(), unique_api); pass_method!(total_staking_locked(staker: CrossAccountId) -> String => |v| v.to_string(), unique_api); + pass_method!(pending_unstake(staker: Option) -> String => |v| v.to_string(), unique_api); } #[allow(deprecated)] --- 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, }; --- 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; + /// Weight information for extrinsics in this pallet. + type WeightInfo: WeightInfo; + // The block number provider type BlockNumberProvider: BlockNumberProvider; @@ -136,6 +142,7 @@ fn on_initialize(current_block: T::BlockNumber) -> Weight where ::BlockNumber: From, + // <::Currency as Currency>::Balance: Sum, { PendingUnstake::::iter() .filter_map(|((staker, block), amount)| { @@ -172,7 +179,7 @@ #[pallet::call] impl Pallet { - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_admin_address())] pub fn set_admin_address(origin: OriginFor, admin: T::AccountId) -> DispatchResult { ensure_root(origin)?; >::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, promotion_start_relay_block: T::BlockNumber, @@ -201,7 +208,7 @@ Ok(()) } - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::stake())] pub fn stake(staker: OriginFor, amount: BalanceOf) -> DispatchResult { let staker_id = ensure_signed(staker)?; @@ -210,10 +217,16 @@ ensure!(balance >= amount, ArithmeticError::Underflow); - Self::set_lock_unchecked(&staker_id, amount); + <::Currency as Currency>::ensure_can_withdraw( + &staker_id, + amount, + WithdrawReasons::all(), + balance - amount, + )?; + + Self::add_lock_balance(&staker_id, amount)?; - let block_number = - ::current_block_number(); + let block_number = frame_system::Pallet::::block_number(); >::insert( (&staker_id, block_number), @@ -231,7 +244,7 @@ Ok(()) } - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::unstake())] pub fn unstake(staker: OriginFor, amount: BalanceOf) -> DispatchResult { let staker_id = ensure_signed(staker)?; @@ -249,7 +262,7 @@ .ok_or(ArithmeticError::Underflow)?, ); - let block = ::current_block_number() + WEEK.into(); + let block = frame_system::Pallet::::block_number() + WEEK.into(); >::insert( (&staker_id, block), >::get((&staker_id, block)) @@ -400,8 +413,8 @@ fn add_lock_balance(staker: &T::AccountId, amount: BalanceOf) -> DispatchResult { Self::get_locked_balance(staker) - .map(|l| l.amount) - .and_then(|b| b.checked_add(&amount)) + .map_or(>::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, ) -> Option)>> { - let staked = Staked::::iter_prefix((staker,)) + let mut staked = Staked::::iter_prefix((staker,)) .into_iter() .map(|(block, amount)| (block, amount)) .collect::>(); + staked.sort_by_key(|(block, _)| *block); if !staked.is_empty() { Some(staked) } else { @@ -495,3 +509,14 @@ day_rate * base } } + +impl Pallet +where + <::Currency as Currency>::Balance: Sum, +{ + pub fn cross_id_pending_unstake(staker: Option) -> BalanceOf { + staker.map_or(PendingUnstake::::iter_values().sum(), |s| { + PendingUnstake::::iter_prefix_values((s.as_sub(),)).sum() + }) + } +} --- a/primitives/rpc/src/lib.rs +++ b/primitives/rpc/src/lib.rs @@ -129,5 +129,6 @@ fn total_staked(staker: Option) -> Result; fn total_staked_per_block(staker: CrossAccountId) -> Result>; fn total_staking_locked(staker: CrossAccountId) -> Result; + fn pending_unstake(staker: Option) -> Result; } } --- /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 . + +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; + type TreasuryAccountId = TreasuryAccountId; + type BlockNumberProvider = RelayChainBlockNumberProvider; +} --- 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; --- 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} = 72, + #[runtimes(opal)] + Promotion: pallet_app_promotion::{Pallet, Call, Storage} = 73, + // Frontier EVM: pallet_evm::{Pallet, Config, Call, Storage, Event} = 100, Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 101, --- a/runtime/common/runtime_apis.rs +++ b/runtime/common/runtime_apis.rs @@ -190,7 +190,6 @@ fn total_staked(staker: Option) -> Result { Ok(>::cross_id_total_staked(staker).unwrap_or_default()) - // Ok(0) } fn total_staked_per_block(staker: CrossAccountId) -> Result, DispatchError> { @@ -198,9 +197,12 @@ } fn total_staking_locked(staker: CrossAccountId) -> Result { - // Ok(0) Ok(>::cross_id_locked_balance(staker)) } + + fn pending_unstake(staker: Option) -> Result { + Ok(>::cross_id_pending_unstake(staker)) + } } impl rmrk_rpc::RmrkApi< --- 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 --- 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 . 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 --- 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>>; /** + * Returns the total amount of unstaked tokens + **/ + pendingUnstake: AugmentedRpc<(staker?: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable>; + /** * Get property permissions, optionally limited to the provided keys **/ propertyPermissions: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec | (Text | string)[], at?: Hash | string | Uint8Array) => Observable>>; --- a/tests/src/interfaces/lookup.ts +++ b/tests/src/interfaces/lookup.ts @@ -5,1266 +5,8 @@ export default { /** - * Lookup3: frame_system::AccountInfo> - **/ - FrameSystemAccountInfo: { - nonce: 'u32', - consumers: 'u32', - providers: 'u32', - sufficients: 'u32', - data: 'PalletBalancesAccountData' - }, - /** - * Lookup5: pallet_balances::AccountData - **/ - PalletBalancesAccountData: { - free: 'u128', - reserved: 'u128', - miscFrozen: 'u128', - feeFrozen: 'u128' - }, - /** - * Lookup7: frame_support::weights::PerDispatchClass - **/ - FrameSupportWeightsPerDispatchClassU64: { - normal: 'u64', - operational: 'u64', - mandatory: 'u64' - }, - /** - * Lookup11: sp_runtime::generic::digest::Digest - **/ - SpRuntimeDigest: { - logs: 'Vec' - }, - /** - * 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 - **/ - FrameSystemEventRecord: { - phase: 'FrameSystemPhase', - event: 'Event', - topics: 'Vec' - }, - /** - * Lookup18: frame_system::pallet::Event - **/ - 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 - **/ - 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 - **/ - 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 - **/ - PalletTransactionPaymentEvent: { - _enum: { - TransactionFeePaid: { - who: 'AccountId32', - actualFee: 'u128', - tip: 'u128' - } - } - }, - /** - * Lookup31: pallet_treasury::pallet::Event - **/ - 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 - **/ - PalletSudoEvent: { - _enum: { - Sudid: { - sudoResult: 'Result', - }, - KeyChanged: { - oldSudoer: 'Option', - }, - SudoAsDone: { - sudoResult: 'Result' - } - } - }, - /** - * Lookup36: orml_vesting::module::Event - **/ - OrmlVestingModuleEvent: { - _enum: { - VestingScheduleAdded: { - from: 'AccountId32', - to: 'AccountId32', - vestingSchedule: 'OrmlVestingVestingSchedule', - }, - Claimed: { - who: 'AccountId32', - amount: 'u128', - }, - VestingSchedulesUpdated: { - who: 'AccountId32' - } - } - }, - /** - * Lookup37: orml_vesting::VestingSchedule - **/ - OrmlVestingVestingSchedule: { - start: 'u32', - period: 'u32', - periodCount: 'u32', - perPeriod: 'Compact' - }, - /** - * Lookup39: cumulus_pallet_xcmp_queue::pallet::Event - **/ - CumulusPalletXcmpQueueEvent: { - _enum: { - Success: { - messageHash: 'Option', - weight: 'u64', - }, - Fail: { - messageHash: 'Option', - error: 'XcmV2TraitsError', - weight: 'u64', - }, - BadVersion: { - messageHash: 'Option', - }, - BadFormat: { - messageHash: 'Option', - }, - UpwardMessageSent: { - messageHash: 'Option', - }, - XcmpMessageSent: { - messageHash: 'Option', - }, - 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 - **/ - 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)', - 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', - AccountId32: { - network: 'XcmV0JunctionNetworkId', - id: '[u8;32]', - }, - AccountIndex64: { - network: 'XcmV0JunctionNetworkId', - index: 'Compact', - }, - AccountKey20: { - network: 'XcmV0JunctionNetworkId', - key: '[u8;20]', - }, - PalletInstance: 'u8', - GeneralIndex: 'Compact', - 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', - Executive: 'Null', - Technical: 'Null', - Legislative: 'Null', - Judicial: 'Null' - } - }, - /** - * Lookup54: xcm::v0::junction::BodyPart - **/ - XcmV0JunctionBodyPart: { - _enum: { - Voice: 'Null', - Members: { - count: 'Compact', - }, - Fraction: { - nom: 'Compact', - denom: 'Compact', - }, - AtLeastProportion: { - nom: 'Compact', - denom: 'Compact', - }, - MoreThanProportion: { - nom: 'Compact', - denom: 'Compact' - } - } - }, - /** - * Lookup55: xcm::v2::Xcm - **/ - XcmV2Xcm: 'Vec', - /** - * Lookup57: xcm::v2::Instruction - **/ - XcmV2Instruction: { - _enum: { - WithdrawAsset: 'XcmV1MultiassetMultiAssets', - ReserveAssetDeposited: 'XcmV1MultiassetMultiAssets', - ReceiveTeleportedAsset: 'XcmV1MultiassetMultiAssets', - QueryResponse: { - queryId: 'Compact', - response: 'XcmV2Response', - maxWeight: 'Compact', - }, - TransferAsset: { - assets: 'XcmV1MultiassetMultiAssets', - beneficiary: 'XcmV1MultiLocation', - }, - TransferReserveAsset: { - assets: 'XcmV1MultiassetMultiAssets', - dest: 'XcmV1MultiLocation', - xcm: 'XcmV2Xcm', - }, - Transact: { - originType: 'XcmV0OriginKind', - requireWeightAtMost: 'Compact', - call: 'XcmDoubleEncoded', - }, - HrmpNewChannelOpenRequest: { - sender: 'Compact', - maxMessageSize: 'Compact', - maxCapacity: 'Compact', - }, - HrmpChannelAccepted: { - recipient: 'Compact', - }, - HrmpChannelClosing: { - initiator: 'Compact', - sender: 'Compact', - recipient: 'Compact', - }, - ClearOrigin: 'Null', - DescendOrigin: 'XcmV1MultilocationJunctions', - ReportError: { - queryId: 'Compact', - dest: 'XcmV1MultiLocation', - maxResponseWeight: 'Compact', - }, - DepositAsset: { - assets: 'XcmV1MultiassetMultiAssetFilter', - maxAssets: 'Compact', - beneficiary: 'XcmV1MultiLocation', - }, - DepositReserveAsset: { - assets: 'XcmV1MultiassetMultiAssetFilter', - maxAssets: 'Compact', - 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', - dest: 'XcmV1MultiLocation', - assets: 'XcmV1MultiassetMultiAssetFilter', - maxResponseWeight: 'Compact', - }, - BuyExecution: { - fees: 'XcmV1MultiAsset', - weightLimit: 'XcmV2WeightLimit', - }, - RefundSurplus: 'Null', - SetErrorHandler: 'XcmV2Xcm', - SetAppendix: 'XcmV2Xcm', - ClearError: 'Null', - ClaimAsset: { - assets: 'XcmV1MultiassetMultiAssets', - ticket: 'XcmV1MultiLocation', - }, - Trap: 'Compact', - SubscribeVersion: { - queryId: 'Compact', - maxResponseWeight: 'Compact', - }, - UnsubscribeVersion: 'Null' - } - }, - /** - * Lookup58: xcm::v1::multiasset::MultiAssets - **/ - XcmV1MultiassetMultiAssets: 'Vec', - /** - * 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', - NonFungible: 'XcmV1MultiassetAssetInstance' - } - }, - /** - * Lookup63: xcm::v1::multiasset::AssetInstance - **/ - XcmV1MultiassetAssetInstance: { - _enum: { - Undefined: 'Null', - Index: 'Compact', - 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 - **/ - 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' - } - }, - /** - * Lookup76: xcm::VersionedMultiAssets - **/ - XcmVersionedMultiAssets: { - _enum: { - V0: 'Vec', - 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', - }, - AbstractNonFungible: { - class: 'Bytes', - instance: 'XcmV1MultiassetAssetInstance', - }, - ConcreteFungible: { - id: 'XcmV0MultiLocation', - amount: 'Compact', - }, - 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', - AccountId32: { - network: 'XcmV0JunctionNetworkId', - id: '[u8;32]', - }, - AccountIndex64: { - network: 'XcmV0JunctionNetworkId', - index: 'Compact', - }, - AccountKey20: { - network: 'XcmV0JunctionNetworkId', - key: '[u8;20]', - }, - PalletInstance: 'u8', - GeneralIndex: 'Compact', - GeneralKey: 'Bytes', - OnlyChild: 'Null', - Plurality: { - id: 'XcmV0JunctionBodyId', - part: 'XcmV0JunctionBodyPart' - } - } - }, - /** - * Lookup81: xcm::VersionedMultiLocation - **/ - XcmVersionedMultiLocation: { - _enum: { - V0: 'XcmV0MultiLocation', - V1: 'XcmV1MultiLocation' - } - }, - /** - * Lookup82: cumulus_pallet_xcm::pallet::Event - **/ - CumulusPalletXcmEvent: { - _enum: { - InvalidFormat: '[u8;8]', - UnsupportedVersion: '[u8;8]', - ExecutedDownward: '([u8;8],XcmV2TraitsOutcome)' - } - }, - /** - * Lookup83: cumulus_pallet_dmp_queue::pallet::Event - **/ - 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> - **/ - 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 - **/ - PalletEvmAccountBasicCrossAccountIdRepr: { - _enum: { - Substrate: 'AccountId32', - Ethereum: 'H160' - } - }, - /** - * Lookup88: pallet_unique_scheduler::pallet::Event - **/ - PalletUniqueSchedulerEvent: { - _enum: { - Scheduled: { - when: 'u32', - index: 'u32', - }, - Canceled: { - when: 'u32', - index: 'u32', - }, - Dispatched: { - task: '(u32,u32)', - id: 'Option<[u8;16]>', - result: 'Result', - }, - 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 - **/ - 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 - **/ - PalletStructureEvent: { - _enum: { - Executed: 'Result' - } - }, - /** - * Lookup96: pallet_rmrk_core::pallet::Event - **/ - 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', - 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 - **/ - RmrkTraitsNftAccountIdOrCollectionNftTuple: { - _enum: { - AccountId: 'AccountId32', - CollectionAndNftTuple: '(u32,u32)' - } - }, - /** - * Lookup102: pallet_rmrk_equip::pallet::Event - **/ - PalletRmrkEquipEvent: { - _enum: { - BaseCreated: { - issuer: 'AccountId32', - baseId: 'u32', - }, - EquippablesUpdated: { - baseId: 'u32', - slotId: 'u32' - } - } - }, - /** - * Lookup103: pallet_evm::pallet::Event - **/ - 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', - 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', - specName: 'Text' - }, - /** - * Lookup119: frame_system::pallet::Call - **/ - 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', - }, - 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 - **/ - FrameSupportWeightsPerDispatchClassWeightsPerClass: { - normal: 'FrameSystemLimitsWeightsPerClass', - operational: 'FrameSystemLimitsWeightsPerClass', - mandatory: 'FrameSystemLimitsWeightsPerClass' - }, - /** - * Lookup126: frame_system::limits::WeightsPerClass - **/ - FrameSystemLimitsWeightsPerClass: { - baseExtrinsic: 'u64', - maxExtrinsic: 'Option', - maxTotal: 'Option', - reserved: 'Option' - }, - /** - * Lookup128: frame_system::limits::BlockLength + * Lookup2: polkadot_primitives::v2::PersistedValidationData **/ - FrameSystemLimitsBlockLength: { - max: 'FrameSupportWeightsPerDispatchClassU32' - }, - /** - * Lookup129: frame_support::weights::PerDispatchClass - **/ - 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 - **/ - FrameSystemError: { - _enum: ['InvalidSpecName', 'SpecVersionNeedsToIncrease', 'FailedToExtractRuntimeVersion', 'NonDefaultComposite', 'NonZeroRefCount', 'CallFiltered'] - }, - /** - * Lookup137: polkadot_primitives::v2::PersistedValidationData - **/ 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' }, /** - * 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' }, /** - * Lookup147: polkadot_primitives::v2::AbridgedHostConfiguration + * Lookup20: polkadot_primitives::v2::AbridgedHostConfiguration **/ PolkadotPrimitivesV2AbridgedHostConfiguration: { maxCodeSize: 'u32', @@ -1318,14 +60,14 @@ validationUpgradeDelay: 'u32' }, /** - * Lookup153: polkadot_core_primitives::OutboundHrmpMessage + * Lookup26: polkadot_core_primitives::OutboundHrmpMessage **/ PolkadotCorePrimitivesOutboundHrmpMessage: { recipient: 'u32', data: 'Bytes' }, /** - * Lookup154: cumulus_pallet_parachain_system::pallet::Call + * Lookup28: cumulus_pallet_parachain_system::pallet::Call **/ 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>' }, /** - * Lookup157: polkadot_core_primitives::InboundDownwardMessage + * Lookup31: polkadot_core_primitives::InboundDownwardMessage **/ PolkadotCorePrimitivesInboundDownwardMessage: { sentAt: 'u32', msg: 'Bytes' }, /** - * Lookup160: polkadot_core_primitives::InboundHrmpMessage + * Lookup34: polkadot_core_primitives::InboundHrmpMessage **/ PolkadotCorePrimitivesInboundHrmpMessage: { sentAt: 'u32', data: 'Bytes' }, /** - * Lookup163: cumulus_pallet_parachain_system::pallet::Error + * Lookup37: cumulus_pallet_parachain_system::pallet::Event + **/ + 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 **/ CumulusPalletParachainSystemError: { _enum: ['OverlappingUpgrades', 'ProhibitedByPolkadot', 'TooBig', 'ValidationDataNotAvailable', 'HostConfigurationNotAvailable', 'NotScheduled', 'NothingAuthorized', 'Unauthorized'] }, /** - * Lookup165: pallet_balances::BalanceLock + * Lookup41: pallet_balances::AccountData + **/ + PalletBalancesAccountData: { + free: 'u128', + reserved: 'u128', + miscFrozen: 'u128', + feeFrozen: 'u128' + }, + /** + * Lookup43: pallet_balances::BalanceLock **/ 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 + * Lookup48: pallet_balances::ReserveData **/ PalletBalancesReserveData: { id: '[u8;16]', @@ -2706,13 +1479,13 @@ _enum: ['Unknown', 'OverLimit'] }, /** - * Lookup347: pallet_unique::Error + * Lookup346: pallet_unique::Error **/ PalletUniqueError: { _enum: ['CollectionDecimalPointLimitExceeded', 'ConfirmUnsetSponsorFail', 'EmptyArgument', 'RepartitionCalledOnNonRefungibleCollection'] }, /** - * Lookup350: pallet_unique_scheduler::ScheduledV3, BlockNumber, opal_runtime::OriginCaller, sp_core::crypto::AccountId32> + * Lookup349: pallet_unique_scheduler::ScheduledV3, 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 + * Lookup351: frame_support::dispatch::RawOrigin **/ 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 + * Lookup356: pallet_unique_scheduler::pallet::Error **/ PalletUniqueSchedulerError: { _enum: ['FailedToSchedule', 'NotFound', 'TargetBlockNumberInPast', 'RescheduleNoChange'] }, /** - * Lookup358: up_data_structs::Collection + * Lookup357: up_data_structs::Collection **/ UpDataStructsCollection: { owner: 'AccountId32', @@ -2891,7 +1664,7 @@ externalCollection: 'bool' }, /** - * Lookup359: up_data_structs::SponsorshipState + * Lookup358: up_data_structs::SponsorshipState **/ 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> + * Lookup360: up_data_structs::PropertiesMap> **/ UpDataStructsPropertiesMapBoundedVec: 'BTreeMap', /** @@ -2917,7 +1690,7 @@ **/ UpDataStructsPropertiesMapPropertyPermission: 'BTreeMap', /** - * 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 + * Lookup374: PhantomType::up_data_structs **/ PhantomTypeUpDataStructs: '[(UpDataStructsTokenData,UpDataStructsRpcCollection,RmrkTraitsCollectionCollectionInfo,RmrkTraitsNftNftInfo,RmrkTraitsResourceResourceInfo,RmrkTraitsPropertyPropertyInfo,RmrkTraitsBaseBaseInfo,RmrkTraitsPartPartType,RmrkTraitsTheme,RmrkTraitsNftNftChild);0]', /** - * Lookup377: up_data_structs::TokenData> + * Lookup376: up_data_structs::TokenData> **/ UpDataStructsTokenData: { properties: 'Vec', @@ -2944,7 +1717,7 @@ pieces: 'u128' }, /** - * Lookup379: up_data_structs::RpcCollection + * Lookup378: up_data_structs::RpcCollection **/ UpDataStructsRpcCollection: { owner: 'AccountId32', @@ -2960,7 +1733,7 @@ readOnly: 'bool' }, /** - * Lookup380: rmrk_traits::collection::CollectionInfo, sp_runtime::bounded::bounded_vec::BoundedVec, sp_core::crypto::AccountId32> + * Lookup379: rmrk_traits::collection::CollectionInfo, frame_support::storage::bounded_vec::BoundedVec, sp_core::crypto::AccountId32> **/ RmrkTraitsCollectionCollectionInfo: { issuer: 'AccountId32', @@ -2970,7 +1743,7 @@ nftsCount: 'u32' }, /** - * Lookup381: rmrk_traits::nft::NftInfo> + * Lookup380: rmrk_traits::nft::NftInfo> **/ RmrkTraitsNftNftInfo: { owner: 'RmrkTraitsNftAccountIdOrCollectionNftTuple', @@ -2980,14 +1753,14 @@ pending: 'bool' }, /** - * Lookup383: rmrk_traits::nft::RoyaltyInfo + * Lookup382: rmrk_traits::nft::RoyaltyInfo **/ RmrkTraitsNftRoyaltyInfo: { recipient: 'AccountId32', amount: 'Permill' }, /** - * Lookup384: rmrk_traits::resource::ResourceInfo, sp_runtime::bounded::bounded_vec::BoundedVec> + * Lookup383: rmrk_traits::resource::ResourceInfo, frame_support::storage::bounded_vec::BoundedVec> **/ RmrkTraitsResourceResourceInfo: { id: 'u32', @@ -2996,14 +1769,14 @@ pendingRemoval: 'bool' }, /** - * Lookup385: rmrk_traits::property::PropertyInfo, sp_runtime::bounded::bounded_vec::BoundedVec> + * Lookup384: rmrk_traits::property::PropertyInfo, frame_support::storage::bounded_vec::BoundedVec> **/ RmrkTraitsPropertyPropertyInfo: { key: 'Bytes', value: 'Bytes' }, /** - * Lookup386: rmrk_traits::base::BaseInfo> + * Lookup385: rmrk_traits::base::BaseInfo> **/ 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 + * Lookup388: pallet_common::pallet::Error **/ 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 + * Lookup390: pallet_fungible::pallet::Error **/ PalletFungibleError: { _enum: ['NotFungibleDataUsedToMintFungibleCollectionToken', 'FungibleItemsHaveNoId', 'FungibleItemsDontHaveData', 'FungibleDisallowsNesting', 'SettingPropertiesNotAllowed'] }, /** - * Lookup392: pallet_refungible::ItemData + * Lookup391: pallet_refungible::ItemData **/ PalletRefungibleItemData: { constData: 'Bytes' }, /** - * Lookup397: pallet_refungible::pallet::Error + * Lookup394: pallet_refungible::pallet::Error **/ PalletRefungibleError: { _enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces', 'RepartitionWhileNotOwningAllPieces', 'RefungibleDisallowsNesting', 'SettingPropertiesNotAllowed'] }, /** - * Lookup398: pallet_nonfungible::ItemData> + * Lookup395: pallet_nonfungible::ItemData> **/ PalletNonfungibleItemData: { owner: 'PalletEvmAccountBasicCrossAccountIdRepr' }, /** - * Lookup400: up_data_structs::PropertyScope + * Lookup397: up_data_structs::PropertyScope **/ UpDataStructsPropertyScope: { _enum: ['None', 'Rmrk', 'Eth'] }, /** - * Lookup402: pallet_nonfungible::pallet::Error + * Lookup399: pallet_nonfungible::pallet::Error **/ PalletNonfungibleError: { _enum: ['NotNonfungibleDataUsedToMintFungibleCollectionToken', 'NonfungibleItemsHaveNoAmount', 'CantBurnNftWithChildren'] }, /** - * Lookup403: pallet_structure::pallet::Error + * Lookup400: pallet_structure::pallet::Error **/ PalletStructureError: { _enum: ['OuroborosDetected', 'DepthLimit', 'BreadthLimit', 'TokenNotFound'] }, /** - * Lookup404: pallet_rmrk_core::pallet::Error + * Lookup401: pallet_rmrk_core::pallet::Error **/ 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 + * Lookup403: pallet_rmrk_equip::pallet::Error **/ PalletRmrkEquipError: { _enum: ['PermissionError', 'NoAvailableBaseId', 'NoAvailablePartId', 'BaseDoesntExist', 'NeedsDefaultThemeFirst', 'PartDoesntExist', 'NoEquippableOnFixedPart'] }, /** - * Lookup409: pallet_evm::pallet::Error + * Lookup406: pallet_evm::pallet::Error **/ 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' }, /** - * Lookup418: ethereum::block::Block + * Lookup415: ethereum::block::Block **/ EthereumBlock: { header: 'EthereumHeader', @@ -3127,7 +1900,7 @@ ommers: 'Vec' }, /** - * 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 + * Lookup422: pallet_ethereum::pallet::Error **/ PalletEthereumError: { _enum: ['InvalidSignature', 'PreLogExists'] }, /** - * Lookup426: pallet_evm_coder_substrate::pallet::Error + * Lookup423: pallet_evm_coder_substrate::pallet::Error **/ 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 + * Lookup426: pallet_evm_contract_helpers::pallet::Error **/ PalletEvmContractHelpersError: { _enum: ['NoPermission'] }, /** - * Lookup430: pallet_evm_migration::pallet::Error + * Lookup427: pallet_evm_migration::pallet::Error **/ 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 + * Lookup438: frame_system::extensions::check_spec_version::CheckSpecVersion **/ FrameSystemExtensionsCheckSpecVersion: 'Null', /** - * Lookup440: frame_system::extensions::check_genesis::CheckGenesis + * Lookup439: frame_system::extensions::check_genesis::CheckGenesis **/ FrameSystemExtensionsCheckGenesis: 'Null', /** - * Lookup443: frame_system::extensions::check_nonce::CheckNonce + * Lookup442: frame_system::extensions::check_nonce::CheckNonce **/ FrameSystemExtensionsCheckNonce: 'Compact', /** - * Lookup444: frame_system::extensions::check_weight::CheckWeight + * Lookup443: frame_system::extensions::check_weight::CheckWeight **/ FrameSystemExtensionsCheckWeight: 'Null', /** - * Lookup445: pallet_template_transaction_payment::ChargeTransactionPayment + * Lookup444: pallet_template_transaction_payment::ChargeTransactionPayment **/ PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact', /** - * Lookup446: opal_runtime::Runtime + * Lookup445: opal_runtime::Runtime **/ OpalRuntimeRuntime: 'Null', /** - * Lookup447: pallet_ethereum::FakeTransactionFinalizer + * Lookup444: pallet_ethereum::FakeTransactionFinalizer **/ PalletEthereumFakeTransactionFinalizer: 'Null' }; --- 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; - 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; - 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; @@ -1853,14 +1682,14 @@ readonly properties: Vec; } - /** @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; readonly sponsoredDataSize: Option; @@ -1873,7 +1702,7 @@ readonly transfersEnabled: Option; } - /** @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; readonly mintMode: Option; readonly nesting: Option; } - /** @name UpDataStructsNestingPermissions (168) */ + /** @name UpDataStructsNestingPermissions (167) */ export interface UpDataStructsNestingPermissions extends Struct { readonly tokenOwner: bool; readonly collectionAdmin: bool; readonly restricted: Option; } - /** @name UpDataStructsOwnerRestrictedSet (170) */ + /** @name UpDataStructsOwnerRestrictedSet (169) */ export interface UpDataStructsOwnerRestrictedSet extends BTreeSet {} - /** @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; } - /** @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; @@ -2028,7 +1857,7 @@ readonly properties: Vec; } - /** @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; readonly metadata: Option; @@ -2193,7 +2022,7 @@ readonly thumb: Option; } - /** @name RmrkTraitsResourceComposableResource (220) */ + /** @name RmrkTraitsResourceComposableResource (219) */ export interface RmrkTraitsResourceComposableResource extends Struct { readonly parts: Vec; readonly base: u32; @@ -2203,7 +2032,7 @@ readonly thumb: Option; } - /** @name RmrkTraitsResourceSlotResource (221) */ + /** @name RmrkTraitsResourceSlotResource (220) */ export interface RmrkTraitsResourceSlotResource extends Struct { readonly base: u32; readonly src: Option; @@ -2213,7 +2042,7 @@ readonly thumb: Option; } - /** @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; 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; 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 {} - /** @name UpDataStructsPropertiesMapPropertyPermission (365) */ + /** @name UpDataStructsPropertiesMapPropertyPermission (364) */ export interface UpDataStructsPropertiesMapPropertyPermission extends BTreeMap {} - /** @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> {} - /** @name UpDataStructsTokenData (376) */ + /** @name UpDataStructsTokenData (375) */ export interface UpDataStructsTokenData extends Struct { readonly properties: Vec; readonly owner: Option; 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; @@ -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; } - /** @name EthereumBlock (418) */ - interface EthereumBlock extends Struct { + /** @name EthereumBlock (415) */ + export interface EthereumBlock extends Struct { readonly header: EthereumHeader; readonly transactions: Vec; readonly ommers: Vec; } - /** @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 {} + /** @name FrameSystemExtensionsCheckNonce (442) */ + export interface FrameSystemExtensionsCheckNonce extends Compact {} - /** @name FrameSystemExtensionsCheckWeight (444) */ - type FrameSystemExtensionsCheckWeight = Null; + /** @name FrameSystemExtensionsCheckWeight (443) */ + export type FrameSystemExtensionsCheckWeight = Null; - /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (445) */ - interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact {} + /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (444) */ + export interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact {} - /** @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 --- 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', + ), }, }; --- 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')) { --- 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 { --- 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) => { + +class DevUniqueHelper extends UniqueHelper { + async connect(wsEndpoint: string, listeners?: any): Promise { + 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 (code: (helper: UniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise) => { // 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 -- gitstuff