git.delta.rocks / unique-network / refs/commits / 04a22c8dcea1

difftreelog

refactor remove meta update permission

Daniel Shiposha2022-05-15parent: #07f2d6c.patch.diff
in: master

11 files changed

modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -22,7 +22,7 @@
 use pallet_evm::account::CrossAccountId;
 use frame_support::{
 	dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo, Weight, PostDispatchInfo},
-	ensure, fail,
+	ensure,
 	traits::{Imbalance, Get, Currency, WithdrawReasons, ExistenceRequirement},
 	BoundedVec,
 	weights::Pays,
@@ -30,7 +30,7 @@
 use pallet_evm::GasWeightMapping;
 use up_data_structs::{
 	COLLECTION_NUMBER_LIMIT, Collection, RpcCollection, CollectionId, CreateItemData,
-	MAX_TOKEN_PREFIX_LENGTH, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission, TokenId,
+	MAX_TOKEN_PREFIX_LENGTH, COLLECTION_ADMINS_LIMIT, TokenId,
 	CollectionStats, MAX_TOKEN_OWNERSHIP, CollectionMode, NFT_SPONSOR_TRANSFER_TIMEOUT,
 	FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT,
 	CUSTOM_DATA_LIMIT, CollectionLimits, CreateCollectionData, SponsorshipState,
@@ -134,21 +134,6 @@
 			<Error<T>>::AddressNotInAllowlist
 		);
 		Ok(())
-	}
-
-	pub fn check_can_update_meta(
-		&self,
-		subject: &T::CrossAccountId,
-		item_owner: &T::CrossAccountId,
-	) -> DispatchResult {
-		match self.meta_update_permission {
-			MetaUpdatePermission::ItemOwner => {
-				ensure!(subject == item_owner, <Error<T>>::NoPermission);
-				Ok(())
-			}
-			MetaUpdatePermission::Admin => self.check_is_owner_or_admin(subject),
-			MetaUpdatePermission::None => fail!(<Error<T>>::NoPermission),
-		}
 	}
 }
 
@@ -565,7 +550,6 @@
 			schema_version,
 			sponsorship,
 			limits,
-			meta_update_permission,
 		} = <CollectionById<T>>::get(collection)?;
 
 		let token_property_permissions = <CollectionPropertyPermissions<T>>::get(collection)
@@ -595,7 +579,6 @@
 			schema_version,
 			sponsorship,
 			limits,
-			meta_update_permission,
 			offchain_schema: <CollectionData<T>>::get((
 				collection,
 				CollectionField::OffchainSchema,
@@ -656,7 +639,6 @@
 				.limits
 				.map(|limits| Self::clamp_limits(data.mode.clone(), &Default::default(), limits))
 				.unwrap_or_else(|| Ok(CollectionLimits::default()))?,
-			meta_update_permission: data.meta_update_permission.unwrap_or_default(),
 		};
 
 		let mut collection_properties = up_data_structs::CollectionProperties::get();
modifiedpallets/unique/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/unique/src/benchmarking.rs
+++ b/pallets/unique/src/benchmarking.rs
@@ -168,9 +168,4 @@
 			nesting_rule: None,
 		};
 	}: set_collection_limits(RawOrigin::Signed(caller.clone()), collection, cl)
-
-	set_meta_update_permission_flag {
-		let caller: T::AccountId = account("caller", 0, SEED);
-		let collection = create_nft_collection::<T>(caller.clone())?;
-	}: _(RawOrigin::Signed(caller.clone()), collection, MetaUpdatePermission::Admin)
 }
modifiedpallets/unique/src/lib.rsdiffbeforeafterboth
--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -38,12 +38,12 @@
 	CONST_ON_CHAIN_SCHEMA_LIMIT, OFFCHAIN_SCHEMA_LIMIT,
 	MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
 	AccessMode, CreateItemData, CollectionLimits, CollectionId, CollectionMode, TokenId,
