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

difftreelog

Add extrinsic: delete collection property

Daniel Shiposha2022-05-04parent: #aa3d2ae.patch.diff
in: master

10 files changed

modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -292,6 +292,8 @@
 
 		CollectionPropertySet(CollectionId, Property),
 
+		CollectionPropertyDeleted(CollectionId, PropertyKey),
+
 		TokenPropertySet(CollectionId, TokenId, Property),
 
 		TokenPropertyDeleted(CollectionId, TokenId, PropertyKey),
@@ -761,6 +763,34 @@
 		Ok(())
 	}
 
+	pub fn delete_collection_property(
+		collection: &CollectionHandle<T>,
+		sender: &T::CrossAccountId,
+		property_key: PropertyKey,
+	) -> DispatchResult {
+		collection.check_is_owner_or_admin(sender)?;
+
+		CollectionProperties::<T>::mutate(collection.id, |properties| {
+			properties.remove_property(&property_key);
+		});
+
+		Self::deposit_event(Event::CollectionPropertyDeleted(collection.id, property_key));
+
+		Ok(())
+	}
+
+	pub fn delete_collection_properties(
+		collection: &CollectionHandle<T>,
+		sender: &T::CrossAccountId,
+		property_keys: Vec<PropertyKey>,
+	) -> DispatchResult {
+		for key in property_keys {
+			Self::delete_collection_property(collection, sender, key)?;
+		}
+
+		Ok(())
+	}
+
 	pub fn set_property_permission(
 		collection: &CollectionHandle<T>,
 		sender: &T::CrossAccountId,
@@ -956,6 +986,7 @@
 	fn create_multiple_items_ex(cost: &CreateItemExData<CrossAccountId>) -> Weight;
 	fn burn_item() -> Weight;
 	fn set_collection_properties(amount: u32) -> Weight;
+	fn delete_collection_properties(amount: u32) -> Weight;
 	fn set_token_properties(amount: u32) -> Weight;
 	fn delete_token_properties(amount: u32) -> Weight;
 	fn set_property_permissions(amount: u32) -> Weight;
@@ -998,6 +1029,11 @@
 		sender: T::CrossAccountId,
 		properties: Vec<Property>,
 	) -> DispatchResultWithPostInfo;
+	fn delete_collection_properties(
+		&self,
+		sender: &T::CrossAccountId,
+		property_keys: Vec<PropertyKey>,
+	) -> DispatchResultWithPostInfo;
 	fn set_token_properties(
 		&self,
 		sender: T::CrossAccountId,
modifiedpallets/fungible/src/common.rsdiffbeforeafterboth
--- a/pallets/fungible/src/common.rs
+++ b/pallets/fungible/src/common.rs
@@ -54,6 +54,10 @@
 		<SelfWeightOf<T>>::set_collection_properties(amount)
 	}
 
+	fn delete_collection_properties(amount: u32) -> Weight {
+		<SelfWeightOf<T>>::delete_collection_properties(amount)
+	}
+
 	fn set_token_properties(amount: u32) -> Weight {
 		<SelfWeightOf<T>>::set_token_properties(amount)
 	}
@@ -249,6 +253,14 @@
 		fail!(<Error<T>>::PropertiesNotAllowed)
 	}
 
+	fn delete_collection_properties(
+		&self,
+		_sender: &T::CrossAccountId,
+		_property_keys: Vec<PropertyKey>,
+	) -> DispatchResultWithPostInfo {
+		fail!(<Error<T>>::PropertiesNotAllowed)
+	}
+
 	fn set_token_properties(
 		&self,
 		_sender: T::CrossAccountId,
modifiedpallets/fungible/src/weights.rsdiffbeforeafterboth
--- a/pallets/fungible/src/weights.rs
+++ b/pallets/fungible/src/weights.rs
@@ -36,6 +36,7 @@
 	fn create_multiple_items_ex(b: u32, ) -> Weight;
 	fn burn_item() -> Weight;
 	fn set_collection_properties(amount: u32) -> Weight;
+	fn delete_collection_properties(amount: u32) -> Weight;
 	fn set_token_properties(amount: u32) -> Weight;
 	fn delete_token_properties(amount: u32) -> Weight;
 	fn set_property_permissions(amount: u32) -> Weight;
@@ -79,6 +80,11 @@
 		0
 	}
 
