difftreelog
test createCollectionEx
in: master
14 files changed
tests/package.jsondiffbeforeafterboth--- a/tests/package.json
+++ b/tests/package.json
@@ -67,9 +67,10 @@
"testPalletPresence": "mocha --timeout 9999999 -r ts-node/register ./**/pallet-presence.test.ts",
"testBlockProduction": "mocha --timeout 9999999 -r ts-node/register ./**/block-production.test.ts",
"testEnableDisableTransfers": "mocha --timeout 9999999 -r ts-node/register ./**/enableDisableTransfer.test.ts",
+ "polkadot-types-fetch-metadata": "curl -H 'Content-Type: application/json' -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' http://localhost:9933 > src/interfaces/metadata.json",
"polkadot-types-from-defs": "ts-node ./node_modules/.bin/polkadot-types-from-defs --input src/interfaces/ --package .",
- "polkadot-types-from-chain": "ts-node ./node_modules/.bin/polkadot-types-from-chain --endpoint ws://localhost:9944 --output src/interfaces/ --package .",
- "polkadot-types": "yarn polkadot-types-from-defs && yarn polkadot-types-from-chain"
+ "polkadot-types-from-chain": "ts-node ./node_modules/.bin/polkadot-types-from-chain --endpoint src/interfaces/metadata.json --output src/interfaces/ --package .",
+ "polkadot-types": "yarn polkadot-types-fetch-metadata && yarn polkadot-types-from-defs && yarn polkadot-types-from-chain"
},
"author": "",
"license": "SEE LICENSE IN ../LICENSE",
tests/src/check-event/createCollectionEvent.test.tsdiffbeforeafterboth--- a/tests/src/check-event/createCollectionEvent.test.ts
+++ b/tests/src/check-event/createCollectionEvent.test.ts
@@ -27,7 +27,7 @@
});
it('Check event from createCollection(): ', async () => {
await usingApi(async (api: ApiPromise) => {
- const tx = api.tx.unique.createCollection([0x31], [0x32], '0x33', 'NFT');
+ const tx = api.tx.unique.createCollectionEx({name: [0x31], description: [0x32], tokenPrefix: '0x33', mode: 'NFT'});
const events = await submitTransactionAsync(alice, tx);
const msg = JSON.stringify(uniqueEventMessage(events));
expect(msg).to.be.contain(checkSection);
tests/src/createCollection.test.tsdiffbeforeafterboth--- a/tests/src/createCollection.test.ts
+++ b/tests/src/createCollection.test.ts
@@ -3,12 +3,11 @@
// file 'LICENSE', which is part of this source code package.
//
-import chai from 'chai';
-import chaiAsPromised from 'chai-as-promised';
-import {createCollectionExpectFailure, createCollectionExpectSuccess} from './util/helpers';
+import {expect} from 'chai';
+import privateKey from './substrate/privateKey';
+import usingApi, {executeTransaction, submitTransactionAsync} from './substrate/substrate-api';
+import {createCollectionExpectFailure, createCollectionExpectSuccess, getCreateCollectionResult, getDetailedCollectionInfo} from './util/helpers';
-chai.use(chaiAsPromised);
-
describe('integration test: ext. createCollection():', () => {
it('Create new NFT collection', async () => {
await createCollectionExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'}});
@@ -28,6 +27,45 @@
it('Create new ReFungible collection', async () => {
await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
});
+ it('Create new collection with extra fields', async () => {
+ await usingApi(async api => {
+ const alice = privateKey('//Alice');
+ const bob = privateKey('//Bob');
+ const tx = api.tx.unique.createCollectionEx({
+ mode: {Fungible: 8},
+ access: 'AllowList',
+ name: [1],
+ description: [2],
+ tokenPrefix: '0x000000',
+ offchainSchema: '0x111111',
+ schemaVersion: 'Unique',
+ pendingSponsor: bob.address,
+ limits: {
+ accountTokenOwnershipLimit: 3,
+ },
+ variableOnChainSchema: '0x222222',
+ constOnChainSchema: '0x333333',
+ metaUpdatePermission: 'Admin',
+ });
+ const events = await submitTransactionAsync(alice, tx);
+ const result = getCreateCollectionResult(events);
+
+ const collection = (await getDetailedCollectionInfo(api, result.collectionId))!;
+ expect(collection.owner.toString()).to.equal(alice.address);
+ expect(collection.mode.asFungible.toNumber()).to.equal(8);
+ expect(collection.access.isAllowList).to.be.true;
+ expect(collection.name.map(v => v.toNumber())).to.deep.equal([1]);
+ expect(collection.description.map(v => v.toNumber())).to.deep.equal([2]);
+ expect(collection.tokenPrefix.toString()).to.equal('0x000000');
+ expect(collection.offchainSchema.toString()).to.equal('0x111111');
+ expect(collection.schemaVersion.isUnique).to.be.true;
+ expect(collection.sponsorship.asUnconfirmed.toString()).to.equal(bob.address);
+ expect(collection.limits.accountTokenOwnershipLimit.unwrap().toNumber()).to.equal(3);
+ expect(collection.variableOnChainSchema.toString()).to.equal('0x222222');
+ expect(collection.constOnChainSchema.toString()).to.equal('0x333333');
+ expect(collection.metaUpdatePermission.isAdmin).to.be.true;
+ });
+ });
});
describe('(!negative test!) integration test: ext. createCollection():', () => {
@@ -40,4 +78,11 @@
it('(!negative test!) create new NFT collection whith incorrect data (token_prefix)', async () => {
await createCollectionExpectFailure({tokenPrefix: 'A'.repeat(17), mode: {type: 'NFT'}});
});
+ it('fails when bad limits are set', async () => {
+ await usingApi(async api => {
+ const alice = privateKey('//Alice');
+ const tx = api.tx.unique.createCollectionEx({mode: 'NFT', limits: {tokenLimit: 0}});
+ await expect(executeTransaction(api, alice, tx)).to.be.rejectedWith(/^common.CollectionTokenLimitExceeded$/);
+ });
+ });
});
tests/src/interfaces/.gitignorediffbeforeafterboth--- /dev/null
+++ b/tests/src/interfaces/.gitignore
@@ -0,0 +1 @@
+metadata.json
tests/src/interfaces/augment-api-consts.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-consts.ts
+++ b/tests/src/interfaces/augment-api-consts.ts
@@ -36,6 +36,9 @@
[key: string]: Codec;
};
inflation: {
+ /**
+ * Number of blocks that pass between treasury balance updates due to inflation
+ **/
inflationBlockInterval: u32 & AugmentedConst<ApiType>;
/**
* Generic const
tests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -61,14 +61,18 @@
**/
CantApproveMoreThanOwned: AugmentedError<ApiType>;
/**
- * Exceeded max admin amount
+ * Exceeded max admin count
**/
- CollectionAdminAmountExceeded: AugmentedError<ApiType>;
+ CollectionAdminCountExceeded: AugmentedError<ApiType>;
/**
* Collection description can not be longer than 255 char.
**/
CollectionDescriptionLimitExceeded: AugmentedError<ApiType>;
/**
+ * Collection limit bounds per collection exceeded
+ **/
+ CollectionLimitBoundsExceeded: AugmentedError<ApiType>;
+ /**
* Collection name can not be longer than 63 char.
**/
CollectionNameLimitExceeded: AugmentedError<ApiType>;
@@ -97,6 +101,10 @@
**/
NoPermission: AugmentedError<ApiType>;
/**
+ * Tried to enable permissions which are only permitted to be disabled
+ **/
+ OwnerPermissionsCantBeReverted: AugmentedError<ApiType>;
+ /**
* Collection is not in mint mode.
**/
PublicMintingNotAllowed: AugmentedError<ApiType>;
@@ -227,7 +235,7 @@
/**
* Tried to set data for fungible item
**/
- FungibleItemsHaveData: AugmentedError<ApiType>;
+ FungibleItemsDontHaveData: AugmentedError<ApiType>;
/**
* Not default id passed as TokenId argument
**/
@@ -381,6 +389,10 @@
};
system: {
/**
+ * The origin filter prevent the call to be dispatched.
+ **/
+ CallFiltered: AugmentedError<ApiType>;
+ /**
* Failed to extract the runtime version from the new runtime.
*
* Either calling `Core_version` or decoding `RuntimeVersion` failed.
@@ -433,10 +445,6 @@
**/
CollectionDecimalPointLimitExceeded: AugmentedError<ApiType>;
/**
- * Collection limit bounds per collection exceeded
- **/
- CollectionLimitBoundsExceeded: AugmentedError<ApiType>;
- /**
* This address is not set as sponsor, use setCollectionSponsor first.
**/
ConfirmUnsetSponsorFail: AugmentedError<ApiType>;
@@ -444,10 +452,6 @@
* Length of items properties must be greater than 0.
**/
EmptyArgument: AugmentedError<ApiType>;
- /**
- * Tried to enable permissions which are only permitted to be disabled
- **/
- OwnerPermissionsCantBeReverted: AugmentedError<ApiType>;
/**
* Generic error
**/
tests/src/interfaces/augment-api-events.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-events.ts
+++ b/tests/src/interfaces/augment-api-events.ts
@@ -2,7 +2,7 @@
/* eslint-disable */
import type { EthereumLog, EvmCoreErrorExitReason } from './ethereum';
-import type { PalletCommonAccountBasicCrossAccountIdRepr } from './unique';
+import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode } from './unique';
import type { ApiTypes } from '@polkadot/api/types';
import type { Null, Option, Result, U256, U8aFixed, u128, u32, u64, u8 } from '@polkadot/types';
import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';
@@ -12,48 +12,45 @@
export interface AugmentedEvents<ApiType> {
balances: {
/**
- * A balance was set by root. \[who, free, reserved\]
+ * A balance was set by root.
**/
BalanceSet: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
/**
- * Some amount was deposited into the account (e.g. for transaction fees). \[who,
- * deposit\]
+ * Some amount was deposited (e.g. for transaction fees).
**/
Deposit: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* An account was removed whose balance was non-zero but below ExistentialDeposit,
- * resulting in an outright loss. \[account, balance\]
+ * resulting in an outright loss.
**/
DustLost: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
- * An account was created with some free balance. \[account, free_balance\]
+ * An account was created with some free balance.
**/
Endowed: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
- * Some balance was reserved (moved from free to reserved). \[who, value\]
+ * Some balance was reserved (moved from free to reserved).
**/
Reserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* Some balance was moved from the reserve of the first account to the second account.
* Final argument indicates the destination balance type.
- * \[from, to, balance, destination_status\]
**/
ReserveRepatriated: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128, FrameSupportTokensMiscBalanceStatus]>;
/**
- * Some amount was removed from the account (e.g. for misbehavior). \[who,
- * amount_slashed\]
+ * Some amount was removed from the account (e.g. for misbehavior).
**/
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
- * Transfer succeeded. \[from, to, value\]
+ * Transfer succeeded.
**/
Transfer: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128]>;
/**
- * Some balance was unreserved (moved from reserved to free). \[who, value\]
+ * Some balance was unreserved (moved from reserved to free).
**/
Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
- * Some amount was withdrawn from the account (e.g. for transaction fees). \[who, value\]
+ * Some amount was withdrawn from the account (e.g. for transaction fees).
**/
Withdraw: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
@@ -87,6 +84,14 @@
**/
CollectionCreated: AugmentedEvent<ApiType, [u32, u8, AccountId32]>;
/**
+ * New collection was destroyed
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique identifier of collection.
+ **/
+ CollectionDestroyed: AugmentedEvent<ApiType, [u32]>;
+ /**
* New item was created.
*
* # Arguments
@@ -289,7 +294,7 @@
InvalidResponder: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, Option<XcmV1MultiLocation>]>;
/**
* Expected query response has been received but the expected origin location placed in
- * storate by this runtime previously cannot be decoded. The query remains registered.
+ * storage by this runtime previously cannot be decoded. The query remains registered.
*
* This is unexpected (since a location placed in storage in a previously executing
* runtime should be readable prior to query timeout) and dangerous since the possibly
@@ -471,6 +476,148 @@
**/
[key: string]: AugmentedEvent<ApiType>;
};
+ unique: {
+ /**
+ * Address was add to allow list
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * user: Address.
+ **/
+ AllowListAddressAdded: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ /**
+ * Address was remove from allow list
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * user: Address.
+ **/
+ AllowListAddressRemoved: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ /**
+ * Collection admin was added
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * admin: Admin address.
+ **/
+ CollectionAdminAdded: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ /**
+ * Collection admin was removed
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * admin: Admin address.
+ **/
+ CollectionAdminRemoved: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ /**
+ * Collection limits was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ CollectionLimitSet: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * Collection owned was change
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * owner: New owner address.
+ **/
+ CollectionOwnedChanged: AugmentedEvent<ApiType, [u32, AccountId32]>;
+ /**
+ * Collection sponsor was removed
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ CollectionSponsorRemoved: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * Collection sponsor was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * owner: New sponsor address.
+ **/
+ CollectionSponsorSet: AugmentedEvent<ApiType, [u32, AccountId32]>;
+ /**
+ * const on chain schema was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ ConstOnChainSchemaSet: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * Mint permission was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ MintPermissionSet: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * Offchain schema was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ OffchainSchemaSet: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * Public access mode was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * mode: New access state.
+ **/
+ PublicAccessModeSet: AugmentedEvent<ApiType, [u32, UpDataStructsAccessMode]>;
+ /**
+ * Schema version was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ SchemaVersionSet: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * New sponsor was confirm
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * sponsor: New sponsor address.
+ **/
+ SponsorshipConfirmed: AugmentedEvent<ApiType, [u32, AccountId32]>;
+ /**
+ * Variable on chain schema was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ VariableOnChainSchemaSet: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * Generic event
+ **/
+ [key: string]: AugmentedEvent<ApiType>;
+ };
vesting: {
/**
* Claimed vesting. \[who, locked_amount\]
tests/src/interfaces/augment-api-query.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */34import type { EthereumBlock, EthereumReceipt, EthereumTransactionLegacyTransaction, FpRpcTransactionStatus } from './ethereum';5import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundStatus, CumulusPalletXcmpQueueOutboundStatus, CumulusPalletXcmpQueueQueueConfigData, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData } from './polkadot';6import type { PalletCommonAccountBasicCrossAccountIdRepr, PalletNonfungibleItemData, PalletRefungibleItemData, UpDataStructsCollection, UpDataStructsCollectionStats } from './unique';7import type { ApiTypes } from '@polkadot/api/types';8import type { BTreeMap, Bytes, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types';9import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';10import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV1UpgradeRestriction, SpRuntimeGenericDigest } from '@polkadot/types/lookup';11import type { AnyNumber, ITuple, Observable } from '@polkadot/types/types';1213declare module '@polkadot/api/types/storage' {14 export interface AugmentedQueries<ApiType> {15 balances: {16 /**17 * The balance of an account.18 * 19 * NOTE: This is only used in the case that this pallet is used to store balances.20 **/21 account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;22 /**23 * Any liquidity locks on some account balances.24 * NOTE: Should only be accessed when setting, changing and freeing a lock.25 **/26 locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesBalanceLock>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;27 /**28 * Named reserves on some account balances.29 **/30 reserves: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesReserveData>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;31 /**32 * Storage version of the pallet.33 * 34 * This is set to v2.0.0 for new networks.35 **/36 storageVersion: AugmentedQuery<ApiType, () => Observable<PalletBalancesReleases>, []> & QueryableStorageEntry<ApiType, []>;37 /**38 * The total units issued in the system.39 **/40 totalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;41 /**42 * Generic query43 **/44 [key: string]: QueryableStorageEntry<ApiType>;45 };46 charging: {47 /**48 * Generic query49 **/50 [key: string]: QueryableStorageEntry<ApiType>;51 };52 common: {53 adminAmount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;54 /**55 * Allowlisted collection users56 **/57 allowlist: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;58 /**59 * Collection info60 **/61 collectionById: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<UpDataStructsCollection>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;62 createdCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;63 destroyedCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;64 /**65 * Not used by code, exists only to provide some types to metadata66 **/67 dummyStorageValue: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[UpDataStructsCollectionStats, u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;68 /**69 * List of collection admins70 **/71 isAdmin: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;72 /**73 * Generic query74 **/75 [key: string]: QueryableStorageEntry<ApiType>;76 };77 dmpQueue: {78 /**79 * The configuration.80 **/81 configuration: AugmentedQuery<ApiType, () => Observable<CumulusPalletDmpQueueConfigData>, []> & QueryableStorageEntry<ApiType, []>;82 /**83 * The overweight messages.84 **/85 overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;86 /**87 * The page index.88 **/89 pageIndex: AugmentedQuery<ApiType, () => Observable<CumulusPalletDmpQueuePageIndexData>, []> & QueryableStorageEntry<ApiType, []>;90 /**91 * The queue pages.92 **/93 pages: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, Bytes]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;94 /**95 * Generic query96 **/97 [key: string]: QueryableStorageEntry<ApiType>;98 };99 ethereum: {100 blockHash: AugmentedQuery<ApiType, (arg: U256 | AnyNumber | Uint8Array) => Observable<H256>, [U256]> & QueryableStorageEntry<ApiType, [U256]>;101 /**102 * The current Ethereum block.103 **/104 currentBlock: AugmentedQuery<ApiType, () => Observable<Option<EthereumBlock>>, []> & QueryableStorageEntry<ApiType, []>;105 /**106 * The current Ethereum receipts.107 **/108 currentReceipts: AugmentedQuery<ApiType, () => Observable<Option<Vec<EthereumReceipt>>>, []> & QueryableStorageEntry<ApiType, []>;109 /**110 * The current transaction statuses.111 **/112 currentTransactionStatuses: AugmentedQuery<ApiType, () => Observable<Option<Vec<FpRpcTransactionStatus>>>, []> & QueryableStorageEntry<ApiType, []>;113 /**114 * Current building block's transactions and receipts.115 **/116 pending: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EthereumTransactionLegacyTransaction, FpRpcTransactionStatus, EthereumReceipt]>>>, []> & QueryableStorageEntry<ApiType, []>;117 /**118 * Generic query119 **/120 [key: string]: QueryableStorageEntry<ApiType>;121 };122 evm: {123 accountCodes: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<Bytes>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;124 accountStorages: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<H256>, [H160, H256]> & QueryableStorageEntry<ApiType, [H160, H256]>;125 /**126 * Generic query127 **/128 [key: string]: QueryableStorageEntry<ApiType>;129 };130 evmCoderSubstrate: {131 /**132 * Generic query133 **/134 [key: string]: QueryableStorageEntry<ApiType>;135 };136 evmContractHelpers: {137 allowlist: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<bool>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;138 allowlistEnabled: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;139 owner: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<H160>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;140 selfSponsoring: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;141 sponsorBasket: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<Option<u32>>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;142 sponsoringRateLimit: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<u32>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;143 /**144 * Generic query145 **/146 [key: string]: QueryableStorageEntry<ApiType>;147 };148 evmMigration: {149 migrationPending: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;150 /**151 * Generic query152 **/153 [key: string]: QueryableStorageEntry<ApiType>;154 };155 fungible: {156 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]>;157 balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;158 totalSupply: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;159 /**160 * Generic query161 **/162 [key: string]: QueryableStorageEntry<ApiType>;163 };164 inflation: {165 /**166 * Current block inflation167 **/168 blockInflation: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;169 /**170 * starting year total issuance171 **/172 startingYearTotalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;173 /**174 * Generic query175 **/176 [key: string]: QueryableStorageEntry<ApiType>;177 };178 nonfungible: {179 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;180 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletCommonAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;181 /**182 * Used to enumerate tokens owned by account183 **/184 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]>;185 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNonfungibleItemData>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;186 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;187 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;188 /**189 * Generic query190 **/191 [key: string]: QueryableStorageEntry<ApiType>;192 };193 parachainInfo: {194 parachainId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;195 /**196 * Generic query197 **/198 [key: string]: QueryableStorageEntry<ApiType>;199 };200 parachainSystem: {201 /**202 * The number of HRMP messages we observed in `on_initialize` and thus used that number for203 * announcing the weight of `on_initialize` and `on_finalize`.204 **/205 announcedHrmpMessagesPerCandidate: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;206 /**207 * The next authorized upgrade, if there is one.208 **/209 authorizedUpgrade: AugmentedQuery<ApiType, () => Observable<Option<H256>>, []> & QueryableStorageEntry<ApiType, []>;210 /**211 * Were the validation data set to notify the relay chain?212 **/213 didSetValidationCode: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;214 /**215 * The parachain host configuration that was obtained from the relay parent.216 * 217 * This field is meant to be updated each block with the validation data inherent. Therefore,218 * before processing of the inherent, e.g. in `on_initialize` this data may be stale.219 * 220 * This data is also absent from the genesis.221 **/222 hostConfiguration: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV1AbridgedHostConfiguration>>, []> & QueryableStorageEntry<ApiType, []>;223 /**224 * HRMP messages that were sent in a block.225 * 226 * This will be cleared in `on_initialize` of each new block.227 **/228 hrmpOutboundMessages: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotCorePrimitivesOutboundHrmpMessage>>, []> & QueryableStorageEntry<ApiType, []>;229 /**230 * HRMP watermark that was set in a block.231 * 232 * This will be cleared in `on_initialize` of each new block.233 **/234 hrmpWatermark: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;235 /**236 * The last downward message queue chain head we have observed.237 * 238 * This value is loaded before and saved after processing inbound downward messages carried239 * by the system inherent.240 **/241 lastDmqMqcHead: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;242 /**243 * The message queue chain heads we have observed per each channel incoming channel.244 * 245 * This value is loaded before and saved after processing inbound downward messages carried246 * by the system inherent.247 **/248 lastHrmpMqcHeads: AugmentedQuery<ApiType, () => Observable<BTreeMap<u32, H256>>, []> & QueryableStorageEntry<ApiType, []>;249 /**250 * Validation code that is set by the parachain and is to be communicated to collator and251 * consequently the relay-chain.252 * 253 * This will be cleared in `on_initialize` of each new block if no other pallet already set254 * the value.255 **/256 newValidationCode: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;257 /**258 * Upward messages that are still pending and not yet send to the relay chain.259 **/260 pendingUpwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;261 /**262 * In case of a scheduled upgrade, this storage field contains the validation code to be applied.263 * 264 * As soon as the relay chain gives us the go-ahead signal, we will overwrite the [`:code`][well_known_keys::CODE]265 * which will result the next block process with the new validation code. This concludes the upgrade process.266 * 267 * [well_known_keys::CODE]: sp_core::storage::well_known_keys::CODE268 **/269 pendingValidationCode: AugmentedQuery<ApiType, () => Observable<Bytes>, []> & QueryableStorageEntry<ApiType, []>;270 /**271 * Number of downward messages processed in a block.272 * 273 * This will be cleared in `on_initialize` of each new block.274 **/275 processedDownwardMessages: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;276 /**277 * The snapshot of some state related to messaging relevant to the current parachain as per278 * the relay parent.279 * 280 * This field is meant to be updated each block with the validation data inherent. Therefore,281 * before processing of the inherent, e.g. in `on_initialize` this data may be stale.282 * 283 * This data is also absent from the genesis.284 **/285 relevantMessagingState: AugmentedQuery<ApiType, () => Observable<Option<CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot>>, []> & QueryableStorageEntry<ApiType, []>;286 /**287 * The weight we reserve at the beginning of the block for processing DMP messages. This288 * overrides the amount set in the Config trait.289 **/290 reservedDmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []> & QueryableStorageEntry<ApiType, []>;291 /**292 * The weight we reserve at the beginning of the block for processing XCMP messages. This293 * overrides the amount set in the Config trait.294 **/295 reservedXcmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []> & QueryableStorageEntry<ApiType, []>;296 /**297 * An option which indicates if the relay-chain restricts signalling a validation code upgrade.298 * In other words, if this is `Some` and [`NewValidationCode`] is `Some` then the produced299 * candidate will be invalid.300 * 301 * This storage item is a mirror of the corresponding value for the current parachain from the302 * relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is303 * set after the inherent.304 **/305 upgradeRestrictionSignal: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV1UpgradeRestriction>>, []> & QueryableStorageEntry<ApiType, []>;306 /**307 * Upward messages that were sent in a block.308 * 309 * This will be cleared in `on_initialize` of each new block.310 **/311 upwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;312 /**313 * The [`PersistedValidationData`] set for this block.314 * This value is expected to be set only once per block and it's never stored315 * in the trie.316 **/317 validationData: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV1PersistedValidationData>>, []> & QueryableStorageEntry<ApiType, []>;318 /**319 * Generic query320 **/321 [key: string]: QueryableStorageEntry<ApiType>;322 };323 randomnessCollectiveFlip: {324 /**325 * Series of block headers from the last 81 blocks that acts as random seed material. This326 * is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of327 * the oldest hash.328 **/329 randomMaterial: AugmentedQuery<ApiType, () => Observable<Vec<H256>>, []> & QueryableStorageEntry<ApiType, []>;330 /**331 * Generic query332 **/333 [key: string]: QueryableStorageEntry<ApiType>;334 };335 refungible: {336 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;337 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg4: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]>;338 balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr]>;339 /**340 * Used to enumerate tokens owned by account341 **/342 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]>;343 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<PalletRefungibleItemData>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;344 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;345 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;346 totalSupply: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;347 /**348 * Generic query349 **/350 [key: string]: QueryableStorageEntry<ApiType>;351 };352 sudo: {353 /**354 * The `AccountId` of the sudo key.355 **/356 key: AugmentedQuery<ApiType, () => Observable<AccountId32>, []> & QueryableStorageEntry<ApiType, []>;357 /**358 * Generic query359 **/360 [key: string]: QueryableStorageEntry<ApiType>;361 };362 system: {363 /**364 * The full account information for a particular account ID.365 **/366 account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<FrameSystemAccountInfo>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;367 /**368 * Total length (in bytes) for all extrinsics put together, for the current block.369 **/370 allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;371 /**372 * Map of block numbers to block hashes.373 **/374 blockHash: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<H256>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;375 /**376 * The current weight for the block.377 **/378 blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;379 /**380 * Digest of the current block, also part of the block header.381 **/382 digest: AugmentedQuery<ApiType, () => Observable<SpRuntimeGenericDigest>, []> & QueryableStorageEntry<ApiType, []>;383 /**384 * The number of events in the `Events<T>` list.385 **/386 eventCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;387 /**388 * Events deposited for the current block.389 * 390 * NOTE: This storage item is explicitly unbounded since it is never intended to be read391 * from within the runtime.392 **/393 events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;394 /**395 * Mapping between a topic (represented by T::Hash) and a vector of indexes396 * of events in the `<Events<T>>` list.397 * 398 * All topic vectors have deterministic storage locations depending on the topic. This399 * allows light-clients to leverage the changes trie storage tracking mechanism and400 * in case of changes fetch the list of events of interest.401 * 402 * The value has the type `(T::BlockNumber, EventIndex)` because if we used only just403 * the `EventIndex` then in case if the topic has the same contents on the next block404 * no notification will be triggered thus the event might be lost.405 **/406 eventTopics: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Vec<ITuple<[u32, u32]>>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;407 /**408 * The execution phase of the block.409 **/410 executionPhase: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemPhase>>, []> & QueryableStorageEntry<ApiType, []>;411 /**412 * Total extrinsics count for the current block.413 **/414 extrinsicCount: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;415 /**416 * Extrinsics data for the current block (maps an extrinsic's index to its data).417 **/418 extrinsicData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;419 /**420 * Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.421 **/422 lastRuntimeUpgrade: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemLastRuntimeUpgradeInfo>>, []> & QueryableStorageEntry<ApiType, []>;423 /**424 * The current block number being processed. Set by `execute_block`.425 **/426 number: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;427 /**428 * Hash of the previous block.429 **/430 parentHash: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;431 /**432 * True if we have upgraded so that AccountInfo contains three types of `RefCount`. False433 * (default) if not.434 **/435 upgradedToTripleRefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;436 /**437 * True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.438 **/439 upgradedToU32RefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;440 /**441 * Generic query442 **/443 [key: string]: QueryableStorageEntry<ApiType>;444 };445 timestamp: {446 /**447 * Did the timestamp get updated in this block?448 **/449 didUpdate: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;450 /**451 * Current time for the current block.452 **/453 now: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;454 /**455 * Generic query456 **/457 [key: string]: QueryableStorageEntry<ApiType>;458 };459 transactionPayment: {460 nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;461 storageVersion: AugmentedQuery<ApiType, () => Observable<PalletTransactionPaymentReleases>, []> & QueryableStorageEntry<ApiType, []>;462 /**463 * Generic query464 **/465 [key: string]: QueryableStorageEntry<ApiType>;466 };467 treasury: {468 /**469 * Proposal indices that have been approved but not yet awarded.470 **/471 approvals: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;472 /**473 * Number of proposals that have been made.474 **/475 proposalCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;476 /**477 * Proposals that have been made.478 **/479 proposals: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletTreasuryProposal>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;480 /**481 * Generic query482 **/483 [key: string]: QueryableStorageEntry<ApiType>;484 };485 unique: {486 /**487 * Used for migrations488 **/489 chainVersion: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;490 /**491 * (Collection id (controlled?2), who created (real))492 * TODO: Off chain worker should remove from this map when collection gets removed493 **/494 createItemBasket: AugmentedQuery<ApiType, (arg: ITuple<[u32, AccountId32]> | [u32 | AnyNumber | Uint8Array, AccountId32 | string | Uint8Array]) => Observable<Option<u32>>, [ITuple<[u32, AccountId32]>]> & QueryableStorageEntry<ApiType, [ITuple<[u32, AccountId32]>]>;495 fungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;496 /**497 * Collection id (controlled?2), owning user (real)498 **/499 fungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;500 /**501 * Approval sponsoring502 **/503 nftApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;504 /**505 * Collection id (controlled?2), token id (controlled?2)506 **/507 nftTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;508 refungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;509 /**510 * Collection id (controlled?2), token id (controlled?2)511 **/512 reFungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;513 /**514 * Variable metadata sponsoring515 * Collection id (controlled?2), token id (controlled?2)516 **/517 variableMetaDataBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;518 /**519 * Generic query520 **/521 [key: string]: QueryableStorageEntry<ApiType>;522 };523 vesting: {524 /**525 * Vesting schedules of an account.526 * 527 * VestingSchedules: map AccountId => Vec<VestingSchedule>528 **/529 vestingSchedules: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<OrmlVestingVestingSchedule>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;530 /**531 * Generic query532 **/533 [key: string]: QueryableStorageEntry<ApiType>;534 };535 xcmpQueue: {536 /**537 * Inbound aggregate XCMP messages. It can only be one per ParaId/block.538 **/539 inboundXcmpMessages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;540 /**541 * Status of the inbound XCMP channels.542 **/543 inboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, CumulusPalletXcmpQueueInboundStatus, Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>]>>>, []> & QueryableStorageEntry<ApiType, []>;544 /**545 * The messages outbound in a given XCMP channel.546 **/547 outboundXcmpMessages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u16 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32, u16]> & QueryableStorageEntry<ApiType, [u32, u16]>;548 /**549 * The non-empty XCMP channels in order of becoming non-empty, and the index of the first550 * and last outbound message. If the two indices are equal, then it indicates an empty551 * queue and there must be a non-`Ok` `OutboundStatus`. We assume queues grow no greater552 * than 65535 items. Queue indices for normal messages begin at one; zero is reserved in553 * case of the need to send a high-priority signal message this block.554 * The bool is true if there is a signal message waiting to be sent.555 **/556 outboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, CumulusPalletXcmpQueueOutboundStatus, bool, u16, u16]>>>, []> & QueryableStorageEntry<ApiType, []>;557 /**558 * The configuration which controls the dynamics of the outbound queue.559 **/560 queueConfig: AugmentedQuery<ApiType, () => Observable<CumulusPalletXcmpQueueQueueConfigData>, []> & QueryableStorageEntry<ApiType, []>;561 /**562 * Any signal messages waiting to be sent.563 **/564 signalMessages: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;565 /**566 * Generic query567 **/568 [key: string]: QueryableStorageEntry<ApiType>;569 };570 }571572 export interface QueryableStorage<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {573 [key: string]: QueryableModuleStorage<ApiType>;574 }575}1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */34import type { EthereumBlock, EthereumReceipt, EthereumTransactionLegacyTransaction, FpRpcTransactionStatus } from './ethereum';5import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundStatus, CumulusPalletXcmpQueueOutboundStatus, CumulusPalletXcmpQueueQueueConfigData, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData } from './polkadot';6import type { PalletCommonAccountBasicCrossAccountIdRepr, PalletNonfungibleItemData, PalletRefungibleItemData, UpDataStructsCollection, UpDataStructsCollectionStats } from './unique';7import type { ApiTypes } from '@polkadot/api/types';8import type { BTreeMap, Bytes, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types';9import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';10import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV1UpgradeRestriction, SpRuntimeGenericDigest } from '@polkadot/types/lookup';11import type { AnyNumber, ITuple, Observable } from '@polkadot/types/types';1213declare module '@polkadot/api/types/storage' {14 export interface AugmentedQueries<ApiType> {15 balances: {16 /**17 * The balance of an account.18 * 19 * NOTE: This is only used in the case that this pallet is used to store balances.20 **/21 account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;22 /**23 * Any liquidity locks on some account balances.24 * NOTE: Should only be accessed when setting, changing and freeing a lock.25 **/26 locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesBalanceLock>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;27 /**28 * Named reserves on some account balances.29 **/30 reserves: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesReserveData>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;31 /**32 * Storage version of the pallet.33 * 34 * This is set to v2.0.0 for new networks.35 **/36 storageVersion: AugmentedQuery<ApiType, () => Observable<PalletBalancesReleases>, []> & QueryableStorageEntry<ApiType, []>;37 /**38 * The total units issued in the system.39 **/40 totalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;41 /**42 * Generic query43 **/44 [key: string]: QueryableStorageEntry<ApiType>;45 };46 charging: {47 /**48 * Generic query49 **/50 [key: string]: QueryableStorageEntry<ApiType>;51 };52 common: {53 adminAmount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;54 /**55 * Allowlisted collection users56 **/57 allowlist: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;58 /**59 * Collection info60 **/61 collectionById: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<UpDataStructsCollection>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;62 createdCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;63 destroyedCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;64 /**65 * Not used by code, exists only to provide some types to metadata66 **/67 dummyStorageValue: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[UpDataStructsCollectionStats, u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;68 /**69 * List of collection admins70 **/71 isAdmin: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;72 /**73 * Generic query74 **/75 [key: string]: QueryableStorageEntry<ApiType>;76 };77 dmpQueue: {78 /**79 * The configuration.80 **/81 configuration: AugmentedQuery<ApiType, () => Observable<CumulusPalletDmpQueueConfigData>, []> & QueryableStorageEntry<ApiType, []>;82 /**83 * The overweight messages.84 **/85 overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;86 /**87 * The page index.88 **/89 pageIndex: AugmentedQuery<ApiType, () => Observable<CumulusPalletDmpQueuePageIndexData>, []> & QueryableStorageEntry<ApiType, []>;90 /**91 * The queue pages.92 **/93 pages: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, Bytes]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;94 /**95 * Generic query96 **/97 [key: string]: QueryableStorageEntry<ApiType>;98 };99 ethereum: {100 blockHash: AugmentedQuery<ApiType, (arg: U256 | AnyNumber | Uint8Array) => Observable<H256>, [U256]> & QueryableStorageEntry<ApiType, [U256]>;101 /**102 * The current Ethereum block.103 **/104 currentBlock: AugmentedQuery<ApiType, () => Observable<Option<EthereumBlock>>, []> & QueryableStorageEntry<ApiType, []>;105 /**106 * The current Ethereum receipts.107 **/108 currentReceipts: AugmentedQuery<ApiType, () => Observable<Option<Vec<EthereumReceipt>>>, []> & QueryableStorageEntry<ApiType, []>;109 /**110 * The current transaction statuses.111 **/112 currentTransactionStatuses: AugmentedQuery<ApiType, () => Observable<Option<Vec<FpRpcTransactionStatus>>>, []> & QueryableStorageEntry<ApiType, []>;113 /**114 * Current building block's transactions and receipts.115 **/116 pending: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EthereumTransactionLegacyTransaction, FpRpcTransactionStatus, EthereumReceipt]>>>, []> & QueryableStorageEntry<ApiType, []>;117 /**118 * Generic query119 **/120 [key: string]: QueryableStorageEntry<ApiType>;121 };122 evm: {123 accountCodes: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<Bytes>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;124 accountStorages: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<H256>, [H160, H256]> & QueryableStorageEntry<ApiType, [H160, H256]>;125 /**126 * Generic query127 **/128 [key: string]: QueryableStorageEntry<ApiType>;129 };130 evmCoderSubstrate: {131 /**132 * Generic query133 **/134 [key: string]: QueryableStorageEntry<ApiType>;135 };136 evmContractHelpers: {137 allowlist: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<bool>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;138 allowlistEnabled: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;139 owner: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<H160>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;140 selfSponsoring: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;141 sponsorBasket: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<Option<u32>>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;142 sponsoringRateLimit: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<u32>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;143 /**144 * Generic query145 **/146 [key: string]: QueryableStorageEntry<ApiType>;147 };148 evmMigration: {149 migrationPending: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;150 /**151 * Generic query152 **/153 [key: string]: QueryableStorageEntry<ApiType>;154 };155 fungible: {156 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]>;157 balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;158 totalSupply: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;159 /**160 * Generic query161 **/162 [key: string]: QueryableStorageEntry<ApiType>;163 };164 inflation: {165 /**166 * Current inflation for `InflationBlockInterval` number of blocks167 **/168 blockInflation: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;169 /**170 * Next target (relay) block when inflation will be applied171 **/172 nextInflationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;173 /**174 * Next target (relay) block when inflation is recalculated175 **/176 nextRecalculationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;177 /**178 * Relay block when inflation has started179 **/180 startBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;181 /**182 * starting year total issuance183 **/184 startingYearTotalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;185 /**186 * Generic query187 **/188 [key: string]: QueryableStorageEntry<ApiType>;189 };190 nonfungible: {191 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;192 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletCommonAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;193 /**194 * Used to enumerate tokens owned by account195 **/196 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]>;197 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNonfungibleItemData>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;198 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;199 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;200 /**201 * Generic query202 **/203 [key: string]: QueryableStorageEntry<ApiType>;204 };205 parachainInfo: {206 parachainId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;207 /**208 * Generic query209 **/210 [key: string]: QueryableStorageEntry<ApiType>;211 };212 parachainSystem: {213 /**214 * The number of HRMP messages we observed in `on_initialize` and thus used that number for215 * announcing the weight of `on_initialize` and `on_finalize`.216 **/217 announcedHrmpMessagesPerCandidate: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;218 /**219 * The next authorized upgrade, if there is one.220 **/221 authorizedUpgrade: AugmentedQuery<ApiType, () => Observable<Option<H256>>, []> & QueryableStorageEntry<ApiType, []>;222 /**223 * Were the validation data set to notify the relay chain?224 **/225 didSetValidationCode: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;226 /**227 * The parachain host configuration that was obtained from the relay parent.228 * 229 * This field is meant to be updated each block with the validation data inherent. Therefore,230 * before processing of the inherent, e.g. in `on_initialize` this data may be stale.231 * 232 * This data is also absent from the genesis.233 **/234 hostConfiguration: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV1AbridgedHostConfiguration>>, []> & QueryableStorageEntry<ApiType, []>;235 /**236 * HRMP messages that were sent in a block.237 * 238 * This will be cleared in `on_initialize` of each new block.239 **/240 hrmpOutboundMessages: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotCorePrimitivesOutboundHrmpMessage>>, []> & QueryableStorageEntry<ApiType, []>;241 /**242 * HRMP watermark that was set in a block.243 * 244 * This will be cleared in `on_initialize` of each new block.245 **/246 hrmpWatermark: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;247 /**248 * The last downward message queue chain head we have observed.249 * 250 * This value is loaded before and saved after processing inbound downward messages carried251 * by the system inherent.252 **/253 lastDmqMqcHead: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;254 /**255 * The message queue chain heads we have observed per each channel incoming channel.256 * 257 * This value is loaded before and saved after processing inbound downward messages carried258 * by the system inherent.259 **/260 lastHrmpMqcHeads: AugmentedQuery<ApiType, () => Observable<BTreeMap<u32, H256>>, []> & QueryableStorageEntry<ApiType, []>;261 /**262 * Validation code that is set by the parachain and is to be communicated to collator and263 * consequently the relay-chain.264 * 265 * This will be cleared in `on_initialize` of each new block if no other pallet already set266 * the value.267 **/268 newValidationCode: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;269 /**270 * Upward messages that are still pending and not yet send to the relay chain.271 **/272 pendingUpwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;273 /**274 * In case of a scheduled upgrade, this storage field contains the validation code to be applied.275 * 276 * As soon as the relay chain gives us the go-ahead signal, we will overwrite the [`:code`][well_known_keys::CODE]277 * which will result the next block process with the new validation code. This concludes the upgrade process.278 * 279 * [well_known_keys::CODE]: sp_core::storage::well_known_keys::CODE280 **/281 pendingValidationCode: AugmentedQuery<ApiType, () => Observable<Bytes>, []> & QueryableStorageEntry<ApiType, []>;282 /**283 * Number of downward messages processed in a block.284 * 285 * This will be cleared in `on_initialize` of each new block.286 **/287 processedDownwardMessages: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;288 /**289 * The snapshot of some state related to messaging relevant to the current parachain as per290 * the relay parent.291 * 292 * This field is meant to be updated each block with the validation data inherent. Therefore,293 * before processing of the inherent, e.g. in `on_initialize` this data may be stale.294 * 295 * This data is also absent from the genesis.296 **/297 relevantMessagingState: AugmentedQuery<ApiType, () => Observable<Option<CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot>>, []> & QueryableStorageEntry<ApiType, []>;298 /**299 * The weight we reserve at the beginning of the block for processing DMP messages. This300 * overrides the amount set in the Config trait.301 **/302 reservedDmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []> & QueryableStorageEntry<ApiType, []>;303 /**304 * The weight we reserve at the beginning of the block for processing XCMP messages. This305 * overrides the amount set in the Config trait.306 **/307 reservedXcmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []> & QueryableStorageEntry<ApiType, []>;308 /**309 * An option which indicates if the relay-chain restricts signalling a validation code upgrade.310 * In other words, if this is `Some` and [`NewValidationCode`] is `Some` then the produced311 * candidate will be invalid.312 * 313 * This storage item is a mirror of the corresponding value for the current parachain from the314 * relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is315 * set after the inherent.316 **/317 upgradeRestrictionSignal: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV1UpgradeRestriction>>, []> & QueryableStorageEntry<ApiType, []>;318 /**319 * Upward messages that were sent in a block.320 * 321 * This will be cleared in `on_initialize` of each new block.322 **/323 upwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;324 /**325 * The [`PersistedValidationData`] set for this block.326 * This value is expected to be set only once per block and it's never stored327 * in the trie.328 **/329 validationData: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV1PersistedValidationData>>, []> & QueryableStorageEntry<ApiType, []>;330 /**331 * Generic query332 **/333 [key: string]: QueryableStorageEntry<ApiType>;334 };335 randomnessCollectiveFlip: {336 /**337 * Series of block headers from the last 81 blocks that acts as random seed material. This338 * is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of339 * the oldest hash.340 **/341 randomMaterial: AugmentedQuery<ApiType, () => Observable<Vec<H256>>, []> & QueryableStorageEntry<ApiType, []>;342 /**343 * Generic query344 **/345 [key: string]: QueryableStorageEntry<ApiType>;346 };347 refungible: {348 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;349 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg4: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]>;350 balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr]>;351 /**352 * Used to enumerate tokens owned by account353 **/354 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]>;355 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<PalletRefungibleItemData>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;356 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;357 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;358 totalSupply: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;359 /**360 * Generic query361 **/362 [key: string]: QueryableStorageEntry<ApiType>;363 };364 sudo: {365 /**366 * The `AccountId` of the sudo key.367 **/368 key: AugmentedQuery<ApiType, () => Observable<AccountId32>, []> & QueryableStorageEntry<ApiType, []>;369 /**370 * Generic query371 **/372 [key: string]: QueryableStorageEntry<ApiType>;373 };374 system: {375 /**376 * The full account information for a particular account ID.377 **/378 account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<FrameSystemAccountInfo>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;379 /**380 * Total length (in bytes) for all extrinsics put together, for the current block.381 **/382 allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;383 /**384 * Map of block numbers to block hashes.385 **/386 blockHash: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<H256>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;387 /**388 * The current weight for the block.389 **/390 blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;391 /**392 * Digest of the current block, also part of the block header.393 **/394 digest: AugmentedQuery<ApiType, () => Observable<SpRuntimeGenericDigest>, []> & QueryableStorageEntry<ApiType, []>;395 /**396 * The number of events in the `Events<T>` list.397 **/398 eventCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;399 /**400 * Events deposited for the current block.401 * 402 * NOTE: This storage item is explicitly unbounded since it is never intended to be read403 * from within the runtime.404 **/405 events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;406 /**407 * Mapping between a topic (represented by T::Hash) and a vector of indexes408 * of events in the `<Events<T>>` list.409 * 410 * All topic vectors have deterministic storage locations depending on the topic. This411 * allows light-clients to leverage the changes trie storage tracking mechanism and412 * in case of changes fetch the list of events of interest.413 * 414 * The value has the type `(T::BlockNumber, EventIndex)` because if we used only just415 * the `EventIndex` then in case if the topic has the same contents on the next block416 * no notification will be triggered thus the event might be lost.417 **/418 eventTopics: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Vec<ITuple<[u32, u32]>>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;419 /**420 * The execution phase of the block.421 **/422 executionPhase: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemPhase>>, []> & QueryableStorageEntry<ApiType, []>;423 /**424 * Total extrinsics count for the current block.425 **/426 extrinsicCount: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;427 /**428 * Extrinsics data for the current block (maps an extrinsic's index to its data).429 **/430 extrinsicData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;431 /**432 * Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.433 **/434 lastRuntimeUpgrade: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemLastRuntimeUpgradeInfo>>, []> & QueryableStorageEntry<ApiType, []>;435 /**436 * The current block number being processed. Set by `execute_block`.437 **/438 number: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;439 /**440 * Hash of the previous block.441 **/442 parentHash: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;443 /**444 * True if we have upgraded so that AccountInfo contains three types of `RefCount`. False445 * (default) if not.446 **/447 upgradedToTripleRefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;448 /**449 * True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.450 **/451 upgradedToU32RefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;452 /**453 * Generic query454 **/455 [key: string]: QueryableStorageEntry<ApiType>;456 };457 timestamp: {458 /**459 * Did the timestamp get updated in this block?460 **/461 didUpdate: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;462 /**463 * Current time for the current block.464 **/465 now: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;466 /**467 * Generic query468 **/469 [key: string]: QueryableStorageEntry<ApiType>;470 };471 transactionPayment: {472 nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;473 storageVersion: AugmentedQuery<ApiType, () => Observable<PalletTransactionPaymentReleases>, []> & QueryableStorageEntry<ApiType, []>;474 /**475 * Generic query476 **/477 [key: string]: QueryableStorageEntry<ApiType>;478 };479 treasury: {480 /**481 * Proposal indices that have been approved but not yet awarded.482 **/483 approvals: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;484 /**485 * Number of proposals that have been made.486 **/487 proposalCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;488 /**489 * Proposals that have been made.490 **/491 proposals: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletTreasuryProposal>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;492 /**493 * Generic query494 **/495 [key: string]: QueryableStorageEntry<ApiType>;496 };497 unique: {498 /**499 * Used for migrations500 **/501 chainVersion: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;502 /**503 * (Collection id (controlled?2), who created (real))504 * TODO: Off chain worker should remove from this map when collection gets removed505 **/506 createItemBasket: AugmentedQuery<ApiType, (arg: ITuple<[u32, AccountId32]> | [u32 | AnyNumber | Uint8Array, AccountId32 | string | Uint8Array]) => Observable<Option<u32>>, [ITuple<[u32, AccountId32]>]> & QueryableStorageEntry<ApiType, [ITuple<[u32, AccountId32]>]>;507 fungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;508 /**509 * Collection id (controlled?2), owning user (real)510 **/511 fungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;512 /**513 * Approval sponsoring514 **/515 nftApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;516 /**517 * Collection id (controlled?2), token id (controlled?2)518 **/519 nftTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;520 refungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;521 /**522 * Collection id (controlled?2), token id (controlled?2)523 **/524 reFungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;525 /**526 * Variable metadata sponsoring527 * Collection id (controlled?2), token id (controlled?2)528 **/529 variableMetaDataBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;530 /**531 * Generic query532 **/533 [key: string]: QueryableStorageEntry<ApiType>;534 };535 vesting: {536 /**537 * Vesting schedules of an account.538 * 539 * VestingSchedules: map AccountId => Vec<VestingSchedule>540 **/541 vestingSchedules: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<OrmlVestingVestingSchedule>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;542 /**543 * Generic query544 **/545 [key: string]: QueryableStorageEntry<ApiType>;546 };547 xcmpQueue: {548 /**549 * Inbound aggregate XCMP messages. It can only be one per ParaId/block.550 **/551 inboundXcmpMessages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;552 /**553 * Status of the inbound XCMP channels.554 **/555 inboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, CumulusPalletXcmpQueueInboundStatus, Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>]>>>, []> & QueryableStorageEntry<ApiType, []>;556 /**557 * The messages outbound in a given XCMP channel.558 **/559 outboundXcmpMessages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u16 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32, u16]> & QueryableStorageEntry<ApiType, [u32, u16]>;560 /**561 * The non-empty XCMP channels in order of becoming non-empty, and the index of the first562 * and last outbound message. If the two indices are equal, then it indicates an empty563 * queue and there must be a non-`Ok` `OutboundStatus`. We assume queues grow no greater564 * than 65535 items. Queue indices for normal messages begin at one; zero is reserved in565 * case of the need to send a high-priority signal message this block.566 * The bool is true if there is a signal message waiting to be sent.567 **/568 outboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, CumulusPalletXcmpQueueOutboundStatus, bool, u16, u16]>>>, []> & QueryableStorageEntry<ApiType, []>;569 /**570 * The configuration which controls the dynamics of the outbound queue.571 **/572 queueConfig: AugmentedQuery<ApiType, () => Observable<CumulusPalletXcmpQueueQueueConfigData>, []> & QueryableStorageEntry<ApiType, []>;573 /**574 * Any signal messages waiting to be sent.575 **/576 signalMessages: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;577 /**578 * Generic query579 **/580 [key: string]: QueryableStorageEntry<ApiType>;581 };582 }583584 export interface QueryableStorage<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {585 [key: string]: QueryableModuleStorage<ApiType>;586 }587}tests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -3,12 +3,12 @@
import type { EthereumTransactionLegacyTransaction } from './ethereum';
import type { CumulusPrimitivesParachainInherentParachainInherentData } from './polkadot';
-import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateItemData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion } from './unique';
+import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion } from './unique';
import type { ApiTypes, SubmittableExtrinsic } from '@polkadot/api/types';
import type { Bytes, Compact, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types';
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { AccountId32, Call, H160, H256, MultiAddress, Perbill } from '@polkadot/types/interfaces/runtime';
-import type { SpCoreChangesTrieChangesTrieConfiguration, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
+import type { XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
import type { AnyNumber, ITuple } from '@polkadot/types/types';
declare module '@polkadot/api/types/submittable' {
@@ -38,16 +38,6 @@
* it will reset the account nonce (`frame_system::AccountNonce`).
*
* The dispatch origin for this call is `root`.
- *
- * # <weight>
- * - Independent of the arguments.
- * - Contains a limited number of reads and writes.
- * ---------------------
- * - Base Weight:
- * - Creating: 27.56 µs
- * - Killing: 35.11 µs
- * - DB Weight: 1 Read, 1 Write to `who`
- * # </weight>
**/
setBalance: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, newFree: Compact<u128> | AnyNumber | Uint8Array, newReserved: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>, Compact<u128>]>;
/**
@@ -75,8 +65,6 @@
* - `transfer_keep_alive` works the same way as `transfer`, but has an additional check
* that the transfer will not kill the origin account.
* ---------------------------------
- * - Base Weight: 73.64 µs, worst case scenario (account created, account removed)
- * - DB Weight: 1 Read and 1 Write to destination account
* - Origin account is already in memory, so no DB operations for them.
* # </weight>
**/
@@ -108,11 +96,6 @@
* 99% of the time you want [`transfer`] instead.
*
* [`transfer`]: struct.Pallet.html#method.transfer
- * # <weight>
- * - Cheaper than transfer because account cannot be killed.
- * - Base Weight: 51.4 µs
- * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already)
- * #</weight>
**/
transferKeepAlive: AugmentedSubmittable<(dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>]>;
/**
@@ -197,6 +180,20 @@
};
inflation: {
/**
+ * This method sets the inflation start date. Can be only called once.
+ * Inflation start block can be backdated and will catch up. The method will create Treasury
+ * account if it does not exist and perform the first inflation deposit.
+ *
+ * # Permissions
+ *
+ * * Root
+ *
+ * # Arguments
+ *
+ * * inflation_start_relay_block: The relay chain block at which inflation should start
+ **/
+ startInflation: AugmentedSubmittable<(inflationStartRelayBlock: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
+ /**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
@@ -374,7 +371,7 @@
* - Weight of derivative `call` execution + 10,000.
* # </weight>
**/
- sudo: AugmentedSubmittable<(call: Call) => SubmittableExtrinsic<ApiType>, [Call]>;
+ sudo: AugmentedSubmittable<(call: Call | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call]>;
/**
* Authenticates the sudo key and dispatches a function call with `Signed` origin from
* a given account.
@@ -388,7 +385,7 @@
* - Weight of derivative `call` execution + 10,000.
* # </weight>
**/
- sudoAs: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, ) => SubmittableExtrinsic<ApiType>, [MultiAddress, Call]>;
+ sudoAs: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, call: Call | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Call]>;
/**
* Authenticates the sudo key and dispatches a function call with `Root` origin.
* This function does not check the weight of the call, and instead allows the
@@ -401,7 +398,7 @@
* - The weight of this call is defined by the caller.
* # </weight>
**/
- sudoUncheckedWeight: AugmentedSubmittable<(call: Call, weight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, u64]>;
+ sudoUncheckedWeight: AugmentedSubmittable<(call: Call | string | Uint8Array, weight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, u64]>;
/**
* Generic tx
**/
@@ -417,24 +414,10 @@
*
* **NOTE:** We rely on the Root origin to provide us the number of subkeys under
* the prefix we are removing to accurately calculate the weight of this function.
- *
- * # <weight>
- * - `O(P)` where `P` amount of keys with prefix `prefix`
- * - `P` storage deletions.
- * - Base Weight: 0.834 * P µs
- * - Writes: Number of subkeys + 1
- * # </weight>
**/
killPrefix: AugmentedSubmittable<(prefix: Bytes | string | Uint8Array, subkeys: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, u32]>;
/**
* Kill some items from storage.
- *
- * # <weight>
- * - `O(IK)` where `I` length of `keys` and `K` length of one key
- * - `I` storage deletions.
- * - Base Weight: .378 * i µs
- * - Writes: Number of items
- * # </weight>
**/
killStorage: AugmentedSubmittable<(keys: Vec<Bytes> | (Bytes | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Bytes>]>;
/**
@@ -454,19 +437,6 @@
* # </weight>
**/
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
- /**
- * Set the new changes trie configuration.
- *
- * # <weight>
- * - `O(1)`
- * - 1 storage write or delete (codec `O(1)`).
- * - 1 call to `deposit_log`: Uses `append` API, so O(1)
- * - Base Weight: 7.218 µs
- * - DB Weight:
- * - Writes: Changes Trie, System Digest
- * # </weight>
- **/
- setChangesTrieConfig: AugmentedSubmittable<(changesTrieConfig: Option<SpCoreChangesTrieChangesTrieConfiguration> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<SpCoreChangesTrieChangesTrieConfiguration>]>;
/**
* Set the new runtime code.
*
@@ -496,25 +466,10 @@
setCodeWithoutChecks: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
* Set the number of pages in the WebAssembly environment's heap.
- *
- * # <weight>
- * - `O(1)`
- * - 1 storage write.
- * - Base Weight: 1.405 µs
- * - 1 write to HEAP_PAGES
- * - 1 digest item
- * # </weight>
**/
setHeapPages: AugmentedSubmittable<(pages: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
/**
* Set some items of storage.
- *
- * # <weight>
- * - `O(I)` where `I` length of `items`
- * - `I` storage writes (`O(1)`).
- * - Base Weight: 0.568 * i µs
- * - Writes: Number of items
- * # </weight>
**/
setStorage: AugmentedSubmittable<(items: Vec<ITuple<[Bytes, Bytes]>> | ([Bytes | string | Uint8Array, Bytes | string | Uint8Array])[]) => SubmittableExtrinsic<ApiType>, [Vec<ITuple<[Bytes, Bytes]>>]>;
/**
@@ -718,6 +673,12 @@
**/
createCollection: AugmentedSubmittable<(collectionName: Vec<u16> | (u16 | AnyNumber | Uint8Array)[], collectionDescription: Vec<u16> | (u16 | AnyNumber | Uint8Array)[], tokenPrefix: Bytes | string | Uint8Array, mode: UpDataStructsCollectionMode | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<u16>, Vec<u16>, Bytes, UpDataStructsCollectionMode]>;
/**
+ * This method creates a collection
+ *
+ * Prefer it to deprecated [`created_collection`] method
+ **/
+ createCollectionEx: AugmentedSubmittable<(data: UpDataStructsCreateCollectionData | { mode?: any; access?: any; name?: any; description?: any; tokenPrefix?: any; offchainSchema?: any; schemaVersion?: any; pendingSponsor?: any; limits?: any; variableOnChainSchema?: any; constOnChainSchema?: any; metaUpdatePermission?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [UpDataStructsCreateCollectionData]>;
+ /**
* This method creates a concrete instance of NFT Collection created with CreateCollection method.
*
* # Permissions
tests/src/interfaces/augment-types.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-types.ts
+++ b/tests/src/interfaces/augment-types.ts
@@ -3,7 +3,7 @@
import type { EthereumBlock, EthereumLog, EthereumReceipt, EthereumTransactionLegacyTransaction, EvmCoreErrorExitReason, FpRpcTransactionStatus } from './ethereum';
import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundStatus, CumulusPalletXcmpQueueOutboundStatus, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData } from './polkadot';
-import type { PalletCommonAccountBasicCrossAccountIdRepr, PalletNonfungibleItemData, PalletRefungibleItemData, PalletUnqSchedulerCallSpec, PalletUnqSchedulerReleases, PalletUnqSchedulerScheduledV2, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionId, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateItemData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsorshipState, UpDataStructsTokenId } from './unique';
+import type { PalletCommonAccountBasicCrossAccountIdRepr, PalletNonfungibleItemData, PalletRefungibleItemData, PalletUnqSchedulerCallSpec, PalletUnqSchedulerReleases, PalletUnqSchedulerScheduledV2, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionId, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsorshipState, UpDataStructsTokenId } from './unique';
import type { BitVec, Bool, Bytes, Data, I128, I16, I256, I32, I64, I8, Json, Null, Raw, StorageKey, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types';
import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';
import type { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations';
@@ -1021,6 +1021,7 @@
UpDataStructsCollectionLimits: UpDataStructsCollectionLimits;
UpDataStructsCollectionMode: UpDataStructsCollectionMode;
UpDataStructsCollectionStats: UpDataStructsCollectionStats;
+ UpDataStructsCreateCollectionData: UpDataStructsCreateCollectionData;
UpDataStructsCreateItemData: UpDataStructsCreateItemData;
UpDataStructsMetaUpdatePermission: UpDataStructsMetaUpdatePermission;
UpDataStructsSchemaVersion: UpDataStructsSchemaVersion;
tests/src/interfaces/unique/definitions.tsdiffbeforeafterboth--- a/tests/src/interfaces/unique/definitions.ts
+++ b/tests/src/interfaces/unique/definitions.ts
@@ -67,6 +67,20 @@
constOnChainSchema: 'Vec<u8>',
metaUpdatePermission: 'UpDataStructsMetaUpdatePermission',
},
+ UpDataStructsCreateCollectionData: {
+ mode: 'UpDataStructsCollectionMode',
+ access: 'Option<UpDataStructsAccessMode>',
+ name: 'Vec<u16>',
+ description: 'Vec<u16>',
+ tokenPrefix: 'Vec<u8>',
+ offchainSchema: 'Vec<u8>',
+ schemaVersion: 'Option<UpDataStructsSchemaVersion>',
+ pendingSponsor: 'Option<AccountId>',
+ limits: 'Option<UpDataStructsCollectionLimits>',
+ variableOnChainSchema: 'Vec<u8>',
+ constOnChainSchema: 'Vec<u8>',
+ metaUpdatePermission: 'Option<UpDataStructsMetaUpdatePermission>',
+ },
UpDataStructsCollectionStats: {
created: 'u32',
destroyed: 'u32',
@@ -76,7 +90,13 @@
UpDataStructsTokenId: 'u32',
PalletNonfungibleItemData: mkDummy('NftItemData'),
PalletRefungibleItemData: mkDummy('RftItemData'),
- UpDataStructsCollectionMode: mkDummy('CollectionMode'),
+ UpDataStructsCollectionMode: {
+ _enum: {
+ NFT: null,
+ Fungible: 'u32',
+ ReFungible: null,
+ },
+ },
UpDataStructsCreateItemData: mkDummy('CreateItemData'),
UpDataStructsCollectionLimits: {
accountTokenOwnershipLimit: 'Option<u32>',
@@ -101,7 +121,9 @@
UpDataStructsAccessMode: {
_enum: ['Normal', 'AllowList'],
},
- UpDataStructsSchemaVersion: mkDummy('SchemaVersion'),
+ UpDataStructsSchemaVersion: {
+ _enum: ['ImageURL', 'Unique'],
+ },
PalletUnqSchedulerScheduledV2: mkDummy('ScheduledV2'),
PalletUnqSchedulerCallSpec: mkDummy('CallSpec'),
tests/src/interfaces/unique/types.tsdiffbeforeafterboth--- a/tests/src/interfaces/unique/types.ts
+++ b/tests/src/interfaces/unique/types.ts
@@ -77,8 +77,11 @@
}
/** @name UpDataStructsCollectionMode */
-export interface UpDataStructsCollectionMode extends Struct {
- readonly dummyCollectionMode: u32;
+export interface UpDataStructsCollectionMode extends Enum {
+ readonly isNft: boolean;
+ readonly isFungible: boolean;
+ readonly asFungible: u32;
+ readonly isReFungible: boolean;
}
/** @name UpDataStructsCollectionStats */
@@ -88,6 +91,22 @@
readonly alive: u32;
}
+/** @name UpDataStructsCreateCollectionData */
+export interface UpDataStructsCreateCollectionData extends Struct {
+ readonly mode: UpDataStructsCollectionMode;
+ readonly access: Option<UpDataStructsAccessMode>;
+ readonly name: Vec<u16>;
+ readonly description: Vec<u16>;
+ readonly tokenPrefix: Bytes;
+ readonly offchainSchema: Bytes;
+ readonly schemaVersion: Option<UpDataStructsSchemaVersion>;
+ readonly pendingSponsor: Option<AccountId>;
+ readonly limits: Option<UpDataStructsCollectionLimits>;
+ readonly variableOnChainSchema: Bytes;
+ readonly constOnChainSchema: Bytes;
+ readonly metaUpdatePermission: Option<UpDataStructsMetaUpdatePermission>;
+}
+
/** @name UpDataStructsCreateItemData */
export interface UpDataStructsCreateItemData extends Struct {
readonly dummyCreateItemData: u32;
@@ -101,8 +120,9 @@
}
/** @name UpDataStructsSchemaVersion */
-export interface UpDataStructsSchemaVersion extends Struct {
- readonly dummySchemaVersion: u32;
+export interface UpDataStructsSchemaVersion extends Enum {
+ readonly isImageUrl: boolean;
+ readonly isUnique: boolean;
}
/** @name UpDataStructsSponsorshipState */
tests/src/substrate/substrate-api.tsdiffbeforeafterboth--- a/tests/src/substrate/substrate-api.ts
+++ b/tests/src/substrate/substrate-api.ts
@@ -95,6 +95,32 @@
return TransactionStatus.Fail;
}
+export function executeTransaction(api: ApiPromise, sender: IKeyringPair, transaction: SubmittableExtrinsic<'promise'>): Promise<EventRecord[]> {
+ return new Promise(async (res, rej) => {
+ try {
+ await transaction.signAndSend(sender, ({events, status}) => {
+ if (!status.isInBlock && !status.isFinalized) return;
+ for (const {event} of events) {
+ if (api.events.system.ExtrinsicSuccess.is(event)) {
+ res(events);
+ } else if (api.events.system.ExtrinsicFailed.is(event)) {
+ const {data: [error]} = event;
+ if (error.isModule) {
+ const decoded = api.registry.findMetaError(error.asModule);
+ const {method, section} = decoded;
+ rej(new Error(`${section}.${method}`));
+ } else {
+ rej(new Error(error.toString()));
+ }
+ }
+ }
+ });
+ } catch (e) {
+ rej(e);
+ }
+ });
+}
+
export function
submitTransactionAsync(sender: IKeyringPair, transaction: SubmittableExtrinsic<ApiTypes>): Promise<EventRecord[]> {
/* eslint no-async-promise-executor: "off" */
tests/src/util/helpers.tsdiffbeforeafterboth--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -49,7 +49,7 @@
};
} else if ('Substrate' in input) {
return input;
- }else if ('substrate' in input) {
+ } else if ('substrate' in input) {
return {
Substrate: (input as any).substrate,
};
@@ -116,15 +116,15 @@
export interface IChainLimits {
collectionNumbersLimit: number;
- accountTokenOwnershipLimit: number;
- collectionsAdminsLimit: number;
- customDataLimit: number;
- nftSponsorTransferTimeout: number;
- fungibleSponsorTransferTimeout: number;
- refungibleSponsorTransferTimeout: number;
- offchainSchemaLimit: number;
- variableOnChainSchemaLimit: number;
- constOnChainSchemaLimit: number;
+ accountTokenOwnershipLimit: number;
+ collectionsAdminsLimit: number;
+ customDataLimit: number;
+ nftSponsorTransferTimeout: number;
+ fungibleSponsorTransferTimeout: number;
+ refungibleSponsorTransferTimeout: number;
+ offchainSchemaLimit: number;
+ variableOnChainSchemaLimit: number;
+ constOnChainSchemaLimit: number;
}
export interface IReFungibleTokenDataType {
@@ -283,7 +283,7 @@
modeprm = {refungible: null};
}
- const tx = api.tx.unique.createCollection(strToUTF16(name), strToUTF16(description), strToUTF16(tokenPrefix), modeprm as any);
+ const tx = api.tx.unique.createCollectionEx({name: strToUTF16(name), description: strToUTF16(description), tokenPrefix: strToUTF16(tokenPrefix), mode: modeprm as any});
const events = await submitTransactionAsync(alicePrivateKey, tx);
const result = getCreateCollectionResult(events);
@@ -329,7 +329,7 @@
// Run the CreateCollection transaction
const alicePrivateKey = privateKey('//Alice');
- const tx = api.tx.unique.createCollection(strToUTF16(name), strToUTF16(description), strToUTF16(tokenPrefix), modeprm as any);
+ const tx = api.tx.unique.createCollectionEx({name: strToUTF16(name), description: strToUTF16(description), tokenPrefix: strToUTF16(tokenPrefix), mode: modeprm as any});
const events = await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;
const result = getCreateCollectionResult(events);
@@ -557,7 +557,7 @@
await usingApi(async (api) => {
- const tx = api.tx.unique.setTransfersEnabledFlag (collectionId, enabled);
+ const tx = api.tx.unique.setTransfersEnabledFlag(collectionId, enabled);
const events = await submitTransactionAsync(sender, tx);
const result = getGenericResult(events);
@@ -569,7 +569,7 @@
await usingApi(async (api) => {
- const tx = api.tx.unique.setTransfersEnabledFlag (collectionId, enabled);
+ const tx = api.tx.unique.setTransfersEnabledFlag(collectionId, enabled);
const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
const result = getGenericResult(events);
@@ -811,8 +811,7 @@
}
export async function
-getFreeBalance(account: IKeyringPair) : Promise<bigint>
-{
+getFreeBalance(account: IKeyringPair): Promise<bigint> {
let balance = 0n;
await usingApi(async (api) => {
balance = BigInt((await api.query.system.account(account.address)).data.free.toString());