-	SchemaVersion, SponsorshipState, MetaUpdatePermission, CreateCollectionData,
+	SchemaVersion, SponsorshipState, CreateCollectionData,
 	CreateItemExData, budget, CollectionField, Property, PropertyKey, PropertyKeyPermission,
 };
 use pallet_evm::account::CrossAccountId;
 use pallet_common::{
-	CollectionHandle, Pallet as PalletCommon, Error as CommonError, CommonWeightInfo,
+	CollectionHandle, Pallet as PalletCommon, CommonWeightInfo,
 	dispatch::dispatch_call, dispatch::CollectionDispatch,
 };
 
@@ -925,34 +925,6 @@
 			let budget = budget::Value::new(2);
 
 			dispatch_call::<T, _>(collection_id, |d| d.transfer_from(sender, from, recipient, item_id, value, &budget))
-		}
-
-		/// Set meta_update_permission value for particular collection
-		///
-		/// # Permissions
-		///
-		/// * Collection Owner.
-		///
-		/// # Arguments
-		///
-		/// * collection_id: ID of the collection.
-		///
-		/// * value: New flag value.
-		#[weight = <SelfWeightOf<T>>::set_meta_update_permission_flag()]
-		#[transactional]
-		pub fn set_meta_update_permission_flag(origin, collection_id: CollectionId, value: MetaUpdatePermission) -> DispatchResult {
-			let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
-			let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
-
-			ensure!(
-				target_collection.meta_update_permission != MetaUpdatePermission::None,
-				<CommonError<T>>::MetadataFlagFrozen,
-			);
-			target_collection.check_is_owner(&sender)?;
-
-			target_collection.meta_update_permission = value;
-
-			target_collection.save()
 		}
 
 		/// Set schema standard
modifiedpallets/unique/src/weights.rsdiffbeforeafterboth
--- a/pallets/unique/src/weights.rs
+++ b/pallets/unique/src/weights.rs
@@ -49,7 +49,6 @@
 	fn set_const_on_chain_schema(b: u32, ) -> Weight;
 	fn set_schema_version() -> Weight;
 	fn set_collection_limits() -> Weight;
-	fn set_meta_update_permission_flag() -> Weight;
 }
 
 /// Weights for pallet_unique using the Substrate node and recommended hardware.
@@ -167,12 +166,6 @@
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_collection_limits() -> Weight {
 		(15_339_000 as Weight)
-			.saturating_add(T::DbWeight::get().reads(1 as Weight))
-			.saturating_add(T::DbWeight::get().writes(1 as Weight))
-	}
-	// Storage: Common CollectionById (r:1 w:1)
-	fn set_meta_update_permission_flag() -> Weight {
-		(7_214_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
@@ -292,12 +285,6 @@
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_collection_limits() -> Weight {
 		(15_339_000 as Weight)
-			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
-			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
-	}
-	// Storage: Common CollectionById (r:1 w:1)
-	fn set_meta_update_permission_flag() -> Weight {
-		(7_214_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
modifiedprimitives/data-structs/src/lib.rsdiffbeforeafterboth
--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -308,6 +308,7 @@
 	#[version(..2)]
 	pub const_on_chain_schema: BoundedVec<u8, ConstU32<CONST_ON_CHAIN_SCHEMA_LIMIT>>,
 
+	#[version(..2)]
 	pub meta_update_permission: MetaUpdatePermission,
 }
 
@@ -327,7 +328,6 @@
 	pub sponsorship: SponsorshipState<AccountId>,
 	pub limits: CollectionLimits,
 	pub const_on_chain_schema: Vec<u8>,
-	pub meta_update_permission: MetaUpdatePermission,
 	pub token_property_permissions: Vec<PropertyKeyPermission>,
 	pub properties: Vec<Property>,
 }
@@ -353,7 +353,6 @@
 	pub pending_sponsor: Option<AccountId>,
 	pub limits: Option<CollectionLimits>,
 	pub const_on_chain_schema: BoundedVec<u8, ConstU32<CONST_ON_CHAIN_SCHEMA_LIMIT>>,
-	pub meta_update_permission: Option<MetaUpdatePermission>,
 	pub token_property_permissions: CollectionPropertiesPermissionsVec,
 	pub properties: CollectionPropertiesVec,
 }
@@ -493,17 +492,10 @@
 }
 
 #[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