+	fn delete_collection_properties(_amount: u32) -> Weight {
+		// Error
+		0
+	}
+
 	fn set_token_properties(_amount: u32) -> Weight {
 		// Error
 		0
@@ -157,6 +163,11 @@
 		0
 	}
 
+	fn delete_collection_properties(_amount: u32) -> Weight {
+		// Error
+		0
+	}
+
 	fn set_token_properties(_amount: u32) -> Weight {
 		// Error
 		0
modifiedpallets/nonfungible/src/common.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/common.rs
+++ b/pallets/nonfungible/src/common.rs
@@ -55,6 +55,10 @@
 		<SelfWeightOf<T>>::set_collection_properties(amount)
 	}
 
+	fn delete_collection_properties(amount: u32) -> Weight {
+		<SelfWeightOf<T>>::delete_collection_properties(amount)
+	}
+
 	fn set_token_properties(amount: u32) -> Weight {
 		<SelfWeightOf<T>>::set_token_properties(amount)
 	}
@@ -171,6 +175,19 @@
 		)
 	}
 
+	fn delete_collection_properties(
+		&self,
+		sender: &T::CrossAccountId,
+		property_keys: Vec<PropertyKey>,
+	) -> DispatchResultWithPostInfo {
+		let weight = <CommonWeights<T>>::delete_collection_properties(property_keys.len() as u32);
+
+		with_weight(
+			<Pallet<T>>::delete_collection_properties(self, &sender, property_keys),
+			weight
+		)
+	}
+
 	fn set_token_properties(
 		&self,
 		sender: T::CrossAccountId,
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -366,6 +366,14 @@
 		<PalletCommon<T>>::set_collection_properties(collection, sender, properties)
 	}
 
+	pub fn delete_collection_properties(
+		collection: &CollectionHandle<T>,
+		sender: &T::CrossAccountId,
+		property_keys: Vec<PropertyKey>,
+	) -> DispatchResult {
+		<PalletCommon<T>>::delete_collection_properties(collection, sender, property_keys)
+	}
+
 	pub fn set_property_permissions(
 		collection: &CollectionHandle<T>,
 		sender: &T::CrossAccountId,
modifiedpallets/nonfungible/src/weights.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/weights.rs
+++ b/pallets/nonfungible/src/weights.rs
@@ -37,6 +37,7 @@
 	fn create_multiple_items_ex(b: u32, ) -> Weight;
 	fn burn_item() -> Weight;
 	fn set_collection_properties(amount: u32) -> Weight;
+	fn delete_collection_properties(amount: u32) -> Weight;
 	fn set_token_properties(amount: u32) -> Weight;
 	fn delete_token_properties(amount: u32) -> Weight;
 	fn set_property_permissions(amount: u32) -> Weight;
@@ -100,6 +101,11 @@
 		(50_000_000 as Weight).saturating_mul(amount as Weight)
 	}
 
+	fn delete_collection_properties(amount: u32) -> Weight {
+		// TODO calculate appropriate weight
+		(50_000_000 as Weight).saturating_mul(amount as Weight)
+	}
+
 	fn set_token_properties(amount: u32) -> Weight {
 		// TODO calculate appropriate weight
 		(50_000_000 as Weight).saturating_mul(amount as Weight)
@@ -210,6 +216,11 @@
 		(50_000_000 as Weight).saturating_mul(amount as Weight)
 	}
 
