difftreelog
feat add ApproveFrom eth mirror
in: master
26 files changed
pallets/common/src/lib.rsdiffbeforeafterboth--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -746,6 +746,8 @@
ApprovedValueTooLow,
/// Tried to approve more than owned
CantApproveMoreThanOwned,
+ /// Only spending from eth mirror could be approved
+ AddressIsNotEthMirror,
/// Can't transfer tokens to ethereum zero address
AddressIsZero,
@@ -1797,6 +1799,9 @@
/// The price of setting the permission of the operation from another user.
fn approve() -> Weight;
+ /// The price of setting the permission of the operation from another user for eth mirror.
+ fn approve_from() -> Weight;
+
/// Transfer price from another user.
fn transfer_from() -> Weight;
@@ -2008,6 +2013,22 @@
amount: u128,
) -> DispatchResultWithPostInfo;
+ /// Grant access to another account to transfer parts of the token owned by the calling user's eth mirror via [Self::transfer_from].
+ ///
+ /// * `sender` - The user who grants access to the token.
+ /// * `from` - Spender's eth mirror.
+ /// * `to` - The user to whom the rights are granted.
+ /// * `token` - The token to which access is granted.
+ /// * `amount` - The amount of pieces that another user can dispose of.
+ fn approve_from(
+ &self,
+ sender: T::CrossAccountId,
+ from: T::CrossAccountId,
+ to: T::CrossAccountId,
+ token: TokenId,
+ amount: u128,
+ ) -> DispatchResultWithPostInfo;
+
/// Send parts of a token owned by another user.
///
/// Before calling this method, you must grant rights to the calling user via [`Self::approve`].
pallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth--- a/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
+++ b/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
@@ -283,8 +283,8 @@
/// Ethereum representation of Optional value with CrossAddress.
struct OptionCrossAddress {
- /// TODO: field description
+ /// Whether or not this CrossAdress is valid and has meaning.
bool status;
- /// TODO: field description
+ /// The underlying CrossAddress value. If the status is false, can be set to whatever.
CrossAddress value;
}
pallets/fungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/fungible/src/benchmarking.rs
+++ b/pallets/fungible/src/benchmarking.rs
@@ -82,6 +82,16 @@
<Pallet<T>>::create_item(&collection, &owner, (sender.clone(), 200), &Unlimited)?;
}: {<Pallet<T>>::set_allowance(&collection, &sender, &spender, 100)?}
+ approve_from {
+ bench_init!{
+ owner: sub; collection: collection(owner);
+ owner: cross_from_sub; sender: cross_sub; spender: cross_sub;
+
+ };
+ let owner_eth = T::CrossAccountId::from_eth(*sender.as_eth());
+ <Pallet<T>>::create_item(&collection, &owner, (owner_eth.clone(), 200), &Unlimited)?;
+ }: {<Pallet<T>>::set_allowance_for(&collection, &sender, &owner_eth, &spender, 100)?}
+
transfer_from {
bench_init!{
owner: sub; collection: collection(owner);
pallets/fungible/src/common.rsdiffbeforeafterboth--- a/pallets/fungible/src/common.rs
+++ b/pallets/fungible/src/common.rs
@@ -87,6 +87,10 @@
<SelfWeightOf<T>>::approve()
}
+ fn approve_from() -> Weight {
+ <SelfWeightOf<T>>::approve_from()
+ }
+
fn transfer_from() -> Weight {
<SelfWeightOf<T>>::transfer_from()
}
@@ -254,6 +258,25 @@
)
}
+ fn approve_from(
+ &self,
+ sender: T::CrossAccountId,
+ from: T::CrossAccountId,
+ to: T::CrossAccountId,
+ token: TokenId,
+ amount: u128,
+ ) -> DispatchResultWithPostInfo {
+ ensure!(
+ token == TokenId::default(),
+ <Error<T>>::FungibleItemsHaveNoId
+ );
+
+ with_weight(
+ <Pallet<T>>::set_allowance_for(self, &sender, &from, &to, amount),
+ <CommonWeights<T>>::approve_from(),
+ )
+ }
+
fn transfer_from(
&self,
sender: T::CrossAccountId,
pallets/fungible/src/lib.rsdiffbeforeafterboth--- a/pallets/fungible/src/lib.rs
+++ b/pallets/fungible/src/lib.rs
@@ -613,6 +613,45 @@
Ok(())
}
+ /// Set allowance for the spender to `transfer` or `burn` owner's tokens from eth mirror.
+ ///
+ /// - `collection`: Collection that contains the token
+ /// - `sender`: Owner of tokens that sets the allowance.
+ /// - `from`: Owner's eth mirror.
+ /// - `to`: Recipient of the allowance rights.
+ /// - `amount`: Amount of tokens the spender is allowed to `transfer` or `burn`.
+ pub fn set_allowance_for(
+ collection: &FungibleHandle<T>,
+ sender: &T::CrossAccountId,
+ from: &T::CrossAccountId,
+ to: &T::CrossAccountId,
+ amount: u128,
+ ) -> DispatchResult {
+ if collection.permissions.access() == AccessMode::AllowList {
+ collection.check_allowlist(sender)?;
+ collection.check_allowlist(from)?;
+ collection.check_allowlist(to)?;
+ }
+
+ ensure!(
+ *sender.as_eth() == *from.as_eth(),
+ <CommonError<T>>::AddressIsNotEthMirror
+ );
+
+ if <Balance<T>>::get((collection.id, from)) < amount {
+ ensure!(
+ collection.limits.owner_can_transfer()
+ && (collection.is_owner_or_admin(sender) || collection.is_owner_or_admin(from)),
+ <CommonError<T>>::CantApproveMoreThanOwned
+ );
+ }
+
+ // =========
+
+ Self::set_allowance_unchecked(collection, from, to, amount);
+ Ok(())
+ }
+
/// Checks if a non-owner has (enough) allowance from the owner to perform operations on the tokens.
/// Returns the expected remaining allowance - it should be set manually if the transaction proceeds.
///
pallets/fungible/src/weights.rsdiffbeforeafterboth--- a/pallets/fungible/src/weights.rs
+++ b/pallets/fungible/src/weights.rs
@@ -39,6 +39,7 @@
fn burn_item() -> Weight;
fn transfer() -> Weight;
fn approve() -> Weight;
+ fn approve_from() -> Weight;
fn transfer_from() -> Weight;
fn burn_from() -> Weight;
}
@@ -84,6 +85,13 @@
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
+ // Storage: Fungible Balance (r:1 w:0)
+ // Storage: Fungible Allowance (r:0 w:1)
+ fn approve_from() -> Weight {
+ Weight::from_ref_time(19_817_000 as u64)
+ .saturating_add(T::DbWeight::get().reads(1 as u64))
+ .saturating_add(T::DbWeight::get().writes(1 as u64))
+ }
// Storage: Fungible Allowance (r:1 w:1)
// Storage: Fungible Balance (r:2 w:2)
fn transfer_from() -> Weight {
@@ -141,6 +149,13 @@
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
+ // Storage: Fungible Balance (r:1 w:0)
+ // Storage: Fungible Allowance (r:0 w:1)
+ fn approve_from() -> Weight {
+ Weight::from_ref_time(19_817_000 as u64)
+ .saturating_add(RocksDbWeight::get().reads(1 as u64))
+ .saturating_add(RocksDbWeight::get().writes(1 as u64))
+ }
// Storage: Fungible Allowance (r:1 w:1)
// Storage: Fungible Balance (r:2 w:2)
fn transfer_from() -> Weight {
pallets/nonfungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/benchmarking.rs
+++ b/pallets/nonfungible/src/benchmarking.rs
@@ -134,6 +134,15 @@
let item = create_max_item(&collection, &owner, sender.clone())?;
}: {<Pallet<T>>::set_allowance(&collection, &sender, item, Some(&spender))?}
+ approve_from {
+ bench_init!{
+ owner: sub; collection: collection(owner);
+ owner: cross_from_sub; sender: cross_sub; spender: cross_sub;
+ };
+ let owner_eth = T::CrossAccountId::from_eth(*sender.as_eth());
+ let item = create_max_item(&collection, &owner, owner_eth.clone())?;
+ }: {<Pallet<T>>::set_allowance_for(&collection, &sender, &owner_eth, item, Some(&spender))?}
+
transfer_from {
bench_init!{
owner: sub; collection: collection(owner);
pallets/nonfungible/src/common.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/common.rs
+++ b/pallets/nonfungible/src/common.rs
@@ -102,6 +102,10 @@
<SelfWeightOf<T>>::approve()
}
+ fn approve_from() -> Weight {
+ <SelfWeightOf<T>>::approve_from()
+ }
+
fn transfer_from() -> Weight {
<SelfWeightOf<T>>::transfer_from()
}
@@ -353,6 +357,26 @@
)
}
+ fn approve_from(
+ &self,
+ sender: T::CrossAccountId,
+ from: T::CrossAccountId,
+ to: T::CrossAccountId,
+ token: TokenId,
+ amount: u128,
+ ) -> DispatchResultWithPostInfo {
+ ensure!(amount <= 1, <Error<T>>::NonfungibleItemsHaveNoAmount);
+
+ with_weight(
+ if amount == 1 {
+ <Pallet<T>>::set_allowance_for(self, &sender, &from, token, Some(&to))
+ } else {
+ <Pallet<T>>::set_allowance_for(self, &sender, &from, token, None)
+ },
+ <CommonWeights<T>>::approve_from(),
+ )
+ }
+
fn transfer_from(
&self,
sender: T::CrossAccountId,
pallets/nonfungible/src/lib.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -1171,6 +1171,51 @@
Ok(())
}
+ /// Set allowance for the spender to `transfer` or `burn` sender's token from eth mirror.
+ ///
+ /// - `from`: Address of sender's eth mirror.
+ /// - `to`: Adress of spender.
+ /// - `token`: Token the spender is allowed to `transfer` or `burn`.
+ pub fn set_allowance_for(
+ collection: &NonfungibleHandle<T>,
+ sender: &T::CrossAccountId,
+ from: &T::CrossAccountId,
+ token: TokenId,
+ to: Option<&T::CrossAccountId>,
+ ) -> DispatchResult {
+ if collection.permissions.access() == AccessMode::AllowList {
+ collection.check_allowlist(sender)?;
+ collection.check_allowlist(from)?;
+ if let Some(to) = to {
+ collection.check_allowlist(to)?;
+ }
+ }
+
+ if let Some(to) = to {
+ <PalletCommon<T>>::ensure_correct_receiver(to)?;
+ }
+
+ ensure!(
+ *sender.as_eth() == *from.as_eth(),
+ <CommonError<T>>::AddressIsNotEthMirror
+ );
+
+ let token_data =
+ <TokenData<T>>::get((collection.id, token)).ok_or(<CommonError<T>>::TokenNotFound)?;
+ if token_data.owner != *from {
+ ensure!(
+ collection.limits.owner_can_transfer()
+ && (collection.is_owner_or_admin(sender) || collection.is_owner_or_admin(from)),
+ <CommonError<T>>::CantApproveMoreThanOwned
+ );
+ }
+
+ // =========
+
+ Self::set_allowance_unchecked(collection, from, token, to, false);
+ Ok(())
+ }
+
/// Checks allowance for the spender to use the token.
fn check_allowed(
collection: &NonfungibleHandle<T>,
pallets/nonfungible/src/weights.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/weights.rs
+++ b/pallets/nonfungible/src/weights.rs
@@ -42,6 +42,7 @@
fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight;
fn transfer() -> Weight;
fn approve() -> Weight;
+ fn approve_from() -> Weight;
fn transfer_from() -> Weight;
fn burn_from() -> Weight;
fn set_token_property_permissions(b: u32, ) -> Weight;
@@ -147,6 +148,13 @@
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
+ // Storage: Nonfungible TokenData (r:1 w:0)
+ // Storage: Nonfungible Allowance (r:1 w:1)
+ fn approve_from() -> Weight {
+ Weight::from_ref_time(18_965_000 as u64)
+ .saturating_add(T::DbWeight::get().reads(2 as u64))
+ .saturating_add(T::DbWeight::get().writes(1 as u64))
+ }
// Storage: Nonfungible Allowance (r:1 w:1)
// Storage: Nonfungible TokenData (r:1 w:1)
// Storage: Nonfungible AccountBalance (r:2 w:2)
@@ -310,6 +318,13 @@
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
+ // Storage: Nonfungible TokenData (r:1 w:0)
+ // Storage: Nonfungible Allowance (r:1 w:1)
+ fn approve_from() -> Weight {
+ Weight::from_ref_time(18_965_000 as u64)
+ .saturating_add(RocksDbWeight::get().reads(2 as u64))
+ .saturating_add(RocksDbWeight::get().writes(1 as u64))
+ }
// Storage: Nonfungible Allowance (r:1 w:1)
// Storage: Nonfungible TokenData (r:1 w:1)
// Storage: Nonfungible AccountBalance (r:2 w:2)
pallets/refungible/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/refungible/src/benchmarking.rs
+++ b/pallets/refungible/src/benchmarking.rs
@@ -163,6 +163,15 @@
let item = create_max_item(&collection, &owner, [(sender.clone(), 200)])?;
}: {<Pallet<T>>::set_allowance(&collection, &sender, &spender, item, 100)?}
+ approve_from {
+ bench_init!{
+ owner: sub; collection: collection(owner);
+ owner: cross_from_sub; sender: cross_sub; spender: cross_sub;
+ };
+ let owner_eth = T::CrossAccountId::from_eth(*sender.as_eth());
+ let item = create_max_item(&collection, &owner, [(owner_eth.clone(), 200)])?;
+ }: {<Pallet<T>>::set_allowance_for(&collection, &sender, &owner_eth, &spender, item, 100)?}
+
transfer_from_normal {
bench_init!{
owner: sub; collection: collection(owner);
pallets/refungible/src/common.rsdiffbeforeafterboth--- a/pallets/refungible/src/common.rs
+++ b/pallets/refungible/src/common.rs
@@ -127,6 +127,10 @@
<SelfWeightOf<T>>::approve()
}
+ fn approve_from() -> Weight {
+ <SelfWeightOf<T>>::approve_from()
+ }
+
fn transfer_from() -> Weight {
max_weight_of!(
transfer_from_normal(),
@@ -314,6 +318,20 @@
)
}
+ fn approve_from(
+ &self,
+ sender: T::CrossAccountId,
+ from: T::CrossAccountId,
+ to: T::CrossAccountId,
+ token_id: TokenId,
+ amount: u128,
+ ) -> DispatchResultWithPostInfo {
+ with_weight(
+ <Pallet<T>>::set_allowance_for(self, &sender, &from, &to, token_id, amount),
+ <CommonWeights<T>>::approve_from(),
+ )
+ }
+
fn transfer_from(
&self,
sender: T::CrossAccountId,
pallets/refungible/src/lib.rsdiffbeforeafterboth--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -1102,6 +1102,47 @@
Ok(())
}
+ /// Set allowance to spend from sender's eth mirror
+ ///
+ /// - `from`: Address of sender's eth mirror.
+ /// - `to`: Adress of spender.
+ /// - `amount`: Amount of token pieces the spender is allowed to `transfer` or `burn.
+ pub fn set_allowance_for(
+ collection: &RefungibleHandle<T>,
+ sender: &T::CrossAccountId,
+ from: &T::CrossAccountId,
+ to: &T::CrossAccountId,
+ token_id: TokenId,
+ amount: u128,
+ ) -> DispatchResult {
+ if collection.permissions.access() == AccessMode::AllowList {
+ collection.check_allowlist(sender)?;
+ collection.check_allowlist(from)?;
+ collection.check_allowlist(to)?;
+ }
+
+ <PalletCommon<T>>::ensure_correct_receiver(to)?;
+
+ ensure!(
+ *sender.as_eth() == *from.as_eth(),
+ <CommonError<T>>::AddressIsNotEthMirror
+ );
+
+ if <Balance<T>>::get((collection.id, token_id, from)) < amount {
+ ensure!(
+ collection.limits.owner_can_transfer()
+ && (collection.is_owner_or_admin(sender) || collection.is_owner_or_admin(from))
+ && Self::token_exists(collection, token_id),
+ <CommonError<T>>::CantApproveMoreThanOwned
+ );
+ }
+
+ // =========
+
+ Self::set_allowance_unchecked(collection, from, to, token_id, amount);
+ Ok(())
+ }
+
/// Returns allowance, which should be set after transaction
fn check_allowed(
collection: &RefungibleHandle<T>,
pallets/refungible/src/weights.rsdiffbeforeafterboth--- a/pallets/refungible/src/weights.rs
+++ b/pallets/refungible/src/weights.rs
@@ -45,6 +45,7 @@
fn transfer_removing() -> Weight;
fn transfer_creating_removing() -> Weight;
fn approve() -> Weight;
+ fn approve_from() -> Weight;
fn transfer_from_normal() -> Weight;
fn transfer_from_creating() -> Weight;
fn transfer_from_removing() -> Weight;
@@ -175,6 +176,13 @@
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
+ // Storage: Refungible Balance (r:1 w:0)
+ // Storage: Refungible Allowance (r:0 w:1)
+ fn approve_from() -> Weight {
+ Weight::from_ref_time(20_649_000 as u64)
+ .saturating_add(T::DbWeight::get().reads(1 as u64))
+ .saturating_add(T::DbWeight::get().writes(1 as u64))
+ }
// Storage: Refungible Allowance (r:1 w:1)
// Storage: Refungible CollectionAllowance (r:1 w:0)
// Storage: Refungible Balance (r:2 w:2)
@@ -400,6 +408,13 @@
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
+ // Storage: Refungible Balance (r:1 w:0)
+ // Storage: Refungible Allowance (r:0 w:1)
+ fn approve_from() -> Weight {
+ Weight::from_ref_time(20_649_000 as u64)
+ .saturating_add(RocksDbWeight::get().reads(1 as u64))
+ .saturating_add(RocksDbWeight::get().writes(1 as u64))
+ }
// Storage: Refungible Allowance (r:1 w:1)
// Storage: Refungible CollectionAllowance (r:1 w:0)
// Storage: Refungible Balance (r:2 w:2)
pallets/unique/src/lib.rsdiffbeforeafterboth--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -851,6 +851,29 @@
dispatch_tx::<T, _>(collection_id, |d| d.approve(sender, spender, item_id, amount))
}
+ /// Allow a non-permissioned address to transfer or burn an item from owner's eth mirror.
+ ///
+ /// # Permissions
+ ///
+ /// * Collection owner
+ /// * Collection admin
+ /// * Current item owner
+ ///
+ /// # Arguments
+ ///
+ /// * `from`: Owner's account eth mirror
+ /// * `to`: Account to be approved to make specific transactions on non-owned tokens.
+ /// * `collection_id`: ID of the collection the item belongs to.
+ /// * `item_id`: ID of the item transactions on which are now approved.
+ /// * `amount`: Number of pieces of the item approved for a transaction (maximum of 1 for NFTs).
+ /// Set to 0 to revoke the approval.
+ #[weight = T::CommonWeightInfo::approve_from()]
+ pub fn approve_from(origin, from:T::CrossAccountId, to: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResultWithPostInfo {
+ let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
+
+ dispatch_tx::<T, _>(collection_id, |d| d.approve_from(sender, from, to, item_id, amount))
+ }
+
/// Change ownership of an item on behalf of the owner as a non-owner account.
///
/// See the [`approve`][`Pallet::approve`] method for additional information.
runtime/common/identity.rsdiffbeforeafterboth--- a/runtime/common/identity.rs
+++ b/runtime/common/identity.rs
@@ -21,9 +21,7 @@
use sp_runtime::{
traits::{DispatchInfoOf, SignedExtension},
- transaction_validity::{
- TransactionValidity, ValidTransaction, InvalidTransaction, TransactionValidityError,
- },
+ transaction_validity::{TransactionValidity, ValidTransaction, TransactionValidityError},
};
#[derive(Debug, Encode, Decode, PartialEq, Eq, Clone, TypeInfo)]
runtime/common/weights.rsdiffbeforeafterboth--- a/runtime/common/weights.rs
+++ b/runtime/common/weights.rs
@@ -101,6 +101,10 @@
dispatch_weight::<T>() + max_weight_of!(approve())
}
+ fn approve_from() -> Weight {
+ dispatch_weight::<T>() + max_weight_of!(approve_from())
+ }
+
fn transfer_from() -> Weight {
dispatch_weight::<T>() + max_weight_of!(transfer_from())
}
tests/src/approve.test.tsdiffbeforeafterboth--- a/tests/src/approve.test.ts
+++ b/tests/src/approve.test.ts
@@ -16,336 +16,521 @@
import {IKeyringPair} from '@polkadot/types/types';
import {expect, itSub, Pallets, usingPlaygrounds} from './util';
+import {CrossAccountId} from './util/playgrounds/unique';
+
-describe('Integration Test approve(spender, collection_id, item_id, amount):', () => {
- let alice: IKeyringPair;
- let bob: IKeyringPair;
- let charlie: IKeyringPair;
+[
+ {method: 'approveToken', account: (account: IKeyringPair) => CrossAccountId.fromKeyring(account)},
+ {method: 'approveTokenFromEth', account: (account: IKeyringPair) => CrossAccountId.fromKeyring(account).toEthereum()},
+].map(testCase => {
+ describe(`Integration Test ${testCase.method}(spender, collection_id, item_id, amount):`, () => {
+ let alice: IKeyringPair;
+ let bob: IKeyringPair;
+ let charlie: IKeyringPair;
- before(async () => {
- await usingPlaygrounds(async (helper, privateKey) => {
- const donor = await privateKey({filename: __filename});
- [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ before(async () => {
+ await usingPlaygrounds(async (helper, privateKey) => {
+ const donor = await privateKey({filename: __filename});
+ [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ });
});
- });
- itSub('[nft] Execute the extrinsic and check approvedList', async ({helper}) => {
- const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: alice.address});
- await helper.nft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address});
- expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.true;
- });
+ itSub('[nft] Execute the extrinsic and check approvedList', async ({helper}) => {
+ const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(alice)});
+ await (helper.nft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address});
+ expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.true;
+ });
+
+ itSub('[fungible] Execute the extrinsic and check approvedList', async ({helper}) => {
+ const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
+ await helper.ft.mintTokens(alice, collectionId, 10n, testCase.account(alice));
+ const tokenId = await helper.ft.getLastTokenId(collectionId);
+ await (helper.ft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address});
+ const amount = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, testCase.account(alice));
+ expect(amount).to.be.equal(BigInt(1));
+ });
+
+ itSub.ifWithPallets('[refungible] Execute the extrinsic and check approvedList', [Pallets.ReFungible], async ({helper}) => {
+ const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(alice), pieces: 100n});
+ await (helper.rft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address});
+ const amount = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, testCase.account(alice));
+ expect(amount).to.be.equal(BigInt(1));
+ });
+
+ itSub('[nft] Remove approval by using 0 amount', async ({helper}) => {
+ const collection = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const collectionId = collection.collectionId;
+ const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(alice)});
+ await (helper.nft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address});
+ expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.true;
+ await (helper.nft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
+ expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.false;
+ });
- itSub('[fungible] Execute the extrinsic and check approvedList', async ({helper}) => {
- const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
- await helper.ft.mintTokens(alice, collectionId, 10n, {Substrate: alice.address});
- const tokenId = await helper.ft.getLastTokenId(collectionId);
- await helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address});
- const amount = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
- expect(amount).to.be.equal(BigInt(1));
- });
+ itSub('[fungible] Remove approval by using 0 amount', async ({helper}) => {
+ const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
+ await helper.ft.mintTokens(alice, collectionId, 10n, testCase.account(alice));
+ const tokenId = await helper.ft.getLastTokenId(collectionId);
+ await (helper.ft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address});
+ const amountBefore = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, testCase.account(alice));
+ expect(amountBefore).to.be.equal(BigInt(1));
- itSub.ifWithPallets('[refungible] Execute the extrinsic and check approvedList', [Pallets.ReFungible], async ({helper}) => {
- const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: alice.address, pieces: 100n});
- await helper.rft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address});
- const amount = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
- expect(amount).to.be.equal(BigInt(1));
- });
+ await (helper.ft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
+ const amountAfter = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, testCase.account(alice));
+ expect(amountAfter).to.be.equal(BigInt(0));
+ });
- itSub('[nft] Remove approval by using 0 amount', async ({helper}) => {
- const collection = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const collectionId = collection.collectionId;
- const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: alice.address});
- await helper.nft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address});
- expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.true;
- await helper.signTransaction(alice, helper.constructApiCall('api.tx.unique.approve', [{Substrate: bob.address}, collectionId, tokenId, 0]));
- expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.false;
- });
+ itSub.ifWithPallets('[refungible] Remove approval by using 0 amount', [Pallets.ReFungible], async ({helper}) => {
+ const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(alice), pieces: 100n});
+ await (helper.rft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address});
+ const amountBefore = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, testCase.account(alice));
+ expect(amountBefore).to.be.equal(BigInt(1));
- itSub('[fungible] Remove approval by using 0 amount', async ({helper}) => {
- const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
- await helper.ft.mintTokens(alice, collectionId, 10n, {Substrate: alice.address});
- const tokenId = await helper.ft.getLastTokenId(collectionId);
- await helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address});
- const amountBefore = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
- expect(amountBefore).to.be.equal(BigInt(1));
+ await (helper.rft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
+ const amountAfter = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, testCase.account(alice));
+ expect(amountAfter).to.be.equal(BigInt(0));
+ });
- await helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
- const amountAfter = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
- expect(amountAfter).to.be.equal(BigInt(0));
+ itSub('can`t be called by collection owner on non-owned item when OwnerCanTransfer == false', async ({helper}) => {
+ const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(bob)});
+ const result = (helper.nft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: charlie.address});
+ await expect(result).to.be.rejected;
+ });
});
- itSub.ifWithPallets('[refungible] Remove approval by using 0 amount', [Pallets.ReFungible], async ({helper}) => {
- const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: alice.address, pieces: 100n});
- await helper.rft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address});
- const amountBefore = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
- expect(amountBefore).to.be.equal(BigInt(1));
+ describe(`[${testCase.method}] Normal user can approve other users to transfer:`, () => {
+ let alice: IKeyringPair;
+ let bob: IKeyringPair;
+ let charlie: IKeyringPair;
- await helper.rft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
- const amountAfter = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
- expect(amountAfter).to.be.equal(BigInt(0));
- });
+ before(async () => {
+ await usingPlaygrounds(async (helper, privateKey) => {
+ const donor = await privateKey({filename: __filename});
+ [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ });
+ });
- itSub('can`t be called by collection owner on non-owned item when OwnerCanTransfer == false', async ({helper}) => {
- const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: bob.address});
- const approveTokenTx = () => helper.nft.approveToken(alice, collectionId, tokenId, {Substrate: charlie.address});
- await expect(approveTokenTx()).to.be.rejected;
- });
-});
+ itSub('NFT', async ({helper}) => {
+ const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(bob)});
+ await (helper.nft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: charlie.address});
+ expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: charlie.address})).to.be.true;
+ });
-describe('Normal user can approve other users to transfer:', () => {
- let alice: IKeyringPair;
- let bob: IKeyringPair;
- let charlie: IKeyringPair;
+ itSub('Fungible up to an approved amount', async ({helper}) => {
+ const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
+ await helper.ft.mintTokens(alice, collectionId, 10n, testCase.account(bob));
+ const tokenId = await helper.ft.getLastTokenId(collectionId);
+ await (helper.ft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: charlie.address});
+ const amount = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: charlie.address}, testCase.account(bob));
+ expect(amount).to.be.equal(BigInt(1));
+ });
- before(async () => {
- await usingPlaygrounds(async (helper, privateKey) => {
- const donor = await privateKey({filename: __filename});
- [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ itSub.ifWithPallets('ReFungible up to an approved amount', [Pallets.ReFungible], async ({helper}) => {
+ const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(bob), pieces: 100n});
+ await (helper.rft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: charlie.address}, 100n);
+ const amount = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: charlie.address}, testCase.account(bob));
+ expect(amount).to.be.equal(BigInt(100n));
});
});
- itSub('NFT', async ({helper}) => {
- const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: bob.address});
- await helper.nft.approveToken(bob, collectionId, tokenId, {Substrate: charlie.address});
- expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: charlie.address})).to.be.true;
- });
+ describe(`[${testCase.method}] Approved users can transferFrom up to approved amount:`, () => {
+ let alice: IKeyringPair;
+ let bob: IKeyringPair;
+ let charlie: IKeyringPair;
- itSub('Fungible up to an approved amount', async ({helper}) => {
- const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
- await helper.ft.mintTokens(alice, collectionId, 10n, bob.address);
- const tokenId = await helper.ft.getLastTokenId(collectionId);
- await helper.ft.approveToken(bob, collectionId, tokenId, {Substrate: charlie.address});
- const amount = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: charlie.address}, {Substrate: bob.address});
- expect(amount).to.be.equal(BigInt(1));
- });
+ before(async () => {
+ await usingPlaygrounds(async (helper, privateKey) => {
+ const donor = await privateKey({filename: __filename});
+ [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ });
+ });
- itSub.ifWithPallets('ReFungible up to an approved amount', [Pallets.ReFungible], async ({helper}) => {
- const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: bob.address, pieces: 100n});
- await helper.rft.approveToken(bob, collectionId, tokenId, {Substrate: charlie.address}, 100n);
- const amount = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: charlie.address}, {Substrate: bob.address});
- expect(amount).to.be.equal(BigInt(100n));
+ itSub('NFT', async ({helper}) => {
+ const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(bob)});
+ await (helper.nft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: charlie.address});
+ await helper.nft.transferTokenFrom(charlie, collectionId, tokenId, testCase.account(bob), {Substrate: alice.address});
+ const owner = await helper.nft.getTokenOwner(collectionId, tokenId);
+ expect(owner.Substrate).to.be.equal(alice.address);
+ });
+
+ itSub('Fungible up to an approved amount', async ({helper}) => {
+ const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
+ await helper.ft.mintTokens(alice, collectionId, 10n, testCase.account(bob));
+ const tokenId = await helper.ft.getLastTokenId(collectionId);
+ await (helper.ft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: charlie.address});
+ const before = await helper.ft.getBalance(collectionId, {Substrate: alice.address});
+ await helper.ft.transferTokenFrom(charlie, collectionId, tokenId, testCase.account(bob), {Substrate: alice.address}, 1n);
+ const after = await helper.ft.getBalance(collectionId, {Substrate: alice.address});
+ expect(after - before).to.be.equal(BigInt(1));
+ });
+
+ itSub.ifWithPallets('ReFungible up to an approved amount', [Pallets.ReFungible], async ({helper}) => {
+ const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(bob), pieces: 100n});
+ await (helper.rft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: charlie.address});
+ const before = await helper.rft.getTokenBalance(collectionId, tokenId, {Substrate: alice.address});
+ await helper.rft.transferTokenFrom(charlie, collectionId, tokenId, testCase.account(bob), {Substrate: alice.address}, 1n);
+ const after = await helper.rft.getTokenBalance(collectionId, tokenId, {Substrate: alice.address});
+ expect(after - before).to.be.equal(BigInt(1));
+ });
});
-});
-describe('Approved users can transferFrom up to approved amount:', () => {
- let alice: IKeyringPair;
- let bob: IKeyringPair;
- let charlie: IKeyringPair;
+ describe(`[${testCase.method}] Approved users cannot use transferFrom to repeat transfers if approved amount was already transferred:`, () => {
+ let alice: IKeyringPair;
+ let bob: IKeyringPair;
+ let charlie: IKeyringPair;
+
+ before(async () => {
+ await usingPlaygrounds(async (helper, privateKey) => {
+ const donor = await privateKey({filename: __filename});
+ [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ });
+ });
+
+ itSub('NFT', async ({helper}) => {
+ const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(bob)});
+ await (helper.nft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: charlie.address});
+ await helper.nft.transferTokenFrom(charlie, collectionId, tokenId, testCase.account(bob), {Substrate: alice.address});
+ const owner = await helper.nft.getTokenOwner(collectionId, tokenId);
+ expect(owner.Substrate).to.be.equal(alice.address);
+ const transferTokenFromTx = () => helper.nft.transferTokenFrom(charlie, collectionId, tokenId, testCase.account(bob), {Substrate: alice.address});
+ await expect(transferTokenFromTx()).to.be.rejected;
+ });
+
+ itSub('Fungible up to an approved amount', async ({helper}) => {
+ const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
+ await helper.ft.mintTokens(alice, collectionId, 10n, testCase.account(bob));
+ const tokenId = await helper.ft.getLastTokenId(collectionId);
+ await (helper.ft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: charlie.address});
+ const before = await helper.ft.getBalance(collectionId, {Substrate: alice.address});
+ await helper.ft.transferTokenFrom(charlie, collectionId, tokenId, testCase.account(bob), {Substrate: alice.address}, 1n);
+ const after = await helper.ft.getBalance(collectionId, {Substrate: alice.address});
+ expect(after - before).to.be.equal(BigInt(1));
+
+ const transferTokenFromTx = () => helper.ft.transferTokenFrom(charlie, collectionId, tokenId, testCase.account(bob), {Substrate: alice.address}, 1n);
+ await expect(transferTokenFromTx()).to.be.rejected;
+ });
- before(async () => {
- await usingPlaygrounds(async (helper, privateKey) => {
- const donor = await privateKey({filename: __filename});
- [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ itSub.ifWithPallets('ReFungible up to an approved amount', [Pallets.ReFungible], async ({helper}) => {
+ const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(bob), pieces: 100n});
+ await (helper.ft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: charlie.address}, 100n);
+ const before = await helper.rft.getTokenBalance(collectionId, tokenId, {Substrate: alice.address});
+ await helper.rft.transferTokenFrom(charlie, collectionId, tokenId, testCase.account(bob), {Substrate: alice.address}, 100n);
+ const after = await helper.rft.getTokenBalance(collectionId, tokenId, {Substrate: alice.address});
+ expect(after - before).to.be.equal(BigInt(100));
+ const transferTokenFromTx = () => helper.rft.transferTokenFrom(charlie, collectionId, tokenId, testCase.account(bob), {Substrate: alice.address}, 100n);
+ await expect(transferTokenFromTx()).to.be.rejected;
});
});
- itSub('NFT', async ({helper}) => {
- const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: bob.address});
- await helper.nft.approveToken(bob, collectionId, tokenId, {Substrate: charlie.address});
- await helper.nft.transferTokenFrom(charlie, collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
- const owner = await helper.nft.getTokenOwner(collectionId, tokenId);
- expect(owner.Substrate).to.be.equal(alice.address);
+ describe(`[${testCase.method}] Approved amount decreases by the transferred amount:`, () => {
+ let alice: IKeyringPair;
+ let bob: IKeyringPair;
+ let charlie: IKeyringPair;
+ let dave: IKeyringPair;
+
+ before(async () => {
+ await usingPlaygrounds(async (helper, privateKey) => {
+ const donor = await privateKey({filename: __filename});
+ [alice, bob, charlie, dave] = await helper.arrange.createAccounts([100n, 100n, 100n, 100n], donor);
+ });
+ });
+
+ itSub('If a user B is approved to transfer 10 Fungible tokens from user A, they can transfer 2 tokens to user C, which will result in decreasing approval from 10 to 8. Then user B can transfer 8 tokens to user D.', async ({helper}) => {
+ const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
+ await helper.ft.mintTokens(alice, collectionId, 10n, testCase.account(alice));
+ const tokenId = await helper.ft.getLastTokenId(collectionId);
+ await (helper.ft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address}, 10n);
+
+ const charlieBefore = await helper.ft.getBalance(collectionId, {Substrate: charlie.address});
+ await helper.ft.transferTokenFrom(bob, collectionId, tokenId, testCase.account(alice), {Substrate: charlie.address}, 2n);
+ const charlieAfter = await helper.ft.getBalance(collectionId, {Substrate: charlie.address});
+ expect(charlieAfter - charlieBefore).to.be.equal(BigInt(2));
+
+ const daveBefore = await helper.ft.getBalance(collectionId, {Substrate: dave.address});
+ await helper.ft.transferTokenFrom(bob, collectionId, tokenId, testCase.account(alice), {Substrate: dave.address}, 8n);
+ const daveAfter = await helper.ft.getBalance(collectionId, {Substrate: dave.address});
+ expect(daveAfter - daveBefore).to.be.equal(BigInt(8));
+ });
});
- itSub('Fungible up to an approved amount', async ({helper}) => {
- const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
- await helper.ft.mintTokens(alice, collectionId, 10n, bob.address);
- const tokenId = await helper.ft.getLastTokenId(collectionId);
- await helper.ft.approveToken(bob, collectionId, tokenId, {Substrate: charlie.address});
- const before = await helper.ft.getBalance(collectionId, {Substrate: alice.address});
- await helper.ft.transferTokenFrom(charlie, collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address}, 1n);
- const after = await helper.ft.getBalance(collectionId, {Substrate: alice.address});
- expect(after - before).to.be.equal(BigInt(1));
+ describe(`[${testCase.method}] User may clear the approvals to approving for 0 amount:`, () => {
+ let alice: IKeyringPair;
+ let bob: IKeyringPair;
+ let charlie: IKeyringPair;
+
+ before(async () => {
+ await usingPlaygrounds(async (helper, privateKey) => {
+ const donor = await privateKey({filename: __filename});
+ [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ });
+ });
+
+ itSub('NFT', async ({helper}) => {
+ const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(alice)});
+ await (helper.nft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address});
+ expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.true;
+ await (helper.nft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
+ expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.false;
+ const transferTokenFromTx = () => helper.nft.transferTokenFrom(bob, collectionId, tokenId, {Substrate: bob.address}, {Substrate: bob.address});
+ await expect(transferTokenFromTx()).to.be.rejected;
+ });
+
+ itSub('Fungible', async ({helper}) => {
+ const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
+ await helper.ft.mintTokens(alice, collectionId, 10n, testCase.account(alice));
+ const tokenId = await helper.ft.getLastTokenId(collectionId);
+ await (helper.ft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address});
+ const amountBefore = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, testCase.account(alice));
+ expect(amountBefore).to.be.equal(BigInt(1));
+
+ await (helper.ft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
+ const amountAfter = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, testCase.account(alice));
+ expect(amountAfter).to.be.equal(BigInt(0));
+
+ const transferTokenFromTx = () => helper.ft.transferTokenFrom(bob, collectionId, tokenId, {Substrate: bob.address}, {Substrate: charlie.address}, 1n);
+ await expect(transferTokenFromTx()).to.be.rejected;
+ });
+
+ itSub.ifWithPallets('ReFungible', [Pallets.ReFungible], async ({helper}) => {
+ const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(alice), pieces: 100n});
+ await (helper.rft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address});
+ const amountBefore = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, testCase.account(alice));
+ expect(amountBefore).to.be.equal(BigInt(1));
+
+ await (helper.rft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
+ const amountAfter = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, testCase.account(alice));
+ expect(amountAfter).to.be.equal(BigInt(0));
+
+ const transferTokenFromTx = () => helper.rft.transferTokenFrom(bob, collectionId, tokenId, {Substrate: bob.address}, {Substrate: charlie.address}, 100n);
+ await expect(transferTokenFromTx()).to.be.rejected;
+ });
});
- itSub.ifWithPallets('ReFungible up to an approved amount', [Pallets.ReFungible], async ({helper}) => {
- const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: bob.address, pieces: 100n});
- await helper.rft.approveToken(bob, collectionId, tokenId, {Substrate: charlie.address});
- const before = await helper.rft.getTokenBalance(collectionId, tokenId, {Substrate: alice.address});
- await helper.rft.transferTokenFrom(charlie, collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address}, 1n);
- const after = await helper.rft.getTokenBalance(collectionId, tokenId, {Substrate: alice.address});
- expect(after - before).to.be.equal(BigInt(1));
+ describe(`[${testCase.method}] User cannot approve for the amount greater than they own:`, () => {
+ let alice: IKeyringPair;
+ let bob: IKeyringPair;
+ let charlie: IKeyringPair;
+
+ before(async () => {
+ await usingPlaygrounds(async (helper, privateKey) => {
+ const donor = await privateKey({filename: __filename});
+ [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ });
+ });
+
+ itSub('1 for NFT', async ({helper}) => {
+ const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(bob)});
+ const result = (helper.nft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: charlie.address}, 2n);
+ await expect(result).to.be.rejected;
+ expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: charlie.address})).to.be.false;
+ });
+
+ itSub('Fungible', async ({helper}) => {
+ const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
+ await helper.ft.mintTokens(alice, collectionId, 10n, testCase.account(alice));
+ const tokenId = await helper.ft.getLastTokenId(collectionId);
+ const result = (helper.ft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address}, 11n);
+ await expect(result).to.be.rejected;
+ });
+
+ itSub.ifWithPallets('ReFungible', [Pallets.ReFungible], async ({helper}) => {
+ const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(alice), pieces: 100n});
+ const result = (helper.rft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: bob.address}, 101n);
+ await expect(result).to.be.rejected;
+ });
});
-});
-describe('Approved users cannot use transferFrom to repeat transfers if approved amount was already transferred:', () => {
- let alice: IKeyringPair;
- let bob: IKeyringPair;
- let charlie: IKeyringPair;
+ describe(`[${testCase.method}] Integration Test approve(spender, collection_id, item_id, amount) with collection admin permissions:`, () => {
+ let alice: IKeyringPair;
+ let bob: IKeyringPair;
+ let charlie: IKeyringPair;
+
+ before(async () => {
+ await usingPlaygrounds(async (helper, privateKey) => {
+ const donor = await privateKey({filename: __filename});
+ [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ });
+ });
- before(async () => {
- await usingPlaygrounds(async (helper, privateKey) => {
- const donor = await privateKey({filename: __filename});
- [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ itSub('can be called by collection admin on non-owned item', async ({helper}) => {
+ const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(alice)});
+ await helper.collection.addAdmin(alice, collectionId, {Substrate: bob.address});
+ const result = (helper.nft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: charlie.address});
+ await expect(result).to.be.rejected;
});
});
- itSub('NFT', async ({helper}) => {
- const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: bob.address});
- await helper.nft.approveToken(bob, collectionId, tokenId, {Substrate: charlie.address});
- await helper.nft.transferTokenFrom(charlie, collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
- const owner = await helper.nft.getTokenOwner(collectionId, tokenId);
- expect(owner.Substrate).to.be.equal(alice.address);
- const transferTokenFromTx = () => helper.nft.transferTokenFrom(charlie, collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
- await expect(transferTokenFromTx()).to.be.rejected;
- });
+ describe(`[${testCase.method}] Negative Integration Test approve(spender, collection_id, item_id, amount):`, () => {
+ let alice: IKeyringPair;
+ let bob: IKeyringPair;
+ let charlie: IKeyringPair;
- itSub('Fungible up to an approved amount', async ({helper}) => {
- const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
- await helper.ft.mintTokens(alice, collectionId, 10n, bob.address);
- const tokenId = await helper.ft.getLastTokenId(collectionId);
- await helper.ft.approveToken(bob, collectionId, tokenId, {Substrate: charlie.address});
- const before = await helper.ft.getBalance(collectionId, {Substrate: alice.address});
- await helper.ft.transferTokenFrom(charlie, collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address}, 1n);
- const after = await helper.ft.getBalance(collectionId, {Substrate: alice.address});
- expect(after - before).to.be.equal(BigInt(1));
+ before(async () => {
+ await usingPlaygrounds(async (helper, privateKey) => {
+ const donor = await privateKey({filename: __filename});
+ [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ });
+ });
- const transferTokenFromTx = () => helper.ft.transferTokenFrom(charlie, collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address}, 1n);
- await expect(transferTokenFromTx()).to.be.rejected;
- });
+ itSub('[nft] Approve for a collection that does not exist', async ({helper}) => {
+ const collectionId = 1 << 32 - 1;
+ await expect((helper.nft as any)[testCase.method](bob, collectionId, 1, {Substrate: charlie.address})).to.be.rejected;
+ });
+
+ itSub('[fungible] Approve for a collection that does not exist', async ({helper}) => {
+ const collectionId = 1 << 32 - 1;
+ const approveTx = () => (helper.ft as any)[testCase.method](bob, collectionId, 1, {Substrate: charlie.address});
+ await expect(approveTx()).to.be.rejected;
+ });
- itSub.ifWithPallets('ReFungible up to an approved amount', [Pallets.ReFungible], async ({helper}) => {
- const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: bob.address, pieces: 100n});
- await helper.rft.approveToken(bob, collectionId, tokenId, {Substrate: charlie.address}, 100n);
- const before = await helper.rft.getTokenBalance(collectionId, tokenId, {Substrate: alice.address});
- await helper.rft.transferTokenFrom(charlie, collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address}, 100n);
- const after = await helper.rft.getTokenBalance(collectionId, tokenId, {Substrate: alice.address});
- expect(after - before).to.be.equal(BigInt(100));
- const transferTokenFromTx = () => helper.rft.transferTokenFrom(charlie, collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address}, 100n);
- await expect(transferTokenFromTx()).to.be.rejected;
- });
-});
+ itSub.ifWithPallets('[refungible] Approve for a collection that does not exist', [Pallets.ReFungible], async ({helper}) => {
+ const collectionId = 1 << 32 - 1;
+ const approveTx = () => (helper.rft as any)[testCase.method](bob, collectionId, 1, {Substrate: charlie.address});
+ await expect(approveTx()).to.be.rejected;
+ });
-describe('Approved amount decreases by the transferred amount:', () => {
- let alice: IKeyringPair;
- let bob: IKeyringPair;
- let charlie: IKeyringPair;
- let dave: IKeyringPair;
+ itSub('[nft] Approve for a collection that was destroyed', async ({helper}) => {
+ const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ await helper.nft.burn(alice, collectionId);
+ const approveTx = () => (helper.nft as any)[testCase.method](alice, collectionId, 1, {Substrate: bob.address});
+ await expect(approveTx()).to.be.rejected;
+ });
- before(async () => {
- await usingPlaygrounds(async (helper, privateKey) => {
- const donor = await privateKey({filename: __filename});
- [alice, bob, charlie, dave] = await helper.arrange.createAccounts([100n, 100n, 100n, 100n], donor);
+ itSub('[fungible] Approve for a collection that was destroyed', async ({helper}) => {
+ const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ await helper.ft.burn(alice, collectionId);
+ const approveTx = () => (helper.ft as any)[testCase.method](alice, collectionId, 1, {Substrate: bob.address});
+ await expect(approveTx()).to.be.rejected;
});
- });
- itSub('If a user B is approved to transfer 10 Fungible tokens from user A, they can transfer 2 tokens to user C, which will result in decreasing approval from 10 to 8. Then user B can transfer 8 tokens to user D.', async ({helper}) => {
- const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
- await helper.ft.mintTokens(alice, collectionId, 10n, alice.address);
- const tokenId = await helper.ft.getLastTokenId(collectionId);
- await helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 10n);
+ itSub.ifWithPallets('[refungible] Approve for a collection that was destroyed', [Pallets.ReFungible], async ({helper}) => {
+ const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ await helper.rft.burn(alice, collectionId);
+ const approveTx = () => (helper.rft as any)[testCase.method](alice, collectionId, 1, {Substrate: bob.address});
+ await expect(approveTx()).to.be.rejected;
+ });
- const charlieBefore = await helper.ft.getBalance(collectionId, {Substrate: charlie.address});
- await helper.ft.transferTokenFrom(bob, collectionId, tokenId, {Substrate: alice.address}, {Substrate: charlie.address}, 2n);
- const charlieAfter = await helper.ft.getBalance(collectionId, {Substrate: charlie.address});
- expect(charlieAfter - charlieBefore).to.be.equal(BigInt(2));
+ itSub('[nft] Approve transfer of a token that does not exist', async ({helper}) => {
+ const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const approveTx = () => (helper.nft as any)[testCase.method](alice, collectionId, 2, {Substrate: bob.address});
+ await expect(approveTx()).to.be.rejected;
+ });
- const daveBefore = await helper.ft.getBalance(collectionId, {Substrate: dave.address});
- await helper.ft.transferTokenFrom(bob, collectionId, tokenId, {Substrate: alice.address}, {Substrate: dave.address}, 8n);
- const daveAfter = await helper.ft.getBalance(collectionId, {Substrate: dave.address});
- expect(daveAfter - daveBefore).to.be.equal(BigInt(8));
- });
-});
+ itSub.ifWithPallets('[refungible] Approve transfer of a token that does not exist', [Pallets.ReFungible], async ({helper}) => {
+ const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const approveTx = () => (helper.rft as any)[testCase.method](alice, collectionId, 2, {Substrate: bob.address});
+ await expect(approveTx()).to.be.rejected;
+ });
-describe('User may clear the approvals to approving for 0 amount:', () => {
- let alice: IKeyringPair;
- let bob: IKeyringPair;
- let charlie: IKeyringPair;
+ itSub('[nft] Approve using the address that does not own the approved token', async ({helper}) => {
+ const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(alice)});
+ const approveTx = () => (helper.nft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: alice.address});
+ await expect(approveTx()).to.be.rejected;
+ });
- before(async () => {
- await usingPlaygrounds(async (helper, privateKey) => {
- const donor = await privateKey({filename: __filename});
- [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ itSub('[fungible] Approve using the address that does not own the approved token', async ({helper}) => {
+ const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ await helper.ft.mintTokens(alice, collectionId, 10n, testCase.account(alice));
+ const tokenId = await helper.ft.getLastTokenId(collectionId);
+ const approveTx = () => (helper.ft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: alice.address});
+ await expect(approveTx()).to.be.rejected;
});
- });
- itSub('NFT', async ({helper}) => {
- const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: alice.address});
- await helper.nft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address});
- expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.true;
- await helper.signTransaction(alice, helper.constructApiCall('api.tx.unique.approve', [{Substrate: bob.address}, collectionId, tokenId, 0]));
- expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.false;
- const transferTokenFromTx = () => helper.nft.transferTokenFrom(bob, collectionId, tokenId, {Substrate: bob.address}, {Substrate: bob.address});
- await expect(transferTokenFromTx()).to.be.rejected;
- });
+ itSub.ifWithPallets('[refungible] Approve using the address that does not own the approved token', [Pallets.ReFungible], async ({helper}) => {
+ const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(alice), pieces: 100n});
+ const approveTx = () => (helper.rft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: alice.address});
+ await expect(approveTx()).to.be.rejected;
+ });
- itSub('Fungible', async ({helper}) => {
- const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
- await helper.ft.mintTokens(alice, collectionId, 10n, alice.address);
- const tokenId = await helper.ft.getLastTokenId(collectionId);
- await helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address});
- const amountBefore = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
- expect(amountBefore).to.be.equal(BigInt(1));
+ itSub.ifWithPallets('should fail if approved more ReFungibles than owned', [Pallets.ReFungible], async ({helper}) => {
+ const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: alice.address, pieces: 100n});
+ await helper.rft.transferToken(alice, collectionId, tokenId, testCase.account(bob), 100n);
+ await (helper.rft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: alice.address}, 100n);
- await helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
- const amountAfter = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
- expect(amountAfter).to.be.equal(BigInt(0));
+ const approveTx = () => (helper.rft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: alice.address}, 101n);
+ await expect(approveTx()).to.be.rejected;
+ });
- const transferTokenFromTx = () => helper.ft.transferTokenFrom(bob, collectionId, tokenId, {Substrate: bob.address}, {Substrate: charlie.address}, 1n);
- await expect(transferTokenFromTx()).to.be.rejected;
- });
+ itSub('should fail if approved more Fungibles than owned', async ({helper}) => {
+ const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ await helper.ft.mintTokens(alice, collectionId, 10n, alice.address);
+ const tokenId = await helper.ft.getLastTokenId(collectionId);
- itSub.ifWithPallets('ReFungible', [Pallets.ReFungible], async ({helper}) => {
- const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: alice.address, pieces: 100n});
- await helper.rft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address});
- const amountBefore = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
- expect(amountBefore).to.be.equal(BigInt(1));
+ await helper.ft.transferToken(alice, collectionId, tokenId, testCase.account(bob), 10n);
+ await (helper.ft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: alice.address}, 10n);
+ const approveTx = () => (helper.ft as any)[testCase.method](bob, collectionId, tokenId, {Substrate: alice.address}, 11n);
+ await expect(approveTx()).to.be.rejected;
+ });
- await helper.rft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
- const amountAfter = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
- expect(amountAfter).to.be.equal(BigInt(0));
+ itSub('fails when called by collection owner on non-owned item when OwnerCanTransfer == false', async ({helper}) => {
+ const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
+ const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: testCase.account(bob)});
+ await helper.collection.setLimits(alice, collectionId, {ownerCanTransfer: false});
- const transferTokenFromTx = () => helper.rft.transferTokenFrom(bob, collectionId, tokenId, {Substrate: bob.address}, {Substrate: charlie.address}, 100n);
- await expect(transferTokenFromTx()).to.be.rejected;
+ const approveTx = () => (helper.nft as any)[testCase.method](alice, collectionId, tokenId, {Substrate: charlie.address});
+ await expect(approveTx()).to.be.rejected;
+ });
});
});
-describe('User cannot approve for the amount greater than they own:', () => {
+describe('Normal user can approve other users to be wallet operator:', () => {
let alice: IKeyringPair;
let bob: IKeyringPair;
- let charlie: IKeyringPair;
before(async () => {
await usingPlaygrounds(async (helper, privateKey) => {
const donor = await privateKey({filename: __filename});
- [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
+ [alice, bob] = await helper.arrange.createAccounts([100n, 100n], donor);
});
});
- itSub('1 for NFT', async ({helper}) => {
+ itSub('[nft] Enable and disable approval', async ({helper}) => {
const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: bob.address});
- const approveTx = () => helper.signTransaction(bob, helper.constructApiCall('api.tx.unique.approve', [{Substrate: charlie.address}, collectionId, tokenId, 2]));
- await expect(approveTx()).to.be.rejected;
- expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: charlie.address})).to.be.false;
- });
- itSub('Fungible', async ({helper}) => {
- const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
- await helper.ft.mintTokens(alice, collectionId, 10n, alice.address);
- const tokenId = await helper.ft.getLastTokenId(collectionId);
- const approveTx = () => helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 11n);
- await expect(approveTx()).to.be.rejected;
+ const checkBeforeApproval = await helper.nft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
+ expect(checkBeforeApproval).to.be.false;
+
+ await helper.nft.setAllowanceForAll(alice, collectionId, {Substrate: bob.address}, true);
+ const checkAfterApproval = await helper.nft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
+ expect(checkAfterApproval).to.be.true;
+
+ await helper.nft.setAllowanceForAll(alice, collectionId, {Substrate: bob.address}, false);
+ const checkAfterDisapproval = await helper.nft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
+ expect(checkAfterDisapproval).to.be.false;
});
- itSub.ifWithPallets('ReFungible', [Pallets.ReFungible], async ({helper}) => {
+ itSub.ifWithPallets('[rft] Enable and disable approval', [Pallets.ReFungible], async ({helper}) => {
const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: alice.address, pieces: 100n});
- const approveTx = () => helper.rft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 101n);
- await expect(approveTx()).to.be.rejected;
+
+ const checkBeforeApproval = await helper.rft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
+ expect(checkBeforeApproval).to.be.false;
+
+ await helper.rft.setAllowanceForAll(alice, collectionId, {Substrate: bob.address}, true);
+ const checkAfterApproval = await helper.rft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
+ expect(checkAfterApproval).to.be.true;
+
+ await helper.rft.setAllowanceForAll(alice, collectionId, {Substrate: bob.address}, false);
+ const checkAfterDisapproval = await helper.rft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
+ expect(checkAfterDisapproval).to.be.false;
});
});
@@ -464,184 +649,5 @@
await token.approve(dave, {Substrate: bob.address}, 50n);
await expect(token.approve(dave, {Substrate: charlie.address}, 51n))
.to.be.rejectedWith('this test would fail (since it is skipped), replace this expecting message with what would have been received');
- });
-});
-
-describe('Integration Test approve(spender, collection_id, item_id, amount) with collection admin permissions:', () => {
- let alice: IKeyringPair;
- let bob: IKeyringPair;
- let charlie: IKeyringPair;
-
- before(async () => {
- await usingPlaygrounds(async (helper, privateKey) => {
- const donor = await privateKey({filename: __filename});
- [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
- });
- });
-
- itSub('can be called by collection admin on non-owned item', async ({helper}) => {
- const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: alice.address});
- await helper.collection.addAdmin(alice, collectionId, {Substrate: bob.address});
- const approveTx = () => helper.nft.approveToken(bob, collectionId, tokenId, {Substrate: charlie.address});
- await expect(approveTx()).to.be.rejected;
- });
-});
-
-describe('Negative Integration Test approve(spender, collection_id, item_id, amount):', () => {
- let alice: IKeyringPair;
- let bob: IKeyringPair;
- let charlie: IKeyringPair;
-
- before(async () => {
- await usingPlaygrounds(async (helper, privateKey) => {
- const donor = await privateKey({filename: __filename});
- [alice, bob, charlie] = await helper.arrange.createAccounts([100n, 100n, 100n], donor);
- });
- });
-
- itSub('[nft] Approve for a collection that does not exist', async ({helper}) => {
- const collectionId = 1 << 32 - 1;
- const approveTx = () => helper.nft.approveToken(bob, collectionId, 1, {Substrate: charlie.address});
- await expect(approveTx()).to.be.rejected;
- });
-
- itSub('[fungible] Approve for a collection that does not exist', async ({helper}) => {
- const collectionId = 1 << 32 - 1;
- const approveTx = () => helper.ft.approveToken(bob, collectionId, 1, {Substrate: charlie.address});
- await expect(approveTx()).to.be.rejected;
- });
-
- itSub.ifWithPallets('[refungible] Approve for a collection that does not exist', [Pallets.ReFungible], async ({helper}) => {
- const collectionId = 1 << 32 - 1;
- const approveTx = () => helper.rft.approveToken(bob, collectionId, 1, {Substrate: charlie.address});
- await expect(approveTx()).to.be.rejected;
- });
-
- itSub('[nft] Approve for a collection that was destroyed', async ({helper}) => {
- const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- await helper.nft.burn(alice, collectionId);
- const approveTx = () => helper.nft.approveToken(alice, collectionId, 1, {Substrate: bob.address});
- await expect(approveTx()).to.be.rejected;
- });
-
- itSub('[fungible] Approve for a collection that was destroyed', async ({helper}) => {
- const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- await helper.ft.burn(alice, collectionId);
- const approveTx = () => helper.ft.approveToken(alice, collectionId, 1, {Substrate: bob.address});
- await expect(approveTx()).to.be.rejected;
- });
-
- itSub.ifWithPallets('[refungible] Approve for a collection that was destroyed', [Pallets.ReFungible], async ({helper}) => {
- const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- await helper.rft.burn(alice, collectionId);
- const approveTx = () => helper.rft.approveToken(alice, collectionId, 1, {Substrate: bob.address});
- await expect(approveTx()).to.be.rejected;
- });
-
- itSub('[nft] Approve transfer of a token that does not exist', async ({helper}) => {
- const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const approveTx = () => helper.nft.approveToken(alice, collectionId, 2, {Substrate: bob.address});
- await expect(approveTx()).to.be.rejected;
- });
-
- itSub.ifWithPallets('[refungible] Approve transfer of a token that does not exist', [Pallets.ReFungible], async ({helper}) => {
- const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const approveTx = () => helper.rft.approveToken(alice, collectionId, 2, {Substrate: bob.address});
- await expect(approveTx()).to.be.rejected;
- });
-
- itSub('[nft] Approve using the address that does not own the approved token', async ({helper}) => {
- const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: alice.address});
- const approveTx = () => helper.nft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address});
- await expect(approveTx()).to.be.rejected;
- });
-
- itSub('[fungible] Approve using the address that does not own the approved token', async ({helper}) => {
- const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- await helper.ft.mintTokens(alice, collectionId, 10n, alice.address);
- const tokenId = await helper.ft.getLastTokenId(collectionId);
- const approveTx = () => helper.ft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address});
- await expect(approveTx()).to.be.rejected;
- });
-
- itSub.ifWithPallets('[refungible] Approve using the address that does not own the approved token', [Pallets.ReFungible], async ({helper}) => {
- const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: alice.address, pieces: 100n});
- const approveTx = () => helper.rft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address});
- await expect(approveTx()).to.be.rejected;
- });
-
- itSub.ifWithPallets('should fail if approved more ReFungibles than owned', [Pallets.ReFungible], async ({helper}) => {
- const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: alice.address, pieces: 100n});
- await helper.rft.transferToken(alice, collectionId, tokenId, {Substrate: bob.address}, 100n);
- await helper.rft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address}, 100n);
-
- const approveTx = () => helper.rft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address}, 101n);
- await expect(approveTx()).to.be.rejected;
- });
-
- itSub('should fail if approved more Fungibles than owned', async ({helper}) => {
- const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- await helper.ft.mintTokens(alice, collectionId, 10n, alice.address);
- const tokenId = await helper.ft.getLastTokenId(collectionId);
-
- await helper.ft.transferToken(alice, collectionId, tokenId, {Substrate: bob.address}, 10n);
- await helper.ft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address}, 10n);
- const approveTx = () => helper.ft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address}, 11n);
- await expect(approveTx()).to.be.rejected;
- });
-
- itSub('fails when called by collection owner on non-owned item when OwnerCanTransfer == false', async ({helper}) => {
- const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
- const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: bob.address});
- await helper.collection.setLimits(alice, collectionId, {ownerCanTransfer: false});
-
- const approveTx = () => helper.nft.approveToken(alice, collectionId, tokenId, {Substrate: charlie.address});
- await expect(approveTx()).to.be.rejected;
- });
-});
-
-describe('Normal user can approve other users to be wallet operator:', () => {
- let alice: IKeyringPair;
- let bob: IKeyringPair;
-
- before(async () => {
- await usingPlaygrounds(async (helper, privateKey) => {
- const donor = await privateKey({filename: __filename});
- [alice, bob] = await helper.arrange.createAccounts([100n, 100n], donor);
- });
- });
-
- itSub('[nft] Enable and disable approval', async ({helper}) => {
- const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
-
- const checkBeforeApproval = await helper.nft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
- expect(checkBeforeApproval).to.be.false;
-
- await helper.nft.setAllowanceForAll(alice, collectionId, {Substrate: bob.address}, true);
- const checkAfterApproval = await helper.nft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
- expect(checkAfterApproval).to.be.true;
-
- await helper.nft.setAllowanceForAll(alice, collectionId, {Substrate: bob.address}, false);
- const checkAfterDisapproval = await helper.nft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
- expect(checkAfterDisapproval).to.be.false;
- });
-
- itSub.ifWithPallets('[rft] Enable and disable approval', [Pallets.ReFungible], async ({helper}) => {
- const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
-
- const checkBeforeApproval = await helper.rft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
- expect(checkBeforeApproval).to.be.false;
-
- await helper.rft.setAllowanceForAll(alice, collectionId, {Substrate: bob.address}, true);
- const checkAfterApproval = await helper.rft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
- expect(checkAfterApproval).to.be.true;
-
- await helper.rft.setAllowanceForAll(alice, collectionId, {Substrate: bob.address}, false);
- const checkAfterDisapproval = await helper.rft.allowanceForAll(collectionId, {Substrate: alice.address}, {Substrate: bob.address});
- expect(checkAfterDisapproval).to.be.false;
});
});
tests/src/eth/api/ContractHelpers.soldiffbeforeafterboth--- a/tests/src/eth/api/ContractHelpers.sol
+++ b/tests/src/eth/api/ContractHelpers.sol
@@ -183,9 +183,9 @@
/// Ethereum representation of Optional value with CrossAddress.
struct OptionCrossAddress {
- /// TODO: field description
+ /// Whether or not this CrossAdress is valid and has meaning.
bool status;
- /// TODO: field description
+ /// The underlying CrossAddress value. If the status is false, can be set to whatever.
CrossAddress value;
}
tests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -85,6 +85,10 @@
**/
AccountTokenLimitExceeded: AugmentedError<ApiType>;
/**
+ * Only spending from eth mirror could be approved
+ **/
+ AddressIsNotEthMirror: AugmentedError<ApiType>;
+ /**
* Can't transfer tokens to ethereum zero address
**/
AddressIsZero: AugmentedError<ApiType>;
tests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -1214,6 +1214,25 @@
**/
approve: AugmentedSubmittable<(spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
/**
+ * Allow a non-permissioned address to transfer or burn an item from owner's eth mirror.
+ *
+ * # Permissions
+ *
+ * * Collection owner
+ * * Collection admin
+ * * Current item owner
+ *
+ * # Arguments
+ *
+ * * `from`: Owner's account eth mirror
+ * * `to`: Account to be approved to make specific transactions on non-owned tokens.
+ * * `collection_id`: ID of the collection the item belongs to.
+ * * `item_id`: ID of the item transactions on which are now approved.
+ * * `amount`: Number of pieces of the item approved for a transaction (maximum of 1 for NFTs).
+ * Set to 0 to revoke the approval.
+ **/
+ approveFrom: AugmentedSubmittable<(from: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, to: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
+ /**
* Destroy a token on behalf of the owner as a non-owner account.
*
* See also: [`approve`][`Pallet::approve`].
tests/src/interfaces/default/types.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit2/* eslint-disable */34import type { BTreeMap, BTreeSet, Bytes, Compact, Enum, Null, Option, Result, Struct, Text, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';5import type { ITuple } from '@polkadot/types-codec/types';6import type { AccountId32, Call, H160, H256, MultiAddress, Perbill, Permill } from '@polkadot/types/interfaces/runtime';7import type { Event } from '@polkadot/types/interfaces/system';89/** @name CumulusPalletDmpQueueCall */10export interface CumulusPalletDmpQueueCall extends Enum {11 readonly isServiceOverweight: boolean;12 readonly asServiceOverweight: {13 readonly index: u64;14 readonly weightLimit: u64;15 } & Struct;16 readonly type: 'ServiceOverweight';17}1819/** @name CumulusPalletDmpQueueConfigData */20export interface CumulusPalletDmpQueueConfigData extends Struct {21 readonly maxIndividual: SpWeightsWeightV2Weight;22}2324/** @name CumulusPalletDmpQueueError */25export interface CumulusPalletDmpQueueError extends Enum {26 readonly isUnknown: boolean;27 readonly isOverLimit: boolean;28 readonly type: 'Unknown' | 'OverLimit';29}3031/** @name CumulusPalletDmpQueueEvent */32export interface CumulusPalletDmpQueueEvent extends Enum {33 readonly isInvalidFormat: boolean;34 readonly asInvalidFormat: {35 readonly messageId: U8aFixed;36 } & Struct;37 readonly isUnsupportedVersion: boolean;38 readonly asUnsupportedVersion: {39 readonly messageId: U8aFixed;40 } & Struct;41 readonly isExecutedDownward: boolean;42 readonly asExecutedDownward: {43 readonly messageId: U8aFixed;44 readonly outcome: XcmV2TraitsOutcome;45 } & Struct;46 readonly isWeightExhausted: boolean;47 readonly asWeightExhausted: {48 readonly messageId: U8aFixed;49 readonly remainingWeight: SpWeightsWeightV2Weight;50 readonly requiredWeight: SpWeightsWeightV2Weight;51 } & Struct;52 readonly isOverweightEnqueued: boolean;53 readonly asOverweightEnqueued: {54 readonly messageId: U8aFixed;55 readonly overweightIndex: u64;56 readonly requiredWeight: SpWeightsWeightV2Weight;57 } & Struct;58 readonly isOverweightServiced: boolean;59 readonly asOverweightServiced: {60 readonly overweightIndex: u64;61 readonly weightUsed: SpWeightsWeightV2Weight;62 } & Struct;63 readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward' | 'WeightExhausted' | 'OverweightEnqueued' | 'OverweightServiced';64}6566/** @name CumulusPalletDmpQueuePageIndexData */67export interface CumulusPalletDmpQueuePageIndexData extends Struct {68 readonly beginUsed: u32;69 readonly endUsed: u32;70 readonly overweightCount: u64;71}7273/** @name CumulusPalletParachainSystemCall */74export interface CumulusPalletParachainSystemCall extends Enum {75 readonly isSetValidationData: boolean;76 readonly asSetValidationData: {77 readonly data: CumulusPrimitivesParachainInherentParachainInherentData;78 } & Struct;79 readonly isSudoSendUpwardMessage: boolean;80 readonly asSudoSendUpwardMessage: {81 readonly message: Bytes;82 } & Struct;83 readonly isAuthorizeUpgrade: boolean;84 readonly asAuthorizeUpgrade: {85 readonly codeHash: H256;86 } & Struct;87 readonly isEnactAuthorizedUpgrade: boolean;88 readonly asEnactAuthorizedUpgrade: {89 readonly code: Bytes;90 } & Struct;91 readonly type: 'SetValidationData' | 'SudoSendUpwardMessage' | 'AuthorizeUpgrade' | 'EnactAuthorizedUpgrade';92}9394/** @name CumulusPalletParachainSystemError */95export interface CumulusPalletParachainSystemError extends Enum {96 readonly isOverlappingUpgrades: boolean;97 readonly isProhibitedByPolkadot: boolean;98 readonly isTooBig: boolean;99 readonly isValidationDataNotAvailable: boolean;100 readonly isHostConfigurationNotAvailable: boolean;101 readonly isNotScheduled: boolean;102 readonly isNothingAuthorized: boolean;103 readonly isUnauthorized: boolean;104 readonly type: 'OverlappingUpgrades' | 'ProhibitedByPolkadot' | 'TooBig' | 'ValidationDataNotAvailable' | 'HostConfigurationNotAvailable' | 'NotScheduled' | 'NothingAuthorized' | 'Unauthorized';105}106107/** @name CumulusPalletParachainSystemEvent */108export interface CumulusPalletParachainSystemEvent extends Enum {109 readonly isValidationFunctionStored: boolean;110 readonly isValidationFunctionApplied: boolean;111 readonly asValidationFunctionApplied: {112 readonly relayChainBlockNum: u32;113 } & Struct;114 readonly isValidationFunctionDiscarded: boolean;115 readonly isUpgradeAuthorized: boolean;116 readonly asUpgradeAuthorized: {117 readonly codeHash: H256;118 } & Struct;119 readonly isDownwardMessagesReceived: boolean;120 readonly asDownwardMessagesReceived: {121 readonly count: u32;122 } & Struct;123 readonly isDownwardMessagesProcessed: boolean;124 readonly asDownwardMessagesProcessed: {125 readonly weightUsed: SpWeightsWeightV2Weight;126 readonly dmqHead: H256;127 } & Struct;128 readonly type: 'ValidationFunctionStored' | 'ValidationFunctionApplied' | 'ValidationFunctionDiscarded' | 'UpgradeAuthorized' | 'DownwardMessagesReceived' | 'DownwardMessagesProcessed';129}130131/** @name CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot */132export interface CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot extends Struct {133 readonly dmqMqcHead: H256;134 readonly relayDispatchQueueSize: ITuple<[u32, u32]>;135 readonly ingressChannels: Vec<ITuple<[u32, PolkadotPrimitivesV2AbridgedHrmpChannel]>>;136 readonly egressChannels: Vec<ITuple<[u32, PolkadotPrimitivesV2AbridgedHrmpChannel]>>;137}138139/** @name CumulusPalletXcmCall */140export interface CumulusPalletXcmCall extends Null {}141142/** @name CumulusPalletXcmError */143export interface CumulusPalletXcmError extends Null {}144145/** @name CumulusPalletXcmEvent */146export interface CumulusPalletXcmEvent extends Enum {147 readonly isInvalidFormat: boolean;148 readonly asInvalidFormat: U8aFixed;149 readonly isUnsupportedVersion: boolean;150 readonly asUnsupportedVersion: U8aFixed;151 readonly isExecutedDownward: boolean;152 readonly asExecutedDownward: ITuple<[U8aFixed, XcmV2TraitsOutcome]>;153 readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward';154}155156/** @name CumulusPalletXcmpQueueCall */157export interface CumulusPalletXcmpQueueCall extends Enum {158 readonly isServiceOverweight: boolean;159 readonly asServiceOverweight: {160 readonly index: u64;161 readonly weightLimit: u64;162 } & Struct;163 readonly isSuspendXcmExecution: boolean;164 readonly isResumeXcmExecution: boolean;165 readonly isUpdateSuspendThreshold: boolean;166 readonly asUpdateSuspendThreshold: {167 readonly new_: u32;168 } & Struct;169 readonly isUpdateDropThreshold: boolean;170 readonly asUpdateDropThreshold: {171 readonly new_: u32;172 } & Struct;173 readonly isUpdateResumeThreshold: boolean;174 readonly asUpdateResumeThreshold: {175 readonly new_: u32;176 } & Struct;177 readonly isUpdateThresholdWeight: boolean;178 readonly asUpdateThresholdWeight: {179 readonly new_: u64;180 } & Struct;181 readonly isUpdateWeightRestrictDecay: boolean;182 readonly asUpdateWeightRestrictDecay: {183 readonly new_: u64;184 } & Struct;185 readonly isUpdateXcmpMaxIndividualWeight: boolean;186 readonly asUpdateXcmpMaxIndividualWeight: {187 readonly new_: u64;188 } & Struct;189 readonly type: 'ServiceOverweight' | 'SuspendXcmExecution' | 'ResumeXcmExecution' | 'UpdateSuspendThreshold' | 'UpdateDropThreshold' | 'UpdateResumeThreshold' | 'UpdateThresholdWeight' | 'UpdateWeightRestrictDecay' | 'UpdateXcmpMaxIndividualWeight';190}191192/** @name CumulusPalletXcmpQueueError */193export interface CumulusPalletXcmpQueueError extends Enum {194 readonly isFailedToSend: boolean;195 readonly isBadXcmOrigin: boolean;196 readonly isBadXcm: boolean;197 readonly isBadOverweightIndex: boolean;198 readonly isWeightOverLimit: boolean;199 readonly type: 'FailedToSend' | 'BadXcmOrigin' | 'BadXcm' | 'BadOverweightIndex' | 'WeightOverLimit';200}201202/** @name CumulusPalletXcmpQueueEvent */203export interface CumulusPalletXcmpQueueEvent extends Enum {204 readonly isSuccess: boolean;205 readonly asSuccess: {206 readonly messageHash: Option<H256>;207 readonly weight: SpWeightsWeightV2Weight;208 } & Struct;209 readonly isFail: boolean;210 readonly asFail: {211 readonly messageHash: Option<H256>;212 readonly error: XcmV2TraitsError;213 readonly weight: SpWeightsWeightV2Weight;214 } & Struct;215 readonly isBadVersion: boolean;216 readonly asBadVersion: {217 readonly messageHash: Option<H256>;218 } & Struct;219 readonly isBadFormat: boolean;220 readonly asBadFormat: {221 readonly messageHash: Option<H256>;222 } & Struct;223 readonly isUpwardMessageSent: boolean;224 readonly asUpwardMessageSent: {225 readonly messageHash: Option<H256>;226 } & Struct;227 readonly isXcmpMessageSent: boolean;228 readonly asXcmpMessageSent: {229 readonly messageHash: Option<H256>;230 } & Struct;231 readonly isOverweightEnqueued: boolean;232 readonly asOverweightEnqueued: {233 readonly sender: u32;234 readonly sentAt: u32;235 readonly index: u64;236 readonly required: SpWeightsWeightV2Weight;237 } & Struct;238 readonly isOverweightServiced: boolean;239 readonly asOverweightServiced: {240 readonly index: u64;241 readonly used: SpWeightsWeightV2Weight;242 } & Struct;243 readonly type: 'Success' | 'Fail' | 'BadVersion' | 'BadFormat' | 'UpwardMessageSent' | 'XcmpMessageSent' | 'OverweightEnqueued' | 'OverweightServiced';244}245246/** @name CumulusPalletXcmpQueueInboundChannelDetails */247export interface CumulusPalletXcmpQueueInboundChannelDetails extends Struct {248 readonly sender: u32;249 readonly state: CumulusPalletXcmpQueueInboundState;250 readonly messageMetadata: Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>;251}252253/** @name CumulusPalletXcmpQueueInboundState */254export interface CumulusPalletXcmpQueueInboundState extends Enum {255 readonly isOk: boolean;256 readonly isSuspended: boolean;257 readonly type: 'Ok' | 'Suspended';258}259260/** @name CumulusPalletXcmpQueueOutboundChannelDetails */261export interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct {262 readonly recipient: u32;263 readonly state: CumulusPalletXcmpQueueOutboundState;264 readonly signalsExist: bool;265 readonly firstIndex: u16;266 readonly lastIndex: u16;267}268269/** @name CumulusPalletXcmpQueueOutboundState */270export interface CumulusPalletXcmpQueueOutboundState extends Enum {271 readonly isOk: boolean;272 readonly isSuspended: boolean;273 readonly type: 'Ok' | 'Suspended';274}275276/** @name CumulusPalletXcmpQueueQueueConfigData */277export interface CumulusPalletXcmpQueueQueueConfigData extends Struct {278 readonly suspendThreshold: u32;279 readonly dropThreshold: u32;280 readonly resumeThreshold: u32;281 readonly thresholdWeight: SpWeightsWeightV2Weight;282 readonly weightRestrictDecay: SpWeightsWeightV2Weight;283 readonly xcmpMaxIndividualWeight: SpWeightsWeightV2Weight;284}285286/** @name CumulusPrimitivesParachainInherentParachainInherentData */287export interface CumulusPrimitivesParachainInherentParachainInherentData extends Struct {288 readonly validationData: PolkadotPrimitivesV2PersistedValidationData;289 readonly relayChainState: SpTrieStorageProof;290 readonly downwardMessages: Vec<PolkadotCorePrimitivesInboundDownwardMessage>;291 readonly horizontalMessages: BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>;292}293294/** @name EthbloomBloom */295export interface EthbloomBloom extends U8aFixed {}296297/** @name EthereumBlock */298export interface EthereumBlock extends Struct {299 readonly header: EthereumHeader;300 readonly transactions: Vec<EthereumTransactionTransactionV2>;301 readonly ommers: Vec<EthereumHeader>;302}303304/** @name EthereumHeader */305export interface EthereumHeader extends Struct {306 readonly parentHash: H256;307 readonly ommersHash: H256;308 readonly beneficiary: H160;309 readonly stateRoot: H256;310 readonly transactionsRoot: H256;311 readonly receiptsRoot: H256;312 readonly logsBloom: EthbloomBloom;313 readonly difficulty: U256;314 readonly number: U256;315 readonly gasLimit: U256;316 readonly gasUsed: U256;317 readonly timestamp: u64;318 readonly extraData: Bytes;319 readonly mixHash: H256;320 readonly nonce: EthereumTypesHashH64;321}322323/** @name EthereumLog */324export interface EthereumLog extends Struct {325 readonly address: H160;326 readonly topics: Vec<H256>;327 readonly data: Bytes;328}329330/** @name EthereumReceiptEip658ReceiptData */331export interface EthereumReceiptEip658ReceiptData extends Struct {332 readonly statusCode: u8;333 readonly usedGas: U256;334 readonly logsBloom: EthbloomBloom;335 readonly logs: Vec<EthereumLog>;336}337338/** @name EthereumReceiptReceiptV3 */339export interface EthereumReceiptReceiptV3 extends Enum {340 readonly isLegacy: boolean;341 readonly asLegacy: EthereumReceiptEip658ReceiptData;342 readonly isEip2930: boolean;343 readonly asEip2930: EthereumReceiptEip658ReceiptData;344 readonly isEip1559: boolean;345 readonly asEip1559: EthereumReceiptEip658ReceiptData;346 readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';347}348349/** @name EthereumTransactionAccessListItem */350export interface EthereumTransactionAccessListItem extends Struct {351 readonly address: H160;352 readonly storageKeys: Vec<H256>;353}354355/** @name EthereumTransactionEip1559Transaction */356export interface EthereumTransactionEip1559Transaction extends Struct {357 readonly chainId: u64;358 readonly nonce: U256;359 readonly maxPriorityFeePerGas: U256;360 readonly maxFeePerGas: U256;361 readonly gasLimit: U256;362 readonly action: EthereumTransactionTransactionAction;363 readonly value: U256;364 readonly input: Bytes;365 readonly accessList: Vec<EthereumTransactionAccessListItem>;366 readonly oddYParity: bool;367 readonly r: H256;368 readonly s: H256;369}370371/** @name EthereumTransactionEip2930Transaction */372export interface EthereumTransactionEip2930Transaction extends Struct {373 readonly chainId: u64;374 readonly nonce: U256;375 readonly gasPrice: U256;376 readonly gasLimit: U256;377 readonly action: EthereumTransactionTransactionAction;378 readonly value: U256;379 readonly input: Bytes;380 readonly accessList: Vec<EthereumTransactionAccessListItem>;381 readonly oddYParity: bool;382 readonly r: H256;383 readonly s: H256;384}385386/** @name EthereumTransactionLegacyTransaction */387export interface EthereumTransactionLegacyTransaction extends Struct {388 readonly nonce: U256;389 readonly gasPrice: U256;390 readonly gasLimit: U256;391 readonly action: EthereumTransactionTransactionAction;392 readonly value: U256;393 readonly input: Bytes;394 readonly signature: EthereumTransactionTransactionSignature;395}396397/** @name EthereumTransactionTransactionAction */398export interface EthereumTransactionTransactionAction extends Enum {399 readonly isCall: boolean;400 readonly asCall: H160;401 readonly isCreate: boolean;402 readonly type: 'Call' | 'Create';403}404405/** @name EthereumTransactionTransactionSignature */406export interface EthereumTransactionTransactionSignature extends Struct {407 readonly v: u64;408 readonly r: H256;409 readonly s: H256;410}411412/** @name EthereumTransactionTransactionV2 */413export interface EthereumTransactionTransactionV2 extends Enum {414 readonly isLegacy: boolean;415 readonly asLegacy: EthereumTransactionLegacyTransaction;416 readonly isEip2930: boolean;417 readonly asEip2930: EthereumTransactionEip2930Transaction;418 readonly isEip1559: boolean;419 readonly asEip1559: EthereumTransactionEip1559Transaction;420 readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';421}422423/** @name EthereumTypesHashH64 */424export interface EthereumTypesHashH64 extends U8aFixed {}425426/** @name EvmCoreErrorExitError */427export interface EvmCoreErrorExitError extends Enum {428 readonly isStackUnderflow: boolean;429 readonly isStackOverflow: boolean;430 readonly isInvalidJump: boolean;431 readonly isInvalidRange: boolean;432 readonly isDesignatedInvalid: boolean;433 readonly isCallTooDeep: boolean;434 readonly isCreateCollision: boolean;435 readonly isCreateContractLimit: boolean;436 readonly isOutOfOffset: boolean;437 readonly isOutOfGas: boolean;438 readonly isOutOfFund: boolean;439 readonly isPcUnderflow: boolean;440 readonly isCreateEmpty: boolean;441 readonly isOther: boolean;442 readonly asOther: Text;443 readonly isInvalidCode: boolean;444 readonly type: 'StackUnderflow' | 'StackOverflow' | 'InvalidJump' | 'InvalidRange' | 'DesignatedInvalid' | 'CallTooDeep' | 'CreateCollision' | 'CreateContractLimit' | 'OutOfOffset' | 'OutOfGas' | 'OutOfFund' | 'PcUnderflow' | 'CreateEmpty' | 'Other' | 'InvalidCode';445}446447/** @name EvmCoreErrorExitFatal */448export interface EvmCoreErrorExitFatal extends Enum {449 readonly isNotSupported: boolean;450 readonly isUnhandledInterrupt: boolean;451 readonly isCallErrorAsFatal: boolean;452 readonly asCallErrorAsFatal: EvmCoreErrorExitError;453 readonly isOther: boolean;454 readonly asOther: Text;455 readonly type: 'NotSupported' | 'UnhandledInterrupt' | 'CallErrorAsFatal' | 'Other';456}457458/** @name EvmCoreErrorExitReason */459export interface EvmCoreErrorExitReason extends Enum {460 readonly isSucceed: boolean;461 readonly asSucceed: EvmCoreErrorExitSucceed;462 readonly isError: boolean;463 readonly asError: EvmCoreErrorExitError;464 readonly isRevert: boolean;465 readonly asRevert: EvmCoreErrorExitRevert;466 readonly isFatal: boolean;467 readonly asFatal: EvmCoreErrorExitFatal;468 readonly type: 'Succeed' | 'Error' | 'Revert' | 'Fatal';469}470471/** @name EvmCoreErrorExitRevert */472export interface EvmCoreErrorExitRevert extends Enum {473 readonly isReverted: boolean;474 readonly type: 'Reverted';475}476477/** @name EvmCoreErrorExitSucceed */478export interface EvmCoreErrorExitSucceed extends Enum {479 readonly isStopped: boolean;480 readonly isReturned: boolean;481 readonly isSuicided: boolean;482 readonly type: 'Stopped' | 'Returned' | 'Suicided';483}484485/** @name FpRpcTransactionStatus */486export interface FpRpcTransactionStatus extends Struct {487 readonly transactionHash: H256;488 readonly transactionIndex: u32;489 readonly from: H160;490 readonly to: Option<H160>;491 readonly contractAddress: Option<H160>;492 readonly logs: Vec<EthereumLog>;493 readonly logsBloom: EthbloomBloom;494}495496/** @name FrameSupportDispatchDispatchClass */497export interface FrameSupportDispatchDispatchClass extends Enum {498 readonly isNormal: boolean;499 readonly isOperational: boolean;500 readonly isMandatory: boolean;501 readonly type: 'Normal' | 'Operational' | 'Mandatory';502}503504/** @name FrameSupportDispatchDispatchInfo */505export interface FrameSupportDispatchDispatchInfo extends Struct {506 readonly weight: SpWeightsWeightV2Weight;507 readonly class: FrameSupportDispatchDispatchClass;508 readonly paysFee: FrameSupportDispatchPays;509}510511/** @name FrameSupportDispatchPays */512export interface FrameSupportDispatchPays extends Enum {513 readonly isYes: boolean;514 readonly isNo: boolean;515 readonly type: 'Yes' | 'No';516}517518/** @name FrameSupportDispatchPerDispatchClassU32 */519export interface FrameSupportDispatchPerDispatchClassU32 extends Struct {520 readonly normal: u32;521 readonly operational: u32;522 readonly mandatory: u32;523}524525/** @name FrameSupportDispatchPerDispatchClassWeight */526export interface FrameSupportDispatchPerDispatchClassWeight extends Struct {527 readonly normal: SpWeightsWeightV2Weight;528 readonly operational: SpWeightsWeightV2Weight;529 readonly mandatory: SpWeightsWeightV2Weight;530}531532/** @name FrameSupportDispatchPerDispatchClassWeightsPerClass */533export interface FrameSupportDispatchPerDispatchClassWeightsPerClass extends Struct {534 readonly normal: FrameSystemLimitsWeightsPerClass;535 readonly operational: FrameSystemLimitsWeightsPerClass;536 readonly mandatory: FrameSystemLimitsWeightsPerClass;537}538539/** @name FrameSupportPalletId */540export interface FrameSupportPalletId extends U8aFixed {}541542/** @name FrameSupportTokensMiscBalanceStatus */543export interface FrameSupportTokensMiscBalanceStatus extends Enum {544 readonly isFree: boolean;545 readonly isReserved: boolean;546 readonly type: 'Free' | 'Reserved';547}548549/** @name FrameSystemAccountInfo */550export interface FrameSystemAccountInfo extends Struct {551 readonly nonce: u32;552 readonly consumers: u32;553 readonly providers: u32;554 readonly sufficients: u32;555 readonly data: PalletBalancesAccountData;556}557558/** @name FrameSystemCall */559export interface FrameSystemCall extends Enum {560 readonly isRemark: boolean;561 readonly asRemark: {562 readonly remark: Bytes;563 } & Struct;564 readonly isSetHeapPages: boolean;565 readonly asSetHeapPages: {566 readonly pages: u64;567 } & Struct;568 readonly isSetCode: boolean;569 readonly asSetCode: {570 readonly code: Bytes;571 } & Struct;572 readonly isSetCodeWithoutChecks: boolean;573 readonly asSetCodeWithoutChecks: {574 readonly code: Bytes;575 } & Struct;576 readonly isSetStorage: boolean;577 readonly asSetStorage: {578 readonly items: Vec<ITuple<[Bytes, Bytes]>>;579 } & Struct;580 readonly isKillStorage: boolean;581 readonly asKillStorage: {582 readonly keys_: Vec<Bytes>;583 } & Struct;584 readonly isKillPrefix: boolean;585 readonly asKillPrefix: {586 readonly prefix: Bytes;587 readonly subkeys: u32;588 } & Struct;589 readonly isRemarkWithEvent: boolean;590 readonly asRemarkWithEvent: {591 readonly remark: Bytes;592 } & Struct;593 readonly type: 'Remark' | 'SetHeapPages' | 'SetCode' | 'SetCodeWithoutChecks' | 'SetStorage' | 'KillStorage' | 'KillPrefix' | 'RemarkWithEvent';594}595596/** @name FrameSystemError */597export interface FrameSystemError extends Enum {598 readonly isInvalidSpecName: boolean;599 readonly isSpecVersionNeedsToIncrease: boolean;600 readonly isFailedToExtractRuntimeVersion: boolean;601 readonly isNonDefaultComposite: boolean;602 readonly isNonZeroRefCount: boolean;603 readonly isCallFiltered: boolean;604 readonly type: 'InvalidSpecName' | 'SpecVersionNeedsToIncrease' | 'FailedToExtractRuntimeVersion' | 'NonDefaultComposite' | 'NonZeroRefCount' | 'CallFiltered';605}606607/** @name FrameSystemEvent */608export interface FrameSystemEvent extends Enum {609 readonly isExtrinsicSuccess: boolean;610 readonly asExtrinsicSuccess: {611 readonly dispatchInfo: FrameSupportDispatchDispatchInfo;612 } & Struct;613 readonly isExtrinsicFailed: boolean;614 readonly asExtrinsicFailed: {615 readonly dispatchError: SpRuntimeDispatchError;616 readonly dispatchInfo: FrameSupportDispatchDispatchInfo;617 } & Struct;618 readonly isCodeUpdated: boolean;619 readonly isNewAccount: boolean;620 readonly asNewAccount: {621 readonly account: AccountId32;622 } & Struct;623 readonly isKilledAccount: boolean;624 readonly asKilledAccount: {625 readonly account: AccountId32;626 } & Struct;627 readonly isRemarked: boolean;628 readonly asRemarked: {629 readonly sender: AccountId32;630 readonly hash_: H256;631 } & Struct;632 readonly type: 'ExtrinsicSuccess' | 'ExtrinsicFailed' | 'CodeUpdated' | 'NewAccount' | 'KilledAccount' | 'Remarked';633}634635/** @name FrameSystemEventRecord */636export interface FrameSystemEventRecord extends Struct {637 readonly phase: FrameSystemPhase;638 readonly event: Event;639 readonly topics: Vec<H256>;640}641642/** @name FrameSystemExtensionsCheckGenesis */643export interface FrameSystemExtensionsCheckGenesis extends Null {}644645/** @name FrameSystemExtensionsCheckNonce */646export interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}647648/** @name FrameSystemExtensionsCheckSpecVersion */649export interface FrameSystemExtensionsCheckSpecVersion extends Null {}650651/** @name FrameSystemExtensionsCheckTxVersion */652export interface FrameSystemExtensionsCheckTxVersion extends Null {}653654/** @name FrameSystemExtensionsCheckWeight */655export interface FrameSystemExtensionsCheckWeight extends Null {}656657/** @name FrameSystemLastRuntimeUpgradeInfo */658export interface FrameSystemLastRuntimeUpgradeInfo extends Struct {659 readonly specVersion: Compact<u32>;660 readonly specName: Text;661}662663/** @name FrameSystemLimitsBlockLength */664export interface FrameSystemLimitsBlockLength extends Struct {665 readonly max: FrameSupportDispatchPerDispatchClassU32;666}667668/** @name FrameSystemLimitsBlockWeights */669export interface FrameSystemLimitsBlockWeights extends Struct {670 readonly baseBlock: SpWeightsWeightV2Weight;671 readonly maxBlock: SpWeightsWeightV2Weight;672 readonly perClass: FrameSupportDispatchPerDispatchClassWeightsPerClass;673}674675/** @name FrameSystemLimitsWeightsPerClass */676export interface FrameSystemLimitsWeightsPerClass extends Struct {677 readonly baseExtrinsic: SpWeightsWeightV2Weight;678 readonly maxExtrinsic: Option<SpWeightsWeightV2Weight>;679 readonly maxTotal: Option<SpWeightsWeightV2Weight>;680 readonly reserved: Option<SpWeightsWeightV2Weight>;681}682683/** @name FrameSystemPhase */684export interface FrameSystemPhase extends Enum {685 readonly isApplyExtrinsic: boolean;686 readonly asApplyExtrinsic: u32;687 readonly isFinalization: boolean;688 readonly isInitialization: boolean;689 readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization';690}691692/** @name OpalRuntimeRuntime */693export interface OpalRuntimeRuntime extends Null {}694695/** @name OpalRuntimeRuntimeCommonIdentityDisableIdentityCalls */696export interface OpalRuntimeRuntimeCommonIdentityDisableIdentityCalls extends Null {}697698/** @name OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance */699export interface OpalRuntimeRuntimeCommonMaintenanceCheckMaintenance extends Null {}700701/** @name OrmlTokensAccountData */702export interface OrmlTokensAccountData extends Struct {703 readonly free: u128;704 readonly reserved: u128;705 readonly frozen: u128;706}707708/** @name OrmlTokensBalanceLock */709export interface OrmlTokensBalanceLock extends Struct {710 readonly id: U8aFixed;711 readonly amount: u128;712}713714/** @name OrmlTokensModuleCall */715export interface OrmlTokensModuleCall extends Enum {716 readonly isTransfer: boolean;717 readonly asTransfer: {718 readonly dest: MultiAddress;719 readonly currencyId: PalletForeignAssetsAssetIds;720 readonly amount: Compact<u128>;721 } & Struct;722 readonly isTransferAll: boolean;723 readonly asTransferAll: {724 readonly dest: MultiAddress;725 readonly currencyId: PalletForeignAssetsAssetIds;726 readonly keepAlive: bool;727 } & Struct;728 readonly isTransferKeepAlive: boolean;729 readonly asTransferKeepAlive: {730 readonly dest: MultiAddress;731 readonly currencyId: PalletForeignAssetsAssetIds;732 readonly amount: Compact<u128>;733 } & Struct;734 readonly isForceTransfer: boolean;735 readonly asForceTransfer: {736 readonly source: MultiAddress;737 readonly dest: MultiAddress;738 readonly currencyId: PalletForeignAssetsAssetIds;739 readonly amount: Compact<u128>;740 } & Struct;741 readonly isSetBalance: boolean;742 readonly asSetBalance: {743 readonly who: MultiAddress;744 readonly currencyId: PalletForeignAssetsAssetIds;745 readonly newFree: Compact<u128>;746 readonly newReserved: Compact<u128>;747 } & Struct;748 readonly type: 'Transfer' | 'TransferAll' | 'TransferKeepAlive' | 'ForceTransfer' | 'SetBalance';749}750751/** @name OrmlTokensModuleError */752export interface OrmlTokensModuleError extends Enum {753 readonly isBalanceTooLow: boolean;754 readonly isAmountIntoBalanceFailed: boolean;755 readonly isLiquidityRestrictions: boolean;756 readonly isMaxLocksExceeded: boolean;757 readonly isKeepAlive: boolean;758 readonly isExistentialDeposit: boolean;759 readonly isDeadAccount: boolean;760 readonly isTooManyReserves: boolean;761 readonly type: 'BalanceTooLow' | 'AmountIntoBalanceFailed' | 'LiquidityRestrictions' | 'MaxLocksExceeded' | 'KeepAlive' | 'ExistentialDeposit' | 'DeadAccount' | 'TooManyReserves';762}763764/** @name OrmlTokensModuleEvent */765export interface OrmlTokensModuleEvent extends Enum {766 readonly isEndowed: boolean;767 readonly asEndowed: {768 readonly currencyId: PalletForeignAssetsAssetIds;769 readonly who: AccountId32;770 readonly amount: u128;771 } & Struct;772 readonly isDustLost: boolean;773 readonly asDustLost: {774 readonly currencyId: PalletForeignAssetsAssetIds;775 readonly who: AccountId32;776 readonly amount: u128;777 } & Struct;778 readonly isTransfer: boolean;779 readonly asTransfer: {780 readonly currencyId: PalletForeignAssetsAssetIds;781 readonly from: AccountId32;782 readonly to: AccountId32;783 readonly amount: u128;784 } & Struct;785 readonly isReserved: boolean;786 readonly asReserved: {787 readonly currencyId: PalletForeignAssetsAssetIds;788 readonly who: AccountId32;789 readonly amount: u128;790 } & Struct;791 readonly isUnreserved: boolean;792 readonly asUnreserved: {793 readonly currencyId: PalletForeignAssetsAssetIds;794 readonly who: AccountId32;795 readonly amount: u128;796 } & Struct;797 readonly isReserveRepatriated: boolean;798 readonly asReserveRepatriated: {799 readonly currencyId: PalletForeignAssetsAssetIds;800 readonly from: AccountId32;801 readonly to: AccountId32;802 readonly amount: u128;803 readonly status: FrameSupportTokensMiscBalanceStatus;804 } & Struct;805 readonly isBalanceSet: boolean;806 readonly asBalanceSet: {807 readonly currencyId: PalletForeignAssetsAssetIds;808 readonly who: AccountId32;809 readonly free: u128;810 readonly reserved: u128;811 } & Struct;812 readonly isTotalIssuanceSet: boolean;813 readonly asTotalIssuanceSet: {814 readonly currencyId: PalletForeignAssetsAssetIds;815 readonly amount: u128;816 } & Struct;817 readonly isWithdrawn: boolean;818 readonly asWithdrawn: {819 readonly currencyId: PalletForeignAssetsAssetIds;820 readonly who: AccountId32;821 readonly amount: u128;822 } & Struct;823 readonly isSlashed: boolean;824 readonly asSlashed: {825 readonly currencyId: PalletForeignAssetsAssetIds;826 readonly who: AccountId32;827 readonly freeAmount: u128;828 readonly reservedAmount: u128;829 } & Struct;830 readonly isDeposited: boolean;831 readonly asDeposited: {832 readonly currencyId: PalletForeignAssetsAssetIds;833 readonly who: AccountId32;834 readonly amount: u128;835 } & Struct;836 readonly isLockSet: boolean;837 readonly asLockSet: {838 readonly lockId: U8aFixed;839 readonly currencyId: PalletForeignAssetsAssetIds;840 readonly who: AccountId32;841 readonly amount: u128;842 } & Struct;843 readonly isLockRemoved: boolean;844 readonly asLockRemoved: {845 readonly lockId: U8aFixed;846 readonly currencyId: PalletForeignAssetsAssetIds;847 readonly who: AccountId32;848 } & Struct;849 readonly type: 'Endowed' | 'DustLost' | 'Transfer' | 'Reserved' | 'Unreserved' | 'ReserveRepatriated' | 'BalanceSet' | 'TotalIssuanceSet' | 'Withdrawn' | 'Slashed' | 'Deposited' | 'LockSet' | 'LockRemoved';850}851852/** @name OrmlTokensReserveData */853export interface OrmlTokensReserveData extends Struct {854 readonly id: Null;855 readonly amount: u128;856}857858/** @name OrmlVestingModuleCall */859export interface OrmlVestingModuleCall extends Enum {860 readonly isClaim: boolean;861 readonly isVestedTransfer: boolean;862 readonly asVestedTransfer: {863 readonly dest: MultiAddress;864 readonly schedule: OrmlVestingVestingSchedule;865 } & Struct;866 readonly isUpdateVestingSchedules: boolean;867 readonly asUpdateVestingSchedules: {868 readonly who: MultiAddress;869 readonly vestingSchedules: Vec<OrmlVestingVestingSchedule>;870 } & Struct;871 readonly isClaimFor: boolean;872 readonly asClaimFor: {873 readonly dest: MultiAddress;874 } & Struct;875 readonly type: 'Claim' | 'VestedTransfer' | 'UpdateVestingSchedules' | 'ClaimFor';876}877878/** @name OrmlVestingModuleError */879export interface OrmlVestingModuleError extends Enum {880 readonly isZeroVestingPeriod: boolean;881 readonly isZeroVestingPeriodCount: boolean;882 readonly isInsufficientBalanceToLock: boolean;883 readonly isTooManyVestingSchedules: boolean;884 readonly isAmountLow: boolean;885 readonly isMaxVestingSchedulesExceeded: boolean;886 readonly type: 'ZeroVestingPeriod' | 'ZeroVestingPeriodCount' | 'InsufficientBalanceToLock' | 'TooManyVestingSchedules' | 'AmountLow' | 'MaxVestingSchedulesExceeded';887}888889/** @name OrmlVestingModuleEvent */890export interface OrmlVestingModuleEvent extends Enum {891 readonly isVestingScheduleAdded: boolean;892 readonly asVestingScheduleAdded: {893 readonly from: AccountId32;894 readonly to: AccountId32;895 readonly vestingSchedule: OrmlVestingVestingSchedule;896 } & Struct;897 readonly isClaimed: boolean;898 readonly asClaimed: {899 readonly who: AccountId32;900 readonly amount: u128;901 } & Struct;902 readonly isVestingSchedulesUpdated: boolean;903 readonly asVestingSchedulesUpdated: {904 readonly who: AccountId32;905 } & Struct;906 readonly type: 'VestingScheduleAdded' | 'Claimed' | 'VestingSchedulesUpdated';907}908909/** @name OrmlVestingVestingSchedule */910export interface OrmlVestingVestingSchedule extends Struct {911 readonly start: u32;912 readonly period: u32;913 readonly periodCount: u32;914 readonly perPeriod: Compact<u128>;915}916917/** @name OrmlXtokensModuleCall */918export interface OrmlXtokensModuleCall extends Enum {919 readonly isTransfer: boolean;920 readonly asTransfer: {921 readonly currencyId: PalletForeignAssetsAssetIds;922 readonly amount: u128;923 readonly dest: XcmVersionedMultiLocation;924 readonly destWeightLimit: XcmV2WeightLimit;925 } & Struct;926 readonly isTransferMultiasset: boolean;927 readonly asTransferMultiasset: {928 readonly asset: XcmVersionedMultiAsset;929 readonly dest: XcmVersionedMultiLocation;930 readonly destWeightLimit: XcmV2WeightLimit;931 } & Struct;932 readonly isTransferWithFee: boolean;933 readonly asTransferWithFee: {934 readonly currencyId: PalletForeignAssetsAssetIds;935 readonly amount: u128;936 readonly fee: u128;937 readonly dest: XcmVersionedMultiLocation;938 readonly destWeightLimit: XcmV2WeightLimit;939 } & Struct;940 readonly isTransferMultiassetWithFee: boolean;941 readonly asTransferMultiassetWithFee: {942 readonly asset: XcmVersionedMultiAsset;943 readonly fee: XcmVersionedMultiAsset;944 readonly dest: XcmVersionedMultiLocation;945 readonly destWeightLimit: XcmV2WeightLimit;946 } & Struct;947 readonly isTransferMulticurrencies: boolean;948 readonly asTransferMulticurrencies: {949 readonly currencies: Vec<ITuple<[PalletForeignAssetsAssetIds, u128]>>;950 readonly feeItem: u32;951 readonly dest: XcmVersionedMultiLocation;952 readonly destWeightLimit: XcmV2WeightLimit;953 } & Struct;954 readonly isTransferMultiassets: boolean;955 readonly asTransferMultiassets: {956 readonly assets: XcmVersionedMultiAssets;957 readonly feeItem: u32;958 readonly dest: XcmVersionedMultiLocation;959 readonly destWeightLimit: XcmV2WeightLimit;960 } & Struct;961 readonly type: 'Transfer' | 'TransferMultiasset' | 'TransferWithFee' | 'TransferMultiassetWithFee' | 'TransferMulticurrencies' | 'TransferMultiassets';962}963964/** @name OrmlXtokensModuleError */965export interface OrmlXtokensModuleError extends Enum {966 readonly isAssetHasNoReserve: boolean;967 readonly isNotCrossChainTransfer: boolean;968 readonly isInvalidDest: boolean;969 readonly isNotCrossChainTransferableCurrency: boolean;970 readonly isUnweighableMessage: boolean;971 readonly isXcmExecutionFailed: boolean;972 readonly isCannotReanchor: boolean;973 readonly isInvalidAncestry: boolean;974 readonly isInvalidAsset: boolean;975 readonly isDestinationNotInvertible: boolean;976 readonly isBadVersion: boolean;977 readonly isDistinctReserveForAssetAndFee: boolean;978 readonly isZeroFee: boolean;979 readonly isZeroAmount: boolean;980 readonly isTooManyAssetsBeingSent: boolean;981 readonly isAssetIndexNonExistent: boolean;982 readonly isFeeNotEnough: boolean;983 readonly isNotSupportedMultiLocation: boolean;984 readonly isMinXcmFeeNotDefined: boolean;985 readonly type: 'AssetHasNoReserve' | 'NotCrossChainTransfer' | 'InvalidDest' | 'NotCrossChainTransferableCurrency' | 'UnweighableMessage' | 'XcmExecutionFailed' | 'CannotReanchor' | 'InvalidAncestry' | 'InvalidAsset' | 'DestinationNotInvertible' | 'BadVersion' | 'DistinctReserveForAssetAndFee' | 'ZeroFee' | 'ZeroAmount' | 'TooManyAssetsBeingSent' | 'AssetIndexNonExistent' | 'FeeNotEnough' | 'NotSupportedMultiLocation' | 'MinXcmFeeNotDefined';986}987988/** @name OrmlXtokensModuleEvent */989export interface OrmlXtokensModuleEvent extends Enum {990 readonly isTransferredMultiAssets: boolean;991 readonly asTransferredMultiAssets: {992 readonly sender: AccountId32;993 readonly assets: XcmV1MultiassetMultiAssets;994 readonly fee: XcmV1MultiAsset;995 readonly dest: XcmV1MultiLocation;996 } & Struct;997 readonly type: 'TransferredMultiAssets';998}9991000/** @name PalletAppPromotionCall */1001export interface PalletAppPromotionCall extends Enum {1002 readonly isSetAdminAddress: boolean;1003 readonly asSetAdminAddress: {1004 readonly admin: PalletEvmAccountBasicCrossAccountIdRepr;1005 } & Struct;1006 readonly isStake: boolean;1007 readonly asStake: {1008 readonly amount: u128;1009 } & Struct;1010 readonly isUnstake: boolean;1011 readonly isSponsorCollection: boolean;1012 readonly asSponsorCollection: {1013 readonly collectionId: u32;1014 } & Struct;1015 readonly isStopSponsoringCollection: boolean;1016 readonly asStopSponsoringCollection: {1017 readonly collectionId: u32;1018 } & Struct;1019 readonly isSponsorContract: boolean;1020 readonly asSponsorContract: {1021 readonly contractId: H160;1022 } & Struct;1023 readonly isStopSponsoringContract: boolean;1024 readonly asStopSponsoringContract: {1025 readonly contractId: H160;1026 } & Struct;1027 readonly isPayoutStakers: boolean;1028 readonly asPayoutStakers: {1029 readonly stakersNumber: Option<u8>;1030 } & Struct;1031 readonly type: 'SetAdminAddress' | 'Stake' | 'Unstake' | 'SponsorCollection' | 'StopSponsoringCollection' | 'SponsorContract' | 'StopSponsoringContract' | 'PayoutStakers';1032}10331034/** @name PalletAppPromotionError */1035export interface PalletAppPromotionError extends Enum {1036 readonly isAdminNotSet: boolean;1037 readonly isNoPermission: boolean;1038 readonly isNotSufficientFunds: boolean;1039 readonly isPendingForBlockOverflow: boolean;1040 readonly isSponsorNotSet: boolean;1041 readonly isIncorrectLockedBalanceOperation: boolean;1042 readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFunds' | 'PendingForBlockOverflow' | 'SponsorNotSet' | 'IncorrectLockedBalanceOperation';1043}10441045/** @name PalletAppPromotionEvent */1046export interface PalletAppPromotionEvent extends Enum {1047 readonly isStakingRecalculation: boolean;1048 readonly asStakingRecalculation: ITuple<[AccountId32, u128, u128]>;1049 readonly isStake: boolean;1050 readonly asStake: ITuple<[AccountId32, u128]>;1051 readonly isUnstake: boolean;1052 readonly asUnstake: ITuple<[AccountId32, u128]>;1053 readonly isSetAdmin: boolean;1054 readonly asSetAdmin: AccountId32;1055 readonly type: 'StakingRecalculation' | 'Stake' | 'Unstake' | 'SetAdmin';1056}10571058/** @name PalletBalancesAccountData */1059export interface PalletBalancesAccountData extends Struct {1060 readonly free: u128;1061 readonly reserved: u128;1062 readonly miscFrozen: u128;1063 readonly feeFrozen: u128;1064}10651066/** @name PalletBalancesBalanceLock */1067export interface PalletBalancesBalanceLock extends Struct {1068 readonly id: U8aFixed;1069 readonly amount: u128;1070 readonly reasons: PalletBalancesReasons;1071}10721073/** @name PalletBalancesCall */1074export interface PalletBalancesCall extends Enum {1075 readonly isTransfer: boolean;1076 readonly asTransfer: {1077 readonly dest: MultiAddress;1078 readonly value: Compact<u128>;1079 } & Struct;1080 readonly isSetBalance: boolean;1081 readonly asSetBalance: {1082 readonly who: MultiAddress;1083 readonly newFree: Compact<u128>;1084 readonly newReserved: Compact<u128>;1085 } & Struct;1086 readonly isForceTransfer: boolean;1087 readonly asForceTransfer: {1088 readonly source: MultiAddress;1089 readonly dest: MultiAddress;1090 readonly value: Compact<u128>;1091 } & Struct;1092 readonly isTransferKeepAlive: boolean;1093 readonly asTransferKeepAlive: {1094 readonly dest: MultiAddress;1095 readonly value: Compact<u128>;1096 } & Struct;1097 readonly isTransferAll: boolean;1098 readonly asTransferAll: {1099 readonly dest: MultiAddress;1100 readonly keepAlive: bool;1101 } & Struct;1102 readonly isForceUnreserve: boolean;1103 readonly asForceUnreserve: {1104 readonly who: MultiAddress;1105 readonly amount: u128;1106 } & Struct;1107 readonly type: 'Transfer' | 'SetBalance' | 'ForceTransfer' | 'TransferKeepAlive' | 'TransferAll' | 'ForceUnreserve';1108}11091110/** @name PalletBalancesError */1111export interface PalletBalancesError extends Enum {1112 readonly isVestingBalance: boolean;1113 readonly isLiquidityRestrictions: boolean;1114 readonly isInsufficientBalance: boolean;1115 readonly isExistentialDeposit: boolean;1116 readonly isKeepAlive: boolean;1117 readonly isExistingVestingSchedule: boolean;1118 readonly isDeadAccount: boolean;1119 readonly isTooManyReserves: boolean;1120 readonly type: 'VestingBalance' | 'LiquidityRestrictions' | 'InsufficientBalance' | 'ExistentialDeposit' | 'KeepAlive' | 'ExistingVestingSchedule' | 'DeadAccount' | 'TooManyReserves';1121}11221123/** @name PalletBalancesEvent */1124export interface PalletBalancesEvent extends Enum {1125 readonly isEndowed: boolean;1126 readonly asEndowed: {1127 readonly account: AccountId32;1128 readonly freeBalance: u128;1129 } & Struct;1130 readonly isDustLost: boolean;1131 readonly asDustLost: {1132 readonly account: AccountId32;1133 readonly amount: u128;1134 } & Struct;1135 readonly isTransfer: boolean;1136 readonly asTransfer: {1137 readonly from: AccountId32;1138 readonly to: AccountId32;1139 readonly amount: u128;1140 } & Struct;1141 readonly isBalanceSet: boolean;1142 readonly asBalanceSet: {1143 readonly who: AccountId32;1144 readonly free: u128;1145 readonly reserved: u128;1146 } & Struct;1147 readonly isReserved: boolean;1148 readonly asReserved: {1149 readonly who: AccountId32;1150 readonly amount: u128;1151 } & Struct;1152 readonly isUnreserved: boolean;1153 readonly asUnreserved: {1154 readonly who: AccountId32;1155 readonly amount: u128;1156 } & Struct;1157 readonly isReserveRepatriated: boolean;1158 readonly asReserveRepatriated: {1159 readonly from: AccountId32;1160 readonly to: AccountId32;1161 readonly amount: u128;1162 readonly destinationStatus: FrameSupportTokensMiscBalanceStatus;1163 } & Struct;1164 readonly isDeposit: boolean;1165 readonly asDeposit: {1166 readonly who: AccountId32;1167 readonly amount: u128;1168 } & Struct;1169 readonly isWithdraw: boolean;1170 readonly asWithdraw: {1171 readonly who: AccountId32;1172 readonly amount: u128;1173 } & Struct;1174 readonly isSlashed: boolean;1175 readonly asSlashed: {1176 readonly who: AccountId32;1177 readonly amount: u128;1178 } & Struct;1179 readonly type: 'Endowed' | 'DustLost' | 'Transfer' | 'BalanceSet' | 'Reserved' | 'Unreserved' | 'ReserveRepatriated' | 'Deposit' | 'Withdraw' | 'Slashed';1180}11811182/** @name PalletBalancesReasons */1183export interface PalletBalancesReasons extends Enum {1184 readonly isFee: boolean;1185 readonly isMisc: boolean;1186 readonly isAll: boolean;1187 readonly type: 'Fee' | 'Misc' | 'All';1188}11891190/** @name PalletBalancesReserveData */1191export interface PalletBalancesReserveData extends Struct {1192 readonly id: U8aFixed;1193 readonly amount: u128;1194}11951196/** @name PalletCommonError */1197export interface PalletCommonError extends Enum {1198 readonly isCollectionNotFound: boolean;1199 readonly isMustBeTokenOwner: boolean;1200 readonly isNoPermission: boolean;1201 readonly isCantDestroyNotEmptyCollection: boolean;1202 readonly isPublicMintingNotAllowed: boolean;1203 readonly isAddressNotInAllowlist: boolean;1204 readonly isCollectionNameLimitExceeded: boolean;1205 readonly isCollectionDescriptionLimitExceeded: boolean;1206 readonly isCollectionTokenPrefixLimitExceeded: boolean;1207 readonly isTotalCollectionsLimitExceeded: boolean;1208 readonly isCollectionAdminCountExceeded: boolean;1209 readonly isCollectionLimitBoundsExceeded: boolean;1210 readonly isOwnerPermissionsCantBeReverted: boolean;1211 readonly isTransferNotAllowed: boolean;1212 readonly isAccountTokenLimitExceeded: boolean;1213 readonly isCollectionTokenLimitExceeded: boolean;1214 readonly isMetadataFlagFrozen: boolean;1215 readonly isTokenNotFound: boolean;1216 readonly isTokenValueTooLow: boolean;1217 readonly isApprovedValueTooLow: boolean;1218 readonly isCantApproveMoreThanOwned: boolean;1219 readonly isAddressIsZero: boolean;1220 readonly isUnsupportedOperation: boolean;1221 readonly isNotSufficientFounds: boolean;1222 readonly isUserIsNotAllowedToNest: boolean;1223 readonly isSourceCollectionIsNotAllowedToNest: boolean;1224 readonly isCollectionFieldSizeExceeded: boolean;1225 readonly isNoSpaceForProperty: boolean;1226 readonly isPropertyLimitReached: boolean;1227 readonly isPropertyKeyIsTooLong: boolean;1228 readonly isInvalidCharacterInPropertyKey: boolean;1229 readonly isEmptyPropertyKey: boolean;1230 readonly isCollectionIsExternal: boolean;1231 readonly isCollectionIsInternal: boolean;1232 readonly isConfirmSponsorshipFail: boolean;1233 readonly isUserIsNotCollectionAdmin: boolean;1234 readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'CantDestroyNotEmptyCollection' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'UserIsNotAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey' | 'CollectionIsExternal' | 'CollectionIsInternal' | 'ConfirmSponsorshipFail' | 'UserIsNotCollectionAdmin';1235}12361237/** @name PalletCommonEvent */1238export interface PalletCommonEvent extends Enum {1239 readonly isCollectionCreated: boolean;1240 readonly asCollectionCreated: ITuple<[u32, u8, AccountId32]>;1241 readonly isCollectionDestroyed: boolean;1242 readonly asCollectionDestroyed: u32;1243 readonly isItemCreated: boolean;1244 readonly asItemCreated: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;1245 readonly isItemDestroyed: boolean;1246 readonly asItemDestroyed: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;1247 readonly isTransfer: boolean;1248 readonly asTransfer: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;1249 readonly isApproved: boolean;1250 readonly asApproved: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;1251 readonly isApprovedForAll: boolean;1252 readonly asApprovedForAll: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, bool]>;1253 readonly isCollectionPropertySet: boolean;1254 readonly asCollectionPropertySet: ITuple<[u32, Bytes]>;1255 readonly isCollectionPropertyDeleted: boolean;1256 readonly asCollectionPropertyDeleted: ITuple<[u32, Bytes]>;1257 readonly isTokenPropertySet: boolean;1258 readonly asTokenPropertySet: ITuple<[u32, u32, Bytes]>;1259 readonly isTokenPropertyDeleted: boolean;1260 readonly asTokenPropertyDeleted: ITuple<[u32, u32, Bytes]>;1261 readonly isPropertyPermissionSet: boolean;1262 readonly asPropertyPermissionSet: ITuple<[u32, Bytes]>;1263 readonly isAllowListAddressAdded: boolean;1264 readonly asAllowListAddressAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1265 readonly isAllowListAddressRemoved: boolean;1266 readonly asAllowListAddressRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1267 readonly isCollectionAdminAdded: boolean;1268 readonly asCollectionAdminAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1269 readonly isCollectionAdminRemoved: boolean;1270 readonly asCollectionAdminRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;1271 readonly isCollectionLimitSet: boolean;1272 readonly asCollectionLimitSet: u32;1273 readonly isCollectionOwnerChanged: boolean;1274 readonly asCollectionOwnerChanged: ITuple<[u32, AccountId32]>;1275 readonly isCollectionPermissionSet: boolean;1276 readonly asCollectionPermissionSet: u32;1277 readonly isCollectionSponsorSet: boolean;1278 readonly asCollectionSponsorSet: ITuple<[u32, AccountId32]>;1279 readonly isSponsorshipConfirmed: boolean;1280 readonly asSponsorshipConfirmed: ITuple<[u32, AccountId32]>;1281 readonly isCollectionSponsorRemoved: boolean;1282 readonly asCollectionSponsorRemoved: u32;1283 readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved' | 'ApprovedForAll' | 'CollectionPropertySet' | 'CollectionPropertyDeleted' | 'TokenPropertySet' | 'TokenPropertyDeleted' | 'PropertyPermissionSet' | 'AllowListAddressAdded' | 'AllowListAddressRemoved' | 'CollectionAdminAdded' | 'CollectionAdminRemoved' | 'CollectionLimitSet' | 'CollectionOwnerChanged' | 'CollectionPermissionSet' | 'CollectionSponsorSet' | 'SponsorshipConfirmed' | 'CollectionSponsorRemoved';1284}12851286/** @name PalletConfigurationAppPromotionConfiguration */1287export interface PalletConfigurationAppPromotionConfiguration extends Struct {1288 readonly recalculationInterval: Option<u32>;1289 readonly pendingInterval: Option<u32>;1290 readonly intervalIncome: Option<Perbill>;1291 readonly maxStakersPerCalculation: Option<u8>;1292}12931294/** @name PalletConfigurationCall */1295export interface PalletConfigurationCall extends Enum {1296 readonly isSetWeightToFeeCoefficientOverride: boolean;1297 readonly asSetWeightToFeeCoefficientOverride: {1298 readonly coeff: Option<u64>;1299 } & Struct;1300 readonly isSetMinGasPriceOverride: boolean;1301 readonly asSetMinGasPriceOverride: {1302 readonly coeff: Option<u64>;1303 } & Struct;1304 readonly isSetXcmAllowedLocations: boolean;1305 readonly asSetXcmAllowedLocations: {1306 readonly locations: Option<Vec<XcmV1MultiLocation>>;1307 } & Struct;1308 readonly isSetAppPromotionConfigurationOverride: boolean;1309 readonly asSetAppPromotionConfigurationOverride: {1310 readonly configuration: PalletConfigurationAppPromotionConfiguration;1311 } & Struct;1312 readonly isSetCollatorSelectionDesiredCollators: boolean;1313 readonly asSetCollatorSelectionDesiredCollators: {1314 readonly max: Option<u32>;1315 } & Struct;1316 readonly isSetCollatorSelectionLicenseBond: boolean;1317 readonly asSetCollatorSelectionLicenseBond: {1318 readonly amount: Option<u128>;1319 } & Struct;1320 readonly isSetCollatorSelectionKickThreshold: boolean;1321 readonly asSetCollatorSelectionKickThreshold: {1322 readonly threshold: Option<u32>;1323 } & Struct;1324 readonly type: 'SetWeightToFeeCoefficientOverride' | 'SetMinGasPriceOverride' | 'SetXcmAllowedLocations' | 'SetAppPromotionConfigurationOverride' | 'SetCollatorSelectionDesiredCollators' | 'SetCollatorSelectionLicenseBond' | 'SetCollatorSelectionKickThreshold';1325}13261327/** @name PalletConfigurationError */1328export interface PalletConfigurationError extends Enum {1329 readonly isInconsistentConfiguration: boolean;1330 readonly type: 'InconsistentConfiguration';1331}13321333/** @name PalletConfigurationEvent */1334export interface PalletConfigurationEvent extends Enum {1335 readonly isNewDesiredCollators: boolean;1336 readonly asNewDesiredCollators: {1337 readonly desiredCollators: Option<u32>;1338 } & Struct;1339 readonly isNewCollatorLicenseBond: boolean;1340 readonly asNewCollatorLicenseBond: {1341 readonly bondCost: Option<u128>;1342 } & Struct;1343 readonly isNewCollatorKickThreshold: boolean;1344 readonly asNewCollatorKickThreshold: {1345 readonly lengthInBlocks: Option<u32>;1346 } & Struct;1347 readonly type: 'NewDesiredCollators' | 'NewCollatorLicenseBond' | 'NewCollatorKickThreshold';1348}13491350/** @name PalletEthereumCall */1351export interface PalletEthereumCall extends Enum {1352 readonly isTransact: boolean;1353 readonly asTransact: {1354 readonly transaction: EthereumTransactionTransactionV2;1355 } & Struct;1356 readonly type: 'Transact';1357}13581359/** @name PalletEthereumError */1360export interface PalletEthereumError extends Enum {1361 readonly isInvalidSignature: boolean;1362 readonly isPreLogExists: boolean;1363 readonly type: 'InvalidSignature' | 'PreLogExists';1364}13651366/** @name PalletEthereumEvent */1367export interface PalletEthereumEvent extends Enum {1368 readonly isExecuted: boolean;1369 readonly asExecuted: {1370 readonly from: H160;1371 readonly to: H160;1372 readonly transactionHash: H256;1373 readonly exitReason: EvmCoreErrorExitReason;1374 } & Struct;1375 readonly type: 'Executed';1376}13771378/** @name PalletEthereumFakeTransactionFinalizer */1379export interface PalletEthereumFakeTransactionFinalizer extends Null {}13801381/** @name PalletEvmAccountBasicCrossAccountIdRepr */1382export interface PalletEvmAccountBasicCrossAccountIdRepr extends Enum {1383 readonly isSubstrate: boolean;1384 readonly asSubstrate: AccountId32;1385 readonly isEthereum: boolean;1386 readonly asEthereum: H160;1387 readonly type: 'Substrate' | 'Ethereum';1388}13891390/** @name PalletEvmCall */1391export interface PalletEvmCall extends Enum {1392 readonly isWithdraw: boolean;1393 readonly asWithdraw: {1394 readonly address: H160;1395 readonly value: u128;1396 } & Struct;1397 readonly isCall: boolean;1398 readonly asCall: {1399 readonly source: H160;1400 readonly target: H160;1401 readonly input: Bytes;1402 readonly value: U256;1403 readonly gasLimit: u64;1404 readonly maxFeePerGas: U256;1405 readonly maxPriorityFeePerGas: Option<U256>;1406 readonly nonce: Option<U256>;1407 readonly accessList: Vec<ITuple<[H160, Vec<H256>]>>;1408 } & Struct;1409 readonly isCreate: boolean;1410 readonly asCreate: {1411 readonly source: H160;1412 readonly init: Bytes;1413 readonly value: U256;1414 readonly gasLimit: u64;1415 readonly maxFeePerGas: U256;1416 readonly maxPriorityFeePerGas: Option<U256>;1417 readonly nonce: Option<U256>;1418 readonly accessList: Vec<ITuple<[H160, Vec<H256>]>>;1419 } & Struct;1420 readonly isCreate2: boolean;1421 readonly asCreate2: {1422 readonly source: H160;1423 readonly init: Bytes;1424 readonly salt: H256;1425 readonly value: U256;1426 readonly gasLimit: u64;1427 readonly maxFeePerGas: U256;1428 readonly maxPriorityFeePerGas: Option<U256>;1429 readonly nonce: Option<U256>;1430 readonly accessList: Vec<ITuple<[H160, Vec<H256>]>>;1431 } & Struct;1432 readonly type: 'Withdraw' | 'Call' | 'Create' | 'Create2';1433}14341435/** @name PalletEvmCoderSubstrateError */1436export interface PalletEvmCoderSubstrateError extends Enum {1437 readonly isOutOfGas: boolean;1438 readonly isOutOfFund: boolean;1439 readonly type: 'OutOfGas' | 'OutOfFund';1440}14411442/** @name PalletEvmContractHelpersError */1443export interface PalletEvmContractHelpersError extends Enum {1444 readonly isNoPermission: boolean;1445 readonly isNoPendingSponsor: boolean;1446 readonly isTooManyMethodsHaveSponsoredLimit: boolean;1447 readonly type: 'NoPermission' | 'NoPendingSponsor' | 'TooManyMethodsHaveSponsoredLimit';1448}14491450/** @name PalletEvmContractHelpersEvent */1451export interface PalletEvmContractHelpersEvent extends Enum {1452 readonly isContractSponsorSet: boolean;1453 readonly asContractSponsorSet: ITuple<[H160, AccountId32]>;1454 readonly isContractSponsorshipConfirmed: boolean;1455 readonly asContractSponsorshipConfirmed: ITuple<[H160, AccountId32]>;1456 readonly isContractSponsorRemoved: boolean;1457 readonly asContractSponsorRemoved: H160;1458 readonly type: 'ContractSponsorSet' | 'ContractSponsorshipConfirmed' | 'ContractSponsorRemoved';1459}14601461/** @name PalletEvmContractHelpersSponsoringModeT */1462export interface PalletEvmContractHelpersSponsoringModeT extends Enum {1463 readonly isDisabled: boolean;1464 readonly isAllowlisted: boolean;1465 readonly isGenerous: boolean;1466 readonly type: 'Disabled' | 'Allowlisted' | 'Generous';1467}14681469/** @name PalletEvmError */1470export interface PalletEvmError extends Enum {1471 readonly isBalanceLow: boolean;1472 readonly isFeeOverflow: boolean;1473 readonly isPaymentOverflow: boolean;1474 readonly isWithdrawFailed: boolean;1475 readonly isGasPriceTooLow: boolean;1476 readonly isInvalidNonce: boolean;1477 readonly isGasLimitTooLow: boolean;1478 readonly isGasLimitTooHigh: boolean;1479 readonly isUndefined: boolean;1480 readonly isReentrancy: boolean;1481 readonly isTransactionMustComeFromEOA: boolean;1482 readonly type: 'BalanceLow' | 'FeeOverflow' | 'PaymentOverflow' | 'WithdrawFailed' | 'GasPriceTooLow' | 'InvalidNonce' | 'GasLimitTooLow' | 'GasLimitTooHigh' | 'Undefined' | 'Reentrancy' | 'TransactionMustComeFromEOA';1483}14841485/** @name PalletEvmEvent */1486export interface PalletEvmEvent extends Enum {1487 readonly isLog: boolean;1488 readonly asLog: {1489 readonly log: EthereumLog;1490 } & Struct;1491 readonly isCreated: boolean;1492 readonly asCreated: {1493 readonly address: H160;1494 } & Struct;1495 readonly isCreatedFailed: boolean;1496 readonly asCreatedFailed: {1497 readonly address: H160;1498 } & Struct;1499 readonly isExecuted: boolean;1500 readonly asExecuted: {1501 readonly address: H160;1502 } & Struct;1503 readonly isExecutedFailed: boolean;1504 readonly asExecutedFailed: {1505 readonly address: H160;1506 } & Struct;1507 readonly type: 'Log' | 'Created' | 'CreatedFailed' | 'Executed' | 'ExecutedFailed';1508}15091510/** @name PalletEvmMigrationCall */1511export interface PalletEvmMigrationCall extends Enum {1512 readonly isBegin: boolean;1513 readonly asBegin: {1514 readonly address: H160;1515 } & Struct;1516 readonly isSetData: boolean;1517 readonly asSetData: {1518 readonly address: H160;1519 readonly data: Vec<ITuple<[H256, H256]>>;1520 } & Struct;1521 readonly isFinish: boolean;1522 readonly asFinish: {1523 readonly address: H160;1524 readonly code: Bytes;1525 } & Struct;1526 readonly isInsertEthLogs: boolean;1527 readonly asInsertEthLogs: {1528 readonly logs: Vec<EthereumLog>;1529 } & Struct;1530 readonly isInsertEvents: boolean;1531 readonly asInsertEvents: {1532 readonly events: Vec<Bytes>;1533 } & Struct;1534 readonly type: 'Begin' | 'SetData' | 'Finish' | 'InsertEthLogs' | 'InsertEvents';1535}15361537/** @name PalletEvmMigrationError */1538export interface PalletEvmMigrationError extends Enum {1539 readonly isAccountNotEmpty: boolean;1540 readonly isAccountIsNotMigrating: boolean;1541 readonly isBadEvent: boolean;1542 readonly type: 'AccountNotEmpty' | 'AccountIsNotMigrating' | 'BadEvent';1543}15441545/** @name PalletEvmMigrationEvent */1546export interface PalletEvmMigrationEvent extends Enum {1547 readonly isTestEvent: boolean;1548 readonly type: 'TestEvent';1549}15501551/** @name PalletForeignAssetsAssetIds */1552export interface PalletForeignAssetsAssetIds extends Enum {1553 readonly isForeignAssetId: boolean;1554 readonly asForeignAssetId: u32;1555 readonly isNativeAssetId: boolean;1556 readonly asNativeAssetId: PalletForeignAssetsNativeCurrency;1557 readonly type: 'ForeignAssetId' | 'NativeAssetId';1558}15591560/** @name PalletForeignAssetsModuleAssetMetadata */1561export interface PalletForeignAssetsModuleAssetMetadata extends Struct {1562 readonly name: Bytes;1563 readonly symbol: Bytes;1564 readonly decimals: u8;1565 readonly minimalBalance: u128;1566}15671568/** @name PalletForeignAssetsModuleCall */1569export interface PalletForeignAssetsModuleCall extends Enum {1570 readonly isRegisterForeignAsset: boolean;1571 readonly asRegisterForeignAsset: {1572 readonly owner: AccountId32;1573 readonly location: XcmVersionedMultiLocation;1574 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1575 } & Struct;1576 readonly isUpdateForeignAsset: boolean;1577 readonly asUpdateForeignAsset: {1578 readonly foreignAssetId: u32;1579 readonly location: XcmVersionedMultiLocation;1580 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1581 } & Struct;1582 readonly type: 'RegisterForeignAsset' | 'UpdateForeignAsset';1583}15841585/** @name PalletForeignAssetsModuleError */1586export interface PalletForeignAssetsModuleError extends Enum {1587 readonly isBadLocation: boolean;1588 readonly isMultiLocationExisted: boolean;1589 readonly isAssetIdNotExists: boolean;1590 readonly isAssetIdExisted: boolean;1591 readonly type: 'BadLocation' | 'MultiLocationExisted' | 'AssetIdNotExists' | 'AssetIdExisted';1592}15931594/** @name PalletForeignAssetsModuleEvent */1595export interface PalletForeignAssetsModuleEvent extends Enum {1596 readonly isForeignAssetRegistered: boolean;1597 readonly asForeignAssetRegistered: {1598 readonly assetId: u32;1599 readonly assetAddress: XcmV1MultiLocation;1600 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1601 } & Struct;1602 readonly isForeignAssetUpdated: boolean;1603 readonly asForeignAssetUpdated: {1604 readonly assetId: u32;1605 readonly assetAddress: XcmV1MultiLocation;1606 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1607 } & Struct;1608 readonly isAssetRegistered: boolean;1609 readonly asAssetRegistered: {1610 readonly assetId: PalletForeignAssetsAssetIds;1611 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1612 } & Struct;1613 readonly isAssetUpdated: boolean;1614 readonly asAssetUpdated: {1615 readonly assetId: PalletForeignAssetsAssetIds;1616 readonly metadata: PalletForeignAssetsModuleAssetMetadata;1617 } & Struct;1618 readonly type: 'ForeignAssetRegistered' | 'ForeignAssetUpdated' | 'AssetRegistered' | 'AssetUpdated';1619}16201621/** @name PalletForeignAssetsNativeCurrency */1622export interface PalletForeignAssetsNativeCurrency extends Enum {1623 readonly isHere: boolean;1624 readonly isParent: boolean;1625 readonly type: 'Here' | 'Parent';1626}16271628/** @name PalletFungibleError */1629export interface PalletFungibleError extends Enum {1630 readonly isNotFungibleDataUsedToMintFungibleCollectionToken: boolean;1631 readonly isFungibleItemsHaveNoId: boolean;1632 readonly isFungibleItemsDontHaveData: boolean;1633 readonly isFungibleDisallowsNesting: boolean;1634 readonly isSettingPropertiesNotAllowed: boolean;1635 readonly isSettingAllowanceForAllNotAllowed: boolean;1636 readonly isFungibleTokensAreAlwaysValid: boolean;1637 readonly type: 'NotFungibleDataUsedToMintFungibleCollectionToken' | 'FungibleItemsHaveNoId' | 'FungibleItemsDontHaveData' | 'FungibleDisallowsNesting' | 'SettingPropertiesNotAllowed' | 'SettingAllowanceForAllNotAllowed' | 'FungibleTokensAreAlwaysValid';1638}16391640/** @name PalletInflationCall */1641export interface PalletInflationCall extends Enum {1642 readonly isStartInflation: boolean;1643 readonly asStartInflation: {1644 readonly inflationStartRelayBlock: u32;1645 } & Struct;1646 readonly type: 'StartInflation';1647}16481649/** @name PalletMaintenanceCall */1650export interface PalletMaintenanceCall extends Enum {1651 readonly isEnable: boolean;1652 readonly isDisable: boolean;1653 readonly type: 'Enable' | 'Disable';1654}16551656/** @name PalletMaintenanceError */1657export interface PalletMaintenanceError extends Null {}16581659/** @name PalletMaintenanceEvent */1660export interface PalletMaintenanceEvent extends Enum {1661 readonly isMaintenanceEnabled: boolean;1662 readonly isMaintenanceDisabled: boolean;1663 readonly type: 'MaintenanceEnabled' | 'MaintenanceDisabled';1664}16651666/** @name PalletNonfungibleError */1667export interface PalletNonfungibleError extends Enum {1668 readonly isNotNonfungibleDataUsedToMintFungibleCollectionToken: boolean;1669 readonly isNonfungibleItemsHaveNoAmount: boolean;1670 readonly isCantBurnNftWithChildren: boolean;1671 readonly type: 'NotNonfungibleDataUsedToMintFungibleCollectionToken' | 'NonfungibleItemsHaveNoAmount' | 'CantBurnNftWithChildren';1672}16731674/** @name PalletNonfungibleItemData */1675export interface PalletNonfungibleItemData extends Struct {1676 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;1677}16781679/** @name PalletRefungibleError */1680export interface PalletRefungibleError extends Enum {1681 readonly isNotRefungibleDataUsedToMintFungibleCollectionToken: boolean;1682 readonly isWrongRefungiblePieces: boolean;1683 readonly isRepartitionWhileNotOwningAllPieces: boolean;1684 readonly isRefungibleDisallowsNesting: boolean;1685 readonly isSettingPropertiesNotAllowed: boolean;1686 readonly type: 'NotRefungibleDataUsedToMintFungibleCollectionToken' | 'WrongRefungiblePieces' | 'RepartitionWhileNotOwningAllPieces' | 'RefungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';1687}16881689/** @name PalletRmrkCoreCall */1690export interface PalletRmrkCoreCall extends Enum {1691 readonly isCreateCollection: boolean;1692 readonly asCreateCollection: {1693 readonly metadata: Bytes;1694 readonly max: Option<u32>;1695 readonly symbol: Bytes;1696 } & Struct;1697 readonly isDestroyCollection: boolean;1698 readonly asDestroyCollection: {1699 readonly collectionId: u32;1700 } & Struct;1701 readonly isChangeCollectionIssuer: boolean;1702 readonly asChangeCollectionIssuer: {1703 readonly collectionId: u32;1704 readonly newIssuer: MultiAddress;1705 } & Struct;1706 readonly isLockCollection: boolean;1707 readonly asLockCollection: {1708 readonly collectionId: u32;1709 } & Struct;1710 readonly isMintNft: boolean;1711 readonly asMintNft: {1712 readonly owner: Option<AccountId32>;1713 readonly collectionId: u32;1714 readonly recipient: Option<AccountId32>;1715 readonly royaltyAmount: Option<Permill>;1716 readonly metadata: Bytes;1717 readonly transferable: bool;1718 readonly resources: Option<Vec<RmrkTraitsResourceResourceTypes>>;1719 } & Struct;1720 readonly isBurnNft: boolean;1721 readonly asBurnNft: {1722 readonly collectionId: u32;1723 readonly nftId: u32;1724 readonly maxBurns: u32;1725 } & Struct;1726 readonly isSend: boolean;1727 readonly asSend: {1728 readonly rmrkCollectionId: u32;1729 readonly rmrkNftId: u32;1730 readonly newOwner: RmrkTraitsNftAccountIdOrCollectionNftTuple;1731 } & Struct;1732 readonly isAcceptNft: boolean;1733 readonly asAcceptNft: {1734 readonly rmrkCollectionId: u32;1735 readonly rmrkNftId: u32;1736 readonly newOwner: RmrkTraitsNftAccountIdOrCollectionNftTuple;1737 } & Struct;1738 readonly isRejectNft: boolean;1739 readonly asRejectNft: {1740 readonly rmrkCollectionId: u32;1741 readonly rmrkNftId: u32;1742 } & Struct;1743 readonly isAcceptResource: boolean;1744 readonly asAcceptResource: {1745 readonly rmrkCollectionId: u32;1746 readonly rmrkNftId: u32;1747 readonly resourceId: u32;1748 } & Struct;1749 readonly isAcceptResourceRemoval: boolean;1750 readonly asAcceptResourceRemoval: {1751 readonly rmrkCollectionId: u32;1752 readonly rmrkNftId: u32;1753 readonly resourceId: u32;1754 } & Struct;1755 readonly isSetProperty: boolean;1756 readonly asSetProperty: {1757 readonly rmrkCollectionId: Compact<u32>;1758 readonly maybeNftId: Option<u32>;1759 readonly key: Bytes;1760 readonly value: Bytes;1761 } & Struct;1762 readonly isSetPriority: boolean;1763 readonly asSetPriority: {1764 readonly rmrkCollectionId: u32;1765 readonly rmrkNftId: u32;1766 readonly priorities: Vec<u32>;1767 } & Struct;1768 readonly isAddBasicResource: boolean;1769 readonly asAddBasicResource: {1770 readonly rmrkCollectionId: u32;1771 readonly nftId: u32;1772 readonly resource: RmrkTraitsResourceBasicResource;1773 } & Struct;1774 readonly isAddComposableResource: boolean;1775 readonly asAddComposableResource: {1776 readonly rmrkCollectionId: u32;1777 readonly nftId: u32;1778 readonly resource: RmrkTraitsResourceComposableResource;1779 } & Struct;1780 readonly isAddSlotResource: boolean;1781 readonly asAddSlotResource: {1782 readonly rmrkCollectionId: u32;1783 readonly nftId: u32;1784 readonly resource: RmrkTraitsResourceSlotResource;1785 } & Struct;1786 readonly isRemoveResource: boolean;1787 readonly asRemoveResource: {1788 readonly rmrkCollectionId: u32;1789 readonly nftId: u32;1790 readonly resourceId: u32;1791 } & Struct;1792 readonly type: 'CreateCollection' | 'DestroyCollection' | 'ChangeCollectionIssuer' | 'LockCollection' | 'MintNft' | 'BurnNft' | 'Send' | 'AcceptNft' | 'RejectNft' | 'AcceptResource' | 'AcceptResourceRemoval' | 'SetProperty' | 'SetPriority' | 'AddBasicResource' | 'AddComposableResource' | 'AddSlotResource' | 'RemoveResource';1793}17941795/** @name PalletRmrkCoreError */1796export interface PalletRmrkCoreError extends Enum {1797 readonly isCorruptedCollectionType: boolean;1798 readonly isRmrkPropertyKeyIsTooLong: boolean;1799 readonly isRmrkPropertyValueIsTooLong: boolean;1800 readonly isRmrkPropertyIsNotFound: boolean;1801 readonly isUnableToDecodeRmrkData: boolean;1802 readonly isCollectionNotEmpty: boolean;1803 readonly isNoAvailableCollectionId: boolean;1804 readonly isNoAvailableNftId: boolean;1805 readonly isCollectionUnknown: boolean;1806 readonly isNoPermission: boolean;1807 readonly isNonTransferable: boolean;1808 readonly isCollectionFullOrLocked: boolean;1809 readonly isResourceDoesntExist: boolean;1810 readonly isCannotSendToDescendentOrSelf: boolean;1811 readonly isCannotAcceptNonOwnedNft: boolean;1812 readonly isCannotRejectNonOwnedNft: boolean;1813 readonly isCannotRejectNonPendingNft: boolean;1814 readonly isResourceNotPending: boolean;1815 readonly isNoAvailableResourceId: boolean;1816 readonly type: 'CorruptedCollectionType' | 'RmrkPropertyKeyIsTooLong' | 'RmrkPropertyValueIsTooLong' | 'RmrkPropertyIsNotFound' | 'UnableToDecodeRmrkData' | 'CollectionNotEmpty' | 'NoAvailableCollectionId' | 'NoAvailableNftId' | 'CollectionUnknown' | 'NoPermission' | 'NonTransferable' | 'CollectionFullOrLocked' | 'ResourceDoesntExist' | 'CannotSendToDescendentOrSelf' | 'CannotAcceptNonOwnedNft' | 'CannotRejectNonOwnedNft' | 'CannotRejectNonPendingNft' | 'ResourceNotPending' | 'NoAvailableResourceId';1817}18181819/** @name PalletRmrkCoreEvent */1820export interface PalletRmrkCoreEvent extends Enum {1821 readonly isCollectionCreated: boolean;1822 readonly asCollectionCreated: {1823 readonly issuer: AccountId32;1824 readonly collectionId: u32;1825 } & Struct;1826 readonly isCollectionDestroyed: boolean;1827 readonly asCollectionDestroyed: {1828 readonly issuer: AccountId32;1829 readonly collectionId: u32;1830 } & Struct;1831 readonly isIssuerChanged: boolean;1832 readonly asIssuerChanged: {1833 readonly oldIssuer: AccountId32;1834 readonly newIssuer: AccountId32;1835 readonly collectionId: u32;1836 } & Struct;1837 readonly isCollectionLocked: boolean;1838 readonly asCollectionLocked: {1839 readonly issuer: AccountId32;1840 readonly collectionId: u32;1841 } & Struct;1842 readonly isNftMinted: boolean;1843 readonly asNftMinted: {1844 readonly owner: AccountId32;1845 readonly collectionId: u32;1846 readonly nftId: u32;1847 } & Struct;1848 readonly isNftBurned: boolean;1849 readonly asNftBurned: {1850 readonly owner: AccountId32;1851 readonly nftId: u32;1852 } & Struct;1853 readonly isNftSent: boolean;1854 readonly asNftSent: {1855 readonly sender: AccountId32;1856 readonly recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple;1857 readonly collectionId: u32;1858 readonly nftId: u32;1859 readonly approvalRequired: bool;1860 } & Struct;1861 readonly isNftAccepted: boolean;1862 readonly asNftAccepted: {1863 readonly sender: AccountId32;1864 readonly recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple;1865 readonly collectionId: u32;1866 readonly nftId: u32;1867 } & Struct;1868 readonly isNftRejected: boolean;1869 readonly asNftRejected: {1870 readonly sender: AccountId32;1871 readonly collectionId: u32;1872 readonly nftId: u32;1873 } & Struct;1874 readonly isPropertySet: boolean;1875 readonly asPropertySet: {1876 readonly collectionId: u32;1877 readonly maybeNftId: Option<u32>;1878 readonly key: Bytes;1879 readonly value: Bytes;1880 } & Struct;1881 readonly isResourceAdded: boolean;1882 readonly asResourceAdded: {1883 readonly nftId: u32;1884 readonly resourceId: u32;1885 } & Struct;1886 readonly isResourceRemoval: boolean;1887 readonly asResourceRemoval: {1888 readonly nftId: u32;1889 readonly resourceId: u32;1890 } & Struct;1891 readonly isResourceAccepted: boolean;1892 readonly asResourceAccepted: {1893 readonly nftId: u32;1894 readonly resourceId: u32;1895 } & Struct;1896 readonly isResourceRemovalAccepted: boolean;1897 readonly asResourceRemovalAccepted: {1898 readonly nftId: u32;1899 readonly resourceId: u32;1900 } & Struct;1901 readonly isPrioritySet: boolean;1902 readonly asPrioritySet: {1903 readonly collectionId: u32;1904 readonly nftId: u32;1905 } & Struct;1906 readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'IssuerChanged' | 'CollectionLocked' | 'NftMinted' | 'NftBurned' | 'NftSent' | 'NftAccepted' | 'NftRejected' | 'PropertySet' | 'ResourceAdded' | 'ResourceRemoval' | 'ResourceAccepted' | 'ResourceRemovalAccepted' | 'PrioritySet';1907}19081909/** @name PalletRmrkEquipCall */1910export interface PalletRmrkEquipCall extends Enum {1911 readonly isCreateBase: boolean;1912 readonly asCreateBase: {1913 readonly baseType: Bytes;1914 readonly symbol: Bytes;1915 readonly parts: Vec<RmrkTraitsPartPartType>;1916 } & Struct;1917 readonly isThemeAdd: boolean;1918 readonly asThemeAdd: {1919 readonly baseId: u32;1920 readonly theme: RmrkTraitsTheme;1921 } & Struct;1922 readonly isEquippable: boolean;1923 readonly asEquippable: {1924 readonly baseId: u32;1925 readonly slotId: u32;1926 readonly equippables: RmrkTraitsPartEquippableList;1927 } & Struct;1928 readonly type: 'CreateBase' | 'ThemeAdd' | 'Equippable';1929}19301931/** @name PalletRmrkEquipError */1932export interface PalletRmrkEquipError extends Enum {1933 readonly isPermissionError: boolean;1934 readonly isNoAvailableBaseId: boolean;1935 readonly isNoAvailablePartId: boolean;1936 readonly isBaseDoesntExist: boolean;1937 readonly isNeedsDefaultThemeFirst: boolean;1938 readonly isPartDoesntExist: boolean;1939 readonly isNoEquippableOnFixedPart: boolean;1940 readonly type: 'PermissionError' | 'NoAvailableBaseId' | 'NoAvailablePartId' | 'BaseDoesntExist' | 'NeedsDefaultThemeFirst' | 'PartDoesntExist' | 'NoEquippableOnFixedPart';1941}19421943/** @name PalletRmrkEquipEvent */1944export interface PalletRmrkEquipEvent extends Enum {1945 readonly isBaseCreated: boolean;1946 readonly asBaseCreated: {1947 readonly issuer: AccountId32;1948 readonly baseId: u32;1949 } & Struct;1950 readonly isEquippablesUpdated: boolean;1951 readonly asEquippablesUpdated: {1952 readonly baseId: u32;1953 readonly slotId: u32;1954 } & Struct;1955 readonly type: 'BaseCreated' | 'EquippablesUpdated';1956}19571958/** @name PalletStructureCall */1959export interface PalletStructureCall extends Null {}19601961/** @name PalletStructureError */1962export interface PalletStructureError extends Enum {1963 readonly isOuroborosDetected: boolean;1964 readonly isDepthLimit: boolean;1965 readonly isBreadthLimit: boolean;1966 readonly isTokenNotFound: boolean;1967 readonly type: 'OuroborosDetected' | 'DepthLimit' | 'BreadthLimit' | 'TokenNotFound';1968}19691970/** @name PalletStructureEvent */1971export interface PalletStructureEvent extends Enum {1972 readonly isExecuted: boolean;1973 readonly asExecuted: Result<Null, SpRuntimeDispatchError>;1974 readonly type: 'Executed';1975}19761977/** @name PalletSudoCall */1978export interface PalletSudoCall extends Enum {1979 readonly isSudo: boolean;1980 readonly asSudo: {1981 readonly call: Call;1982 } & Struct;1983 readonly isSudoUncheckedWeight: boolean;1984 readonly asSudoUncheckedWeight: {1985 readonly call: Call;1986 readonly weight: SpWeightsWeightV2Weight;1987 } & Struct;1988 readonly isSetKey: boolean;1989 readonly asSetKey: {1990 readonly new_: MultiAddress;1991 } & Struct;1992 readonly isSudoAs: boolean;1993 readonly asSudoAs: {1994 readonly who: MultiAddress;1995 readonly call: Call;1996 } & Struct;1997 readonly type: 'Sudo' | 'SudoUncheckedWeight' | 'SetKey' | 'SudoAs';1998}19992000/** @name PalletSudoError */2001export interface PalletSudoError extends Enum {2002 readonly isRequireSudo: boolean;2003 readonly type: 'RequireSudo';2004}20052006/** @name PalletSudoEvent */2007export interface PalletSudoEvent extends Enum {2008 readonly isSudid: boolean;2009 readonly asSudid: {2010 readonly sudoResult: Result<Null, SpRuntimeDispatchError>;2011 } & Struct;2012 readonly isKeyChanged: boolean;2013 readonly asKeyChanged: {2014 readonly oldSudoer: Option<AccountId32>;2015 } & Struct;2016 readonly isSudoAsDone: boolean;2017 readonly asSudoAsDone: {2018 readonly sudoResult: Result<Null, SpRuntimeDispatchError>;2019 } & Struct;2020 readonly type: 'Sudid' | 'KeyChanged' | 'SudoAsDone';2021}20222023/** @name PalletTemplateTransactionPaymentCall */2024export interface PalletTemplateTransactionPaymentCall extends Null {}20252026/** @name PalletTemplateTransactionPaymentChargeTransactionPayment */2027export interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact<u128> {}20282029/** @name PalletTestUtilsCall */2030export interface PalletTestUtilsCall extends Enum {2031 readonly isEnable: boolean;2032 readonly isSetTestValue: boolean;2033 readonly asSetTestValue: {2034 readonly value: u32;2035 } & Struct;2036 readonly isSetTestValueAndRollback: boolean;2037 readonly asSetTestValueAndRollback: {2038 readonly value: u32;2039 } & Struct;2040 readonly isIncTestValue: boolean;2041 readonly isJustTakeFee: boolean;2042 readonly isBatchAll: boolean;2043 readonly asBatchAll: {2044 readonly calls: Vec<Call>;2045 } & Struct;2046 readonly type: 'Enable' | 'SetTestValue' | 'SetTestValueAndRollback' | 'IncTestValue' | 'JustTakeFee' | 'BatchAll';2047}20482049/** @name PalletTestUtilsError */2050export interface PalletTestUtilsError extends Enum {2051 readonly isTestPalletDisabled: boolean;2052 readonly isTriggerRollback: boolean;2053 readonly type: 'TestPalletDisabled' | 'TriggerRollback';2054}20552056/** @name PalletTestUtilsEvent */2057export interface PalletTestUtilsEvent extends Enum {2058 readonly isValueIsSet: boolean;2059 readonly isShouldRollback: boolean;2060 readonly isBatchCompleted: boolean;2061 readonly type: 'ValueIsSet' | 'ShouldRollback' | 'BatchCompleted';2062}20632064/** @name PalletTimestampCall */2065export interface PalletTimestampCall extends Enum {2066 readonly isSet: boolean;2067 readonly asSet: {2068 readonly now: Compact<u64>;2069 } & Struct;2070 readonly type: 'Set';2071}20722073/** @name PalletTransactionPaymentEvent */2074export interface PalletTransactionPaymentEvent extends Enum {2075 readonly isTransactionFeePaid: boolean;2076 readonly asTransactionFeePaid: {2077 readonly who: AccountId32;2078 readonly actualFee: u128;2079 readonly tip: u128;2080 } & Struct;2081 readonly type: 'TransactionFeePaid';2082}20832084/** @name PalletTransactionPaymentReleases */2085export interface PalletTransactionPaymentReleases extends Enum {2086 readonly isV1Ancient: boolean;2087 readonly isV2: boolean;2088 readonly type: 'V1Ancient' | 'V2';2089}20902091/** @name PalletTreasuryCall */2092export interface PalletTreasuryCall extends Enum {2093 readonly isProposeSpend: boolean;2094 readonly asProposeSpend: {2095 readonly value: Compact<u128>;2096 readonly beneficiary: MultiAddress;2097 } & Struct;2098 readonly isRejectProposal: boolean;2099 readonly asRejectProposal: {2100 readonly proposalId: Compact<u32>;2101 } & Struct;2102 readonly isApproveProposal: boolean;2103 readonly asApproveProposal: {2104 readonly proposalId: Compact<u32>;2105 } & Struct;2106 readonly isSpend: boolean;2107 readonly asSpend: {2108 readonly amount: Compact<u128>;2109 readonly beneficiary: MultiAddress;2110 } & Struct;2111 readonly isRemoveApproval: boolean;2112 readonly asRemoveApproval: {2113 readonly proposalId: Compact<u32>;2114 } & Struct;2115 readonly type: 'ProposeSpend' | 'RejectProposal' | 'ApproveProposal' | 'Spend' | 'RemoveApproval';2116}21172118/** @name PalletTreasuryError */2119export interface PalletTreasuryError extends Enum {2120 readonly isInsufficientProposersBalance: boolean;2121 readonly isInvalidIndex: boolean;2122 readonly isTooManyApprovals: boolean;2123 readonly isInsufficientPermission: boolean;2124 readonly isProposalNotApproved: boolean;2125 readonly type: 'InsufficientProposersBalance' | 'InvalidIndex' | 'TooManyApprovals' | 'InsufficientPermission' | 'ProposalNotApproved';2126}21272128/** @name PalletTreasuryEvent */2129export interface PalletTreasuryEvent extends Enum {2130 readonly isProposed: boolean;2131 readonly asProposed: {2132 readonly proposalIndex: u32;2133 } & Struct;2134 readonly isSpending: boolean;2135 readonly asSpending: {2136 readonly budgetRemaining: u128;2137 } & Struct;2138 readonly isAwarded: boolean;2139 readonly asAwarded: {2140 readonly proposalIndex: u32;2141 readonly award: u128;2142 readonly account: AccountId32;2143 } & Struct;2144 readonly isRejected: boolean;2145 readonly asRejected: {2146 readonly proposalIndex: u32;2147 readonly slashed: u128;2148 } & Struct;2149 readonly isBurnt: boolean;2150 readonly asBurnt: {2151 readonly burntFunds: u128;2152 } & Struct;2153 readonly isRollover: boolean;2154 readonly asRollover: {2155 readonly rolloverBalance: u128;2156 } & Struct;2157 readonly isDeposit: boolean;2158 readonly asDeposit: {2159 readonly value: u128;2160 } & Struct;2161 readonly isSpendApproved: boolean;2162 readonly asSpendApproved: {2163 readonly proposalIndex: u32;2164 readonly amount: u128;2165 readonly beneficiary: AccountId32;2166 } & Struct;2167 readonly type: 'Proposed' | 'Spending' | 'Awarded' | 'Rejected' | 'Burnt' | 'Rollover' | 'Deposit' | 'SpendApproved';2168}21692170/** @name PalletTreasuryProposal */2171export interface PalletTreasuryProposal extends Struct {2172 readonly proposer: AccountId32;2173 readonly value: u128;2174 readonly beneficiary: AccountId32;2175 readonly bond: u128;2176}21772178/** @name PalletUniqueCall */2179export interface PalletUniqueCall extends Enum {2180 readonly isCreateCollection: boolean;2181 readonly asCreateCollection: {2182 readonly collectionName: Vec<u16>;2183 readonly collectionDescription: Vec<u16>;2184 readonly tokenPrefix: Bytes;2185 readonly mode: UpDataStructsCollectionMode;2186 } & Struct;2187 readonly isCreateCollectionEx: boolean;2188 readonly asCreateCollectionEx: {2189 readonly data: UpDataStructsCreateCollectionData;2190 } & Struct;2191 readonly isDestroyCollection: boolean;2192 readonly asDestroyCollection: {2193 readonly collectionId: u32;2194 } & Struct;2195 readonly isAddToAllowList: boolean;2196 readonly asAddToAllowList: {2197 readonly collectionId: u32;2198 readonly address: PalletEvmAccountBasicCrossAccountIdRepr;2199 } & Struct;2200 readonly isRemoveFromAllowList: boolean;2201 readonly asRemoveFromAllowList: {2202 readonly collectionId: u32;2203 readonly address: PalletEvmAccountBasicCrossAccountIdRepr;2204 } & Struct;2205 readonly isChangeCollectionOwner: boolean;2206 readonly asChangeCollectionOwner: {2207 readonly collectionId: u32;2208 readonly newOwner: AccountId32;2209 } & Struct;2210 readonly isAddCollectionAdmin: boolean;2211 readonly asAddCollectionAdmin: {2212 readonly collectionId: u32;2213 readonly newAdminId: PalletEvmAccountBasicCrossAccountIdRepr;2214 } & Struct;2215 readonly isRemoveCollectionAdmin: boolean;2216 readonly asRemoveCollectionAdmin: {2217 readonly collectionId: u32;2218 readonly accountId: PalletEvmAccountBasicCrossAccountIdRepr;2219 } & Struct;2220 readonly isSetCollectionSponsor: boolean;2221 readonly asSetCollectionSponsor: {2222 readonly collectionId: u32;2223 readonly newSponsor: AccountId32;2224 } & Struct;2225 readonly isConfirmSponsorship: boolean;2226 readonly asConfirmSponsorship: {2227 readonly collectionId: u32;2228 } & Struct;2229 readonly isRemoveCollectionSponsor: boolean;2230 readonly asRemoveCollectionSponsor: {2231 readonly collectionId: u32;2232 } & Struct;2233 readonly isCreateItem: boolean;2234 readonly asCreateItem: {2235 readonly collectionId: u32;2236 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;2237 readonly data: UpDataStructsCreateItemData;2238 } & Struct;2239 readonly isCreateMultipleItems: boolean;2240 readonly asCreateMultipleItems: {2241 readonly collectionId: u32;2242 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;2243 readonly itemsData: Vec<UpDataStructsCreateItemData>;2244 } & Struct;2245 readonly isSetCollectionProperties: boolean;2246 readonly asSetCollectionProperties: {2247 readonly collectionId: u32;2248 readonly properties: Vec<UpDataStructsProperty>;2249 } & Struct;2250 readonly isDeleteCollectionProperties: boolean;2251 readonly asDeleteCollectionProperties: {2252 readonly collectionId: u32;2253 readonly propertyKeys: Vec<Bytes>;2254 } & Struct;2255 readonly isSetTokenProperties: boolean;2256 readonly asSetTokenProperties: {2257 readonly collectionId: u32;2258 readonly tokenId: u32;2259 readonly properties: Vec<UpDataStructsProperty>;2260 } & Struct;2261 readonly isDeleteTokenProperties: boolean;2262 readonly asDeleteTokenProperties: {2263 readonly collectionId: u32;2264 readonly tokenId: u32;2265 readonly propertyKeys: Vec<Bytes>;2266 } & Struct;2267 readonly isSetTokenPropertyPermissions: boolean;2268 readonly asSetTokenPropertyPermissions: {2269 readonly collectionId: u32;2270 readonly propertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;2271 } & Struct;2272 readonly isCreateMultipleItemsEx: boolean;2273 readonly asCreateMultipleItemsEx: {2274 readonly collectionId: u32;2275 readonly data: UpDataStructsCreateItemExData;2276 } & Struct;2277 readonly isSetTransfersEnabledFlag: boolean;2278 readonly asSetTransfersEnabledFlag: {2279 readonly collectionId: u32;2280 readonly value: bool;2281 } & Struct;2282 readonly isBurnItem: boolean;2283 readonly asBurnItem: {2284 readonly collectionId: u32;2285 readonly itemId: u32;2286 readonly value: u128;2287 } & Struct;2288 readonly isBurnFrom: boolean;2289 readonly asBurnFrom: {2290 readonly collectionId: u32;2291 readonly from: PalletEvmAccountBasicCrossAccountIdRepr;2292 readonly itemId: u32;2293 readonly value: u128;2294 } & Struct;2295 readonly isTransfer: boolean;2296 readonly asTransfer: {2297 readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;2298 readonly collectionId: u32;2299 readonly itemId: u32;2300 readonly value: u128;2301 } & Struct;2302 readonly isApprove: boolean;2303 readonly asApprove: {2304 readonly spender: PalletEvmAccountBasicCrossAccountIdRepr;2305 readonly collectionId: u32;2306 readonly itemId: u32;2307 readonly amount: u128;2308 } & Struct;2309 readonly isTransferFrom: boolean;2310 readonly asTransferFrom: {2311 readonly from: PalletEvmAccountBasicCrossAccountIdRepr;2312 readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;2313 readonly collectionId: u32;2314 readonly itemId: u32;2315 readonly value: u128;2316 } & Struct;2317 readonly isSetCollectionLimits: boolean;2318 readonly asSetCollectionLimits: {2319 readonly collectionId: u32;2320 readonly newLimit: UpDataStructsCollectionLimits;2321 } & Struct;2322 readonly isSetCollectionPermissions: boolean;2323 readonly asSetCollectionPermissions: {2324 readonly collectionId: u32;2325 readonly newPermission: UpDataStructsCollectionPermissions;2326 } & Struct;2327 readonly isRepartition: boolean;2328 readonly asRepartition: {2329 readonly collectionId: u32;2330 readonly tokenId: u32;2331 readonly amount: u128;2332 } & Struct;2333 readonly isSetAllowanceForAll: boolean;2334 readonly asSetAllowanceForAll: {2335 readonly collectionId: u32;2336 readonly operator: PalletEvmAccountBasicCrossAccountIdRepr;2337 readonly approve: bool;2338 } & Struct;2339 readonly isForceRepairCollection: boolean;2340 readonly asForceRepairCollection: {2341 readonly collectionId: u32;2342 } & Struct;2343 readonly isForceRepairItem: boolean;2344 readonly asForceRepairItem: {2345 readonly collectionId: u32;2346 readonly itemId: u32;2347 } & Struct;2348 readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition' | 'SetAllowanceForAll' | 'ForceRepairCollection' | 'ForceRepairItem';2349}23502351/** @name PalletUniqueError */2352export interface PalletUniqueError extends Enum {2353 readonly isCollectionDecimalPointLimitExceeded: boolean;2354 readonly isEmptyArgument: boolean;2355 readonly isRepartitionCalledOnNonRefungibleCollection: boolean;2356 readonly type: 'CollectionDecimalPointLimitExceeded' | 'EmptyArgument' | 'RepartitionCalledOnNonRefungibleCollection';2357}23582359/** @name PalletXcmCall */2360export interface PalletXcmCall extends Enum {2361 readonly isSend: boolean;2362 readonly asSend: {2363 readonly dest: XcmVersionedMultiLocation;2364 readonly message: XcmVersionedXcm;2365 } & Struct;2366 readonly isTeleportAssets: boolean;2367 readonly asTeleportAssets: {2368 readonly dest: XcmVersionedMultiLocation;2369 readonly beneficiary: XcmVersionedMultiLocation;2370 readonly assets: XcmVersionedMultiAssets;2371 readonly feeAssetItem: u32;2372 } & Struct;2373 readonly isReserveTransferAssets: boolean;2374 readonly asReserveTransferAssets: {2375 readonly dest: XcmVersionedMultiLocation;2376 readonly beneficiary: XcmVersionedMultiLocation;2377 readonly assets: XcmVersionedMultiAssets;2378 readonly feeAssetItem: u32;2379 } & Struct;2380 readonly isExecute: boolean;2381 readonly asExecute: {2382 readonly message: XcmVersionedXcm;2383 readonly maxWeight: u64;2384 } & Struct;2385 readonly isForceXcmVersion: boolean;2386 readonly asForceXcmVersion: {2387 readonly location: XcmV1MultiLocation;2388 readonly xcmVersion: u32;2389 } & Struct;2390 readonly isForceDefaultXcmVersion: boolean;2391 readonly asForceDefaultXcmVersion: {2392 readonly maybeXcmVersion: Option<u32>;2393 } & Struct;2394 readonly isForceSubscribeVersionNotify: boolean;2395 readonly asForceSubscribeVersionNotify: {2396 readonly location: XcmVersionedMultiLocation;2397 } & Struct;2398 readonly isForceUnsubscribeVersionNotify: boolean;2399 readonly asForceUnsubscribeVersionNotify: {2400 readonly location: XcmVersionedMultiLocation;2401 } & Struct;2402 readonly isLimitedReserveTransferAssets: boolean;2403 readonly asLimitedReserveTransferAssets: {2404 readonly dest: XcmVersionedMultiLocation;2405 readonly beneficiary: XcmVersionedMultiLocation;2406 readonly assets: XcmVersionedMultiAssets;2407 readonly feeAssetItem: u32;2408 readonly weightLimit: XcmV2WeightLimit;2409 } & Struct;2410 readonly isLimitedTeleportAssets: boolean;2411 readonly asLimitedTeleportAssets: {2412 readonly dest: XcmVersionedMultiLocation;2413 readonly beneficiary: XcmVersionedMultiLocation;2414 readonly assets: XcmVersionedMultiAssets;2415 readonly feeAssetItem: u32;2416 readonly weightLimit: XcmV2WeightLimit;2417 } & Struct;2418 readonly type: 'Send' | 'TeleportAssets' | 'ReserveTransferAssets' | 'Execute' | 'ForceXcmVersion' | 'ForceDefaultXcmVersion' | 'ForceSubscribeVersionNotify' | 'ForceUnsubscribeVersionNotify' | 'LimitedReserveTransferAssets' | 'LimitedTeleportAssets';2419}24202421/** @name PalletXcmError */2422export interface PalletXcmError extends Enum {2423 readonly isUnreachable: boolean;2424 readonly isSendFailure: boolean;2425 readonly isFiltered: boolean;2426 readonly isUnweighableMessage: boolean;2427 readonly isDestinationNotInvertible: boolean;2428 readonly isEmpty: boolean;2429 readonly isCannotReanchor: boolean;2430 readonly isTooManyAssets: boolean;2431 readonly isInvalidOrigin: boolean;2432 readonly isBadVersion: boolean;2433 readonly isBadLocation: boolean;2434 readonly isNoSubscription: boolean;2435 readonly isAlreadySubscribed: boolean;2436 readonly type: 'Unreachable' | 'SendFailure' | 'Filtered' | 'UnweighableMessage' | 'DestinationNotInvertible' | 'Empty' | 'CannotReanchor' | 'TooManyAssets' | 'InvalidOrigin' | 'BadVersion' | 'BadLocation' | 'NoSubscription' | 'AlreadySubscribed';2437}24382439/** @name PalletXcmEvent */2440export interface PalletXcmEvent extends Enum {2441 readonly isAttempted: boolean;2442 readonly asAttempted: XcmV2TraitsOutcome;2443 readonly isSent: boolean;2444 readonly asSent: ITuple<[XcmV1MultiLocation, XcmV1MultiLocation, XcmV2Xcm]>;2445 readonly isUnexpectedResponse: boolean;2446 readonly asUnexpectedResponse: ITuple<[XcmV1MultiLocation, u64]>;2447 readonly isResponseReady: boolean;2448 readonly asResponseReady: ITuple<[u64, XcmV2Response]>;2449 readonly isNotified: boolean;2450 readonly asNotified: ITuple<[u64, u8, u8]>;2451 readonly isNotifyOverweight: boolean;2452 readonly asNotifyOverweight: ITuple<[u64, u8, u8, SpWeightsWeightV2Weight, SpWeightsWeightV2Weight]>;2453 readonly isNotifyDispatchError: boolean;2454 readonly asNotifyDispatchError: ITuple<[u64, u8, u8]>;2455 readonly isNotifyDecodeFailed: boolean;2456 readonly asNotifyDecodeFailed: ITuple<[u64, u8, u8]>;2457 readonly isInvalidResponder: boolean;2458 readonly asInvalidResponder: ITuple<[XcmV1MultiLocation, u64, Option<XcmV1MultiLocation>]>;2459 readonly isInvalidResponderVersion: boolean;2460 readonly asInvalidResponderVersion: ITuple<[XcmV1MultiLocation, u64]>;2461 readonly isResponseTaken: boolean;2462 readonly asResponseTaken: u64;2463 readonly isAssetsTrapped: boolean;2464 readonly asAssetsTrapped: ITuple<[H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;2465 readonly isVersionChangeNotified: boolean;2466 readonly asVersionChangeNotified: ITuple<[XcmV1MultiLocation, u32]>;2467 readonly isSupportedVersionChanged: boolean;2468 readonly asSupportedVersionChanged: ITuple<[XcmV1MultiLocation, u32]>;2469 readonly isNotifyTargetSendFail: boolean;2470 readonly asNotifyTargetSendFail: ITuple<[XcmV1MultiLocation, u64, XcmV2TraitsError]>;2471 readonly isNotifyTargetMigrationFail: boolean;2472 readonly asNotifyTargetMigrationFail: ITuple<[XcmVersionedMultiLocation, u64]>;2473 readonly isAssetsClaimed: boolean;2474 readonly asAssetsClaimed: ITuple<[H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;2475 readonly type: 'Attempted' | 'Sent' | 'UnexpectedResponse' | 'ResponseReady' | 'Notified' | 'NotifyOverweight' | 'NotifyDispatchError' | 'NotifyDecodeFailed' | 'InvalidResponder' | 'InvalidResponderVersion' | 'ResponseTaken' | 'AssetsTrapped' | 'VersionChangeNotified' | 'SupportedVersionChanged' | 'NotifyTargetSendFail' | 'NotifyTargetMigrationFail' | 'AssetsClaimed';2476}24772478/** @name PhantomTypeUpDataStructs */2479export interface PhantomTypeUpDataStructs extends Vec<ITuple<[UpDataStructsTokenData, UpDataStructsRpcCollection, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftNftInfo, RmrkTraitsResourceResourceInfo, RmrkTraitsPropertyPropertyInfo, RmrkTraitsBaseBaseInfo, RmrkTraitsPartPartType, RmrkTraitsTheme, RmrkTraitsNftNftChild, UpPovEstimateRpcPovInfo]>> {}24802481/** @name PolkadotCorePrimitivesInboundDownwardMessage */2482export interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct {2483 readonly sentAt: u32;2484 readonly msg: Bytes;2485}24862487/** @name PolkadotCorePrimitivesInboundHrmpMessage */2488export interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct {2489 readonly sentAt: u32;2490 readonly data: Bytes;2491}24922493/** @name PolkadotCorePrimitivesOutboundHrmpMessage */2494export interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct {2495 readonly recipient: u32;2496 readonly data: Bytes;2497}24982499/** @name PolkadotParachainPrimitivesXcmpMessageFormat */2500export interface PolkadotParachainPrimitivesXcmpMessageFormat extends Enum {2501 readonly isConcatenatedVersionedXcm: boolean;2502 readonly isConcatenatedEncodedBlob: boolean;2503 readonly isSignals: boolean;2504 readonly type: 'ConcatenatedVersionedXcm' | 'ConcatenatedEncodedBlob' | 'Signals';2505}25062507/** @name PolkadotPrimitivesV2AbridgedHostConfiguration */2508export interface PolkadotPrimitivesV2AbridgedHostConfiguration extends Struct {2509 readonly maxCodeSize: u32;2510 readonly maxHeadDataSize: u32;2511 readonly maxUpwardQueueCount: u32;2512 readonly maxUpwardQueueSize: u32;2513 readonly maxUpwardMessageSize: u32;2514 readonly maxUpwardMessageNumPerCandidate: u32;2515 readonly hrmpMaxMessageNumPerCandidate: u32;2516 readonly validationUpgradeCooldown: u32;2517 readonly validationUpgradeDelay: u32;2518}25192520/** @name PolkadotPrimitivesV2AbridgedHrmpChannel */2521export interface PolkadotPrimitivesV2AbridgedHrmpChannel extends Struct {2522 readonly maxCapacity: u32;2523 readonly maxTotalSize: u32;2524 readonly maxMessageSize: u32;2525 readonly msgCount: u32;2526 readonly totalSize: u32;2527 readonly mqcHead: Option<H256>;2528}25292530/** @name PolkadotPrimitivesV2PersistedValidationData */2531export interface PolkadotPrimitivesV2PersistedValidationData extends Struct {2532 readonly parentHead: Bytes;2533 readonly relayParentNumber: u32;2534 readonly relayParentStorageRoot: H256;2535 readonly maxPovSize: u32;2536}25372538/** @name PolkadotPrimitivesV2UpgradeRestriction */2539export interface PolkadotPrimitivesV2UpgradeRestriction extends Enum {2540 readonly isPresent: boolean;2541 readonly type: 'Present';2542}25432544/** @name RmrkTraitsBaseBaseInfo */2545export interface RmrkTraitsBaseBaseInfo extends Struct {2546 readonly issuer: AccountId32;2547 readonly baseType: Bytes;2548 readonly symbol: Bytes;2549}25502551/** @name RmrkTraitsCollectionCollectionInfo */2552export interface RmrkTraitsCollectionCollectionInfo extends Struct {2553 readonly issuer: AccountId32;2554 readonly metadata: Bytes;2555 readonly max: Option<u32>;2556 readonly symbol: Bytes;2557 readonly nftsCount: u32;2558}25592560/** @name RmrkTraitsNftAccountIdOrCollectionNftTuple */2561export interface RmrkTraitsNftAccountIdOrCollectionNftTuple extends Enum {2562 readonly isAccountId: boolean;2563 readonly asAccountId: AccountId32;2564 readonly isCollectionAndNftTuple: boolean;2565 readonly asCollectionAndNftTuple: ITuple<[u32, u32]>;2566 readonly type: 'AccountId' | 'CollectionAndNftTuple';2567}25682569/** @name RmrkTraitsNftNftChild */2570export interface RmrkTraitsNftNftChild extends Struct {2571 readonly collectionId: u32;2572 readonly nftId: u32;2573}25742575/** @name RmrkTraitsNftNftInfo */2576export interface RmrkTraitsNftNftInfo extends Struct {2577 readonly owner: RmrkTraitsNftAccountIdOrCollectionNftTuple;2578 readonly royalty: Option<RmrkTraitsNftRoyaltyInfo>;2579 readonly metadata: Bytes;2580 readonly equipped: bool;2581 readonly pending: bool;2582}25832584/** @name RmrkTraitsNftRoyaltyInfo */2585export interface RmrkTraitsNftRoyaltyInfo extends Struct {2586 readonly recipient: AccountId32;2587 readonly amount: Permill;2588}25892590/** @name RmrkTraitsPartEquippableList */2591export interface RmrkTraitsPartEquippableList extends Enum {2592 readonly isAll: boolean;2593 readonly isEmpty: boolean;2594 readonly isCustom: boolean;2595 readonly asCustom: Vec<u32>;2596 readonly type: 'All' | 'Empty' | 'Custom';2597}25982599/** @name RmrkTraitsPartFixedPart */2600export interface RmrkTraitsPartFixedPart extends Struct {2601 readonly id: u32;2602 readonly z: u32;2603 readonly src: Bytes;2604}26052606/** @name RmrkTraitsPartPartType */2607export interface RmrkTraitsPartPartType extends Enum {2608 readonly isFixedPart: boolean;2609 readonly asFixedPart: RmrkTraitsPartFixedPart;2610 readonly isSlotPart: boolean;2611 readonly asSlotPart: RmrkTraitsPartSlotPart;2612 readonly type: 'FixedPart' | 'SlotPart';2613}26142615/** @name RmrkTraitsPartSlotPart */2616export interface RmrkTraitsPartSlotPart extends Struct {2617 readonly id: u32;2618 readonly equippable: RmrkTraitsPartEquippableList;2619 readonly src: Bytes;2620 readonly z: u32;2621}26222623/** @name RmrkTraitsPropertyPropertyInfo */2624export interface RmrkTraitsPropertyPropertyInfo extends Struct {2625 readonly key: Bytes;2626 readonly value: Bytes;2627}26282629/** @name RmrkTraitsResourceBasicResource */2630export interface RmrkTraitsResourceBasicResource extends Struct {2631 readonly src: Option<Bytes>;2632 readonly metadata: Option<Bytes>;2633 readonly license: Option<Bytes>;2634 readonly thumb: Option<Bytes>;2635}26362637/** @name RmrkTraitsResourceComposableResource */2638export interface RmrkTraitsResourceComposableResource extends Struct {2639 readonly parts: Vec<u32>;2640 readonly base: u32;2641 readonly src: Option<Bytes>;2642 readonly metadata: Option<Bytes>;2643 readonly license: Option<Bytes>;2644 readonly thumb: Option<Bytes>;2645}26462647/** @name RmrkTraitsResourceResourceInfo */2648export interface RmrkTraitsResourceResourceInfo extends Struct {2649 readonly id: u32;2650 readonly resource: RmrkTraitsResourceResourceTypes;2651 readonly pending: bool;2652 readonly pendingRemoval: bool;2653}26542655/** @name RmrkTraitsResourceResourceTypes */2656export interface RmrkTraitsResourceResourceTypes extends Enum {2657 readonly isBasic: boolean;2658 readonly asBasic: RmrkTraitsResourceBasicResource;2659 readonly isComposable: boolean;2660 readonly asComposable: RmrkTraitsResourceComposableResource;2661 readonly isSlot: boolean;2662 readonly asSlot: RmrkTraitsResourceSlotResource;2663 readonly type: 'Basic' | 'Composable' | 'Slot';2664}26652666/** @name RmrkTraitsResourceSlotResource */2667export interface RmrkTraitsResourceSlotResource extends Struct {2668 readonly base: u32;2669 readonly src: Option<Bytes>;2670 readonly metadata: Option<Bytes>;2671 readonly slot: u32;2672 readonly license: Option<Bytes>;2673 readonly thumb: Option<Bytes>;2674}26752676/** @name RmrkTraitsTheme */2677export interface RmrkTraitsTheme extends Struct {2678 readonly name: Bytes;2679 readonly properties: Vec<RmrkTraitsThemeThemeProperty>;2680 readonly inherit: bool;2681}26822683/** @name RmrkTraitsThemeThemeProperty */2684export interface RmrkTraitsThemeThemeProperty extends Struct {2685 readonly key: Bytes;2686 readonly value: Bytes;2687}26882689/** @name SpCoreEcdsaSignature */2690export interface SpCoreEcdsaSignature extends U8aFixed {}26912692/** @name SpCoreEd25519Signature */2693export interface SpCoreEd25519Signature extends U8aFixed {}26942695/** @name SpCoreSr25519Signature */2696export interface SpCoreSr25519Signature extends U8aFixed {}26972698/** @name SpRuntimeArithmeticError */2699export interface SpRuntimeArithmeticError extends Enum {2700 readonly isUnderflow: boolean;2701 readonly isOverflow: boolean;2702 readonly isDivisionByZero: boolean;2703 readonly type: 'Underflow' | 'Overflow' | 'DivisionByZero';2704}27052706/** @name SpRuntimeDigest */2707export interface SpRuntimeDigest extends Struct {2708 readonly logs: Vec<SpRuntimeDigestDigestItem>;2709}27102711/** @name SpRuntimeDigestDigestItem */2712export interface SpRuntimeDigestDigestItem extends Enum {2713 readonly isOther: boolean;2714 readonly asOther: Bytes;2715 readonly isConsensus: boolean;2716 readonly asConsensus: ITuple<[U8aFixed, Bytes]>;2717 readonly isSeal: boolean;2718 readonly asSeal: ITuple<[U8aFixed, Bytes]>;2719 readonly isPreRuntime: boolean;2720 readonly asPreRuntime: ITuple<[U8aFixed, Bytes]>;2721 readonly isRuntimeEnvironmentUpdated: boolean;2722 readonly type: 'Other' | 'Consensus' | 'Seal' | 'PreRuntime' | 'RuntimeEnvironmentUpdated';2723}27242725/** @name SpRuntimeDispatchError */2726export interface SpRuntimeDispatchError extends Enum {2727 readonly isOther: boolean;2728 readonly isCannotLookup: boolean;2729 readonly isBadOrigin: boolean;2730 readonly isModule: boolean;2731 readonly asModule: SpRuntimeModuleError;2732 readonly isConsumerRemaining: boolean;2733 readonly isNoProviders: boolean;2734 readonly isTooManyConsumers: boolean;2735 readonly isToken: boolean;2736 readonly asToken: SpRuntimeTokenError;2737 readonly isArithmetic: boolean;2738 readonly asArithmetic: SpRuntimeArithmeticError;2739 readonly isTransactional: boolean;2740 readonly asTransactional: SpRuntimeTransactionalError;2741 readonly isExhausted: boolean;2742 readonly isCorruption: boolean;2743 readonly isUnavailable: boolean;2744 readonly type: 'Other' | 'CannotLookup' | 'BadOrigin' | 'Module' | 'ConsumerRemaining' | 'NoProviders' | 'TooManyConsumers' | 'Token' | 'Arithmetic' | 'Transactional' | 'Exhausted' | 'Corruption' | 'Unavailable';2745}27462747/** @name SpRuntimeModuleError */2748export interface SpRuntimeModuleError extends Struct {2749 readonly index: u8;2750 readonly error: U8aFixed;2751}27522753/** @name SpRuntimeMultiSignature */2754export interface SpRuntimeMultiSignature extends Enum {2755 readonly isEd25519: boolean;2756 readonly asEd25519: SpCoreEd25519Signature;2757 readonly isSr25519: boolean;2758 readonly asSr25519: SpCoreSr25519Signature;2759 readonly isEcdsa: boolean;2760 readonly asEcdsa: SpCoreEcdsaSignature;2761 readonly type: 'Ed25519' | 'Sr25519' | 'Ecdsa';2762}27632764/** @name SpRuntimeTokenError */2765export interface SpRuntimeTokenError extends Enum {2766 readonly isNoFunds: boolean;2767 readonly isWouldDie: boolean;2768 readonly isBelowMinimum: boolean;2769 readonly isCannotCreate: boolean;2770 readonly isUnknownAsset: boolean;2771 readonly isFrozen: boolean;2772 readonly isUnsupported: boolean;2773 readonly type: 'NoFunds' | 'WouldDie' | 'BelowMinimum' | 'CannotCreate' | 'UnknownAsset' | 'Frozen' | 'Unsupported';2774}27752776/** @name SpRuntimeTransactionalError */2777export interface SpRuntimeTransactionalError extends Enum {2778 readonly isLimitReached: boolean;2779 readonly isNoLayer: boolean;2780 readonly type: 'LimitReached' | 'NoLayer';2781}27822783/** @name SpRuntimeTransactionValidityInvalidTransaction */2784export interface SpRuntimeTransactionValidityInvalidTransaction extends Enum {2785 readonly isCall: boolean;2786 readonly isPayment: boolean;2787 readonly isFuture: boolean;2788 readonly isStale: boolean;2789 readonly isBadProof: boolean;2790 readonly isAncientBirthBlock: boolean;2791 readonly isExhaustsResources: boolean;2792 readonly isCustom: boolean;2793 readonly asCustom: u8;2794 readonly isBadMandatory: boolean;2795 readonly isMandatoryValidation: boolean;2796 readonly isBadSigner: boolean;2797 readonly type: 'Call' | 'Payment' | 'Future' | 'Stale' | 'BadProof' | 'AncientBirthBlock' | 'ExhaustsResources' | 'Custom' | 'BadMandatory' | 'MandatoryValidation' | 'BadSigner';2798}27992800/** @name SpRuntimeTransactionValidityTransactionValidityError */2801export interface SpRuntimeTransactionValidityTransactionValidityError extends Enum {2802 readonly isInvalid: boolean;2803 readonly asInvalid: SpRuntimeTransactionValidityInvalidTransaction;2804 readonly isUnknown: boolean;2805 readonly asUnknown: SpRuntimeTransactionValidityUnknownTransaction;2806 readonly type: 'Invalid' | 'Unknown';2807}28082809/** @name SpRuntimeTransactionValidityUnknownTransaction */2810export interface SpRuntimeTransactionValidityUnknownTransaction extends Enum {2811 readonly isCannotLookup: boolean;2812 readonly isNoUnsignedValidator: boolean;2813 readonly isCustom: boolean;2814 readonly asCustom: u8;2815 readonly type: 'CannotLookup' | 'NoUnsignedValidator' | 'Custom';2816}28172818/** @name SpTrieStorageProof */2819export interface SpTrieStorageProof extends Struct {2820 readonly trieNodes: BTreeSet<Bytes>;2821}28222823/** @name SpVersionRuntimeVersion */2824export interface SpVersionRuntimeVersion extends Struct {2825 readonly specName: Text;2826 readonly implName: Text;2827 readonly authoringVersion: u32;2828 readonly specVersion: u32;2829 readonly implVersion: u32;2830 readonly apis: Vec<ITuple<[U8aFixed, u32]>>;2831 readonly transactionVersion: u32;2832 readonly stateVersion: u8;2833}28342835/** @name SpWeightsRuntimeDbWeight */2836export interface SpWeightsRuntimeDbWeight extends Struct {2837 readonly read: u64;2838 readonly write: u64;2839}28402841/** @name SpWeightsWeightV2Weight */2842export interface SpWeightsWeightV2Weight extends Struct {2843 readonly refTime: Compact<u64>;2844 readonly proofSize: Compact<u64>;2845}28462847/** @name UpDataStructsAccessMode */2848export interface UpDataStructsAccessMode extends Enum {2849 readonly isNormal: boolean;2850 readonly isAllowList: boolean;2851 readonly type: 'Normal' | 'AllowList';2852}28532854/** @name UpDataStructsCollection */2855export interface UpDataStructsCollection extends Struct {2856 readonly owner: AccountId32;2857 readonly mode: UpDataStructsCollectionMode;2858 readonly name: Vec<u16>;2859 readonly description: Vec<u16>;2860 readonly tokenPrefix: Bytes;2861 readonly sponsorship: UpDataStructsSponsorshipStateAccountId32;2862 readonly limits: UpDataStructsCollectionLimits;2863 readonly permissions: UpDataStructsCollectionPermissions;2864 readonly flags: U8aFixed;2865}28662867/** @name UpDataStructsCollectionLimits */2868export interface UpDataStructsCollectionLimits extends Struct {2869 readonly accountTokenOwnershipLimit: Option<u32>;2870 readonly sponsoredDataSize: Option<u32>;2871 readonly sponsoredDataRateLimit: Option<UpDataStructsSponsoringRateLimit>;2872 readonly tokenLimit: Option<u32>;2873 readonly sponsorTransferTimeout: Option<u32>;2874 readonly sponsorApproveTimeout: Option<u32>;2875 readonly ownerCanTransfer: Option<bool>;2876 readonly ownerCanDestroy: Option<bool>;2877 readonly transfersEnabled: Option<bool>;2878}28792880/** @name UpDataStructsCollectionMode */2881export interface UpDataStructsCollectionMode extends Enum {2882 readonly isNft: boolean;2883 readonly isFungible: boolean;2884 readonly asFungible: u8;2885 readonly isReFungible: boolean;2886 readonly type: 'Nft' | 'Fungible' | 'ReFungible';2887}28882889/** @name UpDataStructsCollectionPermissions */2890export interface UpDataStructsCollectionPermissions extends Struct {2891 readonly access: Option<UpDataStructsAccessMode>;2892 readonly mintMode: Option<bool>;2893 readonly nesting: Option<UpDataStructsNestingPermissions>;2894}28952896/** @name UpDataStructsCollectionStats */2897export interface UpDataStructsCollectionStats extends Struct {2898 readonly created: u32;2899 readonly destroyed: u32;2900 readonly alive: u32;2901}29022903/** @name UpDataStructsCreateCollectionData */2904export interface UpDataStructsCreateCollectionData extends Struct {2905 readonly mode: UpDataStructsCollectionMode;2906 readonly access: Option<UpDataStructsAccessMode>;2907 readonly name: Vec<u16>;2908 readonly description: Vec<u16>;2909 readonly tokenPrefix: Bytes;2910 readonly pendingSponsor: Option<AccountId32>;2911 readonly limits: Option<UpDataStructsCollectionLimits>;2912 readonly permissions: Option<UpDataStructsCollectionPermissions>;2913 readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;2914 readonly properties: Vec<UpDataStructsProperty>;2915}29162917/** @name UpDataStructsCreateFungibleData */2918export interface UpDataStructsCreateFungibleData extends Struct {2919 readonly value: u128;2920}29212922/** @name UpDataStructsCreateItemData */2923export interface UpDataStructsCreateItemData extends Enum {2924 readonly isNft: boolean;2925 readonly asNft: UpDataStructsCreateNftData;2926 readonly isFungible: boolean;2927 readonly asFungible: UpDataStructsCreateFungibleData;2928 readonly isReFungible: boolean;2929 readonly asReFungible: UpDataStructsCreateReFungibleData;2930 readonly type: 'Nft' | 'Fungible' | 'ReFungible';2931}29322933/** @name UpDataStructsCreateItemExData */2934export interface UpDataStructsCreateItemExData extends Enum {2935 readonly isNft: boolean;2936 readonly asNft: Vec<UpDataStructsCreateNftExData>;2937 readonly isFungible: boolean;2938 readonly asFungible: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr,u128>;2939 readonly isRefungibleMultipleItems: boolean;2940 readonly asRefungibleMultipleItems: Vec<UpDataStructsCreateRefungibleExSingleOwner>;2941 readonly isRefungibleMultipleOwners: boolean;2942 readonly asRefungibleMultipleOwners: UpDataStructsCreateRefungibleExMultipleOwners;2943 readonly type: 'Nft' | 'Fungible' | 'RefungibleMultipleItems' | 'RefungibleMultipleOwners';2944}29452946/** @name UpDataStructsCreateNftData */2947export interface UpDataStructsCreateNftData extends Struct {2948 readonly properties: Vec<UpDataStructsProperty>;2949}29502951/** @name UpDataStructsCreateNftExData */2952export interface UpDataStructsCreateNftExData extends Struct {2953 readonly properties: Vec<UpDataStructsProperty>;2954 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;2955}29562957/** @name UpDataStructsCreateReFungibleData */2958export interface UpDataStructsCreateReFungibleData extends Struct {2959 readonly pieces: u128;2960 readonly properties: Vec<UpDataStructsProperty>;2961}29622963/** @name UpDataStructsCreateRefungibleExMultipleOwners */2964export interface UpDataStructsCreateRefungibleExMultipleOwners extends Struct {2965 readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;2966 readonly properties: Vec<UpDataStructsProperty>;2967}29682969/** @name UpDataStructsCreateRefungibleExSingleOwner */2970export interface UpDataStructsCreateRefungibleExSingleOwner extends Struct {2971 readonly user: PalletEvmAccountBasicCrossAccountIdRepr;2972 readonly pieces: u128;2973 readonly properties: Vec<UpDataStructsProperty>;2974}29752976/** @name UpDataStructsNestingPermissions */2977export interface UpDataStructsNestingPermissions extends Struct {2978 readonly tokenOwner: bool;2979 readonly collectionAdmin: bool;2980 readonly restricted: Option<UpDataStructsOwnerRestrictedSet>;2981}29822983/** @name UpDataStructsOwnerRestrictedSet */2984export interface UpDataStructsOwnerRestrictedSet extends BTreeSet<u32> {}29852986/** @name UpDataStructsProperties */2987export interface UpDataStructsProperties extends Struct {2988 readonly map: UpDataStructsPropertiesMapBoundedVec;2989 readonly consumedSpace: u32;2990 readonly spaceLimit: u32;2991}29922993/** @name UpDataStructsPropertiesMapBoundedVec */2994export interface UpDataStructsPropertiesMapBoundedVec extends BTreeMap<Bytes, Bytes> {}29952996/** @name UpDataStructsPropertiesMapPropertyPermission */2997export interface UpDataStructsPropertiesMapPropertyPermission extends BTreeMap<Bytes, UpDataStructsPropertyPermission> {}29982999/** @name UpDataStructsProperty */3000export interface UpDataStructsProperty extends Struct {3001 readonly key: Bytes;3002 readonly value: Bytes;3003}30043005/** @name UpDataStructsPropertyKeyPermission */3006export interface UpDataStructsPropertyKeyPermission extends Struct {3007 readonly key: Bytes;3008 readonly permission: UpDataStructsPropertyPermission;3009}30103011/** @name UpDataStructsPropertyPermission */3012export interface UpDataStructsPropertyPermission extends Struct {3013 readonly mutable: bool;3014 readonly collectionAdmin: bool;3015 readonly tokenOwner: bool;3016}30173018/** @name UpDataStructsPropertyScope */3019export interface UpDataStructsPropertyScope extends Enum {3020 readonly isNone: boolean;3021 readonly isRmrk: boolean;3022 readonly type: 'None' | 'Rmrk';3023}30243025/** @name UpDataStructsRpcCollection */3026export interface UpDataStructsRpcCollection extends Struct {3027 readonly owner: AccountId32;3028 readonly mode: UpDataStructsCollectionMode;3029 readonly name: Vec<u16>;3030 readonly description: Vec<u16>;3031 readonly tokenPrefix: Bytes;3032 readonly sponsorship: UpDataStructsSponsorshipStateAccountId32;3033 readonly limits: UpDataStructsCollectionLimits;3034 readonly permissions: UpDataStructsCollectionPermissions;3035 readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;3036 readonly properties: Vec<UpDataStructsProperty>;3037 readonly readOnly: bool;3038 readonly flags: UpDataStructsRpcCollectionFlags;3039}30403041/** @name UpDataStructsRpcCollectionFlags */3042export interface UpDataStructsRpcCollectionFlags extends Struct {3043 readonly foreign: bool;3044 readonly erc721metadata: bool;3045}30463047/** @name UpDataStructsSponsoringRateLimit */3048export interface UpDataStructsSponsoringRateLimit extends Enum {3049 readonly isSponsoringDisabled: boolean;3050 readonly isBlocks: boolean;3051 readonly asBlocks: u32;3052 readonly type: 'SponsoringDisabled' | 'Blocks';3053}30543055/** @name UpDataStructsSponsorshipStateAccountId32 */3056export interface UpDataStructsSponsorshipStateAccountId32 extends Enum {3057 readonly isDisabled: boolean;3058 readonly isUnconfirmed: boolean;3059 readonly asUnconfirmed: AccountId32;3060 readonly isConfirmed: boolean;3061 readonly asConfirmed: AccountId32;3062 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';3063}30643065/** @name UpDataStructsSponsorshipStateBasicCrossAccountIdRepr */3066export interface UpDataStructsSponsorshipStateBasicCrossAccountIdRepr extends Enum {3067 readonly isDisabled: boolean;3068 readonly isUnconfirmed: boolean;3069 readonly asUnconfirmed: PalletEvmAccountBasicCrossAccountIdRepr;3070 readonly isConfirmed: boolean;3071 readonly asConfirmed: PalletEvmAccountBasicCrossAccountIdRepr;3072 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';3073}30743075/** @name UpDataStructsTokenChild */3076export interface UpDataStructsTokenChild extends Struct {3077 readonly token: u32;3078 readonly collection: u32;3079}30803081/** @name UpDataStructsTokenData */3082export interface UpDataStructsTokenData extends Struct {3083 readonly properties: Vec<UpDataStructsProperty>;3084 readonly owner: Option<PalletEvmAccountBasicCrossAccountIdRepr>;3085 readonly pieces: u128;3086}30873088/** @name UpPovEstimateRpcPovInfo */3089export interface UpPovEstimateRpcPovInfo extends Struct {3090 readonly proofSize: u64;3091 readonly compactProofSize: u64;3092 readonly compressedProofSize: u64;3093 readonly results: Vec<Result<Result<Null, SpRuntimeDispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>;3094 readonly keyValues: Vec<UpPovEstimateRpcTrieKeyValue>;3095}30963097/** @name UpPovEstimateRpcTrieKeyValue */3098export interface UpPovEstimateRpcTrieKeyValue extends Struct {3099 readonly key: Bytes;3100 readonly value: Bytes;3101}31023103/** @name XcmDoubleEncoded */3104export interface XcmDoubleEncoded extends Struct {3105 readonly encoded: Bytes;3106}31073108/** @name XcmV0Junction */3109export interface XcmV0Junction extends Enum {3110 readonly isParent: boolean;3111 readonly isParachain: boolean;3112 readonly asParachain: Compact<u32>;3113 readonly isAccountId32: boolean;3114 readonly asAccountId32: {3115 readonly network: XcmV0JunctionNetworkId;3116 readonly id: U8aFixed;3117 } & Struct;3118 readonly isAccountIndex64: boolean;3119 readonly asAccountIndex64: {3120 readonly network: XcmV0JunctionNetworkId;3121 readonly index: Compact<u64>;3122 } & Struct;3123 readonly isAccountKey20: boolean;3124 readonly asAccountKey20: {3125 readonly network: XcmV0JunctionNetworkId;3126 readonly key: U8aFixed;3127 } & Struct;3128 readonly isPalletInstance: boolean;3129 readonly asPalletInstance: u8;3130 readonly isGeneralIndex: boolean;3131 readonly asGeneralIndex: Compact<u128>;3132 readonly isGeneralKey: boolean;3133 readonly asGeneralKey: Bytes;3134 readonly isOnlyChild: boolean;3135 readonly isPlurality: boolean;3136 readonly asPlurality: {3137 readonly id: XcmV0JunctionBodyId;3138 readonly part: XcmV0JunctionBodyPart;3139 } & Struct;3140 readonly type: 'Parent' | 'Parachain' | 'AccountId32' | 'AccountIndex64' | 'AccountKey20' | 'PalletInstance' | 'GeneralIndex' | 'GeneralKey' | 'OnlyChild' | 'Plurality';3141}31423143/** @name XcmV0JunctionBodyId */3144export interface XcmV0JunctionBodyId extends Enum {3145 readonly isUnit: boolean;3146 readonly isNamed: boolean;3147 readonly asNamed: Bytes;3148 readonly isIndex: boolean;3149 readonly asIndex: Compact<u32>;3150 readonly isExecutive: boolean;3151 readonly isTechnical: boolean;3152 readonly isLegislative: boolean;3153 readonly isJudicial: boolean;3154 readonly type: 'Unit' | 'Named' | 'Index' | 'Executive' | 'Technical' | 'Legislative' | 'Judicial';3155}31563157/** @name XcmV0JunctionBodyPart */3158export interface XcmV0JunctionBodyPart extends Enum {3159 readonly isVoice: boolean;3160 readonly isMembers: boolean;3161 readonly asMembers: {3162 readonly count: Compact<u32>;3163 } & Struct;3164 readonly isFraction: boolean;3165 readonly asFraction: {3166 readonly nom: Compact<u32>;3167 readonly denom: Compact<u32>;3168 } & Struct;3169 readonly isAtLeastProportion: boolean;3170 readonly asAtLeastProportion: {3171 readonly nom: Compact<u32>;3172 readonly denom: Compact<u32>;3173 } & Struct;3174 readonly isMoreThanProportion: boolean;3175 readonly asMoreThanProportion: {3176 readonly nom: Compact<u32>;3177 readonly denom: Compact<u32>;3178 } & Struct;3179 readonly type: 'Voice' | 'Members' | 'Fraction' | 'AtLeastProportion' | 'MoreThanProportion';3180}31813182/** @name XcmV0JunctionNetworkId */3183export interface XcmV0JunctionNetworkId extends Enum {3184 readonly isAny: boolean;3185 readonly isNamed: boolean;3186 readonly asNamed: Bytes;3187 readonly isPolkadot: boolean;3188 readonly isKusama: boolean;3189 readonly type: 'Any' | 'Named' | 'Polkadot' | 'Kusama';3190}31913192/** @name XcmV0MultiAsset */3193export interface XcmV0MultiAsset extends Enum {3194 readonly isNone: boolean;3195 readonly isAll: boolean;3196 readonly isAllFungible: boolean;3197 readonly isAllNonFungible: boolean;3198 readonly isAllAbstractFungible: boolean;3199 readonly asAllAbstractFungible: {3200 readonly id: Bytes;3201 } & Struct;3202 readonly isAllAbstractNonFungible: boolean;3203 readonly asAllAbstractNonFungible: {3204 readonly class: Bytes;3205 } & Struct;3206 readonly isAllConcreteFungible: boolean;3207 readonly asAllConcreteFungible: {3208 readonly id: XcmV0MultiLocation;3209 } & Struct;3210 readonly isAllConcreteNonFungible: boolean;3211 readonly asAllConcreteNonFungible: {3212 readonly class: XcmV0MultiLocation;3213 } & Struct;3214 readonly isAbstractFungible: boolean;3215 readonly asAbstractFungible: {3216 readonly id: Bytes;3217 readonly amount: Compact<u128>;3218 } & Struct;3219 readonly isAbstractNonFungible: boolean;3220 readonly asAbstractNonFungible: {3221 readonly class: Bytes;3222 readonly instance: XcmV1MultiassetAssetInstance;3223 } & Struct;3224 readonly isConcreteFungible: boolean;3225 readonly asConcreteFungible: {3226 readonly id: XcmV0MultiLocation;3227 readonly amount: Compact<u128>;3228 } & Struct;3229 readonly isConcreteNonFungible: boolean;3230 readonly asConcreteNonFungible: {3231 readonly class: XcmV0MultiLocation;3232 readonly instance: XcmV1MultiassetAssetInstance;3233 } & Struct;3234 readonly type: 'None' | 'All' | 'AllFungible' | 'AllNonFungible' | 'AllAbstractFungible' | 'AllAbstractNonFungible' | 'AllConcreteFungible' | 'AllConcreteNonFungible' | 'AbstractFungible' | 'AbstractNonFungible' | 'ConcreteFungible' | 'ConcreteNonFungible';3235}32363237/** @name XcmV0MultiLocation */3238export interface XcmV0MultiLocation extends Enum {3239 readonly isNull: boolean;3240 readonly isX1: boolean;3241 readonly asX1: XcmV0Junction;3242 readonly isX2: boolean;3243 readonly asX2: ITuple<[XcmV0Junction, XcmV0Junction]>;3244 readonly isX3: boolean;3245 readonly asX3: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction]>;3246 readonly isX4: boolean;3247 readonly asX4: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;3248 readonly isX5: boolean;3249 readonly asX5: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;3250 readonly isX6: boolean;3251 readonly asX6: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;3252 readonly isX7: boolean;3253 readonly asX7: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;3254 readonly isX8: boolean;3255 readonly asX8: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;3256 readonly type: 'Null' | 'X1' | 'X2' | 'X3' | 'X4' | 'X5' | 'X6' | 'X7' | 'X8';3257}32583259/** @name XcmV0Order */3260export interface XcmV0Order extends Enum {3261 readonly isNull: boolean;3262 readonly isDepositAsset: boolean;3263 readonly asDepositAsset: {3264 readonly assets: Vec<XcmV0MultiAsset>;3265 readonly dest: XcmV0MultiLocation;3266 } & Struct;3267 readonly isDepositReserveAsset: boolean;3268 readonly asDepositReserveAsset: {3269 readonly assets: Vec<XcmV0MultiAsset>;3270 readonly dest: XcmV0MultiLocation;3271 readonly effects: Vec<XcmV0Order>;3272 } & Struct;3273 readonly isExchangeAsset: boolean;3274 readonly asExchangeAsset: {3275 readonly give: Vec<XcmV0MultiAsset>;3276 readonly receive: Vec<XcmV0MultiAsset>;3277 } & Struct;3278 readonly isInitiateReserveWithdraw: boolean;3279 readonly asInitiateReserveWithdraw: {3280 readonly assets: Vec<XcmV0MultiAsset>;3281 readonly reserve: XcmV0MultiLocation;3282 readonly effects: Vec<XcmV0Order>;3283 } & Struct;3284 readonly isInitiateTeleport: boolean;3285 readonly asInitiateTeleport: {3286 readonly assets: Vec<XcmV0MultiAsset>;3287 readonly dest: XcmV0MultiLocation;3288 readonly effects: Vec<XcmV0Order>;3289 } & Struct;3290 readonly isQueryHolding: boolean;3291 readonly asQueryHolding: {3292 readonly queryId: Compact<u64>;3293 readonly dest: XcmV0MultiLocation;3294 readonly assets: Vec<XcmV0MultiAsset>;3295 } & Struct;3296 readonly isBuyExecution: boolean;3297 readonly asBuyExecution: {3298 readonly fees: XcmV0MultiAsset;3299 readonly weight: u64;3300 readonly debt: u64;3301 readonly haltOnError: bool;3302 readonly xcm: Vec<XcmV0Xcm>;3303 } & Struct;3304 readonly type: 'Null' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution';3305}33063307/** @name XcmV0OriginKind */3308export interface XcmV0OriginKind extends Enum {3309 readonly isNative: boolean;3310 readonly isSovereignAccount: boolean;3311 readonly isSuperuser: boolean;3312 readonly isXcm: boolean;3313 readonly type: 'Native' | 'SovereignAccount' | 'Superuser' | 'Xcm';3314}33153316/** @name XcmV0Response */3317export interface XcmV0Response extends Enum {3318 readonly isAssets: boolean;3319 readonly asAssets: Vec<XcmV0MultiAsset>;3320 readonly type: 'Assets';3321}33223323/** @name XcmV0Xcm */3324export interface XcmV0Xcm extends Enum {3325 readonly isWithdrawAsset: boolean;3326 readonly asWithdrawAsset: {3327 readonly assets: Vec<XcmV0MultiAsset>;3328 readonly effects: Vec<XcmV0Order>;3329 } & Struct;3330 readonly isReserveAssetDeposit: boolean;3331 readonly asReserveAssetDeposit: {3332 readonly assets: Vec<XcmV0MultiAsset>;3333 readonly effects: Vec<XcmV0Order>;3334 } & Struct;3335 readonly isTeleportAsset: boolean;3336 readonly asTeleportAsset: {3337 readonly assets: Vec<XcmV0MultiAsset>;3338 readonly effects: Vec<XcmV0Order>;3339 } & Struct;3340 readonly isQueryResponse: boolean;3341 readonly asQueryResponse: {3342 readonly queryId: Compact<u64>;3343 readonly response: XcmV0Response;3344 } & Struct;3345 readonly isTransferAsset: boolean;3346 readonly asTransferAsset: {3347 readonly assets: Vec<XcmV0MultiAsset>;3348 readonly dest: XcmV0MultiLocation;3349 } & Struct;3350 readonly isTransferReserveAsset: boolean;3351 readonly asTransferReserveAsset: {3352 readonly assets: Vec<XcmV0MultiAsset>;3353 readonly dest: XcmV0MultiLocation;3354 readonly effects: Vec<XcmV0Order>;3355 } & Struct;3356 readonly isTransact: boolean;3357 readonly asTransact: {3358 readonly originType: XcmV0OriginKind;3359 readonly requireWeightAtMost: u64;3360 readonly call: XcmDoubleEncoded;3361 } & Struct;3362 readonly isHrmpNewChannelOpenRequest: boolean;3363 readonly asHrmpNewChannelOpenRequest: {3364 readonly sender: Compact<u32>;3365 readonly maxMessageSize: Compact<u32>;3366 readonly maxCapacity: Compact<u32>;3367 } & Struct;3368 readonly isHrmpChannelAccepted: boolean;3369 readonly asHrmpChannelAccepted: {3370 readonly recipient: Compact<u32>;3371 } & Struct;3372 readonly isHrmpChannelClosing: boolean;3373 readonly asHrmpChannelClosing: {3374 readonly initiator: Compact<u32>;3375 readonly sender: Compact<u32>;3376 readonly recipient: Compact<u32>;3377 } & Struct;3378 readonly isRelayedFrom: boolean;3379 readonly asRelayedFrom: {3380 readonly who: XcmV0MultiLocation;3381 readonly message: XcmV0Xcm;3382 } & Struct;3383 readonly type: 'WithdrawAsset' | 'ReserveAssetDeposit' | 'TeleportAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'RelayedFrom';3384}33853386/** @name XcmV1Junction */3387export interface XcmV1Junction extends Enum {3388 readonly isParachain: boolean;3389 readonly asParachain: Compact<u32>;3390 readonly isAccountId32: boolean;3391 readonly asAccountId32: {3392 readonly network: XcmV0JunctionNetworkId;3393 readonly id: U8aFixed;3394 } & Struct;3395 readonly isAccountIndex64: boolean;3396 readonly asAccountIndex64: {3397 readonly network: XcmV0JunctionNetworkId;3398 readonly index: Compact<u64>;3399 } & Struct;3400 readonly isAccountKey20: boolean;3401 readonly asAccountKey20: {3402 readonly network: XcmV0JunctionNetworkId;3403 readonly key: U8aFixed;3404 } & Struct;3405 readonly isPalletInstance: boolean;3406 readonly asPalletInstance: u8;3407 readonly isGeneralIndex: boolean;3408 readonly asGeneralIndex: Compact<u128>;3409 readonly isGeneralKey: boolean;3410 readonly asGeneralKey: Bytes;3411 readonly isOnlyChild: boolean;3412 readonly isPlurality: boolean;3413 readonly asPlurality: {3414 readonly id: XcmV0JunctionBodyId;3415 readonly part: XcmV0JunctionBodyPart;3416 } & Struct;3417 readonly type: 'Parachain' | 'AccountId32' | 'AccountIndex64' | 'AccountKey20' | 'PalletInstance' | 'GeneralIndex' | 'GeneralKey' | 'OnlyChild' | 'Plurality';3418}34193420/** @name XcmV1MultiAsset */3421export interface XcmV1MultiAsset extends Struct {3422 readonly id: XcmV1MultiassetAssetId;3423 readonly fun: XcmV1MultiassetFungibility;3424}34253426/** @name XcmV1MultiassetAssetId */3427export interface XcmV1MultiassetAssetId extends Enum {3428 readonly isConcrete: boolean;3429 readonly asConcrete: XcmV1MultiLocation;3430 readonly isAbstract: boolean;3431 readonly asAbstract: Bytes;3432 readonly type: 'Concrete' | 'Abstract';3433}34343435/** @name XcmV1MultiassetAssetInstance */3436export interface XcmV1MultiassetAssetInstance extends Enum {3437 readonly isUndefined: boolean;3438 readonly isIndex: boolean;3439 readonly asIndex: Compact<u128>;3440 readonly isArray4: boolean;3441 readonly asArray4: U8aFixed;3442 readonly isArray8: boolean;3443 readonly asArray8: U8aFixed;3444 readonly isArray16: boolean;3445 readonly asArray16: U8aFixed;3446 readonly isArray32: boolean;3447 readonly asArray32: U8aFixed;3448 readonly isBlob: boolean;3449 readonly asBlob: Bytes;3450 readonly type: 'Undefined' | 'Index' | 'Array4' | 'Array8' | 'Array16' | 'Array32' | 'Blob';3451}34523453/** @name XcmV1MultiassetFungibility */3454export interface XcmV1MultiassetFungibility extends Enum {3455 readonly isFungible: boolean;3456 readonly asFungible: Compact<u128>;3457 readonly isNonFungible: boolean;3458 readonly asNonFungible: XcmV1MultiassetAssetInstance;3459 readonly type: 'Fungible' | 'NonFungible';3460}34613462/** @name XcmV1MultiassetMultiAssetFilter */3463export interface XcmV1MultiassetMultiAssetFilter extends Enum {3464 readonly isDefinite: boolean;3465 readonly asDefinite: XcmV1MultiassetMultiAssets;3466 readonly isWild: boolean;3467 readonly asWild: XcmV1MultiassetWildMultiAsset;3468 readonly type: 'Definite' | 'Wild';3469}34703471/** @name XcmV1MultiassetMultiAssets */3472export interface XcmV1MultiassetMultiAssets extends Vec<XcmV1MultiAsset> {}34733474/** @name XcmV1MultiassetWildFungibility */3475export interface XcmV1MultiassetWildFungibility extends Enum {3476 readonly isFungible: boolean;3477 readonly isNonFungible: boolean;3478 readonly type: 'Fungible' | 'NonFungible';3479}34803481/** @name XcmV1MultiassetWildMultiAsset */3482export interface XcmV1MultiassetWildMultiAsset extends Enum {3483 readonly isAll: boolean;3484 readonly isAllOf: boolean;3485 readonly asAllOf: {3486 readonly id: XcmV1MultiassetAssetId;3487 readonly fun: XcmV1MultiassetWildFungibility;3488 } & Struct;3489 readonly type: 'All' | 'AllOf';3490}34913492/** @name XcmV1MultiLocation */3493export interface XcmV1MultiLocation extends Struct {3494 readonly parents: u8;3495 readonly interior: XcmV1MultilocationJunctions;3496}34973498/** @name XcmV1MultilocationJunctions */3499export interface XcmV1MultilocationJunctions extends Enum {3500 readonly isHere: boolean;3501 readonly isX1: boolean;3502 readonly asX1: XcmV1Junction;3503 readonly isX2: boolean;3504 readonly asX2: ITuple<[XcmV1Junction, XcmV1Junction]>;3505 readonly isX3: boolean;3506 readonly asX3: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction]>;3507 readonly isX4: boolean;3508 readonly asX4: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;3509 readonly isX5: boolean;3510 readonly asX5: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;3511 readonly isX6: boolean;3512 readonly asX6: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;3513 readonly isX7: boolean;3514 readonly asX7: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;3515 readonly isX8: boolean;3516 readonly asX8: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;3517 readonly type: 'Here' | 'X1' | 'X2' | 'X3' | 'X4' | 'X5' | 'X6' | 'X7' | 'X8';3518}35193520/** @name XcmV1Order */3521export interface XcmV1Order extends Enum {3522 readonly isNoop: boolean;3523 readonly isDepositAsset: boolean;3524 readonly asDepositAsset: {3525 readonly assets: XcmV1MultiassetMultiAssetFilter;3526 readonly maxAssets: u32;3527 readonly beneficiary: XcmV1MultiLocation;3528 } & Struct;3529 readonly isDepositReserveAsset: boolean;3530 readonly asDepositReserveAsset: {3531 readonly assets: XcmV1MultiassetMultiAssetFilter;3532 readonly maxAssets: u32;3533 readonly dest: XcmV1MultiLocation;3534 readonly effects: Vec<XcmV1Order>;3535 } & Struct;3536 readonly isExchangeAsset: boolean;3537 readonly asExchangeAsset: {3538 readonly give: XcmV1MultiassetMultiAssetFilter;3539 readonly receive: XcmV1MultiassetMultiAssets;3540 } & Struct;3541 readonly isInitiateReserveWithdraw: boolean;3542 readonly asInitiateReserveWithdraw: {3543 readonly assets: XcmV1MultiassetMultiAssetFilter;3544 readonly reserve: XcmV1MultiLocation;3545 readonly effects: Vec<XcmV1Order>;3546 } & Struct;3547 readonly isInitiateTeleport: boolean;3548 readonly asInitiateTeleport: {3549 readonly assets: XcmV1MultiassetMultiAssetFilter;3550 readonly dest: XcmV1MultiLocation;3551 readonly effects: Vec<XcmV1Order>;3552 } & Struct;3553 readonly isQueryHolding: boolean;3554 readonly asQueryHolding: {3555 readonly queryId: Compact<u64>;3556 readonly dest: XcmV1MultiLocation;3557 readonly assets: XcmV1MultiassetMultiAssetFilter;3558 } & Struct;3559 readonly isBuyExecution: boolean;3560 readonly asBuyExecution: {3561 readonly fees: XcmV1MultiAsset;3562 readonly weight: u64;3563 readonly debt: u64;3564 readonly haltOnError: bool;3565 readonly instructions: Vec<XcmV1Xcm>;3566 } & Struct;3567 readonly type: 'Noop' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution';3568}35693570/** @name XcmV1Response */3571export interface XcmV1Response extends Enum {3572 readonly isAssets: boolean;3573 readonly asAssets: XcmV1MultiassetMultiAssets;3574 readonly isVersion: boolean;3575 readonly asVersion: u32;3576 readonly type: 'Assets' | 'Version';3577}35783579/** @name XcmV1Xcm */3580export interface XcmV1Xcm extends Enum {3581 readonly isWithdrawAsset: boolean;3582 readonly asWithdrawAsset: {3583 readonly assets: XcmV1MultiassetMultiAssets;3584 readonly effects: Vec<XcmV1Order>;3585 } & Struct;3586 readonly isReserveAssetDeposited: boolean;3587 readonly asReserveAssetDeposited: {3588 readonly assets: XcmV1MultiassetMultiAssets;3589 readonly effects: Vec<XcmV1Order>;3590 } & Struct;3591 readonly isReceiveTeleportedAsset: boolean;3592 readonly asReceiveTeleportedAsset: {3593 readonly assets: XcmV1MultiassetMultiAssets;3594 readonly effects: Vec<XcmV1Order>;3595 } & Struct;3596 readonly isQueryResponse: boolean;3597 readonly asQueryResponse: {3598 readonly queryId: Compact<u64>;3599 readonly response: XcmV1Response;3600 } & Struct;3601 readonly isTransferAsset: boolean;3602 readonly asTransferAsset: {3603 readonly assets: XcmV1MultiassetMultiAssets;3604 readonly beneficiary: XcmV1MultiLocation;3605 } & Struct;3606 readonly isTransferReserveAsset: boolean;3607 readonly asTransferReserveAsset: {3608 readonly assets: XcmV1MultiassetMultiAssets;3609 readonly dest: XcmV1MultiLocation;3610 readonly effects: Vec<XcmV1Order>;3611 } & Struct;3612 readonly isTransact: boolean;3613 readonly asTransact: {3614 readonly originType: XcmV0OriginKind;3615 readonly requireWeightAtMost: u64;3616 readonly call: XcmDoubleEncoded;3617 } & Struct;3618 readonly isHrmpNewChannelOpenRequest: boolean;3619 readonly asHrmpNewChannelOpenRequest: {3620 readonly sender: Compact<u32>;3621 readonly maxMessageSize: Compact<u32>;3622 readonly maxCapacity: Compact<u32>;3623 } & Struct;3624 readonly isHrmpChannelAccepted: boolean;3625 readonly asHrmpChannelAccepted: {3626 readonly recipient: Compact<u32>;3627 } & Struct;3628 readonly isHrmpChannelClosing: boolean;3629 readonly asHrmpChannelClosing: {3630 readonly initiator: Compact<u32>;3631 readonly sender: Compact<u32>;3632 readonly recipient: Compact<u32>;3633 } & Struct;3634 readonly isRelayedFrom: boolean;3635 readonly asRelayedFrom: {3636 readonly who: XcmV1MultilocationJunctions;3637 readonly message: XcmV1Xcm;3638 } & Struct;3639 readonly isSubscribeVersion: boolean;3640 readonly asSubscribeVersion: {3641 readonly queryId: Compact<u64>;3642 readonly maxResponseWeight: Compact<u64>;3643 } & Struct;3644 readonly isUnsubscribeVersion: boolean;3645 readonly type: 'WithdrawAsset' | 'ReserveAssetDeposited' | 'ReceiveTeleportedAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'RelayedFrom' | 'SubscribeVersion' | 'UnsubscribeVersion';3646}36473648/** @name XcmV2Instruction */3649export interface XcmV2Instruction extends Enum {3650 readonly isWithdrawAsset: boolean;3651 readonly asWithdrawAsset: XcmV1MultiassetMultiAssets;3652 readonly isReserveAssetDeposited: boolean;3653 readonly asReserveAssetDeposited: XcmV1MultiassetMultiAssets;3654 readonly isReceiveTeleportedAsset: boolean;3655 readonly asReceiveTeleportedAsset: XcmV1MultiassetMultiAssets;3656 readonly isQueryResponse: boolean;3657 readonly asQueryResponse: {3658 readonly queryId: Compact<u64>;3659 readonly response: XcmV2Response;3660 readonly maxWeight: Compact<u64>;3661 } & Struct;3662 readonly isTransferAsset: boolean;3663 readonly asTransferAsset: {3664 readonly assets: XcmV1MultiassetMultiAssets;3665 readonly beneficiary: XcmV1MultiLocation;3666 } & Struct;3667 readonly isTransferReserveAsset: boolean;3668 readonly asTransferReserveAsset: {3669 readonly assets: XcmV1MultiassetMultiAssets;3670 readonly dest: XcmV1MultiLocation;3671 readonly xcm: XcmV2Xcm;3672 } & Struct;3673 readonly isTransact: boolean;3674 readonly asTransact: {3675 readonly originType: XcmV0OriginKind;3676 readonly requireWeightAtMost: Compact<u64>;3677 readonly call: XcmDoubleEncoded;3678 } & Struct;3679 readonly isHrmpNewChannelOpenRequest: boolean;3680 readonly asHrmpNewChannelOpenRequest: {3681 readonly sender: Compact<u32>;3682 readonly maxMessageSize: Compact<u32>;3683 readonly maxCapacity: Compact<u32>;3684 } & Struct;3685 readonly isHrmpChannelAccepted: boolean;3686 readonly asHrmpChannelAccepted: {3687 readonly recipient: Compact<u32>;3688 } & Struct;3689 readonly isHrmpChannelClosing: boolean;3690 readonly asHrmpChannelClosing: {3691 readonly initiator: Compact<u32>;3692 readonly sender: Compact<u32>;3693 readonly recipient: Compact<u32>;3694 } & Struct;3695 readonly isClearOrigin: boolean;3696 readonly isDescendOrigin: boolean;3697 readonly asDescendOrigin: XcmV1MultilocationJunctions;3698 readonly isReportError: boolean;3699 readonly asReportError: {3700 readonly queryId: Compact<u64>;3701 readonly dest: XcmV1MultiLocation;3702 readonly maxResponseWeight: Compact<u64>;3703 } & Struct;3704 readonly isDepositAsset: boolean;3705 readonly asDepositAsset: {3706 readonly assets: XcmV1MultiassetMultiAssetFilter;3707 readonly maxAssets: Compact<u32>;3708 readonly beneficiary: XcmV1MultiLocation;3709 } & Struct;3710 readonly isDepositReserveAsset: boolean;3711 readonly asDepositReserveAsset: {3712 readonly assets: XcmV1MultiassetMultiAssetFilter;3713 readonly maxAssets: Compact<u32>;3714 readonly dest: XcmV1MultiLocation;3715 readonly xcm: XcmV2Xcm;3716 } & Struct;3717 readonly isExchangeAsset: boolean;3718 readonly asExchangeAsset: {3719 readonly give: XcmV1MultiassetMultiAssetFilter;3720 readonly receive: XcmV1MultiassetMultiAssets;3721 } & Struct;3722 readonly isInitiateReserveWithdraw: boolean;3723 readonly asInitiateReserveWithdraw: {3724 readonly assets: XcmV1MultiassetMultiAssetFilter;3725 readonly reserve: XcmV1MultiLocation;3726 readonly xcm: XcmV2Xcm;3727 } & Struct;3728 readonly isInitiateTeleport: boolean;3729 readonly asInitiateTeleport: {3730 readonly assets: XcmV1MultiassetMultiAssetFilter;3731 readonly dest: XcmV1MultiLocation;3732 readonly xcm: XcmV2Xcm;3733 } & Struct;3734 readonly isQueryHolding: boolean;3735 readonly asQueryHolding: {3736 readonly queryId: Compact<u64>;3737 readonly dest: XcmV1MultiLocation;3738 readonly assets: XcmV1MultiassetMultiAssetFilter;3739 readonly maxResponseWeight: Compact<u64>;3740 } & Struct;3741 readonly isBuyExecution: boolean;3742 readonly asBuyExecution: {3743 readonly fees: XcmV1MultiAsset;3744 readonly weightLimit: XcmV2WeightLimit;3745 } & Struct;3746 readonly isRefundSurplus: boolean;3747 readonly isSetErrorHandler: boolean;3748 readonly asSetErrorHandler: XcmV2Xcm;3749 readonly isSetAppendix: boolean;3750 readonly asSetAppendix: XcmV2Xcm;3751 readonly isClearError: boolean;3752 readonly isClaimAsset: boolean;3753 readonly asClaimAsset: {3754 readonly assets: XcmV1MultiassetMultiAssets;3755 readonly ticket: XcmV1MultiLocation;3756 } & Struct;3757 readonly isTrap: boolean;3758 readonly asTrap: Compact<u64>;3759 readonly isSubscribeVersion: boolean;3760 readonly asSubscribeVersion: {3761 readonly queryId: Compact<u64>;3762 readonly maxResponseWeight: Compact<u64>;3763 } & Struct;3764 readonly isUnsubscribeVersion: boolean;3765 readonly type: 'WithdrawAsset' | 'ReserveAssetDeposited' | 'ReceiveTeleportedAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'ClearOrigin' | 'DescendOrigin' | 'ReportError' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution' | 'RefundSurplus' | 'SetErrorHandler' | 'SetAppendix' | 'ClearError' | 'ClaimAsset' | 'Trap' | 'SubscribeVersion' | 'UnsubscribeVersion';3766}37673768/** @name XcmV2Response */3769export interface XcmV2Response extends Enum {3770 readonly isNull: boolean;3771 readonly isAssets: boolean;3772 readonly asAssets: XcmV1MultiassetMultiAssets;3773 readonly isExecutionResult: boolean;3774 readonly asExecutionResult: Option<ITuple<[u32, XcmV2TraitsError]>>;3775 readonly isVersion: boolean;3776 readonly asVersion: u32;3777 readonly type: 'Null' | 'Assets' | 'ExecutionResult' | 'Version';3778}37793780/** @name XcmV2TraitsError */3781export interface XcmV2TraitsError extends Enum {3782 readonly isOverflow: boolean;3783 readonly isUnimplemented: boolean;3784 readonly isUntrustedReserveLocation: boolean;3785 readonly isUntrustedTeleportLocation: boolean;3786 readonly isMultiLocationFull: boolean;3787 readonly isMultiLocationNotInvertible: boolean;3788 readonly isBadOrigin: boolean;3789 readonly isInvalidLocation: boolean;3790 readonly isAssetNotFound: boolean;3791 readonly isFailedToTransactAsset: boolean;3792 readonly isNotWithdrawable: boolean;3793 readonly isLocationCannotHold: boolean;3794 readonly isExceedsMaxMessageSize: boolean;3795 readonly isDestinationUnsupported: boolean;3796 readonly isTransport: boolean;3797 readonly isUnroutable: boolean;3798 readonly isUnknownClaim: boolean;3799 readonly isFailedToDecode: boolean;3800 readonly isMaxWeightInvalid: boolean;3801 readonly isNotHoldingFees: boolean;3802 readonly isTooExpensive: boolean;3803 readonly isTrap: boolean;3804 readonly asTrap: u64;3805 readonly isUnhandledXcmVersion: boolean;3806 readonly isWeightLimitReached: boolean;3807 readonly asWeightLimitReached: u64;3808 readonly isBarrier: boolean;3809 readonly isWeightNotComputable: boolean;3810 readonly type: 'Overflow' | 'Unimplemented' | 'UntrustedReserveLocation' | 'UntrustedTeleportLocation' | 'MultiLocationFull' | 'MultiLocationNotInvertible' | 'BadOrigin' | 'InvalidLocation' | 'AssetNotFound' | 'FailedToTransactAsset' | 'NotWithdrawable' | 'LocationCannotHold' | 'ExceedsMaxMessageSize' | 'DestinationUnsupported' | 'Transport' | 'Unroutable' | 'UnknownClaim' | 'FailedToDecode' | 'MaxWeightInvalid' | 'NotHoldingFees' | 'TooExpensive' | 'Trap' | 'UnhandledXcmVersion' | 'WeightLimitReached' | 'Barrier' | 'WeightNotComputable';3811}38123813/** @name XcmV2TraitsOutcome */3814export interface XcmV2TraitsOutcome extends Enum {3815 readonly isComplete: boolean;3816 readonly asComplete: u64;3817 readonly isIncomplete: boolean;3818 readonly asIncomplete: ITuple<[u64, XcmV2TraitsError]>;3819 readonly isError: boolean;3820 readonly asError: XcmV2TraitsError;3821 readonly type: 'Complete' | 'Incomplete' | 'Error';3822}38233824/** @name XcmV2WeightLimit */3825export interface XcmV2WeightLimit extends Enum {3826 readonly isUnlimited: boolean;3827 readonly isLimited: boolean;3828 readonly asLimited: Compact<u64>;3829 readonly type: 'Unlimited' | 'Limited';3830}38313832/** @name XcmV2Xcm */3833export interface XcmV2Xcm extends Vec<XcmV2Instruction> {}38343835/** @name XcmVersionedMultiAsset */3836export interface XcmVersionedMultiAsset extends Enum {3837 readonly isV0: boolean;3838 readonly asV0: XcmV0MultiAsset;3839 readonly isV1: boolean;3840 readonly asV1: XcmV1MultiAsset;3841 readonly type: 'V0' | 'V1';3842}38433844/** @name XcmVersionedMultiAssets */3845export interface XcmVersionedMultiAssets extends Enum {3846 readonly isV0: boolean;3847 readonly asV0: Vec<XcmV0MultiAsset>;3848 readonly isV1: boolean;3849 readonly asV1: XcmV1MultiassetMultiAssets;3850 readonly type: 'V0' | 'V1';3851}38523853/** @name XcmVersionedMultiLocation */3854export interface XcmVersionedMultiLocation extends Enum {3855 readonly isV0: boolean;3856 readonly asV0: XcmV0MultiLocation;3857 readonly isV1: boolean;3858 readonly asV1: XcmV1MultiLocation;3859 readonly type: 'V0' | 'V1';3860}38613862/** @name XcmVersionedXcm */3863export interface XcmVersionedXcm extends Enum {3864 readonly isV0: boolean;3865 readonly asV0: XcmV0Xcm;3866 readonly isV1: boolean;3867 readonly asV1: XcmV1Xcm;3868 readonly isV2: boolean;3869 readonly asV2: XcmV2Xcm;3870 readonly type: 'V0' | 'V1' | 'V2';3871}38723873export type PHANTOM_DEFAULT = 'default';tests/src/interfaces/lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/lookup.ts
+++ b/tests/src/interfaces/lookup.ts
@@ -2264,6 +2264,13 @@
itemId: 'u32',
amount: 'u128',
},
+ approve_from: {
+ from: 'PalletEvmAccountBasicCrossAccountIdRepr',
+ to: 'PalletEvmAccountBasicCrossAccountIdRepr',
+ collectionId: 'u32',
+ itemId: 'u32',
+ amount: 'u128',
+ },
transfer_from: {
from: 'PalletEvmAccountBasicCrossAccountIdRepr',
recipient: 'PalletEvmAccountBasicCrossAccountIdRepr',
@@ -3280,7 +3287,7 @@
* Lookup423: pallet_common::pallet::Error<T>
**/
PalletCommonError: {
- _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'CantDestroyNotEmptyCollection', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsZero', 'UnsupportedOperation', 'NotSufficientFounds', 'UserIsNotAllowedToNest', 'SourceCollectionIsNotAllowedToNest', 'CollectionFieldSizeExceeded', 'NoSpaceForProperty', 'PropertyLimitReached', 'PropertyKeyIsTooLong', 'InvalidCharacterInPropertyKey', 'EmptyPropertyKey', 'CollectionIsExternal', 'CollectionIsInternal', 'ConfirmSponsorshipFail', 'UserIsNotCollectionAdmin']
+ _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'CantDestroyNotEmptyCollection', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsNotEthMirror', 'AddressIsZero', 'UnsupportedOperation', 'NotSufficientFounds', 'UserIsNotAllowedToNest', 'SourceCollectionIsNotAllowedToNest', 'CollectionFieldSizeExceeded', 'NoSpaceForProperty', 'PropertyLimitReached', 'PropertyKeyIsTooLong', 'InvalidCharacterInPropertyKey', 'EmptyPropertyKey', 'CollectionIsExternal', 'CollectionIsInternal', 'ConfirmSponsorshipFail', 'UserIsNotCollectionAdmin']
},
/**
* Lookup425: pallet_fungible::pallet::Error<T>
tests/src/interfaces/types-lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/types-lookup.ts
+++ b/tests/src/interfaces/types-lookup.ts
@@ -2493,6 +2493,14 @@
readonly itemId: u32;
readonly amount: u128;
} & Struct;
+ readonly isApproveFrom: boolean;
+ readonly asApproveFrom: {
+ readonly from: PalletEvmAccountBasicCrossAccountIdRepr;
+ readonly to: PalletEvmAccountBasicCrossAccountIdRepr;
+ readonly collectionId: u32;
+ readonly itemId: u32;
+ readonly amount: u128;
+ } & Struct;
readonly isTransferFrom: boolean;
readonly asTransferFrom: {
readonly from: PalletEvmAccountBasicCrossAccountIdRepr;
@@ -2532,7 +2540,7 @@
readonly collectionId: u32;
readonly itemId: u32;
} & Struct;
- readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition' | 'SetAllowanceForAll' | 'ForceRepairCollection' | 'ForceRepairItem';
+ readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'ApproveFrom' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition' | 'SetAllowanceForAll' | 'ForceRepairCollection' | 'ForceRepairItem';
}
/** @name UpDataStructsCollectionMode (236) */
@@ -3564,6 +3572,7 @@
readonly isTokenValueTooLow: boolean;
readonly isApprovedValueTooLow: boolean;
readonly isCantApproveMoreThanOwned: boolean;
+ readonly isAddressIsNotEthMirror: boolean;
readonly isAddressIsZero: boolean;
readonly isUnsupportedOperation: boolean;
readonly isNotSufficientFounds: boolean;
@@ -3579,7 +3588,7 @@
readonly isCollectionIsInternal: boolean;
readonly isConfirmSponsorshipFail: boolean;
readonly isUserIsNotCollectionAdmin: boolean;
- readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'CantDestroyNotEmptyCollection' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'UserIsNotAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey' | 'CollectionIsExternal' | 'CollectionIsInternal' | 'ConfirmSponsorshipFail' | 'UserIsNotCollectionAdmin';
+ readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'CantDestroyNotEmptyCollection' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsNotEthMirror' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'UserIsNotAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey' | 'CollectionIsExternal' | 'CollectionIsInternal' | 'ConfirmSponsorshipFail' | 'UserIsNotCollectionAdmin';
}
/** @name PalletFungibleError (425) */
tests/src/util/playgrounds/unique.tsdiffbeforeafterboth--- a/tests/src/util/playgrounds/unique.ts
+++ b/tests/src/util/playgrounds/unique.ts
@@ -633,6 +633,10 @@
let call = this.getApi() as any;
for(const part of apiCall.slice(4).split('.')) {
call = call[part];
+ if (!call) {
+ const advice = part.includes('_') ? ' Looks like it needs to be converted to camel case.' : '';
+ throw Error(`Function ${part} of api call ${apiCall} not found.${advice}`);
+ }
}
return call(...params);
}
@@ -1259,6 +1263,42 @@
}
/**
+ * Set, change, or remove approved address to transfer the ownership of the NFT from eth mirror.
+ *
+ * @param signer keyring of signer
+ * @param collectionId ID of collection
+ * @param tokenId ID of token
+ * @param fromAddressObj Signer's Ethereum address containing her tokens
+ * @param toAddressObj Substrate or Ethereum address which gets approved use of the signer's tokens
+ * @param amount amount of token to be approved. For NFT must be set to 1n
+ * @returns ```true``` if extrinsic success, otherwise ```false```
+ */
+ async approveTokenFrom(signer: IKeyringPair, collectionId: number, tokenId: number, fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId, amount=1n) {
+ const approveResult = await this.helper.executeExtrinsic(
+ signer,
+ 'api.tx.unique.approveFrom', [fromAddressObj, toAddressObj, collectionId, tokenId, amount],
+ true, // `Unable to approve token for ${label}`,
+ );
+
+ return this.helper.util.findCollectionInEvents(approveResult.result.events, collectionId, 'common', 'Approved');
+ }
+
+ /**
+ * Set, change, or remove approved address to transfer the ownership of the NFT from eth mirror.
+ *
+ * @param signer keyring of signer
+ * @param collectionId ID of collection
+ * @param tokenId ID of token
+ * @param toAddressObj Substrate or Ethereum address which gets approved use of the signer's tokens
+ * @param amount amount of token to be approved. For NFT must be set to 1n
+ * @returns ```true``` if extrinsic success, otherwise ```false```
+ */
+ async approveTokenFromEth(signer: IKeyringPair, collectionId: number, tokenId: number, toAddressObj: ICrossAccountId, amount=1n) {
+ const ethMirror = CrossAccountId.fromKeyring(signer).toEthereum();
+ return await this.approveTokenFrom(signer, collectionId, tokenId, ethMirror, toAddressObj, amount);
+ }
+
+ /**
* Get the amount of token pieces approved to transfer or burn. Normally 0.
*
* @param collectionId ID of collection
@@ -1756,8 +1796,8 @@
* @example approveToken(aliceKeyring, 10, 5, {Substrate: "5DyN4Y92vZCjv38fg..."})
* @returns ```true``` if extrinsic success, otherwise ```false```
*/
- approveToken(signer: IKeyringPair, collectionId: number, tokenId: number, toAddressObj: ICrossAccountId) {
- return super.approveToken(signer, collectionId, tokenId, toAddressObj, 1n);
+ approveToken(signer: IKeyringPair, collectionId: number, tokenId: number, toAddressObj: ICrossAccountId, amount=1n) {
+ return super.approveToken(signer, collectionId, tokenId, toAddressObj, amount);
}
}