git.delta.rocks / unique-network / refs/commits / 504df77ef385

difftreelog

refactor nesting permission structure

Yaroslav Bolyukin2022-06-10parent: #bb7c8cc.patch.diff
in: master

20 files changed

modifiedpallets/common/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/common/src/benchmarking.rs
+++ b/pallets/common/src/benchmarking.rs
@@ -20,7 +20,7 @@
 use frame_benchmarking::{benchmarks, account};
 use up_data_structs::{
 	CollectionMode, CreateCollectionData, CollectionId, Property, PropertyKey, PropertyValue,
-	CollectionPermissions, NestingRule, MAX_COLLECTION_NAME_LENGTH,
+	CollectionPermissions, NestingPermissions, MAX_COLLECTION_NAME_LENGTH,
 	MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH, MAX_PROPERTIES_PER_ITEM,
 };
 use frame_support::{
@@ -94,7 +94,12 @@
 			description,
 			token_prefix,
 			permissions: Some(CollectionPermissions {
-				nesting: Some(NestingRule::Permissive),
+				nesting: Some(NestingPermissions {
+					token_owner: false,
+					admin: false,
+					restricted: None,
+					permissive: true,
+				}),
 				..Default::default()
 			}),
 			..Default::default()
modifiedpallets/common/src/erc.rsdiffbeforeafterboth
--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -22,7 +22,7 @@
 pub use pallet_evm::{PrecompileOutput, PrecompileResult, PrecompileHandle, account::CrossAccountId};
 use pallet_evm_coder_substrate::dispatch_to_evm;
 use sp_std::vec::Vec;
-use up_data_structs::{Property, SponsoringRateLimit, NestingRule, OwnerRestrictedSet, AccessMode};
+use up_data_structs::{Property, SponsoringRateLimit, OwnerRestrictedSet, AccessMode};
 use alloc::format;
 
 use crate::{Pallet, CollectionHandle, Config, CollectionProperties};
@@ -215,12 +215,21 @@
 		let caller = T::CrossAccountId::from_eth(caller);
 		self.check_is_owner_or_admin(&caller)
 			.map_err(dispatch_to_evm::<T>)?;
-		self.collection.permissions.nesting = Some(match enable {
-			false => NestingRule::Disabled,
-			true => NestingRule::Owner,
-		});
-		save(self)?;
-		Ok(())
+
+		let mut permissions = self.collection.permissions.clone();
+		let mut nesting = permissions.nesting().clone();
+		nesting.token_owner = enable;
+		nesting.restricted = None;
+		permissions.nesting = Some(nesting);
+
+		self.collection.permissions = <Pallet<T>>::clamp_permissions(
+			self.collection.mode.clone(),
+			&self.collection.permissions,
+			permissions,
+		)
+		.map_err(dispatch_to_evm::<T>)?;
+
+		save(self)
 	}
 
 	#[solidity(rename_selector = "setCollectionNesting")]
@@ -233,31 +242,41 @@
 		if collections.is_empty() {
 			return Err("No addresses provided".into());
 		}
-		if collections.len() >= OwnerRestrictedSet::bound() {
-			return Err(Error::Revert(format!(
-				"Out of bound: {} >= {}",
-				collections.len(),
-				OwnerRestrictedSet::bound()
-			)));
-		}
 		let caller = T::CrossAccountId::from_eth(caller);
 		self.check_is_owner_or_admin(&caller)
 			.map_err(dispatch_to_evm::<T>)?;