+	fn delete_collection_properties(amount: u32) -> Weight {
+		// TODO calculate appropriate weight
+		(50_000_000 as Weight).saturating_mul(amount as Weight)
+	}
+
 	fn set_token_properties(amount: u32) -> Weight {
 		// TODO calculate appropriate weight
 		(50_000_000 as Weight).saturating_mul(amount as Weight)
modifiedpallets/refungible/src/common.rsdiffbeforeafterboth
--- a/pallets/refungible/src/common.rs
+++ b/pallets/refungible/src/common.rs
@@ -70,6 +70,10 @@
 		<SelfWeightOf<T>>::set_collection_properties(amount)
 	}
 
+	fn delete_collection_properties(amount: u32) -> Weight {
+		<SelfWeightOf<T>>::delete_collection_properties(amount)
+	}
+
 	fn set_token_properties(amount: u32) -> Weight {
 		<SelfWeightOf<T>>::set_token_properties(amount)
 	}
@@ -268,6 +272,14 @@
 		fail!(<Error<T>>::PropertiesNotAllowed)
 	}
 
+	fn delete_collection_properties(
+		&self,
+		_sender: &T::CrossAccountId,
+		_property_keys: Vec<PropertyKey>,
+	) -> DispatchResultWithPostInfo {
+		fail!(<Error<T>>::PropertiesNotAllowed)
+	}
+
 	fn set_token_properties(
 		&self,
 		_sender: T::CrossAccountId,
modifiedpallets/refungible/src/weights.rsdiffbeforeafterboth
after · pallets/refungible/src/weights.rs
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_refungible4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2022-03-01, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// --pallet13// pallet-refungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=20022// --heap-pages=409623// --output=./pallets/refungible/src/weights.rs2425#![cfg_attr(rustfmt, rustfmt_skip)]26#![allow(unused_parens)]27#![allow(unused_imports)]28#![allow(clippy::unnecessary_cast)]2930use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};31use sp_std::marker::PhantomData;3233/// Weight functions needed for pallet_refungible.34pub trait WeightInfo {35	fn create_item() -> Weight;36	fn create_multiple_items(b: u32, ) -> Weight;37	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight;38	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight;39	fn burn_item_partial() -> Weight;40	fn burn_item_fully() -> Weight;41	fn set_collection_properties(amount: u32) -> Weight;42	fn delete_collection_properties(amount: u32) -> Weight;43	fn set_token_properties(amount: u32) -> Weight;44	fn delete_token_properties(amount: u32) -> Weight;45	fn set_property_permissions(amount: u32) -> Weight;46	fn transfer_normal() -> Weight;47	fn transfer_creating() -> Weight;48	fn transfer_removing() -> Weight;49	fn transfer_creating_removing() -> Weight;50	fn approve() -> Weight;51	fn transfer_from_normal() -> Weight;52	fn transfer_from_creating() -> Weight;53	fn transfer_from_removing() -> Weight;54	fn transfer_from_creating_removing() -> Weight;55	fn burn_from() -> Weight;56	fn set_variable_metadata(b: u32, ) -> Weight;57}5859/// Weights for pallet_refungible using the Substrate node and recommended hardware.60pub struct SubstrateWeight<T>(PhantomData<T>);61impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {62	// Storage: Refungible TokensMinted (r:1 w:1)63	// Storage: Refungible AccountBalance (r:1 w:1)64	// Storage: Refungible Balance (r:0 w:1)65	// Storage: Refungible TotalSupply (r:0 w:1)66	// Storage: Refungible TokenData (r:0 w:1)67	// Storage: Refungible Owned (r:0 w:1)68	fn create_item() -> Weight {69		(21_255_000 as Weight)70			.saturating_add(T::DbWeight::get().reads(2 as Weight))71			.saturating_add(T::DbWeight::get().writes(6 as Weight))72	}73	// Storage: Refungible TokensMinted (r:1 w:1)74	// Storage: Refungible AccountBalance (r:1 w:1)75	// Storage: Refungible Balance (r:0 w:4)76	// Storage: Refungible TotalSupply (r:0 w:4)77	// Storage: Refungible TokenData (r:0 w:4)78	// Storage: Refungible Owned (r:0 w:4)79	fn create_multiple_items(b: u32, ) -> Weight {80		(18_052_000 as Weight)81			// Standard Error: 1_00082			.saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))83			.saturating_add(T::DbWeight::get().reads(2 as Weight))84			.saturating_add(T::DbWeight::get().writes(2 as Weight))85			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))86	}87	// Storage: Refungible TokensMinted (r:1 w:1)88	// Storage: Refungible AccountBalance (r:4 w:4)89	// Storage: Refungible Balance (r:0 w:4)90	// Storage: Refungible TotalSupply (r:0 w:4)91	// Storage: Refungible TokenData (r:0 w:4)92	// Storage: Refungible Owned (r:0 w:4)93	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {94		(15_766_000 as Weight)95			// Standard Error: 2_00096			.saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))97			.saturating_add(T::DbWeight::get().reads(1 as Weight))98			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))99			.saturating_add(T::DbWeight::get().writes(1 as Weight))100			.saturating_add(T::DbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))101	}102	// Storage: Refungible TokensMinted (r:1 w:1)103	// Storage: Refungible TotalSupply (r:0 w:1)104	// Storage: Refungible TokenData (r:0 w:1)105	// Storage: Refungible AccountBalance (r:4 w:4)106	// Storage: Refungible Balance (r:0 w:4)107	// Storage: Refungible Owned (r:0 w:4)108	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {109		(5_675_000 as Weight)110			// Standard Error: 2_000111			.saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))112			.saturating_add(T::DbWeight::get().reads(1 as Weight))113			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))114			.saturating_add(T::DbWeight::get().writes(3 as Weight))115			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))116	}117	// Storage: Refungible TotalSupply (r:1 w:1)118	// Storage: Refungible Balance (r:1 w:1)119	// Storage: Refungible AccountBalance (r:1 w:1)120	// Storage: Refungible Owned (r:0 w:1)121	fn burn_item_partial() -> Weight {122		(23_518_000 as Weight)123			.saturating_add(T::DbWeight::get().reads(3 as Weight))124			.saturating_add(T::DbWeight::get().writes(4 as Weight))125	}126	// Storage: Refungible TotalSupply (r:1 w:1)127	// Storage: Refungible Balance (r:1 w:1)128	// Storage: Refungible AccountBalance (r:1 w:1)129	// Storage: Refungible TokensBurnt (r:1 w:1)130	// Storage: Refungible TokenData (r:0 w:1)131	// Storage: Refungible Owned (r:0 w:1)132	fn burn_item_fully() -> Weight {133		(32_489_000 as Weight)134			.saturating_add(T::DbWeight::get().reads(4 as Weight))135			.saturating_add(T::DbWeight::get().writes(6 as Weight))136	}137138	fn set_collection_properties(_amount: u32) -> Weight {139		// Error140		0141	}142143	fn delete_collection_properties(_amount: u32) -> Weight {144		// Error145		0146	}147148	fn set_token_properties(_amount: u32) -> Weight {149		// Error150		0151	}152153	fn delete_token_properties(_amount: u32) -> Weight {154		// Error155		0156	}157158	fn set_property_permissions(_amount: u32) -> Weight {159		// Error160		0161	}162163	// Storage: Refungible Balance (r:2 w:2)164	fn transfer_normal() -> Weight {165		(19_766_000 as Weight)166			.saturating_add(T::DbWeight::get().reads(2 as Weight))167			.saturating_add(T::DbWeight::get().writes(2 as Weight))168	}169	// Storage: Refungible Balance (r:2 w:2)170	// Storage: Refungible AccountBalance (r:1 w:1)171	// Storage: Refungible Owned (r:0 w:1)172	fn transfer_creating() -> Weight {173		(23_360_000 as Weight)174			.saturating_add(T::DbWeight::get().reads(3 as Weight))175			.saturating_add(T::DbWeight::get().writes(4 as Weight))176	}177	// Storage: Refungible Balance (r:2 w:2)178	// Storage: Refungible AccountBalance (r:1 w:1)179	// Storage: Refungible Owned (r:0 w:1)180	fn transfer_removing() -> Weight {181		(25_344_000 as Weight)182			.saturating_add(T::DbWeight::get().reads(3 as Weight))183			.saturating_add(T::DbWeight::get().writes(4 as Weight))184	}185	// Storage: Refungible Balance (r:2 w:2)186	// Storage: Refungible AccountBalance (r:2 w:2)187	// Storage: Refungible Owned (r:0 w:2)188	fn transfer_creating_removing() -> Weight {189		(28_553_000 as Weight)190			.saturating_add(T::DbWeight::get().reads(4 as Weight))191			.saturating_add(T::DbWeight::get().writes(6 as Weight))192	}193	// Storage: Refungible Balance (r:1 w:0)194	// Storage: Refungible Allowance (r:0 w:1)195	fn approve() -> Weight {196		(15_356_000 as Weight)197			.saturating_add(T::DbWeight::get().reads(1 as Weight))198			.saturating_add(T::DbWeight::get().writes(1 as Weight))199	}200	// Storage: Refungible Allowance (r:1 w:1)201	// Storage: Refungible Balance (r:2 w:2)202	fn transfer_from_normal() -> Weight {203		(28_832_000 as Weight)204			.saturating_add(T::DbWeight::get().reads(3 as Weight))205			.saturating_add(T::DbWeight::get().writes(3 as Weight))206	}207	// Storage: Refungible Allowance (r:1 w:1)208	// Storage: Refungible Balance (r:2 w:2)209	// Storage: Refungible AccountBalance (r:1 w:1)210	// Storage: Refungible Owned (r:0 w:1)211	fn transfer_from_creating() -> Weight {212		(32_132_000 as Weight)213			.saturating_add(T::DbWeight::get().reads(4 as Weight))214			.saturating_add(T::DbWeight::get().writes(5 as Weight))215	}216	// Storage: Refungible Allowance (r:1 w:1)217	// Storage: Refungible Balance (r:2 w:2)218	// Storage: Refungible AccountBalance (r:1 w:1)219	// Storage: Refungible Owned (r:0 w:1)220	fn transfer_from_removing() -> Weight {221		(33_237_000 as Weight)222			.saturating_add(T::DbWeight::get().reads(4 as Weight))223			.saturating_add(T::DbWeight::get().writes(5 as Weight))224	}225	// Storage: Refungible Allowance (r:1 w:1)226	// Storage: Refungible Balance (r:2 w:2)227	// Storage: Refungible AccountBalance (r:2 w:2)228	// Storage: Refungible Owned (r:0 w:2)229	fn transfer_from_creating_removing() -> Weight {230		(36_399_000 as Weight)231			.saturating_add(T::DbWeight::get().reads(5 as Weight))232			.saturating_add(T::DbWeight::get().writes(7 as Weight))233	}234	// Storage: Refungible Allowance (r:1 w:1)235	// Storage: Refungible TotalSupply (r:1 w:1)236	// Storage: Refungible Balance (r:1 w:1)237	// Storage: Refungible AccountBalance (r:1 w:1)238	// Storage: Refungible TokensBurnt (r:1 w:1)239	// Storage: Refungible TokenData (r:0 w:1)240	// Storage: Refungible Owned (r:0 w:1)241	fn burn_from() -> Weight {242		(42_043_000 as Weight)243			.saturating_add(T::DbWeight::get().reads(5 as Weight))244			.saturating_add(T::DbWeight::get().writes(7 as Weight))245	}246	// Storage: Refungible TokenData (r:1 w:1)247	fn set_variable_metadata(_b: u32, ) -> Weight {248		(7_364_000 as Weight)249			.saturating_add(T::DbWeight::get().reads(1 as Weight))250			.saturating_add(T::DbWeight::get().writes(1 as Weight))251	}252}253254// For backwards compatibility and tests255impl WeightInfo for () {256	// Storage: Refungible TokensMinted (r:1 w:1)257	// Storage: Refungible AccountBalance (r:1 w:1)258	// Storage: Refungible Balance (r:0 w:1)259	// Storage: Refungible TotalSupply (r:0 w:1)260	// Storage: Refungible TokenData (r:0 w:1)261	// Storage: Refungible Owned (r:0 w:1)262	fn create_item() -> Weight {263		(21_255_000 as Weight)264			.saturating_add(RocksDbWeight::get().reads(2 as Weight))265			.saturating_add(RocksDbWeight::get().writes(6 as Weight))266	}267	// Storage: Refungible TokensMinted (r:1 w:1)268	// Storage: Refungible AccountBalance (r:1 w:1)269	// Storage: Refungible Balance (r:0 w:4)270	// Storage: Refungible TotalSupply (r:0 w:4)271	// Storage: Refungible TokenData (r:0 w:4)272	// Storage: Refungible Owned (r:0 w:4)273	fn create_multiple_items(b: u32, ) -> Weight {274		(18_052_000 as Weight)275			// Standard Error: 1_000276			.saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))277			.saturating_add(RocksDbWeight::get().reads(2 as Weight))278			.saturating_add(RocksDbWeight::get().writes(2 as Weight))279			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))280	}281	// Storage: Refungible TokensMinted (r:1 w:1)282	// Storage: Refungible AccountBalance (r:4 w:4)283	// Storage: Refungible Balance (r:0 w:4)284	// Storage: Refungible TotalSupply (r:0 w:4)285	// Storage: Refungible TokenData (r:0 w:4)286	// Storage: Refungible Owned (r:0 w:4)287	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {288		(15_766_000 as Weight)289			// Standard Error: 2_000290			.saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))291			.saturating_add(RocksDbWeight::get().reads(1 as Weight))292			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))293			.saturating_add(RocksDbWeight::get().writes(1 as Weight))294			.saturating_add(RocksDbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))295	}296	// Storage: Refungible TokensMinted (r:1 w:1)297	// Storage: Refungible TotalSupply (r:0 w:1)298	// Storage: Refungible TokenData (r:0 w:1)299	// Storage: Refungible AccountBalance (r:4 w:4)300	// Storage: Refungible Balance (r:0 w:4)301	// Storage: Refungible Owned (r:0 w:4)302	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {303		(5_675_000 as Weight)304			// Standard Error: 2_000305			.saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))306			.saturating_add(RocksDbWeight::get().reads(1 as Weight))307			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))308			.saturating_add(RocksDbWeight::get().writes(3 as Weight))309			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))310	}311	// Storage: Refungible TotalSupply (r:1 w:1)312	// Storage: Refungible Balance (r:1 w:1)313	// Storage: Refungible AccountBalance (r:1 w:1)314	// Storage: Refungible Owned (r:0 w:1)315	fn burn_item_partial() -> Weight {316		(23_518_000 as Weight)317			.saturating_add(RocksDbWeight::get().reads(3 as Weight))318			.saturating_add(RocksDbWeight::get().writes(4 as Weight))319	}320	// Storage: Refungible TotalSupply (r:1 w:1)321	// Storage: Refungible Balance (r:1 w:1)322	// Storage: Refungible AccountBalance (r:1 w:1)323	// Storage: Refungible TokensBurnt (r:1 w:1)324	// Storage: Refungible TokenData (r:0 w:1)325	// Storage: Refungible Owned (r:0 w:1)326	fn burn_item_fully() -> Weight {327		(32_489_000 as Weight)328			.saturating_add(RocksDbWeight::get().reads(4 as Weight))329			.saturating_add(RocksDbWeight::get().writes(6 as Weight))330	}331332	fn set_collection_properties(_amount: u32) -> Weight {333		// Error334		0335	}336337	fn delete_collection_properties(_amount: u32) -> Weight {338		// Error339		0340	}341342	fn set_token_properties(_amount: u32) -> Weight {343		// Error344		0345	}346347	fn delete_token_properties(_amount: u32) -> Weight {348		// Error349		0350	}351352	fn set_property_permissions(_amount: u32) -> Weight {353		// Error354		0355	}356357	// Storage: Refungible Balance (r:2 w:2)358	fn transfer_normal() -> Weight {359		(19_766_000 as Weight)360			.saturating_add(RocksDbWeight::get().reads(2 as Weight))361			.saturating_add(RocksDbWeight::get().writes(2 as Weight))362	}363	// Storage: Refungible Balance (r:2 w:2)364	// Storage: Refungible AccountBalance (r:1 w:1)365	// Storage: Refungible Owned (r:0 w:1)366	fn transfer_creating() -> Weight {367		(23_360_000 as Weight)368			.saturating_add(RocksDbWeight::get().reads(3 as Weight))369			.saturating_add(RocksDbWeight::get().writes(4 as Weight))370	}371	// Storage: Refungible Balance (r:2 w:2)372	// Storage: Refungible AccountBalance (r:1 w:1)373	// Storage: Refungible Owned (r:0 w:1)374	fn transfer_removing() -> Weight {375		(25_344_000 as Weight)376			.saturating_add(RocksDbWeight::get().reads(3 as Weight))377			.saturating_add(RocksDbWeight::get().writes(4 as Weight))378	}379	// Storage: Refungible Balance (r:2 w:2)380	// Storage: Refungible AccountBalance (r:2 w:2)381	// Storage: Refungible Owned (r:0 w:2)382	fn transfer_creating_removing() -> Weight {383		(28_553_000 as Weight)384			.saturating_add(RocksDbWeight::get().reads(4 as Weight))385			.saturating_add(RocksDbWeight::get().writes(6 as Weight))386	}387	// Storage: Refungible Balance (r:1 w:0)388	// Storage: Refungible Allowance (r:0 w:1)389	fn approve() -> Weight {390		(15_356_000 as Weight)391			.saturating_add(RocksDbWeight::get().reads(1 as Weight))392			.saturating_add(RocksDbWeight::get().writes(1 as Weight))393	}394	// Storage: Refungible Allowance (r:1 w:1)395	// Storage: Refungible Balance (r:2 w:2)396	fn transfer_from_normal() -> Weight {397		(28_832_000 as Weight)398			.saturating_add(RocksDbWeight::get().reads(3 as Weight))399			.saturating_add(RocksDbWeight::get().writes(3 as Weight))400	}401	// Storage: Refungible Allowance (r:1 w:1)402	// Storage: Refungible Balance (r:2 w:2)403	// Storage: Refungible AccountBalance (r:1 w:1)404	// Storage: Refungible Owned (r:0 w:1)405	fn transfer_from_creating() -> Weight {406		(32_132_000 as Weight)407			.saturating_add(RocksDbWeight::get().reads(4 as Weight))408			.saturating_add(RocksDbWeight::get().writes(5 as Weight))409	}410	// Storage: Refungible Allowance (r:1 w:1)411	// Storage: Refungible Balance (r:2 w:2)412	// Storage: Refungible AccountBalance (r:1 w:1)413	// Storage: Refungible Owned (r:0 w:1)414	fn transfer_from_removing() -> Weight {415		(33_237_000 as Weight)416			.saturating_add(RocksDbWeight::get().reads(4 as Weight))417			.saturating_add(RocksDbWeight::get().writes(5 as Weight))418	}419	// Storage: Refungible Allowance (r:1 w:1)420	// Storage: Refungible Balance (r:2 w:2)421	// Storage: Refungible AccountBalance (r:2 w:2)422	// Storage: Refungible Owned (r:0 w:2)423	fn transfer_from_creating_removing() -> Weight {424		(36_399_000 as Weight)425			.saturating_add(RocksDbWeight::get().reads(5 as Weight))426			.saturating_add(RocksDbWeight::get().writes(7 as Weight))427	}428	// Storage: Refungible Allowance (r:1 w:1)429	// Storage: Refungible TotalSupply (r:1 w:1)430	// Storage: Refungible Balance (r:1 w:1)431	// Storage: Refungible AccountBalance (r:1 w:1)432	// Storage: Refungible TokensBurnt (r:1 w:1)433	// Storage: Refungible TokenData (r:0 w:1)434	// Storage: Refungible Owned (r:0 w:1)435	fn burn_from() -> Weight {436		(42_043_000 as Weight)437			.saturating_add(RocksDbWeight::get().reads(5 as Weight))438			.saturating_add(RocksDbWeight::get().writes(7 as Weight))439	}440	// Storage: Refungible TokenData (r:1 w:1)441	fn set_variable_metadata(_b: u32, ) -> Weight {442		(7_364_000 as Weight)443			.saturating_add(RocksDbWeight::get().reads(1 as Weight))444			.saturating_add(RocksDbWeight::get().writes(1 as Weight))445	}446}
modifiedpallets/unique/src/lib.rsdiffbeforeafterboth
--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -708,6 +708,20 @@
 			dispatch_call::<T, _>(collection_id, |d| d.set_collection_properties(sender, properties))
 		}
 