-#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
 pub enum MetaUpdatePermission {
 	ItemOwner,
 	Admin,
 	None,
-}
-
-impl Default for MetaUpdatePermission {
-	fn default() -> Self {
-		Self::ItemOwner
-	}
 }
 
 #[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo)]
modifiedruntime/tests/src/tests.rsdiffbeforeafterboth
--- a/runtime/tests/src/tests.rs
+++ b/runtime/tests/src/tests.rs
@@ -18,7 +18,7 @@
 use crate::{Test, TestCrossAccountId, CollectionCreationPrice, Origin, Unique, new_test_ext};
 use up_data_structs::{
 	COLLECTION_NUMBER_LIMIT, CollectionId, CreateItemData, CreateFungibleData, CreateNftData,
-	CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission,
+	CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT,
 	TokenId, MAX_TOKEN_OWNERSHIP, CreateCollectionData, CollectionField, SchemaVersion,
 	CollectionMode, AccessMode,
 };
@@ -2467,32 +2467,6 @@
 		assert_eq!(
 			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),
 			1
-		);
-	});
-}
-
-#[test]
-fn set_variable_meta_flag_after_freeze() {
-	new_test_ext().execute_with(|| {
-		// default_limits();
-
-		let collection_id =
-			create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));
-
-		let origin2 = Origin::signed(2);
-
-		assert_ok!(Unique::set_meta_update_permission_flag(
-			origin2.clone(),
-			collection_id,
-			MetaUpdatePermission::None,
-		));
-		assert_noop!(
-			Unique::set_meta_update_permission_flag(
-				origin2.clone(),
-				collection_id,
-				MetaUpdatePermission::Admin
-			),
-			CommonError::<Test>::MetadataFlagFrozen
 		);
 	});
 }