-		self.collection.permissions.nesting = Some(match enable {
-			false => NestingRule::Disabled,
+
+		let mut permissions = self.collection.permissions.clone();
+		match enable {
+			false => {
+				let mut nesting = permissions.nesting().clone();
+				nesting.token_owner = false;
+				nesting.restricted = None;
+				permissions.nesting = Some(nesting);
+			}
 			true => {
 				let mut bv = OwnerRestrictedSet::new();
 				for i in collections {
 					bv.try_insert(crate::eth::map_eth_to_id(&i).ok_or(Error::Revert(
 						"Can't convert address into collection id".into(),
 					))?)
-					.map_err(|e| Error::Revert(format!("{:?}", e)))?;
+					.map_err(|_| "too many collections")?;
 				}
-				NestingRule::OwnerRestricted(bv)
+				let mut nesting = permissions.nesting().clone();
+				nesting.token_owner = true;
+				nesting.restricted = Some(bv);
+				permissions.nesting = Some(nesting);
 			}
-		});
-		save(self)?;
-		Ok(())
+		};
+
+		self.collection.permissions = <Pallet<T>>::clamp_permissions(
+			self.collection.mode.clone(),
+			&self.collection.permissions,
+			permissions,
+		)
+		.map_err(dispatch_to_evm::<T>)?;
+
+		save(self)
 	}
 
 	fn set_collection_access(&mut self, caller: caller, mode: uint8) -> Result<void> {
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
before · pallets/common/src/lib.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617#![cfg_attr(not(feature = "std"), no_std)]1819extern crate alloc;2021use core::ops::{Deref, DerefMut};22use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};23use sp_std::vec::Vec;24use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};25use evm_coder::ToLog;26use frame_support::{27	dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo, Weight, PostDispatchInfo},28	ensure,29	traits::{Imbalance, Get, Currency, WithdrawReasons, ExistenceRequirement},30	weights::Pays,31	transactional,32};33use pallet_evm::GasWeightMapping;34use up_data_structs::{35	COLLECTION_NUMBER_LIMIT,36	Collection,37	RpcCollection,38	CollectionId,39	CreateItemData,40	MAX_TOKEN_PREFIX_LENGTH,41	COLLECTION_ADMINS_LIMIT,42	TokenId,43	TokenChild,44	CollectionStats,45	MAX_TOKEN_OWNERSHIP,46	CollectionMode,47	NFT_SPONSOR_TRANSFER_TIMEOUT,48	FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,49	REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,50	MAX_SPONSOR_TIMEOUT,51	CUSTOM_DATA_LIMIT,52	CollectionLimits,53	CreateCollectionData,54	SponsorshipState,55	CreateItemExData,56	SponsoringRateLimit,57	budget::Budget,58	PhantomType,59	Property,60	Properties,61	PropertiesPermissionMap,62	PropertyKey,63	PropertyValue,64	PropertyPermission,65	PropertiesError,66	PropertyKeyPermission,67	TokenData,68	TrySetProperty,69	PropertyScope,70	// RMRK71	RmrkCollectionInfo,72	RmrkInstanceInfo,73	RmrkResourceInfo,74	RmrkPropertyInfo,75	RmrkBaseInfo,76	RmrkPartType,77	RmrkTheme,78	RmrkNftChild,79	CollectionPermissions,80	SchemaVersion,81};8283pub use pallet::*;84use sp_core::H160;85use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};86#[cfg(feature = "runtime-benchmarks")]87pub mod benchmarking;88pub mod dispatch;89pub mod erc;90pub mod eth;91pub mod weights;9293pub type SelfWeightOf<T> = <T as Config>::WeightInfo;9495#[must_use = "Should call submit_logs or save, otherwise some data will be lost for evm side"]96pub struct CollectionHandle<T: Config> {97	pub id: CollectionId,98	collection: Collection<T::AccountId>,99	pub recorder: SubstrateRecorder<T>,100}101impl<T: Config> WithRecorder<T> for CollectionHandle<T> {102	fn recorder(&self) -> &SubstrateRecorder<T> {103		&self.recorder104	}105	fn into_recorder(self) -> SubstrateRecorder<T> {106		self.recorder107	}108}109impl<T: Config> CollectionHandle<T> {110	pub fn new_with_gas_limit(id: CollectionId, gas_limit: u64) -> Option<Self> {111		<CollectionById<T>>::get(id).map(|collection| Self {112			id,113			collection,114			recorder: SubstrateRecorder::new(gas_limit),115		})116	}117118	pub fn new_with_recorder(id: CollectionId, recorder: SubstrateRecorder<T>) -> Option<Self> {119		<CollectionById<T>>::get(id).map(|collection| Self {120			id,121			collection,122			recorder,123		})124	}125126	pub fn new(id: CollectionId) -> Option<Self> {127		Self::new_with_gas_limit(id, u64::MAX)128	}129130	pub fn try_get(id: CollectionId) -> Result<Self, DispatchError> {131		Ok(Self::new(id).ok_or(<Error<T>>::CollectionNotFound)?)132	}133134	pub fn consume_store_reads(&self, reads: u64) -> evm_coder::execution::Result<()> {135		self.recorder136			.consume_gas(T::GasWeightMapping::weight_to_gas(137				<T as frame_system::Config>::DbWeight::get()138					.read139					.saturating_mul(reads),140			))141	}142143	pub fn consume_store_writes(&self, writes: u64) -> evm_coder::execution::Result<()> {144		self.recorder145			.consume_gas(T::GasWeightMapping::weight_to_gas(146				<T as frame_system::Config>::DbWeight::get()147					.write148					.saturating_mul(writes),149			))150	}151	pub fn save(self) -> Result<(), DispatchError> {152		<CollectionById<T>>::insert(self.id, self.collection);153		Ok(())154	}155156	pub fn set_sponsor(&mut self, sponsor: T::AccountId) -> DispatchResult {157		self.collection.sponsorship = SponsorshipState::Unconfirmed(sponsor);158		Ok(())159	}160161	pub fn confirm_sponsorship(&mut self, sender: &T::AccountId) -> Result<bool, DispatchError> {162		if self.collection.sponsorship.pending_sponsor() != Some(sender) {163			return Ok(false);164		}165166		self.collection.sponsorship = SponsorshipState::Confirmed(sender.clone());167		Ok(true)168	}169170	/// Checks that the collection was created with, and must be operated upon through **Unique API**.171	/// Now check only the `external_collection` flag and if it's **true**, then return `CollectionIsExternal` error.172	pub fn check_is_internal(&self) -> DispatchResult {173		if self.external_collection {174			return Err(<Error<T>>::CollectionIsExternal)?;175		}176177		Ok(())178	}179180	/// Checks that the collection was created with, and must be operated upon through an **assimilated API**.181	/// Now check only the `external_collection` flag and if it's **false**, then return `CollectionIsInternal` error.182	pub fn check_is_external(&self) -> DispatchResult {183		if !self.external_collection {184			return Err(<Error<T>>::CollectionIsInternal)?;185		}186187		Ok(())188	}189}190191impl<T: Config> Deref for CollectionHandle<T> {192	type Target = Collection<T::AccountId>;193194	fn deref(&self) -> &Self::Target {195		&self.collection196	}197}198199impl<T: Config> DerefMut for CollectionHandle<T> {200	fn deref_mut(&mut self) -> &mut Self::Target {201		&mut self.collection202	}203}204205impl<T: Config> CollectionHandle<T> {206	pub fn check_is_owner(&self, subject: &T::CrossAccountId) -> DispatchResult {207		ensure!(*subject.as_sub() == self.owner, <Error<T>>::NoPermission);208		Ok(())209	}210	pub fn is_owner_or_admin(&self, subject: &T::CrossAccountId) -> bool {211		*subject.as_sub() == self.owner || <IsAdmin<T>>::get((self.id, subject))212	}213	pub fn check_is_owner_or_admin(&self, subject: &T::CrossAccountId) -> DispatchResult {214		ensure!(self.is_owner_or_admin(subject), <Error<T>>::NoPermission);215		Ok(())216	}217	pub fn ignores_allowance(&self, user: &T::CrossAccountId) -> bool {218		self.limits.owner_can_transfer() && self.is_owner_or_admin(user)219	}220	pub fn ignores_owned_amount(&self, user: &T::CrossAccountId) -> bool {221		self.limits.owner_can_transfer() && self.is_owner_or_admin(user)222	}223	pub fn check_allowlist(&self, user: &T::CrossAccountId) -> DispatchResult {224		ensure!(225			<Allowlist<T>>::get((self.id, user)),226			<Error<T>>::AddressNotInAllowlist227		);228		Ok(())229	}230}231232#[frame_support::pallet]233pub mod pallet {234	use super::*;235	use pallet_evm::account;236	use dispatch::CollectionDispatch;237	use frame_support::{Blake2_128Concat, pallet_prelude::*, storage::Key, traits::StorageVersion};238	use frame_system::pallet_prelude::*;239	use frame_support::traits::Currency;240	use up_data_structs::{TokenId, mapping::TokenAddressMapping};241	use scale_info::TypeInfo;242	use weights::WeightInfo;243244	#[pallet::config]245	pub trait Config:246		frame_system::Config247		+ pallet_evm_coder_substrate::Config248		+ pallet_evm::Config249		+ TypeInfo250		+ account::Config251	{252		type WeightInfo: WeightInfo;253		type Event: IsType<<Self as frame_system::Config>::Event> + From<Event<Self>>;254255		type Currency: Currency<Self::AccountId>;256257		#[pallet::constant]258		type CollectionCreationPrice: Get<259			<<Self as Config>::Currency as Currency<Self::AccountId>>::Balance,260		>;261		type CollectionDispatch: CollectionDispatch<Self>;262263		type TreasuryAccountId: Get<Self::AccountId>;264		type ContractAddress: Get<H160>;265266		type EvmTokenAddressMapping: TokenAddressMapping<H160>;267		type CrossTokenAddressMapping: TokenAddressMapping<Self::CrossAccountId>;268	}269270	const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);271272	#[pallet::pallet]273	#[pallet::storage_version(STORAGE_VERSION)]274	#[pallet::generate_store(pub(super) trait Store)]275	pub struct Pallet<T>(_);276277	#[pallet::extra_constants]278	impl<T: Config> Pallet<T> {279		pub fn collection_admins_limit() -> u32 {280			COLLECTION_ADMINS_LIMIT281		}282	}283284	#[pallet::event]285	#[pallet::generate_deposit(pub fn deposit_event)]286	pub enum Event<T: Config> {287		/// New collection was created288		///289		/// # Arguments290		///291		/// * collection_id: Globally unique identifier of newly created collection.292		///293		/// * mode: [CollectionMode] converted into u8.294		///295		/// * account_id: Collection owner.296		CollectionCreated(CollectionId, u8, T::AccountId),297298		/// New collection was destroyed299		///300		/// # Arguments301		///302		/// * collection_id: Globally unique identifier of collection.303		CollectionDestroyed(CollectionId),304305		/// New item was created.306		///307		/// # Arguments308		///309		/// * collection_id: Id of the collection where item was created.310		///311		/// * item_id: Id of an item. Unique within the collection.312		///313		/// * recipient: Owner of newly created item314		///315		/// * amount: Always 1 for NFT316		ItemCreated(CollectionId, TokenId, T::CrossAccountId, u128),317318		/// Collection item was burned.319		///320		/// # Arguments321		///322		/// * collection_id.323		///324		/// * item_id: Identifier of burned NFT.325		///326		/// * owner: which user has destroyed its tokens327		///328		/// * amount: Always 1 for NFT329		ItemDestroyed(CollectionId, TokenId, T::CrossAccountId, u128),330331		/// Item was transferred332		///333		/// * collection_id: Id of collection to which item is belong334		///335		/// * item_id: Id of an item336		///337		/// * sender: Original owner of item338		///339		/// * recipient: New owner of item340		///341		/// * amount: Always 1 for NFT342		Transfer(343			CollectionId,344			TokenId,345			T::CrossAccountId,346			T::CrossAccountId,347			u128,348		),349350		/// * collection_id351		///352		/// * item_id353		///354		/// * sender355		///356		/// * spender357		///358		/// * amount359		Approved(360			CollectionId,361			TokenId,362			T::CrossAccountId,363			T::CrossAccountId,364			u128,365		),366367		CollectionPropertySet(CollectionId, PropertyKey),368369		CollectionPropertyDeleted(CollectionId, PropertyKey),370371		TokenPropertySet(CollectionId, TokenId, PropertyKey),372373		TokenPropertyDeleted(CollectionId, TokenId, PropertyKey),374375		PropertyPermissionSet(CollectionId, PropertyKey),376	}377378	#[pallet::error]379	pub enum Error<T> {380		/// This collection does not exist.381		CollectionNotFound,382		/// Sender parameter and item owner must be equal.383		MustBeTokenOwner,384		/// No permission to perform action385		NoPermission,386		/// Destroying only empty collections is allowed387		CantDestroyNotEmptyCollection,388		/// Collection is not in mint mode.389		PublicMintingNotAllowed,390		/// Address is not in allow list.391		AddressNotInAllowlist,392393		/// Collection name can not be longer than 63 char.394		CollectionNameLimitExceeded,395		/// Collection description can not be longer than 255 char.396		CollectionDescriptionLimitExceeded,397		/// Token prefix can not be longer than 15 char.398		CollectionTokenPrefixLimitExceeded,399		/// Total collections bound exceeded.400		TotalCollectionsLimitExceeded,401		/// Exceeded max admin count402		CollectionAdminCountExceeded,403		/// Collection limit bounds per collection exceeded404		CollectionLimitBoundsExceeded,405		/// Tried to enable permissions which are only permitted to be disabled406		OwnerPermissionsCantBeReverted,407		/// Collection settings not allowing items transferring408		TransferNotAllowed,409		/// Account token limit exceeded per collection410		AccountTokenLimitExceeded,411		/// Collection token limit exceeded412		CollectionTokenLimitExceeded,413		/// Metadata flag frozen414		MetadataFlagFrozen,415416		/// Item not exists.417		TokenNotFound,418		/// Item balance not enough.419		TokenValueTooLow,420		/// Requested value more than approved.421		ApprovedValueTooLow,422		/// Tried to approve more than owned423		CantApproveMoreThanOwned,424425		/// Can't transfer tokens to ethereum zero address426		AddressIsZero,427		/// Target collection doesn't supports this operation428		UnsupportedOperation,429430		/// Not sufficient funds to perform action431		NotSufficientFounds,432433		/// Collection has nesting disabled434		NestingIsDisabled,435		/// Only owner may nest tokens under this collection436		OnlyOwnerAllowedToNest,437		/// Only tokens from specific collections may nest tokens under this438		SourceCollectionIsNotAllowedToNest,439440		/// Tried to store more data than allowed in collection field441		CollectionFieldSizeExceeded,442443		/// Tried to store more property data than allowed444		NoSpaceForProperty,445446		/// Tried to store more property keys than allowed447		PropertyLimitReached,448449		/// Property key is too long450		PropertyKeyIsTooLong,451452		/// Only ASCII letters, digits, and '_', '-' are allowed453		InvalidCharacterInPropertyKey,454455		/// Empty property keys are forbidden456		EmptyPropertyKey,457458		/// Tried to access an external collection with an internal API459		CollectionIsExternal,460461		/// Tried to access an internal collection with an external API462		CollectionIsInternal,463	}464465	#[pallet::storage]466	pub type CreatedCollectionCount<T> = StorageValue<Value = CollectionId, QueryKind = ValueQuery>;467	#[pallet::storage]468	pub type DestroyedCollectionCount<T> =469		StorageValue<Value = CollectionId, QueryKind = ValueQuery>;470471	/// Collection info472	#[pallet::storage]473	pub type CollectionById<T> = StorageMap<474		Hasher = Blake2_128Concat,475		Key = CollectionId,476		Value = Collection<<T as frame_system::Config>::AccountId>,477		QueryKind = OptionQuery,478	>;479480	/// Collection properties481	#[pallet::storage]482	#[pallet::getter(fn collection_properties)]483	pub type CollectionProperties<T> = StorageMap<484		Hasher = Blake2_128Concat,485		Key = CollectionId,486		Value = Properties,487		QueryKind = ValueQuery,488		OnEmpty = up_data_structs::CollectionProperties,489	>;490491	#[pallet::storage]492	#[pallet::getter(fn property_permissions)]493	pub type CollectionPropertyPermissions<T> = StorageMap<494		Hasher = Blake2_128Concat,495		Key = CollectionId,496		Value = PropertiesPermissionMap,497		QueryKind = ValueQuery,498	>;499500	#[pallet::storage]501	pub type AdminAmount<T> = StorageMap<502		Hasher = Blake2_128Concat,503		Key = CollectionId,504		Value = u32,505		QueryKind = ValueQuery,506	>;507508	/// List of collection admins509	#[pallet::storage]510	pub type IsAdmin<T: Config> = StorageNMap<511		Key = (512			Key<Blake2_128Concat, CollectionId>,513			Key<Blake2_128Concat, T::CrossAccountId>,514		),515		Value = bool,516		QueryKind = ValueQuery,517	>;518519	/// Allowlisted collection users520	#[pallet::storage]521	pub type Allowlist<T: Config> = StorageNMap<522		Key = (523			Key<Blake2_128Concat, CollectionId>,524			Key<Blake2_128Concat, T::CrossAccountId>,525		),526		Value = bool,527		QueryKind = ValueQuery,528	>;529530	/// Not used by code, exists only to provide some types to metadata531	#[pallet::storage]532	pub type DummyStorageValue<T: Config> = StorageValue<533		Value = (534			CollectionStats,535			CollectionId,536			TokenId,537			TokenChild,538			PhantomType<(539				TokenData<T::CrossAccountId>,540				RpcCollection<T::AccountId>,541				// RMRK542				RmrkCollectionInfo<T::AccountId>,543				RmrkInstanceInfo<T::AccountId>,544				RmrkResourceInfo,545				RmrkPropertyInfo,546				RmrkBaseInfo<T::AccountId>,547				RmrkPartType,548				RmrkTheme,549				RmrkNftChild,550			)>,551		),552		QueryKind = OptionQuery,553	>;554555	#[pallet::hooks]556	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {557		fn on_runtime_upgrade() -> Weight {558			if StorageVersion::get::<Pallet<T>>() < StorageVersion::new(1) {559				use up_data_structs::{CollectionVersion1, CollectionVersion2};560				<CollectionById<T>>::translate::<CollectionVersion1<T::AccountId>, _>(|id, v| {561					let mut props = Vec::new();562					if !v.offchain_schema.is_empty() {563						props.push(Property {564							key: b"_old_offchainSchema".to_vec().try_into().unwrap(),565							value: v566								.offchain_schema567								.clone()568								.into_inner()569								.try_into()570								.expect("offchain schema too big"),571						});572					}573					if !v.variable_on_chain_schema.is_empty() {574						props.push(Property {575							key: b"_old_variableOnChainSchema".to_vec().try_into().unwrap(),576							value: v577								.variable_on_chain_schema578								.clone()579								.into_inner()580								.try_into()581								.expect("offchain schema too big"),582						});583					}584					if !v.const_on_chain_schema.is_empty() {585						props.push(Property {586							key: b"_old_constOnChainSchema".to_vec().try_into().unwrap(),587							value: v588								.const_on_chain_schema589								.clone()590								.into_inner()591								.try_into()592								.expect("offchain schema too big"),593						});594					}595					props.push(Property {596						key: b"_old_schemaVersion".to_vec().try_into().unwrap(),597						value: match v.schema_version {598							SchemaVersion::ImageURL => b"ImageUrl".as_slice(),599							SchemaVersion::Unique => b"Unique".as_slice(),600						}601						.to_vec()602						.try_into()603						.unwrap(),604					});605					Self::set_scoped_collection_properties(606						id,607						PropertyScope::None,608						props.into_iter(),609					)610					.expect("existing data larger than properties");611					let mut new = CollectionVersion2::from(v.clone());612					new.permissions.access = Some(v.access);613					new.permissions.mint_mode = Some(v.mint_mode);614					Some(new)615				});616			}617618			0619		}620	}621}622623impl<T: Config> Pallet<T> {624	/// Ethereum receiver 0x0000000000000000000000000000000000000000 is reserved, and shouldn't own tokens625	pub fn ensure_correct_receiver(receiver: &T::CrossAccountId) -> DispatchResult {626		ensure!(627			&T::CrossAccountId::from_eth(H160([0; 20])) != receiver,628			<Error<T>>::AddressIsZero629		);630		Ok(())631	}632	pub fn adminlist(collection: CollectionId) -> Vec<T::CrossAccountId> {633		<IsAdmin<T>>::iter_prefix((collection,))634			.map(|(a, _)| a)635			.collect()636	}637	pub fn allowlist(collection: CollectionId) -> Vec<T::CrossAccountId> {638		<Allowlist<T>>::iter_prefix((collection,))639			.map(|(a, _)| a)640			.collect()641	}642	pub fn allowed(collection: CollectionId, user: T::CrossAccountId) -> bool {643		<Allowlist<T>>::get((collection, user))644	}645	pub fn collection_stats() -> CollectionStats {646		let created = <CreatedCollectionCount<T>>::get();647		let destroyed = <DestroyedCollectionCount<T>>::get();648		CollectionStats {649			created: created.0,650			destroyed: destroyed.0,651			alive: created.0 - destroyed.0,652		}653	}654655	pub fn effective_collection_limits(collection: CollectionId) -> Option<CollectionLimits> {656		let collection = <CollectionById<T>>::get(collection);657		if collection.is_none() {658			return None;659		}660661		let collection = collection.unwrap();662		let limits = collection.limits;663		let effective_limits = CollectionLimits {664			account_token_ownership_limit: Some(limits.account_token_ownership_limit()),665			sponsored_data_size: Some(limits.sponsored_data_size()),666			sponsored_data_rate_limit: Some(667				limits668					.sponsored_data_rate_limit669					.unwrap_or(SponsoringRateLimit::SponsoringDisabled),670			),671			token_limit: Some(limits.token_limit()),672			sponsor_transfer_timeout: Some(limits.sponsor_transfer_timeout(673				match collection.mode {674					CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,675					CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,676					CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,677				},678			)),679			sponsor_approve_timeout: Some(limits.sponsor_approve_timeout()),680			owner_can_transfer: Some(limits.owner_can_transfer()),681			owner_can_destroy: Some(limits.owner_can_destroy()),682			transfers_enabled: Some(limits.transfers_enabled()),683		};684685		Some(effective_limits)686	}687688	pub fn rpc_collection(collection: CollectionId) -> Option<RpcCollection<T::AccountId>> {689		let Collection {690			name,691			description,692			owner,693			mode,694			token_prefix,695			sponsorship,696			limits,697			permissions,698			external_collection,699		} = <CollectionById<T>>::get(collection)?;700701		let token_property_permissions = <CollectionPropertyPermissions<T>>::get(collection)702			.into_iter()703			.map(|(key, permission)| PropertyKeyPermission { key, permission })704			.collect();705706		let properties = <CollectionProperties<T>>::get(collection)707			.into_iter()708			.map(|(key, value)| Property { key, value })709			.collect();710711		let permissions = CollectionPermissions {712			access: Some(permissions.access()),713			mint_mode: Some(permissions.mint_mode()),714			nesting: Some(permissions.nesting().clone()),715		};716717		Some(RpcCollection {718			name: name.into_inner(),719			description: description.into_inner(),720			owner,721			mode,722			token_prefix: token_prefix.into_inner(),723			sponsorship,724			limits,725			permissions,726			token_property_permissions,727			properties,728			read_only: external_collection,729		})730	}731}732733macro_rules! limit_default {734	($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{735		$(736			if let Some($new) = $new.$field {737				let $old = $old.$field($($arg)?);738				let _ = $new;739				let _ = $old;740				$check741			} else {742				$new.$field = $old.$field743			}744		)*745	}};746}747macro_rules! limit_default_clone {748	($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{749		$(750			if let Some($new) = $new.$field.clone() {751				let $old = $old.$field($($arg)?);752				let _ = $new;753				let _ = $old;754				$check755			} else {756				$new.$field = $old.$field.clone()757			}758		)*759	}};760}761762impl<T: Config> Pallet<T> {763	pub fn init_collection(764		owner: T::CrossAccountId,765		data: CreateCollectionData<T::AccountId>,766		is_external: bool,767	) -> Result<CollectionId, DispatchError> {768		{769			ensure!(770				data.token_prefix.len() <= MAX_TOKEN_PREFIX_LENGTH as usize,771				Error::<T>::CollectionTokenPrefixLimitExceeded772			);773		}774775		let created_count = <CreatedCollectionCount<T>>::get()776			.0777			.checked_add(1)778			.ok_or(ArithmeticError::Overflow)?;779		let destroyed_count = <DestroyedCollectionCount<T>>::get().0;780		let id = CollectionId(created_count);781782		// bound Total number of collections783		ensure!(784			created_count - destroyed_count <= COLLECTION_NUMBER_LIMIT,785			<Error<T>>::TotalCollectionsLimitExceeded786		);787788		// =========789790		let collection = Collection {791			owner: owner.as_sub().clone(),792			name: data.name,793			mode: data.mode.clone(),794			description: data.description,795			token_prefix: data.token_prefix,796			sponsorship: data797				.pending_sponsor798				.map(SponsorshipState::Unconfirmed)799				.unwrap_or_default(),800			limits: data801				.limits802				.map(|limits| Self::clamp_limits(data.mode.clone(), &Default::default(), limits))803				.unwrap_or_else(|| Ok(CollectionLimits::default()))?,804			permissions: data805				.permissions806				.map(|permissions| {807					Self::clamp_permissions(data.mode.clone(), &Default::default(), permissions)808				})809				.unwrap_or_else(|| Ok(CollectionPermissions::default()))?,810			external_collection: is_external,811		};812813		let mut collection_properties = up_data_structs::CollectionProperties::get();814		collection_properties815			.try_set_from_iter(data.properties.into_iter())816			.map_err(<Error<T>>::from)?;817818		CollectionProperties::<T>::insert(id, collection_properties);819820		let mut token_props_permissions = PropertiesPermissionMap::new();821		token_props_permissions822			.try_set_from_iter(data.token_property_permissions.into_iter())823			.map_err(<Error<T>>::from)?;824825		CollectionPropertyPermissions::<T>::insert(id, token_props_permissions);826827		// Take a (non-refundable) deposit of collection creation828		{829			let mut imbalance =830				<<<T as Config>::Currency as Currency<T::AccountId>>::PositiveImbalance>::zero();831			imbalance.subsume(832				<<T as Config>::Currency as Currency<T::AccountId>>::deposit_creating(833					&T::TreasuryAccountId::get(),834					T::CollectionCreationPrice::get(),835				),836			);837			<T as Config>::Currency::settle(838				&owner.as_sub(),839				imbalance,840				WithdrawReasons::TRANSFER,841				ExistenceRequirement::KeepAlive,842			)843			.map_err(|_| Error::<T>::NotSufficientFounds)?;844		}845846		<CreatedCollectionCount<T>>::put(created_count);847		<Pallet<T>>::deposit_event(Event::CollectionCreated(848			id,849			data.mode.id(),850			owner.as_sub().clone(),851		));852		<PalletEvm<T>>::deposit_log(853			erc::CollectionHelpersEvents::CollectionCreated {854				owner: *owner.as_eth(),855				collection_id: eth::collection_id_to_address(id),856			}857			.to_log(T::ContractAddress::get()),858		);859		<CollectionById<T>>::insert(id, collection);860		Ok(id)861	}862863	pub fn destroy_collection(864		collection: CollectionHandle<T>,865		sender: &T::CrossAccountId,866	) -> DispatchResult {867		ensure!(868			collection.limits.owner_can_destroy(),869			<Error<T>>::NoPermission,870		);871		collection.check_is_owner(sender)?;872873		let destroyed_collections = <DestroyedCollectionCount<T>>::get()874			.0875			.checked_add(1)876			.ok_or(ArithmeticError::Overflow)?;877878		// =========879880		<DestroyedCollectionCount<T>>::put(destroyed_collections);881		<CollectionById<T>>::remove(collection.id);882		<AdminAmount<T>>::remove(collection.id);883		<IsAdmin<T>>::remove_prefix((collection.id,), None);884		<Allowlist<T>>::remove_prefix((collection.id,), None);885		<CollectionProperties<T>>::remove(collection.id);886887		<Pallet<T>>::deposit_event(Event::CollectionDestroyed(collection.id));888		Ok(())889	}890891	pub fn set_collection_property(892		collection: &CollectionHandle<T>,893		sender: &T::CrossAccountId,894		property: Property,895	) -> DispatchResult {896		collection.check_is_owner_or_admin(sender)?;897898		CollectionProperties::<T>::try_mutate(collection.id, |properties| {899			let property = property.clone();900			properties.try_set(property.key, property.value)901		})902		.map_err(<Error<T>>::from)?;903904		Self::deposit_event(Event::CollectionPropertySet(collection.id, property.key));905906		Ok(())907	}908909	pub fn set_scoped_collection_property(910		collection_id: CollectionId,911		scope: PropertyScope,912		property: Property,913	) -> DispatchResult {914		CollectionProperties::<T>::try_mutate(collection_id, |properties| {915			properties.try_scoped_set(scope, property.key, property.value)916		})917		.map_err(<Error<T>>::from)?;918919		Ok(())920	}921922	pub fn set_scoped_collection_properties(923		collection_id: CollectionId,924		scope: PropertyScope,925		properties: impl Iterator<Item = Property>,926	) -> DispatchResult {927		CollectionProperties::<T>::try_mutate(collection_id, |stored_properties| {928			stored_properties.try_scoped_set_from_iter(scope, properties)929		})930		.map_err(<Error<T>>::from)?;931932		Ok(())933	}934935	#[transactional]936	pub fn set_collection_properties(937		collection: &CollectionHandle<T>,938		sender: &T::CrossAccountId,939		properties: Vec<Property>,940	) -> DispatchResult {941		for property in properties {942			Self::set_collection_property(collection, sender, property)?;943		}944945		Ok(())946	}947948	pub fn delete_collection_property(949		collection: &CollectionHandle<T>,950		sender: &T::CrossAccountId,951		property_key: PropertyKey,952	) -> DispatchResult {953		collection.check_is_owner_or_admin(sender)?;954955		CollectionProperties::<T>::try_mutate(collection.id, |properties| {956			properties.remove(&property_key)957		})958		.map_err(<Error<T>>::from)?;959960		Self::deposit_event(Event::CollectionPropertyDeleted(961			collection.id,962			property_key,963		));964965		Ok(())966	}967968	#[transactional]969	pub fn delete_collection_properties(970		collection: &CollectionHandle<T>,971		sender: &T::CrossAccountId,972		property_keys: Vec<PropertyKey>,973	) -> DispatchResult {974		for key in property_keys {975			Self::delete_collection_property(collection, sender, key)?;976		}977978		Ok(())979	}980981	// For migrations982	pub fn set_property_permission_unchecked(983		collection: CollectionId,984		property_permission: PropertyKeyPermission,985	) -> DispatchResult {986		<CollectionPropertyPermissions<T>>::try_mutate(collection, |permissions| {987			permissions.try_set(property_permission.key, property_permission.permission)988		})989		.map_err(<Error<T>>::from)?;990		Ok(())991	}992993	pub fn set_property_permission(994		collection: &CollectionHandle<T>,995		sender: &T::CrossAccountId,996		property_permission: PropertyKeyPermission,997	) -> DispatchResult {998		collection.check_is_owner_or_admin(sender)?;9991000		let all_permissions = CollectionPropertyPermissions::<T>::get(collection.id);1001		let current_permission = all_permissions.get(&property_permission.key);1002		if matches![1003			current_permission,1004			Some(PropertyPermission { mutable: false, .. })1005		] {1006			return Err(<Error<T>>::NoPermission.into());1007		}10081009		CollectionPropertyPermissions::<T>::try_mutate(collection.id, |permissions| {1010			let property_permission = property_permission.clone();1011			permissions.try_set(property_permission.key, property_permission.permission)1012		})1013		.map_err(<Error<T>>::from)?;10141015		Self::deposit_event(Event::PropertyPermissionSet(1016			collection.id,1017			property_permission.key,1018		));10191020		Ok(())1021	}10221023	#[transactional]1024	pub fn set_property_permissions(1025		collection: &CollectionHandle<T>,1026		sender: &T::CrossAccountId,1027		property_permissions: Vec<PropertyKeyPermission>,1028	) -> DispatchResult {1029		for prop_pemission in property_permissions {1030			Self::set_property_permission(collection, sender, prop_pemission)?;1031		}10321033		Ok(())1034	}10351036	pub fn get_collection_property(1037		collection_id: CollectionId,1038		key: &PropertyKey,1039	) -> Option<PropertyValue> {1040		Self::collection_properties(collection_id).get(key).cloned()1041	}10421043	pub fn bytes_keys_to_property_keys(1044		keys: Vec<Vec<u8>>,1045	) -> Result<Vec<PropertyKey>, DispatchError> {1046		keys.into_iter()1047			.map(|key| -> Result<PropertyKey, DispatchError> {1048				key.try_into()1049					.map_err(|_| <Error<T>>::PropertyKeyIsTooLong.into())1050			})1051			.collect::<Result<Vec<PropertyKey>, DispatchError>>()1052	}10531054	pub fn filter_collection_properties(1055		collection_id: CollectionId,1056		keys: Option<Vec<PropertyKey>>,1057	) -> Result<Vec<Property>, DispatchError> {1058		let properties = Self::collection_properties(collection_id);10591060		let properties = keys1061			.map(|keys| {1062				keys.into_iter()1063					.filter_map(|key| {1064						properties.get(&key).map(|value| Property {1065							key,1066							value: value.clone(),1067						})1068					})1069					.collect()1070			})1071			.unwrap_or_else(|| {1072				properties1073					.into_iter()1074					.map(|(key, value)| Property { key, value })1075					.collect()1076			});10771078		Ok(properties)1079	}10801081	pub fn filter_property_permissions(1082		collection_id: CollectionId,1083		keys: Option<Vec<PropertyKey>>,1084	) -> Result<Vec<PropertyKeyPermission>, DispatchError> {1085		let permissions = Self::property_permissions(collection_id);10861087		let key_permissions = keys1088			.map(|keys| {1089				keys.into_iter()1090					.filter_map(|key| {1091						permissions1092							.get(&key)1093							.map(|permission| PropertyKeyPermission {1094								key,1095								permission: permission.clone(),1096							})1097					})1098					.collect()1099			})1100			.unwrap_or_else(|| {1101				permissions1102					.into_iter()1103					.map(|(key, permission)| PropertyKeyPermission { key, permission })1104					.collect()1105			});11061107		Ok(key_permissions)1108	}11091110	pub fn toggle_allowlist(1111		collection: &CollectionHandle<T>,1112		sender: &T::CrossAccountId,1113		user: &T::CrossAccountId,1114		allowed: bool,1115	) -> DispatchResult {1116		collection.check_is_owner_or_admin(sender)?;11171118		// =========11191120		if allowed {1121			<Allowlist<T>>::insert((collection.id, user), true);1122		} else {1123			<Allowlist<T>>::remove((collection.id, user));1124		}11251126		Ok(())1127	}11281129	pub fn toggle_admin(1130		collection: &CollectionHandle<T>,1131		sender: &T::CrossAccountId,1132		user: &T::CrossAccountId,1133		admin: bool,1134	) -> DispatchResult {1135		collection.check_is_owner(sender)?;11361137		let was_admin = <IsAdmin<T>>::get((collection.id, user));1138		if was_admin == admin {1139			return Ok(());1140		}1141		let amount = <AdminAmount<T>>::get(collection.id);11421143		if admin {1144			let amount = amount1145				.checked_add(1)1146				.ok_or(<Error<T>>::CollectionAdminCountExceeded)?;1147			ensure!(1148				amount <= Self::collection_admins_limit(),1149				<Error<T>>::CollectionAdminCountExceeded,1150			);11511152			// =========11531154			<AdminAmount<T>>::insert(collection.id, amount);1155			<IsAdmin<T>>::insert((collection.id, user), true);1156		} else {1157			<AdminAmount<T>>::insert(collection.id, amount.saturating_sub(1));1158			<IsAdmin<T>>::remove((collection.id, user));1159		}11601161		Ok(())1162	}11631164	pub fn clamp_limits(1165		mode: CollectionMode,1166		old_limit: &CollectionLimits,1167		mut new_limit: CollectionLimits,1168	) -> Result<CollectionLimits, DispatchError> {1169		limit_default!(old_limit, new_limit,1170			account_token_ownership_limit => ensure!(1171				new_limit <= MAX_TOKEN_OWNERSHIP,1172				<Error<T>>::CollectionLimitBoundsExceeded,1173			),1174			sponsored_data_size => ensure!(1175				new_limit <= CUSTOM_DATA_LIMIT,1176				<Error<T>>::CollectionLimitBoundsExceeded,1177			),11781179			sponsored_data_rate_limit => {},1180			token_limit => ensure!(1181				old_limit >= new_limit && new_limit > 0,1182				<Error<T>>::CollectionTokenLimitExceeded1183			),11841185			sponsor_transfer_timeout(match mode {1186				CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,1187				CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,1188				CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,1189			}) => ensure!(1190				new_limit <= MAX_SPONSOR_TIMEOUT,1191				<Error<T>>::CollectionLimitBoundsExceeded,1192			),1193			sponsor_approve_timeout => {},1194			owner_can_transfer => ensure!(1195				old_limit || !new_limit,1196				<Error<T>>::OwnerPermissionsCantBeReverted,1197			),1198			owner_can_destroy => ensure!(1199				old_limit || !new_limit,1200				<Error<T>>::OwnerPermissionsCantBeReverted,1201			),1202			transfers_enabled => {},1203		);1204		Ok(new_limit)1205	}12061207	pub fn clamp_permissions(1208		_mode: CollectionMode,1209		old_limit: &CollectionPermissions,1210		mut new_limit: CollectionPermissions,1211	) -> Result<CollectionPermissions, DispatchError> {1212		limit_default_clone!(old_limit, new_limit,1213			access => {},1214			mint_mode => {},1215			nesting => {},1216		);1217		Ok(new_limit)1218	}1219}12201221#[macro_export]1222macro_rules! unsupported {1223	() => {1224		Err(<Error<T>>::UnsupportedOperation.into())1225	};1226}12271228/// Worst cases1229pub trait CommonWeightInfo<CrossAccountId> {1230	fn create_item() -> Weight;1231	fn create_multiple_items(amount: &[CreateItemData]) -> Weight;1232	fn create_multiple_items_ex(cost: &CreateItemExData<CrossAccountId>) -> Weight;1233	fn burn_item() -> Weight;1234	fn set_collection_properties(amount: u32) -> Weight;1235	fn delete_collection_properties(amount: u32) -> Weight;1236	fn set_token_properties(amount: u32) -> Weight;1237	fn delete_token_properties(amount: u32) -> Weight;1238	fn set_property_permissions(amount: u32) -> Weight;1239	fn transfer() -> Weight;1240	fn approve() -> Weight;1241	fn transfer_from() -> Weight;1242	fn burn_from() -> Weight;12431244	/// Differs from burn_item in case of Fungible and Refungible, as it should burn1245	/// whole users's balance1246	///1247	/// This method shouldn't be used directly, as it doesn't count breadth price, use `burn_recursively` instead1248	fn burn_recursively_self_raw() -> Weight;1249	/// Cost of iterating over `amount` children while burning, without counting child burning itself1250	///1251	/// This method shouldn't be used directly, as it doesn't count depth price, use `burn_recursively` instead1252	fn burn_recursively_breadth_raw(amount: u32) -> Weight;12531254	fn burn_recursively(max_selfs: u32, max_breadth: u32) -> Weight {1255		Self::burn_recursively_self_raw()1256			.saturating_mul(max_selfs.max(1) as u64)1257			.saturating_add(Self::burn_recursively_breadth_raw(max_breadth))1258	}1259}12601261pub trait CommonCollectionOperations<T: Config> {1262	fn create_item(1263		&self,1264		sender: T::CrossAccountId,1265		to: T::CrossAccountId,1266		data: CreateItemData,1267		nesting_budget: &dyn Budget,1268	) -> DispatchResultWithPostInfo;1269	fn create_multiple_items(1270		&self,1271		sender: T::CrossAccountId,1272		to: T::CrossAccountId,1273		data: Vec<CreateItemData>,1274		nesting_budget: &dyn Budget,1275	) -> DispatchResultWithPostInfo;1276	fn create_multiple_items_ex(1277		&self,1278		sender: T::CrossAccountId,1279		data: CreateItemExData<T::CrossAccountId>,1280		nesting_budget: &dyn Budget,1281	) -> DispatchResultWithPostInfo;1282	fn burn_item(1283		&self,1284		sender: T::CrossAccountId,1285		token: TokenId,1286		amount: u128,1287	) -> DispatchResultWithPostInfo;1288	fn burn_item_recursively(1289		&self,1290		sender: T::CrossAccountId,1291		token: TokenId,1292		self_budget: &dyn Budget,1293		breadth_budget: &dyn Budget,1294	) -> DispatchResultWithPostInfo;1295	fn set_collection_properties(1296		&self,1297		sender: T::CrossAccountId,1298		properties: Vec<Property>,1299	) -> DispatchResultWithPostInfo;1300	fn delete_collection_properties(1301		&self,1302		sender: &T::CrossAccountId,1303		property_keys: Vec<PropertyKey>,1304	) -> DispatchResultWithPostInfo;1305	fn set_token_properties(1306		&self,1307		sender: T::CrossAccountId,1308		token_id: TokenId,1309		property: Vec<Property>,1310	) -> DispatchResultWithPostInfo;1311	fn delete_token_properties(1312		&self,1313		sender: T::CrossAccountId,1314		token_id: TokenId,1315		property_keys: Vec<PropertyKey>,1316	) -> DispatchResultWithPostInfo;1317	fn set_property_permissions(1318		&self,1319		sender: &T::CrossAccountId,1320		property_permissions: Vec<PropertyKeyPermission>,1321	) -> DispatchResultWithPostInfo;1322	fn transfer(1323		&self,1324		sender: T::CrossAccountId,1325		to: T::CrossAccountId,1326		token: TokenId,1327		amount: u128,1328		nesting_budget: &dyn Budget,1329	) -> DispatchResultWithPostInfo;1330	fn approve(1331		&self,1332		sender: T::CrossAccountId,1333		spender: T::CrossAccountId,1334		token: TokenId,1335		amount: u128,1336	) -> DispatchResultWithPostInfo;1337	fn transfer_from(1338		&self,1339		sender: T::CrossAccountId,1340		from: T::CrossAccountId,1341		to: T::CrossAccountId,1342		token: TokenId,1343		amount: u128,1344		nesting_budget: &dyn Budget,1345	) -> DispatchResultWithPostInfo;1346	fn burn_from(1347		&self,1348		sender: T::CrossAccountId,1349		from: T::CrossAccountId,1350		token: TokenId,1351		amount: u128,1352		nesting_budget: &dyn Budget,1353	) -> DispatchResultWithPostInfo;13541355	fn check_nesting(1356		&self,1357		sender: T::CrossAccountId,1358		from: (CollectionId, TokenId),1359		under: TokenId,1360		budget: &dyn Budget,1361	) -> DispatchResult;13621363	fn nest(&self, under: TokenId, to_nest: (CollectionId, TokenId));13641365	fn unnest(&self, under: TokenId, to_nest: (CollectionId, TokenId));13661367	fn account_tokens(&self, account: T::CrossAccountId) -> Vec<TokenId>;1368	fn collection_tokens(&self) -> Vec<TokenId>;1369	fn token_exists(&self, token: TokenId) -> bool;1370	fn last_token_id(&self) -> TokenId;13711372	fn token_owner(&self, token: TokenId) -> Option<T::CrossAccountId>;1373	fn token_property(&self, token_id: TokenId, key: &PropertyKey) -> Option<PropertyValue>;1374	fn token_properties(&self, token_id: TokenId, keys: Option<Vec<PropertyKey>>) -> Vec<Property>;1375	/// Amount of unique collection tokens1376	fn total_supply(&self) -> u32;1377	/// Amount of different tokens account has (Applicable to nonfungible/refungible)1378	fn account_balance(&self, account: T::CrossAccountId) -> u32;1379	/// Amount of specific token account have (Applicable to fungible/refungible)1380	fn balance(&self, account: T::CrossAccountId, token: TokenId) -> u128;1381	fn allowance(1382		&self,1383		sender: T::CrossAccountId,1384		spender: T::CrossAccountId,1385		token: TokenId,1386	) -> u128;1387}13881389// Flexible enough for implementing CommonCollectionOperations1390pub fn with_weight(res: DispatchResult, weight: Weight) -> DispatchResultWithPostInfo {1391	let post_info = PostDispatchInfo {1392		actual_weight: Some(weight),1393		pays_fee: Pays::Yes,1394	};1395	match res {1396		Ok(()) => Ok(post_info),1397		Err(error) => Err(DispatchErrorWithPostInfo { post_info, error }),1398	}1399}14001401impl<T: Config> From<PropertiesError> for Error<T> {1402	fn from(error: PropertiesError) -> Self {1403		match error {1404			PropertiesError::NoSpaceForProperty => Self::NoSpaceForProperty,1405			PropertiesError::PropertyLimitReached => Self::PropertyLimitReached,1406			PropertiesError::InvalidCharacterInPropertyKey => Self::InvalidCharacterInPropertyKey,1407			PropertiesError::PropertyKeyIsTooLong => Self::PropertyKeyIsTooLong,1408			PropertiesError::EmptyPropertyKey => Self::EmptyPropertyKey,1409		}1410	}1411}
after · pallets/common/src/lib.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617#![cfg_attr(not(feature = "std"), no_std)]1819extern crate alloc;2021use core::ops::{Deref, DerefMut};22use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};23use sp_std::vec::Vec;24use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};25use evm_coder::ToLog;26use frame_support::{27	dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo, Weight, PostDispatchInfo},28	ensure,29	traits::{Imbalance, Get, Currency, WithdrawReasons, ExistenceRequirement},30	weights::Pays,31	transactional,32};33use pallet_evm::GasWeightMapping;34use up_data_structs::{35	COLLECTION_NUMBER_LIMIT,36	Collection,37	RpcCollection,38	CollectionId,39	CreateItemData,40	MAX_TOKEN_PREFIX_LENGTH,41	COLLECTION_ADMINS_LIMIT,42	TokenId,43	TokenChild,44	CollectionStats,45	MAX_TOKEN_OWNERSHIP,46	CollectionMode,47	NFT_SPONSOR_TRANSFER_TIMEOUT,48	FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,49	REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,50	MAX_SPONSOR_TIMEOUT,51	CUSTOM_DATA_LIMIT,52	CollectionLimits,53	CreateCollectionData,54	SponsorshipState,55	CreateItemExData,56	SponsoringRateLimit,57	budget::Budget,58	PhantomType,59	Property,60	Properties,61	PropertiesPermissionMap,62	PropertyKey,63	PropertyValue,64	PropertyPermission,65	PropertiesError,66	PropertyKeyPermission,67	TokenData,68	TrySetProperty,69	PropertyScope,70	// RMRK71	RmrkCollectionInfo,72	RmrkInstanceInfo,73	RmrkResourceInfo,74	RmrkPropertyInfo,75	RmrkBaseInfo,76	RmrkPartType,77	RmrkTheme,78	RmrkNftChild,79	CollectionPermissions,80	SchemaVersion,81};8283pub use pallet::*;84use sp_core::H160;85use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};86#[cfg(feature = "runtime-benchmarks")]87pub mod benchmarking;88pub mod dispatch;89pub mod erc;90pub mod eth;91pub mod weights;9293pub type SelfWeightOf<T> = <T as Config>::WeightInfo;9495#[must_use = "Should call submit_logs or save, otherwise some data will be lost for evm side"]96pub struct CollectionHandle<T: Config> {97	pub id: CollectionId,98	collection: Collection<T::AccountId>,99	pub recorder: SubstrateRecorder<T>,100}101impl<T: Config> WithRecorder<T> for CollectionHandle<T> {102	fn recorder(&self) -> &SubstrateRecorder<T> {103		&self.recorder104	}105	fn into_recorder(self) -> SubstrateRecorder<T> {106		self.recorder107	}108}109impl<T: Config> CollectionHandle<T> {110	pub fn new_with_gas_limit(id: CollectionId, gas_limit: u64) -> Option<Self> {111		<CollectionById<T>>::get(id).map(|collection| Self {112			id,113			collection,114			recorder: SubstrateRecorder::new(gas_limit),115		})116	}117118	pub fn new_with_recorder(id: CollectionId, recorder: SubstrateRecorder<T>) -> Option<Self> {119		<CollectionById<T>>::get(id).map(|collection| Self {120			id,121			collection,122			recorder,123		})124	}125126	pub fn new(id: CollectionId) -> Option<Self> {127		Self::new_with_gas_limit(id, u64::MAX)128	}129130	pub fn try_get(id: CollectionId) -> Result<Self, DispatchError> {131		Ok(Self::new(id).ok_or(<Error<T>>::CollectionNotFound)?)132	}133134	pub fn consume_store_reads(&self, reads: u64) -> evm_coder::execution::Result<()> {135		self.recorder136			.consume_gas(T::GasWeightMapping::weight_to_gas(137				<T as frame_system::Config>::DbWeight::get()138					.read139					.saturating_mul(reads),140			))141	}142143	pub fn consume_store_writes(&self, writes: u64) -> evm_coder::execution::Result<()> {144		self.recorder145			.consume_gas(T::GasWeightMapping::weight_to_gas(146				<T as frame_system::Config>::DbWeight::get()147					.write148					.saturating_mul(writes),149			))150	}151	pub fn save(self) -> Result<(), DispatchError> {152		<CollectionById<T>>::insert(self.id, self.collection);153		Ok(())154	}155156	pub fn set_sponsor(&mut self, sponsor: T::AccountId) -> DispatchResult {157		self.collection.sponsorship = SponsorshipState::Unconfirmed(sponsor);158		Ok(())159	}160161	pub fn confirm_sponsorship(&mut self, sender: &T::AccountId) -> Result<bool, DispatchError> {162		if self.collection.sponsorship.pending_sponsor() != Some(sender) {163			return Ok(false);164		}165166		self.collection.sponsorship = SponsorshipState::Confirmed(sender.clone());167		Ok(true)168	}169170	/// Checks that the collection was created with, and must be operated upon through **Unique API**.171	/// Now check only the `external_collection` flag and if it's **true**, then return `CollectionIsExternal` error.172	pub fn check_is_internal(&self) -> DispatchResult {173		if self.external_collection {174			return Err(<Error<T>>::CollectionIsExternal)?;175		}176177		Ok(())178	}179180	/// Checks that the collection was created with, and must be operated upon through an **assimilated API**.181	/// Now check only the `external_collection` flag and if it's **false**, then return `CollectionIsInternal` error.182	pub fn check_is_external(&self) -> DispatchResult {183		if !self.external_collection {184			return Err(<Error<T>>::CollectionIsInternal)?;185		}186187		Ok(())188	}189}190191impl<T: Config> Deref for CollectionHandle<T> {192	type Target = Collection<T::AccountId>;193194	fn deref(&self) -> &Self::Target {195		&self.collection196	}197}198199impl<T: Config> DerefMut for CollectionHandle<T> {200	fn deref_mut(&mut self) -> &mut Self::Target {201		&mut self.collection202	}203}204205impl<T: Config> CollectionHandle<T> {206	pub fn check_is_owner(&self, subject: &T::CrossAccountId) -> DispatchResult {207		ensure!(*subject.as_sub() == self.owner, <Error<T>>::NoPermission);208		Ok(())209	}210	pub fn is_owner_or_admin(&self, subject: &T::CrossAccountId) -> bool {211		*subject.as_sub() == self.owner || <IsAdmin<T>>::get((self.id, subject))212	}213	pub fn check_is_owner_or_admin(&self, subject: &T::CrossAccountId) -> DispatchResult {214		ensure!(self.is_owner_or_admin(subject), <Error<T>>::NoPermission);215		Ok(())216	}217	pub fn ignores_allowance(&self, user: &T::CrossAccountId) -> bool {218		self.limits.owner_can_transfer() && self.is_owner_or_admin(user)219	}220	pub fn ignores_owned_amount(&self, user: &T::CrossAccountId) -> bool {221		self.limits.owner_can_transfer() && self.is_owner_or_admin(user)222	}223	pub fn check_allowlist(&self, user: &T::CrossAccountId) -> DispatchResult {224		ensure!(225			<Allowlist<T>>::get((self.id, user)),226			<Error<T>>::AddressNotInAllowlist227		);228		Ok(())229	}230}231232#[frame_support::pallet]233pub mod pallet {234	use super::*;235	use pallet_evm::account;236	use dispatch::CollectionDispatch;237	use frame_support::{Blake2_128Concat, pallet_prelude::*, storage::Key, traits::StorageVersion};238	use frame_system::pallet_prelude::*;239	use frame_support::traits::Currency;240	use up_data_structs::{TokenId, mapping::TokenAddressMapping};241	use scale_info::TypeInfo;242	use weights::WeightInfo;243244	#[pallet::config]245	pub trait Config:246		frame_system::Config247		+ pallet_evm_coder_substrate::Config248		+ pallet_evm::Config249		+ TypeInfo250		+ account::Config251	{252		type WeightInfo: WeightInfo;253		type Event: IsType<<Self as frame_system::Config>::Event> + From<Event<Self>>;254255		type Currency: Currency<Self::AccountId>;256257		#[pallet::constant]258		type CollectionCreationPrice: Get<259			<<Self as Config>::Currency as Currency<Self::AccountId>>::Balance,260		>;261		type CollectionDispatch: CollectionDispatch<Self>;262263		type TreasuryAccountId: Get<Self::AccountId>;264		type ContractAddress: Get<H160>;265266		type EvmTokenAddressMapping: TokenAddressMapping<H160>;267		type CrossTokenAddressMapping: TokenAddressMapping<Self::CrossAccountId>;268	}269270	const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);271272	#[pallet::pallet]273	#[pallet::storage_version(STORAGE_VERSION)]274	#[pallet::generate_store(pub(super) trait Store)]275	pub struct Pallet<T>(_);276277	#[pallet::extra_constants]278	impl<T: Config> Pallet<T> {279		pub fn collection_admins_limit() -> u32 {280			COLLECTION_ADMINS_LIMIT281		}282	}283284	#[pallet::event]285	#[pallet::generate_deposit(pub fn deposit_event)]286	pub enum Event<T: Config> {287		/// New collection was created288		///289		/// # Arguments290		///291		/// * collection_id: Globally unique identifier of newly created collection.292		///293		/// * mode: [CollectionMode] converted into u8.294		///295		/// * account_id: Collection owner.296		CollectionCreated(CollectionId, u8, T::AccountId),297298		/// New collection was destroyed299		///300		/// # Arguments301		///302		/// * collection_id: Globally unique identifier of collection.303		CollectionDestroyed(CollectionId),304305		/// New item was created.306		///307		/// # Arguments308		///309		/// * collection_id: Id of the collection where item was created.310		///311		/// * item_id: Id of an item. Unique within the collection.312		///313		/// * recipient: Owner of newly created item314		///315		/// * amount: Always 1 for NFT316		ItemCreated(CollectionId, TokenId, T::CrossAccountId, u128),317318		/// Collection item was burned.319		///320		/// # Arguments321		///322		/// * collection_id.323		///324		/// * item_id: Identifier of burned NFT.325		///326		/// * owner: which user has destroyed its tokens327		///328		/// * amount: Always 1 for NFT329		ItemDestroyed(CollectionId, TokenId, T::CrossAccountId, u128),330331		/// Item was transferred332		///333		/// * collection_id: Id of collection to which item is belong334		///335		/// * item_id: Id of an item336		///337		/// * sender: Original owner of item338		///339		/// * recipient: New owner of item340		///341		/// * amount: Always 1 for NFT342		Transfer(343			CollectionId,344			TokenId,345			T::CrossAccountId,346			T::CrossAccountId,347			u128,348		),349350		/// * collection_id351		///352		/// * item_id353		///354		/// * sender355		///356		/// * spender357		///358		/// * amount359		Approved(360			CollectionId,361			TokenId,362			T::CrossAccountId,363			T::CrossAccountId,364			u128,365		),366367		CollectionPropertySet(CollectionId, PropertyKey),368369		CollectionPropertyDeleted(CollectionId, PropertyKey),370371		TokenPropertySet(CollectionId, TokenId, PropertyKey),372373		TokenPropertyDeleted(CollectionId, TokenId, PropertyKey),374375		PropertyPermissionSet(CollectionId, PropertyKey),376	}377378	#[pallet::error]379	pub enum Error<T> {380		/// This collection does not exist.381		CollectionNotFound,382		/// Sender parameter and item owner must be equal.383		MustBeTokenOwner,384		/// No permission to perform action385		NoPermission,386		/// Destroying only empty collections is allowed387		CantDestroyNotEmptyCollection,388		/// Collection is not in mint mode.389		PublicMintingNotAllowed,390		/// Address is not in allow list.391		AddressNotInAllowlist,392393		/// Collection name can not be longer than 63 char.394		CollectionNameLimitExceeded,395		/// Collection description can not be longer than 255 char.396		CollectionDescriptionLimitExceeded,397		/// Token prefix can not be longer than 15 char.398		CollectionTokenPrefixLimitExceeded,399		/// Total collections bound exceeded.400		TotalCollectionsLimitExceeded,401		/// Exceeded max admin count402		CollectionAdminCountExceeded,403		/// Collection limit bounds per collection exceeded404		CollectionLimitBoundsExceeded,405		/// Tried to enable permissions which are only permitted to be disabled406		OwnerPermissionsCantBeReverted,407		/// Collection settings not allowing items transferring408		TransferNotAllowed,409		/// Account token limit exceeded per collection410		AccountTokenLimitExceeded,411		/// Collection token limit exceeded412		CollectionTokenLimitExceeded,413		/// Metadata flag frozen414		MetadataFlagFrozen,415416		/// Item not exists.417		TokenNotFound,418		/// Item balance not enough.419		TokenValueTooLow,420		/// Requested value more than approved.421		ApprovedValueTooLow,422		/// Tried to approve more than owned423		CantApproveMoreThanOwned,424425		/// Can't transfer tokens to ethereum zero address426		AddressIsZero,427		/// Target collection doesn't supports this operation428		UnsupportedOperation,429430		/// Not sufficient funds to perform action431		NotSufficientFounds,432433		/// User not passed nesting rule434		UserIsNotAllowedToNest,435		/// Only tokens from specific collections may nest tokens under this436		SourceCollectionIsNotAllowedToNest,437438		/// Tried to store more data than allowed in collection field439		CollectionFieldSizeExceeded,440441		/// Tried to store more property data than allowed442		NoSpaceForProperty,443444		/// Tried to store more property keys than allowed445		PropertyLimitReached,446447		/// Property key is too long448		PropertyKeyIsTooLong,449450		/// Only ASCII letters, digits, and '_', '-' are allowed451		InvalidCharacterInPropertyKey,452453		/// Empty property keys are forbidden454		EmptyPropertyKey,455456		/// Tried to access an external collection with an internal API457		CollectionIsExternal,458459		/// Tried to access an internal collection with an external API460		CollectionIsInternal,461	}462463	#[pallet::storage]464	pub type CreatedCollectionCount<T> = StorageValue<Value = CollectionId, QueryKind = ValueQuery>;465	#[pallet::storage]466	pub type DestroyedCollectionCount<T> =467		StorageValue<Value = CollectionId, QueryKind = ValueQuery>;468469	/// Collection info470	#[pallet::storage]471	pub type CollectionById<T> = StorageMap<472		Hasher = Blake2_128Concat,473		Key = CollectionId,474		Value = Collection<<T as frame_system::Config>::AccountId>,475		QueryKind = OptionQuery,476	>;477478	/// Collection properties479	#[pallet::storage]480	#[pallet::getter(fn collection_properties)]481	pub type CollectionProperties<T> = StorageMap<482		Hasher = Blake2_128Concat,483		Key = CollectionId,484		Value = Properties,485		QueryKind = ValueQuery,486		OnEmpty = up_data_structs::CollectionProperties,487	>;488489	#[pallet::storage]490	#[pallet::getter(fn property_permissions)]491	pub type CollectionPropertyPermissions<T> = StorageMap<492		Hasher = Blake2_128Concat,493		Key = CollectionId,494		Value = PropertiesPermissionMap,495		QueryKind = ValueQuery,496	>;497498	#[pallet::storage]499	pub type AdminAmount<T> = StorageMap<500		Hasher = Blake2_128Concat,501		Key = CollectionId,502		Value = u32,503		QueryKind = ValueQuery,504	>;505506	/// List of collection admins507	#[pallet::storage]508	pub type IsAdmin<T: Config> = StorageNMap<509		Key = (510			Key<Blake2_128Concat, CollectionId>,511			Key<Blake2_128Concat, T::CrossAccountId>,512		),513		Value = bool,514		QueryKind = ValueQuery,515	>;516517	/// Allowlisted collection users518	#[pallet::storage]519	pub type Allowlist<T: Config> = StorageNMap<520		Key = (521			Key<Blake2_128Concat, CollectionId>,522			Key<Blake2_128Concat, T::CrossAccountId>,523		),524		Value = bool,525		QueryKind = ValueQuery,526	>;527528	/// Not used by code, exists only to provide some types to metadata529	#[pallet::storage]530	pub type DummyStorageValue<T: Config> = StorageValue<531		Value = (532			CollectionStats,533			CollectionId,534			TokenId,535			TokenChild,536			PhantomType<(537				TokenData<T::CrossAccountId>,538				RpcCollection<T::AccountId>,539				// RMRK540				RmrkCollectionInfo<T::AccountId>,541				RmrkInstanceInfo<T::AccountId>,542				RmrkResourceInfo,543				RmrkPropertyInfo,544				RmrkBaseInfo<T::AccountId>,545				RmrkPartType,546				RmrkTheme,547				RmrkNftChild,548			)>,549		),550		QueryKind = OptionQuery,551	>;552553	#[pallet::hooks]554	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {555		fn on_runtime_upgrade() -> Weight {556			if StorageVersion::get::<Pallet<T>>() < StorageVersion::new(1) {557				use up_data_structs::{CollectionVersion1, CollectionVersion2};558				<CollectionById<T>>::translate::<CollectionVersion1<T::AccountId>, _>(|id, v| {559					let mut props = Vec::new();560					if !v.offchain_schema.is_empty() {561						props.push(Property {562							key: b"_old_offchainSchema".to_vec().try_into().unwrap(),563							value: v564								.offchain_schema565								.clone()566								.into_inner()567								.try_into()568								.expect("offchain schema too big"),569						});570					}571					if !v.variable_on_chain_schema.is_empty() {572						props.push(Property {573							key: b"_old_variableOnChainSchema".to_vec().try_into().unwrap(),574							value: v575								.variable_on_chain_schema576								.clone()577								.into_inner()578								.try_into()579								.expect("offchain schema too big"),580						});581					}582					if !v.const_on_chain_schema.is_empty() {583						props.push(Property {584							key: b"_old_constOnChainSchema".to_vec().try_into().unwrap(),585							value: v586								.const_on_chain_schema587								.clone()588								.into_inner()589								.try_into()590								.expect("offchain schema too big"),591						});592					}593					props.push(Property {594						key: b"_old_schemaVersion".to_vec().try_into().unwrap(),595						value: match v.schema_version {596							SchemaVersion::ImageURL => b"ImageUrl".as_slice(),597							SchemaVersion::Unique => b"Unique".as_slice(),598						}599						.to_vec()600						.try_into()601						.unwrap(),602					});603					Self::set_scoped_collection_properties(604						id,605						PropertyScope::None,606						props.into_iter(),607					)608					.expect("existing data larger than properties");609					let mut new = CollectionVersion2::from(v.clone());610					new.permissions.access = Some(v.access);611					new.permissions.mint_mode = Some(v.mint_mode);612					Some(new)613				});614			}615616			0617		}618	}619}620621impl<T: Config> Pallet<T> {622	/// Ethereum receiver 0x0000000000000000000000000000000000000000 is reserved, and shouldn't own tokens623	pub fn ensure_correct_receiver(receiver: &T::CrossAccountId) -> DispatchResult {624		ensure!(625			&T::CrossAccountId::from_eth(H160([0; 20])) != receiver,626			<Error<T>>::AddressIsZero627		);628		Ok(())629	}630	pub fn adminlist(collection: CollectionId) -> Vec<T::CrossAccountId> {631		<IsAdmin<T>>::iter_prefix((collection,))632			.map(|(a, _)| a)633			.collect()634	}635	pub fn allowlist(collection: CollectionId) -> Vec<T::CrossAccountId> {636		<Allowlist<T>>::iter_prefix((collection,))637			.map(|(a, _)| a)638			.collect()639	}640	pub fn allowed(collection: CollectionId, user: T::CrossAccountId) -> bool {641		<Allowlist<T>>::get((collection, user))642	}643	pub fn collection_stats() -> CollectionStats {644		let created = <CreatedCollectionCount<T>>::get();645		let destroyed = <DestroyedCollectionCount<T>>::get();646		CollectionStats {647			created: created.0,648			destroyed: destroyed.0,649			alive: created.0 - destroyed.0,650		}651	}652653	pub fn effective_collection_limits(collection: CollectionId) -> Option<CollectionLimits> {654		let collection = <CollectionById<T>>::get(collection);655		if collection.is_none() {656			return None;657		}658659		let collection = collection.unwrap();660		let limits = collection.limits;661		let effective_limits = CollectionLimits {662			account_token_ownership_limit: Some(limits.account_token_ownership_limit()),663			sponsored_data_size: Some(limits.sponsored_data_size()),664			sponsored_data_rate_limit: Some(665				limits666					.sponsored_data_rate_limit667					.unwrap_or(SponsoringRateLimit::SponsoringDisabled),668			),669			token_limit: Some(limits.token_limit()),670			sponsor_transfer_timeout: Some(limits.sponsor_transfer_timeout(671				match collection.mode {672					CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,673					CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,674					CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,675				},676			)),677			sponsor_approve_timeout: Some(limits.sponsor_approve_timeout()),678			owner_can_transfer: Some(limits.owner_can_transfer()),679			owner_can_destroy: Some(limits.owner_can_destroy()),680			transfers_enabled: Some(limits.transfers_enabled()),681		};682683		Some(effective_limits)684	}685686	pub fn rpc_collection(collection: CollectionId) -> Option<RpcCollection<T::AccountId>> {687		let Collection {688			name,689			description,690			owner,691			mode,692			token_prefix,693			sponsorship,694			limits,695			permissions,696			external_collection,697		} = <CollectionById<T>>::get(collection)?;698699		let token_property_permissions = <CollectionPropertyPermissions<T>>::get(collection)700			.into_iter()701			.map(|(key, permission)| PropertyKeyPermission { key, permission })702			.collect();703704		let properties = <CollectionProperties<T>>::get(collection)705			.into_iter()706			.map(|(key, value)| Property { key, value })707			.collect();708709		let permissions = CollectionPermissions {710			access: Some(permissions.access()),711			mint_mode: Some(permissions.mint_mode()),712			nesting: Some(permissions.nesting().clone()),713		};714715		Some(RpcCollection {716			name: name.into_inner(),717			description: description.into_inner(),718			owner,719			mode,720			token_prefix: token_prefix.into_inner(),721			sponsorship,722			limits,723			permissions,724			token_property_permissions,725			properties,726			read_only: external_collection,727		})728	}729}730731macro_rules! limit_default {732	($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{733		$(734			if let Some($new) = $new.$field {735				let $old = $old.$field($($arg)?);736				let _ = $new;737				let _ = $old;738				$check739			} else {740				$new.$field = $old.$field741			}742		)*743	}};744}745macro_rules! limit_default_clone {746	($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{747		$(748			if let Some($new) = $new.$field.clone() {749				let $old = $old.$field($($arg)?);750				let _ = $new;751				let _ = $old;752				$check753			} else {754				$new.$field = $old.$field.clone()755			}756		)*757	}};758}759760impl<T: Config> Pallet<T> {761	pub fn init_collection(762		owner: T::CrossAccountId,763		data: CreateCollectionData<T::AccountId>,764		is_external: bool,765	) -> Result<CollectionId, DispatchError> {766		{767			ensure!(768				data.token_prefix.len() <= MAX_TOKEN_PREFIX_LENGTH as usize,769				Error::<T>::CollectionTokenPrefixLimitExceeded770			);771		}772773		let created_count = <CreatedCollectionCount<T>>::get()774			.0775			.checked_add(1)776			.ok_or(ArithmeticError::Overflow)?;777		let destroyed_count = <DestroyedCollectionCount<T>>::get().0;778		let id = CollectionId(created_count);779780		// bound Total number of collections781		ensure!(782			created_count - destroyed_count <= COLLECTION_NUMBER_LIMIT,783			<Error<T>>::TotalCollectionsLimitExceeded784		);785786		// =========787788		let collection = Collection {789			owner: owner.as_sub().clone(),790			name: data.name,791			mode: data.mode.clone(),792			description: data.description,793			token_prefix: data.token_prefix,794			sponsorship: data795				.pending_sponsor796				.map(SponsorshipState::Unconfirmed)797				.unwrap_or_default(),798			limits: data799				.limits800				.map(|limits| Self::clamp_limits(data.mode.clone(), &Default::default(), limits))801				.unwrap_or_else(|| Ok(CollectionLimits::default()))?,802			permissions: data803				.permissions804				.map(|permissions| {805					Self::clamp_permissions(data.mode.clone(), &Default::default(), permissions)806				})807				.unwrap_or_else(|| Ok(CollectionPermissions::default()))?,808			external_collection: is_external,809		};810811		let mut collection_properties = up_data_structs::CollectionProperties::get();812		collection_properties813			.try_set_from_iter(data.properties.into_iter())814			.map_err(<Error<T>>::from)?;815816		CollectionProperties::<T>::insert(id, collection_properties);817818		let mut token_props_permissions = PropertiesPermissionMap::new();819		token_props_permissions820			.try_set_from_iter(data.token_property_permissions.into_iter())821			.map_err(<Error<T>>::from)?;822823		CollectionPropertyPermissions::<T>::insert(id, token_props_permissions);824825		// Take a (non-refundable) deposit of collection creation826		{827			let mut imbalance =828				<<<T as Config>::Currency as Currency<T::AccountId>>::PositiveImbalance>::zero();829			imbalance.subsume(830				<<T as Config>::Currency as Currency<T::AccountId>>::deposit_creating(831					&T::TreasuryAccountId::get(),832					T::CollectionCreationPrice::get(),833				),834			);835			<T as Config>::Currency::settle(836				&owner.as_sub(),837				imbalance,838				WithdrawReasons::TRANSFER,839				ExistenceRequirement::KeepAlive,840			)841			.map_err(|_| Error::<T>::NotSufficientFounds)?;842		}843844		<CreatedCollectionCount<T>>::put(created_count);845		<Pallet<T>>::deposit_event(Event::CollectionCreated(846			id,847			data.mode.id(),848			owner.as_sub().clone(),849		));850		<PalletEvm<T>>::deposit_log(851			erc::CollectionHelpersEvents::CollectionCreated {852				owner: *owner.as_eth(),853				collection_id: eth::collection_id_to_address(id),854			}855			.to_log(T::ContractAddress::get()),856		);857		<CollectionById<T>>::insert(id, collection);858		Ok(id)859	}860861	pub fn destroy_collection(862		collection: CollectionHandle<T>,863		sender: &T::CrossAccountId,864	) -> DispatchResult {865		ensure!(866			collection.limits.owner_can_destroy(),867			<Error<T>>::NoPermission,868		);869		collection.check_is_owner(sender)?;870871		let destroyed_collections = <DestroyedCollectionCount<T>>::get()872			.0873			.checked_add(1)874			.ok_or(ArithmeticError::Overflow)?;875876		// =========877878		<DestroyedCollectionCount<T>>::put(destroyed_collections);879		<CollectionById<T>>::remove(collection.id);880		<AdminAmount<T>>::remove(collection.id);881		<IsAdmin<T>>::remove_prefix((collection.id,), None);882		<Allowlist<T>>::remove_prefix((collection.id,), None);883		<CollectionProperties<T>>::remove(collection.id);884885		<Pallet<T>>::deposit_event(Event::CollectionDestroyed(collection.id));886		Ok(())887	}888889	pub fn set_collection_property(890		collection: &CollectionHandle<T>,891		sender: &T::CrossAccountId,892		property: Property,893	) -> DispatchResult {894		collection.check_is_owner_or_admin(sender)?;895896		CollectionProperties::<T>::try_mutate(collection.id, |properties| {897			let property = property.clone();898			properties.try_set(property.key, property.value)899		})900		.map_err(<Error<T>>::from)?;901902		Self::deposit_event(Event::CollectionPropertySet(collection.id, property.key));903904		Ok(())905	}906907	pub fn set_scoped_collection_property(908		collection_id: CollectionId,909		scope: PropertyScope,910		property: Property,911	) -> DispatchResult {912		CollectionProperties::<T>::try_mutate(collection_id, |properties| {913			properties.try_scoped_set(scope, property.key, property.value)914		})915		.map_err(<Error<T>>::from)?;916917		Ok(())918	}919920	pub fn set_scoped_collection_properties(921		collection_id: CollectionId,922		scope: PropertyScope,923		properties: impl Iterator<Item = Property>,924	) -> DispatchResult {925		CollectionProperties::<T>::try_mutate(collection_id, |stored_properties| {926			stored_properties.try_scoped_set_from_iter(scope, properties)927		})928		.map_err(<Error<T>>::from)?;929930		Ok(())931	}932933	#[transactional]934	pub fn set_collection_properties(935		collection: &CollectionHandle<T>,936		sender: &T::CrossAccountId,937		properties: Vec<Property>,938	) -> DispatchResult {939		for property in properties {940			Self::set_collection_property(collection, sender, property)?;941		}942943		Ok(())944	}945946	pub fn delete_collection_property(947		collection: &CollectionHandle<T>,948		sender: &T::CrossAccountId,949		property_key: PropertyKey,950	) -> DispatchResult {951		collection.check_is_owner_or_admin(sender)?;952953		CollectionProperties::<T>::try_mutate(collection.id, |properties| {954			properties.remove(&property_key)955		})956		.map_err(<Error<T>>::from)?;957958		Self::deposit_event(Event::CollectionPropertyDeleted(959			collection.id,960			property_key,961		));962963		Ok(())964	}965966	#[transactional]967	pub fn delete_collection_properties(968		collection: &CollectionHandle<T>,969		sender: &T::CrossAccountId,970		property_keys: Vec<PropertyKey>,971	) -> DispatchResult {972		for key in property_keys {973			Self::delete_collection_property(collection, sender, key)?;974		}975976		Ok(())977	}978979	// For migrations980	pub fn set_property_permission_unchecked(981		collection: CollectionId,982		property_permission: PropertyKeyPermission,983	) -> DispatchResult {984		<CollectionPropertyPermissions<T>>::try_mutate(collection, |permissions| {985			permissions.try_set(property_permission.key, property_permission.permission)986		})987		.map_err(<Error<T>>::from)?;988		Ok(())989	}990991	pub fn set_property_permission(992		collection: &CollectionHandle<T>,993		sender: &T::CrossAccountId,994		property_permission: PropertyKeyPermission,995	) -> DispatchResult {996		collection.check_is_owner_or_admin(sender)?;997998		let all_permissions = CollectionPropertyPermissions::<T>::get(collection.id);999		let current_permission = all_permissions.get(&property_permission.key);1000		if matches![1001			current_permission,1002			Some(PropertyPermission { mutable: false, .. })1003		] {1004			return Err(<Error<T>>::NoPermission.into());1005		}10061007		CollectionPropertyPermissions::<T>::try_mutate(collection.id, |permissions| {1008			let property_permission = property_permission.clone();1009			permissions.try_set(property_permission.key, property_permission.permission)1010		})1011		.map_err(<Error<T>>::from)?;10121013		Self::deposit_event(Event::PropertyPermissionSet(1014			collection.id,1015			property_permission.key,1016		));10171018		Ok(())1019	}10201021	#[transactional]1022	pub fn set_property_permissions(1023		collection: &CollectionHandle<T>,1024		sender: &T::CrossAccountId,1025		property_permissions: Vec<PropertyKeyPermission>,1026	) -> DispatchResult {1027		for prop_pemission in property_permissions {1028			Self::set_property_permission(collection, sender, prop_pemission)?;1029		}10301031		Ok(())1032	}10331034	pub fn get_collection_property(1035		collection_id: CollectionId,1036		key: &PropertyKey,1037	) -> Option<PropertyValue> {1038		Self::collection_properties(collection_id).get(key).cloned()1039	}10401041	pub fn bytes_keys_to_property_keys(1042		keys: Vec<Vec<u8>>,1043	) -> Result<Vec<PropertyKey>, DispatchError> {1044		keys.into_iter()1045			.map(|key| -> Result<PropertyKey, DispatchError> {1046				key.try_into()1047					.map_err(|_| <Error<T>>::PropertyKeyIsTooLong.into())1048			})1049			.collect::<Result<Vec<PropertyKey>, DispatchError>>()1050	}10511052	pub fn filter_collection_properties(1053		collection_id: CollectionId,1054		keys: Option<Vec<PropertyKey>>,1055	) -> Result<Vec<Property>, DispatchError> {1056		let properties = Self::collection_properties(collection_id);10571058		let properties = keys1059			.map(|keys| {1060				keys.into_iter()1061					.filter_map(|key| {1062						properties.get(&key).map(|value| Property {1063							key,1064							value: value.clone(),1065						})1066					})1067					.collect()1068			})1069			.unwrap_or_else(|| {1070				properties1071					.into_iter()1072					.map(|(key, value)| Property { key, value })1073					.collect()1074			});10751076		Ok(properties)1077	}10781079	pub fn filter_property_permissions(1080		collection_id: CollectionId,1081		keys: Option<Vec<PropertyKey>>,1082	) -> Result<Vec<PropertyKeyPermission>, DispatchError> {1083		let permissions = Self::property_permissions(collection_id);10841085		let key_permissions = keys1086			.map(|keys| {1087				keys.into_iter()1088					.filter_map(|key| {1089						permissions1090							.get(&key)1091							.map(|permission| PropertyKeyPermission {1092								key,1093								permission: permission.clone(),1094							})1095					})1096					.collect()1097			})1098			.unwrap_or_else(|| {1099				permissions1100					.into_iter()1101					.map(|(key, permission)| PropertyKeyPermission { key, permission })1102					.collect()1103			});11041105		Ok(key_permissions)1106	}11071108	pub fn toggle_allowlist(1109		collection: &CollectionHandle<T>,1110		sender: &T::CrossAccountId,1111		user: &T::CrossAccountId,1112		allowed: bool,1113	) -> DispatchResult {1114		collection.check_is_owner_or_admin(sender)?;11151116		// =========11171118		if allowed {1119			<Allowlist<T>>::insert((collection.id, user), true);1120		} else {1121			<Allowlist<T>>::remove((collection.id, user));1122		}11231124		Ok(())1125	}11261127	pub fn toggle_admin(1128		collection: &CollectionHandle<T>,1129		sender: &T::CrossAccountId,1130		user: &T::CrossAccountId,1131		admin: bool,1132	) -> DispatchResult {1133		collection.check_is_owner(sender)?;11341135		let was_admin = <IsAdmin<T>>::get((collection.id, user));1136		if was_admin == admin {1137			return Ok(());1138		}1139		let amount = <AdminAmount<T>>::get(collection.id);11401141		if admin {1142			let amount = amount1143				.checked_add(1)1144				.ok_or(<Error<T>>::CollectionAdminCountExceeded)?;1145			ensure!(1146				amount <= Self::collection_admins_limit(),1147				<Error<T>>::CollectionAdminCountExceeded,1148			);11491150			// =========11511152			<AdminAmount<T>>::insert(collection.id, amount);1153			<IsAdmin<T>>::insert((collection.id, user), true);1154		} else {1155			<AdminAmount<T>>::insert(collection.id, amount.saturating_sub(1));1156			<IsAdmin<T>>::remove((collection.id, user));1157		}11581159		Ok(())1160	}11611162	pub fn clamp_limits(1163		mode: CollectionMode,1164		old_limit: &CollectionLimits,1165		mut new_limit: CollectionLimits,1166	) -> Result<CollectionLimits, DispatchError> {1167		limit_default!(old_limit, new_limit,1168			account_token_ownership_limit => ensure!(1169				new_limit <= MAX_TOKEN_OWNERSHIP,1170				<Error<T>>::CollectionLimitBoundsExceeded,1171			),1172			sponsored_data_size => ensure!(1173				new_limit <= CUSTOM_DATA_LIMIT,1174				<Error<T>>::CollectionLimitBoundsExceeded,1175			),11761177			sponsored_data_rate_limit => {},1178			token_limit => ensure!(1179				old_limit >= new_limit && new_limit > 0,1180				<Error<T>>::CollectionTokenLimitExceeded1181			),11821183			sponsor_transfer_timeout(match mode {1184				CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,1185				CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,1186				CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,1187			}) => ensure!(1188				new_limit <= MAX_SPONSOR_TIMEOUT,1189				<Error<T>>::CollectionLimitBoundsExceeded,1190			),1191			sponsor_approve_timeout => {},1192			owner_can_transfer => ensure!(1193				old_limit || !new_limit,1194				<Error<T>>::OwnerPermissionsCantBeReverted,1195			),1196			owner_can_destroy => ensure!(1197				old_limit || !new_limit,1198				<Error<T>>::OwnerPermissionsCantBeReverted,1199			),1200			transfers_enabled => {},1201		);1202		Ok(new_limit)1203	}12041205	pub fn clamp_permissions(1206		_mode: CollectionMode,1207		old_limit: &CollectionPermissions,1208		mut new_limit: CollectionPermissions,1209	) -> Result<CollectionPermissions, DispatchError> {1210		limit_default_clone!(old_limit, new_limit,1211			access => {},1212			mint_mode => {},1213			nesting => ensure!(1214				// Permissive is only allowed for tests and internal usage of chain for now1215				old_limit.permissive || !new_limit.permissive,1216				<Error<T>>::NoPermission,1217			),1218		);1219		Ok(new_limit)1220	}1221}12221223#[macro_export]1224macro_rules! unsupported {1225	() => {1226		Err(<Error<T>>::UnsupportedOperation.into())1227	};1228}12291230/// Worst cases1231pub trait CommonWeightInfo<CrossAccountId> {1232	fn create_item() -> Weight;1233	fn create_multiple_items(amount: &[CreateItemData]) -> Weight;1234	fn create_multiple_items_ex(cost: &CreateItemExData<CrossAccountId>) -> Weight;1235	fn burn_item() -> Weight;1236	fn set_collection_properties(amount: u32) -> Weight;1237	fn delete_collection_properties(amount: u32) -> Weight;1238	fn set_token_properties(amount: u32) -> Weight;1239	fn delete_token_properties(amount: u32) -> Weight;1240	fn set_property_permissions(amount: u32) -> Weight;1241	fn transfer() -> Weight;1242	fn approve() -> Weight;1243	fn transfer_from() -> Weight;1244	fn burn_from() -> Weight;12451246	/// Differs from burn_item in case of Fungible and Refungible, as it should burn1247	/// whole users's balance1248	///1249	/// This method shouldn't be used directly, as it doesn't count breadth price, use `burn_recursively` instead1250	fn burn_recursively_self_raw() -> Weight;1251	/// Cost of iterating over `amount` children while burning, without counting child burning itself1252	///1253	/// This method shouldn't be used directly, as it doesn't count depth price, use `burn_recursively` instead1254	fn burn_recursively_breadth_raw(amount: u32) -> Weight;12551256	fn burn_recursively(max_selfs: u32, max_breadth: u32) -> Weight {1257		Self::burn_recursively_self_raw()1258			.saturating_mul(max_selfs.max(1) as u64)1259			.saturating_add(Self::burn_recursively_breadth_raw(max_breadth))1260	}1261}12621263pub trait CommonCollectionOperations<T: Config> {1264	fn create_item(1265		&self,1266		sender: T::CrossAccountId,1267		to: T::CrossAccountId,1268		data: CreateItemData,1269		nesting_budget: &dyn Budget,1270	) -> DispatchResultWithPostInfo;1271	fn create_multiple_items(1272		&self,1273		sender: T::CrossAccountId,1274		to: T::CrossAccountId,1275		data: Vec<CreateItemData>,1276		nesting_budget: &dyn Budget,1277	) -> DispatchResultWithPostInfo;1278	fn create_multiple_items_ex(1279		&self,1280		sender: T::CrossAccountId,1281		data: CreateItemExData<T::CrossAccountId>,1282		nesting_budget: &dyn Budget,1283	) -> DispatchResultWithPostInfo;1284	fn burn_item(1285		&self,1286		sender: T::CrossAccountId,1287		token: TokenId,1288		amount: u128,1289	) -> DispatchResultWithPostInfo;1290	fn burn_item_recursively(1291		&self,1292		sender: T::CrossAccountId,1293		token: TokenId,1294		self_budget: &dyn Budget,1295		breadth_budget: &dyn Budget,1296	) -> DispatchResultWithPostInfo;1297	fn set_collection_properties(1298		&self,1299		sender: T::CrossAccountId,1300		properties: Vec<Property>,1301	) -> DispatchResultWithPostInfo;1302	fn delete_collection_properties(1303		&self,1304		sender: &T::CrossAccountId,1305		property_keys: Vec<PropertyKey>,1306	) -> DispatchResultWithPostInfo;1307	fn set_token_properties(1308		&self,1309		sender: T::CrossAccountId,1310		token_id: TokenId,1311		property: Vec<Property>,1312	) -> DispatchResultWithPostInfo;1313	fn delete_token_properties(1314		&self,1315		sender: T::CrossAccountId,1316		token_id: TokenId,1317		property_keys: Vec<PropertyKey>,1318	) -> DispatchResultWithPostInfo;1319	fn set_property_permissions(1320		&self,1321		sender: &T::CrossAccountId,1322		property_permissions: Vec<PropertyKeyPermission>,1323	) -> DispatchResultWithPostInfo;1324	fn transfer(1325		&self,1326		sender: T::CrossAccountId,1327		to: T::CrossAccountId,1328		token: TokenId,1329		amount: u128,1330		nesting_budget: &dyn Budget,1331	) -> DispatchResultWithPostInfo;1332	fn approve(1333		&self,1334		sender: T::CrossAccountId,1335		spender: T::CrossAccountId,1336		token: TokenId,1337		amount: u128,1338	) -> DispatchResultWithPostInfo;1339	fn transfer_from(1340		&self,1341		sender: T::CrossAccountId,1342		from: T::CrossAccountId,1343		to: T::CrossAccountId,1344		token: TokenId,1345		amount: u128,1346		nesting_budget: &dyn Budget,1347	) -> DispatchResultWithPostInfo;1348	fn burn_from(1349		&self,1350		sender: T::CrossAccountId,1351		from: T::CrossAccountId,1352		token: TokenId,1353		amount: u128,1354		nesting_budget: &dyn Budget,1355	) -> DispatchResultWithPostInfo;13561357	fn check_nesting(1358		&self,1359		sender: T::CrossAccountId,1360		from: (CollectionId, TokenId),1361		under: TokenId,1362		budget: &dyn Budget,1363	) -> DispatchResult;13641365	fn nest(&self, under: TokenId, to_nest: (CollectionId, TokenId));13661367	fn unnest(&self, under: TokenId, to_nest: (CollectionId, TokenId));13681369	fn account_tokens(&self, account: T::CrossAccountId) -> Vec<TokenId>;1370	fn collection_tokens(&self) -> Vec<TokenId>;1371	fn token_exists(&self, token: TokenId) -> bool;1372	fn last_token_id(&self) -> TokenId;13731374	fn token_owner(&self, token: TokenId) -> Option<T::CrossAccountId>;1375	fn token_property(&self, token_id: TokenId, key: &PropertyKey) -> Option<PropertyValue>;1376	fn token_properties(&self, token_id: TokenId, keys: Option<Vec<PropertyKey>>) -> Vec<Property>;1377	/// Amount of unique collection tokens1378	fn total_supply(&self) -> u32;1379	/// Amount of different tokens account has (Applicable to nonfungible/refungible)1380	fn account_balance(&self, account: T::CrossAccountId) -> u32;1381	/// Amount of specific token account have (Applicable to fungible/refungible)1382	fn balance(&self, account: T::CrossAccountId, token: TokenId) -> u128;1383	fn allowance(1384		&self,1385		sender: T::CrossAccountId,1386		spender: T::CrossAccountId,1387		token: TokenId,1388	) -> u128;1389}13901391// Flexible enough for implementing CommonCollectionOperations1392pub fn with_weight(res: DispatchResult, weight: Weight) -> DispatchResultWithPostInfo {1393	let post_info = PostDispatchInfo {1394		actual_weight: Some(weight),1395		pays_fee: Pays::Yes,1396	};1397	match res {1398		Ok(()) => Ok(post_info),1399		Err(error) => Err(DispatchErrorWithPostInfo { post_info, error }),1400	}1401}14021403impl<T: Config> From<PropertiesError> for Error<T> {1404	fn from(error: PropertiesError) -> Self {1405		match error {1406			PropertiesError::NoSpaceForProperty => Self::NoSpaceForProperty,1407			PropertiesError::PropertyLimitReached => Self::PropertyLimitReached,1408			PropertiesError::InvalidCharacterInPropertyKey => Self::InvalidCharacterInPropertyKey,1409			PropertiesError::PropertyKeyIsTooLong => Self::PropertyKeyIsTooLong,1410			PropertiesError::EmptyPropertyKey => Self::EmptyPropertyKey,1411		}1412	}1413}
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -27,8 +27,8 @@
 };
 use up_data_structs::{
 	AccessMode, CollectionId, CustomDataLimit, TokenId, CreateCollectionData, CreateNftExData,
-	mapping::TokenAddressMapping, NestingRule, budget::Budget, Property, PropertyPermission,
-	PropertyKey, PropertyKeyPermission, Properties, PropertyScope, TrySetProperty, TokenChild,
+	mapping::TokenAddressMapping, budget::Budget, Property, PropertyPermission, PropertyKey,
+	PropertyKeyPermission, Properties, PropertyScope, TrySetProperty, TokenChild,
 };
 use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
 use pallet_common::{
@@ -996,38 +996,29 @@
 		under: TokenId,
 		nesting_budget: &dyn Budget,
 	) -> DispatchResult {
-		fn ensure_sender_allowed<T: Config>(
-			collection: CollectionId,
-			token: TokenId,
-			for_nest: (CollectionId, TokenId),
-			sender: T::CrossAccountId,
-			budget: &dyn Budget,
-		) -> DispatchResult {
+		let nesting = handle.permissions.nesting();
+		if nesting.permissive {
+			// Pass
+		} else if nesting.token_owner
+			&& <PalletStructure<T>>::check_indirectly_owned(
+				sender.clone(),
+				handle.id,
+				under,
+				Some(from),
+				nesting_budget,
+			)? {
+			// Pass
+		} else if nesting.admin && handle.is_owner_or_admin(&sender) {
+			// Pass
+		} else {
+			fail!(<CommonError<T>>::UserIsNotAllowedToNest);
+		}
+
+		if let Some(whitelist) = &nesting.restricted {
 			ensure!(
-				<PalletStructure<T>>::check_indirectly_owned(
-					sender,
-					collection,
-					token,
-					Some(for_nest),
-					budget
-				)?,
-				<CommonError<T>>::OnlyOwnerAllowedToNest,
+				whitelist.contains(&from.0),
+				<CommonError<T>>::SourceCollectionIsNotAllowedToNest
 			);
-			Ok(())
-		}
-		match handle.permissions.nesting() {
-			NestingRule::Disabled => fail!(<CommonError<T>>::NestingIsDisabled),
-			NestingRule::Owner => {
-				ensure_sender_allowed::<T>(handle.id, under, from, sender, nesting_budget)?
-			}
-			NestingRule::OwnerRestricted(whitelist) => {
-				ensure!(
-					whitelist.contains(&from.0),
-					<CommonError<T>>::SourceCollectionIsNotAllowedToNest
-				);
-				ensure_sender_allowed::<T>(handle.id, under, from, sender, nesting_budget)?
-			}
-			NestingRule::Permissive => {}
 		}
 		Ok(())
 	}
modifiedpallets/proxy-rmrk-core/src/lib.rsdiffbeforeafterboth
--- a/pallets/proxy-rmrk-core/src/lib.rs
+++ b/pallets/proxy-rmrk-core/src/lib.rs
@@ -200,7 +200,13 @@
 					.try_into()
 					.map_err(|_| <CommonError<T>>::CollectionTokenPrefixLimitExceeded)?,
 				permissions: Some(CollectionPermissions {
-					nesting: Some(NestingRule::Owner),
+					nesting: Some(NestingPermissions {
+						token_owner: true,
+						admin: false,
+						restricted: None,
+
+						permissive: false,
+					}),
 					..Default::default()
 				}),
 				..Default::default()
@@ -600,7 +606,7 @@
 				&budget,
 			)
 			.map_err(|err| {
-				if err == <CommonError<T>>::OnlyOwnerAllowedToNest.into() {
+				if err == <CommonError<T>>::UserIsNotAllowedToNest.into() {
 					<Error<T>>::CannotAcceptNonOwnedNft.into()
 				} else {
 					Self::map_unique_err_to_proxy(err)
modifiedprimitives/data-structs/src/lib.rsdiffbeforeafterboth
--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -441,7 +441,7 @@
 pub struct CollectionPermissions {
 	pub access: Option<AccessMode>,
 	pub mint_mode: Option<bool>,
-	pub nesting: Option<NestingRule>,
+	pub nesting: Option<NestingPermissions>,
 }
 
 impl CollectionPermissions {
@@ -451,30 +451,58 @@
 	pub fn mint_mode(&self) -> bool {
 		self.mint_mode.unwrap_or(false)
 	}
-	pub fn nesting(&self) -> &NestingRule {
-		static DEFAULT: NestingRule = NestingRule::Disabled;
+	pub fn nesting(&self) -> &NestingPermissions {
+		static DEFAULT: NestingPermissions = NestingPermissions {
+			token_owner: false,
+			admin: false,
+			restricted: None,
+
+			permissive: false,
+		};
 		self.nesting.as_ref().unwrap_or(&DEFAULT)
 	}
 }
 
-pub type OwnerRestrictedSet = BoundedBTreeSet<CollectionId, ConstU32<16>>;
+type OwnerRestrictedSetInner = BoundedBTreeSet<CollectionId, ConstU32<16>>;
+
+#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen, Derivative)]
+#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
+#[derivative(Debug)]
+pub struct OwnerRestrictedSet(
+	#[cfg_attr(feature = "serde1", serde(with = "bounded::set_serde"))]
+	#[derivative(Debug(format_with = "bounded::set_debug"))]
+	pub OwnerRestrictedSetInner,
+);
+impl OwnerRestrictedSet {
+	pub fn new() -> Self {
+		Self(Default::default())
+	}
+}
+impl core::ops::Deref for OwnerRestrictedSet {
+	type Target = OwnerRestrictedSetInner;
+	fn deref(&self) -> &Self::Target {
+		&self.0
+	}
+}
+impl core::ops::DerefMut for OwnerRestrictedSet {
+	fn deref_mut(&mut self) -> &mut Self::Target {
+		&mut self.0
+	}
+}
 
 #[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen, Derivative)]
 #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 #[derivative(Debug)]
-pub enum NestingRule {
-	/// No one can nest tokens
-	Disabled,
-	/// Owner can nest any tokens
-	Owner,
-	/// Owner can nest tokens from specified collections
-	OwnerRestricted(
-		#[cfg_attr(feature = "serde1", serde(with = "bounded::set_serde"))]
-		#[derivative(Debug(format_with = "bounded::set_debug"))]
-		OwnerRestrictedSet,
-	),
-	/// Used for tests
-	Permissive,
+pub struct NestingPermissions {
+	/// Owner of token can nest tokens under it
+	pub token_owner: bool,
+	/// Admin of token collection can nest tokens under token
+	pub admin: bool,
+	/// If set - only tokens from specified collections can be nested
+	pub restricted: Option<OwnerRestrictedSet>,
+
+	/// Anyone can nest tokens, mutually exclusive with `token_owner`, `admin`
+	pub permissive: bool,
 }
 
 #[derive(Encode, Decode, Debug, Clone, Copy, PartialEq, TypeInfo, MaxEncodedLen)]
modifiedtests/package.jsondiffbeforeafterboth
--- a/tests/package.json
+++ b/tests/package.json
@@ -5,7 +5,7 @@
   "main": "",
   "devDependencies": {
     "@polkadot/ts": "0.4.22",
-    "@polkadot/typegen": "8.7.2-11",
+    "@polkadot/typegen": "8.7.2-15",
     "@types/chai": "^4.3.1",
     "@types/chai-as-promised": "^7.1.5",
     "@types/mocha": "^9.1.1",
@@ -86,8 +86,8 @@
   "license": "SEE LICENSE IN ../LICENSE",
   "homepage": "",
   "dependencies": {
-    "@polkadot/api": "8.7.2-11",
-    "@polkadot/api-contract": "8.7.2-11",
+    "@polkadot/api": "8.7.2-15",
+    "@polkadot/api-contract": "8.7.2-15",
     "@polkadot/util-crypto": "9.4.1",
     "bignumber.js": "^9.0.2",
     "chai-as-promised": "^7.1.1",
modifiedtests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -125,10 +125,6 @@
        **/
       MustBeTokenOwner: AugmentedError<ApiType>;
       /**
-       * Collection has nesting disabled
-       **/
-      NestingIsDisabled: AugmentedError<ApiType>;
-      /**
        * No permission to perform action
        **/
       NoPermission: AugmentedError<ApiType>;
@@ -137,13 +133,9 @@
        **/
       NoSpaceForProperty: AugmentedError<ApiType>;
       /**
-       * Not sufficient founds to perform action
+       * Not sufficient funds to perform action
        **/
       NotSufficientFounds: AugmentedError<ApiType>;
-      /**
-       * Only owner may nest tokens under this collection
-       **/
-      OnlyOwnerAllowedToNest: AugmentedError<ApiType>;
       /**
        * Tried to enable permissions which are only permitted to be disabled
        **/
@@ -185,6 +177,10 @@
        **/
       UnsupportedOperation: AugmentedError<ApiType>;
       /**
+       * User not passed nesting rule
+       **/
+      UserIsNotAllowedToNest: AugmentedError<ApiType>;
+      /**
        * Generic error
        **/
       [key: string]: AugmentedError<ApiType>;
@@ -502,6 +498,10 @@
     };
     structure: {
       /**
+       * While iterating over children, encountered breadth limit
+       **/
+      BreadthLimit: AugmentedError<ApiType>;
+      /**
        * While searched for owner, encountered depth limit
        **/
       DepthLimit: AugmentedError<ApiType>;
modifiedtests/src/interfaces/augment-api-events.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-events.ts
+++ b/tests/src/interfaces/augment-api-events.ts
@@ -13,45 +13,45 @@
       /**
        * A balance was set by root.
        **/
-      BalanceSet: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
+      BalanceSet: AugmentedEvent<ApiType, [who: AccountId32, free: u128, reserved: u128], { who: AccountId32, free: u128, reserved: u128 }>;
       /**
        * Some amount was deposited (e.g. for transaction fees).
        **/
-      Deposit: AugmentedEvent<ApiType, [AccountId32, u128]>;
+      Deposit: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
       /**
        * An account was removed whose balance was non-zero but below ExistentialDeposit,
        * resulting in an outright loss.
        **/
-      DustLost: AugmentedEvent<ApiType, [AccountId32, u128]>;
+      DustLost: AugmentedEvent<ApiType, [account: AccountId32, amount: u128], { account: AccountId32, amount: u128 }>;
       /**
        * An account was created with some free balance.
        **/
-      Endowed: AugmentedEvent<ApiType, [AccountId32, u128]>;
+      Endowed: AugmentedEvent<ApiType, [account: AccountId32, freeBalance: u128], { account: AccountId32, freeBalance: u128 }>;
       /**
        * Some balance was reserved (moved from free to reserved).
        **/
-      Reserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
+      Reserved: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
       /**
        * Some balance was moved from the reserve of the first account to the second account.
        * Final argument indicates the destination balance type.
        **/
-      ReserveRepatriated: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128, FrameSupportTokensMiscBalanceStatus]>;
+      ReserveRepatriated: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus], { from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus }>;
       /**
        * Some amount was removed from the account (e.g. for misbehavior).
        **/
-      Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
+      Slashed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
       /**
        * Transfer succeeded.
        **/
-      Transfer: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128]>;
+      Transfer: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128], { from: AccountId32, to: AccountId32, amount: u128 }>;
       /**
        * Some balance was unreserved (moved from reserved to free).
        **/
-      Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
+      Unreserved: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
       /**
        * Some amount was withdrawn from the account (e.g. for transaction fees).
        **/
-      Withdraw: AugmentedEvent<ApiType, [AccountId32, u128]>;
+      Withdraw: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
       /**
        * Generic event
        **/
@@ -398,28 +398,28 @@
       [key: string]: AugmentedEvent<ApiType>;
     };
     rmrkCore: {
-      CollectionCreated: AugmentedEvent<ApiType, [AccountId32, u32]>;
-      CollectionDestroyed: AugmentedEvent<ApiType, [AccountId32, u32]>;
-      CollectionLocked: AugmentedEvent<ApiType, [AccountId32, u32]>;
-      IssuerChanged: AugmentedEvent<ApiType, [AccountId32, AccountId32, u32]>;
-      NFTAccepted: AugmentedEvent<ApiType, [AccountId32, RmrkTraitsNftAccountIdOrCollectionNftTuple, u32, u32]>;
-      NFTBurned: AugmentedEvent<ApiType, [AccountId32, u32]>;
-      NftMinted: AugmentedEvent<ApiType, [AccountId32, u32, u32]>;
-      NFTRejected: AugmentedEvent<ApiType, [AccountId32, u32, u32]>;
-      NFTSent: AugmentedEvent<ApiType, [AccountId32, RmrkTraitsNftAccountIdOrCollectionNftTuple, u32, u32, bool]>;
-      PrioritySet: AugmentedEvent<ApiType, [u32, u32]>;
-      PropertySet: AugmentedEvent<ApiType, [u32, Option<u32>, Bytes, Bytes]>;
-      ResourceAccepted: AugmentedEvent<ApiType, [u32, u32]>;
-      ResourceAdded: AugmentedEvent<ApiType, [u32, u32]>;
-      ResourceRemoval: AugmentedEvent<ApiType, [u32, u32]>;
-      ResourceRemovalAccepted: AugmentedEvent<ApiType, [u32, u32]>;
+      CollectionCreated: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;
+      CollectionDestroyed: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;
+      CollectionLocked: AugmentedEvent<ApiType, [issuer: AccountId32, collectionId: u32], { issuer: AccountId32, collectionId: u32 }>;
+      IssuerChanged: AugmentedEvent<ApiType, [oldIssuer: AccountId32, newIssuer: AccountId32, collectionId: u32], { oldIssuer: AccountId32, newIssuer: AccountId32, collectionId: u32 }>;
+      NFTAccepted: AugmentedEvent<ApiType, [sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32], { sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32 }>;
+      NFTBurned: AugmentedEvent<ApiType, [owner: AccountId32, nftId: u32], { owner: AccountId32, nftId: u32 }>;
+      NftMinted: AugmentedEvent<ApiType, [owner: AccountId32, collectionId: u32, nftId: u32], { owner: AccountId32, collectionId: u32, nftId: u32 }>;
+      NFTRejected: AugmentedEvent<ApiType, [sender: AccountId32, collectionId: u32, nftId: u32], { sender: AccountId32, collectionId: u32, nftId: u32 }>;
+      NFTSent: AugmentedEvent<ApiType, [sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32, approvalRequired: bool], { sender: AccountId32, recipient: RmrkTraitsNftAccountIdOrCollectionNftTuple, collectionId: u32, nftId: u32, approvalRequired: bool }>;
+      PrioritySet: AugmentedEvent<ApiType, [collectionId: u32, nftId: u32], { collectionId: u32, nftId: u32 }>;
+      PropertySet: AugmentedEvent<ApiType, [collectionId: u32, maybeNftId: Option<u32>, key: Bytes, value: Bytes], { collectionId: u32, maybeNftId: Option<u32>, key: Bytes, value: Bytes }>;
+      ResourceAccepted: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;
+      ResourceAdded: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;
+      ResourceRemoval: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;
+      ResourceRemovalAccepted: AugmentedEvent<ApiType, [nftId: u32, resourceId: u32], { nftId: u32, resourceId: u32 }>;
       /**
        * Generic event
        **/
       [key: string]: AugmentedEvent<ApiType>;
     };
     rmrkEquip: {
-      BaseCreated: AugmentedEvent<ApiType, [AccountId32, u32]>;
+      BaseCreated: AugmentedEvent<ApiType, [issuer: AccountId32, baseId: u32], { issuer: AccountId32, baseId: u32 }>;
       /**
        * Generic event
        **/
@@ -429,19 +429,19 @@
       /**
        * The call for the provided hash was not found so the task has been aborted.
        **/
-      CallLookupFailed: AugmentedEvent<ApiType, [ITuple<[u32, u32]>, Option<U8aFixed>, FrameSupportScheduleLookupError]>;
+      CallLookupFailed: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, error: FrameSupportScheduleLookupError], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, error: FrameSupportScheduleLookupError }>;
       /**
        * Canceled some task.
        **/
-      Canceled: AugmentedEvent<ApiType, [u32, u32]>;
+      Canceled: AugmentedEvent<ApiType, [when: u32, index: u32], { when: u32, index: u32 }>;
       /**
        * Dispatched some task.
        **/
-      Dispatched: AugmentedEvent<ApiType, [ITuple<[u32, u32]>, Option<U8aFixed>, Result<Null, SpRuntimeDispatchError>]>;
+      Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError> }>;
       /**
        * Scheduled some task.
        **/
-      Scheduled: AugmentedEvent<ApiType, [u32, u32]>;
+      Scheduled: AugmentedEvent<ApiType, [when: u32, index: u32], { when: u32, index: u32 }>;
       /**
        * Generic event
        **/
@@ -461,15 +461,15 @@
       /**
        * The \[sudoer\] just switched identity; the old key is supplied if one existed.
        **/
-      KeyChanged: AugmentedEvent<ApiType, [Option<AccountId32>]>;
+      KeyChanged: AugmentedEvent<ApiType, [oldSudoer: Option<AccountId32>], { oldSudoer: Option<AccountId32> }>;
       /**
        * A sudo just took place. \[result\]
        **/
-      Sudid: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
+      Sudid: AugmentedEvent<ApiType, [sudoResult: Result<Null, SpRuntimeDispatchError>], { sudoResult: Result<Null, SpRuntimeDispatchError> }>;
       /**
        * A sudo just took place. \[result\]
        **/
-      SudoAsDone: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
+      SudoAsDone: AugmentedEvent<ApiType, [sudoResult: Result<Null, SpRuntimeDispatchError>], { sudoResult: Result<Null, SpRuntimeDispatchError> }>;
       /**
        * Generic event
        **/
@@ -483,23 +483,23 @@
       /**
        * An extrinsic failed.
        **/
-      ExtrinsicFailed: AugmentedEvent<ApiType, [SpRuntimeDispatchError, FrameSupportWeightsDispatchInfo]>;
+      ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo }>;
       /**
        * An extrinsic completed successfully.
        **/