+		#[weight = T::CommonWeightInfo::delete_collection_properties(property_keys.len() as u32)]
+		#[transactional]
+		pub fn delete_collection_properties(
+			origin,
+			collection_id: CollectionId,
+			property_keys: Vec<PropertyKey>,
+		) -> DispatchResultWithPostInfo {
+			ensure!(!property_keys.is_empty(), Error::<T>::EmptyArgument);
+
+			let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
+
+			dispatch_call::<T, _>(collection_id, |d| d.delete_collection_properties(&sender, property_keys))
+		}
+
 		#[weight = T::CommonWeightInfo::set_token_properties(properties.len() as u32)]
 		#[transactional]
 		pub fn set_token_properties(
@@ -723,19 +737,19 @@
 			dispatch_call::<T, _>(collection_id, |d| d.set_token_properties(sender, token_id, properties))
 		}
 
-		#[weight = T::CommonWeightInfo::delete_token_properties(properties.len() as u32)]
+		#[weight = T::CommonWeightInfo::delete_token_properties(property_keys.len() as u32)]
 		#[transactional]
 		pub fn delete_token_properties(
 			origin,
 			collection_id: CollectionId,
 			token_id: TokenId,
-			properties: Vec<PropertyKey>
+			property_keys: Vec<PropertyKey>
 		) -> DispatchResultWithPostInfo {
-			ensure!(!properties.is_empty(), Error::<T>::EmptyArgument);
+			ensure!(!property_keys.is_empty(), Error::<T>::EmptyArgument);
 
 			let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
 
-			dispatch_call::<T, _>(collection_id, |d| d.delete_token_properties(sender, token_id, properties))
+			dispatch_call::<T, _>(collection_id, |d| d.delete_token_properties(sender, token_id, property_keys))
 		}
 
 		#[weight = T::CommonWeightInfo::set_property_permissions(property_permissions.len() as u32)]
modifiedruntime/common/src/weights.rsdiffbeforeafterboth
--- a/runtime/common/src/weights.rs
+++ b/runtime/common/src/weights.rs
@@ -58,6 +58,10 @@
 		dispatch_weight::<T>() + max_weight_of!(set_collection_properties(amount))
 	}
 
+	fn delete_collection_properties(amount: u32) -> Weight {
+		dispatch_weight::<T>() + max_weight_of!(delete_collection_properties(amount))
+	}
+
 	fn set_token_properties(amount: u32) -> Weight {
 		dispatch_weight::<T>() + max_weight_of!(set_token_properties(amount))
 	}