difftreelog
Merge pull request #277 from UniqueNetwork/feature/create-collection-ex
in: master
Add createCollectionEx call
18 files changed
pallets/common/src/lib.rsdiffbeforeafterboth--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -14,7 +14,10 @@
use up_data_structs::{
COLLECTION_NUMBER_LIMIT, Collection, CollectionId, CreateItemData, ExistenceRequirement,
MAX_TOKEN_PREFIX_LENGTH, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission, Pays, PostDispatchInfo,
- TokenId, Weight, WithdrawReasons, CollectionStats, CustomDataLimit,
+ TokenId, Weight, WithdrawReasons, CollectionStats, MAX_TOKEN_OWNERSHIP, CollectionMode,
+ NFT_SPONSOR_TRANSFER_TIMEOUT, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
+ REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT, CUSTOM_DATA_LIMIT, CollectionLimits,
+ CustomDataLimit, CreateCollectionData, SponsorshipState,
};
pub use pallet::*;
use sp_core::H160;
@@ -285,6 +288,10 @@
TokenVariableDataLimitExceeded,
/// Exceeded max admin count
CollectionAdminCountExceeded,
+ /// Collection limit bounds per collection exceeded
+ CollectionLimitBoundsExceeded,
+ /// Tried to enable permissions which are only permitted to be disabled
+ OwnerPermissionsCantBeReverted,
/// Collection settings not allowing items transferring
TransferNotAllowed,
@@ -395,7 +402,10 @@
}
impl<T: Config> Pallet<T> {
- pub fn init_collection(data: Collection<T::AccountId>) -> Result<CollectionId, DispatchError> {
+ pub fn init_collection(
+ owner: T::AccountId,
+ data: CreateCollectionData<T::AccountId>,
+ ) -> Result<CollectionId, DispatchError> {
{
ensure!(
data.token_prefix.len() <= MAX_TOKEN_PREFIX_LENGTH as usize,
@@ -418,6 +428,29 @@
// =========
+ let collection = Collection {
+ owner: owner.clone(),
+ name: data.name,
+ mode: data.mode.clone(),
+ mint_mode: false,
+ access: data.access.unwrap_or_default(),
+ description: data.description,
+ token_prefix: data.token_prefix,
+ offchain_schema: data.offchain_schema,
+ schema_version: data.schema_version.unwrap_or_default(),
+ sponsorship: data
+ .pending_sponsor
+ .map(SponsorshipState::Unconfirmed)
+ .unwrap_or_default(),
+ variable_on_chain_schema: data.variable_on_chain_schema,
+ const_on_chain_schema: data.const_on_chain_schema,
+ limits: data
+ .limits
+ .map(|limits| Self::clamp_limits(data.mode.clone(), &Default::default(), limits))
+ .unwrap_or_else(|| Ok(CollectionLimits::default()))?,
+ meta_update_permission: data.meta_update_permission.unwrap_or_default(),
+ };
+
// Take a (non-refundable) deposit of collection creation
{
let mut imbalance =
@@ -429,7 +462,7 @@
),
);
<T as Config>::Currency::settle(
- &data.owner,
+ &owner,
imbalance,
WithdrawReasons::TRANSFER,
ExistenceRequirement::KeepAlive,
@@ -438,12 +471,8 @@
}
<CreatedCollectionCount<T>>::put(created_count);
- <Pallet<T>>::deposit_event(Event::CollectionCreated(
- id,
- data.mode.id(),
- data.owner.clone(),
- ));
- <CollectionById<T>>::insert(id, data);
+ <Pallet<T>>::deposit_event(Event::CollectionCreated(id, data.mode.id(), owner.clone()));
+ <CollectionById<T>>::insert(id, collection);
Ok(id)
}
@@ -527,6 +556,61 @@
Ok(())
}
+
+ pub fn clamp_limits(
+ mode: CollectionMode,
+ old_limit: &CollectionLimits,
+ mut new_limit: CollectionLimits,
+ ) -> Result<CollectionLimits, DispatchError> {
+ macro_rules! limit_default {
+ ($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{
+ $(
+ if let Some($new) = $new.$field {
+ let $old = $old.$field($($arg)?);
+ let _ = $new;
+ let _ = $old;
+ $check
+ } else {
+ $new.$field = $old.$field
+ }
+ )*
+ }};
+ }
+
+ limit_default!(old_limit, new_limit,
+ account_token_ownership_limit => ensure!(
+ new_limit <= MAX_TOKEN_OWNERSHIP,
+ <Error<T>>::CollectionLimitBoundsExceeded,
+ ),
+ sponsor_transfer_timeout(match mode {
+ CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,
+ CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
+ CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
+ }) => ensure!(
+ new_limit <= MAX_SPONSOR_TIMEOUT,
+ <Error<T>>::CollectionLimitBoundsExceeded,
+ ),
+ sponsored_data_size => ensure!(
+ new_limit <= CUSTOM_DATA_LIMIT,
+ <Error<T>>::CollectionLimitBoundsExceeded,
+ ),
+ token_limit => ensure!(
+ old_limit >= new_limit && new_limit > 0,
+ <Error<T>>::CollectionTokenLimitExceeded
+ ),
+ owner_can_transfer => ensure!(
+ old_limit || !new_limit,
+ <Error<T>>::OwnerPermissionsCantBeReverted,
+ ),
+ owner_can_destroy => ensure!(
+ old_limit || !new_limit,
+ <Error<T>>::OwnerPermissionsCantBeReverted,
+ ),
+ sponsored_data_rate_limit => {},
+ transfers_enabled => {},
+ );
+ Ok(new_limit)
+ }
}
#[macro_export]
pallets/fungible/src/lib.rsdiffbeforeafterboth--- a/pallets/fungible/src/lib.rs
+++ b/pallets/fungible/src/lib.rs
@@ -2,7 +2,7 @@
use core::ops::Deref;
use frame_support::{ensure};
-use up_data_structs::{AccessMode, Collection, CollectionId, TokenId};
+use up_data_structs::{AccessMode, Collection, CollectionId, TokenId, CreateCollectionData};
use pallet_common::{
Error as CommonError, Event as CommonEvent, Pallet as PalletCommon, account::CrossAccountId,
};
@@ -100,8 +100,11 @@
}
impl<T: Config> Pallet<T> {
- pub fn init_collection(data: Collection<T::AccountId>) -> Result<CollectionId, DispatchError> {
- <PalletCommon<T>>::init_collection(data)
+ pub fn init_collection(
+ owner: T::AccountId,
+ data: CreateCollectionData<T::AccountId>,
+ ) -> Result<CollectionId, DispatchError> {
+ <PalletCommon<T>>::init_collection(owner, data)
}
pub fn destroy_collection(
collection: FungibleHandle<T>,
pallets/nonfungible/src/lib.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -2,7 +2,9 @@
use erc::ERC721Events;
use frame_support::{BoundedVec, ensure};
-use up_data_structs::{AccessMode, Collection, CollectionId, CustomDataLimit, TokenId};
+use up_data_structs::{
+ AccessMode, Collection, CollectionId, CustomDataLimit, TokenId, CreateCollectionData,
+};
use pallet_common::{
Error as CommonError, Pallet as PalletCommon, Event as CommonEvent, account::CrossAccountId,
};
@@ -140,8 +142,11 @@
// unchecked calls skips any permission checks
impl<T: Config> Pallet<T> {
- pub fn init_collection(data: Collection<T::AccountId>) -> Result<CollectionId, DispatchError> {
- <PalletCommon<T>>::init_collection(data)
+ pub fn init_collection(
+ owner: T::AccountId,
+ data: CreateCollectionData<T::AccountId>,
+ ) -> Result<CollectionId, DispatchError> {
+ <PalletCommon<T>>::init_collection(owner, data)
}
pub fn destroy_collection(
collection: NonfungibleHandle<T>,
pallets/refungible/src/lib.rsdiffbeforeafterboth--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -3,6 +3,7 @@
use frame_support::{ensure, BoundedVec};
use up_data_structs::{
AccessMode, Collection, CollectionId, CustomDataLimit, MAX_REFUNGIBLE_PIECES, TokenId,
+ CreateCollectionData,
};
use pallet_common::{
Error as CommonError, Event as CommonEvent, Pallet as PalletCommon, account::CrossAccountId,
@@ -155,8 +156,11 @@
// unchecked calls skips any permission checks
impl<T: Config> Pallet<T> {
- pub fn init_collection(data: Collection<T::AccountId>) -> Result<CollectionId, DispatchError> {
- <PalletCommon<T>>::init_collection(data)
+ pub fn init_collection(
+ owner: T::AccountId,
+ data: CreateCollectionData<T::AccountId>,
+ ) -> Result<CollectionId, DispatchError> {
+ <PalletCommon<T>>::init_collection(owner, data)
}
pub fn destroy_collection(
collection: RefungibleHandle<T>,
pallets/unique/src/lib.rsdiffbeforeafterboth--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -36,13 +36,11 @@
use frame_system::{self as system, ensure_signed};
use sp_runtime::{sp_std::prelude::Vec};
use up_data_structs::{
- MAX_DECIMAL_POINTS, MAX_SPONSOR_TIMEOUT, MAX_TOKEN_OWNERSHIP, CUSTOM_DATA_LIMIT,
- VARIABLE_ON_CHAIN_SCHEMA_LIMIT, CONST_ON_CHAIN_SCHEMA_LIMIT, OFFCHAIN_SCHEMA_LIMIT,
- FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
- NFT_SPONSOR_TRANSFER_TIMEOUT, MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH,
+ MAX_DECIMAL_POINTS, VARIABLE_ON_CHAIN_SCHEMA_LIMIT, CONST_ON_CHAIN_SCHEMA_LIMIT,
+ OFFCHAIN_SCHEMA_LIMIT, MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH,
MAX_TOKEN_PREFIX_LENGTH, AccessMode, Collection, CreateItemData, CollectionLimits,
CollectionId, CollectionMode, TokenId, SchemaVersion, SponsorshipState, MetaUpdatePermission,
- CustomDataLimit,
+ CreateCollectionData, CustomDataLimit,
};
use pallet_common::{
account::CrossAccountId, CollectionHandle, Pallet as PalletCommon, Error as CommonError,
@@ -84,10 +82,6 @@
ConfirmUnsetSponsorFail,
/// Length of items properties must be greater than 0.
EmptyArgument,
- /// Collection limit bounds per collection exceeded
- CollectionLimitBoundsExceeded,
- /// Tried to enable permissions which are only permitted to be disabled
- OwnerPermissionsCantBeReverted,
}
}
@@ -321,42 +315,39 @@
// returns collection ID
#[weight = <SelfWeightOf<T>>::create_collection()]
#[transactional]
+ #[deprecated]
pub fn create_collection(origin,
collection_name: BoundedVec<u16, ConstU32<MAX_COLLECTION_NAME_LENGTH>>,
collection_description: BoundedVec<u16, ConstU32<MAX_COLLECTION_DESCRIPTION_LENGTH>>,
token_prefix: BoundedVec<u8, ConstU32<MAX_TOKEN_PREFIX_LENGTH>>,
- mode: CollectionMode) -> DispatchResult {
-
- // Anyone can create a collection
- let who = ensure_signed(origin)?;
-
- // Create new collection
- let new_collection = Collection {
- owner: who,
+ mode: CollectionMode) -> DispatchResult {
+ let data: CreateCollectionData<T::AccountId> = CreateCollectionData {
name: collection_name,
- mode: mode.clone(),
- mint_mode: false,
- access: AccessMode::Normal,
description: collection_description,
token_prefix,
- offchain_schema: BoundedVec::default(),
- schema_version: SchemaVersion::ImageURL,
- sponsorship: SponsorshipState::Disabled,
- variable_on_chain_schema: BoundedVec::default(),
- const_on_chain_schema: BoundedVec::default(),
- limits: Default::default(),
- meta_update_permission: Default::default(),
+ mode,
+ ..Default::default()
};
+ Self::create_collection_ex(origin, data)
+ }
+
+ /// This method creates a collection
+ ///
+ /// Prefer it to deprecated [`created_collection`] method
+ #[weight = <SelfWeightOf<T>>::create_collection()]
+ #[transactional]
+ pub fn create_collection_ex(origin, data: CreateCollectionData<T::AccountId>) -> DispatchResult {
+ let owner = ensure_signed(origin)?;
- let _id = match mode {
- CollectionMode::NFT => {<PalletNonfungible<T>>::init_collection(new_collection)?},
+ let _id = match data.mode {
+ CollectionMode::NFT => {<PalletNonfungible<T>>::init_collection(owner, data)?},
CollectionMode::Fungible(decimal_points) => {
// check params
ensure!(decimal_points <= MAX_DECIMAL_POINTS, Error::<T>::CollectionDecimalPointLimitExceeded);
- <PalletFungible<T>>::init_collection(new_collection)?
+ <PalletFungible<T>>::init_collection(owner, data)?
}
CollectionMode::ReFungible => {
- <PalletRefungible<T>>::init_collection(new_collection)?
+ <PalletRefungible<T>>::init_collection(owner, data)?
}
};
@@ -1093,61 +1084,12 @@
collection_id: CollectionId,
new_limit: CollectionLimits,
) -> DispatchResult {
- let mut new_limit = new_limit;
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
target_collection.check_is_owner(&sender)?;
let old_limit = &target_collection.limits;
- macro_rules! limit_default {
- ($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{
- $(
- if let Some($new) = $new.$field {
- let $old = $old.$field($($arg)?);
- let _ = $new;
- let _ = $old;
- $check
- } else {
- $new.$field = $old.$field
- }
- )*
- }};
- }
-
- limit_default!(old_limit, new_limit,
- account_token_ownership_limit => ensure!(
- new_limit <= MAX_TOKEN_OWNERSHIP,
- <Error<T>>::CollectionLimitBoundsExceeded,
- ),
- sponsor_transfer_timeout(match target_collection.mode {
- CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,
- CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
- CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
- }) => ensure!(
- new_limit <= MAX_SPONSOR_TIMEOUT,
- <Error<T>>::CollectionLimitBoundsExceeded,
- ),
- sponsored_data_size => ensure!(
- new_limit <= CUSTOM_DATA_LIMIT,
- <Error<T>>::CollectionLimitBoundsExceeded,
- ),
- token_limit => ensure!(
- old_limit >= new_limit && new_limit > 0,
- <CommonError<T>>::CollectionTokenLimitExceeded
- ),
- owner_can_transfer => ensure!(
- old_limit || !new_limit,
- <Error<T>>::OwnerPermissionsCantBeReverted,
- ),
- owner_can_destroy => ensure!(
- old_limit || !new_limit,
- <Error<T>>::OwnerPermissionsCantBeReverted,
- ),
- sponsored_data_rate_limit => {},
- transfers_enabled => {},
- );
-
- target_collection.limits = new_limit;
+ target_collection.limits = <PalletCommon<T>>::clamp_limits(target_collection.mode.clone(), &old_limit, new_limit)?;
<Pallet<T>>::deposit_event(Event::<T>::CollectionLimitSet(
collection_id
pallets/unique/src/tests.rsdiffbeforeafterboth--- a/pallets/unique/src/tests.rs
+++ b/pallets/unique/src/tests.rs
@@ -5,7 +5,7 @@
use up_data_structs::{
COLLECTION_NUMBER_LIMIT, CollectionId, CreateItemData, CreateFungibleData, CreateNftData,
CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission,
- TokenId,
+ TokenId, MAX_TOKEN_OWNERSHIP,
};
use frame_support::{assert_noop, assert_ok};
use sp_std::convert::TryInto;
primitives/data-structs/src/lib.rsdiffbeforeafterboth--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -263,6 +263,31 @@
pub meta_update_permission: MetaUpdatePermission,
}
+#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, Debug, Derivative, MaxEncodedLen)]
+#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derivative(Default(bound = ""))]
+pub struct CreateCollectionData<AccountId> {
+ #[derivative(Default(value = "CollectionMode::NFT"))]
+ pub mode: CollectionMode,
+ pub access: Option<AccessMode>,
+ #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+ pub name: BoundedVec<u16, ConstU32<MAX_COLLECTION_NAME_LENGTH>>,
+ #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+ pub description: BoundedVec<u16, ConstU32<MAX_COLLECTION_DESCRIPTION_LENGTH>>,
+ #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+ pub token_prefix: BoundedVec<u8, ConstU32<MAX_TOKEN_PREFIX_LENGTH>>,
+ #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+ pub offchain_schema: BoundedVec<u8, ConstU32<OFFCHAIN_SCHEMA_LIMIT>>,
+ pub schema_version: Option<SchemaVersion>,
+ pub pending_sponsor: Option<AccountId>,
+ pub limits: Option<CollectionLimits>,
+ #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+ pub variable_on_chain_schema: BoundedVec<u8, ConstU32<VARIABLE_ON_CHAIN_SCHEMA_LIMIT>>,
+ #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+ pub const_on_chain_schema: BoundedVec<u8, ConstU32<CONST_ON_CHAIN_SCHEMA_LIMIT>>,
+ pub meta_update_permission: Option<MetaUpdatePermission>,
+}
+
#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub struct NftItemType<AccountId> {
tests/package.jsondiffbeforeafterboth--- a/tests/package.json
+++ b/tests/package.json
@@ -68,9 +68,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-errors.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -69,6 +69,10 @@
**/
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>;
@@ -437,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>;
@@ -448,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-tx.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -2,7 +2,7 @@
/* eslint-disable */
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';
@@ -671,6 +671,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.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit2/* eslint-disable */34import type { EthereumBlock, EthereumLog, EthereumReceipt, EthereumTransactionLegacyTransaction, EvmCoreErrorExitReason, FpRpcTransactionStatus } from './ethereum';5import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundStatus, CumulusPalletXcmpQueueOutboundStatus, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData } from './polkadot';6import type { PalletCommonAccountBasicCrossAccountIdRepr, PalletNonfungibleItemData, PalletRefungibleItemData, PalletUnqSchedulerCallSpec, PalletUnqSchedulerReleases, PalletUnqSchedulerScheduledV2, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionId, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateItemData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsorshipState, UpDataStructsTokenId } from './unique';7import 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';8import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';9import type { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations';10import type { RawAuraPreDigest } from '@polkadot/types/interfaces/aura';11import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';12import type { UncleEntryItem } from '@polkadot/types/interfaces/authorship';13import type { AllowedSlots, BabeAuthorityWeight, BabeBlockWeight, BabeEpochConfiguration, BabeEquivocationProof, BabeWeight, EpochAuthorship, MaybeRandomness, MaybeVrf, NextConfigDescriptor, NextConfigDescriptorV1, Randomness, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondaryPlain, RawBabePreDigestSecondaryTo159, RawBabePreDigestSecondaryVRF, RawBabePreDigestTo159, SlotNumber, VrfData, VrfOutput, VrfProof } from '@polkadot/types/interfaces/babe';14import type { AccountData, BalanceLock, BalanceLockTo212, BalanceStatus, Reasons, ReserveData, ReserveIdentifier, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';15import type { BeefyCommitment, BeefyId, BeefyNextAuthoritySet, BeefyPayload, BeefySignedCommitment, MmrRootHash, ValidatorSetId } from '@polkadot/types/interfaces/beefy';16import type { BridgeMessageId, BridgedBlockHash, BridgedBlockNumber, BridgedHeader, CallOrigin, ChainId, DeliveredMessages, DispatchFeePayment, InboundLaneData, InboundRelayer, InitializationData, LaneId, MessageData, MessageKey, MessageNonce, MessagesDeliveryProofOf, MessagesProofOf, OperatingMode, OutboundLaneData, OutboundMessageFee, OutboundPayload, Parameter, RelayerId, UnrewardedRelayer, UnrewardedRelayersState } from '@polkadot/types/interfaces/bridges';17import type { BlockHash } from '@polkadot/types/interfaces/chain';18import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';19import type { StatementKind } from '@polkadot/types/interfaces/claims';20import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';21import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';22import type { AliveContractInfo, CodeHash, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateReturnValue, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';23import type { ContractConstructorSpec, ContractContractSpec, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpec, ContractEventSpec, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpec, ContractMessageSpec, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';24import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';25import type { ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';26import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';27import type { ApprovalFlag, DefunctVoter, Renouncing, SetIndex, Vote, VoteIndex, VoteThreshold, VoterInfo } from '@polkadot/types/interfaces/elections';28import type { CreatedBlock, ImportedAux } from '@polkadot/types/interfaces/engine';29import type { BlockV0, BlockV1, BlockV2, EIP1559Transaction, EIP2930Transaction, EthAccessList, EthAccessListItem, EthAccount, EthAddress, EthBlock, EthBloom, EthCallRequest, EthFilter, EthFilterAddress, EthFilterChanges, EthFilterTopic, EthFilterTopicEntry, EthFilterTopicInner, EthHeader, EthLog, EthReceipt, EthRichBlock, EthRichHeader, EthStorageProof, EthSubKind, EthSubParams, EthSubResult, EthSyncInfo, EthSyncStatus, EthTransaction, EthTransactionAction, EthTransactionCondition, EthTransactionRequest, EthTransactionSignature, EthTransactionStatus, EthWork, EthereumAccountId, EthereumAddress, EthereumLookupSource, EthereumSignature, LegacyTransaction, TransactionV0, TransactionV1, TransactionV2 } from '@polkadot/types/interfaces/eth';30import type { EvmAccount, EvmLog, EvmVicinity, ExitError, ExitFatal, ExitReason, ExitRevert, ExitSucceed } from '@polkadot/types/interfaces/evm';31import type { AnySignature, EcdsaSignature, Ed25519Signature, Era, Extrinsic, ExtrinsicEra, ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, ExtrinsicSignature, ExtrinsicSignatureV4, ExtrinsicUnknown, ExtrinsicV4, ImmortalEra, MortalEra, MultiSignature, Signature, SignerPayload, Sr25519Signature } from '@polkadot/types/interfaces/extrinsics';32import type { AssetOptions, Owner, PermissionLatest, PermissionVersions, PermissionsV1 } from '@polkadot/types/interfaces/genericAsset';33import type { ActiveGilt, ActiveGiltsTotal, ActiveIndex, GiltBid } from '@polkadot/types/interfaces/gilt';34import type { AuthorityIndex, AuthorityList, AuthoritySet, AuthoritySetChange, AuthoritySetChanges, AuthorityWeight, DelayKind, DelayKindBest, EncodedFinalityProofs, ForkTreePendingChange, ForkTreePendingChangeNode, GrandpaCommit, GrandpaEquivocation, GrandpaEquivocationProof, GrandpaEquivocationValue, GrandpaJustification, GrandpaPrecommit, GrandpaPrevote, GrandpaSignedPrecommit, JustificationNotification, KeyOwnerProof, NextAuthority, PendingChange, PendingPause, PendingResume, Precommits, Prevotes, ReportedRoundStates, RoundState, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';35import type { IdentityFields, IdentityInfo, IdentityInfoAdditional, IdentityInfoTo198, IdentityJudgement, RegistrarIndex, RegistrarInfo, Registration, RegistrationJudgement, RegistrationTo198 } from '@polkadot/types/interfaces/identity';36import type { AuthIndex, AuthoritySignature, Heartbeat, HeartbeatTo244, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from '@polkadot/types/interfaces/imOnline';37import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery';38import type { ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableRegistry, PortableRegistryV14, PortableType, PortableTypeV14, SignedExtensionMetadataLatest, SignedExtensionMetadataV14, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV14, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV14, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV14, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV14, StorageHasherV9, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';39import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';40import type { StorageKind } from '@polkadot/types/interfaces/offchain';41import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';42import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeLocation, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';43import type { FeeDetails, InclusionFee, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';44import type { Approvals } from '@polkadot/types/interfaces/poll';45import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces/proxy';46import type { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/purchase';47import type { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';48import type { RpcMethods } from '@polkadot/types/interfaces/rpc';49import type { AccountId, AccountId20, AccountId32, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, BlockNumberFor, BlockNumberOf, Call, CallHash, CallHashOf, ChangesTrieConfiguration, ChangesTrieSignal, CodecHash, Consensus, ConsensusEngineId, CrateVersion, Digest, DigestItem, EncodedJustification, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H32, H512, H64, Hash, Header, HeaderPartial, I32F32, Index, IndicesLookupSource, Justification, Justifications, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, MultiSigner, OpaqueCall, Origin, OriginCaller, PalletId, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, StorageData, StorageProof, TransactionInfo, TransactionPriority, TransactionStorageProof, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';50import type { Si0Field, Si0LookupTypeId, Si0Path, Si0Type, Si0TypeDef, Si0TypeDefArray, Si0TypeDefBitSequence, Si0TypeDefCompact, Si0TypeDefComposite, Si0TypeDefPhantom, Si0TypeDefPrimitive, Si0TypeDefSequence, Si0TypeDefTuple, Si0TypeDefVariant, Si0TypeParameter, Si0Variant, Si1Field, Si1LookupTypeId, Si1Path, Si1Type, Si1TypeDef, Si1TypeDefArray, Si1TypeDefBitSequence, Si1TypeDefCompact, Si1TypeDefComposite, Si1TypeDefPrimitive, Si1TypeDefSequence, Si1TypeDefTuple, Si1TypeDefVariant, Si1TypeParameter, Si1Variant, SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray, SiTypeDefBitSequence, SiTypeDefCompact, SiTypeDefComposite, SiTypeDefPrimitive, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiTypeParameter, SiVariant } from '@polkadot/types/interfaces/scaleInfo';51import type { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, ScheduledTo254, TaskAddress } from '@polkadot/types/interfaces/scheduler';52import type { BeefyKey, FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys10, SessionKeys10B, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, SessionKeys6B, SessionKeys7, SessionKeys7B, SessionKeys8, SessionKeys8B, SessionKeys9, SessionKeys9B, ValidatorCount } from '@polkadot/types/interfaces/session';53import type { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';54import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactAssignmentsTo265, CompactAssignmentsWith16, CompactAssignmentsWith24, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, RawSolutionTo265, RawSolutionWith16, RawSolutionWith24, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SignedSubmission, SignedSubmissionOf, SignedSubmissionTo276, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, SubmissionIndicesOf, Supports, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking';55import type { ApiId, BlockTrace, BlockTraceEvent, BlockTraceEventData, BlockTraceSpan, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, RuntimeVersionPartial, SpecVersion, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state';56import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';57import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithRefCountU8, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, PerDispatchClassU32, PerDispatchClassWeight, PerDispatchClassWeightsPerClass, Phase, RawOrigin, RefCount, RefCountTo259, SyncState, SystemOrigin, TokenError, TransactionValidityError, UnknownTransaction, WeightPerClass } from '@polkadot/types/interfaces/system';58import type { Bounty, BountyIndex, BountyStatus, BountyStatusActive, BountyStatusCuratorProposed, BountyStatusPendingPayout, OpenTip, OpenTipFinderTo225, OpenTipTip, OpenTipTo225, TreasuryProposal } from '@polkadot/types/interfaces/treasury';59import type { Multiplier } from '@polkadot/types/interfaces/txpayment';60import type { ClassDetails, ClassId, ClassMetadata, DepositBalance, DepositBalanceOf, DestroyWitness, InstanceDetails, InstanceId, InstanceMetadata } from '@polkadot/types/interfaces/uniques';61import type { Multisig, Timepoint } from '@polkadot/types/interfaces/utility';62import type { VestingInfo } from '@polkadot/types/interfaces/vesting';63import type { AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, BodyId, BodyPart, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, InboundStatus, InstructionV2, InteriorMultiLocation, Junction, JunctionV0, JunctionV1, JunctionV2, Junctions, JunctionsV1, JunctionsV2, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, MultiAssetV0, MultiAssetV1, MultiAssetV2, MultiAssets, MultiAssetsV1, MultiAssetsV2, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, NetworkId, OriginKindV0, OriginKindV1, OriginKindV2, OutboundStatus, Outcome, QueryId, QueryStatus, QueueConfigData, Response, ResponseV0, ResponseV1, ResponseV2, ResponseV2Error, ResponseV2Result, VersionMigrationStage, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, XcmOrder, XcmOrderV0, XcmOrderV1, XcmOrderV2, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, XcmVersion, XcmpMessageFormat } from '@polkadot/types/interfaces/xcm';6465declare module '@polkadot/types/types/registry' {66 export interface InterfaceTypes {67 AbridgedCandidateReceipt: AbridgedCandidateReceipt;68 AbridgedHostConfiguration: AbridgedHostConfiguration;69 AbridgedHrmpChannel: AbridgedHrmpChannel;70 AccountData: AccountData;71 AccountId: AccountId;72 AccountId20: AccountId20;73 AccountId32: AccountId32;74 AccountIdOf: AccountIdOf;75 AccountIndex: AccountIndex;76 AccountInfo: AccountInfo;77 AccountInfoWithDualRefCount: AccountInfoWithDualRefCount;78 AccountInfoWithProviders: AccountInfoWithProviders;79 AccountInfoWithRefCount: AccountInfoWithRefCount;80 AccountInfoWithRefCountU8: AccountInfoWithRefCountU8;81 AccountInfoWithTripleRefCount: AccountInfoWithTripleRefCount;82 AccountStatus: AccountStatus;83 AccountValidity: AccountValidity;84 AccountVote: AccountVote;85 AccountVoteSplit: AccountVoteSplit;86 AccountVoteStandard: AccountVoteStandard;87 ActiveEraInfo: ActiveEraInfo;88 ActiveGilt: ActiveGilt;89 ActiveGiltsTotal: ActiveGiltsTotal;90 ActiveIndex: ActiveIndex;91 ActiveRecovery: ActiveRecovery;92 Address: Address;93 AliveContractInfo: AliveContractInfo;94 AllowedSlots: AllowedSlots;95 AnySignature: AnySignature;96 ApiId: ApiId;97 ApplyExtrinsicResult: ApplyExtrinsicResult;98 ApprovalFlag: ApprovalFlag;99 Approvals: Approvals;100 ArithmeticError: ArithmeticError;101 AssetApproval: AssetApproval;102 AssetApprovalKey: AssetApprovalKey;103 AssetBalance: AssetBalance;104 AssetDestroyWitness: AssetDestroyWitness;105 AssetDetails: AssetDetails;106 AssetId: AssetId;107 AssetInstance: AssetInstance;108 AssetInstanceV0: AssetInstanceV0;109 AssetInstanceV1: AssetInstanceV1;110 AssetInstanceV2: AssetInstanceV2;111 AssetMetadata: AssetMetadata;112 AssetOptions: AssetOptions;113 AssignmentId: AssignmentId;114 AssignmentKind: AssignmentKind;115 AttestedCandidate: AttestedCandidate;116 AuctionIndex: AuctionIndex;117 AuthIndex: AuthIndex;118 AuthorityDiscoveryId: AuthorityDiscoveryId;119 AuthorityId: AuthorityId;120 AuthorityIndex: AuthorityIndex;121 AuthorityList: AuthorityList;122 AuthoritySet: AuthoritySet;123 AuthoritySetChange: AuthoritySetChange;124 AuthoritySetChanges: AuthoritySetChanges;125 AuthoritySignature: AuthoritySignature;126 AuthorityWeight: AuthorityWeight;127 AvailabilityBitfield: AvailabilityBitfield;128 AvailabilityBitfieldRecord: AvailabilityBitfieldRecord;129 BabeAuthorityWeight: BabeAuthorityWeight;130 BabeBlockWeight: BabeBlockWeight;131 BabeEpochConfiguration: BabeEpochConfiguration;132 BabeEquivocationProof: BabeEquivocationProof;133 BabeWeight: BabeWeight;134 BackedCandidate: BackedCandidate;135 Balance: Balance;136 BalanceLock: BalanceLock;137 BalanceLockTo212: BalanceLockTo212;138 BalanceOf: BalanceOf;139 BalanceStatus: BalanceStatus;140 BeefyCommitment: BeefyCommitment;141 BeefyId: BeefyId;142 BeefyKey: BeefyKey;143 BeefyNextAuthoritySet: BeefyNextAuthoritySet;144 BeefyPayload: BeefyPayload;145 BeefySignedCommitment: BeefySignedCommitment;146 Bid: Bid;147 Bidder: Bidder;148 BidKind: BidKind;149 BitVec: BitVec;150 Block: Block;151 BlockAttestations: BlockAttestations;152 BlockHash: BlockHash;153 BlockLength: BlockLength;154 BlockNumber: BlockNumber;155 BlockNumberFor: BlockNumberFor;156 BlockNumberOf: BlockNumberOf;157 BlockTrace: BlockTrace;158 BlockTraceEvent: BlockTraceEvent;159 BlockTraceEventData: BlockTraceEventData;160 BlockTraceSpan: BlockTraceSpan;161 BlockV0: BlockV0;162 BlockV1: BlockV1;163 BlockV2: BlockV2;164 BlockWeights: BlockWeights;165 BodyId: BodyId;166 BodyPart: BodyPart;167 bool: bool;168 Bool: Bool;169 Bounty: Bounty;170 BountyIndex: BountyIndex;171 BountyStatus: BountyStatus;172 BountyStatusActive: BountyStatusActive;173 BountyStatusCuratorProposed: BountyStatusCuratorProposed;174 BountyStatusPendingPayout: BountyStatusPendingPayout;175 BridgedBlockHash: BridgedBlockHash;176 BridgedBlockNumber: BridgedBlockNumber;177 BridgedHeader: BridgedHeader;178 BridgeMessageId: BridgeMessageId;179 BufferedSessionChange: BufferedSessionChange;180 Bytes: Bytes;181 Call: Call;182 CallHash: CallHash;183 CallHashOf: CallHashOf;184 CallIndex: CallIndex;185 CallOrigin: CallOrigin;186 CandidateCommitments: CandidateCommitments;187 CandidateDescriptor: CandidateDescriptor;188 CandidateHash: CandidateHash;189 CandidateInfo: CandidateInfo;190 CandidatePendingAvailability: CandidatePendingAvailability;191 CandidateReceipt: CandidateReceipt;192 ChainId: ChainId;193 ChainProperties: ChainProperties;194 ChainType: ChainType;195 ChangesTrieConfiguration: ChangesTrieConfiguration;196 ChangesTrieSignal: ChangesTrieSignal;197 ClassDetails: ClassDetails;198 ClassId: ClassId;199 ClassMetadata: ClassMetadata;200 CodecHash: CodecHash;201 CodeHash: CodeHash;202 CollatorId: CollatorId;203 CollatorSignature: CollatorSignature;204 CollectiveOrigin: CollectiveOrigin;205 CommittedCandidateReceipt: CommittedCandidateReceipt;206 CompactAssignments: CompactAssignments;207 CompactAssignmentsTo257: CompactAssignmentsTo257;208 CompactAssignmentsTo265: CompactAssignmentsTo265;209 CompactAssignmentsWith16: CompactAssignmentsWith16;210 CompactAssignmentsWith24: CompactAssignmentsWith24;211 CompactScore: CompactScore;212 CompactScoreCompact: CompactScoreCompact;213 ConfigData: ConfigData;214 Consensus: Consensus;215 ConsensusEngineId: ConsensusEngineId;216 ConsumedWeight: ConsumedWeight;217 ContractCallRequest: ContractCallRequest;218 ContractConstructorSpec: ContractConstructorSpec;219 ContractContractSpec: ContractContractSpec;220 ContractCryptoHasher: ContractCryptoHasher;221 ContractDiscriminant: ContractDiscriminant;222 ContractDisplayName: ContractDisplayName;223 ContractEventParamSpec: ContractEventParamSpec;224 ContractEventSpec: ContractEventSpec;225 ContractExecResult: ContractExecResult;226 ContractExecResultErr: ContractExecResultErr;227 ContractExecResultErrModule: ContractExecResultErrModule;228 ContractExecResultOk: ContractExecResultOk;229 ContractExecResultResult: ContractExecResultResult;230 ContractExecResultSuccessTo255: ContractExecResultSuccessTo255;231 ContractExecResultSuccessTo260: ContractExecResultSuccessTo260;232 ContractExecResultTo255: ContractExecResultTo255;233 ContractExecResultTo260: ContractExecResultTo260;234 ContractExecResultTo267: ContractExecResultTo267;235 ContractInfo: ContractInfo;236 ContractInstantiateResult: ContractInstantiateResult;237 ContractInstantiateResultTo267: ContractInstantiateResultTo267;238 ContractLayoutArray: ContractLayoutArray;239 ContractLayoutCell: ContractLayoutCell;240 ContractLayoutEnum: ContractLayoutEnum;241 ContractLayoutHash: ContractLayoutHash;242 ContractLayoutHashingStrategy: ContractLayoutHashingStrategy;243 ContractLayoutKey: ContractLayoutKey;244 ContractLayoutStruct: ContractLayoutStruct;245 ContractLayoutStructField: ContractLayoutStructField;246 ContractMessageParamSpec: ContractMessageParamSpec;247 ContractMessageSpec: ContractMessageSpec;248 ContractMetadata: ContractMetadata;249 ContractMetadataLatest: ContractMetadataLatest;250 ContractMetadataV0: ContractMetadataV0;251 ContractMetadataV1: ContractMetadataV1;252 ContractProject: ContractProject;253 ContractProjectContract: ContractProjectContract;254 ContractProjectInfo: ContractProjectInfo;255 ContractProjectSource: ContractProjectSource;256 ContractProjectV0: ContractProjectV0;257 ContractSelector: ContractSelector;258 ContractStorageKey: ContractStorageKey;259 ContractStorageLayout: ContractStorageLayout;260 ContractTypeSpec: ContractTypeSpec;261 Conviction: Conviction;262 CoreAssignment: CoreAssignment;263 CoreIndex: CoreIndex;264 CoreOccupied: CoreOccupied;265 CrateVersion: CrateVersion;266 CreatedBlock: CreatedBlock;267 CumulusPalletDmpQueueConfigData: CumulusPalletDmpQueueConfigData;268 CumulusPalletDmpQueuePageIndexData: CumulusPalletDmpQueuePageIndexData;269 CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot: CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot;270 CumulusPalletXcmpQueueInboundStatus: CumulusPalletXcmpQueueInboundStatus;271 CumulusPalletXcmpQueueOutboundStatus: CumulusPalletXcmpQueueOutboundStatus;272 CumulusPalletXcmpQueueQueueConfigData: CumulusPalletXcmpQueueQueueConfigData;273 CumulusPrimitivesParachainInherentParachainInherentData: CumulusPrimitivesParachainInherentParachainInherentData;274 Data: Data;275 DeferredOffenceOf: DeferredOffenceOf;276 DefunctVoter: DefunctVoter;277 DelayKind: DelayKind;278 DelayKindBest: DelayKindBest;279 Delegations: Delegations;280 DeletedContract: DeletedContract;281 DeliveredMessages: DeliveredMessages;282 DepositBalance: DepositBalance;283 DepositBalanceOf: DepositBalanceOf;284 DestroyWitness: DestroyWitness;285 Digest: Digest;286 DigestItem: DigestItem;287 DigestOf: DigestOf;288 DispatchClass: DispatchClass;289 DispatchError: DispatchError;290 DispatchErrorModule: DispatchErrorModule;291 DispatchErrorTo198: DispatchErrorTo198;292 DispatchFeePayment: DispatchFeePayment;293 DispatchInfo: DispatchInfo;294 DispatchInfoTo190: DispatchInfoTo190;295 DispatchInfoTo244: DispatchInfoTo244;296 DispatchOutcome: DispatchOutcome;297 DispatchResult: DispatchResult;298 DispatchResultOf: DispatchResultOf;299 DispatchResultTo198: DispatchResultTo198;300 DisputeLocation: DisputeLocation;301 DisputeResult: DisputeResult;302 DisputeState: DisputeState;303 DisputeStatement: DisputeStatement;304 DisputeStatementSet: DisputeStatementSet;305 DoubleEncodedCall: DoubleEncodedCall;306 DoubleVoteReport: DoubleVoteReport;307 DownwardMessage: DownwardMessage;308 EcdsaSignature: EcdsaSignature;309 Ed25519Signature: Ed25519Signature;310 EIP1559Transaction: EIP1559Transaction;311 EIP2930Transaction: EIP2930Transaction;312 ElectionCompute: ElectionCompute;313 ElectionPhase: ElectionPhase;314 ElectionResult: ElectionResult;315 ElectionScore: ElectionScore;316 ElectionSize: ElectionSize;317 ElectionStatus: ElectionStatus;318 EncodedFinalityProofs: EncodedFinalityProofs;319 EncodedJustification: EncodedJustification;320 EpochAuthorship: EpochAuthorship;321 Era: Era;322 EraIndex: EraIndex;323 EraPoints: EraPoints;324 EraRewardPoints: EraRewardPoints;325 EraRewards: EraRewards;326 ErrorMetadataLatest: ErrorMetadataLatest;327 ErrorMetadataV10: ErrorMetadataV10;328 ErrorMetadataV11: ErrorMetadataV11;329 ErrorMetadataV12: ErrorMetadataV12;330 ErrorMetadataV13: ErrorMetadataV13;331 ErrorMetadataV14: ErrorMetadataV14;332 ErrorMetadataV9: ErrorMetadataV9;333 EthAccessList: EthAccessList;334 EthAccessListItem: EthAccessListItem;335 EthAccount: EthAccount;336 EthAddress: EthAddress;337 EthBlock: EthBlock;338 EthBloom: EthBloom;339 EthCallRequest: EthCallRequest;340 EthereumAccountId: EthereumAccountId;341 EthereumAddress: EthereumAddress;342 EthereumBlock: EthereumBlock;343 EthereumLog: EthereumLog;344 EthereumLookupSource: EthereumLookupSource;345 EthereumReceipt: EthereumReceipt;346 EthereumSignature: EthereumSignature;347 EthereumTransactionLegacyTransaction: EthereumTransactionLegacyTransaction;348 EthFilter: EthFilter;349 EthFilterAddress: EthFilterAddress;350 EthFilterChanges: EthFilterChanges;351 EthFilterTopic: EthFilterTopic;352 EthFilterTopicEntry: EthFilterTopicEntry;353 EthFilterTopicInner: EthFilterTopicInner;354 EthHeader: EthHeader;355 EthLog: EthLog;356 EthReceipt: EthReceipt;357 EthRichBlock: EthRichBlock;358 EthRichHeader: EthRichHeader;359 EthStorageProof: EthStorageProof;360 EthSubKind: EthSubKind;361 EthSubParams: EthSubParams;362 EthSubResult: EthSubResult;363 EthSyncInfo: EthSyncInfo;364 EthSyncStatus: EthSyncStatus;365 EthTransaction: EthTransaction;366 EthTransactionAction: EthTransactionAction;367 EthTransactionCondition: EthTransactionCondition;368 EthTransactionRequest: EthTransactionRequest;369 EthTransactionSignature: EthTransactionSignature;370 EthTransactionStatus: EthTransactionStatus;371 EthWork: EthWork;372 Event: Event;373 EventId: EventId;374 EventIndex: EventIndex;375 EventMetadataLatest: EventMetadataLatest;376 EventMetadataV10: EventMetadataV10;377 EventMetadataV11: EventMetadataV11;378 EventMetadataV12: EventMetadataV12;379 EventMetadataV13: EventMetadataV13;380 EventMetadataV14: EventMetadataV14;381 EventMetadataV9: EventMetadataV9;382 EventRecord: EventRecord;383 EvmAccount: EvmAccount;384 EvmCoreErrorExitReason: EvmCoreErrorExitReason;385 EvmLog: EvmLog;386 EvmVicinity: EvmVicinity;387 ExecReturnValue: ExecReturnValue;388 ExitError: ExitError;389 ExitFatal: ExitFatal;390 ExitReason: ExitReason;391 ExitRevert: ExitRevert;392 ExitSucceed: ExitSucceed;393 ExplicitDisputeStatement: ExplicitDisputeStatement;394 Exposure: Exposure;395 ExtendedBalance: ExtendedBalance;396 Extrinsic: Extrinsic;397 ExtrinsicEra: ExtrinsicEra;398 ExtrinsicMetadataLatest: ExtrinsicMetadataLatest;399 ExtrinsicMetadataV11: ExtrinsicMetadataV11;400 ExtrinsicMetadataV12: ExtrinsicMetadataV12;401 ExtrinsicMetadataV13: ExtrinsicMetadataV13;402 ExtrinsicMetadataV14: ExtrinsicMetadataV14;403 ExtrinsicOrHash: ExtrinsicOrHash;404 ExtrinsicPayload: ExtrinsicPayload;405 ExtrinsicPayloadUnknown: ExtrinsicPayloadUnknown;406 ExtrinsicPayloadV4: ExtrinsicPayloadV4;407 ExtrinsicSignature: ExtrinsicSignature;408 ExtrinsicSignatureV4: ExtrinsicSignatureV4;409 ExtrinsicStatus: ExtrinsicStatus;410 ExtrinsicsWeight: ExtrinsicsWeight;411 ExtrinsicUnknown: ExtrinsicUnknown;412 ExtrinsicV4: ExtrinsicV4;413 FeeDetails: FeeDetails;414 Fixed128: Fixed128;415 Fixed64: Fixed64;416 FixedI128: FixedI128;417 FixedI64: FixedI64;418 FixedU128: FixedU128;419 FixedU64: FixedU64;420 Forcing: Forcing;421 ForkTreePendingChange: ForkTreePendingChange;422 ForkTreePendingChangeNode: ForkTreePendingChangeNode;423 FpRpcTransactionStatus: FpRpcTransactionStatus;424 FullIdentification: FullIdentification;425 FunctionArgumentMetadataLatest: FunctionArgumentMetadataLatest;426 FunctionArgumentMetadataV10: FunctionArgumentMetadataV10;427 FunctionArgumentMetadataV11: FunctionArgumentMetadataV11;428 FunctionArgumentMetadataV12: FunctionArgumentMetadataV12;429 FunctionArgumentMetadataV13: FunctionArgumentMetadataV13;430 FunctionArgumentMetadataV14: FunctionArgumentMetadataV14;431 FunctionArgumentMetadataV9: FunctionArgumentMetadataV9;432 FunctionMetadataLatest: FunctionMetadataLatest;433 FunctionMetadataV10: FunctionMetadataV10;434 FunctionMetadataV11: FunctionMetadataV11;435 FunctionMetadataV12: FunctionMetadataV12;436 FunctionMetadataV13: FunctionMetadataV13;437 FunctionMetadataV14: FunctionMetadataV14;438 FunctionMetadataV9: FunctionMetadataV9;439 FundIndex: FundIndex;440 FundInfo: FundInfo;441 Fungibility: Fungibility;442 FungibilityV0: FungibilityV0;443 FungibilityV1: FungibilityV1;444 FungibilityV2: FungibilityV2;445 Gas: Gas;446 GiltBid: GiltBid;447 GlobalValidationData: GlobalValidationData;448 GlobalValidationSchedule: GlobalValidationSchedule;449 GrandpaCommit: GrandpaCommit;450 GrandpaEquivocation: GrandpaEquivocation;451 GrandpaEquivocationProof: GrandpaEquivocationProof;452 GrandpaEquivocationValue: GrandpaEquivocationValue;453 GrandpaJustification: GrandpaJustification;454 GrandpaPrecommit: GrandpaPrecommit;455 GrandpaPrevote: GrandpaPrevote;456 GrandpaSignedPrecommit: GrandpaSignedPrecommit;457 GroupIndex: GroupIndex;458 H1024: H1024;459 H128: H128;460 H160: H160;461 H2048: H2048;462 H256: H256;463 H32: H32;464 H512: H512;465 H64: H64;466 Hash: Hash;467 HeadData: HeadData;468 Header: Header;469 HeaderPartial: HeaderPartial;470 Health: Health;471 Heartbeat: Heartbeat;472 HeartbeatTo244: HeartbeatTo244;473 HostConfiguration: HostConfiguration;474 HostFnWeights: HostFnWeights;475 HostFnWeightsTo264: HostFnWeightsTo264;476 HrmpChannel: HrmpChannel;477 HrmpChannelId: HrmpChannelId;478 HrmpOpenChannelRequest: HrmpOpenChannelRequest;479 i128: i128;480 I128: I128;481 i16: i16;482 I16: I16;483 i256: i256;484 I256: I256;485 i32: i32;486 I32: I32;487 I32F32: I32F32;488 i64: i64;489 I64: I64;490 i8: i8;491 I8: I8;492 IdentificationTuple: IdentificationTuple;493 IdentityFields: IdentityFields;494 IdentityInfo: IdentityInfo;495 IdentityInfoAdditional: IdentityInfoAdditional;496 IdentityInfoTo198: IdentityInfoTo198;497 IdentityJudgement: IdentityJudgement;498 ImmortalEra: ImmortalEra;499 ImportedAux: ImportedAux;500 InboundDownwardMessage: InboundDownwardMessage;501 InboundHrmpMessage: InboundHrmpMessage;502 InboundHrmpMessages: InboundHrmpMessages;503 InboundLaneData: InboundLaneData;504 InboundRelayer: InboundRelayer;505 InboundStatus: InboundStatus;506 IncludedBlocks: IncludedBlocks;507 InclusionFee: InclusionFee;508 IncomingParachain: IncomingParachain;509 IncomingParachainDeploy: IncomingParachainDeploy;510 IncomingParachainFixed: IncomingParachainFixed;511 Index: Index;512 IndicesLookupSource: IndicesLookupSource;513 IndividualExposure: IndividualExposure;514 InitializationData: InitializationData;515 InstanceDetails: InstanceDetails;516 InstanceId: InstanceId;517 InstanceMetadata: InstanceMetadata;518 InstantiateRequest: InstantiateRequest;519 InstantiateReturnValue: InstantiateReturnValue;520 InstantiateReturnValueTo267: InstantiateReturnValueTo267;521 InstructionV2: InstructionV2;522 InstructionWeights: InstructionWeights;523 InteriorMultiLocation: InteriorMultiLocation;524 InvalidDisputeStatementKind: InvalidDisputeStatementKind;525 InvalidTransaction: InvalidTransaction;526 Json: Json;527 Junction: Junction;528 Junctions: Junctions;529 JunctionsV1: JunctionsV1;530 JunctionsV2: JunctionsV2;531 JunctionV0: JunctionV0;532 JunctionV1: JunctionV1;533 JunctionV2: JunctionV2;534 Justification: Justification;535 JustificationNotification: JustificationNotification;536 Justifications: Justifications;537 Key: Key;538 KeyOwnerProof: KeyOwnerProof;539 Keys: Keys;540 KeyType: KeyType;541 KeyTypeId: KeyTypeId;542 KeyValue: KeyValue;543 KeyValueOption: KeyValueOption;544 Kind: Kind;545 LaneId: LaneId;546 LastContribution: LastContribution;547 LastRuntimeUpgradeInfo: LastRuntimeUpgradeInfo;548 LeasePeriod: LeasePeriod;549 LeasePeriodOf: LeasePeriodOf;550 LegacyTransaction: LegacyTransaction;551 Limits: Limits;552 LimitsTo264: LimitsTo264;553 LocalValidationData: LocalValidationData;554 LockIdentifier: LockIdentifier;555 LookupSource: LookupSource;556 LookupTarget: LookupTarget;557 LotteryConfig: LotteryConfig;558 MaybeRandomness: MaybeRandomness;559 MaybeVrf: MaybeVrf;560 MemberCount: MemberCount;561 MembershipProof: MembershipProof;562 MessageData: MessageData;563 MessageId: MessageId;564 MessageIngestionType: MessageIngestionType;565 MessageKey: MessageKey;566 MessageNonce: MessageNonce;567 MessageQueueChain: MessageQueueChain;568 MessagesDeliveryProofOf: MessagesDeliveryProofOf;569 MessagesProofOf: MessagesProofOf;570 MessagingStateSnapshot: MessagingStateSnapshot;571 MessagingStateSnapshotEgressEntry: MessagingStateSnapshotEgressEntry;572 MetadataAll: MetadataAll;573 MetadataLatest: MetadataLatest;574 MetadataV10: MetadataV10;575 MetadataV11: MetadataV11;576 MetadataV12: MetadataV12;577 MetadataV13: MetadataV13;578 MetadataV14: MetadataV14;579 MetadataV9: MetadataV9;580 MmrLeafProof: MmrLeafProof;581 MmrRootHash: MmrRootHash;582 ModuleConstantMetadataV10: ModuleConstantMetadataV10;583 ModuleConstantMetadataV11: ModuleConstantMetadataV11;584 ModuleConstantMetadataV12: ModuleConstantMetadataV12;585 ModuleConstantMetadataV13: ModuleConstantMetadataV13;586 ModuleConstantMetadataV9: ModuleConstantMetadataV9;587 ModuleId: ModuleId;588 ModuleMetadataV10: ModuleMetadataV10;589 ModuleMetadataV11: ModuleMetadataV11;590 ModuleMetadataV12: ModuleMetadataV12;591 ModuleMetadataV13: ModuleMetadataV13;592 ModuleMetadataV9: ModuleMetadataV9;593 Moment: Moment;594 MomentOf: MomentOf;595 MoreAttestations: MoreAttestations;596 MortalEra: MortalEra;597 MultiAddress: MultiAddress;598 MultiAsset: MultiAsset;599 MultiAssetFilter: MultiAssetFilter;600 MultiAssetFilterV1: MultiAssetFilterV1;601 MultiAssetFilterV2: MultiAssetFilterV2;602 MultiAssets: MultiAssets;603 MultiAssetsV1: MultiAssetsV1;604 MultiAssetsV2: MultiAssetsV2;605 MultiAssetV0: MultiAssetV0;606 MultiAssetV1: MultiAssetV1;607 MultiAssetV2: MultiAssetV2;608 MultiDisputeStatementSet: MultiDisputeStatementSet;609 MultiLocation: MultiLocation;610 MultiLocationV0: MultiLocationV0;611 MultiLocationV1: MultiLocationV1;612 MultiLocationV2: MultiLocationV2;613 Multiplier: Multiplier;614 Multisig: Multisig;615 MultiSignature: MultiSignature;616 MultiSigner: MultiSigner;617 NetworkId: NetworkId;618 NetworkState: NetworkState;619 NetworkStatePeerset: NetworkStatePeerset;620 NetworkStatePeersetInfo: NetworkStatePeersetInfo;621 NewBidder: NewBidder;622 NextAuthority: NextAuthority;623 NextConfigDescriptor: NextConfigDescriptor;624 NextConfigDescriptorV1: NextConfigDescriptorV1;625 NodeRole: NodeRole;626 Nominations: Nominations;627 NominatorIndex: NominatorIndex;628 NominatorIndexCompact: NominatorIndexCompact;629 NotConnectedPeer: NotConnectedPeer;630 Null: Null;631 OffchainAccuracy: OffchainAccuracy;632 OffchainAccuracyCompact: OffchainAccuracyCompact;633 OffenceDetails: OffenceDetails;634 Offender: Offender;635 OpaqueCall: OpaqueCall;636 OpaqueMultiaddr: OpaqueMultiaddr;637 OpaqueNetworkState: OpaqueNetworkState;638 OpaquePeerId: OpaquePeerId;639 OpaqueTimeSlot: OpaqueTimeSlot;640 OpenTip: OpenTip;641 OpenTipFinderTo225: OpenTipFinderTo225;642 OpenTipTip: OpenTipTip;643 OpenTipTo225: OpenTipTo225;644 OperatingMode: OperatingMode;645 Origin: Origin;646 OriginCaller: OriginCaller;647 OriginKindV0: OriginKindV0;648 OriginKindV1: OriginKindV1;649 OriginKindV2: OriginKindV2;650 OutboundHrmpMessage: OutboundHrmpMessage;651 OutboundLaneData: OutboundLaneData;652 OutboundMessageFee: OutboundMessageFee;653 OutboundPayload: OutboundPayload;654 OutboundStatus: OutboundStatus;655 Outcome: Outcome;656 OverweightIndex: OverweightIndex;657 Owner: Owner;658 PageCounter: PageCounter;659 PageIndexData: PageIndexData;660 PalletCallMetadataLatest: PalletCallMetadataLatest;661 PalletCallMetadataV14: PalletCallMetadataV14;662 PalletCommonAccountBasicCrossAccountIdRepr: PalletCommonAccountBasicCrossAccountIdRepr;663 PalletConstantMetadataLatest: PalletConstantMetadataLatest;664 PalletConstantMetadataV14: PalletConstantMetadataV14;665 PalletErrorMetadataLatest: PalletErrorMetadataLatest;666 PalletErrorMetadataV14: PalletErrorMetadataV14;667 PalletEventMetadataLatest: PalletEventMetadataLatest;668 PalletEventMetadataV14: PalletEventMetadataV14;669 PalletId: PalletId;670 PalletMetadataLatest: PalletMetadataLatest;671 PalletMetadataV14: PalletMetadataV14;672 PalletNonfungibleItemData: PalletNonfungibleItemData;673 PalletRefungibleItemData: PalletRefungibleItemData;674 PalletsOrigin: PalletsOrigin;675 PalletStorageMetadataLatest: PalletStorageMetadataLatest;676 PalletStorageMetadataV14: PalletStorageMetadataV14;677 PalletUnqSchedulerCallSpec: PalletUnqSchedulerCallSpec;678 PalletUnqSchedulerReleases: PalletUnqSchedulerReleases;679 PalletUnqSchedulerScheduledV2: PalletUnqSchedulerScheduledV2;680 PalletVersion: PalletVersion;681 ParachainDispatchOrigin: ParachainDispatchOrigin;682 ParachainInherentData: ParachainInherentData;683 ParachainProposal: ParachainProposal;684 ParachainsInherentData: ParachainsInherentData;685 ParaGenesisArgs: ParaGenesisArgs;686 ParaId: ParaId;687 ParaInfo: ParaInfo;688 ParaLifecycle: ParaLifecycle;689 Parameter: Parameter;690 ParaPastCodeMeta: ParaPastCodeMeta;691 ParaScheduling: ParaScheduling;692 ParathreadClaim: ParathreadClaim;693 ParathreadClaimQueue: ParathreadClaimQueue;694 ParathreadEntry: ParathreadEntry;695 ParaValidatorIndex: ParaValidatorIndex;696 Pays: Pays;697 Peer: Peer;698 PeerEndpoint: PeerEndpoint;699 PeerEndpointAddr: PeerEndpointAddr;700 PeerInfo: PeerInfo;701 PeerPing: PeerPing;702 PendingChange: PendingChange;703 PendingPause: PendingPause;704 PendingResume: PendingResume;705 Perbill: Perbill;706 Percent: Percent;707 PerDispatchClassU32: PerDispatchClassU32;708 PerDispatchClassWeight: PerDispatchClassWeight;709 PerDispatchClassWeightsPerClass: PerDispatchClassWeightsPerClass;710 Period: Period;711 Permill: Permill;712 PermissionLatest: PermissionLatest;713 PermissionsV1: PermissionsV1;714 PermissionVersions: PermissionVersions;715 Perquintill: Perquintill;716 PersistedValidationData: PersistedValidationData;717 PerU16: PerU16;718 Phantom: Phantom;719 PhantomData: PhantomData;720 Phase: Phase;721 PhragmenScore: PhragmenScore;722 Points: Points;723 PolkadotParachainPrimitivesXcmpMessageFormat: PolkadotParachainPrimitivesXcmpMessageFormat;724 PolkadotPrimitivesV1AbridgedHostConfiguration: PolkadotPrimitivesV1AbridgedHostConfiguration;725 PolkadotPrimitivesV1PersistedValidationData: PolkadotPrimitivesV1PersistedValidationData;726 PortableRegistry: PortableRegistry;727 PortableRegistryV14: PortableRegistryV14;728 PortableType: PortableType;729 PortableTypeV14: PortableTypeV14;730 Precommits: Precommits;731 PrefabWasmModule: PrefabWasmModule;732 PrefixedStorageKey: PrefixedStorageKey;733 PreimageStatus: PreimageStatus;734 PreimageStatusAvailable: PreimageStatusAvailable;735 PreRuntime: PreRuntime;736 Prevotes: Prevotes;737 Priority: Priority;738 PriorLock: PriorLock;739 PropIndex: PropIndex;740 Proposal: Proposal;741 ProposalIndex: ProposalIndex;742 ProxyAnnouncement: ProxyAnnouncement;743 ProxyDefinition: ProxyDefinition;744 ProxyState: ProxyState;745 ProxyType: ProxyType;746 QueryId: QueryId;747 QueryStatus: QueryStatus;748 QueueConfigData: QueueConfigData;749 QueuedParathread: QueuedParathread;750 Randomness: Randomness;751 Raw: Raw;752 RawAuraPreDigest: RawAuraPreDigest;753 RawBabePreDigest: RawBabePreDigest;754 RawBabePreDigestCompat: RawBabePreDigestCompat;755 RawBabePreDigestPrimary: RawBabePreDigestPrimary;756 RawBabePreDigestPrimaryTo159: RawBabePreDigestPrimaryTo159;757 RawBabePreDigestSecondaryPlain: RawBabePreDigestSecondaryPlain;758 RawBabePreDigestSecondaryTo159: RawBabePreDigestSecondaryTo159;759 RawBabePreDigestSecondaryVRF: RawBabePreDigestSecondaryVRF;760 RawBabePreDigestTo159: RawBabePreDigestTo159;761 RawOrigin: RawOrigin;762 RawSolution: RawSolution;763 RawSolutionTo265: RawSolutionTo265;764 RawSolutionWith16: RawSolutionWith16;765 RawSolutionWith24: RawSolutionWith24;766 RawVRFOutput: RawVRFOutput;767 ReadProof: ReadProof;768 ReadySolution: ReadySolution;769 Reasons: Reasons;770 RecoveryConfig: RecoveryConfig;771 RefCount: RefCount;772 RefCountTo259: RefCountTo259;773 ReferendumIndex: ReferendumIndex;774 ReferendumInfo: ReferendumInfo;775 ReferendumInfoFinished: ReferendumInfoFinished;776 ReferendumInfoTo239: ReferendumInfoTo239;777 ReferendumStatus: ReferendumStatus;778 RegisteredParachainInfo: RegisteredParachainInfo;779 RegistrarIndex: RegistrarIndex;780 RegistrarInfo: RegistrarInfo;781 Registration: Registration;782 RegistrationJudgement: RegistrationJudgement;783 RegistrationTo198: RegistrationTo198;784 RelayBlockNumber: RelayBlockNumber;785 RelayChainBlockNumber: RelayChainBlockNumber;786 RelayChainHash: RelayChainHash;787 RelayerId: RelayerId;788 RelayHash: RelayHash;789 Releases: Releases;790 Remark: Remark;791 Renouncing: Renouncing;792 RentProjection: RentProjection;793 ReplacementTimes: ReplacementTimes;794 ReportedRoundStates: ReportedRoundStates;795 Reporter: Reporter;796 ReportIdOf: ReportIdOf;797 ReserveData: ReserveData;798 ReserveIdentifier: ReserveIdentifier;799 Response: Response;800 ResponseV0: ResponseV0;801 ResponseV1: ResponseV1;802 ResponseV2: ResponseV2;803 ResponseV2Error: ResponseV2Error;804 ResponseV2Result: ResponseV2Result;805 Retriable: Retriable;806 RewardDestination: RewardDestination;807 RewardPoint: RewardPoint;808 RoundSnapshot: RoundSnapshot;809 RoundState: RoundState;810 RpcMethods: RpcMethods;811 RuntimeDbWeight: RuntimeDbWeight;812 RuntimeDispatchInfo: RuntimeDispatchInfo;813 RuntimeVersion: RuntimeVersion;814 RuntimeVersionApi: RuntimeVersionApi;815 RuntimeVersionPartial: RuntimeVersionPartial;816 Schedule: Schedule;817 Scheduled: Scheduled;818 ScheduledTo254: ScheduledTo254;819 SchedulePeriod: SchedulePeriod;820 SchedulePriority: SchedulePriority;821 ScheduleTo212: ScheduleTo212;822 ScheduleTo258: ScheduleTo258;823 ScheduleTo264: ScheduleTo264;824 Scheduling: Scheduling;825 Seal: Seal;826 SealV0: SealV0;827 SeatHolder: SeatHolder;828 SeedOf: SeedOf;829 ServiceQuality: ServiceQuality;830 SessionIndex: SessionIndex;831 SessionInfo: SessionInfo;832 SessionInfoValidatorGroup: SessionInfoValidatorGroup;833 SessionKeys1: SessionKeys1;834 SessionKeys10: SessionKeys10;835 SessionKeys10B: SessionKeys10B;836 SessionKeys2: SessionKeys2;837 SessionKeys3: SessionKeys3;838 SessionKeys4: SessionKeys4;839 SessionKeys5: SessionKeys5;840 SessionKeys6: SessionKeys6;841 SessionKeys6B: SessionKeys6B;842 SessionKeys7: SessionKeys7;843 SessionKeys7B: SessionKeys7B;844 SessionKeys8: SessionKeys8;845 SessionKeys8B: SessionKeys8B;846 SessionKeys9: SessionKeys9;847 SessionKeys9B: SessionKeys9B;848 SetId: SetId;849 SetIndex: SetIndex;850 Si0Field: Si0Field;851 Si0LookupTypeId: Si0LookupTypeId;852 Si0Path: Si0Path;853 Si0Type: Si0Type;854 Si0TypeDef: Si0TypeDef;855 Si0TypeDefArray: Si0TypeDefArray;856 Si0TypeDefBitSequence: Si0TypeDefBitSequence;857 Si0TypeDefCompact: Si0TypeDefCompact;858 Si0TypeDefComposite: Si0TypeDefComposite;859 Si0TypeDefPhantom: Si0TypeDefPhantom;860 Si0TypeDefPrimitive: Si0TypeDefPrimitive;861 Si0TypeDefSequence: Si0TypeDefSequence;862 Si0TypeDefTuple: Si0TypeDefTuple;863 Si0TypeDefVariant: Si0TypeDefVariant;864 Si0TypeParameter: Si0TypeParameter;865 Si0Variant: Si0Variant;866 Si1Field: Si1Field;867 Si1LookupTypeId: Si1LookupTypeId;868 Si1Path: Si1Path;869 Si1Type: Si1Type;870 Si1TypeDef: Si1TypeDef;871 Si1TypeDefArray: Si1TypeDefArray;872 Si1TypeDefBitSequence: Si1TypeDefBitSequence;873 Si1TypeDefCompact: Si1TypeDefCompact;874 Si1TypeDefComposite: Si1TypeDefComposite;875 Si1TypeDefPrimitive: Si1TypeDefPrimitive;876 Si1TypeDefSequence: Si1TypeDefSequence;877 Si1TypeDefTuple: Si1TypeDefTuple;878 Si1TypeDefVariant: Si1TypeDefVariant;879 Si1TypeParameter: Si1TypeParameter;880 Si1Variant: Si1Variant;881 SiField: SiField;882 Signature: Signature;883 SignedAvailabilityBitfield: SignedAvailabilityBitfield;884 SignedAvailabilityBitfields: SignedAvailabilityBitfields;885 SignedBlock: SignedBlock;886 SignedBlockWithJustification: SignedBlockWithJustification;887 SignedBlockWithJustifications: SignedBlockWithJustifications;888 SignedExtensionMetadataLatest: SignedExtensionMetadataLatest;889 SignedExtensionMetadataV14: SignedExtensionMetadataV14;890 SignedSubmission: SignedSubmission;891 SignedSubmissionOf: SignedSubmissionOf;892 SignedSubmissionTo276: SignedSubmissionTo276;893 SignerPayload: SignerPayload;894 SigningContext: SigningContext;895 SiLookupTypeId: SiLookupTypeId;896 SiPath: SiPath;897 SiType: SiType;898 SiTypeDef: SiTypeDef;899 SiTypeDefArray: SiTypeDefArray;900 SiTypeDefBitSequence: SiTypeDefBitSequence;901 SiTypeDefCompact: SiTypeDefCompact;902 SiTypeDefComposite: SiTypeDefComposite;903 SiTypeDefPrimitive: SiTypeDefPrimitive;904 SiTypeDefSequence: SiTypeDefSequence;905 SiTypeDefTuple: SiTypeDefTuple;906 SiTypeDefVariant: SiTypeDefVariant;907 SiTypeParameter: SiTypeParameter;908 SiVariant: SiVariant;909 SlashingSpans: SlashingSpans;910 SlashingSpansTo204: SlashingSpansTo204;911 SlashJournalEntry: SlashJournalEntry;912 Slot: Slot;913 SlotNumber: SlotNumber;914 SlotRange: SlotRange;915 SocietyJudgement: SocietyJudgement;916 SocietyVote: SocietyVote;917 SolutionOrSnapshotSize: SolutionOrSnapshotSize;918 SolutionSupport: SolutionSupport;919 SolutionSupports: SolutionSupports;920 SpanIndex: SpanIndex;921 SpanRecord: SpanRecord;922 SpecVersion: SpecVersion;923 Sr25519Signature: Sr25519Signature;924 StakingLedger: StakingLedger;925 StakingLedgerTo223: StakingLedgerTo223;926 StakingLedgerTo240: StakingLedgerTo240;927 Statement: Statement;928 StatementKind: StatementKind;929 StorageChangeSet: StorageChangeSet;930 StorageData: StorageData;931 StorageEntryMetadataLatest: StorageEntryMetadataLatest;932 StorageEntryMetadataV10: StorageEntryMetadataV10;933 StorageEntryMetadataV11: StorageEntryMetadataV11;934 StorageEntryMetadataV12: StorageEntryMetadataV12;935 StorageEntryMetadataV13: StorageEntryMetadataV13;936 StorageEntryMetadataV14: StorageEntryMetadataV14;937 StorageEntryMetadataV9: StorageEntryMetadataV9;938 StorageEntryModifierLatest: StorageEntryModifierLatest;939 StorageEntryModifierV10: StorageEntryModifierV10;940 StorageEntryModifierV11: StorageEntryModifierV11;941 StorageEntryModifierV12: StorageEntryModifierV12;942 StorageEntryModifierV13: StorageEntryModifierV13;943 StorageEntryModifierV14: StorageEntryModifierV14;944 StorageEntryModifierV9: StorageEntryModifierV9;945 StorageEntryTypeLatest: StorageEntryTypeLatest;946 StorageEntryTypeV10: StorageEntryTypeV10;947 StorageEntryTypeV11: StorageEntryTypeV11;948 StorageEntryTypeV12: StorageEntryTypeV12;949 StorageEntryTypeV13: StorageEntryTypeV13;950 StorageEntryTypeV14: StorageEntryTypeV14;951 StorageEntryTypeV9: StorageEntryTypeV9;952 StorageHasher: StorageHasher;953 StorageHasherV10: StorageHasherV10;954 StorageHasherV11: StorageHasherV11;955 StorageHasherV12: StorageHasherV12;956 StorageHasherV13: StorageHasherV13;957 StorageHasherV14: StorageHasherV14;958 StorageHasherV9: StorageHasherV9;959 StorageKey: StorageKey;960 StorageKind: StorageKind;961 StorageMetadataV10: StorageMetadataV10;962 StorageMetadataV11: StorageMetadataV11;963 StorageMetadataV12: StorageMetadataV12;964 StorageMetadataV13: StorageMetadataV13;965 StorageMetadataV9: StorageMetadataV9;966 StorageProof: StorageProof;967 StoredPendingChange: StoredPendingChange;968 StoredState: StoredState;969 StrikeCount: StrikeCount;970 SubId: SubId;971 SubmissionIndicesOf: SubmissionIndicesOf;972 Supports: Supports;973 SyncState: SyncState;974 SystemInherentData: SystemInherentData;975 SystemOrigin: SystemOrigin;976 Tally: Tally;977 TaskAddress: TaskAddress;978 TAssetBalance: TAssetBalance;979 TAssetDepositBalance: TAssetDepositBalance;980 Text: Text;981 Timepoint: Timepoint;982 TokenError: TokenError;983 TombstoneContractInfo: TombstoneContractInfo;984 TraceBlockResponse: TraceBlockResponse;985 TraceError: TraceError;986 TransactionInfo: TransactionInfo;987 TransactionPriority: TransactionPriority;988 TransactionStorageProof: TransactionStorageProof;989 TransactionV0: TransactionV0;990 TransactionV1: TransactionV1;991 TransactionV2: TransactionV2;992 TransactionValidityError: TransactionValidityError;993 TransientValidationData: TransientValidationData;994 TreasuryProposal: TreasuryProposal;995 TrieId: TrieId;996 TrieIndex: TrieIndex;997 Type: Type;998 u128: u128;999 U128: U128;1000 u16: u16;1001 U16: U16;1002 u256: u256;1003 U256: U256;1004 u32: u32;1005 U32: U32;1006 U32F32: U32F32;1007 u64: u64;1008 U64: U64;1009 u8: u8;1010 U8: U8;1011 UnappliedSlash: UnappliedSlash;1012 UnappliedSlashOther: UnappliedSlashOther;1013 UncleEntryItem: UncleEntryItem;1014 UnknownTransaction: UnknownTransaction;1015 UnlockChunk: UnlockChunk;1016 UnrewardedRelayer: UnrewardedRelayer;1017 UnrewardedRelayersState: UnrewardedRelayersState;1018 UpDataStructsAccessMode: UpDataStructsAccessMode;1019 UpDataStructsCollection: UpDataStructsCollection;1020 UpDataStructsCollectionId: UpDataStructsCollectionId;1021 UpDataStructsCollectionLimits: UpDataStructsCollectionLimits;1022 UpDataStructsCollectionMode: UpDataStructsCollectionMode;1023 UpDataStructsCollectionStats: UpDataStructsCollectionStats;1024 UpDataStructsCreateItemData: UpDataStructsCreateItemData;1025 UpDataStructsMetaUpdatePermission: UpDataStructsMetaUpdatePermission;1026 UpDataStructsSchemaVersion: UpDataStructsSchemaVersion;1027 UpDataStructsSponsorshipState: UpDataStructsSponsorshipState;1028 UpDataStructsTokenId: UpDataStructsTokenId;1029 UpgradeGoAhead: UpgradeGoAhead;1030 UpgradeRestriction: UpgradeRestriction;1031 UpwardMessage: UpwardMessage;1032 usize: usize;1033 USize: USize;1034 ValidationCode: ValidationCode;1035 ValidationCodeHash: ValidationCodeHash;1036 ValidationData: ValidationData;1037 ValidationDataType: ValidationDataType;1038 ValidationFunctionParams: ValidationFunctionParams;1039 ValidatorCount: ValidatorCount;1040 ValidatorId: ValidatorId;1041 ValidatorIdOf: ValidatorIdOf;1042 ValidatorIndex: ValidatorIndex;1043 ValidatorIndexCompact: ValidatorIndexCompact;1044 ValidatorPrefs: ValidatorPrefs;1045 ValidatorPrefsTo145: ValidatorPrefsTo145;1046 ValidatorPrefsTo196: ValidatorPrefsTo196;1047 ValidatorPrefsWithBlocked: ValidatorPrefsWithBlocked;1048 ValidatorPrefsWithCommission: ValidatorPrefsWithCommission;1049 ValidatorSetId: ValidatorSetId;1050 ValidatorSignature: ValidatorSignature;1051 ValidDisputeStatementKind: ValidDisputeStatementKind;1052 ValidityAttestation: ValidityAttestation;1053 VecInboundHrmpMessage: VecInboundHrmpMessage;1054 VersionedMultiAsset: VersionedMultiAsset;1055 VersionedMultiAssets: VersionedMultiAssets;1056 VersionedMultiLocation: VersionedMultiLocation;1057 VersionedResponse: VersionedResponse;1058 VersionedXcm: VersionedXcm;1059 VersionMigrationStage: VersionMigrationStage;1060 VestingInfo: VestingInfo;1061 VestingSchedule: VestingSchedule;1062 Vote: Vote;1063 VoteIndex: VoteIndex;1064 Voter: Voter;1065 VoterInfo: VoterInfo;1066 Votes: Votes;1067 VotesTo230: VotesTo230;1068 VoteThreshold: VoteThreshold;1069 VoteWeight: VoteWeight;1070 Voting: Voting;1071 VotingDelegating: VotingDelegating;1072 VotingDirect: VotingDirect;1073 VotingDirectVote: VotingDirectVote;1074 VouchingStatus: VouchingStatus;1075 VrfData: VrfData;1076 VrfOutput: VrfOutput;1077 VrfProof: VrfProof;1078 Weight: Weight;1079 WeightLimitV2: WeightLimitV2;1080 WeightMultiplier: WeightMultiplier;1081 WeightPerClass: WeightPerClass;1082 WeightToFeeCoefficient: WeightToFeeCoefficient;1083 WildFungibility: WildFungibility;1084 WildFungibilityV0: WildFungibilityV0;1085 WildFungibilityV1: WildFungibilityV1;1086 WildFungibilityV2: WildFungibilityV2;1087 WildMultiAsset: WildMultiAsset;1088 WildMultiAssetV1: WildMultiAssetV1;1089 WildMultiAssetV2: WildMultiAssetV2;1090 WinnersData: WinnersData;1091 WinnersDataTuple: WinnersDataTuple;1092 WinningData: WinningData;1093 WinningDataEntry: WinningDataEntry;1094 WithdrawReasons: WithdrawReasons;1095 Xcm: Xcm;1096 XcmAssetId: XcmAssetId;1097 XcmError: XcmError;1098 XcmErrorV0: XcmErrorV0;1099 XcmErrorV1: XcmErrorV1;1100 XcmErrorV2: XcmErrorV2;1101 XcmOrder: XcmOrder;1102 XcmOrderV0: XcmOrderV0;1103 XcmOrderV1: XcmOrderV1;1104 XcmOrderV2: XcmOrderV2;1105 XcmOrigin: XcmOrigin;1106 XcmOriginKind: XcmOriginKind;1107 XcmpMessageFormat: XcmpMessageFormat;1108 XcmV0: XcmV0;1109 XcmV1: XcmV1;1110 XcmV2: XcmV2;1111 XcmVersion: XcmVersion;1112 }1113}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());