-      ExtrinsicSuccess: AugmentedEvent<ApiType, [FrameSupportWeightsDispatchInfo]>;
+      ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchInfo: FrameSupportWeightsDispatchInfo }>;
       /**
        * An account was reaped.
        **/
-      KilledAccount: AugmentedEvent<ApiType, [AccountId32]>;
+      KilledAccount: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;
       /**
        * A new account was created.
        **/
-      NewAccount: AugmentedEvent<ApiType, [AccountId32]>;
+      NewAccount: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;
       /**
        * On on-chain remark happened.
        **/
-      Remarked: AugmentedEvent<ApiType, [AccountId32, H256]>;
+      Remarked: AugmentedEvent<ApiType, [sender: AccountId32, hash_: H256], { sender: AccountId32, hash_: H256 }>;
       /**
        * Generic event
        **/
@@ -509,31 +509,31 @@
       /**
        * Some funds have been allocated.
        **/
-      Awarded: AugmentedEvent<ApiType, [u32, u128, AccountId32]>;
+      Awarded: AugmentedEvent<ApiType, [proposalIndex: u32, award: u128, account: AccountId32], { proposalIndex: u32, award: u128, account: AccountId32 }>;
       /**
        * Some of our funds have been burnt.
        **/
-      Burnt: AugmentedEvent<ApiType, [u128]>;
+      Burnt: AugmentedEvent<ApiType, [burntFunds: u128], { burntFunds: u128 }>;
       /**
        * Some funds have been deposited.
        **/
