git.delta.rocks / unique-network / refs/commits / e4de689ce26b

difftreelog

feat impl dispatchable methods

Trubnikov Sergey2023-04-26parent: #82643c5.patch.diff
in: master

5 files changed

modifiedpallets/balances-adapter/src/common.rsdiffbeforeafterboth
--- a/pallets/balances-adapter/src/common.rs
+++ b/pallets/balances-adapter/src/common.rs
@@ -1,7 +1,12 @@
-use alloc::vec::Vec;
+use alloc::{vec, vec::Vec};
 use core::marker::PhantomData;
 use crate::{Config, NativeFungibleHandle};
-use pallet_common::{CommonCollectionOperations, CommonWeightInfo};
+use frame_support::{
+	traits::{Currency, ExistenceRequirement},
+	fail,
+};
+use pallet_common::{erc::CrossAccountId, CommonCollectionOperations, CommonWeightInfo, with_weight};
+use up_data_structs::TokenId;
 
 pub struct CommonWeights<T: Config>(PhantomData<T>);
 impl<T: Config> CommonWeightInfo<T::CrossAccountId> for CommonWeights<T> {
@@ -92,7 +97,7 @@
 		data: up_data_structs::CreateItemData,
 		nesting_budget: &dyn up_data_structs::budget::Budget,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn create_multiple_items(
@@ -102,7 +107,7 @@
 		data: Vec<up_data_structs::CreateItemData>,
 		nesting_budget: &dyn up_data_structs::budget::Budget,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn create_multiple_items_ex(
@@ -111,26 +116,26 @@
 		data: up_data_structs::CreateItemExData<<T>::CrossAccountId>,
 		nesting_budget: &dyn up_data_structs::budget::Budget,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn burn_item(
 		&self,
 		sender: <T>::CrossAccountId,
-		token: up_data_structs::TokenId,
+		token: TokenId,
 		amount: u128,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn burn_item_recursively(
 		&self,
 		sender: <T>::CrossAccountId,
-		token: up_data_structs::TokenId,
+		token: TokenId,
 		self_budget: &dyn up_data_structs::budget::Budget,
 		breadth_budget: &dyn up_data_structs::budget::Budget,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn set_collection_properties(
@@ -138,7 +143,7 @@
 		sender: <T>::CrossAccountId,
 		properties: Vec<up_data_structs::Property>,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn delete_collection_properties(
@@ -146,27 +151,27 @@
 		sender: &<T>::CrossAccountId,
 		property_keys: Vec<up_data_structs::PropertyKey>,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn set_token_properties(
 		&self,
 		sender: <T>::CrossAccountId,
-		token_id: up_data_structs::TokenId,
+		token_id: TokenId,
 		properties: Vec<up_data_structs::Property>,
 		budget: &dyn up_data_structs::budget::Budget,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn delete_token_properties(
 		&self,
 		sender: <T>::CrossAccountId,
-		token_id: up_data_structs::TokenId,
+		token_id: TokenId,
 		property_keys: Vec<up_data_structs::PropertyKey>,
 		budget: &dyn up_data_structs::budget::Budget,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn set_token_property_permissions(
@@ -174,28 +179,36 @@
 		sender: &<T>::CrossAccountId,
 		property_permissions: Vec<up_data_structs::PropertyKeyPermission>,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn transfer(
 		&self,
 		sender: <T>::CrossAccountId,
 		to: <T>::CrossAccountId,
-		token: up_data_structs::TokenId,
+		token: TokenId,
 		amount: u128,
 		budget: &dyn up_data_structs::budget::Budget,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		with_weight(
+			<T as Config>::Currency::transfer(
+				sender.as_sub(),
+				to.as_sub(),
+				amount.into(),
+				ExistenceRequirement::KeepAlive,
+			),
+			Default::default(),
+		)
 	}
 
 	fn approve(
 		&self,
 		sender: <T>::CrossAccountId,
 		spender: <T>::CrossAccountId,
-		token: up_data_structs::TokenId,
+		token: TokenId,
 		amount: u128,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn approve_from(
@@ -203,10 +216,10 @@
 		sender: <T>::CrossAccountId,
 		from: <T>::CrossAccountId,
 		to: <T>::CrossAccountId,
-		token: up_data_structs::TokenId,
+		token: TokenId,
 		amount: u128,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn transfer_from(
@@ -214,120 +227,129 @@
 		sender: <T>::CrossAccountId,
 		from: <T>::CrossAccountId,
 		to: <T>::CrossAccountId,
-		token: up_data_structs::TokenId,
+		token: TokenId,
 		amount: u128,
 		budget: &dyn up_data_structs::budget::Budget,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		with_weight(
+			<T as Config>::Currency::transfer(
+				sender.as_sub(),
+				to.as_sub(),
+				amount.into(),
+				ExistenceRequirement::KeepAlive,
+			),
+			Default::default(),
+		)
 	}
 
 	fn burn_from(
 		&self,
 		sender: <T>::CrossAccountId,
 		from: <T>::CrossAccountId,
-		token: up_data_structs::TokenId,
+		token: TokenId,
 		amount: u128,
 		budget: &dyn up_data_structs::budget::Budget,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn check_nesting(
 		&self,
 		sender: <T>::CrossAccountId,
-		from: (up_data_structs::CollectionId, up_data_structs::TokenId),
-		under: up_data_structs::TokenId,
+		from: (up_data_structs::CollectionId, TokenId),
+		under: TokenId,
 		budget: &dyn up_data_structs::budget::Budget,
 	) -> frame_support::sp_runtime::DispatchResult {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
-	fn nest(
-		&self,
-		under: up_data_structs::TokenId,
-		to_nest: (up_data_structs::CollectionId, up_data_structs::TokenId),
-	) {
-		todo!()
-	}
+	fn nest(&self, under: TokenId, to_nest: (up_data_structs::CollectionId, TokenId)) {}
 
-	fn unnest(
-		&self,
-		under: up_data_structs::TokenId,
-		to_nest: (up_data_structs::CollectionId, up_data_structs::TokenId),
-	) {
-		todo!()
-	}
+	fn unnest(&self, under: TokenId, to_nest: (up_data_structs::CollectionId, TokenId)) {}
 
-	fn account_tokens(&self, account: <T>::CrossAccountId) -> Vec<up_data_structs::TokenId> {
-		todo!()
+	fn account_tokens(&self, account: <T>::CrossAccountId) -> Vec<TokenId> {
+		let balance = <T as Config>::Currency::total_balance(account.as_sub());
+		if balance != 0 {
+			vec![TokenId::default()]
+		} else {
+			vec![]
+		}
 	}
 
-	fn collection_tokens(&self) -> Vec<up_data_structs::TokenId> {
-		todo!()
+	fn collection_tokens(&self) -> Vec<TokenId> {
+		vec![TokenId::default()]
 	}
 
-	fn token_exists(&self, token: up_data_structs::TokenId) -> bool {
-		todo!()
+	fn token_exists(&self, token: TokenId) -> bool {
+		token == TokenId::default()
 	}
 
-	fn last_token_id(&self) -> up_data_structs::TokenId {
-		todo!()
+	fn last_token_id(&self) -> TokenId {
+		TokenId::default()
 	}
 
 	fn token_owner(
 		&self,
-		token: up_data_structs::TokenId,
+		token: TokenId,
 	) -> Result<<T>::CrossAccountId, up_data_structs::TokenOwnerError> {
-		todo!()
+		Err(up_data_structs::TokenOwnerError::MultipleOwners)
 	}
 
-	fn token_owners(&self, token: up_data_structs::TokenId) -> Vec<<T>::CrossAccountId> {
-		todo!()
+	fn token_owners(&self, token: TokenId) -> Vec<<T>::CrossAccountId> {
+		vec![]
 	}
 
 	fn token_property(
 		&self,
-		token_id: up_data_structs::TokenId,
+		token_id: TokenId,
 		key: &up_data_structs::PropertyKey,
 	) -> Option<up_data_structs::PropertyValue> {
-		todo!()
+		None
 	}
 
 	fn token_properties(
 		&self,
-		token: up_data_structs::TokenId,
+		token: TokenId,
 		keys: Option<Vec<up_data_structs::PropertyKey>>,
 	) -> Vec<up_data_structs::Property> {
-		todo!()
+		vec![]
 	}
 
 	fn total_supply(&self) -> u32 {
-		todo!()
+		1
 	}
 
 	fn account_balance(&self, account: <T>::CrossAccountId) -> u32 {
-		todo!()
+		let balance: u128 = <T as Config>::Currency::free_balance(account.as_sub()).into();
+		(balance != 0).into()
 	}
 
-	fn balance(&self, account: <T>::CrossAccountId, token: up_data_structs::TokenId) -> u128 {
-		todo!()
+	fn balance(&self, account: <T>::CrossAccountId, token: TokenId) -> u128 {
+		if token != TokenId::default() {
+			return 0;
+		}
+		<T as Config>::Currency::free_balance(account.as_sub()).into()
 	}
 
-	fn total_pieces(&self, token: up_data_structs::TokenId) -> Option<u128> {
-		todo!()
+	fn total_pieces(&self, token: TokenId) -> Option<u128> {
+		if token != TokenId::default() {
+			return None;
+		}
+		let total = <T as Config>::Currency::total_issuance();
+		Some(total.into())
 	}
 
 	fn allowance(
 		&self,
 		sender: <T>::CrossAccountId,
 		spender: <T>::CrossAccountId,
-		token: up_data_structs::TokenId,
+		token: TokenId,
 	) -> u128 {
-		todo!()
+		0
 	}
 
 	fn refungible_extensions(&self) -> Option<&dyn pallet_common::RefungibleExtensions<T>> {
-		todo!()
+		None
 	}
 
 	fn set_allowance_for_all(
@@ -336,17 +358,17 @@
 		operator: <T>::CrossAccountId,
 		approve: bool,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 
 	fn allowance_for_all(&self, owner: <T>::CrossAccountId, operator: <T>::CrossAccountId) -> bool {
-		todo!()
+		false
 	}
 
 	fn repair_item(
 		&self,
-		token: up_data_structs::TokenId,
+		token: TokenId,
 	) -> frame_support::pallet_prelude::DispatchResultWithPostInfo {
-		todo!()
+		fail!(<pallet_common::Error<T>>::UnsupportedOperation);
 	}
 }
modifiedpallets/balances-adapter/src/lib.rsdiffbeforeafterboth
--- a/pallets/balances-adapter/src/lib.rs
+++ b/pallets/balances-adapter/src/lib.rs
@@ -44,7 +44,7 @@
 			Self::AccountId,
 			Balance = Self::CurrencyBalance,
 		>;
-		type CurrencyBalance: Into<U256> + TryFrom<U256>;
+		type CurrencyBalance: Into<U256> + TryFrom<U256> + PartialEq<u128> + From<u128> + Into<u128>;
 
 		type Decimals: Get<u8>;
 		type Name: Get<String>;
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -462,6 +462,7 @@
 	}
 
 	const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);
+	pub const NATIVE_FINGIBLE_COLLECTION_ID: CollectionId = CollectionId(0);
 
 	#[pallet::pallet]
 	#[pallet::storage_version(STORAGE_VERSION)]
modifiedpallets/unique/src/lib.rsdiffbeforeafterboth
440 collection_id: CollectionId,440 collection_id: CollectionId,
441 address: T::CrossAccountId,441 address: T::CrossAccountId,
442 ) -> DispatchResult {442 ) -> DispatchResult {
443 if collection_id == pallet_common::NATIVE_FINGIBLE_COLLECTION_ID {
444 fail!(<pallet_common::Error<T>>::UnsupportedOperation);
445 }
446
443 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);447 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
444 let collection = <CollectionHandle<T>>::try_get(collection_id)?;448 let collection = <CollectionHandle<T>>::try_get(collection_id)?;
467 collection_id: CollectionId,471 collection_id: CollectionId,
468 address: T::CrossAccountId,472 address: T::CrossAccountId,
469 ) -> DispatchResult {473 ) -> DispatchResult {
474 if collection_id == pallet_common::NATIVE_FINGIBLE_COLLECTION_ID {
475 fail!(<pallet_common::Error<T>>::UnsupportedOperation);
476 }
477
470 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);478 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
471 let collection = <CollectionHandle<T>>::try_get(collection_id)?;479 let collection = <CollectionHandle<T>>::try_get(collection_id)?;
493 collection_id: CollectionId,501 collection_id: CollectionId,
494 new_owner: T::AccountId,502 new_owner: T::AccountId,
495 ) -> DispatchResult {503 ) -> DispatchResult {
504 if collection_id == pallet_common::NATIVE_FINGIBLE_COLLECTION_ID {
505 fail!(<pallet_common::Error<T>>::UnsupportedOperation);
506 }
496 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);507 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
497 let new_owner = T::CrossAccountId::from_sub(new_owner);508 let new_owner = T::CrossAccountId::from_sub(new_owner);
498 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;509 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
522 collection_id: CollectionId,533 collection_id: CollectionId,
523 new_admin_id: T::CrossAccountId,534 new_admin_id: T::CrossAccountId,
524 ) -> DispatchResult {535 ) -> DispatchResult {
536 if collection_id == pallet_common::NATIVE_FINGIBLE_COLLECTION_ID {
537 fail!(<pallet_common::Error<T>>::UnsupportedOperation);
538 }
525 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);539 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
526 let collection = <CollectionHandle<T>>::try_get(collection_id)?;540 let collection = <CollectionHandle<T>>::try_get(collection_id)?;
527 <PalletCommon<T>>::toggle_admin(&collection, &sender, &new_admin_id, true)541 <PalletCommon<T>>::toggle_admin(&collection, &sender, &new_admin_id, true)
548 collection_id: CollectionId,562 collection_id: CollectionId,
549 account_id: T::CrossAccountId,563 account_id: T::CrossAccountId,
550 ) -> DispatchResult {564 ) -> DispatchResult {
565 if collection_id == pallet_common::NATIVE_FINGIBLE_COLLECTION_ID {
566 fail!(<pallet_common::Error<T>>::UnsupportedOperation);
567 }
551 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);568 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
552 let collection = <CollectionHandle<T>>::try_get(collection_id)?;569 let collection = <CollectionHandle<T>>::try_get(collection_id)?;
553 <PalletCommon<T>>::toggle_admin(&collection, &sender, &account_id, false)570 <PalletCommon<T>>::toggle_admin(&collection, &sender, &account_id, false)
573 collection_id: CollectionId,590 collection_id: CollectionId,
574 new_sponsor: T::AccountId,591 new_sponsor: T::AccountId,
575 ) -> DispatchResult {592 ) -> DispatchResult {
593 if collection_id == pallet_common::NATIVE_FINGIBLE_COLLECTION_ID {
594 fail!(<pallet_common::Error<T>>::UnsupportedOperation);
595 }
576 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);596 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
577 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;597 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
578 target_collection.set_sponsor(&sender, new_sponsor.clone())598 target_collection.set_sponsor(&sender, new_sponsor.clone())
597 origin: OriginFor<T>,617 origin: OriginFor<T>,
598 collection_id: CollectionId,618 collection_id: CollectionId,
599 ) -> DispatchResult {619 ) -> DispatchResult {
620 if collection_id == pallet_common::NATIVE_FINGIBLE_COLLECTION_ID {
621 fail!(<pallet_common::Error<T>>::UnsupportedOperation);
622 }
600 let sender = ensure_signed(origin)?;623 let sender = ensure_signed(origin)?;
601 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;624 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
602 target_collection.confirm_sponsorship(&sender)625 target_collection.confirm_sponsorship(&sender)
617 origin: OriginFor<T>,640 origin: OriginFor<T>,
618 collection_id: CollectionId,641 collection_id: CollectionId,
619 ) -> DispatchResult {642 ) -> DispatchResult {
643 if collection_id == pallet_common::NATIVE_FINGIBLE_COLLECTION_ID {
644 fail!(<pallet_common::Error<T>>::UnsupportedOperation);
645 }
620 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);646 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
621 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;647 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
622 target_collection.remove_sponsor(&sender)648 target_collection.remove_sponsor(&sender)
894 collection_id: CollectionId,920 collection_id: CollectionId,
895 value: bool,921 value: bool,
896 ) -> DispatchResult {922 ) -> DispatchResult {
923 if collection_id == pallet_common::NATIVE_FINGIBLE_COLLECTION_ID {
924 fail!(<pallet_common::Error<T>>::UnsupportedOperation);
925 }
897 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);926 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
898 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;927 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
899 target_collection.check_is_internal()?;928 target_collection.check_is_internal()?;
1146 collection_id: CollectionId,1175 collection_id: CollectionId,
1147 new_limit: CollectionLimits,1176 new_limit: CollectionLimits,
1148 ) -> DispatchResult {1177 ) -> DispatchResult {
1178 if collection_id == pallet_common::NATIVE_FINGIBLE_COLLECTION_ID {
1179 fail!(<pallet_common::Error<T>>::UnsupportedOperation);
1180 }
1149 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1181 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
1150 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;1182 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
1151 <PalletCommon<T>>::update_limits(&sender, &mut target_collection, new_limit)1183 <PalletCommon<T>>::update_limits(&sender, &mut target_collection, new_limit)
1170 collection_id: CollectionId,1202 collection_id: CollectionId,
1171 new_permission: CollectionPermissions,1203 new_permission: CollectionPermissions,
1172 ) -> DispatchResult {1204 ) -> DispatchResult {
1205 if collection_id == pallet_common::NATIVE_FINGIBLE_COLLECTION_ID {
1206 fail!(<pallet_common::Error<T>>::UnsupportedOperation);
1207 }
1173 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1208 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
1174 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;1209 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
1175 <PalletCommon<T>>::update_permissions(&sender, &mut target_collection, new_permission)1210 <PalletCommon<T>>::update_permissions(&sender, &mut target_collection, new_permission)
1238 origin: OriginFor<T>,1273 origin: OriginFor<T>,
1239 collection_id: CollectionId,1274 collection_id: CollectionId,
1240 ) -> DispatchResult {1275 ) -> DispatchResult {
1276 if collection_id == pallet_common::NATIVE_FINGIBLE_COLLECTION_ID {
1277 fail!(<pallet_common::Error<T>>::UnsupportedOperation);
1278 }
1241 ensure_root(origin)?;1279 ensure_root(origin)?;
1242 <PalletCommon<T>>::repair_collection(collection_id)1280 <PalletCommon<T>>::repair_collection(collection_id)
1243 }1281 }
modifiedruntime/common/dispatch.rsdiffbeforeafterboth
--- a/runtime/common/dispatch.rs
+++ b/runtime/common/dispatch.rs
@@ -14,7 +14,7 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
-use frame_support::{dispatch::DispatchResult, ensure};
+use frame_support::{dispatch::DispatchResult, ensure, fail};
 use pallet_evm::{PrecompileHandle, PrecompileResult};
 use sp_core::H160;
 use sp_runtime::DispatchError;
@@ -100,6 +100,10 @@
 	}
 
 	fn destroy(sender: T::CrossAccountId, collection_id: CollectionId) -> DispatchResult {
+		if collection_id == pallet_common::NATIVE_FINGIBLE_COLLECTION_ID {
+			fail!(<pallet_common::Error<T>>::UnsupportedOperation);
+		}
+
 		let collection = <CollectionHandle<T>>::try_get(collection_id)?;
 		collection.check_is_internal()?;