modifiedtests/src/createCollection.test.tsdiffbeforeafterboth
before · tests/src/createCollection.test.ts
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/>.1617import {expect} from 'chai';18import privateKey from './substrate/privateKey';19import usingApi, {executeTransaction, submitTransactionAsync} from './substrate/substrate-api';20import {createCollectionWithPropsExpectFailure, createCollectionExpectFailure, createCollectionExpectSuccess, getCreateCollectionResult, getDetailedCollectionInfo, createCollectionWithPropsExpectSuccess} from './util/helpers';2122describe('integration test: ext. createCollection():', () => {23  it('Create new NFT collection', async () => {24    await createCollectionExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'}});25  });26  it('Create new NFT collection whith collection_name of maximum length (64 bytes)', async () => {27    await createCollectionExpectSuccess({name: 'A'.repeat(64)});28  });29  it('Create new NFT collection whith collection_description of maximum length (256 bytes)', async () => {30    await createCollectionExpectSuccess({description: 'A'.repeat(256)});31  });32  it('Create new NFT collection whith token_prefix of maximum length (16 bytes)', async () => {33    await createCollectionExpectSuccess({tokenPrefix: 'A'.repeat(16)});34  });35  it('Create new Fungible collection', async () => {36    await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});37  });38  it('Create new ReFungible collection', async () => {39    await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});40  });4142  it('create new collection with properties #1', async () => {43    await createCollectionWithPropsExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'},44      properties: [{key: 'key1', value: 'val1'}],45      propPerm:   [{key: 'key1', tokenOwner: true, mutable: false, collectionAdmin: true}]});46  });4748  it('create new collection with properties #2', async () => {49    await createCollectionWithPropsExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'},50      properties: [{key: 'key1', value: 'val1'}],51      propPerm:   [{key: 'key1', tokenOwner: false, mutable: true, collectionAdmin: false}]});52  });5354  it('create new collection with properties #3', async () => {55    await createCollectionWithPropsExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'},56      properties: [{key: 'key1', value: 'val1'}],57      propPerm:   [{key: 'key1', tokenOwner: true, mutable: false, collectionAdmin: false}]});58  });5960  it('Create new collection with extra fields', async () => {61    await usingApi(async api => {62      const alice = privateKey('//Alice');63      const bob = privateKey('//Bob');64      const tx = api.tx.unique.createCollectionEx({65        mode: {Fungible: 8},66        access: 'AllowList',67        name: [1],68        description: [2],69        tokenPrefix: '0x000000',70        offchainSchema: '0x111111',71        schemaVersion: 'Unique',72        pendingSponsor: bob.address,73        limits: {74          accountTokenOwnershipLimit: 3,75        },76        constOnChainSchema: '0x333333',77        metaUpdatePermission: 'Admin',78      });79      const events = await submitTransactionAsync(alice, tx);80      const result = getCreateCollectionResult(events);8182      const collection = (await getDetailedCollectionInfo(api, result.collectionId))!;83      expect(collection.owner.toString()).to.equal(alice.address);84      expect(collection.mode.asFungible.toNumber()).to.equal(8);85      expect(collection.access.isAllowList).to.be.true;86      expect(collection.name.map(v => v.toNumber())).to.deep.equal([1]);87      expect(collection.description.map(v => v.toNumber())).to.deep.equal([2]);88      expect(collection.tokenPrefix.toString()).to.equal('0x000000');89      expect(collection.offchainSchema.toString()).to.equal('0x111111');90      expect(collection.schemaVersion.isUnique).to.be.true;91      expect(collection.sponsorship.asUnconfirmed.toString()).to.equal(bob.address);92      expect(collection.limits.accountTokenOwnershipLimit.unwrap().toNumber()).to.equal(3);93      expect(collection.constOnChainSchema.toString()).to.equal('0x333333');94      expect(collection.metaUpdatePermission.isAdmin).to.be.true;95    });96  });97});9899describe('(!negative test!) integration test: ext. createCollection():', () => {100  it('(!negative test!) create new NFT collection whith incorrect data (collection_name)', async () => {101    await createCollectionExpectFailure({name: 'A'.repeat(65), mode: {type: 'NFT'}});102  });103  it('(!negative test!) create new NFT collection whith incorrect data (collection_description)', async () => {104    await createCollectionExpectFailure({description: 'A'.repeat(257), mode: {type: 'NFT'}});105  });106  it('(!negative test!) create new NFT collection whith incorrect data (token_prefix)', async () => {107    await createCollectionExpectFailure({tokenPrefix: 'A'.repeat(17), mode: {type: 'NFT'}});108  });109  it('fails when bad limits are set', async () => {110    await usingApi(async api => {111      const alice = privateKey('//Alice');112      const tx = api.tx.unique.createCollectionEx({mode: 'NFT', limits: {tokenLimit: 0}});113      await expect(executeTransaction(api, alice, tx)).to.be.rejectedWith(/^common.CollectionTokenLimitExceeded$/);114    });115  });116117  it('(!negative test!) create collection with incorrect property limit (64 elements)', async () => {118    const props = [];119120    for (let i = 0; i < 65; i++) {121      props.push({key: `key${i}`, value: `value${i}`});122    }123124    await createCollectionWithPropsExpectFailure({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'}, properties: props});125  });126127  it('(!negative test!) create collection with incorrect property limit (40 kb)', async () => {128    const props = [];129130    for (let i = 0; i < 32; i++) {131      props.push({key: `key${i}`.repeat(80), value: `value${i}`.repeat(80)});132    }133134    await createCollectionWithPropsExpectFailure({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'}, properties: props});135  });136});
after · tests/src/createCollection.test.ts
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/>.1617import {expect} from 'chai';18import privateKey from './substrate/privateKey';19import usingApi, {executeTransaction, submitTransactionAsync} from './substrate/substrate-api';20import {createCollectionWithPropsExpectFailure, createCollectionExpectFailure, createCollectionExpectSuccess, getCreateCollectionResult, getDetailedCollectionInfo, createCollectionWithPropsExpectSuccess} from './util/helpers';2122describe('integration test: ext. createCollection():', () => {23  it('Create new NFT collection', async () => {24    await createCollectionExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'}});25  });26  it('Create new NFT collection whith collection_name of maximum length (64 bytes)', async () => {27    await createCollectionExpectSuccess({name: 'A'.repeat(64)});28  });29  it('Create new NFT collection whith collection_description of maximum length (256 bytes)', async () => {30    await createCollectionExpectSuccess({description: 'A'.repeat(256)});31  });32  it('Create new NFT collection whith token_prefix of maximum length (16 bytes)', async () => {33    await createCollectionExpectSuccess({tokenPrefix: 'A'.repeat(16)});34  });35  it('Create new Fungible collection', async () => {36    await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});37  });38  it('Create new ReFungible collection', async () => {39    await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});40  });4142  it('create new collection with properties #1', async () => {43    await createCollectionWithPropsExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'},44      properties: [{key: 'key1', value: 'val1'}],45      propPerm:   [{key: 'key1', tokenOwner: true, mutable: false, collectionAdmin: true}]});46  });4748  it('create new collection with properties #2', async () => {49    await createCollectionWithPropsExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'},50      properties: [{key: 'key1', value: 'val1'}],51      propPerm:   [{key: 'key1', tokenOwner: false, mutable: true, collectionAdmin: false}]});52  });5354  it('create new collection with properties #3', async () => {55    await createCollectionWithPropsExpectSuccess({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'},56      properties: [{key: 'key1', value: 'val1'}],57      propPerm:   [{key: 'key1', tokenOwner: true, mutable: false, collectionAdmin: false}]});58  });5960  it('Create new collection with extra fields', async () => {61    await usingApi(async api => {62      const alice = privateKey('//Alice');63      const bob = privateKey('//Bob');64      const tx = api.tx.unique.createCollectionEx({65        mode: {Fungible: 8},66        access: 'AllowList',67        name: [1],68        description: [2],69        tokenPrefix: '0x000000',70        offchainSchema: '0x111111',71        schemaVersion: 'Unique',72        pendingSponsor: bob.address,73        limits: {74          accountTokenOwnershipLimit: 3,75        },76        constOnChainSchema: '0x333333',77      });78      const events = await submitTransactionAsync(alice, tx);79      const result = getCreateCollectionResult(events);8081      const collection = (await getDetailedCollectionInfo(api, result.collectionId))!;82      expect(collection.owner.toString()).to.equal(alice.address);83      expect(collection.mode.asFungible.toNumber()).to.equal(8);84      expect(collection.access.isAllowList).to.be.true;85      expect(collection.name.map(v => v.toNumber())).to.deep.equal([1]);86      expect(collection.description.map(v => v.toNumber())).to.deep.equal([2]);87      expect(collection.tokenPrefix.toString()).to.equal('0x000000');88      expect(collection.offchainSchema.toString()).to.equal('0x111111');89      expect(collection.schemaVersion.isUnique).to.be.true;90      expect(collection.sponsorship.asUnconfirmed.toString()).to.equal(bob.address);91      expect(collection.limits.accountTokenOwnershipLimit.unwrap().toNumber()).to.equal(3);92      expect(collection.constOnChainSchema.toString()).to.equal('0x333333');93    });94  });95});9697describe('(!negative test!) integration test: ext. createCollection():', () => {98  it('(!negative test!) create new NFT collection whith incorrect data (collection_name)', async () => {99    await createCollectionExpectFailure({name: 'A'.repeat(65), mode: {type: 'NFT'}});100  });101  it('(!negative test!) create new NFT collection whith incorrect data (collection_description)', async () => {102    await createCollectionExpectFailure({description: 'A'.repeat(257), mode: {type: 'NFT'}});103  });104  it('(!negative test!) create new NFT collection whith incorrect data (token_prefix)', async () => {105    await createCollectionExpectFailure({tokenPrefix: 'A'.repeat(17), mode: {type: 'NFT'}});106  });107  it('fails when bad limits are set', async () => {108    await usingApi(async api => {109      const alice = privateKey('//Alice');110      const tx = api.tx.unique.createCollectionEx({mode: 'NFT', limits: {tokenLimit: 0}});111      await expect(executeTransaction(api, alice, tx)).to.be.rejectedWith(/^common.CollectionTokenLimitExceeded$/);112    });113  });114115  it('(!negative test!) create collection with incorrect property limit (64 elements)', async () => {116    const props = [];117118    for (let i = 0; i < 65; i++) {119      props.push({key: `key${i}`, value: `value${i}`});120    }121122    await createCollectionWithPropsExpectFailure({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'}, properties: props});123  });124125  it('(!negative test!) create collection with incorrect property limit (40 kb)', async () => {126    const props = [];127128    for (let i = 0; i < 32; i++) {129      props.push({key: `key${i}`.repeat(80), value: `value${i}`.repeat(80)});130    }131132    await createCollectionWithPropsExpectFailure({name: 'A', description: 'B', tokenPrefix: 'C', mode: {type: 'NFT'}, properties: props});133  });134});
modifiedtests/src/eth/nonFungible.test.tsdiffbeforeafterboth
--- a/tests/src/eth/nonFungible.test.ts
+++ b/tests/src/eth/nonFungible.test.ts
@@ -15,7 +15,7 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import privateKey from '../substrate/privateKey';
-import {approveExpectSuccess, burnItemExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess, transferExpectSuccess, transferFromExpectSuccess, UNIQUE, setMetadataUpdatePermissionFlagExpectSuccess} from '../util/helpers';
+import {approveExpectSuccess, burnItemExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess, transferExpectSuccess, transferFromExpectSuccess, UNIQUE} from '../util/helpers';
 import {collectionIdToAddress, createEthAccount, createEthAccountWithBalance, GAS_ARGS, itWeb3, normalizeEvents, recordEthFee, recordEvents, subToEth, transferBalanceToEth} from './util/helpers';
 import nonFungibleAbi from './nonFungibleAbi.json';
 import {expect} from 'chai';
modifiedtests/src/eth/proxy/nonFungibleProxy.test.tsdiffbeforeafterboth
--- a/tests/src/eth/proxy/nonFungibleProxy.test.ts
+++ b/tests/src/eth/proxy/nonFungibleProxy.test.ts
@@ -15,7 +15,7 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import privateKey from '../../substrate/privateKey';
-import {createCollectionExpectSuccess, createItemExpectSuccess, setMetadataUpdatePermissionFlagExpectSuccess} from '../../util/helpers';
+import {createCollectionExpectSuccess, createItemExpectSuccess} from '../../util/helpers';
 import {collectionIdToAddress, createEthAccount, createEthAccountWithBalance, GAS_ARGS, itWeb3, normalizeEvents} from '../util/helpers';
 import nonFungibleAbi from '../nonFungibleAbi.json';
 import {expect} from 'chai';
modifiedtests/src/nesting/migration-check.test.tsdiffbeforeafterboth
--- a/tests/src/nesting/migration-check.test.ts
+++ b/tests/src/nesting/migration-check.test.ts
@@ -37,7 +37,6 @@
           accountTokenOwnershipLimit: 3,
         },
         constOnChainSchema: '0x333333',
-        metaUpdatePermission: 'Admin',
       });
       const events = await submitTransactionAsync(alice, tx);
       const result = getCreateCollectionResult(events);
modifiedtests/src/util/helpers.tsdiffbeforeafterboth
--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -650,28 +650,6 @@
   });
 }
 
-export async function setMetadataUpdatePermissionFlagExpectSuccess(sender: IKeyringPair, collectionId: number, flag: string) {
-
-  await usingApi(async (api) => {
-    const tx = api.tx.unique.setMetaUpdatePermissionFlag(collectionId, flag as any);
-    const events = await submitTransactionAsync(sender, tx);
-    const result = getGenericResult(events);
-
-    expect(result.success).to.be.true;
-  });
-}
-
-export async function setMetadataUpdatePermissionFlagExpectFailure(sender: IKeyringPair, collectionId: number, flag: string) {
-
-  await usingApi(async (api) => {
-    const tx = api.tx.unique.setMetaUpdatePermissionFlag(collectionId, flag as any);
-    const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
-    const result = getGenericResult(events);
-
-    expect(result.success).to.be.false;
-  });
-}
-
 export async function enableContractSponsoringExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, enable: boolean) {
   await usingApi(async (api) => {
     const tx = api.tx.unique.enableContractSponsoring(contractAddress, enable);