-      Deposit: AugmentedEvent<ApiType, [u128]>;
+      Deposit: AugmentedEvent<ApiType, [value: u128], { value: u128 }>;
       /**
        * New proposal.
        **/
-      Proposed: AugmentedEvent<ApiType, [u32]>;
+      Proposed: AugmentedEvent<ApiType, [proposalIndex: u32], { proposalIndex: u32 }>;
       /**
        * A proposal was rejected; funds were slashed.
        **/
-      Rejected: AugmentedEvent<ApiType, [u32, u128]>;
+      Rejected: AugmentedEvent<ApiType, [proposalIndex: u32, slashed: u128], { proposalIndex: u32, slashed: u128 }>;
       /**
        * Spending has finished; this is the amount that rolls over until next spend.
        **/
-      Rollover: AugmentedEvent<ApiType, [u128]>;
+      Rollover: AugmentedEvent<ApiType, [rolloverBalance: u128], { rolloverBalance: u128 }>;
       /**
        * We have ended a spend period and will now allocate funds.
        **/
-      Spending: AugmentedEvent<ApiType, [u128]>;
+      Spending: AugmentedEvent<ApiType, [budgetRemaining: u128], { budgetRemaining: u128 }>;
       /**
        * Generic event
        **/
@@ -636,15 +636,15 @@
       /**
        * Claimed vesting.
        **/
-      Claimed: AugmentedEvent<ApiType, [AccountId32, u128]>;
+      Claimed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
       /**
        * Added new vesting schedule.
        **/
-      VestingScheduleAdded: AugmentedEvent<ApiType, [AccountId32, AccountId32, OrmlVestingVestingSchedule]>;
+      VestingScheduleAdded: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, vestingSchedule: OrmlVestingVestingSchedule], { from: AccountId32, to: AccountId32, vestingSchedule: OrmlVestingVestingSchedule }>;
       /**
        * Updated vesting schedules.
        **/
-      VestingSchedulesUpdated: AugmentedEvent<ApiType, [AccountId32]>;
+      VestingSchedulesUpdated: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
       /**
        * Generic event
        **/
modifiedtests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -347,22 +347,105 @@
       [key: string]: SubmittableExtrinsicFunction<ApiType>;
     };
     rmrkCore: {
+      /**
+       * Accepts an NFT sent from another account to self or owned NFT
+       * 
+       * Parameters:
+       * - `origin`: sender of the transaction
+       * - `rmrk_collection_id`: collection id of the nft to be accepted
+       * - `rmrk_nft_id`: nft id of the nft to be accepted
+       * - `new_owner`: either origin's account ID or origin-owned NFT, whichever the NFT was
+       * sent to
+       **/
       acceptNft: AugmentedSubmittable<(rmrkCollectionId: u32 | AnyNumber | Uint8Array, rmrkNftId: u32 | AnyNumber | Uint8Array, newOwner: RmrkTraitsNftAccountIdOrCollectionNftTuple | { AccountId: any } | { CollectionAndNftTuple: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, RmrkTraitsNftAccountIdOrCollectionNftTuple]>;
+      /**
+       * accept the addition of a new resource to an existing NFT
+       **/
       acceptResource: AugmentedSubmittable<(rmrkCollectionId: u32 | AnyNumber | Uint8Array, rmrkNftId: u32 | AnyNumber | Uint8Array, rmrkResourceId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u32]>;
+      /**
+       * accept the removal of a resource of an existing NFT
+       **/
       acceptResourceRemoval: AugmentedSubmittable<(rmrkCollectionId: u32 | AnyNumber | Uint8Array, rmrkNftId: u32 | AnyNumber | Uint8Array, rmrkResourceId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u32]>;
+      /**
+       * Create basic resource
+       **/
       addBasicResource: AugmentedSubmittable<(rmrkCollectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, resource: RmrkTraitsResourceBasicResource | { src?: any; metadata?: any; license?: any; thumb?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, RmrkTraitsResourceBasicResource]>;
+      /**
+       * Create composable resource
+       **/
       addComposableResource: AugmentedSubmittable<(rmrkCollectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, resourceId: Bytes | string | Uint8Array, resource: RmrkTraitsResourceComposableResource | { parts?: any; base?: any; src?: any; metadata?: any; license?: any; thumb?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, Bytes, RmrkTraitsResourceComposableResource]>;
+      /**
+       * Create slot resource
+       **/
       addSlotResource: AugmentedSubmittable<(rmrkCollectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, resource: RmrkTraitsResourceSlotResource | { base?: any; src?: any; metadata?: any; slot?: any; license?: any; thumb?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, RmrkTraitsResourceSlotResource]>;
+      /**
+       * burn nft
+       **/
       burnNft: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
+      /**
+       * Change the issuer of a collection
+       * 
+       * Parameters:
+       * - `origin`: sender of the transaction
+       * - `collection_id`: collection id of the nft to change issuer of
+       * - `new_issuer`: Collection's new issuer
+       **/
       changeCollectionIssuer: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newIssuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, MultiAddress]>;
+      /**
+       * Create a collection
+       **/
       createCollection: AugmentedSubmittable<(metadata: Bytes | string | Uint8Array, max: Option<u32> | null | object | string | Uint8Array, symbol: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, Option<u32>, Bytes]>;
+      /**
+       * destroy collection
+       **/
       destroyCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
+      /**
+       * lock collection
+       **/
       lockCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
+      /**
+       * Mints an NFT in the specified collection
+       * Sets metadata and the royalty attribute
+       * 
+       * Parameters:
+       * - `collection_id`: The class of the asset to be minted.
+       * - `nft_id`: The nft value of the asset to be minted.
+       * - `recipient`: Receiver of the royalty
+       * - `royalty`: Permillage reward from each trade for the Recipient
+       * - `metadata`: Arbitrary data about an nft, e.g. IPFS hash
+       * - `transferable`: Ability to transfer this NFT
+       **/
       mintNft: AugmentedSubmittable<(owner: AccountId32 | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, recipient: Option<AccountId32> | null | object | string | Uint8Array, royaltyAmount: Option<Permill> | null | object | string | Uint8Array, metadata: Bytes | string | Uint8Array, transferable: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32, Option<AccountId32>, Option<Permill>, Bytes, bool]>;
+      /**
+       * Rejects an NFT sent from another account to self or owned NFT
+       * 
+       * Parameters:
+       * - `origin`: sender of the transaction
+       * - `rmrk_collection_id`: collection id of the nft to be accepted
+       * - `rmrk_nft_id`: nft id of the nft to be accepted
+       **/
       rejectNft: AugmentedSubmittable<(rmrkCollectionId: u32 | AnyNumber | Uint8Array, rmrkNftId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
+      /**
+       * remove resource
+       **/
       removeResource: AugmentedSubmittable<(rmrkCollectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, resourceId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u32]>;
+      /**
+       * Transfers a NFT from an Account or NFT A to another Account or NFT B
+       * 
+       * Parameters:
+       * - `origin`: sender of the transaction
+       * - `rmrk_collection_id`: collection id of the nft to be transferred
+       * - `rmrk_nft_id`: nft id of the nft to be transferred
+       * - `new_owner`: new owner of the nft which can be either an account or a NFT
+       **/
       send: AugmentedSubmittable<(rmrkCollectionId: u32 | AnyNumber | Uint8Array, rmrkNftId: u32 | AnyNumber | Uint8Array, newOwner: RmrkTraitsNftAccountIdOrCollectionNftTuple | { AccountId: any } | { CollectionAndNftTuple: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, RmrkTraitsNftAccountIdOrCollectionNftTuple]>;
+      /**
+       * set a different order of resource priority
+       **/
       setPriority: AugmentedSubmittable<(rmrkCollectionId: u32 | AnyNumber | Uint8Array, rmrkNftId: u32 | AnyNumber | Uint8Array, priorities: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, u32, Vec<u32>]>;
+      /**
+       * set a custom value on an NFT
+       **/
       setProperty: AugmentedSubmittable<(rmrkCollectionId: Compact<u32> | AnyNumber | Uint8Array, maybeNftId: Option<u32> | null | object | string | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Option<u32>, Bytes, Bytes]>;
       /**
        * Generic tx
@@ -370,7 +453,33 @@
       [key: string]: SubmittableExtrinsicFunction<ApiType>;
     };
     rmrkEquip: {
+      /**
+       * Creates a new Base.
+       * Modeled after [base interaction](https://github.com/rmrk-team/rmrk-spec/blob/master/standards/rmrk2.0.0/interactions/base.md)
+       * 
+       * Parameters:
+       * - origin: Caller, will be assigned as the issuer of the Base
+       * - base_type: media type, e.g. "svg"
+       * - symbol: arbitrary client-chosen symbol
+       * - parts: array of Fixed and Slot parts composing the base, confined in length by
+       * RmrkPartsLimit
+       **/
       createBase: AugmentedSubmittable<(baseType: Bytes | string | Uint8Array, symbol: Bytes | string | Uint8Array, parts: Vec<RmrkTraitsPartPartType> | (RmrkTraitsPartPartType | { FixedPart: any } | { SlotPart: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Bytes, Bytes, Vec<RmrkTraitsPartPartType>]>;
+      /**
+       * Adds a Theme to a Base.
+       * Modeled after [themeadd interaction](https://github.com/rmrk-team/rmrk-spec/blob/master/standards/rmrk2.0.0/interactions/themeadd.md)
+       * Themes are stored in the Themes storage
+       * A Theme named "default" is required prior to adding other Themes.
+       * 
+       * Parameters:
+       * - origin: The caller of the function, must be issuer of the base
+       * - base_id: The Base containing the Theme to be updated
+       * - theme: The Theme to add to the Base.  A Theme has a name and properties, which are an
+       * array of [key, value, inherit].
+       * - key: arbitrary BoundedString, defined by client
+       * - value: arbitrary BoundedString, defined by client
+       * - inherit: optional bool
+       **/
       themeAdd: AugmentedSubmittable<(baseId: u32 | AnyNumber | Uint8Array, theme: RmrkTraitsTheme | { name?: any; properties?: any; inherit?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, RmrkTraitsTheme]>;
       /**
        * Generic tx
modifiedtests/src/interfaces/augment-types.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-types.ts
+++ b/tests/src/interfaces/augment-types.ts
@@ -1,7 +1,7 @@
 // Auto-generated via `yarn polkadot-types-from-defs`, do not edit
 /* eslint-disable */
 
-import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUnqSchedulerCall, PalletUnqSchedulerError, PalletUnqSchedulerEvent, PalletUnqSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsNestingRule, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsRpcCollection, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenChild, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './default';
+import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUnqSchedulerCall, PalletUnqSchedulerError, PalletUnqSchedulerEvent, PalletUnqSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsRpcCollection, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenChild, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './default';
 import type { Data, StorageKey } from '@polkadot/types';
 import type { BitVec, Bool, Bytes, I128, I16, I256, I32, I64, I8, Json, Null, OptionBool, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';
 import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';
@@ -1218,7 +1218,8 @@
     UpDataStructsCreateNftExData: UpDataStructsCreateNftExData;
     UpDataStructsCreateReFungibleData: UpDataStructsCreateReFungibleData;
     UpDataStructsCreateRefungibleExData: UpDataStructsCreateRefungibleExData;
-    UpDataStructsNestingRule: UpDataStructsNestingRule;
+    UpDataStructsNestingPermissions: UpDataStructsNestingPermissions;
+    UpDataStructsOwnerRestrictedSet: UpDataStructsOwnerRestrictedSet;
     UpDataStructsProperties: UpDataStructsProperties;
     UpDataStructsPropertiesMapBoundedVec: UpDataStructsPropertiesMapBoundedVec;
     UpDataStructsPropertiesMapPropertyPermission: UpDataStructsPropertiesMapPropertyPermission;
modifiedtests/src/interfaces/default/types.tsdiffbeforeafterboth
--- a/tests/src/interfaces/default/types.ts
+++ b/tests/src/interfaces/default/types.ts
@@ -935,8 +935,7 @@
   readonly isAddressIsZero: boolean;
   readonly isUnsupportedOperation: boolean;
   readonly isNotSufficientFounds: boolean;
-  readonly isNestingIsDisabled: boolean;
-  readonly isOnlyOwnerAllowedToNest: boolean;
+  readonly isUserIsNotAllowedToNest: boolean;
   readonly isSourceCollectionIsNotAllowedToNest: boolean;
   readonly isCollectionFieldSizeExceeded: boolean;
   readonly isNoSpaceForProperty: boolean;
@@ -946,7 +945,7 @@
   readonly isEmptyPropertyKey: boolean;
   readonly isCollectionIsExternal: boolean;
   readonly isCollectionIsInternal: 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' | 'NestingIsDisabled' | 'OnlyOwnerAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey' | 'CollectionIsExternal' | 'CollectionIsInternal';
+  readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'CantDestroyNotEmptyCollection' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'UserIsNotAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey' | 'CollectionIsExternal' | 'CollectionIsInternal';
 }
 
 /** @name PalletCommonEvent */
@@ -1445,8 +1444,9 @@
 export interface PalletStructureError extends Enum {
   readonly isOuroborosDetected: boolean;
   readonly isDepthLimit: boolean;
+  readonly isBreadthLimit: boolean;
   readonly isTokenNotFound: boolean;
-  readonly type: 'OuroborosDetected' | 'DepthLimit' | 'TokenNotFound';
+  readonly type: 'OuroborosDetected' | 'DepthLimit' | 'BreadthLimit' | 'TokenNotFound';
 }
 
 /** @name PalletStructureEvent */
@@ -2348,7 +2348,7 @@
 export interface UpDataStructsCollectionPermissions extends Struct {
   readonly access: Option<UpDataStructsAccessMode>;
   readonly mintMode: Option<bool>;
-  readonly nesting: Option<UpDataStructsNestingRule>;
+  readonly nesting: Option<UpDataStructsNestingPermissions>;
 }
 
 /** @name UpDataStructsCollectionStats */
@@ -2424,15 +2424,17 @@
   readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;
 }
 
-/** @name UpDataStructsNestingRule */
-export interface UpDataStructsNestingRule extends Enum {
-  readonly isDisabled: boolean;
-  readonly isOwner: boolean;
-  readonly isOwnerRestricted: boolean;
-  readonly asOwnerRestricted: BTreeSet<u32>;
-  readonly type: 'Disabled' | 'Owner' | 'OwnerRestricted';
+/** @name UpDataStructsNestingPermissions */
+export interface UpDataStructsNestingPermissions extends Struct {
+  readonly tokenOwner: bool;
+  readonly admin: bool;
+  readonly restricted: Option<UpDataStructsOwnerRestrictedSet>;
+  readonly permissive: bool;
 }
 
+/** @name UpDataStructsOwnerRestrictedSet */
+export interface UpDataStructsOwnerRestrictedSet extends BTreeSet<u32> {}
+
 /** @name UpDataStructsProperties */
 export interface UpDataStructsProperties extends Struct {
   readonly map: UpDataStructsPropertiesMapBoundedVec;
modifiedtests/src/interfaces/lookup.tsdiffbeforeafterboth
--- a/tests/src/interfaces/lookup.ts
+++ b/tests/src/interfaces/lookup.ts
@@ -1425,27 +1425,30 @@
   UpDataStructsCollectionPermissions: {
     access: 'Option<UpDataStructsAccessMode>',
     mintMode: 'Option<bool>',
-    nesting: 'Option<UpDataStructsNestingRule>'
+    nesting: 'Option<UpDataStructsNestingPermissions>'
   },
   /**
-   * Lookup169: up_data_structs::NestingRule
+   * Lookup169: up_data_structs::NestingPermissions
    **/
-  UpDataStructsNestingRule: {
-    _enum: {
-      Disabled: 'Null',
-      Owner: 'Null',
-      OwnerRestricted: 'BTreeSet<u32>'
-    }
+  UpDataStructsNestingPermissions: {
+    tokenOwner: 'bool',
+    admin: 'bool',
+    restricted: 'Option<UpDataStructsOwnerRestrictedSet>',
+    permissive: 'bool'
   },
   /**
-   * Lookup175: up_data_structs::PropertyKeyPermission
+   * Lookup171: up_data_structs::OwnerRestrictedSet
    **/
+  UpDataStructsOwnerRestrictedSet: 'BTreeSet<u32>',
+  /**
+   * Lookup177: up_data_structs::PropertyKeyPermission
+   **/
   UpDataStructsPropertyKeyPermission: {
     key: 'Bytes',
     permission: 'UpDataStructsPropertyPermission'
   },
   /**
-   * Lookup177: up_data_structs::PropertyPermission
+   * Lookup179: up_data_structs::PropertyPermission
    **/
   UpDataStructsPropertyPermission: {
     mutable: 'bool',
@@ -1453,14 +1456,14 @@
     tokenOwner: 'bool'
   },
   /**
-   * Lookup180: up_data_structs::Property
+   * Lookup182: up_data_structs::Property
    **/
   UpDataStructsProperty: {
     key: 'Bytes',
     value: 'Bytes'
   },
   /**
-   * Lookup183: pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>
+   * Lookup185: pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>
    **/
   PalletEvmAccountBasicCrossAccountIdRepr: {
     _enum: {
@@ -1469,7 +1472,7 @@
     }
   },
   /**
-   * Lookup185: up_data_structs::CreateItemData
+   * Lookup187: up_data_structs::CreateItemData
    **/
   UpDataStructsCreateItemData: {
     _enum: {
@@ -1479,26 +1482,26 @@
     }
   },
   /**
-   * Lookup186: up_data_structs::CreateNftData
+   * Lookup188: up_data_structs::CreateNftData
    **/
   UpDataStructsCreateNftData: {
     properties: 'Vec<UpDataStructsProperty>'
   },
   /**
-   * Lookup187: up_data_structs::CreateFungibleData
+   * Lookup189: up_data_structs::CreateFungibleData
    **/
   UpDataStructsCreateFungibleData: {
     value: 'u128'
   },
   /**
-   * Lookup188: up_data_structs::CreateReFungibleData
+   * Lookup190: up_data_structs::CreateReFungibleData
    **/
   UpDataStructsCreateReFungibleData: {
     constData: 'Bytes',
     pieces: 'u128'
   },
   /**
-   * Lookup193: up_data_structs::CreateItemExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+   * Lookup195: up_data_structs::CreateItemExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
    **/
   UpDataStructsCreateItemExData: {
     _enum: {
@@ -1509,21 +1512,21 @@
     }
   },
   /**
-   * Lookup195: up_data_structs::CreateNftExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+   * Lookup197: up_data_structs::CreateNftExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
    **/
   UpDataStructsCreateNftExData: {
     properties: 'Vec<UpDataStructsProperty>',
     owner: 'PalletEvmAccountBasicCrossAccountIdRepr'
   },
   /**
-   * Lookup202: up_data_structs::CreateRefungibleExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+   * Lookup204: up_data_structs::CreateRefungibleExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
    **/
   UpDataStructsCreateRefungibleExData: {
     constData: 'Bytes',
     users: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>'
   },
   /**
-   * Lookup204: pallet_unq_scheduler::pallet::Call<T>
+   * Lookup206: pallet_unq_scheduler::pallet::Call<T>
    **/
   PalletUnqSchedulerCall: {
     _enum: {
@@ -1547,7 +1550,7 @@
     }
   },
   /**
-   * Lookup206: frame_support::traits::schedule::MaybeHashed<opal_runtime::Call, primitive_types::H256>
+   * Lookup208: frame_support::traits::schedule::MaybeHashed<opal_runtime::Call, primitive_types::H256>
    **/
   FrameSupportScheduleMaybeHashed: {
     _enum: {
@@ -1556,15 +1559,15 @@
     }
   },
   /**
-   * Lookup207: pallet_template_transaction_payment::Call<T>
+   * Lookup209: pallet_template_transaction_payment::Call<T>
    **/
   PalletTemplateTransactionPaymentCall: 'Null',
   /**
-   * Lookup208: pallet_structure::pallet::Call<T>
+   * Lookup210: pallet_structure::pallet::Call<T>
    **/
   PalletStructureCall: 'Null',
   /**
-   * Lookup209: pallet_rmrk_core::pallet::Call<T>
+   * Lookup211: pallet_rmrk_core::pallet::Call<T>
    **/
   PalletRmrkCoreCall: {
     _enum: {
@@ -1654,7 +1657,7 @@
     }
   },
   /**
-   * Lookup213: rmrk_traits::nft::AccountIdOrCollectionNftTuple<sp_core::crypto::AccountId32>
+   * Lookup215: rmrk_traits::nft::AccountIdOrCollectionNftTuple<sp_core::crypto::AccountId32>
    **/
   RmrkTraitsNftAccountIdOrCollectionNftTuple: {
     _enum: {
@@ -1663,7 +1666,7 @@
     }
   },
   /**
-   * Lookup217: rmrk_traits::resource::BasicResource<frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup219: rmrk_traits::resource::BasicResource<frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   RmrkTraitsResourceBasicResource: {
     src: 'Option<Bytes>',
@@ -1672,7 +1675,7 @@
     thumb: 'Option<Bytes>'
   },
   /**
-   * Lookup220: rmrk_traits::resource::ComposableResource<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup222: rmrk_traits::resource::ComposableResource<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   RmrkTraitsResourceComposableResource: {
     parts: 'Vec<u32>',
@@ -1683,7 +1686,7 @@
     thumb: 'Option<Bytes>'
   },
   /**
-   * Lookup222: rmrk_traits::resource::SlotResource<frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup224: rmrk_traits::resource::SlotResource<frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   RmrkTraitsResourceSlotResource: {
     base: 'u32',
@@ -1694,7 +1697,7 @@
     thumb: 'Option<Bytes>'
   },
   /**
-   * Lookup223: pallet_rmrk_equip::pallet::Call<T>
+   * Lookup225: pallet_rmrk_equip::pallet::Call<T>
    **/
   PalletRmrkEquipCall: {
     _enum: {
@@ -1710,7 +1713,7 @@
     }
   },
   /**
-   * Lookup225: rmrk_traits::part::PartType<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup227: rmrk_traits::part::PartType<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   RmrkTraitsPartPartType: {
     _enum: {
@@ -1719,7 +1722,7 @@
     }
   },
   /**
-   * Lookup227: rmrk_traits::part::FixedPart<frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup229: rmrk_traits::part::FixedPart<frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   RmrkTraitsPartFixedPart: {
     id: 'u32',
@@ -1727,7 +1730,7 @@
     src: 'Bytes'
   },
   /**
-   * Lookup228: rmrk_traits::part::SlotPart<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup230: rmrk_traits::part::SlotPart<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   RmrkTraitsPartSlotPart: {
     id: 'u32',
@@ -1736,7 +1739,7 @@
     z: 'u32'
   },
   /**
-   * Lookup229: rmrk_traits::part::EquippableList<frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup231: rmrk_traits::part::EquippableList<frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   RmrkTraitsPartEquippableList: {
     _enum: {
@@ -1746,7 +1749,7 @@
     }
   },
   /**
-   * Lookup231: rmrk_traits::theme::Theme<frame_support::storage::bounded_vec::BoundedVec<T, S>, PropertyList>
+   * Lookup233: rmrk_traits::theme::Theme<frame_support::storage::bounded_vec::BoundedVec<T, S>, PropertyList>
    **/
   RmrkTraitsTheme: {
     name: 'Bytes',
@@ -1754,14 +1757,14 @@
     inherit: 'bool'
   },
   /**
-   * Lookup233: rmrk_traits::theme::ThemeProperty<frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup235: rmrk_traits::theme::ThemeProperty<frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   RmrkTraitsThemeThemeProperty: {
     key: 'Bytes',
     value: 'Bytes'
   },
   /**
-   * Lookup234: pallet_evm::pallet::Call<T>
+   * Lookup236: pallet_evm::pallet::Call<T>
    **/
   PalletEvmCall: {
     _enum: {
@@ -1804,7 +1807,7 @@
     }
   },
   /**
-   * Lookup240: pallet_ethereum::pallet::Call<T>
+   * Lookup242: pallet_ethereum::pallet::Call<T>
    **/
   PalletEthereumCall: {
     _enum: {
@@ -1814,7 +1817,7 @@
     }
   },
   /**
-   * Lookup241: ethereum::transaction::TransactionV2
+   * Lookup243: ethereum::transaction::TransactionV2
    **/
   EthereumTransactionTransactionV2: {
     _enum: {
@@ -1824,7 +1827,7 @@
     }
   },
   /**
-   * Lookup242: ethereum::transaction::LegacyTransaction
+   * Lookup244: ethereum::transaction::LegacyTransaction
    **/
   EthereumTransactionLegacyTransaction: {
     nonce: 'U256',
@@ -1836,7 +1839,7 @@
     signature: 'EthereumTransactionTransactionSignature'
   },
   /**
-   * Lookup243: ethereum::transaction::TransactionAction
+   * Lookup245: ethereum::transaction::TransactionAction
    **/
   EthereumTransactionTransactionAction: {
     _enum: {
@@ -1845,7 +1848,7 @@
     }
   },
   /**
-   * Lookup244: ethereum::transaction::TransactionSignature
+   * Lookup246: ethereum::transaction::TransactionSignature
    **/
   EthereumTransactionTransactionSignature: {
     v: 'u64',
@@ -1853,7 +1856,7 @@
     s: 'H256'
   },
   /**
-   * Lookup246: ethereum::transaction::EIP2930Transaction
+   * Lookup248: ethereum::transaction::EIP2930Transaction
    **/
   EthereumTransactionEip2930Transaction: {
     chainId: 'u64',
@@ -1869,14 +1872,14 @@
     s: 'H256'
   },
   /**
-   * Lookup248: ethereum::transaction::AccessListItem
+   * Lookup250: ethereum::transaction::AccessListItem
    **/
   EthereumTransactionAccessListItem: {
     address: 'H160',
     storageKeys: 'Vec<H256>'
   },
   /**
-   * Lookup249: ethereum::transaction::EIP1559Transaction
+   * Lookup251: ethereum::transaction::EIP1559Transaction
    **/
   EthereumTransactionEip1559Transaction: {
     chainId: 'u64',
@@ -1893,7 +1896,7 @@
     s: 'H256'
   },
   /**
-   * Lookup250: pallet_evm_migration::pallet::Call<T>
+   * Lookup252: pallet_evm_migration::pallet::Call<T>
    **/
   PalletEvmMigrationCall: {
     _enum: {
@@ -1911,7 +1914,7 @@
     }
   },
   /**
-   * Lookup253: pallet_sudo::pallet::Event<T>
+   * Lookup255: pallet_sudo::pallet::Event<T>
    **/
   PalletSudoEvent: {
     _enum: {
@@ -1927,7 +1930,7 @@
     }
   },
   /**
-   * Lookup255: sp_runtime::DispatchError
+   * Lookup257: sp_runtime::DispatchError
    **/
   SpRuntimeDispatchError: {
     _enum: {
@@ -1944,38 +1947,38 @@
     }
   },
   /**
-   * Lookup256: sp_runtime::ModuleError
+   * Lookup258: sp_runtime::ModuleError
    **/
   SpRuntimeModuleError: {
     index: 'u8',
     error: '[u8;4]'
   },
   /**
-   * Lookup257: sp_runtime::TokenError
+   * Lookup259: sp_runtime::TokenError
    **/
   SpRuntimeTokenError: {
     _enum: ['NoFunds', 'WouldDie', 'BelowMinimum', 'CannotCreate', 'UnknownAsset', 'Frozen', 'Unsupported']
   },
   /**
-   * Lookup258: sp_runtime::ArithmeticError
+   * Lookup260: sp_runtime::ArithmeticError
    **/
   SpRuntimeArithmeticError: {
     _enum: ['Underflow', 'Overflow', 'DivisionByZero']
   },
   /**
-   * Lookup259: sp_runtime::TransactionalError
+   * Lookup261: sp_runtime::TransactionalError
    **/
   SpRuntimeTransactionalError: {
     _enum: ['LimitReached', 'NoLayer']
   },
   /**
-   * Lookup260: pallet_sudo::pallet::Error<T>
+   * Lookup262: pallet_sudo::pallet::Error<T>
    **/
   PalletSudoError: {
     _enum: ['RequireSudo']
   },
   /**
-   * Lookup261: frame_system::AccountInfo<Index, pallet_balances::AccountData<Balance>>
+   * Lookup263: frame_system::AccountInfo<Index, pallet_balances::AccountData<Balance>>
    **/
   FrameSystemAccountInfo: {
     nonce: 'u32',
@@ -1985,7 +1988,7 @@
     data: 'PalletBalancesAccountData'
   },
   /**
-   * Lookup262: frame_support::weights::PerDispatchClass<T>
+   * Lookup264: frame_support::weights::PerDispatchClass<T>
    **/
   FrameSupportWeightsPerDispatchClassU64: {
     normal: 'u64',
@@ -1993,13 +1996,13 @@
     mandatory: 'u64'
   },
   /**
-   * Lookup263: sp_runtime::generic::digest::Digest
+   * Lookup265: sp_runtime::generic::digest::Digest
    **/
   SpRuntimeDigest: {
     logs: 'Vec<SpRuntimeDigestDigestItem>'
   },
   /**
-   * Lookup265: sp_runtime::generic::digest::DigestItem
+   * Lookup267: sp_runtime::generic::digest::DigestItem
    **/
   SpRuntimeDigestDigestItem: {
     _enum: {
@@ -2015,7 +2018,7 @@
     }
   },
   /**
-   * Lookup267: frame_system::EventRecord<opal_runtime::Event, primitive_types::H256>
+   * Lookup269: frame_system::EventRecord<opal_runtime::Event, primitive_types::H256>
    **/
   FrameSystemEventRecord: {
     phase: 'FrameSystemPhase',
@@ -2023,7 +2026,7 @@
     topics: 'Vec<H256>'
   },
   /**
-   * Lookup269: frame_system::pallet::Event<T>
+   * Lookup271: frame_system::pallet::Event<T>
    **/
   FrameSystemEvent: {
     _enum: {
@@ -2051,7 +2054,7 @@
     }
   },
   /**
-   * Lookup270: frame_support::weights::DispatchInfo
+   * Lookup272: frame_support::weights::DispatchInfo
    **/
   FrameSupportWeightsDispatchInfo: {
     weight: 'u64',
@@ -2059,19 +2062,19 @@
     paysFee: 'FrameSupportWeightsPays'
   },
   /**
-   * Lookup271: frame_support::weights::DispatchClass
+   * Lookup273: frame_support::weights::DispatchClass
    **/
   FrameSupportWeightsDispatchClass: {
     _enum: ['Normal', 'Operational', 'Mandatory']
   },
   /**
-   * Lookup272: frame_support::weights::Pays
+   * Lookup274: frame_support::weights::Pays
    **/
   FrameSupportWeightsPays: {
     _enum: ['Yes', 'No']
   },
   /**
-   * Lookup273: orml_vesting::module::Event<T>
+   * Lookup275: orml_vesting::module::Event<T>
    **/
   OrmlVestingModuleEvent: {
     _enum: {
@@ -2090,7 +2093,7 @@
     }
   },
   /**
-   * Lookup274: cumulus_pallet_xcmp_queue::pallet::Event<T>
+   * Lookup276: cumulus_pallet_xcmp_queue::pallet::Event<T>
    **/
   CumulusPalletXcmpQueueEvent: {
     _enum: {
@@ -2105,7 +2108,7 @@
     }
   },
   /**
-   * Lookup275: pallet_xcm::pallet::Event<T>
+   * Lookup277: pallet_xcm::pallet::Event<T>
    **/
   PalletXcmEvent: {
     _enum: {
@@ -2128,7 +2131,7 @@
     }
   },
   /**
-   * Lookup276: xcm::v2::traits::Outcome
+   * Lookup278: xcm::v2::traits::Outcome
    **/
   XcmV2TraitsOutcome: {
     _enum: {
@@ -2138,7 +2141,7 @@
     }
   },
   /**
-   * Lookup278: cumulus_pallet_xcm::pallet::Event<T>
+   * Lookup280: cumulus_pallet_xcm::pallet::Event<T>
    **/
   CumulusPalletXcmEvent: {
     _enum: {
@@ -2148,7 +2151,7 @@
     }
   },
   /**
-   * Lookup279: cumulus_pallet_dmp_queue::pallet::Event<T>
+   * Lookup281: cumulus_pallet_dmp_queue::pallet::Event<T>
    **/
   CumulusPalletDmpQueueEvent: {
     _enum: {
@@ -2161,7 +2164,7 @@
     }
   },
   /**
-   * Lookup280: pallet_unique::RawEvent<sp_core::crypto::AccountId32, pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+   * Lookup282: pallet_unique::RawEvent<sp_core::crypto::AccountId32, pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
    **/
   PalletUniqueRawEvent: {
     _enum: {
@@ -2178,7 +2181,7 @@
     }
   },
   /**
-   * Lookup281: pallet_unq_scheduler::pallet::Event<T>
+   * Lookup283: pallet_unq_scheduler::pallet::Event<T>
    **/
   PalletUnqSchedulerEvent: {
     _enum: {
@@ -2203,13 +2206,13 @@
     }
   },
   /**
-   * Lookup283: frame_support::traits::schedule::LookupError
+   * Lookup285: frame_support::traits::schedule::LookupError
    **/
   FrameSupportScheduleLookupError: {
     _enum: ['Unknown', 'BadFormat']
   },
   /**
-   * Lookup284: pallet_common::pallet::Event<T>
+   * Lookup286: pallet_common::pallet::Event<T>
    **/
   PalletCommonEvent: {
     _enum: {
@@ -2227,7 +2230,7 @@
     }
   },
   /**
-   * Lookup285: pallet_structure::pallet::Event<T>
+   * Lookup287: pallet_structure::pallet::Event<T>
    **/
   PalletStructureEvent: {
     _enum: {
@@ -2235,7 +2238,7 @@
     }
   },
   /**
-   * Lookup286: pallet_rmrk_core::pallet::Event<T>
+   * Lookup288: pallet_rmrk_core::pallet::Event<T>
    **/
   PalletRmrkCoreEvent: {
     _enum: {
@@ -2312,7 +2315,7 @@
     }
   },
   /**
-   * Lookup287: pallet_rmrk_equip::pallet::Event<T>
+   * Lookup289: pallet_rmrk_equip::pallet::Event<T>
    **/
   PalletRmrkEquipEvent: {
     _enum: {
@@ -2323,7 +2326,7 @@
     }
   },
   /**
-   * Lookup288: pallet_evm::pallet::Event<T>
+   * Lookup290: pallet_evm::pallet::Event<T>
    **/
   PalletEvmEvent: {
     _enum: {
@@ -2337,7 +2340,7 @@
     }
   },
   /**
-   * Lookup289: ethereum::log::Log
+   * Lookup291: ethereum::log::Log
    **/
   EthereumLog: {
     address: 'H160',
@@ -2345,7 +2348,7 @@
     data: 'Bytes'
   },
   /**
-   * Lookup290: pallet_ethereum::pallet::Event
+   * Lookup292: pallet_ethereum::pallet::Event
    **/
   PalletEthereumEvent: {
     _enum: {
@@ -2353,7 +2356,7 @@
     }
   },
   /**
-   * Lookup291: evm_core::error::ExitReason
+   * Lookup293: evm_core::error::ExitReason
    **/
   EvmCoreErrorExitReason: {
     _enum: {
@@ -2364,13 +2367,13 @@
     }
   },
   /**
-   * Lookup292: evm_core::error::ExitSucceed
+   * Lookup294: evm_core::error::ExitSucceed
    **/
   EvmCoreErrorExitSucceed: {
     _enum: ['Stopped', 'Returned', 'Suicided']
   },
   /**
-   * Lookup293: evm_core::error::ExitError
+   * Lookup295: evm_core::error::ExitError
    **/
   EvmCoreErrorExitError: {
     _enum: {
@@ -2392,13 +2395,13 @@
     }
   },
   /**
-   * Lookup296: evm_core::error::ExitRevert
+   * Lookup298: evm_core::error::ExitRevert
    **/
   EvmCoreErrorExitRevert: {
     _enum: ['Reverted']
   },
   /**
-   * Lookup297: evm_core::error::ExitFatal
+   * Lookup299: evm_core::error::ExitFatal
    **/
   EvmCoreErrorExitFatal: {
     _enum: {
@@ -2409,7 +2412,7 @@
     }
   },
   /**
-   * Lookup298: frame_system::Phase
+   * Lookup300: frame_system::Phase
    **/
   FrameSystemPhase: {
     _enum: {
@@ -2419,14 +2422,14 @@
     }
   },
   /**
-   * Lookup300: frame_system::LastRuntimeUpgradeInfo
+   * Lookup302: frame_system::LastRuntimeUpgradeInfo
    **/
   FrameSystemLastRuntimeUpgradeInfo: {
     specVersion: 'Compact<u32>',
     specName: 'Text'
   },
   /**
-   * Lookup301: frame_system::limits::BlockWeights
+   * Lookup303: frame_system::limits::BlockWeights
    **/
   FrameSystemLimitsBlockWeights: {
     baseBlock: 'u64',
@@ -2434,7 +2437,7 @@
     perClass: 'FrameSupportWeightsPerDispatchClassWeightsPerClass'
   },
   /**
-   * Lookup302: frame_support::weights::PerDispatchClass<frame_system::limits::WeightsPerClass>
+   * Lookup304: frame_support::weights::PerDispatchClass<frame_system::limits::WeightsPerClass>
    **/
   FrameSupportWeightsPerDispatchClassWeightsPerClass: {
     normal: 'FrameSystemLimitsWeightsPerClass',
@@ -2442,7 +2445,7 @@
     mandatory: 'FrameSystemLimitsWeightsPerClass'
   },
   /**
-   * Lookup303: frame_system::limits::WeightsPerClass
+   * Lookup305: frame_system::limits::WeightsPerClass
    **/
   FrameSystemLimitsWeightsPerClass: {
     baseExtrinsic: 'u64',
@@ -2451,13 +2454,13 @@
     reserved: 'Option<u64>'
   },
   /**
-   * Lookup305: frame_system::limits::BlockLength
+   * Lookup307: frame_system::limits::BlockLength
    **/
   FrameSystemLimitsBlockLength: {
     max: 'FrameSupportWeightsPerDispatchClassU32'
   },
   /**
-   * Lookup306: frame_support::weights::PerDispatchClass<T>
+   * Lookup308: frame_support::weights::PerDispatchClass<T>
    **/
   FrameSupportWeightsPerDispatchClassU32: {
     normal: 'u32',
@@ -2465,14 +2468,14 @@
     mandatory: 'u32'
   },
   /**
-   * Lookup307: frame_support::weights::RuntimeDbWeight
+   * Lookup309: frame_support::weights::RuntimeDbWeight
    **/
   FrameSupportWeightsRuntimeDbWeight: {
     read: 'u64',
     write: 'u64'
   },
   /**
-   * Lookup308: sp_version::RuntimeVersion
+   * Lookup310: sp_version::RuntimeVersion
    **/
   SpVersionRuntimeVersion: {
     specName: 'Text',
@@ -2485,19 +2488,19 @@
     stateVersion: 'u8'
   },
   /**
-   * Lookup312: frame_system::pallet::Error<T>
+   * Lookup314: frame_system::pallet::Error<T>
    **/
   FrameSystemError: {
     _enum: ['InvalidSpecName', 'SpecVersionNeedsToIncrease', 'FailedToExtractRuntimeVersion', 'NonDefaultComposite', 'NonZeroRefCount', 'CallFiltered']
   },
   /**
-   * Lookup314: orml_vesting::module::Error<T>
+   * Lookup316: orml_vesting::module::Error<T>
    **/
   OrmlVestingModuleError: {
     _enum: ['ZeroVestingPeriod', 'ZeroVestingPeriodCount', 'InsufficientBalanceToLock', 'TooManyVestingSchedules', 'AmountLow', 'MaxVestingSchedulesExceeded']
   },
   /**
-   * Lookup316: cumulus_pallet_xcmp_queue::InboundChannelDetails
+   * Lookup318: cumulus_pallet_xcmp_queue::InboundChannelDetails
    **/
   CumulusPalletXcmpQueueInboundChannelDetails: {
     sender: 'u32',
@@ -2505,19 +2508,19 @@
     messageMetadata: 'Vec<(u32,PolkadotParachainPrimitivesXcmpMessageFormat)>'
   },
   /**
-   * Lookup317: cumulus_pallet_xcmp_queue::InboundState
+   * Lookup319: cumulus_pallet_xcmp_queue::InboundState
    **/
   CumulusPalletXcmpQueueInboundState: {
     _enum: ['Ok', 'Suspended']
   },
   /**
-   * Lookup320: polkadot_parachain::primitives::XcmpMessageFormat
+   * Lookup322: polkadot_parachain::primitives::XcmpMessageFormat
    **/
   PolkadotParachainPrimitivesXcmpMessageFormat: {
     _enum: ['ConcatenatedVersionedXcm', 'ConcatenatedEncodedBlob', 'Signals']
   },
   /**
-   * Lookup323: cumulus_pallet_xcmp_queue::OutboundChannelDetails
+   * Lookup325: cumulus_pallet_xcmp_queue::OutboundChannelDetails
    **/
   CumulusPalletXcmpQueueOutboundChannelDetails: {
     recipient: 'u32',
@@ -2527,13 +2530,13 @@
     lastIndex: 'u16'
   },
   /**
-   * Lookup324: cumulus_pallet_xcmp_queue::OutboundState
+   * Lookup326: cumulus_pallet_xcmp_queue::OutboundState
    **/
   CumulusPalletXcmpQueueOutboundState: {
     _enum: ['Ok', 'Suspended']
   },
   /**
-   * Lookup326: cumulus_pallet_xcmp_queue::QueueConfigData
+   * Lookup328: cumulus_pallet_xcmp_queue::QueueConfigData
    **/
   CumulusPalletXcmpQueueQueueConfigData: {
     suspendThreshold: 'u32',
@@ -2544,29 +2547,29 @@
     xcmpMaxIndividualWeight: 'u64'
   },
   /**
-   * Lookup328: cumulus_pallet_xcmp_queue::pallet::Error<T>
+   * Lookup330: cumulus_pallet_xcmp_queue::pallet::Error<T>
    **/
   CumulusPalletXcmpQueueError: {
     _enum: ['FailedToSend', 'BadXcmOrigin', 'BadXcm', 'BadOverweightIndex', 'WeightOverLimit']
   },
   /**
-   * Lookup329: pallet_xcm::pallet::Error<T>
+   * Lookup331: pallet_xcm::pallet::Error<T>
    **/
   PalletXcmError: {
     _enum: ['Unreachable', 'SendFailure', 'Filtered', 'UnweighableMessage', 'DestinationNotInvertible', 'Empty', 'CannotReanchor', 'TooManyAssets', 'InvalidOrigin', 'BadVersion', 'BadLocation', 'NoSubscription', 'AlreadySubscribed']
   },
   /**
-   * Lookup330: cumulus_pallet_xcm::pallet::Error<T>
+   * Lookup332: cumulus_pallet_xcm::pallet::Error<T>
    **/
   CumulusPalletXcmError: 'Null',
   /**
-   * Lookup331: cumulus_pallet_dmp_queue::ConfigData
+   * Lookup333: cumulus_pallet_dmp_queue::ConfigData
    **/
   CumulusPalletDmpQueueConfigData: {
     maxIndividual: 'u64'
   },
   /**
-   * Lookup332: cumulus_pallet_dmp_queue::PageIndexData
+   * Lookup334: cumulus_pallet_dmp_queue::PageIndexData
    **/
   CumulusPalletDmpQueuePageIndexData: {
     beginUsed: 'u32',
@@ -2574,19 +2577,19 @@
     overweightCount: 'u64'
   },
   /**
-   * Lookup335: cumulus_pallet_dmp_queue::pallet::Error<T>
+   * Lookup337: cumulus_pallet_dmp_queue::pallet::Error<T>
    **/
   CumulusPalletDmpQueueError: {
     _enum: ['Unknown', 'OverLimit']
   },
   /**
-   * Lookup339: pallet_unique::Error<T>
+   * Lookup341: pallet_unique::Error<T>
    **/
   PalletUniqueError: {
     _enum: ['CollectionDecimalPointLimitExceeded', 'ConfirmUnsetSponsorFail', 'EmptyArgument']
   },
   /**
-   * Lookup342: pallet_unq_scheduler::ScheduledV3<frame_support::traits::schedule::MaybeHashed<opal_runtime::Call, primitive_types::H256>, BlockNumber, opal_runtime::OriginCaller, sp_core::crypto::AccountId32>
+   * Lookup344: pallet_unq_scheduler::ScheduledV3<frame_support::traits::schedule::MaybeHashed<opal_runtime::Call, primitive_types::H256>, BlockNumber, opal_runtime::OriginCaller, sp_core::crypto::AccountId32>
    **/
   PalletUnqSchedulerScheduledV3: {
     maybeId: 'Option<[u8;16]>',
@@ -2596,7 +2599,7 @@
     origin: 'OpalRuntimeOriginCaller'
   },
   /**
-   * Lookup343: opal_runtime::OriginCaller
+   * Lookup345: opal_runtime::OriginCaller
    **/
   OpalRuntimeOriginCaller: {
     _enum: {
@@ -2705,7 +2708,7 @@
     }
   },
   /**
-   * Lookup344: frame_support::dispatch::RawOrigin<sp_core::crypto::AccountId32>
+   * Lookup346: frame_support::dispatch::RawOrigin<sp_core::crypto::AccountId32>
    **/
   FrameSupportDispatchRawOrigin: {
     _enum: {
@@ -2715,7 +2718,7 @@
     }
   },
   /**
-   * Lookup345: pallet_xcm::pallet::Origin
+   * Lookup347: pallet_xcm::pallet::Origin
    **/
   PalletXcmOrigin: {
     _enum: {
@@ -2724,7 +2727,7 @@
     }
   },
   /**
-   * Lookup346: cumulus_pallet_xcm::pallet::Origin
+   * Lookup348: cumulus_pallet_xcm::pallet::Origin
    **/
   CumulusPalletXcmOrigin: {
     _enum: {
@@ -2733,7 +2736,7 @@
     }
   },
   /**
-   * Lookup347: pallet_ethereum::RawOrigin
+   * Lookup349: pallet_ethereum::RawOrigin
    **/
   PalletEthereumRawOrigin: {
     _enum: {
@@ -2741,17 +2744,17 @@
     }
   },
   /**
-   * Lookup348: sp_core::Void
+   * Lookup350: sp_core::Void
    **/
   SpCoreVoid: 'Null',
   /**
-   * Lookup349: pallet_unq_scheduler::pallet::Error<T>
+   * Lookup351: pallet_unq_scheduler::pallet::Error<T>
    **/
   PalletUnqSchedulerError: {
     _enum: ['FailedToSchedule', 'NotFound', 'TargetBlockNumberInPast', 'RescheduleNoChange']
   },
   /**
-   * Lookup350: up_data_structs::Collection<sp_core::crypto::AccountId32>
+   * Lookup352: up_data_structs::Collection<sp_core::crypto::AccountId32>
    **/
   UpDataStructsCollection: {
     owner: 'AccountId32',
@@ -2765,7 +2768,7 @@
     externalCollection: 'bool'
   },
   /**
-   * Lookup351: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>
+   * Lookup353: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>
    **/
   UpDataStructsSponsorshipState: {
     _enum: {
@@ -2775,7 +2778,7 @@
     }
   },
   /**
-   * Lookup352: up_data_structs::Properties
+   * Lookup354: up_data_structs::Properties
    **/
   UpDataStructsProperties: {
     map: 'UpDataStructsPropertiesMapBoundedVec',
@@ -2783,15 +2786,15 @@
     spaceLimit: 'u32'
   },
   /**
-   * Lookup353: up_data_structs::PropertiesMap<frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup355: up_data_structs::PropertiesMap<frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   UpDataStructsPropertiesMapBoundedVec: 'BTreeMap<Bytes, Bytes>',
   /**
-   * Lookup358: up_data_structs::PropertiesMap<up_data_structs::PropertyPermission>
+   * Lookup360: up_data_structs::PropertiesMap<up_data_structs::PropertyPermission>
    **/
   UpDataStructsPropertiesMapPropertyPermission: 'BTreeMap<Bytes, UpDataStructsPropertyPermission>',
   /**
-   * Lookup365: up_data_structs::CollectionStats
+   * Lookup367: up_data_structs::CollectionStats
    **/
   UpDataStructsCollectionStats: {
     created: 'u32',
@@ -2799,25 +2802,25 @@
     alive: 'u32'
   },
   /**
-   * Lookup366: up_data_structs::TokenChild
+   * Lookup368: up_data_structs::TokenChild
    **/
   UpDataStructsTokenChild: {
     token: 'u32',
     collection: 'u32'
   },
   /**
-   * Lookup367: PhantomType::up_data_structs<T>
+   * Lookup369: PhantomType::up_data_structs<T>
    **/
   PhantomTypeUpDataStructs: '[(UpDataStructsTokenData,UpDataStructsRpcCollection,RmrkTraitsCollectionCollectionInfo,RmrkTraitsNftNftInfo,RmrkTraitsResourceResourceInfo,RmrkTraitsPropertyPropertyInfo,RmrkTraitsBaseBaseInfo,RmrkTraitsPartPartType,RmrkTraitsTheme,RmrkTraitsNftNftChild);0]',
   /**
-   * Lookup369: up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+   * Lookup371: up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
    **/
   UpDataStructsTokenData: {
     properties: 'Vec<UpDataStructsProperty>',
     owner: 'Option<PalletEvmAccountBasicCrossAccountIdRepr>'
   },
   /**
-   * Lookup371: up_data_structs::RpcCollection<sp_core::crypto::AccountId32>
+   * Lookup373: up_data_structs::RpcCollection<sp_core::crypto::AccountId32>
    **/
   UpDataStructsRpcCollection: {
     owner: 'AccountId32',
@@ -2833,7 +2836,7 @@
     readOnly: 'bool'
   },
   /**
-   * Lookup372: rmrk_traits::collection::CollectionInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>, sp_core::crypto::AccountId32>
+   * Lookup374: rmrk_traits::collection::CollectionInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>, sp_core::crypto::AccountId32>
    **/
   RmrkTraitsCollectionCollectionInfo: {
     issuer: 'AccountId32',
@@ -2843,7 +2846,7 @@
     nftsCount: 'u32'
   },
   /**
-   * Lookup373: rmrk_traits::nft::NftInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill, frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup375: rmrk_traits::nft::NftInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill, frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   RmrkTraitsNftNftInfo: {
     owner: 'RmrkTraitsNftAccountIdOrCollectionNftTuple',
@@ -2853,14 +2856,14 @@
     pending: 'bool'
   },
   /**
-   * Lookup375: rmrk_traits::nft::RoyaltyInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill>
+   * Lookup377: rmrk_traits::nft::RoyaltyInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill>
    **/
   RmrkTraitsNftRoyaltyInfo: {
     recipient: 'AccountId32',
     amount: 'Permill'
   },
   /**
-   * Lookup376: rmrk_traits::resource::ResourceInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup378: rmrk_traits::resource::ResourceInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   RmrkTraitsResourceResourceInfo: {
     id: 'u32',
@@ -2869,7 +2872,7 @@
     pendingRemoval: 'bool'
   },
   /**
-   * Lookup377: rmrk_traits::resource::ResourceTypes<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup379: rmrk_traits::resource::ResourceTypes<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   RmrkTraitsResourceResourceTypes: {
     _enum: {
@@ -2879,14 +2882,14 @@
     }
   },
   /**
-   * Lookup378: rmrk_traits::property::PropertyInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup380: rmrk_traits::property::PropertyInfo<frame_support::storage::bounded_vec::BoundedVec<T, S>, frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   RmrkTraitsPropertyPropertyInfo: {
     key: 'Bytes',
     value: 'Bytes'
   },
   /**
-   * Lookup379: rmrk_traits::base::BaseInfo<sp_core::crypto::AccountId32, frame_support::storage::bounded_vec::BoundedVec<T, S>>
+   * Lookup381: rmrk_traits::base::BaseInfo<sp_core::crypto::AccountId32, frame_support::storage::bounded_vec::BoundedVec<T, S>>
    **/
   RmrkTraitsBaseBaseInfo: {
     issuer: 'AccountId32',
@@ -2894,74 +2897,74 @@
     symbol: 'Bytes'
   },
   /**
-   * Lookup380: rmrk_traits::nft::NftChild
+   * Lookup382: rmrk_traits::nft::NftChild
    **/
   RmrkTraitsNftNftChild: {
     collectionId: 'u32',
     nftId: 'u32'
   },
   /**
-   * Lookup382: pallet_common::pallet::Error<T>
+   * Lookup384: 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', 'NestingIsDisabled', 'OnlyOwnerAllowedToNest', 'SourceCollectionIsNotAllowedToNest', 'CollectionFieldSizeExceeded', 'NoSpaceForProperty', 'PropertyLimitReached', 'PropertyKeyIsTooLong', 'InvalidCharacterInPropertyKey', 'EmptyPropertyKey', 'CollectionIsExternal', 'CollectionIsInternal']
+    _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']
   },
   /**
-   * Lookup384: pallet_fungible::pallet::Error<T>
+   * Lookup386: pallet_fungible::pallet::Error<T>
    **/
   PalletFungibleError: {
     _enum: ['NotFungibleDataUsedToMintFungibleCollectionToken', 'FungibleItemsHaveNoId', 'FungibleItemsDontHaveData', 'FungibleDisallowsNesting', 'SettingPropertiesNotAllowed']
   },
   /**
-   * Lookup385: pallet_refungible::ItemData
+   * Lookup387: pallet_refungible::ItemData
    **/
   PalletRefungibleItemData: {
     constData: 'Bytes'
   },
   /**
-   * Lookup389: pallet_refungible::pallet::Error<T>
+   * Lookup391: pallet_refungible::pallet::Error<T>
    **/
   PalletRefungibleError: {
     _enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces', 'RefungibleDisallowsNesting', 'SettingPropertiesNotAllowed']
   },
   /**
-   * Lookup390: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+   * Lookup392: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
    **/
   PalletNonfungibleItemData: {
     owner: 'PalletEvmAccountBasicCrossAccountIdRepr'
   },
   /**
-   * Lookup392: pallet_nonfungible::pallet::Error<T>
+   * Lookup394: pallet_nonfungible::pallet::Error<T>
    **/
   PalletNonfungibleError: {
     _enum: ['NotNonfungibleDataUsedToMintFungibleCollectionToken', 'NonfungibleItemsHaveNoAmount', 'CantBurnNftWithChildren']
   },
   /**
-   * Lookup393: pallet_structure::pallet::Error<T>
+   * Lookup395: pallet_structure::pallet::Error<T>
    **/
   PalletStructureError: {
-    _enum: ['OuroborosDetected', 'DepthLimit', 'TokenNotFound']
+    _enum: ['OuroborosDetected', 'DepthLimit', 'BreadthLimit', 'TokenNotFound']
   },
   /**
-   * Lookup394: pallet_rmrk_core::pallet::Error<T>
+   * Lookup396: pallet_rmrk_core::pallet::Error<T>
    **/
   PalletRmrkCoreError: {
     _enum: ['CorruptedCollectionType', 'NftTypeEncodeError', 'RmrkPropertyKeyIsTooLong', 'RmrkPropertyValueIsTooLong', 'CollectionNotEmpty', 'NoAvailableCollectionId', 'NoAvailableNftId', 'CollectionUnknown', 'NoPermission', 'NonTransferable', 'CollectionFullOrLocked', 'ResourceDoesntExist', 'CannotSendToDescendentOrSelf', 'CannotAcceptNonOwnedNft', 'CannotRejectNonOwnedNft', 'ResourceNotPending']
   },
   /**
-   * Lookup396: pallet_rmrk_equip::pallet::Error<T>
+   * Lookup398: pallet_rmrk_equip::pallet::Error<T>
    **/
   PalletRmrkEquipError: {
     _enum: ['PermissionError', 'NoAvailableBaseId', 'NoAvailablePartId', 'BaseDoesntExist', 'NeedsDefaultThemeFirst']
   },
   /**
-   * Lookup399: pallet_evm::pallet::Error<T>
+   * Lookup401: pallet_evm::pallet::Error<T>
    **/
   PalletEvmError: {
     _enum: ['BalanceLow', 'FeeOverflow', 'PaymentOverflow', 'WithdrawFailed', 'GasPriceTooLow', 'InvalidNonce']
   },
   /**
-   * Lookup402: fp_rpc::TransactionStatus
+   * Lookup404: fp_rpc::TransactionStatus
    **/
   FpRpcTransactionStatus: {
     transactionHash: 'H256',
@@ -2973,11 +2976,11 @@
     logsBloom: 'EthbloomBloom'
   },
   /**
-   * Lookup404: ethbloom::Bloom
+   * Lookup406: ethbloom::Bloom
    **/
   EthbloomBloom: '[u8;256]',
   /**
-   * Lookup406: ethereum::receipt::ReceiptV3
+   * Lookup408: ethereum::receipt::ReceiptV3
    **/
   EthereumReceiptReceiptV3: {
     _enum: {
@@ -2987,7 +2990,7 @@
     }
   },
   /**
-   * Lookup407: ethereum::receipt::EIP658ReceiptData
+   * Lookup409: ethereum::receipt::EIP658ReceiptData
    **/
   EthereumReceiptEip658ReceiptData: {
     statusCode: 'u8',
@@ -2996,7 +2999,7 @@
     logs: 'Vec<EthereumLog>'
   },
   /**
-   * Lookup408: ethereum::block::Block<ethereum::transaction::TransactionV2>
+   * Lookup410: ethereum::block::Block<ethereum::transaction::TransactionV2>
    **/
   EthereumBlock: {
     header: 'EthereumHeader',
@@ -3004,7 +3007,7 @@
     ommers: 'Vec<EthereumHeader>'
   },
   /**
-   * Lookup409: ethereum::header::Header
+   * Lookup411: ethereum::header::Header
    **/
   EthereumHeader: {
     parentHash: 'H256',
@@ -3024,41 +3027,41 @@
     nonce: 'EthereumTypesHashH64'
   },
   /**
-   * Lookup410: ethereum_types::hash::H64
+   * Lookup412: ethereum_types::hash::H64
    **/
   EthereumTypesHashH64: '[u8;8]',
   /**
-   * Lookup415: pallet_ethereum::pallet::Error<T>
+   * Lookup417: pallet_ethereum::pallet::Error<T>
    **/
   PalletEthereumError: {
     _enum: ['InvalidSignature', 'PreLogExists']
   },
   /**
-   * Lookup416: pallet_evm_coder_substrate::pallet::Error<T>
+   * Lookup418: pallet_evm_coder_substrate::pallet::Error<T>
    **/
   PalletEvmCoderSubstrateError: {
     _enum: ['OutOfGas', 'OutOfFund']
   },
   /**
-   * Lookup417: pallet_evm_contract_helpers::SponsoringModeT
+   * Lookup419: pallet_evm_contract_helpers::SponsoringModeT
    **/
   PalletEvmContractHelpersSponsoringModeT: {
     _enum: ['Disabled', 'Allowlisted', 'Generous']
   },
   /**
-   * Lookup419: pallet_evm_contract_helpers::pallet::Error<T>
+   * Lookup421: pallet_evm_contract_helpers::pallet::Error<T>
    **/
   PalletEvmContractHelpersError: {
     _enum: ['NoPermission']
   },
   /**
-   * Lookup420: pallet_evm_migration::pallet::Error<T>
+   * Lookup422: pallet_evm_migration::pallet::Error<T>
    **/
   PalletEvmMigrationError: {
     _enum: ['AccountNotEmpty', 'AccountIsNotMigrating']
   },
   /**
-   * Lookup422: sp_runtime::MultiSignature
+   * Lookup424: sp_runtime::MultiSignature
    **/
   SpRuntimeMultiSignature: {
     _enum: {
@@ -3068,43 +3071,43 @@
     }
   },
   /**
-   * Lookup423: sp_core::ed25519::Signature
+   * Lookup425: sp_core::ed25519::Signature
    **/
   SpCoreEd25519Signature: '[u8;64]',
   /**
-   * Lookup425: sp_core::sr25519::Signature
+   * Lookup427: sp_core::sr25519::Signature
    **/
   SpCoreSr25519Signature: '[u8;64]',
   /**
-   * Lookup426: sp_core::ecdsa::Signature
+   * Lookup428: sp_core::ecdsa::Signature
    **/
   SpCoreEcdsaSignature: '[u8;65]',
   /**
-   * Lookup429: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
+   * Lookup431: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
    **/
   FrameSystemExtensionsCheckSpecVersion: 'Null',
   /**
-   * Lookup430: frame_system::extensions::check_genesis::CheckGenesis<T>
+   * Lookup432: frame_system::extensions::check_genesis::CheckGenesis<T>
    **/
   FrameSystemExtensionsCheckGenesis: 'Null',
   /**
-   * Lookup433: frame_system::extensions::check_nonce::CheckNonce<T>
+   * Lookup435: frame_system::extensions::check_nonce::CheckNonce<T>
    **/
   FrameSystemExtensionsCheckNonce: 'Compact<u32>',
   /**
-   * Lookup434: frame_system::extensions::check_weight::CheckWeight<T>
+   * Lookup436: frame_system::extensions::check_weight::CheckWeight<T>
    **/
   FrameSystemExtensionsCheckWeight: 'Null',
   /**
-   * Lookup435: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>
+   * Lookup437: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>
    **/
   PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact<u128>',
   /**
-   * Lookup436: opal_runtime::Runtime
+   * Lookup438: opal_runtime::Runtime
    **/
   OpalRuntimeRuntime: 'Null',
   /**
-   * Lookup437: pallet_ethereum::FakeTransactionFinalizer<opal_runtime::Runtime>
+   * Lookup439: pallet_ethereum::FakeTransactionFinalizer<opal_runtime::Runtime>
    **/
   PalletEthereumFakeTransactionFinalizer: 'Null'
 };
modifiedtests/src/interfaces/registry.tsdiffbeforeafterboth
--- a/tests/src/interfaces/registry.ts
+++ b/tests/src/interfaces/registry.ts
@@ -1,7 +1,7 @@
 // Auto-generated via `yarn polkadot-types-from-defs`, do not edit
 /* eslint-disable */
 
-import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUnqSchedulerCall, PalletUnqSchedulerError, PalletUnqSchedulerEvent, PalletUnqSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsNestingRule, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsRpcCollection, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenChild, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
+import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUnqSchedulerCall, PalletUnqSchedulerError, PalletUnqSchedulerEvent, PalletUnqSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsRpcCollection, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenChild, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
 
 declare module '@polkadot/types/types/registry' {
   export interface InterfaceTypes {
@@ -196,7 +196,8 @@
     UpDataStructsCreateNftExData: UpDataStructsCreateNftExData;
     UpDataStructsCreateReFungibleData: UpDataStructsCreateReFungibleData;
     UpDataStructsCreateRefungibleExData: UpDataStructsCreateRefungibleExData;
-    UpDataStructsNestingRule: UpDataStructsNestingRule;
+    UpDataStructsNestingPermissions: UpDataStructsNestingPermissions;
+    UpDataStructsOwnerRestrictedSet: UpDataStructsOwnerRestrictedSet;
     UpDataStructsProperties: UpDataStructsProperties;
     UpDataStructsPropertiesMapBoundedVec: UpDataStructsPropertiesMapBoundedVec;
     UpDataStructsPropertiesMapPropertyPermission: UpDataStructsPropertiesMapPropertyPermission;
modifiedtests/src/interfaces/types-lookup.tsdiffbeforeafterboth
--- a/tests/src/interfaces/types-lookup.ts
+++ b/tests/src/interfaces/types-lookup.ts
@@ -1556,38 +1556,40 @@
   export interface UpDataStructsCollectionPermissions extends Struct {
     readonly access: Option<UpDataStructsAccessMode>;
     readonly mintMode: Option<bool>;
-    readonly nesting: Option<UpDataStructsNestingRule>;
+    readonly nesting: Option<UpDataStructsNestingPermissions>;
   }
 
-  /** @name UpDataStructsNestingRule (169) */
-  export interface UpDataStructsNestingRule extends Enum {
-    readonly isDisabled: boolean;
-    readonly isOwner: boolean;
-    readonly isOwnerRestricted: boolean;
-    readonly asOwnerRestricted: BTreeSet<u32>;
-    readonly type: 'Disabled' | 'Owner' | 'OwnerRestricted';
+  /** @name UpDataStructsNestingPermissions (169) */
+  export interface UpDataStructsNestingPermissions extends Struct {
+    readonly tokenOwner: bool;
+    readonly admin: bool;
+    readonly restricted: Option<UpDataStructsOwnerRestrictedSet>;
+    readonly permissive: bool;
   }
 
-  /** @name UpDataStructsPropertyKeyPermission (175) */
+  /** @name UpDataStructsOwnerRestrictedSet (171) */
+  export interface UpDataStructsOwnerRestrictedSet extends BTreeSet<u32> {}
+
+  /** @name UpDataStructsPropertyKeyPermission (177) */
   export interface UpDataStructsPropertyKeyPermission extends Struct {
     readonly key: Bytes;
     readonly permission: UpDataStructsPropertyPermission;
   }
 
-  /** @name UpDataStructsPropertyPermission (177) */
+  /** @name UpDataStructsPropertyPermission (179) */
   export interface UpDataStructsPropertyPermission extends Struct {
     readonly mutable: bool;
     readonly collectionAdmin: bool;
     readonly tokenOwner: bool;
   }
 
-  /** @name UpDataStructsProperty (180) */
+  /** @name UpDataStructsProperty (182) */
   export interface UpDataStructsProperty extends Struct {
     readonly key: Bytes;
     readonly value: Bytes;
   }
 
-  /** @name PalletEvmAccountBasicCrossAccountIdRepr (183) */
+  /** @name PalletEvmAccountBasicCrossAccountIdRepr (185) */
   export interface PalletEvmAccountBasicCrossAccountIdRepr extends Enum {
     readonly isSubstrate: boolean;
     readonly asSubstrate: AccountId32;
@@ -1596,7 +1598,7 @@
     readonly type: 'Substrate' | 'Ethereum';
   }
 
-  /** @name UpDataStructsCreateItemData (185) */
+  /** @name UpDataStructsCreateItemData (187) */
   export interface UpDataStructsCreateItemData extends Enum {
     readonly isNft: boolean;
     readonly asNft: UpDataStructsCreateNftData;
@@ -1607,23 +1609,23 @@
     readonly type: 'Nft' | 'Fungible' | 'ReFungible';
   }
 
-  /** @name UpDataStructsCreateNftData (186) */
+  /** @name UpDataStructsCreateNftData (188) */
   export interface UpDataStructsCreateNftData extends Struct {
     readonly properties: Vec<UpDataStructsProperty>;
   }
 
-  /** @name UpDataStructsCreateFungibleData (187) */
+  /** @name UpDataStructsCreateFungibleData (189) */
   export interface UpDataStructsCreateFungibleData extends Struct {
     readonly value: u128;
   }
 
-  /** @name UpDataStructsCreateReFungibleData (188) */
+  /** @name UpDataStructsCreateReFungibleData (190) */
   export interface UpDataStructsCreateReFungibleData extends Struct {
     readonly constData: Bytes;
     readonly pieces: u128;
   }
 
-  /** @name UpDataStructsCreateItemExData (193) */
+  /** @name UpDataStructsCreateItemExData (195) */
   export interface UpDataStructsCreateItemExData extends Enum {
     readonly isNft: boolean;
     readonly asNft: Vec<UpDataStructsCreateNftExData>;
@@ -1636,19 +1638,19 @@
     readonly type: 'Nft' | 'Fungible' | 'RefungibleMultipleItems' | 'RefungibleMultipleOwners';
   }
 
-  /** @name UpDataStructsCreateNftExData (195) */
+  /** @name UpDataStructsCreateNftExData (197) */
   export interface UpDataStructsCreateNftExData extends Struct {
     readonly properties: Vec<UpDataStructsProperty>;
     readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
   }
 
-  /** @name UpDataStructsCreateRefungibleExData (202) */
+  /** @name UpDataStructsCreateRefungibleExData (204) */
   export interface UpDataStructsCreateRefungibleExData extends Struct {
     readonly constData: Bytes;
     readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;
   }
 
-  /** @name PalletUnqSchedulerCall (204) */
+  /** @name PalletUnqSchedulerCall (206) */
   export interface PalletUnqSchedulerCall extends Enum {
     readonly isScheduleNamed: boolean;
     readonly asScheduleNamed: {
@@ -1673,7 +1675,7 @@
     readonly type: 'ScheduleNamed' | 'CancelNamed' | 'ScheduleNamedAfter';
   }
 
-  /** @name FrameSupportScheduleMaybeHashed (206) */
+  /** @name FrameSupportScheduleMaybeHashed (208) */
   export interface FrameSupportScheduleMaybeHashed extends Enum {
     readonly isValue: boolean;
     readonly asValue: Call;
@@ -1682,13 +1684,13 @@
     readonly type: 'Value' | 'Hash';
   }
 
-  /** @name PalletTemplateTransactionPaymentCall (207) */
+  /** @name PalletTemplateTransactionPaymentCall (209) */
   export type PalletTemplateTransactionPaymentCall = Null;
 
-  /** @name PalletStructureCall (208) */
+  /** @name PalletStructureCall (210) */
   export type PalletStructureCall = Null;
 
-  /** @name PalletRmrkCoreCall (209) */
+  /** @name PalletRmrkCoreCall (211) */
   export interface PalletRmrkCoreCall extends Enum {
     readonly isCreateCollection: boolean;
     readonly asCreateCollection: {
@@ -1793,7 +1795,7 @@
     readonly type: 'CreateCollection' | 'DestroyCollection' | 'ChangeCollectionIssuer' | 'LockCollection' | 'MintNft' | 'BurnNft' | 'Send' | 'AcceptNft' | 'RejectNft' | 'AcceptResource' | 'AcceptResourceRemoval' | 'SetProperty' | 'SetPriority' | 'AddBasicResource' | 'AddComposableResource' | 'AddSlotResource' | 'RemoveResource';
   }
 
-  /** @name RmrkTraitsNftAccountIdOrCollectionNftTuple (213) */
+  /** @name RmrkTraitsNftAccountIdOrCollectionNftTuple (215) */
   export interface RmrkTraitsNftAccountIdOrCollectionNftTuple extends Enum {
     readonly isAccountId: boolean;
     readonly asAccountId: AccountId32;
@@ -1802,7 +1804,7 @@
     readonly type: 'AccountId' | 'CollectionAndNftTuple';
   }
 
-  /** @name RmrkTraitsResourceBasicResource (217) */
+  /** @name RmrkTraitsResourceBasicResource (219) */
   export interface RmrkTraitsResourceBasicResource extends Struct {
     readonly src: Option<Bytes>;
     readonly metadata: Option<Bytes>;
@@ -1810,7 +1812,7 @@
     readonly thumb: Option<Bytes>;
   }
 
-  /** @name RmrkTraitsResourceComposableResource (220) */
+  /** @name RmrkTraitsResourceComposableResource (222) */
   export interface RmrkTraitsResourceComposableResource extends Struct {
     readonly parts: Vec<u32>;
     readonly base: u32;
@@ -1820,7 +1822,7 @@
     readonly thumb: Option<Bytes>;
   }
 
-  /** @name RmrkTraitsResourceSlotResource (222) */
+  /** @name RmrkTraitsResourceSlotResource (224) */
   export interface RmrkTraitsResourceSlotResource extends Struct {
     readonly base: u32;
     readonly src: Option<Bytes>;
@@ -1830,7 +1832,7 @@
     readonly thumb: Option<Bytes>;
   }
 
-  /** @name PalletRmrkEquipCall (223) */
+  /** @name PalletRmrkEquipCall (225) */
   export interface PalletRmrkEquipCall extends Enum {
     readonly isCreateBase: boolean;
     readonly asCreateBase: {
@@ -1846,7 +1848,7 @@
     readonly type: 'CreateBase' | 'ThemeAdd';
   }
 
-  /** @name RmrkTraitsPartPartType (225) */
+  /** @name RmrkTraitsPartPartType (227) */
   export interface RmrkTraitsPartPartType extends Enum {
     readonly isFixedPart: boolean;
     readonly asFixedPart: RmrkTraitsPartFixedPart;
@@ -1855,14 +1857,14 @@
     readonly type: 'FixedPart' | 'SlotPart';
   }
 
-  /** @name RmrkTraitsPartFixedPart (227) */
+  /** @name RmrkTraitsPartFixedPart (229) */
   export interface RmrkTraitsPartFixedPart extends Struct {
     readonly id: u32;
     readonly z: u32;
     readonly src: Bytes;
   }
 
-  /** @name RmrkTraitsPartSlotPart (228) */
+  /** @name RmrkTraitsPartSlotPart (230) */
   export interface RmrkTraitsPartSlotPart extends Struct {
     readonly id: u32;
     readonly equippable: RmrkTraitsPartEquippableList;
@@ -1870,7 +1872,7 @@
     readonly z: u32;
   }
 
-  /** @name RmrkTraitsPartEquippableList (229) */
+  /** @name RmrkTraitsPartEquippableList (231) */
   export interface RmrkTraitsPartEquippableList extends Enum {
     readonly isAll: boolean;
     readonly isEmpty: boolean;
@@ -1879,20 +1881,20 @@
     readonly type: 'All' | 'Empty' | 'Custom';
   }
 
-  /** @name RmrkTraitsTheme (231) */
+  /** @name RmrkTraitsTheme (233) */
   export interface RmrkTraitsTheme extends Struct {
     readonly name: Bytes;
     readonly properties: Vec<RmrkTraitsThemeThemeProperty>;
     readonly inherit: bool;
   }
 
-  /** @name RmrkTraitsThemeThemeProperty (233) */
+  /** @name RmrkTraitsThemeThemeProperty (235) */
   export interface RmrkTraitsThemeThemeProperty extends Struct {
     readonly key: Bytes;
     readonly value: Bytes;
   }
 
-  /** @name PalletEvmCall (234) */
+  /** @name PalletEvmCall (236) */
   export interface PalletEvmCall extends Enum {
     readonly isWithdraw: boolean;
     readonly asWithdraw: {
@@ -1937,7 +1939,7 @@
     readonly type: 'Withdraw' | 'Call' | 'Create' | 'Create2';
   }
 
-  /** @name PalletEthereumCall (240) */
+  /** @name PalletEthereumCall (242) */
   export interface PalletEthereumCall extends Enum {
     readonly isTransact: boolean;
     readonly asTransact: {
@@ -1946,7 +1948,7 @@
     readonly type: 'Transact';
   }
 
-  /** @name EthereumTransactionTransactionV2 (241) */
+  /** @name EthereumTransactionTransactionV2 (243) */
   export interface EthereumTransactionTransactionV2 extends Enum {
     readonly isLegacy: boolean;
     readonly asLegacy: EthereumTransactionLegacyTransaction;
@@ -1957,7 +1959,7 @@
     readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';
   }
 
-  /** @name EthereumTransactionLegacyTransaction (242) */
+  /** @name EthereumTransactionLegacyTransaction (244) */
   export interface EthereumTransactionLegacyTransaction extends Struct {
     readonly nonce: U256;
     readonly gasPrice: U256;
@@ -1968,7 +1970,7 @@
     readonly signature: EthereumTransactionTransactionSignature;
   }
 
-  /** @name EthereumTransactionTransactionAction (243) */
+  /** @name EthereumTransactionTransactionAction (245) */
   export interface EthereumTransactionTransactionAction extends Enum {
     readonly isCall: boolean;
     readonly asCall: H160;
@@ -1976,14 +1978,14 @@
     readonly type: 'Call' | 'Create';
   }
 
-  /** @name EthereumTransactionTransactionSignature (244) */
+  /** @name EthereumTransactionTransactionSignature (246) */
   export interface EthereumTransactionTransactionSignature extends Struct {
     readonly v: u64;
     readonly r: H256;
     readonly s: H256;
   }
 
-  /** @name EthereumTransactionEip2930Transaction (246) */
+  /** @name EthereumTransactionEip2930Transaction (248) */
   export interface EthereumTransactionEip2930Transaction extends Struct {
     readonly chainId: u64;
     readonly nonce: U256;
@@ -1998,13 +2000,13 @@
     readonly s: H256;
   }
 
-  /** @name EthereumTransactionAccessListItem (248) */
+  /** @name EthereumTransactionAccessListItem (250) */
   export interface EthereumTransactionAccessListItem extends Struct {
     readonly address: H160;
     readonly storageKeys: Vec<H256>;
   }
 
-  /** @name EthereumTransactionEip1559Transaction (249) */
+  /** @name EthereumTransactionEip1559Transaction (251) */
   export interface EthereumTransactionEip1559Transaction extends Struct {
     readonly chainId: u64;
     readonly nonce: U256;
@@ -2020,7 +2022,7 @@
     readonly s: H256;
   }
 
-  /** @name PalletEvmMigrationCall (250) */
+  /** @name PalletEvmMigrationCall (252) */
   export interface PalletEvmMigrationCall extends Enum {
     readonly isBegin: boolean;
     readonly asBegin: {
@@ -2039,7 +2041,7 @@
     readonly type: 'Begin' | 'SetData' | 'Finish';
   }
 
-  /** @name PalletSudoEvent (253) */
+  /** @name PalletSudoEvent (255) */
   export interface PalletSudoEvent extends Enum {
     readonly isSudid: boolean;
     readonly asSudid: {
@@ -2056,7 +2058,7 @@
     readonly type: 'Sudid' | 'KeyChanged' | 'SudoAsDone';
   }
 
-  /** @name SpRuntimeDispatchError (255) */
+  /** @name SpRuntimeDispatchError (257) */
   export interface SpRuntimeDispatchError extends Enum {
     readonly isOther: boolean;
     readonly isCannotLookup: boolean;
@@ -2075,13 +2077,13 @@
     readonly type: 'Other' | 'CannotLookup' | 'BadOrigin' | 'Module' | 'ConsumerRemaining' | 'NoProviders' | 'TooManyConsumers' | 'Token' | 'Arithmetic' | 'Transactional';
   }
 
-  /** @name SpRuntimeModuleError (256) */
+  /** @name SpRuntimeModuleError (258) */
   export interface SpRuntimeModuleError extends Struct {
     readonly index: u8;
     readonly error: U8aFixed;
   }
 
-  /** @name SpRuntimeTokenError (257) */
+  /** @name SpRuntimeTokenError (259) */
   export interface SpRuntimeTokenError extends Enum {
     readonly isNoFunds: boolean;
     readonly isWouldDie: boolean;
@@ -2093,7 +2095,7 @@
     readonly type: 'NoFunds' | 'WouldDie' | 'BelowMinimum' | 'CannotCreate' | 'UnknownAsset' | 'Frozen' | 'Unsupported';
   }
 
-  /** @name SpRuntimeArithmeticError (258) */
+  /** @name SpRuntimeArithmeticError (260) */
   export interface SpRuntimeArithmeticError extends Enum {
     readonly isUnderflow: boolean;
     readonly isOverflow: boolean;
@@ -2101,20 +2103,20 @@
     readonly type: 'Underflow' | 'Overflow' | 'DivisionByZero';
   }
 
-  /** @name SpRuntimeTransactionalError (259) */
+  /** @name SpRuntimeTransactionalError (261) */
   export interface SpRuntimeTransactionalError extends Enum {
     readonly isLimitReached: boolean;
     readonly isNoLayer: boolean;
     readonly type: 'LimitReached' | 'NoLayer';
   }
 
-  /** @name PalletSudoError (260) */
+  /** @name PalletSudoError (262) */
   export interface PalletSudoError extends Enum {
     readonly isRequireSudo: boolean;
     readonly type: 'RequireSudo';
   }
 
-  /** @name FrameSystemAccountInfo (261) */
+  /** @name FrameSystemAccountInfo (263) */
   export interface FrameSystemAccountInfo extends Struct {
     readonly nonce: u32;
     readonly consumers: u32;
@@ -2123,19 +2125,19 @@
     readonly data: PalletBalancesAccountData;
   }
 
-  /** @name FrameSupportWeightsPerDispatchClassU64 (262) */
+  /** @name FrameSupportWeightsPerDispatchClassU64 (264) */
   export interface FrameSupportWeightsPerDispatchClassU64 extends Struct {
     readonly normal: u64;
     readonly operational: u64;
     readonly mandatory: u64;
   }
 
-  /** @name SpRuntimeDigest (263) */
+  /** @name SpRuntimeDigest (265) */
   export interface SpRuntimeDigest extends Struct {
     readonly logs: Vec<SpRuntimeDigestDigestItem>;
   }
 
-  /** @name SpRuntimeDigestDigestItem (265) */
+  /** @name SpRuntimeDigestDigestItem (267) */
   export interface SpRuntimeDigestDigestItem extends Enum {
     readonly isOther: boolean;
     readonly asOther: Bytes;
@@ -2149,14 +2151,14 @@
     readonly type: 'Other' | 'Consensus' | 'Seal' | 'PreRuntime' | 'RuntimeEnvironmentUpdated';
   }
 
-  /** @name FrameSystemEventRecord (267) */
+  /** @name FrameSystemEventRecord (269) */
   export interface FrameSystemEventRecord extends Struct {
     readonly phase: FrameSystemPhase;
     readonly event: Event;
     readonly topics: Vec<H256>;
   }
 
-  /** @name FrameSystemEvent (269) */
+  /** @name FrameSystemEvent (271) */
   export interface FrameSystemEvent extends Enum {
     readonly isExtrinsicSuccess: boolean;
     readonly asExtrinsicSuccess: {
@@ -2184,14 +2186,14 @@
     readonly type: 'ExtrinsicSuccess' | 'ExtrinsicFailed' | 'CodeUpdated' | 'NewAccount' | 'KilledAccount' | 'Remarked';
   }
 
-  /** @name FrameSupportWeightsDispatchInfo (270) */
+  /** @name FrameSupportWeightsDispatchInfo (272) */
   export interface FrameSupportWeightsDispatchInfo extends Struct {
     readonly weight: u64;
     readonly class: FrameSupportWeightsDispatchClass;
     readonly paysFee: FrameSupportWeightsPays;
   }
 
-  /** @name FrameSupportWeightsDispatchClass (271) */
+  /** @name FrameSupportWeightsDispatchClass (273) */
   export interface FrameSupportWeightsDispatchClass extends Enum {
     readonly isNormal: boolean;
     readonly isOperational: boolean;
@@ -2199,14 +2201,14 @@
     readonly type: 'Normal' | 'Operational' | 'Mandatory';
   }
 
-  /** @name FrameSupportWeightsPays (272) */
+  /** @name FrameSupportWeightsPays (274) */
   export interface FrameSupportWeightsPays extends Enum {
     readonly isYes: boolean;
     readonly isNo: boolean;
     readonly type: 'Yes' | 'No';
   }
 
-  /** @name OrmlVestingModuleEvent (273) */
+  /** @name OrmlVestingModuleEvent (275) */
   export interface OrmlVestingModuleEvent extends Enum {
     readonly isVestingScheduleAdded: boolean;
     readonly asVestingScheduleAdded: {
@@ -2226,7 +2228,7 @@
     readonly type: 'VestingScheduleAdded' | 'Claimed' | 'VestingSchedulesUpdated';
   }
 
-  /** @name CumulusPalletXcmpQueueEvent (274) */
+  /** @name CumulusPalletXcmpQueueEvent (276) */
   export interface CumulusPalletXcmpQueueEvent extends Enum {
     readonly isSuccess: boolean;
     readonly asSuccess: Option<H256>;
@@ -2247,7 +2249,7 @@
     readonly type: 'Success' | 'Fail' | 'BadVersion' | 'BadFormat' | 'UpwardMessageSent' | 'XcmpMessageSent' | 'OverweightEnqueued' | 'OverweightServiced';
   }
 
-  /** @name PalletXcmEvent (275) */
+  /** @name PalletXcmEvent (277) */
   export interface PalletXcmEvent extends Enum {
     readonly isAttempted: boolean;
     readonly asAttempted: XcmV2TraitsOutcome;
@@ -2284,7 +2286,7 @@
     readonly type: 'Attempted' | 'Sent' | 'UnexpectedResponse' | 'ResponseReady' | 'Notified' | 'NotifyOverweight' | 'NotifyDispatchError' | 'NotifyDecodeFailed' | 'InvalidResponder' | 'InvalidResponderVersion' | 'ResponseTaken' | 'AssetsTrapped' | 'VersionChangeNotified' | 'SupportedVersionChanged' | 'NotifyTargetSendFail' | 'NotifyTargetMigrationFail';
   }
 
-  /** @name XcmV2TraitsOutcome (276) */
+  /** @name XcmV2TraitsOutcome (278) */
   export interface XcmV2TraitsOutcome extends Enum {
     readonly isComplete: boolean;
     readonly asComplete: u64;
@@ -2295,7 +2297,7 @@
     readonly type: 'Complete' | 'Incomplete' | 'Error';
   }
 
-  /** @name CumulusPalletXcmEvent (278) */
+  /** @name CumulusPalletXcmEvent (280) */
   export interface CumulusPalletXcmEvent extends Enum {
     readonly isInvalidFormat: boolean;
     readonly asInvalidFormat: U8aFixed;
@@ -2306,7 +2308,7 @@
     readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward';
   }
 
-  /** @name CumulusPalletDmpQueueEvent (279) */
+  /** @name CumulusPalletDmpQueueEvent (281) */
   export interface CumulusPalletDmpQueueEvent extends Enum {
     readonly isInvalidFormat: boolean;
     readonly asInvalidFormat: U8aFixed;
@@ -2323,7 +2325,7 @@
     readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward' | 'WeightExhausted' | 'OverweightEnqueued' | 'OverweightServiced';
   }
 
-  /** @name PalletUniqueRawEvent (280) */
+  /** @name PalletUniqueRawEvent (282) */
   export interface PalletUniqueRawEvent extends Enum {
     readonly isCollectionSponsorRemoved: boolean;
     readonly asCollectionSponsorRemoved: u32;
@@ -2348,7 +2350,7 @@
     readonly type: 'CollectionSponsorRemoved' | 'CollectionAdminAdded' | 'CollectionOwnedChanged' | 'CollectionSponsorSet' | 'SponsorshipConfirmed' | 'CollectionAdminRemoved' | 'AllowListAddressRemoved' | 'AllowListAddressAdded' | 'CollectionLimitSet' | 'CollectionPermissionSet';
   }
 
-  /** @name PalletUnqSchedulerEvent (281) */
+  /** @name PalletUnqSchedulerEvent (283) */
   export interface PalletUnqSchedulerEvent extends Enum {
     readonly isScheduled: boolean;
     readonly asScheduled: {
@@ -2375,14 +2377,14 @@
     readonly type: 'Scheduled' | 'Canceled' | 'Dispatched' | 'CallLookupFailed';
   }
 
-  /** @name FrameSupportScheduleLookupError (283) */
+  /** @name FrameSupportScheduleLookupError (285) */
   export interface FrameSupportScheduleLookupError extends Enum {
     readonly isUnknown: boolean;
     readonly isBadFormat: boolean;
     readonly type: 'Unknown' | 'BadFormat';
   }
 
-  /** @name PalletCommonEvent (284) */
+  /** @name PalletCommonEvent (286) */
   export interface PalletCommonEvent extends Enum {
     readonly isCollectionCreated: boolean;
     readonly asCollectionCreated: ITuple<[u32, u8, AccountId32]>;
@@ -2409,14 +2411,14 @@
     readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved' | 'CollectionPropertySet' | 'CollectionPropertyDeleted' | 'TokenPropertySet' | 'TokenPropertyDeleted' | 'PropertyPermissionSet';
   }
 
-  /** @name PalletStructureEvent (285) */
+  /** @name PalletStructureEvent (287) */
   export interface PalletStructureEvent extends Enum {
     readonly isExecuted: boolean;
     readonly asExecuted: Result<Null, SpRuntimeDispatchError>;
     readonly type: 'Executed';
   }
 
-  /** @name PalletRmrkCoreEvent (286) */
+  /** @name PalletRmrkCoreEvent (288) */
   export interface PalletRmrkCoreEvent extends Enum {
     readonly isCollectionCreated: boolean;
     readonly asCollectionCreated: {
@@ -2506,7 +2508,7 @@
     readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'IssuerChanged' | 'CollectionLocked' | 'NftMinted' | 'NftBurned' | 'NftSent' | 'NftAccepted' | 'NftRejected' | 'PropertySet' | 'ResourceAdded' | 'ResourceRemoval' | 'ResourceAccepted' | 'ResourceRemovalAccepted' | 'PrioritySet';
   }
 
-  /** @name PalletRmrkEquipEvent (287) */
+  /** @name PalletRmrkEquipEvent (289) */
   export interface PalletRmrkEquipEvent extends Enum {
     readonly isBaseCreated: boolean;
     readonly asBaseCreated: {
@@ -2516,7 +2518,7 @@
     readonly type: 'BaseCreated';
   }
 
-  /** @name PalletEvmEvent (288) */
+  /** @name PalletEvmEvent (290) */
   export interface PalletEvmEvent extends Enum {
     readonly isLog: boolean;
     readonly asLog: EthereumLog;
@@ -2535,21 +2537,21 @@
     readonly type: 'Log' | 'Created' | 'CreatedFailed' | 'Executed' | 'ExecutedFailed' | 'BalanceDeposit' | 'BalanceWithdraw';
   }
 
-  /** @name EthereumLog (289) */
+  /** @name EthereumLog (291) */
   export interface EthereumLog extends Struct {
     readonly address: H160;
     readonly topics: Vec<H256>;
     readonly data: Bytes;
   }
 
-  /** @name PalletEthereumEvent (290) */
+  /** @name PalletEthereumEvent (292) */
   export interface PalletEthereumEvent extends Enum {
     readonly isExecuted: boolean;
     readonly asExecuted: ITuple<[H160, H160, H256, EvmCoreErrorExitReason]>;
     readonly type: 'Executed';
   }
 
-  /** @name EvmCoreErrorExitReason (291) */
+  /** @name EvmCoreErrorExitReason (293) */
   export interface EvmCoreErrorExitReason extends Enum {
     readonly isSucceed: boolean;
     readonly asSucceed: EvmCoreErrorExitSucceed;
@@ -2562,7 +2564,7 @@
     readonly type: 'Succeed' | 'Error' | 'Revert' | 'Fatal';
   }
 
-  /** @name EvmCoreErrorExitSucceed (292) */
+  /** @name EvmCoreErrorExitSucceed (294) */
   export interface EvmCoreErrorExitSucceed extends Enum {
     readonly isStopped: boolean;
     readonly isReturned: boolean;
@@ -2570,7 +2572,7 @@
     readonly type: 'Stopped' | 'Returned' | 'Suicided';
   }
 
-  /** @name EvmCoreErrorExitError (293) */
+  /** @name EvmCoreErrorExitError (295) */
   export interface EvmCoreErrorExitError extends Enum {
     readonly isStackUnderflow: boolean;
     readonly isStackOverflow: boolean;
@@ -2591,13 +2593,13 @@
     readonly type: 'StackUnderflow' | 'StackOverflow' | 'InvalidJump' | 'InvalidRange' | 'DesignatedInvalid' | 'CallTooDeep' | 'CreateCollision' | 'CreateContractLimit' | 'OutOfOffset' | 'OutOfGas' | 'OutOfFund' | 'PcUnderflow' | 'CreateEmpty' | 'Other' | 'InvalidCode';
   }
 
-  /** @name EvmCoreErrorExitRevert (296) */
+  /** @name EvmCoreErrorExitRevert (298) */
   export interface EvmCoreErrorExitRevert extends Enum {
     readonly isReverted: boolean;
     readonly type: 'Reverted';
   }
 
-  /** @name EvmCoreErrorExitFatal (297) */
+  /** @name EvmCoreErrorExitFatal (299) */
   export interface EvmCoreErrorExitFatal extends Enum {
     readonly isNotSupported: boolean;
     readonly isUnhandledInterrupt: boolean;
@@ -2608,7 +2610,7 @@
     readonly type: 'NotSupported' | 'UnhandledInterrupt' | 'CallErrorAsFatal' | 'Other';
   }
 
-  /** @name FrameSystemPhase (298) */
+  /** @name FrameSystemPhase (300) */
   export interface FrameSystemPhase extends Enum {
     readonly isApplyExtrinsic: boolean;
     readonly asApplyExtrinsic: u32;
@@ -2617,27 +2619,27 @@
     readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization';
   }
 
-  /** @name FrameSystemLastRuntimeUpgradeInfo (300) */
+  /** @name FrameSystemLastRuntimeUpgradeInfo (302) */
   export interface FrameSystemLastRuntimeUpgradeInfo extends Struct {
     readonly specVersion: Compact<u32>;
     readonly specName: Text;
   }
 
-  /** @name FrameSystemLimitsBlockWeights (301) */
+  /** @name FrameSystemLimitsBlockWeights (303) */
   export interface FrameSystemLimitsBlockWeights extends Struct {
     readonly baseBlock: u64;
     readonly maxBlock: u64;
     readonly perClass: FrameSupportWeightsPerDispatchClassWeightsPerClass;
   }
 
-  /** @name FrameSupportWeightsPerDispatchClassWeightsPerClass (302) */
+  /** @name FrameSupportWeightsPerDispatchClassWeightsPerClass (304) */
   export interface FrameSupportWeightsPerDispatchClassWeightsPerClass extends Struct {
     readonly normal: FrameSystemLimitsWeightsPerClass;
     readonly operational: FrameSystemLimitsWeightsPerClass;
     readonly mandatory: FrameSystemLimitsWeightsPerClass;
   }
 
-  /** @name FrameSystemLimitsWeightsPerClass (303) */
+  /** @name FrameSystemLimitsWeightsPerClass (305) */
   export interface FrameSystemLimitsWeightsPerClass extends Struct {
     readonly baseExtrinsic: u64;
     readonly maxExtrinsic: Option<u64>;
@@ -2645,25 +2647,25 @@
     readonly reserved: Option<u64>;
   }
 
-  /** @name FrameSystemLimitsBlockLength (305) */
+  /** @name FrameSystemLimitsBlockLength (307) */
   export interface FrameSystemLimitsBlockLength extends Struct {
     readonly max: FrameSupportWeightsPerDispatchClassU32;
   }
 
-  /** @name FrameSupportWeightsPerDispatchClassU32 (306) */
+  /** @name FrameSupportWeightsPerDispatchClassU32 (308) */
   export interface FrameSupportWeightsPerDispatchClassU32 extends Struct {
     readonly normal: u32;
     readonly operational: u32;
     readonly mandatory: u32;
   }
 
-  /** @name FrameSupportWeightsRuntimeDbWeight (307) */
+  /** @name FrameSupportWeightsRuntimeDbWeight (309) */
   export interface FrameSupportWeightsRuntimeDbWeight extends Struct {
     readonly read: u64;
     readonly write: u64;
   }
 
-  /** @name SpVersionRuntimeVersion (308) */
+  /** @name SpVersionRuntimeVersion (310) */
   export interface SpVersionRuntimeVersion extends Struct {
     readonly specName: Text;
     readonly implName: Text;
@@ -2675,7 +2677,7 @@
     readonly stateVersion: u8;
   }
 
-  /** @name FrameSystemError (312) */
+  /** @name FrameSystemError (314) */
   export interface FrameSystemError extends Enum {
     readonly isInvalidSpecName: boolean;
     readonly isSpecVersionNeedsToIncrease: boolean;
@@ -2686,7 +2688,7 @@
     readonly type: 'InvalidSpecName' | 'SpecVersionNeedsToIncrease' | 'FailedToExtractRuntimeVersion' | 'NonDefaultComposite' | 'NonZeroRefCount' | 'CallFiltered';
   }
 
-  /** @name OrmlVestingModuleError (314) */
+  /** @name OrmlVestingModuleError (316) */
   export interface OrmlVestingModuleError extends Enum {
     readonly isZeroVestingPeriod: boolean;
     readonly isZeroVestingPeriodCount: boolean;
@@ -2697,21 +2699,21 @@
     readonly type: 'ZeroVestingPeriod' | 'ZeroVestingPeriodCount' | 'InsufficientBalanceToLock' | 'TooManyVestingSchedules' | 'AmountLow' | 'MaxVestingSchedulesExceeded';
   }
 
-  /** @name CumulusPalletXcmpQueueInboundChannelDetails (316) */
+  /** @name CumulusPalletXcmpQueueInboundChannelDetails (318) */
   export interface CumulusPalletXcmpQueueInboundChannelDetails extends Struct {
     readonly sender: u32;
     readonly state: CumulusPalletXcmpQueueInboundState;
     readonly messageMetadata: Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>;
   }
 
-  /** @name CumulusPalletXcmpQueueInboundState (317) */
+  /** @name CumulusPalletXcmpQueueInboundState (319) */
   export interface CumulusPalletXcmpQueueInboundState extends Enum {
     readonly isOk: boolean;
     readonly isSuspended: boolean;
     readonly type: 'Ok' | 'Suspended';
   }
 
-  /** @name PolkadotParachainPrimitivesXcmpMessageFormat (320) */
+  /** @name PolkadotParachainPrimitivesXcmpMessageFormat (322) */
   export interface PolkadotParachainPrimitivesXcmpMessageFormat extends Enum {
     readonly isConcatenatedVersionedXcm: boolean;
     readonly isConcatenatedEncodedBlob: boolean;
@@ -2719,7 +2721,7 @@
     readonly type: 'ConcatenatedVersionedXcm' | 'ConcatenatedEncodedBlob' | 'Signals';
   }
 
-  /** @name CumulusPalletXcmpQueueOutboundChannelDetails (323) */
+  /** @name CumulusPalletXcmpQueueOutboundChannelDetails (325) */
   export interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct {
     readonly recipient: u32;
     readonly state: CumulusPalletXcmpQueueOutboundState;
@@ -2728,14 +2730,14 @@
     readonly lastIndex: u16;
   }
 
-  /** @name CumulusPalletXcmpQueueOutboundState (324) */
+  /** @name CumulusPalletXcmpQueueOutboundState (326) */
   export interface CumulusPalletXcmpQueueOutboundState extends Enum {
     readonly isOk: boolean;
     readonly isSuspended: boolean;
     readonly type: 'Ok' | 'Suspended';
   }
 
-  /** @name CumulusPalletXcmpQueueQueueConfigData (326) */
+  /** @name CumulusPalletXcmpQueueQueueConfigData (328) */
   export interface CumulusPalletXcmpQueueQueueConfigData extends Struct {
     readonly suspendThreshold: u32;
     readonly dropThreshold: u32;
@@ -2745,7 +2747,7 @@
     readonly xcmpMaxIndividualWeight: u64;
   }
 
-  /** @name CumulusPalletXcmpQueueError (328) */
+  /** @name CumulusPalletXcmpQueueError (330) */
   export interface CumulusPalletXcmpQueueError extends Enum {
     readonly isFailedToSend: boolean;
     readonly isBadXcmOrigin: boolean;
@@ -2755,7 +2757,7 @@
     readonly type: 'FailedToSend' | 'BadXcmOrigin' | 'BadXcm' | 'BadOverweightIndex' | 'WeightOverLimit';
   }
 
-  /** @name PalletXcmError (329) */
+  /** @name PalletXcmError (331) */
   export interface PalletXcmError extends Enum {
     readonly isUnreachable: boolean;
     readonly isSendFailure: boolean;
@@ -2773,29 +2775,29 @@
     readonly type: 'Unreachable' | 'SendFailure' | 'Filtered' | 'UnweighableMessage' | 'DestinationNotInvertible' | 'Empty' | 'CannotReanchor' | 'TooManyAssets' | 'InvalidOrigin' | 'BadVersion' | 'BadLocation' | 'NoSubscription' | 'AlreadySubscribed';
   }
 
-  /** @name CumulusPalletXcmError (330) */
+  /** @name CumulusPalletXcmError (332) */
   export type CumulusPalletXcmError = Null;
 
-  /** @name CumulusPalletDmpQueueConfigData (331) */
+  /** @name CumulusPalletDmpQueueConfigData (333) */
   export interface CumulusPalletDmpQueueConfigData extends Struct {
     readonly maxIndividual: u64;
   }
 
-  /** @name CumulusPalletDmpQueuePageIndexData (332) */
+  /** @name CumulusPalletDmpQueuePageIndexData (334) */
   export interface CumulusPalletDmpQueuePageIndexData extends Struct {
     readonly beginUsed: u32;
     readonly endUsed: u32;
     readonly overweightCount: u64;
   }
 
-  /** @name CumulusPalletDmpQueueError (335) */
+  /** @name CumulusPalletDmpQueueError (337) */
   export interface CumulusPalletDmpQueueError extends Enum {
     readonly isUnknown: boolean;
     readonly isOverLimit: boolean;
     readonly type: 'Unknown' | 'OverLimit';
   }
 
-  /** @name PalletUniqueError (339) */
+  /** @name PalletUniqueError (341) */
   export interface PalletUniqueError extends Enum {
     readonly isCollectionDecimalPointLimitExceeded: boolean;
     readonly isConfirmUnsetSponsorFail: boolean;
@@ -2803,7 +2805,7 @@
     readonly type: 'CollectionDecimalPointLimitExceeded' | 'ConfirmUnsetSponsorFail' | 'EmptyArgument';
   }
 
-  /** @name PalletUnqSchedulerScheduledV3 (342) */
+  /** @name PalletUnqSchedulerScheduledV3 (344) */
   export interface PalletUnqSchedulerScheduledV3 extends Struct {
     readonly maybeId: Option<U8aFixed>;
     readonly priority: u8;
@@ -2812,7 +2814,7 @@
     readonly origin: OpalRuntimeOriginCaller;
   }
 
-  /** @name OpalRuntimeOriginCaller (343) */
+  /** @name OpalRuntimeOriginCaller (345) */
   export interface OpalRuntimeOriginCaller extends Enum {
     readonly isVoid: boolean;
     readonly isSystem: boolean;
@@ -2826,7 +2828,7 @@
     readonly type: 'Void' | 'System' | 'PolkadotXcm' | 'CumulusXcm' | 'Ethereum';
   }
 
-  /** @name FrameSupportDispatchRawOrigin (344) */
+  /** @name FrameSupportDispatchRawOrigin (346) */
   export interface FrameSupportDispatchRawOrigin extends Enum {
     readonly isRoot: boolean;
     readonly isSigned: boolean;
@@ -2835,7 +2837,7 @@
     readonly type: 'Root' | 'Signed' | 'None';
   }
 
-  /** @name PalletXcmOrigin (345) */
+  /** @name PalletXcmOrigin (347) */
   export interface PalletXcmOrigin extends Enum {
     readonly isXcm: boolean;
     readonly asXcm: XcmV1MultiLocation;
@@ -2844,7 +2846,7 @@
     readonly type: 'Xcm' | 'Response';
   }
 
-  /** @name CumulusPalletXcmOrigin (346) */
+  /** @name CumulusPalletXcmOrigin (348) */
   export interface CumulusPalletXcmOrigin extends Enum {
     readonly isRelay: boolean;
     readonly isSiblingParachain: boolean;
@@ -2852,17 +2854,17 @@
     readonly type: 'Relay' | 'SiblingParachain';
   }
 
-  /** @name PalletEthereumRawOrigin (347) */
+  /** @name PalletEthereumRawOrigin (349) */
   export interface PalletEthereumRawOrigin extends Enum {
     readonly isEthereumTransaction: boolean;
     readonly asEthereumTransaction: H160;
     readonly type: 'EthereumTransaction';
   }
 
-  /** @name SpCoreVoid (348) */
+  /** @name SpCoreVoid (350) */
   export type SpCoreVoid = Null;
 
-  /** @name PalletUnqSchedulerError (349) */
+  /** @name PalletUnqSchedulerError (351) */
   export interface PalletUnqSchedulerError extends Enum {
     readonly isFailedToSchedule: boolean;
     readonly isNotFound: boolean;
@@ -2871,7 +2873,7 @@
     readonly type: 'FailedToSchedule' | 'NotFound' | 'TargetBlockNumberInPast' | 'RescheduleNoChange';
   }
 
-  /** @name UpDataStructsCollection (350) */
+  /** @name UpDataStructsCollection (352) */
   export interface UpDataStructsCollection extends Struct {
     readonly owner: AccountId32;
     readonly mode: UpDataStructsCollectionMode;
@@ -2884,7 +2886,7 @@
     readonly externalCollection: bool;
   }
 
-  /** @name UpDataStructsSponsorshipState (351) */
+  /** @name UpDataStructsSponsorshipState (353) */
   export interface UpDataStructsSponsorshipState extends Enum {
     readonly isDisabled: boolean;
     readonly isUnconfirmed: boolean;
@@ -2894,42 +2896,42 @@
     readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';
   }
 
-  /** @name UpDataStructsProperties (352) */
+  /** @name UpDataStructsProperties (354) */
   export interface UpDataStructsProperties extends Struct {
     readonly map: UpDataStructsPropertiesMapBoundedVec;
     readonly consumedSpace: u32;
     readonly spaceLimit: u32;
   }
 
-  /** @name UpDataStructsPropertiesMapBoundedVec (353) */
+  /** @name UpDataStructsPropertiesMapBoundedVec (355) */
   export interface UpDataStructsPropertiesMapBoundedVec extends BTreeMap<Bytes, Bytes> {}
 
-  /** @name UpDataStructsPropertiesMapPropertyPermission (358) */
+  /** @name UpDataStructsPropertiesMapPropertyPermission (360) */
   export interface UpDataStructsPropertiesMapPropertyPermission extends BTreeMap<Bytes, UpDataStructsPropertyPermission> {}
 
-  /** @name UpDataStructsCollectionStats (365) */
+  /** @name UpDataStructsCollectionStats (367) */
   export interface UpDataStructsCollectionStats extends Struct {
     readonly created: u32;
     readonly destroyed: u32;
     readonly alive: u32;
   }
 
-  /** @name UpDataStructsTokenChild (366) */
+  /** @name UpDataStructsTokenChild (368) */
   export interface UpDataStructsTokenChild extends Struct {
     readonly token: u32;
     readonly collection: u32;
   }
 
-  /** @name PhantomTypeUpDataStructs (367) */
+  /** @name PhantomTypeUpDataStructs (369) */
   export interface PhantomTypeUpDataStructs extends Vec<ITuple<[UpDataStructsTokenData, UpDataStructsRpcCollection, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftNftInfo, RmrkTraitsResourceResourceInfo, RmrkTraitsPropertyPropertyInfo, RmrkTraitsBaseBaseInfo, RmrkTraitsPartPartType, RmrkTraitsTheme, RmrkTraitsNftNftChild]>> {}
 
-  /** @name UpDataStructsTokenData (369) */
+  /** @name UpDataStructsTokenData (371) */
   export interface UpDataStructsTokenData extends Struct {
     readonly properties: Vec<UpDataStructsProperty>;
     readonly owner: Option<PalletEvmAccountBasicCrossAccountIdRepr>;
   }
 
-  /** @name UpDataStructsRpcCollection (371) */
+  /** @name UpDataStructsRpcCollection (373) */
   export interface UpDataStructsRpcCollection extends Struct {
     readonly owner: AccountId32;
     readonly mode: UpDataStructsCollectionMode;
@@ -2944,7 +2946,7 @@
     readonly readOnly: bool;
   }
 
-  /** @name RmrkTraitsCollectionCollectionInfo (372) */
+  /** @name RmrkTraitsCollectionCollectionInfo (374) */
   export interface RmrkTraitsCollectionCollectionInfo extends Struct {
     readonly issuer: AccountId32;
     readonly metadata: Bytes;
@@ -2953,7 +2955,7 @@
     readonly nftsCount: u32;
   }
 
-  /** @name RmrkTraitsNftNftInfo (373) */
+  /** @name RmrkTraitsNftNftInfo (375) */
   export interface RmrkTraitsNftNftInfo extends Struct {
     readonly owner: RmrkTraitsNftAccountIdOrCollectionNftTuple;
     readonly royalty: Option<RmrkTraitsNftRoyaltyInfo>;
@@ -2962,13 +2964,13 @@
     readonly pending: bool;
   }
 
-  /** @name RmrkTraitsNftRoyaltyInfo (375) */
+  /** @name RmrkTraitsNftRoyaltyInfo (377) */
   export interface RmrkTraitsNftRoyaltyInfo extends Struct {
     readonly recipient: AccountId32;
     readonly amount: Permill;
   }
 
-  /** @name RmrkTraitsResourceResourceInfo (376) */
+  /** @name RmrkTraitsResourceResourceInfo (378) */
   export interface RmrkTraitsResourceResourceInfo extends Struct {
     readonly id: u32;
     readonly resource: RmrkTraitsResourceResourceTypes;
@@ -2976,7 +2978,7 @@
     readonly pendingRemoval: bool;
   }
 
-  /** @name RmrkTraitsResourceResourceTypes (377) */
+  /** @name RmrkTraitsResourceResourceTypes (379) */
   export interface RmrkTraitsResourceResourceTypes extends Enum {
     readonly isBasic: boolean;
     readonly asBasic: RmrkTraitsResourceBasicResource;
@@ -2987,26 +2989,26 @@
     readonly type: 'Basic' | 'Composable' | 'Slot';
   }
 
-  /** @name RmrkTraitsPropertyPropertyInfo (378) */
+  /** @name RmrkTraitsPropertyPropertyInfo (380) */
   export interface RmrkTraitsPropertyPropertyInfo extends Struct {
     readonly key: Bytes;
     readonly value: Bytes;
   }
 
-  /** @name RmrkTraitsBaseBaseInfo (379) */
+  /** @name RmrkTraitsBaseBaseInfo (381) */
   export interface RmrkTraitsBaseBaseInfo extends Struct {
     readonly issuer: AccountId32;
     readonly baseType: Bytes;
     readonly symbol: Bytes;
   }
 
-  /** @name RmrkTraitsNftNftChild (380) */
+  /** @name RmrkTraitsNftNftChild (382) */
   export interface RmrkTraitsNftNftChild extends Struct {
     readonly collectionId: u32;
     readonly nftId: u32;
   }
 
-  /** @name PalletCommonError (382) */
+  /** @name PalletCommonError (384) */
   export interface PalletCommonError extends Enum {
     readonly isCollectionNotFound: boolean;
     readonly isMustBeTokenOwner: boolean;
@@ -3032,8 +3034,7 @@
     readonly isAddressIsZero: boolean;
     readonly isUnsupportedOperation: boolean;
     readonly isNotSufficientFounds: boolean;
-    readonly isNestingIsDisabled: boolean;
-    readonly isOnlyOwnerAllowedToNest: boolean;
+    readonly isUserIsNotAllowedToNest: boolean;
     readonly isSourceCollectionIsNotAllowedToNest: boolean;
     readonly isCollectionFieldSizeExceeded: boolean;
     readonly isNoSpaceForProperty: boolean;
@@ -3043,10 +3044,10 @@
     readonly isEmptyPropertyKey: boolean;
     readonly isCollectionIsExternal: boolean;
     readonly isCollectionIsInternal: 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' | 'NestingIsDisabled' | 'OnlyOwnerAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey' | 'CollectionIsExternal' | 'CollectionIsInternal';
+    readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'CantDestroyNotEmptyCollection' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'UserIsNotAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey' | 'CollectionIsExternal' | 'CollectionIsInternal';
   }
 
-  /** @name PalletFungibleError (384) */
+  /** @name PalletFungibleError (386) */
   export interface PalletFungibleError extends Enum {
     readonly isNotFungibleDataUsedToMintFungibleCollectionToken: boolean;
     readonly isFungibleItemsHaveNoId: boolean;
@@ -3056,12 +3057,12 @@
     readonly type: 'NotFungibleDataUsedToMintFungibleCollectionToken' | 'FungibleItemsHaveNoId' | 'FungibleItemsDontHaveData' | 'FungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';
   }
 
-  /** @name PalletRefungibleItemData (385) */
+  /** @name PalletRefungibleItemData (387) */
   export interface PalletRefungibleItemData extends Struct {
     readonly constData: Bytes;
   }
 
-  /** @name PalletRefungibleError (389) */
+  /** @name PalletRefungibleError (391) */
   export interface PalletRefungibleError extends Enum {
     readonly isNotRefungibleDataUsedToMintFungibleCollectionToken: boolean;
     readonly isWrongRefungiblePieces: boolean;
@@ -3070,12 +3071,12 @@
     readonly type: 'NotRefungibleDataUsedToMintFungibleCollectionToken' | 'WrongRefungiblePieces' | 'RefungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';
   }
 
-  /** @name PalletNonfungibleItemData (390) */
+  /** @name PalletNonfungibleItemData (392) */
   export interface PalletNonfungibleItemData extends Struct {
     readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
   }
 
-  /** @name PalletNonfungibleError (392) */
+  /** @name PalletNonfungibleError (394) */
   export interface PalletNonfungibleError extends Enum {
     readonly isNotNonfungibleDataUsedToMintFungibleCollectionToken: boolean;
     readonly isNonfungibleItemsHaveNoAmount: boolean;
@@ -3083,15 +3084,16 @@
     readonly type: 'NotNonfungibleDataUsedToMintFungibleCollectionToken' | 'NonfungibleItemsHaveNoAmount' | 'CantBurnNftWithChildren';
   }
 
-  /** @name PalletStructureError (393) */
+  /** @name PalletStructureError (395) */
   export interface PalletStructureError extends Enum {
     readonly isOuroborosDetected: boolean;
     readonly isDepthLimit: boolean;
+    readonly isBreadthLimit: boolean;
     readonly isTokenNotFound: boolean;
-    readonly type: 'OuroborosDetected' | 'DepthLimit' | 'TokenNotFound';
+    readonly type: 'OuroborosDetected' | 'DepthLimit' | 'BreadthLimit' | 'TokenNotFound';
   }
 
-  /** @name PalletRmrkCoreError (394) */
+  /** @name PalletRmrkCoreError (396) */
   export interface PalletRmrkCoreError extends Enum {
     readonly isCorruptedCollectionType: boolean;
     readonly isNftTypeEncodeError: boolean;
@@ -3112,7 +3114,7 @@
     readonly type: 'CorruptedCollectionType' | 'NftTypeEncodeError' | 'RmrkPropertyKeyIsTooLong' | 'RmrkPropertyValueIsTooLong' | 'CollectionNotEmpty' | 'NoAvailableCollectionId' | 'NoAvailableNftId' | 'CollectionUnknown' | 'NoPermission' | 'NonTransferable' | 'CollectionFullOrLocked' | 'ResourceDoesntExist' | 'CannotSendToDescendentOrSelf' | 'CannotAcceptNonOwnedNft' | 'CannotRejectNonOwnedNft' | 'ResourceNotPending';
   }
 
-  /** @name PalletRmrkEquipError (396) */
+  /** @name PalletRmrkEquipError (398) */
   export interface PalletRmrkEquipError extends Enum {
     readonly isPermissionError: boolean;
     readonly isNoAvailableBaseId: boolean;
@@ -3122,7 +3124,7 @@
     readonly type: 'PermissionError' | 'NoAvailableBaseId' | 'NoAvailablePartId' | 'BaseDoesntExist' | 'NeedsDefaultThemeFirst';
   }
 
-  /** @name PalletEvmError (399) */
+  /** @name PalletEvmError (401) */
   export interface PalletEvmError extends Enum {
     readonly isBalanceLow: boolean;
     readonly isFeeOverflow: boolean;
@@ -3133,7 +3135,7 @@
     readonly type: 'BalanceLow' | 'FeeOverflow' | 'PaymentOverflow' | 'WithdrawFailed' | 'GasPriceTooLow' | 'InvalidNonce';
   }
 
-  /** @name FpRpcTransactionStatus (402) */
+  /** @name FpRpcTransactionStatus (404) */
   export interface FpRpcTransactionStatus extends Struct {
     readonly transactionHash: H256;
     readonly transactionIndex: u32;
@@ -3144,10 +3146,10 @@
     readonly logsBloom: EthbloomBloom;
   }
 
-  /** @name EthbloomBloom (404) */
+  /** @name EthbloomBloom (406) */
   export interface EthbloomBloom extends U8aFixed {}
 
-  /** @name EthereumReceiptReceiptV3 (406) */
+  /** @name EthereumReceiptReceiptV3 (408) */
   export interface EthereumReceiptReceiptV3 extends Enum {
     readonly isLegacy: boolean;
     readonly asLegacy: EthereumReceiptEip658ReceiptData;
@@ -3158,7 +3160,7 @@
     readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';
   }
 
-  /** @name EthereumReceiptEip658ReceiptData (407) */
+  /** @name EthereumReceiptEip658ReceiptData (409) */
   export interface EthereumReceiptEip658ReceiptData extends Struct {
     readonly statusCode: u8;
     readonly usedGas: U256;
@@ -3166,14 +3168,14 @@
     readonly logs: Vec<EthereumLog>;
   }
 
-  /** @name EthereumBlock (408) */
+  /** @name EthereumBlock (410) */
   export interface EthereumBlock extends Struct {
     readonly header: EthereumHeader;
     readonly transactions: Vec<EthereumTransactionTransactionV2>;
     readonly ommers: Vec<EthereumHeader>;
   }
 
-  /** @name EthereumHeader (409) */
+  /** @name EthereumHeader (411) */
   export interface EthereumHeader extends Struct {
     readonly parentHash: H256;
     readonly ommersHash: H256;
@@ -3192,24 +3194,24 @@
     readonly nonce: EthereumTypesHashH64;
   }
 
-  /** @name EthereumTypesHashH64 (410) */
+  /** @name EthereumTypesHashH64 (412) */
   export interface EthereumTypesHashH64 extends U8aFixed {}
 
-  /** @name PalletEthereumError (415) */
+  /** @name PalletEthereumError (417) */
   export interface PalletEthereumError extends Enum {
     readonly isInvalidSignature: boolean;
     readonly isPreLogExists: boolean;
     readonly type: 'InvalidSignature' | 'PreLogExists';
   }
 
-  /** @name PalletEvmCoderSubstrateError (416) */
+  /** @name PalletEvmCoderSubstrateError (418) */
   export interface PalletEvmCoderSubstrateError extends Enum {
     readonly isOutOfGas: boolean;
     readonly isOutOfFund: boolean;
     readonly type: 'OutOfGas' | 'OutOfFund';
   }
 
-  /** @name PalletEvmContractHelpersSponsoringModeT (417) */
+  /** @name PalletEvmContractHelpersSponsoringModeT (419) */
   export interface PalletEvmContractHelpersSponsoringModeT extends Enum {
     readonly isDisabled: boolean;
     readonly isAllowlisted: boolean;
@@ -3217,20 +3219,20 @@
     readonly type: 'Disabled' | 'Allowlisted' | 'Generous';
   }
 
-  /** @name PalletEvmContractHelpersError (419) */
+  /** @name PalletEvmContractHelpersError (421) */
   export interface PalletEvmContractHelpersError extends Enum {
     readonly isNoPermission: boolean;
     readonly type: 'NoPermission';
   }
 
-  /** @name PalletEvmMigrationError (420) */
+  /** @name PalletEvmMigrationError (422) */
   export interface PalletEvmMigrationError extends Enum {
     readonly isAccountNotEmpty: boolean;
     readonly isAccountIsNotMigrating: boolean;
     readonly type: 'AccountNotEmpty' | 'AccountIsNotMigrating';
   }
 
-  /** @name SpRuntimeMultiSignature (422) */
+  /** @name SpRuntimeMultiSignature (424) */
   export interface SpRuntimeMultiSignature extends Enum {
     readonly isEd25519: boolean;
     readonly asEd25519: SpCoreEd25519Signature;
@@ -3241,34 +3243,34 @@
     readonly type: 'Ed25519' | 'Sr25519' | 'Ecdsa';
   }
 
-  /** @name SpCoreEd25519Signature (423) */
+  /** @name SpCoreEd25519Signature (425) */
   export interface SpCoreEd25519Signature extends U8aFixed {}
 
-  /** @name SpCoreSr25519Signature (425) */
+  /** @name SpCoreSr25519Signature (427) */
   export interface SpCoreSr25519Signature extends U8aFixed {}
 
-  /** @name SpCoreEcdsaSignature (426) */
+  /** @name SpCoreEcdsaSignature (428) */
   export interface SpCoreEcdsaSignature extends U8aFixed {}
 
-  /** @name FrameSystemExtensionsCheckSpecVersion (429) */
+  /** @name FrameSystemExtensionsCheckSpecVersion (431) */
   export type FrameSystemExtensionsCheckSpecVersion = Null;
 
-  /** @name FrameSystemExtensionsCheckGenesis (430) */
+  /** @name FrameSystemExtensionsCheckGenesis (432) */
   export type FrameSystemExtensionsCheckGenesis = Null;
 
-  /** @name FrameSystemExtensionsCheckNonce (433) */
+  /** @name FrameSystemExtensionsCheckNonce (435) */
   export interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}
 
-  /** @name FrameSystemExtensionsCheckWeight (434) */
+  /** @name FrameSystemExtensionsCheckWeight (436) */
   export type FrameSystemExtensionsCheckWeight = Null;
 
-  /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (435) */
+  /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (437) */
   export interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact<u128> {}
 
-  /** @name OpalRuntimeRuntime (436) */
+  /** @name OpalRuntimeRuntime (438) */
   export type OpalRuntimeRuntime = Null;
 
-  /** @name PalletEthereumFakeTransactionFinalizer (437) */
+  /** @name PalletEthereumFakeTransactionFinalizer (439) */
   export type PalletEthereumFakeTransactionFinalizer = Null;
 
 } // declare module
modifiedtests/src/nesting/nest.test.tsdiffbeforeafterboth
--- a/tests/src/nesting/nest.test.ts
+++ b/tests/src/nesting/nest.test.ts
@@ -32,7 +32,7 @@
   it('Performs the full suite: bundles a token, transfers, and unnests', async () => {
     await usingApi(async api => {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {tokenOwner: true}});
       const targetToken = await createItemExpectSuccess(alice, collection, 'NFT');
 
       // Create a nested token
@@ -62,7 +62,7 @@
   it('Transfers an already bundled token', async () => {
     await usingApi(async api => {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {tokenOwner: true}});
 
       const tokenA = await createItemExpectSuccess(alice, collection, 'NFT');
       const tokenB = await createItemExpectSuccess(alice, collection, 'NFT');
@@ -92,7 +92,7 @@
   it('Checks token children', async () => {
     await usingApi(async api => {
       const collectionA = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collectionA, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collectionA, {nesting: {tokenOwner: true}});
       const collectionB = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
 
       const targetToken = await createItemExpectSuccess(alice, collectionA, 'NFT');
@@ -151,7 +151,7 @@
   it('NFT: allows an Owner to nest/unnest their token', async () => {
     await usingApi(async api => {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {tokenOwner: true}});
       const targetToken = await createItemExpectSuccess(alice, collection, 'NFT');
 
       // Create a nested token
@@ -170,7 +170,7 @@
   it('NFT: allows an Owner to nest/unnest their token (Restricted nesting)', async () => {
     await usingApi(async api => {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {OwnerRestricted:[collection]}});
+      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {tokenOwner: true, restricted:[collection]}});
       const targetToken = await createItemExpectSuccess(alice, collection, 'NFT');
 
       // Create a nested token
@@ -191,7 +191,7 @@
   it('Fungible: allows an Owner to nest/unnest their token', async () => {
     await usingApi(async api => {
       const collectionNFT = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {tokenOwner: true}});
       const targetToken = await createItemExpectSuccess(alice, collectionNFT, 'NFT', {Substrate: alice.address});
       const targetAddress = {Ethereum: tokenIdToAddress(collectionNFT, targetToken)};
 
@@ -218,7 +218,7 @@
 
       const collectionFT = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
 
-      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {OwnerRestricted: [collectionFT]}});
+      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {tokenOwner: true, restricted: [collectionFT]}});
 
       // Create a nested token
       await expect(executeTransaction(api, alice, api.tx.unique.createItem(
@@ -238,7 +238,7 @@
   it('ReFungible: allows an Owner to nest/unnest their token', async () => {
     await usingApi(async api => {
       const collectionNFT = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {tokenOwner: true}});
       const targetToken = await createItemExpectSuccess(alice, collectionNFT, 'NFT', {Substrate: alice.address});
       const targetAddress = {Ethereum: tokenIdToAddress(collectionNFT, targetToken)};
 
@@ -265,7 +265,7 @@
 
       const collectionRFT = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
 
-      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {OwnerRestricted:[collectionRFT]}});
+      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {tokenOwner: true, restricted:[collectionRFT]}});
 
       // Create a nested token
       await expect(executeTransaction(api, alice, api.tx.unique.createItem(
@@ -292,7 +292,7 @@
   it('Disallows excessive token nesting', async () => {
     await usingApi(async api => {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {tokenOwner: true}});
       const targetToken = await createItemExpectSuccess(alice, collection, 'NFT');
 
       const maxNestingLevel = 5;
@@ -326,7 +326,7 @@
   it('NFT: disallows to nest token if nesting is disabled', async () => {
     await usingApi(async api => {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: 'Disabled'});
+      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {}});
       const targetToken = await createItemExpectSuccess(alice, collection, 'NFT');
 
       // Try to create a nested token
@@ -334,12 +334,12 @@
         collection,
         {Ethereum: tokenIdToAddress(collection, targetToken)},
           {nft: {const_data: [], variable_data: []}} as any,
-      )), 'while creating nested token').to.be.rejectedWith(/^common\.NestingIsDisabled$/);
+      )), 'while creating nested token').to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);
 
       // Create a token to be nested
       const newToken = await createItemExpectSuccess(alice, collection, 'NFT');
       // Try to nest
-      await expect(executeTransaction(api, alice, api.tx.unique.transfer({Ethereum: tokenIdToAddress(collection, targetToken)}, collection, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.NestingIsDisabled/);
+      await expect(executeTransaction(api, alice, api.tx.unique.transfer({Ethereum: tokenIdToAddress(collection, targetToken)}, collection, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
       expect(await getTopmostTokenOwner(api, collection, newToken)).to.be.deep.equal({Substrate: alice.address});
       expect(await getTokenOwner(api, collection, newToken)).to.be.deep.equal({Substrate: alice.address});
     });
@@ -348,7 +348,7 @@
   it('NFT: disallows a non-Owner to nest someone else\'s token', async () => {
     await usingApi(async api => {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {tokenOwner: true}});
 
       await addToAllowListExpectSuccess(alice, collection, bob.address);
       await enableAllowListExpectSuccess(alice, collection);
@@ -362,7 +362,7 @@
         collection,
         {Ethereum: tokenIdToAddress(collection, targetToken)},
           {nft: {const_data: [], variable_data: []}} as any,
-      )), 'while creating nested token').to.be.rejectedWith(/common\.OnlyOwnerAllowedToNest/);
+      )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
 
       // Try to create and nest a token in the wrong collection
       const newToken = await createItemExpectSuccess(alice, collection, 'NFT');
@@ -374,7 +374,7 @@
   it('NFT: disallows a non-Owner to nest someone else\'s token (Restricted nesting)', async () => {
     await usingApi(async api => {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {OwnerRestricted:[collection]}});
+      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {tokenOwner: true, restricted:[collection]}});
 
       await addToAllowListExpectSuccess(alice, collection, bob.address);
       await enableAllowListExpectSuccess(alice, collection);
@@ -388,7 +388,7 @@
         collection,
         {Ethereum: tokenIdToAddress(collection, targetToken)},
           {nft: {const_data: [], variable_data: []}} as any,
-      )), 'while creating nested token').to.be.rejectedWith(/common\.OnlyOwnerAllowedToNest/);
+      )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
 
       // Try to create and nest a token in the wrong collection
       const newToken = await createItemExpectSuccess(alice, collection, 'NFT');
@@ -400,7 +400,7 @@
   it('NFT: disallows to nest token in an unlisted collection', async () => {
     await usingApi(async api => {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {OwnerRestricted:[]}});
+      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {tokenOwner: true, restricted:[]}});
 
       // Create a token to attempt to be nested into
       const targetToken = await createItemExpectSuccess(alice, collection, 'NFT');
@@ -424,7 +424,7 @@
   it('Fungible: disallows to nest token if nesting is disabled', async () => {
     await usingApi(async api => {
       const collectionNFT = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: 'Disabled'});
+      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {}});
       const targetToken = await createItemExpectSuccess(alice, collectionNFT, 'NFT');
       const targetAddress = {Ethereum: tokenIdToAddress(collectionNFT, targetToken)};
 
@@ -435,12 +435,12 @@
         collectionFT,
         targetAddress,
         {Fungible: {Value: 10}},
-      )), 'while creating nested token').to.be.rejectedWith(/^common\.NestingIsDisabled$/);
+      )), 'while creating nested token').to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);
 
       // Create a token to be nested
       const newToken = await createItemExpectSuccess(alice, collectionFT, 'Fungible');
       // Try to nest
-      await expect(executeTransaction(api, alice, api.tx.unique.transfer(targetAddress, collectionFT, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.NestingIsDisabled/);
+      await expect(executeTransaction(api, alice, api.tx.unique.transfer(targetAddress, collectionFT, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
 
       // Create another token to be nested
       const newToken2 = await createItemExpectSuccess(alice, collectionFT, 'Fungible');
@@ -452,7 +452,7 @@
   it('Fungible: disallows a non-Owner to nest someone else\'s token', async () => {
     await usingApi(async api => {
       const collectionNFT = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {tokenOwner: true}});
 
       await addToAllowListExpectSuccess(alice, collectionNFT, bob.address);
       await enableAllowListExpectSuccess(alice, collectionNFT);
@@ -469,11 +469,11 @@
         collectionFT,
         targetAddress,
         {Fungible: {Value: 10}},
-      )), 'while creating nested token').to.be.rejectedWith(/common\.OnlyOwnerAllowedToNest/);
+      )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
 
       // Try to create and nest a token in the wrong collection
       const newToken = await createItemExpectSuccess(alice, collectionFT, 'Fungible');
-      await expect(executeTransaction(api, alice, api.tx.unique.transfer(targetAddress, collectionFT, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.OnlyOwnerAllowedToNest/);
+      await expect(executeTransaction(api, alice, api.tx.unique.transfer(targetAddress, collectionFT, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
     });
   });
 
@@ -489,25 +489,25 @@
       const targetAddress = {Ethereum: tokenIdToAddress(collectionNFT, targetToken)};
 
       const collectionFT = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
-      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {OwnerRestricted:[collectionFT]}});
+      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {tokenOwner: true, restricted:[collectionFT]}});
 
       // Try to create a nested token in the wrong collection
       await expect(executeTransaction(api, alice, api.tx.unique.createItem(
         collectionFT,
         targetAddress,
         {Fungible: {Value: 10}},
-      )), 'while creating nested token').to.be.rejectedWith(/common\.OnlyOwnerAllowedToNest/);
+      )), 'while creating nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
 
       // Try to create and nest a token in the wrong collection
       const newToken = await createItemExpectSuccess(alice, collectionFT, 'Fungible');
-      await expect(executeTransaction(api, alice, api.tx.unique.transfer(targetAddress, collectionFT, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.OnlyOwnerAllowedToNest/);
+      await expect(executeTransaction(api, alice, api.tx.unique.transfer(targetAddress, collectionFT, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
     });
   });
 
   it('Fungible: disallows to nest token in an unlisted collection', async () => {
     await usingApi(async api => {
       const collectionNFT = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {OwnerRestricted:[]}});
+      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {tokenOwner: true, restricted:[]}});
 
       // Create a token to attempt to be nested into
       const targetToken = await createItemExpectSuccess(alice, collectionNFT, 'NFT');
@@ -533,7 +533,7 @@
   it('ReFungible: disallows to nest token if nesting is disabled', async () => {
     await usingApi(async api => {
       const collectionNFT = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: 'Disabled'});
+      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {}});
       const targetToken = await createItemExpectSuccess(alice, collectionNFT, 'NFT');
       const targetAddress = {Ethereum: tokenIdToAddress(collectionNFT, targetToken)};
 
@@ -544,14 +544,14 @@
         collectionRFT,
         targetAddress,
         {ReFungible: {const_data: [], pieces: 100}},
-      )), 'while creating a nested token').to.be.rejectedWith(/^common\.NestingIsDisabled$/);
+      )), 'while creating a nested token').to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);
 
       // Create a token to be nested
       const newToken = await createItemExpectSuccess(alice, collectionRFT, 'ReFungible');
       // Try to nest
       await transferExpectFailure(collectionRFT, newToken, alice, targetAddress, 100);
       // Try to nest
-      await expect(executeTransaction(api, alice, api.tx.unique.transfer(targetAddress, collectionRFT, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.NestingIsDisabled/);
+      await expect(executeTransaction(api, alice, api.tx.unique.transfer(targetAddress, collectionRFT, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
 
       // Create another token to be nested
       const newToken2 = await createItemExpectSuccess(alice, collectionRFT, 'ReFungible');
@@ -563,7 +563,7 @@
   it('ReFungible: disallows a non-Owner to nest someone else\'s token', async () => {
     await usingApi(async api => {
       const collectionNFT = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {tokenOwner: true}});
 
       await addToAllowListExpectSuccess(alice, collectionNFT, bob.address);
       await enableAllowListExpectSuccess(alice, collectionNFT);
@@ -580,11 +580,11 @@
         collectionRFT,
         targetAddress,
         {ReFungible: {const_data: [], pieces: 100}},
-      )), 'while creating a nested token').to.be.rejectedWith(/common\.OnlyOwnerAllowedToNest/);
+      )), 'while creating a nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
 
       // Try to create and nest a token in the wrong collection
       const newToken = await createItemExpectSuccess(alice, collectionRFT, 'ReFungible');
-      await expect(executeTransaction(api, alice, api.tx.unique.transfer(targetAddress, collectionRFT, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.OnlyOwnerAllowedToNest/);
+      await expect(executeTransaction(api, alice, api.tx.unique.transfer(targetAddress, collectionRFT, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
     });
   });
 
@@ -600,25 +600,25 @@
       const targetAddress = {Ethereum: tokenIdToAddress(collectionNFT, targetToken)};
 
       const collectionRFT = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
-      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {OwnerRestricted:[collectionRFT]}});
+      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {tokenOwner: true, restricted:[collectionRFT]}});
 
       // Try to create a nested token in the wrong collection
       await expect(executeTransaction(api, alice, api.tx.unique.createItem(
         collectionRFT,
         targetAddress,
         {ReFungible: {const_data: [], pieces: 100}},
-      )), 'while creating a nested token').to.be.rejectedWith(/common\.OnlyOwnerAllowedToNest/);
+      )), 'while creating a nested token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
 
       // Try to create and nest a token in the wrong collection
       const newToken = await createItemExpectSuccess(alice, collectionRFT, 'ReFungible');
-      await expect(executeTransaction(api, alice, api.tx.unique.transfer(targetAddress, collectionRFT, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.OnlyOwnerAllowedToNest/);
+      await expect(executeTransaction(api, alice, api.tx.unique.transfer(targetAddress, collectionRFT, newToken, 1)), 'while nesting new token').to.be.rejectedWith(/common\.UserIsNotAllowedToNest/);
     });
   });
 
   it('ReFungible: disallows to nest token to an unlisted collection', async () => {
     await usingApi(async api => {
       const collectionNFT = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {OwnerRestricted:[]}});
+      await setCollectionPermissionsExpectSuccess(alice, collectionNFT, {nesting: {tokenOwner: true, restricted:[]}});
 
       // Create a token to attempt to be nested into
       const targetToken = await createItemExpectSuccess(alice, collectionNFT, 'NFT');
modifiedtests/src/nesting/rules-smoke.test.tsdiffbeforeafterboth
--- a/tests/src/nesting/rules-smoke.test.ts
+++ b/tests/src/nesting/rules-smoke.test.ts
@@ -14,7 +14,7 @@
       const events = await executeTransaction(api, alice, api.tx.unique.createCollectionEx({
         mode: 'NFT',
         permissions: {
-          nesting: {OwnerRestricted: []},
+          nesting: {tokenOwner: true, restricted: []},
         },
       }));
       const collection = getCreateCollectionResult(events).collectionId;
modifiedtests/src/nesting/unnest.test.tsdiffbeforeafterboth
--- a/tests/src/nesting/unnest.test.ts
+++ b/tests/src/nesting/unnest.test.ts
@@ -27,7 +27,7 @@
   it('NFT: allows the owner to successfully unnest a token', async () => {
     await usingApi(async api => {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {tokenOwner: true}});
       const targetToken = await createItemExpectSuccess(alice, collection, 'NFT');
       const targetAddress = {Ethereum: tokenIdToAddress(collection, targetToken)};
 
@@ -56,7 +56,7 @@
   it('Fungible: allows the owner to successfully unnest a token', async () => {
     await usingApi(async api => {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {tokenOwner: true}});
       const targetToken = await createItemExpectSuccess(alice, collection, 'NFT');
       const targetAddress = {Ethereum: tokenIdToAddress(collection, targetToken)};
 
@@ -83,7 +83,7 @@
   it('ReFungible: allows the owner to successfully unnest a token', async () => {
     await usingApi(async api => {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {tokenOwner: true}});
       const targetToken = await createItemExpectSuccess(alice, collection, 'NFT');
       const targetAddress = {Ethereum: tokenIdToAddress(collection, targetToken)};
 
@@ -118,7 +118,7 @@
   it('Disallows a non-owner to unnest/burn a token', async () => {
     await usingApi(async api => {
       const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: 'Owner'});
+      await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {tokenOwner: true}});
       const targetToken = await createItemExpectSuccess(alice, collection, 'NFT');
       const targetAddress = {Ethereum: tokenIdToAddress(collection, targetToken)};
 
@@ -148,7 +148,7 @@
   // Recursive nesting
   it('Prevents Ouroboros creation', async () => {
     const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-    await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: 'Owner'});
+    await setCollectionPermissionsExpectSuccess(alice, collection, {nesting: {tokenOwner: true}});
     const targetToken = await createItemExpectSuccess(alice, collection, 'NFT');
 
     // Create a nested token ouroboros
modifiedtests/src/util/helpers.tsdiffbeforeafterboth
--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -193,7 +193,7 @@
     if (method === 'ExtrinsicSuccess') {
       success = true;
     } else if ((expectSection == section) && (expectMethod == method)) {
-      successData = extractAction!(data);
+      successData = extractAction!(data as any);
     }
   });
 
@@ -547,7 +547,7 @@
   });
 }
 
-export const setCollectionPermissionsExpectSuccess = async (sender: IKeyringPair, collectionId: number, permissions: {mintMode?: boolean, access?: 'Normal' | 'AllowList', nesting?: 'Disabled' | 'Owner' | {OwnerRestricted: number[]}}) => {
+export const setCollectionPermissionsExpectSuccess = async (sender: IKeyringPair, collectionId: number, permissions: any) => {
   await usingApi(async(api) => {
     const tx = api.tx.unique.setCollectionPermissions(collectionId, permissions);
     const events = await submitTransactionAsync(sender, tx);
modifiedtests/yarn.lockdiffbeforeafterboth
--- a/tests/yarn.lock
+++ b/tests/yarn.lock
@@ -508,78 +508,78 @@
     "@nodelib/fs.scandir" "2.1.5"
     fastq "^1.6.0"
 
-"@polkadot/api-augment@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-8.7.2-11.tgz#7f174f830c181d82863eb41f48e24fd6bbde3065"
-  integrity sha512-yKsuxjez1ArwSEZJ+g8mausm38CgOtaWBG5ob5cmO9M2v45HBXy3Kmviqr8Dputtu23deT85p7m/8RFLlAnzSA==
+"@polkadot/api-augment@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-8.7.2-15.tgz#a141d3cd595a39e7e2965330268b5eb92bdd5849"
+  integrity sha512-QGXosX6p0RFYNhWepZCIaRiyCvHnVt5Pb6U7/77UxIszgGRHfHFDsYr4v5bGiaRTOj/E8moc2Ufi/+VgOiG9sw==
   dependencies:
     "@babel/runtime" "^7.18.3"
-    "@polkadot/api-base" "8.7.2-11"
-    "@polkadot/rpc-augment" "8.7.2-11"
-    "@polkadot/types" "8.7.2-11"
-    "@polkadot/types-augment" "8.7.2-11"
-    "@polkadot/types-codec" "8.7.2-11"
+    "@polkadot/api-base" "8.7.2-15"
+    "@polkadot/rpc-augment" "8.7.2-15"
+    "@polkadot/types" "8.7.2-15"
+    "@polkadot/types-augment" "8.7.2-15"
+    "@polkadot/types-codec" "8.7.2-15"
     "@polkadot/util" "^9.4.1"
 
-"@polkadot/api-base@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-8.7.2-11.tgz#7e297a0ca283a58bc9d8d11c1edb099bc61da9f1"
-  integrity sha512-WQE5uvb7W7AKSfy4ekW2i6mJJzZYLMS/eNPNXYpURW/cRPt9NhT9lNz2Ae2d7gaWgWil+jNLecXTHTUzxobRbA==
+"@polkadot/api-base@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-8.7.2-15.tgz#c909d3bf0fbfb3cc46ca7067199e36e72b959bdb"
+  integrity sha512-HXdtaqbpnfFbOazjI9CPSYM37S4mzhxUs8hLMKrWqpHL//at4tiMa5dRyev9VSKeE6gqeqCT9JTBvEAZ9eNR6Q==
   dependencies:
     "@babel/runtime" "^7.18.3"
-    "@polkadot/rpc-core" "8.7.2-11"
-    "@polkadot/types" "8.7.2-11"
+    "@polkadot/rpc-core" "8.7.2-15"
+    "@polkadot/types" "8.7.2-15"
     "@polkadot/util" "^9.4.1"
     rxjs "^7.5.5"
 
-"@polkadot/api-contract@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-8.7.2-11.tgz#9487394286e536a7b1edfb6296529722fa63a43a"
-  integrity sha512-vOi4FX33ttkotJDzSum0nFUworWJ2+yfDejZkC33mM8zb+ne0Quggfz2nQqiKS2lgkj2z4YwJbsf/9paRQeS3w==
+"@polkadot/api-contract@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-8.7.2-15.tgz#687706fb4bd33c4a88187db3a269292f6e559892"
+  integrity sha512-Pr1Nm5zBpW9foCKm/Q6hIT5KHCeFVE8EFSfHBgjbitYpFOGnz19kduEpa0vxIcfq2WVXcVPTQ2eqjGtHoThNqA==
   dependencies:
     "@babel/runtime" "^7.18.3"
-    "@polkadot/api" "8.7.2-11"
-    "@polkadot/types" "8.7.2-11"
-    "@polkadot/types-codec" "8.7.2-11"
-    "@polkadot/types-create" "8.7.2-11"
+    "@polkadot/api" "8.7.2-15"
+    "@polkadot/types" "8.7.2-15"
+    "@polkadot/types-codec" "8.7.2-15"
+    "@polkadot/types-create" "8.7.2-15"
     "@polkadot/util" "^9.4.1"
     "@polkadot/util-crypto" "^9.4.1"
     rxjs "^7.5.5"
 
-"@polkadot/api-derive@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-8.7.2-11.tgz#21e315d554a8cd31bb1f3b10077960e35391a311"
-  integrity sha512-8fkYidDgNjJcWHtiRfJQaI4H386uGZh5Ie0t21KG4sSC5R+Lbnm0CJwIX4scJvQ/U+38gCyQW07b+Pxt9oDwvg==
+"@polkadot/api-derive@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-8.7.2-15.tgz#b29f24d435c036c9bf5624d18a9d93196cf2c4f4"
+  integrity sha512-0R3M9LFKoQ0d7elIDQjPKuV5EAHTtkU/72Lgxw2GYStsOqcnfFNomfLoLMuk8Xy4ETUAp/Kq1eMJpvsY6hSTtA==
   dependencies:
     "@babel/runtime" "^7.18.3"
-    "@polkadot/api" "8.7.2-11"
-    "@polkadot/api-augment" "8.7.2-11"
-    "@polkadot/api-base" "8.7.2-11"
-    "@polkadot/rpc-core" "8.7.2-11"
-    "@polkadot/types" "8.7.2-11"
-    "@polkadot/types-codec" "8.7.2-11"
+    "@polkadot/api" "8.7.2-15"
+    "@polkadot/api-augment" "8.7.2-15"
+    "@polkadot/api-base" "8.7.2-15"
+    "@polkadot/rpc-core" "8.7.2-15"
+    "@polkadot/types" "8.7.2-15"
+    "@polkadot/types-codec" "8.7.2-15"
     "@polkadot/util" "^9.4.1"
     "@polkadot/util-crypto" "^9.4.1"
     rxjs "^7.5.5"
 
-"@polkadot/api@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-8.7.2-11.tgz#d76ad24f96fc9eba49825c11277105d12bf5e05c"
-  integrity sha512-eFQtZOJOVK5IbNSjvrk1JrOZJrtZRjaecMAhnQiglMPoIfQJiRbnXhUslGbXsgFoJsfWW6DAVY5aJi/PjuF9OQ==
+"@polkadot/api@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-8.7.2-15.tgz#c7ede416e4d277c227fc93fdfdc4d27634935d08"
+  integrity sha512-tzEUWsXIPzPbnpn/3LTGtJ7SXzMgCJ/da5d9q0UH3vsx1gDEjuZEWXOeSYLHgbqQSgwPukvMVuGtRjcC+A/WZQ==
   dependencies:
     "@babel/runtime" "^7.18.3"
-    "@polkadot/api-augment" "8.7.2-11"
-    "@polkadot/api-base" "8.7.2-11"
-    "@polkadot/api-derive" "8.7.2-11"
+    "@polkadot/api-augment" "8.7.2-15"
+    "@polkadot/api-base" "8.7.2-15"
+    "@polkadot/api-derive" "8.7.2-15"
     "@polkadot/keyring" "^9.4.1"
-    "@polkadot/rpc-augment" "8.7.2-11"
-    "@polkadot/rpc-core" "8.7.2-11"
-    "@polkadot/rpc-provider" "8.7.2-11"
-    "@polkadot/types" "8.7.2-11"
-    "@polkadot/types-augment" "8.7.2-11"
-    "@polkadot/types-codec" "8.7.2-11"
-    "@polkadot/types-create" "8.7.2-11"
-    "@polkadot/types-known" "8.7.2-11"
+    "@polkadot/rpc-augment" "8.7.2-15"
+    "@polkadot/rpc-core" "8.7.2-15"
+    "@polkadot/rpc-provider" "8.7.2-15"
+    "@polkadot/types" "8.7.2-15"
+    "@polkadot/types-augment" "8.7.2-15"
+    "@polkadot/types-codec" "8.7.2-15"
+    "@polkadot/types-create" "8.7.2-15"
+    "@polkadot/types-known" "8.7.2-15"
     "@polkadot/util" "^9.4.1"
     "@polkadot/util-crypto" "^9.4.1"
     eventemitter3 "^4.0.7"
@@ -603,38 +603,38 @@
     "@polkadot/util" "9.4.1"
     "@substrate/ss58-registry" "^1.22.0"
 
-"@polkadot/rpc-augment@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-8.7.2-11.tgz#b118303653fb6f80688c62600fde2ed489e1c974"
-  integrity sha512-/h50Kzz/UZwhsV+g7bwGWf0fkVvlWIQ/zaA7H9xtuE4VGvmZRE4Uu06011ToVWNyAwM5xQfXBx1gUznRhem+pg==
+"@polkadot/rpc-augment@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-8.7.2-15.tgz#6175126968dfb79ba5549b03cac8c3860666e72b"
+  integrity sha512-IgfkR9CHT8jDuGYkb75DBFu+yJNW32+vOt3oS0sf57VqkHketSq9rD3mtZD37V/21Q4a17yrqKQOte7mMl9kcg==
   dependencies:
     "@babel/runtime" "^7.18.3"
-    "@polkadot/rpc-core" "8.7.2-11"
-    "@polkadot/types" "8.7.2-11"
-    "@polkadot/types-codec" "8.7.2-11"
+    "@polkadot/rpc-core" "8.7.2-15"
+    "@polkadot/types" "8.7.2-15"
+    "@polkadot/types-codec" "8.7.2-15"
     "@polkadot/util" "^9.4.1"
 
-"@polkadot/rpc-core@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-8.7.2-11.tgz#9c31a34bc2f70e4dab40f9ba08ca9b89c8f3e5c0"
-  integrity sha512-DyHYgzBusMFfsDJ/2VBaVTNHRwZ2cf/woaeJA/ijJbxK2Ke/sg9UW6zr+3Ip8T62GnSNnJoSHMOaMdqvebkNVQ==
+"@polkadot/rpc-core@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-8.7.2-15.tgz#827a31adf833fb866cb5f39dbd86c5f0b44d63a4"
+  integrity sha512-yGmpESOmGyzY7+D3yUxbKToz/eP/q8vDyOGajLnHn12TcnjgbAfMdc4xdU6cQex+mSsPwS0YQFuPrPXGloCOHA==
   dependencies:
     "@babel/runtime" "^7.18.3"
-    "@polkadot/rpc-augment" "8.7.2-11"
-    "@polkadot/rpc-provider" "8.7.2-11"
-    "@polkadot/types" "8.7.2-11"
+    "@polkadot/rpc-augment" "8.7.2-15"
+    "@polkadot/rpc-provider" "8.7.2-15"
+    "@polkadot/types" "8.7.2-15"
     "@polkadot/util" "^9.4.1"
     rxjs "^7.5.5"
 
-"@polkadot/rpc-provider@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-8.7.2-11.tgz#1f4ef542aee83e0c4e1b2a126ed00ade7c818660"
-  integrity sha512-LE5kKEMxL4mZ+dLbU8lOPG2GuPYliYtX1SnXv509zAgUjSCWW9fkdeMBF3tFCjSJJcUmle3mlxG8kYuAqNUScA==
+"@polkadot/rpc-provider@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-8.7.2-15.tgz#99dd30085284442265225e0f12aef3849b7bfe44"
+  integrity sha512-EwgBnUIpGhEfSanDXVviQQ784HYD3DWUPdv9pIvn9qnCZPk7o+MGPvKW73A+XbQpPV9j8tAGnVsSnbDuoSVp1g==
   dependencies:
     "@babel/runtime" "^7.18.3"
     "@polkadot/keyring" "^9.4.1"
-    "@polkadot/types" "8.7.2-11"
-    "@polkadot/types-support" "8.7.2-11"
+    "@polkadot/types" "8.7.2-15"
+    "@polkadot/types-support" "8.7.2-15"
     "@polkadot/util" "^9.4.1"
     "@polkadot/util-crypto" "^9.4.1"
     "@polkadot/x-fetch" "^9.4.1"
@@ -652,86 +652,86 @@
   dependencies:
     "@types/chrome" "^0.0.171"
 
-"@polkadot/typegen@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/typegen/-/typegen-8.7.2-11.tgz#047c3c91f4b34f0188853bed606fd12f6a0fbf4d"
-  integrity sha512-YZpyT8LJFm3akFurrxHpRWxZU50yKvrfdgyZpJh+JJOhSIIDtkx58JNj2+lv0QvhUFOUkd4IWap9bbCPmeLf6w==
+"@polkadot/typegen@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/typegen/-/typegen-8.7.2-15.tgz#06e9d054db1c63d9862186429a8017b2b80bce2a"
+  integrity sha512-NC8Ticirh20k1Co17D8cqQawIJ8W9HWDuq6oDyEMT4XkeBbZ1hQRO9JBO14neWDJmYJBhlUotP65jgjs8D5bMw==
   dependencies:
     "@babel/core" "^7.18.2"
     "@babel/register" "^7.17.7"
     "@babel/runtime" "^7.18.3"
-    "@polkadot/api" "8.7.2-11"
-    "@polkadot/api-augment" "8.7.2-11"
-    "@polkadot/rpc-augment" "8.7.2-11"
-    "@polkadot/rpc-provider" "8.7.2-11"
-    "@polkadot/types" "8.7.2-11"
-    "@polkadot/types-augment" "8.7.2-11"
-    "@polkadot/types-codec" "8.7.2-11"
-    "@polkadot/types-create" "8.7.2-11"
-    "@polkadot/types-support" "8.7.2-11"
+    "@polkadot/api" "8.7.2-15"
+    "@polkadot/api-augment" "8.7.2-15"
+    "@polkadot/rpc-augment" "8.7.2-15"
+    "@polkadot/rpc-provider" "8.7.2-15"
+    "@polkadot/types" "8.7.2-15"
+    "@polkadot/types-augment" "8.7.2-15"
+    "@polkadot/types-codec" "8.7.2-15"
+    "@polkadot/types-create" "8.7.2-15"
+    "@polkadot/types-support" "8.7.2-15"
     "@polkadot/util" "^9.4.1"
     "@polkadot/x-ws" "^9.4.1"
     handlebars "^4.7.7"
     websocket "^1.0.34"
     yargs "^17.5.1"
 
-"@polkadot/types-augment@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-8.7.2-11.tgz#c63105c76f8d85f7e642f8e81e16c3ffc3b3e7c4"
-  integrity sha512-1meIbpS0Synfdz+Jo90jc/utxwbwl9XQiH5WoFCUYLlbtE/H/yQcIoeme5o6gr/q7BalFQMYYwGBfctGT/KGjA==
+"@polkadot/types-augment@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-8.7.2-15.tgz#7ab077a1a31190ad17183196efb1da065c0d0bcd"
+  integrity sha512-th1jVBDqpyQVB2gCNzo/HV0dIeNinjyPla01BFdhQ5mDKYXJ8fugsLCk5oKUPpItBrj+5NWCgynVvCwm0YJw3g==
   dependencies:
     "@babel/runtime" "^7.18.3"
-    "@polkadot/types" "8.7.2-11"
-    "@polkadot/types-codec" "8.7.2-11"
+    "@polkadot/types" "8.7.2-15"
+    "@polkadot/types-codec" "8.7.2-15"
     "@polkadot/util" "^9.4.1"
 
-"@polkadot/types-codec@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-8.7.2-11.tgz#a852d3493062ee1052f7a837d07cce4146f2c67e"
-  integrity sha512-ZvRBiVo5IwZ+vcbKIMv6l0kRG2bVpBmU+pCPdWV9zGtKpgumz1FTvxBmjXoNo6OJVX23fKNMF8qBD/DEiC9ZwA==
+"@polkadot/types-codec@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-8.7.2-15.tgz#6afa4ff45dc7afb9250f283f70a40be641367941"
+  integrity sha512-k8t7/Ern7sY4ZKQc5cYY3h1bg7/GAEaTPmKz094DhPJmEhi3NNgeJ4uyeB/JYCo5GbxXQG6W2M021s582urjMw==
   dependencies:
     "@babel/runtime" "^7.18.3"
     "@polkadot/util" "^9.4.1"
 
-"@polkadot/types-create@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-8.7.2-11.tgz#2489409155d55c941a322349d740e9f8f8325147"
-  integrity sha512-489UaZP7JKfZ2Fn0oDQ32setAiV7vv9Q3Kg4a+j4m2TGEEXAVeiNE4Uvijmsw3ayLTtzO9hL0WtMpFWa8GlIMg==
+"@polkadot/types-create@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-8.7.2-15.tgz#106a11eb71dc2743b140d8640a3b3e7fc5ccf10e"
+  integrity sha512-xB9jAJ3XQh/U05b+X77m5TPh4N9oBwwpePkAmLhovTSOSeobj7qeUKrZqccs0BSxJnJPlLwrwuusjeTtTfZCHw==
   dependencies:
     "@babel/runtime" "^7.18.3"
-    "@polkadot/types-codec" "8.7.2-11"
+    "@polkadot/types-codec" "8.7.2-15"
     "@polkadot/util" "^9.4.1"
 
-"@polkadot/types-known@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-8.7.2-11.tgz#89cb0cdea197ed3887b30948a560b0cd13b39c23"
-  integrity sha512-ulPQCmwJTJ/MGJGVJZfjWEGq28HGl7D4sOrigbfLOlo6/KyFl2p5H4GUFeF/s+/lGfUQsxfu4Q6QgXDZAOkB1A==
+"@polkadot/types-known@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-8.7.2-15.tgz#171b8d3963a5c38d46f98a7c14be59033f9a4da8"
+  integrity sha512-c5YuuauPCu70chDnV7Fphh7SbAQl8JWj+PoY37I5BACCNFxtUx5KnP93BChiD0QxcHs2QqD6RdjW6O7cVRUKfA==
   dependencies:
     "@babel/runtime" "^7.18.3"
     "@polkadot/networks" "^9.4.1"
-    "@polkadot/types" "8.7.2-11"
-    "@polkadot/types-codec" "8.7.2-11"
-    "@polkadot/types-create" "8.7.2-11"
+    "@polkadot/types" "8.7.2-15"
+    "@polkadot/types-codec" "8.7.2-15"
+    "@polkadot/types-create" "8.7.2-15"
     "@polkadot/util" "^9.4.1"
 
-"@polkadot/types-support@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-8.7.2-11.tgz#ed08331ba1faf7a803e35aafa0692eefd28baa90"
-  integrity sha512-oflUi0eahFMoS3Sxz6EKjZKNl7GMRnd91kClEV0FzR1wEha+3CL1BCXTGV3n8YoJtfztUUNInVHPQTvMW78WvQ==
+"@polkadot/types-support@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-8.7.2-15.tgz#2d726e3d5615383ca97db3f32ee21e2aad077fcb"
+  integrity sha512-Tl6xm9r/uqrKQK1OUdi5X9MaTgplBYPj3tY9677ZPV7QGYWt0Uz912u9fC2v0PGNReDXtzvrlgvk0aoErwzF5Q==
   dependencies:
     "@babel/runtime" "^7.18.3"
     "@polkadot/util" "^9.4.1"
 
-"@polkadot/types@8.7.2-11":
-  version "8.7.2-11"
-  resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-8.7.2-11.tgz#84b1dca2896fec4af23d4096fa810b59f44071ac"
-  integrity sha512-PSreCXr/csWpMVqtByEj7Pk5j+JEqxOiipsP+PdtOJaRnWtBMFpMqs7Fj2uULVYqFJKKPyp+JofnRDRcH1YDYg==
+"@polkadot/types@8.7.2-15":
+  version "8.7.2-15"
+  resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-8.7.2-15.tgz#5b25b6b76c916637a1d15133b5880a73079e65bc"
+  integrity sha512-KfJKzk6/Ta8vZVJH8+xYYPvd9SD+4fdl4coGgKuPGYZFsjDGnYvAX4ls6/WKby51JK5s24sqaUP3vZisIgh4wA==
   dependencies:
     "@babel/runtime" "^7.18.3"
     "@polkadot/keyring" "^9.4.1"
-    "@polkadot/types-augment" "8.7.2-11"
-    "@polkadot/types-codec" "8.7.2-11"
-    "@polkadot/types-create" "8.7.2-11"
+    "@polkadot/types-augment" "8.7.2-15"
+    "@polkadot/types-codec" "8.7.2-15"
+    "@polkadot/types-create" "8.7.2-15"
     "@polkadot/util" "^9.4.1"
     "@polkadot/util-crypto" "^9.4.1"
     rxjs "^7.5.5"