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

difftreelog

Merge branch 'develop' into fix/tests

Igor Kozyrev2021-11-16parents: #497a133 #516bf2b.patch.diff
in: master

49 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5114,7 +5114,7 @@
  "pallet-randomness-collective-flip",
  "pallet-refungible",
  "pallet-sudo",
- "pallet-template-charge-transaction",
+ "pallet-template-transaction-payment",
  "pallet-timestamp",
  "pallet-transaction-payment",
  "pallet-transaction-payment-rpc-runtime-api",
@@ -6350,9 +6350,9 @@
 ]
 
 [[package]]
-name = "pallet-template-charge-transaction"
+name = "pallet-template-transaction-payment"
 version = "3.0.0"
-source = "git+https://github.com/UniqueNetwork/pallet-sponsoring#e5d3354ab68face1b2ef709dc7f629803f56598d"
+source = "git+https://github.com/UniqueNetwork/pallet-sponsoring#ab8b91e9350a31133f3a3e4f52a84c6de4108e95"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -11696,7 +11696,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "1f559b464de2e2bdabcac6a210d12e9b5a5973c251e102c44c585c71d51bd78e"
 dependencies = [
- "cfg-if 0.1.10",
+ "cfg-if 1.0.0",
  "rand 0.8.4",
  "static_assertions",
 ]
@@ -11847,7 +11847,7 @@
 [[package]]
 name = "up-sponsorship"
 version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/pallet-sponsoring#e5d3354ab68face1b2ef709dc7f629803f56598d"
+source = "git+https://github.com/UniqueNetwork/pallet-sponsoring#ab8b91e9350a31133f3a3e4f52a84c6de4108e95"
 dependencies = [
  "impl-trait-for-tuples 0.2.1",
 ]
modifiedREADME.mddiffbeforeafterboth
--- a/README.md
+++ b/README.md
@@ -41,7 +41,7 @@
     -   Re-Fungible Token Mode
     -   Off-Chain Schema to store token image URLs
     -   Alternative economic model
-    -   White Lists and Public Mint Permission
+    -   Allow Lists and Public Mint Permission
 -   Use example: [SubstraPunks Game](https://github.com/usetech-llc/substrapunks), fully hosted on IPFS and NFT Testnet
     Blockchain.
 
modifieddoc/builders_walk_through.mddiffbeforeafterboth
--- a/doc/builders_walk_through.md
+++ b/doc/builders_walk_through.md
@@ -173,11 +173,11 @@
 6. Now select your "ZERO BALANCE" address in the drop-down list and repeat searching and adding the collection for this address.
 7. Transfer token back to your main address. Observe that despite the zero balance, the transfer is successful.
 
-### White Lists and Public Mint Permission
+### Allow Lists and Public Mint Permission
 
-We did not complete these features in time by Hackusama deadline, but because they are important for security of the network, we completed them after the deadline anyway. They can be seen in branch [feature/white_list](https://github.com/usetech-llc/nft_parachain/tree/feature/white_list). Here are the permalinks to essential functions:
+We did not complete these features in time by Hackusama deadline, but because they are important for security of the network, we completed them after the deadline anyway. They can be seen in branch [feature/allow_list](https://github.com/usetech-llc/nft_parachain/tree/feature/allow_list). Here are the permalinks to essential functions:
 
-[white_lists](https://github.com/usetech-llc/nft_parachain/blob/b7c59f0085ed2bc1922e937adf68ef4174a8ba36/pallets/nft/src/lib.rs#L659)
+[allow_lists](https://github.com/usetech-llc/nft_parachain/blob/b7c59f0085ed2bc1922e937adf68ef4174a8ba36/pallets/nft/src/lib.rs#L659)
 
 [mint_permission](https://github.com/usetech-llc/nft_parachain/blob/b7c59f0085ed2bc1922e937adf68ef4174a8ba36/pallets/nft/src/lib.rs#L373)
 
modifieddoc/economic_model.mddiffbeforeafterboth
--- a/doc/economic_model.md
+++ b/doc/economic_model.md
@@ -40,7 +40,7 @@
 
 Set the collection sponsor address. The sponsorship needs to be confirmed by sending a ConfirmSponsorship transaction
 from that address. Also, the protection measures need to be in place so that sponsor account cannot be depleted by
-malicious users. White listing is one of the measured. It can be enabled with SetPublicAccessMode method.
+malicious users. Allow listing is one of the measured. It can be enabled with SetPublicAccessMode method.
 
 ##### List of transactions
 
@@ -67,7 +67,7 @@
     Further, the logic is similar to limiting by token as above. If only one of the limits (by token or by address)
     indicates that fee should be paid by the user, the fee is paid by the user.
 -   A pallet method (SetCollectionRateLimits) will be added to set these parameters and enable rate limiting.
--   One idea to consider is deposits that must be made by an address in order to become white listed (instead of admin
+-   One idea to consider is deposits that must be made by an address in order to become allow listed (instead of admin
     review).
 
 #### Permissions
@@ -173,12 +173,12 @@
 
 #### Description
 
-Toggle between normal and white list access for the methods with access for “Anyone”. If White List mode is enabled,
-AddToWhiteList and RemoveFromWhiteList methods can be called to add to and remove addresses from the white list.
+Toggle between normal and allow list access for the methods with access for “Anyone”. If Allow List mode is enabled,
+AddToAllowList and RemoveFromAllowList methods can be called to add to and remove addresses from the allow list.
 
-White list mode is the property of collection. If it is turned on, all public operations such as token transfers, for
-example, which normally have “Anyone” permission, become white listed, i.e. are only available to collection owner,
-admins, and addresses from the white list. White lists can be helpful for rate limiting of transfers when collection
+Allow list mode is the property of collection. If it is turned on, all public operations such as token transfers, for
+example, which normally have “Anyone” permission, become allow listed, i.e. are only available to collection owner,
+admins, and addresses from the allow list. Allow lists can be helpful for rate limiting of transfers when collection
 sponsoring is enabled.
 
 #### Permissions
@@ -190,13 +190,13 @@
 -   CollectionID: ID of the Collection to set access mode for
 -   Mode
     -   0 = Normal
-    -   1 = White list
+    -   1 = Allow list
 
-### AddToWhiteList
+### AddToAllowList
 
 #### Description
 
-Add an address to white list.
+Add an address to allow list.
 
 #### Permissions
 
@@ -208,11 +208,11 @@
 -   CollectionID: ID of the Collection
 -   Address
 
-### RemoveFromWhiteList
+### RemoveFromAllowList
 
 #### Description
 
-Remove an address from white list.
+Remove an address from allow list.
 
 #### Permissions
 
modifieddoc/hackusama_walk_through.mddiffbeforeafterboth
--- a/doc/hackusama_walk_through.md
+++ b/doc/hackusama_walk_through.md
@@ -187,14 +187,14 @@
    address.
 7. Transfer token back to your main address. Observe that despite the zero balance, the transfer is successful.
 
-### White Lists and Public Mint Permission
+### Allow Lists and Public Mint Permission
 
 We did not complete these features in time by Hackusama deadline, but because they are important for security of the
 network, we completed them after the deadline anyway. They can be seen in branch
-[feature/white_list](https://github.com/usetech-llc/nft_parachain/tree/feature/white_list). Here are the permalinks to
+[feature/allow_list](https://github.com/usetech-llc/nft_parachain/tree/feature/allow_list). Here are the permalinks to
 essential functions:
 
-[white_lists](https://github.com/usetech-llc/nft_parachain/blob/b7c59f0085ed2bc1922e937adf68ef4174a8ba36/pallets/nft/src/lib.rs#L659)
+[allow_lists](https://github.com/usetech-llc/nft_parachain/blob/b7c59f0085ed2bc1922e937adf68ef4174a8ba36/pallets/nft/src/lib.rs#L659)
 
 [mint_permission](https://github.com/usetech-llc/nft_parachain/blob/b7c59f0085ed2bc1922e937adf68ef4174a8ba36/pallets/nft/src/lib.rs#L373)
 
modifieddoc/milestone_1.mddiffbeforeafterboth
--- a/doc/milestone_1.md
+++ b/doc/milestone_1.md
@@ -1,38 +1,38 @@
 ## Milestone 1
 
-**User Paid Fees and Sponsored. Finish/Debug white listing and spam/DOS protection**
+**User Paid Fees and Sponsored. Finish/Debug allow listing and spam/DOS protection**
 
 Implementation of two models 
 If collection sponsor is set and confirmed for collection instance that means Sponsored Economic Model has chosen. Otherwise default economic model User Paid Fees is set.
-For Sponsored Economic Model exists timeouts for token transactions. For every NFT type timeouts defined separately. Timeouts and white list limits together prevented spam and malicious actions.
+For Sponsored Economic Model exists timeouts for token transactions. For every NFT type timeouts defined separately. Timeouts and allow list limits together prevented spam and malicious actions.
 
 Set sponsor
 `nft`.`set_collection_sponsor`
 Confirm sponsor
 `nft`.`confirm_sponsorship`
 
-A white list mode presented by collection property `access` and can be enabled with `set_public_access_mode`. Rules provide spam/DOS protection
-While collection in the white list mode rules below are active:
-Owner can add address to white list
-Admin can add address to white list
-Non-privileged user cannot add address to white list
-Owner can remove address from white list
-Admin can remove address from white list
-Non-privileged user cannot remove address from white list
-If Public Access mode is set to WhiteList, tokens can’t be transferred from a non-whitelisted address with transfer or transferFrom
-If Public Access mode is set to WhiteList, tokens can’t be transferred to a non-whitelisted address with transfer or transferFrom
-If Public Access mode is set to WhiteList, tokens can’t be destroyed by a non-whitelisted address (even if it owned them before enabling WhiteList mode)
-If Public Access mode is set to WhiteList, token transfers can’t be Approved by a non-whitelisted address (see Approve method).
-If Public Access mode is set to WhiteList, tokens can be transferred to a whitelisted address with transfer or transferFrom
-If Public Access mode is set to WhiteList, tokens can be transferred from a whitelisted address with transfer or transferFrom 
-If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens can be created by owner.
-If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens can be created by admin.
-If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens cannot be created by non-privileged and white listed address.
-If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens cannot be created by non-privileged and non-white listed address.
-If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by owner.
-If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by admin.
-If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens cannot be created by non-privileged and non-white listed address.
-If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by non-privileged and white listed address.
+A allow list mode presented by collection property `access` and can be enabled with `set_public_access_mode`. Rules provide spam/DOS protection
+While collection in the allow list mode rules below are active:
+Owner can add address to allow list
+Admin can add address to allow list
+Non-privileged user cannot add address to allow list
+Owner can remove address from allow list
+Admin can remove address from allow list
+Non-privileged user cannot remove address from allow list
+If Public Access mode is set to AllowList, tokens can’t be transferred from a non-allowlisted address with transfer or transferFrom
+If Public Access mode is set to AllowList, tokens can’t be transferred to a non-allowlisted address with transfer or transferFrom
+If Public Access mode is set to AllowList, tokens can’t be destroyed by a non-allowlisted address (even if it owned them before enabling AllowList mode)
+If Public Access mode is set to AllowList, token transfers can’t be Approved by a non-allowlisted address (see Approve method).
+If Public Access mode is set to AllowList, tokens can be transferred to a allowlisted address with transfer or transferFrom
+If Public Access mode is set to AllowList, tokens can be transferred from a allowlisted address with transfer or transferFrom 
+If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by owner.
+If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by admin.
+If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and allow listed address.
+If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and non-allow listed address.
+If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by owner.
+If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by admin.
+If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens cannot be created by non-privileged and non-allow listed address.
+If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by non-privileged and allow listed address.
 
 **Add missing custom types (CollectionMode, FungibleItemType, ReFungibleItemType)**
 
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -260,7 +260,7 @@
 		NoPermission,
 		/// Collection is not in mint mode.
 		PublicMintingNotAllowed,
-		/// Address is not in white list.
+		/// Address is not in allow list.
 		AddressNotInAllowlist,
 
 		/// Collection name can not be longer than 63 char.
modifiedpallets/fungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/fungible/src/lib.rs
+++ b/pallets/fungible/src/lib.rs
@@ -123,7 +123,7 @@
 			.checked_sub(amount)
 			.ok_or(<CommonError<T>>::TokenValueTooLow)?;
 
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			collection.check_allowlist(owner)?;
 		}
 
@@ -161,7 +161,7 @@
 			<CommonError<T>>::TransferNotAllowed,
 		);
 
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			collection.check_allowlist(from)?;
 			collection.check_allowlist(to)?;
 		}
@@ -307,7 +307,7 @@
 		spender: &T::CrossAccountId,
 		amount: u128,
 	) -> DispatchResult {
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			collection.check_allowlist(&owner)?;
 			collection.check_allowlist(&spender)?;
 		}
@@ -335,7 +335,7 @@
 		if spender.conv_eq(from) {
 			return Self::transfer(collection, from, to, amount);
 		}
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			// `from`, `to` checked in [`transfer`]
 			collection.check_allowlist(spender)?;
 		}
@@ -366,7 +366,7 @@
 		if spender.conv_eq(from) {
 			return Self::burn(collection, from, amount);
 		}
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			// `from` checked in [`burn`]
 			collection.check_allowlist(spender)?;
 		}
modifiedpallets/nft/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/nft/src/benchmarking.rs
+++ b/pallets/nft/src/benchmarking.rs
@@ -55,23 +55,23 @@
 		let collection = create_nft_collection::<T>(caller.clone())?;
 	}: _(RawOrigin::Signed(caller.clone()), collection)
 
-	add_to_white_list {
+	add_to_allow_list {
 		let caller: T::AccountId = account("caller", 0, SEED);
-		let whitelist_account: T::AccountId = account("admin", 0, SEED);
+		let allowlist_account: T::AccountId = account("admin", 0, SEED);
 		let collection = create_nft_collection::<T>(caller.clone())?;
-	}: _(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(whitelist_account))
+	}: _(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(allowlist_account))
 
-	remove_from_white_list {
+	remove_from_allow_list {
 		let caller: T::AccountId = account("caller", 0, SEED);
-		let whitelist_account: T::AccountId = account("admin", 0, SEED);
+		let allowlist_account: T::AccountId = account("admin", 0, SEED);
 		let collection = create_nft_collection::<T>(caller.clone())?;
-		<Pallet<T>>::add_to_white_list(RawOrigin::Signed(caller.clone()).into(), collection, T::CrossAccountId::from_sub(whitelist_account.clone()))?;
-	}: _(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(whitelist_account))
+		<Pallet<T>>::add_to_allow_list(RawOrigin::Signed(caller.clone()).into(), collection, T::CrossAccountId::from_sub(allowlist_account.clone()))?;
+	}: _(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(allowlist_account))
 
 	set_public_access_mode {
 		let caller: T::AccountId = account("caller", 0, SEED);
 		let collection = create_nft_collection::<T>(caller.clone())?;
-	}: _(RawOrigin::Signed(caller.clone()), collection, AccessMode::WhiteList)
+	}: _(RawOrigin::Signed(caller.clone()), collection, AccessMode::AllowList)
 
 	set_mint_permission {
 		let caller: T::AccountId = account("caller", 0, SEED);
modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
--- a/pallets/nft/src/lib.rs
+++ b/pallets/nft/src/lib.rs
@@ -256,7 +256,7 @@
 			Ok(())
 		}
 
-		/// Add an address to white list.
+		/// Add an address to allow list.
 		///
 		/// # Permissions
 		///
@@ -268,9 +268,9 @@
 		/// * collection_id.
 		///
 		/// * address.
-		#[weight = <SelfWeightOf<T>>::add_to_white_list()]
+		#[weight = <SelfWeightOf<T>>::add_to_allow_list()]
 		#[transactional]
-		pub fn add_to_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{
+		pub fn add_to_allow_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{
 
 			let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
 			let collection = <CollectionHandle<T>>::try_get(collection_id)?;
@@ -285,7 +285,7 @@
 			Ok(())
 		}
 
-		/// Remove an address from white list.
+		/// Remove an address from allow list.
 		///
 		/// # Permissions
 		///
@@ -297,9 +297,9 @@
 		/// * collection_id.
 		///
 		/// * address.
-		#[weight = <SelfWeightOf<T>>::remove_from_white_list()]
+		#[weight = <SelfWeightOf<T>>::remove_from_allow_list()]
 		#[transactional]
-		pub fn remove_from_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{
+		pub fn remove_from_allow_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{
 
 			let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
 			let collection = <CollectionHandle<T>>::try_get(collection_id)?;
@@ -314,7 +314,7 @@
 			Ok(())
 		}
 
-		/// Toggle between normal and white list access for the methods with access for `Anyone`.
+		/// Toggle between normal and allow list access for the methods with access for `Anyone`.
 		///
 		/// # Permissions
 		///
@@ -339,8 +339,8 @@
 		}
 
 		/// Allows Anyone to create tokens if:
-		/// * White List is enabled, and
-		/// * Address is added to white list, and
+		/// * Allow List is enabled, and
+		/// * Address is added to allow list, and
 		/// * This method was called with True parameter
 		///
 		/// # Permissions
@@ -502,8 +502,8 @@
 		/// * Collection Owner.
 		/// * Collection Admin.
 		/// * Anyone if
-		///     * White List is enabled, and
-		///     * Address is added to white list, and
+		///     * Allow List is enabled, and
+		///     * Address is added to allow list, and
 		///     * MintPermission is enabled (see SetMintPermission method)
 		///
 		/// # Arguments
@@ -528,8 +528,8 @@
 		/// * Collection Owner.
 		/// * Collection Admin.
 		/// * Anyone if
-		///     * White List is enabled, and
-		///     * Address is added to white list, and
+		///     * Allow List is enabled, and
+		///     * Address is added to allow list, and
 		///     * MintPermission is enabled (see SetMintPermission method)
 		///
 		/// # Arguments
modifiedpallets/nft/src/tests.rsdiffbeforeafterboth
before · pallets/nft/src/tests.rs
1// Tests to be written here2use super::*;3use crate::mock::*;4use crate::{AccessMode, CollectionMode, Ownership, CreateItemData};5use nft_data_structs::{6	CreateNftData, CreateFungibleData, CreateReFungibleData, CollectionId, TokenId,7	MAX_DECIMAL_POINTS,8};9use frame_support::{assert_noop, assert_ok};10use sp_std::convert::TryInto;1112fn default_nft_data() -> CreateNftData {13	CreateNftData {14		const_data: vec![1, 2, 3].try_into().unwrap(),15		variable_data: vec![3, 2, 1].try_into().unwrap(),16	}17}1819fn default_fungible_data() -> CreateFungibleData {20	CreateFungibleData { value: 5 }21}2223fn default_re_fungible_data() -> CreateReFungibleData {24	CreateReFungibleData {25		const_data: vec![1, 2, 3].try_into().unwrap(),26		variable_data: vec![3, 2, 1].try_into().unwrap(),27		pieces: 1023,28	}29}3031fn create_test_collection_for_owner(32	mode: &CollectionMode,33	owner: u64,34	id: CollectionId,35) -> CollectionId {36	let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();37	let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();38	let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();3940	let origin1 = Origin::signed(owner);41	assert_ok!(TemplateModule::create_collection(42		origin1,43		col_name1,44		col_desc1,45		token_prefix1,46		mode.clone()47	));4849	let saved_col_name: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();50	let saved_description: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();51	let saved_prefix: Vec<u8> = b"token_prefix1\0".to_vec();52	assert_eq!(TemplateModule::collection_id(id).unwrap().owner, owner);53	assert_eq!(54		TemplateModule::collection_id(id).unwrap().name,55		saved_col_name56	);57	assert_eq!(TemplateModule::collection_id(id).unwrap().mode, *mode);58	assert_eq!(59		TemplateModule::collection_id(id).unwrap().description,60		saved_description61	);62	assert_eq!(63		TemplateModule::collection_id(id).unwrap().token_prefix,64		saved_prefix65	);66	id67}6869fn create_test_collection(mode: &CollectionMode, id: CollectionId) -> CollectionId {70	create_test_collection_for_owner(&mode, 1, id)71}7273fn create_test_item(collection_id: CollectionId, data: &CreateItemData) {74	let origin1 = Origin::signed(1);75	assert_ok!(TemplateModule::create_item(76		origin1,77		collection_id,78		account(1),79		data.clone()80	));81}8283fn account(sub: u64) -> TestCrossAccountId {84	TestCrossAccountId::from_sub(sub)85}8687// Use cases tests region88// #region8990#[test]91fn set_version_schema() {92	new_test_ext().execute_with(|| {93		let origin1 = Origin::signed(1);94		let collection_id = create_test_collection(&CollectionMode::NFT, 1);9596		assert_ok!(TemplateModule::set_schema_version(97			origin1,98			collection_id,99			SchemaVersion::Unique100		));101		assert_eq!(102			TemplateModule::collection_id(collection_id)103				.unwrap()104				.schema_version,105			SchemaVersion::Unique106		);107	});108}109110#[test]111fn create_fungible_collection_fails_with_large_decimal_numbers() {112	new_test_ext().execute_with(|| {113		let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();114		let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();115		let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();116117		let origin1 = Origin::signed(1);118		assert_noop!(119			TemplateModule::create_collection(120				origin1,121				col_name1,122				col_desc1,123				token_prefix1,124				CollectionMode::Fungible(MAX_DECIMAL_POINTS + 1)125			),126			Error::<Test>::CollectionDecimalPointLimitExceeded127		);128	});129}130131#[test]132fn create_nft_item() {133	new_test_ext().execute_with(|| {134		let collection_id = create_test_collection(&CollectionMode::NFT, 1);135136		let data = default_nft_data();137		create_test_item(collection_id, &data.clone().into());138		let item = TemplateModule::nft_item_id(collection_id, 1).unwrap();139		assert_eq!(item.const_data, data.const_data.into_inner());140		assert_eq!(item.variable_data, data.variable_data.into_inner());141	});142}143144// Use cases tests region145// #region146#[test]147fn create_nft_multiple_items() {148	new_test_ext().execute_with(|| {149		create_test_collection(&CollectionMode::NFT, 1);150151		let origin1 = Origin::signed(1);152153		let items_data = vec![default_nft_data(), default_nft_data(), default_nft_data()];154155		assert_ok!(TemplateModule::create_multiple_items(156			origin1,157			1,158			account(1),159			items_data160				.clone()161				.into_iter()162				.map(|d| { d.into() })163				.collect()164		));165		for (index, data) in items_data.into_iter().enumerate() {166			let item = TemplateModule::nft_item_id(1, (index + 1) as TokenId).unwrap();167			assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());168			assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());169		}170	});171}172173#[test]174fn create_refungible_item() {175	new_test_ext().execute_with(|| {176		let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);177178		let data = default_re_fungible_data();179		create_test_item(collection_id, &data.clone().into());180		let item = TemplateModule::refungible_item_id(collection_id, 1).unwrap();181		assert_eq!(item.const_data, data.const_data.into_inner());182		assert_eq!(item.variable_data, data.variable_data.into_inner());183		assert_eq!(184			item.owner[0],185			Ownership {186				owner: account(1),187				fraction: 1023188			}189		);190	});191}192193#[test]194fn create_multiple_refungible_items() {195	new_test_ext().execute_with(|| {196		create_test_collection(&CollectionMode::ReFungible, 1);197198		let origin1 = Origin::signed(1);199200		let items_data = vec![201			default_re_fungible_data(),202			default_re_fungible_data(),203			default_re_fungible_data(),204		];205206		assert_ok!(TemplateModule::create_multiple_items(207			origin1,208			1,209			account(1),210			items_data211				.clone()212				.into_iter()213				.map(|d| { d.into() })214				.collect()215		));216		for (index, data) in items_data.into_iter().enumerate() {217			let item = TemplateModule::refungible_item_id(1, (index + 1) as TokenId).unwrap();218			assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());219			assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());220			assert_eq!(221				item.owner[0],222				Ownership {223					owner: account(1),224					fraction: 1023225				}226			);227		}228	});229}230231#[test]232fn create_fungible_item() {233	new_test_ext().execute_with(|| {234		let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);235236		let data = default_fungible_data();237		create_test_item(collection_id, &data.into());238239		assert_eq!(TemplateModule::fungible_item_id(collection_id, 1).value, 5);240	});241}242243//#[test]244// fn create_multiple_fungible_items() {245//     new_test_ext().execute_with(|| {246//         default_limits();247248//         create_test_collection(&CollectionMode::Fungible(3), 1);249250//         let origin1 = Origin::signed(1);251252//         let items_data = vec![default_fungible_data(), default_fungible_data(), default_fungible_data()];253254//         assert_ok!(TemplateModule::create_multiple_items(255//             origin1.clone(),256//             1,257//             1,258//             items_data.clone().into_iter().map(|d| { d.into() }).collect()259//         ));260261//         for (index, _) in items_data.iter().enumerate() {262//             assert_eq!(TemplateModule::fungible_item_id(1, (index + 1) as TokenId).value, 5);263//         }264//         assert_eq!(TemplateModule::balance_count(1, 1), 3000);265//         assert_eq!(TemplateModule::address_tokens(1, 1), [1, 2, 3]);266//     });267// }268269#[test]270fn transfer_fungible_item() {271	new_test_ext().execute_with(|| {272		let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);273274		let origin1 = Origin::signed(1);275		let origin2 = Origin::signed(2);276277		let data = default_fungible_data();278		create_test_item(collection_id, &data.into());279280		assert_eq!(TemplateModule::fungible_item_id(1, 1).value, 5);281		assert_eq!(TemplateModule::balance_count(1, 1), 5);282283		// change owner scenario284		assert_ok!(TemplateModule::transfer(origin1, account(2), 1, 1, 5));285		assert_eq!(TemplateModule::fungible_item_id(1, 1).value, 0);286		assert_eq!(TemplateModule::balance_count(1, 1), 0);287		assert_eq!(TemplateModule::balance_count(1, 2), 5);288289		// split item scenario290		assert_ok!(TemplateModule::transfer(291			origin2.clone(),292			account(3),293			1,294			1,295			3296		));297		assert_eq!(TemplateModule::balance_count(1, 2), 2);298		assert_eq!(TemplateModule::balance_count(1, 3), 3);299300		// split item and new owner has account scenario301		assert_ok!(TemplateModule::transfer(origin2, account(3), 1, 1, 1));302		assert_eq!(TemplateModule::fungible_item_id(1, 2).value, 1);303		assert_eq!(TemplateModule::fungible_item_id(1, 3).value, 4);304		assert_eq!(TemplateModule::balance_count(1, 2), 1);305		assert_eq!(TemplateModule::balance_count(1, 3), 4);306	});307}308309#[test]310fn transfer_refungible_item() {311	new_test_ext().execute_with(|| {312		let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);313314		let data = default_re_fungible_data();315		create_test_item(collection_id, &data.clone().into());316317		let origin1 = Origin::signed(1);318		let origin2 = Origin::signed(2);319		{320			let item = TemplateModule::refungible_item_id(collection_id, 1).unwrap();321			assert_eq!(item.const_data, data.const_data.into_inner());322			assert_eq!(item.variable_data, data.variable_data.into_inner());323			assert_eq!(324				item.owner[0],325				Ownership {326					owner: account(1),327					fraction: 1023328				}329			);330		}331		assert_eq!(TemplateModule::balance_count(1, 1), 1023);332		assert_eq!(TemplateModule::address_tokens(1, 1), [1]);333334		// change owner scenario335		assert_ok!(TemplateModule::transfer(origin1, account(2), 1, 1, 1023));336		assert_eq!(337			TemplateModule::refungible_item_id(1, 1).unwrap().owner[0],338			Ownership {339				owner: account(2),340				fraction: 1023341			}342		);343		assert_eq!(TemplateModule::balance_count(1, 1), 0);344		assert_eq!(TemplateModule::balance_count(1, 2), 1023);345		// assert_eq!(TemplateModule::address_tokens(1, 1), []);346		assert_eq!(TemplateModule::address_tokens(1, 2), [1]);347348		// split item scenario349		assert_ok!(TemplateModule::transfer(350			origin2.clone(),351			account(3),352			1,353			1,354			500355		));356		{357			let item = TemplateModule::refungible_item_id(1, 1).unwrap();358			assert_eq!(359				item.owner[0],360				Ownership {361					owner: account(2),362					fraction: 523363				}364			);365			assert_eq!(366				item.owner[1],367				Ownership {368					owner: account(3),369					fraction: 500370				}371			);372		}373		assert_eq!(TemplateModule::balance_count(1, 2), 523);374		assert_eq!(TemplateModule::balance_count(1, 3), 500);375		assert_eq!(TemplateModule::address_tokens(1, 2), [1]);376		assert_eq!(TemplateModule::address_tokens(1, 3), [1]);377378		// split item and new owner has account scenario379		assert_ok!(TemplateModule::transfer(origin2, account(3), 1, 1, 200));380		{381			let item = TemplateModule::refungible_item_id(1, 1).unwrap();382			assert_eq!(383				item.owner[0],384				Ownership {385					owner: account(2),386					fraction: 323387				}388			);389			assert_eq!(390				item.owner[1],391				Ownership {392					owner: account(3),393					fraction: 700394				}395			);396		}397		assert_eq!(TemplateModule::balance_count(1, 2), 323);398		assert_eq!(TemplateModule::balance_count(1, 3), 700);399		assert_eq!(TemplateModule::address_tokens(1, 2), [1]);400		assert_eq!(TemplateModule::address_tokens(1, 3), [1]);401	});402}403404#[test]405fn transfer_nft_item() {406	new_test_ext().execute_with(|| {407		let collection_id = create_test_collection(&CollectionMode::NFT, 1);408409		let data = default_nft_data();410		create_test_item(collection_id, &data.into());411		assert_eq!(TemplateModule::balance_count(1, 1), 1);412		assert_eq!(TemplateModule::address_tokens(1, 1), [1]);413414		let origin1 = Origin::signed(1);415		// default scenario416		assert_ok!(TemplateModule::transfer(origin1, account(2), 1, 1, 1000));417		assert_eq!(TemplateModule::nft_item_id(1, 1).unwrap().owner, account(2));418		assert_eq!(TemplateModule::balance_count(1, 1), 0);419		assert_eq!(TemplateModule::balance_count(1, 2), 1);420		// assert_eq!(TemplateModule::address_tokens(1, 1), []);421		assert_eq!(TemplateModule::address_tokens(1, 2), [1]);422	});423}424425#[test]426fn nft_approve_and_transfer_from() {427	new_test_ext().execute_with(|| {428		let collection_id = create_test_collection(&CollectionMode::NFT, 1);429430		let data = default_nft_data();431		create_test_item(collection_id, &data.into());432433		let origin1 = Origin::signed(1);434		let origin2 = Origin::signed(2);435436		assert_eq!(TemplateModule::balance_count(1, 1), 1);437		assert_eq!(TemplateModule::address_tokens(1, 1), [1]);438439		// neg transfer440		assert_noop!(441			TemplateModule::transfer_from(origin2.clone(), account(1), account(2), 1, 1, 1),442			Error::<Test>::NoPermission443		);444445		// do approve446		assert_ok!(TemplateModule::approve(origin1, account(2), 1, 1, 5));447		assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 5);448		assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 5);449450		assert_ok!(TemplateModule::transfer_from(451			origin2,452			account(1),453			account(3),454			1,455			1,456			1457		));458		assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 4);459	});460}461462#[test]463fn nft_approve_and_transfer_from_white_list() {464	new_test_ext().execute_with(|| {465		let collection_id = create_test_collection(&CollectionMode::NFT, 1);466467		let origin1 = Origin::signed(1);468		let origin2 = Origin::signed(2);469470		let data = default_nft_data();471		create_test_item(collection_id, &data.clone().into());472473		assert_eq!(474			&TemplateModule::nft_item_id(1, 1).unwrap().const_data,475			&data.const_data.into_inner()476		);477		assert_eq!(TemplateModule::balance_count(1, 1), 1);478		assert_eq!(TemplateModule::address_tokens(1, 1), [1]);479480		assert_ok!(TemplateModule::set_mint_permission(481			origin1.clone(),482			1,483			true484		));485		assert_ok!(TemplateModule::set_public_access_mode(486			origin1.clone(),487			1,488			AccessMode::WhiteList489		));490		assert_ok!(TemplateModule::add_to_white_list(491			origin1.clone(),492			1,493			account(1)494		));495		assert_ok!(TemplateModule::add_to_white_list(496			origin1.clone(),497			1,498			account(2)499		));500		assert_ok!(TemplateModule::add_to_white_list(501			origin1.clone(),502			1,503			account(3)504		));505506		// do approve507		assert_ok!(TemplateModule::approve(508			origin1.clone(),509			account(2),510			1,511			1,512			5513		));514		assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 5);515		assert_ok!(TemplateModule::approve(origin1, account(3), 1, 1, 5));516		assert_eq!(TemplateModule::approved(1, (1, 1, 3)), 5);517518		assert_ok!(TemplateModule::transfer_from(519			origin2,520			account(1),521			account(3),522			1,523			1,524			1525		));526		assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 4);527	});528}529530#[test]531fn refungible_approve_and_transfer_from() {532	new_test_ext().execute_with(|| {533		let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);534535		let origin1 = Origin::signed(1);536		let origin2 = Origin::signed(2);537538		let data = default_re_fungible_data();539		create_test_item(collection_id, &data.into());540541		assert_eq!(TemplateModule::balance_count(1, 1), 1023);542		assert_eq!(TemplateModule::address_tokens(1, 1), [1]);543544		assert_ok!(TemplateModule::set_mint_permission(545			origin1.clone(),546			1,547			true548		));549		assert_ok!(TemplateModule::set_public_access_mode(550			origin1.clone(),551			1,552			AccessMode::WhiteList553		));554		assert_ok!(TemplateModule::add_to_white_list(555			origin1.clone(),556			1,557			account(1)558		));559		assert_ok!(TemplateModule::add_to_white_list(560			origin1.clone(),561			1,562			account(2)563		));564		assert_ok!(TemplateModule::add_to_white_list(565			origin1.clone(),566			1,567			account(3)568		));569570		// do approve571		assert_ok!(TemplateModule::approve(origin1, account(2), 1, 1, 1023));572		assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 1023);573574		assert_ok!(TemplateModule::transfer_from(575			origin2,576			account(1),577			account(3),578			1,579			1,580			100581		));582		assert_eq!(TemplateModule::balance_count(1, 1), 923);583		assert_eq!(TemplateModule::balance_count(1, 3), 100);584		assert_eq!(TemplateModule::address_tokens(1, 1), [1]);585		assert_eq!(TemplateModule::address_tokens(1, 3), [1]);586587		assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 923);588	});589}590591#[test]592fn fungible_approve_and_transfer_from() {593	new_test_ext().execute_with(|| {594		let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);595596		let data = default_fungible_data();597		create_test_item(collection_id, &data.into());598599		let origin1 = Origin::signed(1);600		let origin2 = Origin::signed(2);601602		assert_eq!(TemplateModule::balance_count(1, 1), 5);603604		assert_ok!(TemplateModule::set_mint_permission(605			origin1.clone(),606			1,607			true608		));609		assert_ok!(TemplateModule::set_public_access_mode(610			origin1.clone(),611			1,612			AccessMode::WhiteList613		));614		assert_ok!(TemplateModule::add_to_white_list(615			origin1.clone(),616			1,617			account(1)618		));619		assert_ok!(TemplateModule::add_to_white_list(620			origin1.clone(),621			1,622			account(2)623		));624		assert_ok!(TemplateModule::add_to_white_list(625			origin1.clone(),626			1,627			account(3)628		));629630		// do approve631		assert_ok!(TemplateModule::approve(632			origin1.clone(),633			account(2),634			1,635			1,636			5637		));638		assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 5);639		assert_ok!(TemplateModule::approve(origin1, account(3), 1, 1, 5));640		assert_eq!(TemplateModule::approved(1, (1, 1, 3)), 5);641		assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 5);642643		assert_ok!(TemplateModule::transfer_from(644			origin2.clone(),645			account(1),646			account(3),647			1,648			1,649			4650		));651		assert_eq!(TemplateModule::balance_count(1, 1), 1);652		assert_eq!(TemplateModule::balance_count(1, 3), 4);653654		assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 1);655656		assert_noop!(657			TemplateModule::transfer_from(origin2, account(1), account(3), 1, 1, 4),658			Error::<Test>::NoPermission659		);660	});661}662663#[test]664fn change_collection_owner() {665	new_test_ext().execute_with(|| {666		let collection_id = create_test_collection(&CollectionMode::NFT, 1);667668		let origin1 = Origin::signed(1);669		assert_ok!(TemplateModule::change_collection_owner(670			origin1,671			collection_id,672			2673		));674		assert_eq!(675			TemplateModule::collection_id(collection_id).unwrap().owner,676			2677		);678	});679}680681#[test]682fn destroy_collection() {683	new_test_ext().execute_with(|| {684		let collection_id = create_test_collection(&CollectionMode::NFT, 1);685686		let origin1 = Origin::signed(1);687		assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));688	});689}690691#[test]692fn burn_nft_item() {693	new_test_ext().execute_with(|| {694		let collection_id = create_test_collection(&CollectionMode::NFT, 1);695696		let origin1 = Origin::signed(1);697		assert_ok!(TemplateModule::add_collection_admin(698			origin1.clone(),699			collection_id,700			account(2)701		));702703		let data = default_nft_data();704		create_test_item(collection_id, &data.into());705706		// check balance (collection with id = 1, user id = 1)707		assert_eq!(TemplateModule::balance_count(1, 1), 1);708709		// burn item710		assert_ok!(TemplateModule::burn_item(711			origin1.clone(),712			collection_id,713			1,714			1715		));716		assert_noop!(717			TemplateModule::burn_item(origin1, collection_id, 1, 1),718			Error::<Test>::TokenNotFound719		);720721		assert_eq!(TemplateModule::balance_count(1, 1), 0);722	});723}724725#[test]726fn burn_fungible_item() {727	new_test_ext().execute_with(|| {728		let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);729730		let origin1 = Origin::signed(1);731		assert_ok!(TemplateModule::add_collection_admin(732			origin1.clone(),733			collection_id,734			account(2)735		));736737		let data = default_fungible_data();738		create_test_item(collection_id, &data.into());739740		// check balance (collection with id = 1, user id = 1)741		assert_eq!(TemplateModule::balance_count(1, 1), 5);742743		// burn item744		assert_ok!(TemplateModule::burn_item(origin1.clone(), 1, 1, 5));745		assert_noop!(746			TemplateModule::burn_item(origin1, 1, 1, 5),747			Error::<Test>::TokenValueNotEnough748		);749750		assert_eq!(TemplateModule::balance_count(1, 1), 0);751	});752}753754#[test]755fn burn_refungible_item() {756	new_test_ext().execute_with(|| {757		let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);758		let origin1 = Origin::signed(1);759760		assert_ok!(TemplateModule::set_mint_permission(761			origin1.clone(),762			collection_id,763			true764		));765		assert_ok!(TemplateModule::set_public_access_mode(766			origin1.clone(),767			collection_id,768			AccessMode::WhiteList769		));770		assert_ok!(TemplateModule::add_to_white_list(771			origin1.clone(),772			1,773			account(1)774		));775776		assert_ok!(TemplateModule::add_collection_admin(777			origin1.clone(),778			1,779			account(2)780		));781782		let data = default_re_fungible_data();783		create_test_item(collection_id, &data.into());784785		// check balance (collection with id = 1, user id = 2)786		assert_eq!(TemplateModule::balance_count(1, 1), 1023);787788		// burn item789		assert_ok!(TemplateModule::burn_item(origin1.clone(), 1, 1, 1023));790		assert_noop!(791			TemplateModule::burn_item(origin1, 1, 1, 1023),792			Error::<Test>::TokenNotFound793		);794795		assert_eq!(TemplateModule::balance_count(1, 1), 0);796	});797}798799#[test]800fn add_collection_admin() {801	new_test_ext().execute_with(|| {802		let collection1_id = create_test_collection_for_owner(&CollectionMode::NFT, 1, 1);803		create_test_collection_for_owner(&CollectionMode::NFT, 2, 2);804		create_test_collection_for_owner(&CollectionMode::NFT, 3, 3);805806		let origin1 = Origin::signed(1);807808		// collection admin809		assert_ok!(TemplateModule::add_collection_admin(810			origin1.clone(),811			collection1_id,812			account(2)813		));814		assert_ok!(TemplateModule::add_collection_admin(815			origin1,816			collection1_id,817			account(3)818		));819820		assert!(TemplateModule::admin_list_collection(collection1_id).contains(&account(2)),);821		assert!(TemplateModule::admin_list_collection(collection1_id).contains(&account(3)),);822	});823}824825#[test]826fn remove_collection_admin() {827	new_test_ext().execute_with(|| {828		let collection1_id = create_test_collection_for_owner(&CollectionMode::NFT, 1, 1);829		create_test_collection_for_owner(&CollectionMode::NFT, 2, 2);830		create_test_collection_for_owner(&CollectionMode::NFT, 3, 3);831832		let origin1 = Origin::signed(1);833		let origin2 = Origin::signed(2);834835		// collection admin836		assert_ok!(TemplateModule::add_collection_admin(837			origin1.clone(),838			collection1_id,839			account(2)840		));841		assert_ok!(TemplateModule::add_collection_admin(842			origin1,843			collection1_id,844			account(3)845		));846847		assert!(TemplateModule::admin_list_collection(1).contains(&account(2)),);848		assert!(TemplateModule::admin_list_collection(1).contains(&account(3)),);849850		// remove admin851		assert_ok!(TemplateModule::remove_collection_admin(852			origin2,853			1,854			account(3)855		));856		assert!(!TemplateModule::admin_list_collection(1).contains(&account(3)),);857	});858}859860#[test]861fn balance_of() {862	new_test_ext().execute_with(|| {863		let nft_collection_id = create_test_collection(&CollectionMode::NFT, 1);864		let fungible_collection_id = create_test_collection(&CollectionMode::Fungible(3), 2);865		let re_fungible_collection_id = create_test_collection(&CollectionMode::ReFungible, 3);866867		// check balance before868		assert_eq!(TemplateModule::balance_count(nft_collection_id, 1), 0);869		assert_eq!(TemplateModule::balance_count(fungible_collection_id, 1), 0);870		assert_eq!(871			TemplateModule::balance_count(re_fungible_collection_id, 1),872			0873		);874875		let nft_data = default_nft_data();876		create_test_item(nft_collection_id, &nft_data.into());877878		let fungible_data = default_fungible_data();879		create_test_item(fungible_collection_id, &fungible_data.into());880881		let re_fungible_data = default_re_fungible_data();882		create_test_item(re_fungible_collection_id, &re_fungible_data.into());883884		// check balance (collection with id = 1, user id = 1)885		assert_eq!(TemplateModule::balance_count(nft_collection_id, 1), 1);886		assert_eq!(TemplateModule::balance_count(fungible_collection_id, 1), 5);887		assert_eq!(888			TemplateModule::balance_count(re_fungible_collection_id, 1),889			1023890		);891		assert_eq!(892			TemplateModule::nft_item_id(nft_collection_id, 1)893				.unwrap()894				.owner,895			account(1)896		);897		assert_eq!(898			TemplateModule::fungible_item_id(fungible_collection_id, 1).value,899			5900		);901		assert_eq!(902			TemplateModule::refungible_item_id(re_fungible_collection_id, 1)903				.unwrap()904				.owner[0]905				.owner,906			account(1)907		);908	});909}910911#[test]912fn approve() {913	new_test_ext().execute_with(|| {914		let collection_id = create_test_collection(&CollectionMode::NFT, 1);915916		let data = default_nft_data();917		create_test_item(collection_id, &data.into());918919		let origin1 = Origin::signed(1);920921		// approve922		assert_ok!(TemplateModule::approve(origin1, account(2), 1, 1, 1));923		assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 1);924	});925}926927#[test]928fn transfer_from() {929	new_test_ext().execute_with(|| {930		let collection_id = create_test_collection(&CollectionMode::NFT, 1);931		let origin1 = Origin::signed(1);932		let origin2 = Origin::signed(2);933934		let data = default_nft_data();935		create_test_item(collection_id, &data.into());936937		// approve938		assert_ok!(TemplateModule::approve(939			origin1.clone(),940			account(2),941			1,942			1,943			1944		));945		assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 1);946947		assert_ok!(TemplateModule::set_mint_permission(948			origin1.clone(),949			1,950			true951		));952		assert_ok!(TemplateModule::set_public_access_mode(953			origin1.clone(),954			1,955			AccessMode::WhiteList956		));957		assert_ok!(TemplateModule::add_to_white_list(958			origin1.clone(),959			1,960			account(1)961		));962		assert_ok!(TemplateModule::add_to_white_list(963			origin1.clone(),964			1,965			account(2)966		));967		assert_ok!(TemplateModule::add_to_white_list(origin1, 1, account(3)));968969		assert_ok!(TemplateModule::transfer_from(970			origin2,971			account(1),972			account(2),973			1,974			1,975			1976		));977978		// after transfer979		assert_eq!(TemplateModule::balance_count(1, 1), 0);980		assert_eq!(TemplateModule::balance_count(1, 2), 1);981	});982}983984// #endregion985986// Coverage tests region987// #region988989#[test]990fn owner_can_add_address_to_white_list() {991	new_test_ext().execute_with(|| {992		let collection_id = create_test_collection(&CollectionMode::NFT, 1);993994		let origin1 = Origin::signed(1);995		assert_ok!(TemplateModule::add_to_white_list(996			origin1,997			collection_id,998			account(2)999		));1000		assert!(TemplateModule::white_list(collection_id, 2));1001	});1002}10031004#[test]1005fn admin_can_add_address_to_white_list() {1006	new_test_ext().execute_with(|| {1007		let collection_id = create_test_collection(&CollectionMode::NFT, 1);1008		let origin1 = Origin::signed(1);1009		let origin2 = Origin::signed(2);10101011		assert_ok!(TemplateModule::add_collection_admin(1012			origin1,1013			collection_id,1014			account(2)1015		));1016		assert_ok!(TemplateModule::add_to_white_list(1017			origin2,1018			collection_id,1019			account(3)1020		));1021		assert!(TemplateModule::white_list(collection_id, 3));1022	});1023}10241025#[test]1026fn nonprivileged_user_cannot_add_address_to_white_list() {1027	new_test_ext().execute_with(|| {1028		let collection_id = create_test_collection(&CollectionMode::NFT, 1);10291030		let origin2 = Origin::signed(2);1031		assert_noop!(1032			TemplateModule::add_to_white_list(origin2, collection_id, account(3)),1033			Error::<Test>::NoPermission1034		);1035	});1036}10371038#[test]1039fn nobody_can_add_address_to_white_list_of_nonexisting_collection() {1040	new_test_ext().execute_with(|| {1041		let origin1 = Origin::signed(1);10421043		assert_noop!(1044			TemplateModule::add_to_white_list(origin1, 1, account(2)),1045			Error::<Test>::CollectionNotFound1046		);1047	});1048}10491050#[test]1051fn nobody_can_add_address_to_white_list_of_deleted_collection() {1052	new_test_ext().execute_with(|| {1053		let collection_id = create_test_collection(&CollectionMode::NFT, 1);10541055		let origin1 = Origin::signed(1);1056		assert_ok!(TemplateModule::destroy_collection(1057			origin1.clone(),1058			collection_id1059		));1060		assert_noop!(1061			TemplateModule::add_to_white_list(origin1, collection_id, account(2)),1062			Error::<Test>::CollectionNotFound1063		);1064	});1065}10661067// If address is already added to white list, nothing happens1068#[test]1069fn address_is_already_added_to_white_list() {1070	new_test_ext().execute_with(|| {1071		let collection_id = create_test_collection(&CollectionMode::NFT, 1);1072		let origin1 = Origin::signed(1);10731074		assert_ok!(TemplateModule::add_to_white_list(1075			origin1.clone(),1076			collection_id,1077			account(2)1078		));1079		assert_ok!(TemplateModule::add_to_white_list(1080			origin1,1081			collection_id,1082			account(2)1083		));1084		assert!(TemplateModule::white_list(collection_id, 2));1085	});1086}10871088#[test]1089fn owner_can_remove_address_from_white_list() {1090	new_test_ext().execute_with(|| {1091		let collection_id = create_test_collection(&CollectionMode::NFT, 1);10921093		let origin1 = Origin::signed(1);1094		assert_ok!(TemplateModule::add_to_white_list(1095			origin1.clone(),1096			collection_id,1097			account(2)1098		));1099		assert_ok!(TemplateModule::remove_from_white_list(1100			origin1,1101			collection_id,1102			account(2)1103		));1104		assert!(!TemplateModule::white_list(collection_id, 2));1105	});1106}11071108#[test]1109fn admin_can_remove_address_from_white_list() {1110	new_test_ext().execute_with(|| {1111		let collection_id = create_test_collection(&CollectionMode::NFT, 1);1112		let origin1 = Origin::signed(1);1113		let origin2 = Origin::signed(2);11141115		assert_ok!(TemplateModule::add_collection_admin(1116			origin1.clone(),1117			collection_id,1118			account(2)1119		));11201121		assert_ok!(TemplateModule::add_to_white_list(1122			origin1,1123			collection_id,1124			account(3)1125		));1126		assert_ok!(TemplateModule::remove_from_white_list(1127			origin2,1128			collection_id,1129			account(3)1130		));1131		assert!(!TemplateModule::white_list(collection_id, 3));1132	});1133}11341135#[test]1136fn nonprivileged_user_cannot_remove_address_from_white_list() {1137	new_test_ext().execute_with(|| {1138		let collection_id = create_test_collection(&CollectionMode::NFT, 1);1139		let origin1 = Origin::signed(1);1140		let origin2 = Origin::signed(2);11411142		assert_ok!(TemplateModule::add_to_white_list(1143			origin1,1144			collection_id,1145			account(2)1146		));1147		assert_noop!(1148			TemplateModule::remove_from_white_list(origin2, collection_id, account(2)),1149			Error::<Test>::NoPermission1150		);1151		assert!(TemplateModule::white_list(collection_id, 2));1152	});1153}11541155#[test]1156fn nobody_can_remove_address_from_white_list_of_nonexisting_collection() {1157	new_test_ext().execute_with(|| {1158		let origin1 = Origin::signed(1);11591160		assert_noop!(1161			TemplateModule::remove_from_white_list(origin1, 1, account(2)),1162			Error::<Test>::CollectionNotFound1163		);1164	});1165}11661167#[test]1168fn nobody_can_remove_address_from_white_list_of_deleted_collection() {1169	new_test_ext().execute_with(|| {1170		let collection_id = create_test_collection(&CollectionMode::NFT, 1);1171		let origin1 = Origin::signed(1);1172		let origin2 = Origin::signed(2);11731174		assert_ok!(TemplateModule::add_to_white_list(1175			origin1.clone(),1176			collection_id,1177			account(2)1178		));1179		assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));1180		assert_noop!(1181			TemplateModule::remove_from_white_list(origin2, collection_id, account(2)),1182			Error::<Test>::CollectionNotFound1183		);1184		assert!(!TemplateModule::white_list(collection_id, 2));1185	});1186}11871188// If address is already removed from white list, nothing happens1189#[test]1190fn address_is_already_removed_from_white_list() {1191	new_test_ext().execute_with(|| {1192		let collection_id = create_test_collection(&CollectionMode::NFT, 1);1193		let origin1 = Origin::signed(1);11941195		assert_ok!(TemplateModule::add_to_white_list(1196			origin1.clone(),1197			collection_id,1198			account(2)1199		));1200		assert_ok!(TemplateModule::remove_from_white_list(1201			origin1.clone(),1202			collection_id,1203			account(2)1204		));1205		assert_ok!(TemplateModule::remove_from_white_list(1206			origin1,1207			collection_id,1208			account(2)1209		));1210		assert!(!TemplateModule::white_list(collection_id, 2));1211	});1212}12131214// If Public Access mode is set to WhiteList, tokens can’t be transferred from a non-whitelisted address with transfer or transferFrom (2 tests)1215#[test]1216fn white_list_test_1() {1217	new_test_ext().execute_with(|| {1218		let collection_id = create_test_collection(&CollectionMode::NFT, 1);12191220		let origin1 = Origin::signed(1);12211222		let data = default_nft_data();1223		create_test_item(collection_id, &data.into());12241225		assert_ok!(TemplateModule::set_public_access_mode(1226			origin1.clone(),1227			collection_id,1228			AccessMode::WhiteList1229		));1230		assert_ok!(TemplateModule::add_to_white_list(1231			origin1.clone(),1232			collection_id,1233			account(2)1234		));12351236		assert_noop!(1237			TemplateModule::transfer(origin1, account(3), 1, 1, 1),1238			Error::<Test>::AddresNotInWhiteList1239		);1240	});1241}12421243#[test]1244fn white_list_test_2() {1245	new_test_ext().execute_with(|| {1246		let collection_id = create_test_collection(&CollectionMode::NFT, 1);1247		let origin1 = Origin::signed(1);12481249		let data = default_nft_data();1250		create_test_item(collection_id, &data.into());12511252		assert_ok!(TemplateModule::set_public_access_mode(1253			origin1.clone(),1254			collection_id,1255			AccessMode::WhiteList1256		));1257		assert_ok!(TemplateModule::add_to_white_list(1258			origin1.clone(),1259			1,1260			account(1)1261		));1262		assert_ok!(TemplateModule::add_to_white_list(1263			origin1.clone(),1264			1,1265			account(2)1266		));12671268		// do approve1269		assert_ok!(TemplateModule::approve(1270			origin1.clone(),1271			account(1),1272			1,1273			1,1274			11275		));1276		assert_eq!(TemplateModule::approved(1, (1, 1, 1)), 1);12771278		assert_ok!(TemplateModule::remove_from_white_list(1279			origin1.clone(),1280			1,1281			account(1)1282		));12831284		assert_noop!(1285			TemplateModule::transfer_from(origin1, account(1), account(3), 1, 1, 1),1286			Error::<Test>::AddresNotInWhiteList1287		);1288	});1289}12901291// If Public Access mode is set to WhiteList, tokens can’t be transferred to a non-whitelisted address with transfer or transferFrom (2 tests)1292#[test]1293fn white_list_test_3() {1294	new_test_ext().execute_with(|| {1295		let collection_id = create_test_collection(&CollectionMode::NFT, 1);12961297		let origin1 = Origin::signed(1);12981299		let data = default_nft_data();1300		create_test_item(collection_id, &data.into());13011302		assert_ok!(TemplateModule::set_public_access_mode(1303			origin1.clone(),1304			collection_id,1305			AccessMode::WhiteList1306		));1307		assert_ok!(TemplateModule::add_to_white_list(1308			origin1.clone(),1309			1,1310			account(1)1311		));13121313		assert_noop!(1314			TemplateModule::transfer(origin1, account(3), 1, 1, 1),1315			Error::<Test>::AddresNotInWhiteList1316		);1317	});1318}13191320#[test]1321fn white_list_test_4() {1322	new_test_ext().execute_with(|| {1323		let collection_id = create_test_collection(&CollectionMode::NFT, 1);13241325		let origin1 = Origin::signed(1);13261327		let data = default_nft_data();1328		create_test_item(collection_id, &data.into());13291330		assert_ok!(TemplateModule::set_public_access_mode(1331			origin1.clone(),1332			collection_id,1333			AccessMode::WhiteList1334		));1335		assert_ok!(TemplateModule::add_to_white_list(1336			origin1.clone(),1337			collection_id,1338			account(1)1339		));1340		assert_ok!(TemplateModule::add_to_white_list(1341			origin1.clone(),1342			collection_id,1343			account(2)1344		));13451346		// do approve1347		assert_ok!(TemplateModule::approve(1348			origin1.clone(),1349			account(1),1350			1,1351			1,1352			11353		));1354		assert_eq!(TemplateModule::approved(1, (1, 1, 1)), 1);13551356		assert_ok!(TemplateModule::remove_from_white_list(1357			origin1.clone(),1358			collection_id,1359			account(2)1360		));13611362		assert_noop!(1363			TemplateModule::transfer_from(origin1, account(1), account(3), 1, 1, 1),1364			Error::<Test>::AddresNotInWhiteList1365		);1366	});1367}13681369// If Public Access mode is set to WhiteList, tokens can’t be destroyed by a non-whitelisted address (even if it owned them before enabling WhiteList mode)1370#[test]1371fn white_list_test_5() {1372	new_test_ext().execute_with(|| {1373		let collection_id = create_test_collection(&CollectionMode::NFT, 1);13741375		let origin1 = Origin::signed(1);13761377		let data = default_nft_data();1378		create_test_item(collection_id, &data.into());13791380		assert_ok!(TemplateModule::set_public_access_mode(1381			origin1.clone(),1382			collection_id,1383			AccessMode::WhiteList1384		));1385		assert_noop!(1386			TemplateModule::burn_item(origin1.clone(), 1, 1, 5),1387			Error::<Test>::AddresNotInWhiteList1388		);1389	});1390}13911392// If Public Access mode is set to WhiteList, token transfers can’t be Approved by a non-whitelisted address (see Approve method).1393#[test]1394fn white_list_test_6() {1395	new_test_ext().execute_with(|| {1396		let collection_id = create_test_collection(&CollectionMode::NFT, 1);13971398		let origin1 = Origin::signed(1);13991400		let data = default_nft_data();1401		create_test_item(collection_id, &data.into());14021403		assert_ok!(TemplateModule::set_public_access_mode(1404			origin1.clone(),1405			collection_id,1406			AccessMode::WhiteList1407		));14081409		// do approve1410		assert_noop!(1411			TemplateModule::approve(origin1, account(1), 1, 1, 5),1412			Error::<Test>::AddresNotInWhiteList1413		);1414	});1415}14161417// If Public Access mode is set to WhiteList, tokens can be transferred from a whitelisted address with transfer or transferFrom (2 tests) and1418//          tokens can be transferred from a whitelisted address with transfer or transferFrom (2 tests)1419#[test]1420fn white_list_test_7() {1421	new_test_ext().execute_with(|| {1422		let collection_id = create_test_collection(&CollectionMode::NFT, 1);14231424		let data = default_nft_data();1425		create_test_item(collection_id, &data.into());14261427		let origin1 = Origin::signed(1);14281429		assert_ok!(TemplateModule::set_public_access_mode(1430			origin1.clone(),1431			collection_id,1432			AccessMode::WhiteList1433		));1434		assert_ok!(TemplateModule::add_to_white_list(1435			origin1.clone(),1436			collection_id,1437			account(1)1438		));1439		assert_ok!(TemplateModule::add_to_white_list(1440			origin1.clone(),1441			collection_id,1442			account(2)1443		));14441445		assert_ok!(TemplateModule::transfer(origin1, account(2), 1, 1, 1));1446	});1447}14481449#[test]1450fn white_list_test_8() {1451	new_test_ext().execute_with(|| {1452		let collection_id = create_test_collection(&CollectionMode::NFT, 1);14531454		let data = default_nft_data();1455		create_test_item(collection_id, &data.into());14561457		let origin1 = Origin::signed(1);14581459		assert_ok!(TemplateModule::set_public_access_mode(1460			origin1.clone(),1461			collection_id,1462			AccessMode::WhiteList1463		));1464		assert_ok!(TemplateModule::add_to_white_list(1465			origin1.clone(),1466			collection_id,1467			account(1)1468		));1469		assert_ok!(TemplateModule::add_to_white_list(1470			origin1.clone(),1471			collection_id,1472			account(2)1473		));14741475		// do approve1476		assert_ok!(TemplateModule::approve(1477			origin1.clone(),1478			account(1),1479			1,1480			1,1481			51482		));1483		assert_eq!(TemplateModule::approved(1, (1, 1, 1)), 5);14841485		assert_ok!(TemplateModule::transfer_from(1486			origin1,1487			account(1),1488			account(2),1489			1,1490			1,1491			11492		));1493	});1494}14951496// If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens can be created by owner.1497#[test]1498fn white_list_test_9() {1499	new_test_ext().execute_with(|| {1500		let collection_id = create_test_collection(&CollectionMode::NFT, 1);1501		let origin1 = Origin::signed(1);15021503		assert_ok!(TemplateModule::set_public_access_mode(1504			origin1.clone(),1505			collection_id,1506			AccessMode::WhiteList1507		));1508		assert_ok!(TemplateModule::set_mint_permission(1509			origin1,1510			collection_id,1511			false1512		));15131514		let data = default_nft_data();1515		create_test_item(collection_id, &data.into());1516	});1517}15181519// If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens can be created by admin.1520#[test]1521fn white_list_test_10() {1522	new_test_ext().execute_with(|| {1523		let collection_id = create_test_collection(&CollectionMode::NFT, 1);15241525		let origin1 = Origin::signed(1);1526		let origin2 = Origin::signed(2);15271528		assert_ok!(TemplateModule::set_public_access_mode(1529			origin1.clone(),1530			collection_id,1531			AccessMode::WhiteList1532		));1533		assert_ok!(TemplateModule::set_mint_permission(1534			origin1.clone(),1535			collection_id,1536			false1537		));15381539		assert_ok!(TemplateModule::add_collection_admin(1540			origin1,1541			collection_id,1542			account(2)1543		));15441545		assert_ok!(TemplateModule::create_item(1546			origin2,1547			collection_id,1548			account(2),1549			default_nft_data().into()1550		));1551	});1552}15531554// If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens cannot be created by non-privileged and white listed address.1555#[test]1556fn white_list_test_11() {1557	new_test_ext().execute_with(|| {1558		let collection_id = create_test_collection(&CollectionMode::NFT, 1);15591560		let origin1 = Origin::signed(1);1561		let origin2 = Origin::signed(2);15621563		assert_ok!(TemplateModule::set_public_access_mode(1564			origin1.clone(),1565			collection_id,1566			AccessMode::WhiteList1567		));1568		assert_ok!(TemplateModule::set_mint_permission(1569			origin1.clone(),1570			collection_id,1571			false1572		));1573		assert_ok!(TemplateModule::add_to_white_list(1574			origin1,1575			collection_id,1576			account(2)1577		));15781579		assert_noop!(1580			TemplateModule::create_item(origin2, 1, account(2), default_nft_data().into()),1581			Error::<Test>::PublicMintingNotAllowed1582		);1583	});1584}15851586// If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens cannot be created by non-privileged and non-white listed address.1587#[test]1588fn white_list_test_12() {1589	new_test_ext().execute_with(|| {1590		let collection_id = create_test_collection(&CollectionMode::NFT, 1);15911592		let origin1 = Origin::signed(1);1593		let origin2 = Origin::signed(2);15941595		assert_ok!(TemplateModule::set_public_access_mode(1596			origin1.clone(),1597			collection_id,1598			AccessMode::WhiteList1599		));1600		assert_ok!(TemplateModule::set_mint_permission(1601			origin1,1602			collection_id,1603			false1604		));16051606		assert_noop!(1607			TemplateModule::create_item(origin2, 1, account(2), default_nft_data().into()),1608			Error::<Test>::PublicMintingNotAllowed1609		);1610	});1611}16121613// If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by owner.1614#[test]1615fn white_list_test_13() {1616	new_test_ext().execute_with(|| {1617		let collection_id = create_test_collection(&CollectionMode::NFT, 1);16181619		let origin1 = Origin::signed(1);16201621		assert_ok!(TemplateModule::set_public_access_mode(1622			origin1.clone(),1623			collection_id,1624			AccessMode::WhiteList1625		));1626		assert_ok!(TemplateModule::set_mint_permission(1627			origin1,1628			collection_id,1629			true1630		));16311632		let data = default_nft_data();1633		create_test_item(collection_id, &data.into());1634	});1635}16361637// If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by admin.1638#[test]1639fn white_list_test_14() {1640	new_test_ext().execute_with(|| {1641		let collection_id = create_test_collection(&CollectionMode::NFT, 1);16421643		let origin1 = Origin::signed(1);1644		let origin2 = Origin::signed(2);16451646		assert_ok!(TemplateModule::set_public_access_mode(1647			origin1.clone(),1648			collection_id,1649			AccessMode::WhiteList1650		));1651		assert_ok!(TemplateModule::set_mint_permission(1652			origin1.clone(),1653			collection_id,1654			true1655		));16561657		assert_ok!(TemplateModule::add_collection_admin(1658			origin1,1659			collection_id,1660			account(2)1661		));16621663		assert_ok!(TemplateModule::create_item(1664			origin2,1665			1,1666			account(2),1667			default_nft_data().into()1668		));1669	});1670}16711672// If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens cannot be created by non-privileged and non-white listed address.1673#[test]1674fn white_list_test_15() {1675	new_test_ext().execute_with(|| {1676		let collection_id = create_test_collection(&CollectionMode::NFT, 1);16771678		let origin1 = Origin::signed(1);1679		let origin2 = Origin::signed(2);16801681		assert_ok!(TemplateModule::set_public_access_mode(1682			origin1.clone(),1683			collection_id,1684			AccessMode::WhiteList1685		));1686		assert_ok!(TemplateModule::set_mint_permission(1687			origin1,1688			collection_id,1689			true1690		));16911692		assert_noop!(1693			TemplateModule::create_item(origin2, 1, account(2), default_nft_data().into()),1694			Error::<Test>::AddresNotInWhiteList1695		);1696	});1697}16981699// If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by non-privileged and white listed address.1700#[test]1701fn white_list_test_16() {1702	new_test_ext().execute_with(|| {1703		let collection_id = create_test_collection(&CollectionMode::NFT, 1);17041705		let origin1 = Origin::signed(1);1706		let origin2 = Origin::signed(2);17071708		assert_ok!(TemplateModule::set_public_access_mode(1709			origin1.clone(),1710			collection_id,1711			AccessMode::WhiteList1712		));1713		assert_ok!(TemplateModule::set_mint_permission(1714			origin1.clone(),1715			collection_id,1716			true1717		));1718		assert_ok!(TemplateModule::add_to_white_list(1719			origin1,1720			collection_id,1721			account(2)1722		));17231724		assert_ok!(TemplateModule::create_item(1725			origin2,1726			1,1727			account(2),1728			default_nft_data().into()1729		));1730	});1731}17321733// Total number of collections. Positive test1734#[test]1735fn total_number_collections_bound() {1736	new_test_ext().execute_with(|| {1737		create_test_collection(&CollectionMode::NFT, 1);1738	});1739}17401741// Total number of collections. Negotive test1742#[test]1743fn total_number_collections_bound_neg() {1744	new_test_ext().execute_with(|| {1745		let origin1 = Origin::signed(1);17461747		for i in 0..COLLECTION_NUMBER_LIMIT {1748			create_test_collection(&CollectionMode::NFT, i + 1);1749		}17501751		let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1752		let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1753		let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();17541755		// 11-th collection in chain. Expects error1756		assert_noop!(1757			TemplateModule::create_collection(1758				origin1,1759				col_name1,1760				col_desc1,1761				token_prefix1,1762				CollectionMode::NFT1763			),1764			Error::<Test>::TotalCollectionsLimitExceeded1765		);1766	});1767}17681769// Owned tokens by a single address. Positive test1770#[test]1771fn owned_tokens_bound() {1772	new_test_ext().execute_with(|| {1773		let collection_id = create_test_collection(&CollectionMode::NFT, 1);17741775		let data = default_nft_data();1776		create_test_item(collection_id, &data.clone().into());1777		create_test_item(collection_id, &data.into());1778	});1779}17801781// Owned tokens by a single address. Negotive test1782#[test]1783fn owned_tokens_bound_neg() {1784	new_test_ext().execute_with(|| {1785		let collection_id = create_test_collection(&CollectionMode::NFT, 1);17861787		let origin1 = Origin::signed(1);17881789		for _ in 0..ACCOUNT_TOKEN_OWNERSHIP_LIMIT {1790			let data = default_nft_data();1791			create_test_item(collection_id, &data.clone().into());1792		}17931794		let data = default_nft_data();1795		assert_noop!(1796			TemplateModule::create_item(origin1, 1, account(1), data.into()),1797			Error::<Test>::AccountTokenLimitExceeded1798		);1799	});1800}18011802// Number of collection admins. Positive test1803#[test]1804fn collection_admins_bound() {1805	new_test_ext().execute_with(|| {1806		let collection_id = create_test_collection(&CollectionMode::NFT, 1);18071808		let origin1 = Origin::signed(1);18091810		assert_ok!(TemplateModule::add_collection_admin(1811			origin1.clone(),1812			collection_id,1813			account(2)1814		));1815		assert_ok!(TemplateModule::add_collection_admin(1816			origin1,1817			collection_id,1818			account(3)1819		));1820	});1821}18221823// Number of collection admins. Negotive test1824#[test]1825fn collection_admins_bound_neg() {1826	new_test_ext().execute_with(|| {1827		let collection_id = create_test_collection(&CollectionMode::NFT, 1);18281829		let origin1 = Origin::signed(1);18301831		for i in 0..COLLECTION_ADMINS_LIMIT {1832			assert_ok!(TemplateModule::add_collection_admin(1833				origin1.clone(),1834				collection_id,1835				account(2 + i)1836			));1837		}1838		assert_noop!(1839			TemplateModule::add_collection_admin(1840				origin1,1841				collection_id,1842				account(3 + COLLECTION_ADMINS_LIMIT)1843			),1844			Error::<Test>::CollectionAdminsLimitExceeded1845		);1846	});1847}1848// #endregion18491850#[test]1851fn set_const_on_chain_schema() {1852	new_test_ext().execute_with(|| {1853		let collection_id = create_test_collection(&CollectionMode::NFT, 1);18541855		let origin1 = Origin::signed(1);1856		assert_ok!(TemplateModule::set_const_on_chain_schema(1857			origin1,1858			collection_id,1859			b"test const on chain schema".to_vec()1860		));18611862		assert_eq!(1863			TemplateModule::collection_id(collection_id)1864				.unwrap()1865				.const_on_chain_schema,1866			b"test const on chain schema".to_vec()1867		);1868		assert_eq!(1869			TemplateModule::collection_id(collection_id)1870				.unwrap()1871				.variable_on_chain_schema,1872			b"".to_vec()1873		);1874	});1875}18761877#[test]1878fn set_variable_on_chain_schema() {1879	new_test_ext().execute_with(|| {1880		let collection_id = create_test_collection(&CollectionMode::NFT, 1);18811882		let origin1 = Origin::signed(1);1883		assert_ok!(TemplateModule::set_variable_on_chain_schema(1884			origin1,1885			collection_id,1886			b"test variable on chain schema".to_vec()1887		));18881889		assert_eq!(1890			TemplateModule::collection_id(collection_id)1891				.unwrap()1892				.const_on_chain_schema,1893			b"".to_vec()1894		);1895		assert_eq!(1896			TemplateModule::collection_id(collection_id)1897				.unwrap()1898				.variable_on_chain_schema,1899			b"test variable on chain schema".to_vec()1900		);1901	});1902}19031904#[test]1905fn set_variable_meta_data_on_nft_token_stores_variable_meta_data() {1906	new_test_ext().execute_with(|| {1907		let collection_id = create_test_collection(&CollectionMode::NFT, 1);19081909		let origin1 = Origin::signed(1);19101911		let data = default_nft_data();1912		create_test_item(1, &data.into());19131914		let variable_data = b"test data".to_vec();1915		assert_ok!(TemplateModule::set_variable_meta_data(1916			origin1,1917			collection_id,1918			1,1919			variable_data.clone()1920		));19211922		assert_eq!(1923			TemplateModule::nft_item_id(collection_id, 1)1924				.unwrap()1925				.variable_data,1926			variable_data1927		);1928	});1929}19301931#[test]1932fn set_variable_meta_data_on_re_fungible_token_stores_variable_meta_data() {1933	new_test_ext().execute_with(|| {1934		let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);19351936		let origin1 = Origin::signed(1);19371938		let data = default_re_fungible_data();1939		create_test_item(1, &data.into());19401941		let variable_data = b"test data".to_vec();1942		assert_ok!(TemplateModule::set_variable_meta_data(1943			origin1,1944			collection_id,1945			1,1946			variable_data.clone()1947		));19481949		assert_eq!(1950			TemplateModule::refungible_item_id(collection_id, 1)1951				.unwrap()1952				.variable_data,1953			variable_data1954		);1955	});1956}19571958#[test]1959fn set_variable_meta_data_on_fungible_token_fails() {1960	new_test_ext().execute_with(|| {1961		let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);19621963		let origin1 = Origin::signed(1);19641965		let data = default_fungible_data();1966		create_test_item(1, &data.into());19671968		let variable_data = b"test data".to_vec();1969		assert_noop!(1970			TemplateModule::set_variable_meta_data(origin1, collection_id, 1, variable_data),1971			Error::<Test>::CantStoreMetadataInFungibleTokens1972		);1973	});1974}19751976#[test]1977fn set_variable_meta_data_on_nft_token_fails_for_big_data() {1978	new_test_ext().execute_with(|| {1979		let collection_id = create_test_collection(&CollectionMode::NFT, 1);19801981		let origin1 = Origin::signed(1);19821983		let data = default_nft_data();1984		create_test_item(1, &data.into());19851986		let variable_data = b"test set_variable_meta_data method, bigger than limits.".to_vec();1987		assert_noop!(1988			TemplateModule::set_variable_meta_data(origin1, collection_id, 1, variable_data),1989			Error::<Test>::TokenVariableDataLimitExceeded1990		);1991	});1992}19931994#[test]1995fn set_variable_meta_data_on_re_fungible_token_fails_for_big_data() {1996	new_test_ext().execute_with(|| {1997		let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);19981999		let origin1 = Origin::signed(1);20002001		let data = default_re_fungible_data();2002		create_test_item(1, &data.into());20032004		let variable_data = b"test set_variable_meta_data method, bigger than limits.".to_vec();2005		assert_noop!(2006			TemplateModule::set_variable_meta_data(origin1, collection_id, 1, variable_data),2007			Error::<Test>::TokenVariableDataLimitExceeded2008		);2009	});2010}20112012#[test]2013fn set_variable_meta_data_on_nft_with_item_owner_permission_flag() {2014	new_test_ext().execute_with(|| {2015		//default_limits();20162017		let collection_id = create_test_collection(&CollectionMode::NFT, 1);20182019		let origin1 = Origin::signed(1);20202021		let data = default_nft_data();2022		create_test_item(1, &data.into());20232024		assert_ok!(TemplateModule::set_meta_update_permission_flag(2025			origin1.clone(),2026			collection_id,2027			MetaUpdatePermission::ItemOwner,2028		));20292030		let variable_data = b"ten chars.".to_vec();2031		assert_ok!(TemplateModule::set_variable_meta_data(2032			origin1,2033			collection_id,2034			1,2035			variable_data.clone()2036		));20372038		assert_eq!(2039			TemplateModule::nft_item_id(collection_id, 1)2040				.unwrap()2041				.variable_data,2042			variable_data2043		);2044	});2045}20462047#[test]2048fn set_variable_meta_data_on_nft_with_item_owner_permission_flag_neg() {2049	new_test_ext().execute_with(|| {2050		let collection_id = create_test_collection_for_owner(&CollectionMode::NFT, 1, 1);20512052		let origin1 = Origin::signed(1);20532054		assert_ok!(TemplateModule::set_mint_permission(2055			origin1.clone(),2056			collection_id,2057			true2058		));2059		assert_ok!(TemplateModule::add_to_white_list(2060			origin1.clone(),2061			collection_id,2062			account(1)2063		));20642065		let data = default_nft_data();2066		create_test_item(1, &data.into());20672068		assert_ok!(TemplateModule::set_meta_update_permission_flag(2069			origin1.clone(),2070			collection_id,2071			MetaUpdatePermission::ItemOwner,2072		));20732074		let variable_data = b"1234567890123".to_vec();2075		assert_noop!(2076			TemplateModule::set_variable_meta_data(2077				origin1,2078				collection_id,2079				1,2080				variable_data.clone()2081			),2082			Error::<Test>::TokenVariableDataLimitExceeded2083		);2084	})2085}20862087#[test]2088fn collection_transfer_flag_works() {2089	new_test_ext().execute_with(|| {2090		let origin1 = Origin::signed(1);20912092		let collection_id = create_test_collection(&CollectionMode::NFT, 1);2093		assert_ok!(TemplateModule::set_transfers_enabled_flag(origin1, 1, true));20942095		let data = default_nft_data();2096		create_test_item(collection_id, &data.into());2097		assert_eq!(TemplateModule::balance_count(1, 1), 1);2098		assert_eq!(TemplateModule::address_tokens(1, 1), [1]);20992100		let origin1 = Origin::signed(1);21012102		// default scenario2103		assert_ok!(TemplateModule::transfer(origin1, account(2), 1, 1, 1000));2104		assert_eq!(TemplateModule::nft_item_id(1, 1).unwrap().owner, account(2));2105		assert_eq!(TemplateModule::balance_count(1, 1), 0);2106		assert_eq!(TemplateModule::balance_count(1, 2), 1);21072108		assert_eq!(TemplateModule::address_tokens(1, 2), [1]);2109	});2110}21112112#[test]2113fn set_variable_meta_data_on_nft_with_admin_flag() {2114	new_test_ext().execute_with(|| {2115		// default_limits();21162117		let collection_id = create_test_collection_for_owner(&CollectionMode::NFT, 2, 1);21182119		let origin1 = Origin::signed(1);2120		let origin2 = Origin::signed(2);21212122		assert_ok!(TemplateModule::set_mint_permission(2123			origin2.clone(),2124			collection_id,2125			true2126		));2127		assert_ok!(TemplateModule::add_to_white_list(2128			origin2.clone(),2129			collection_id,2130			account(1)2131		));21322133		assert_ok!(TemplateModule::add_collection_admin(2134			origin2.clone(),2135			collection_id,2136			account(1)2137		));21382139		let data = default_nft_data();2140		create_test_item(1, &data.into());21412142		assert_ok!(TemplateModule::set_meta_update_permission_flag(2143			origin2.clone(),2144			collection_id,2145			MetaUpdatePermission::Admin,2146		));21472148		let variable_data = b"test.".to_vec();2149		assert_ok!(TemplateModule::set_variable_meta_data(2150			origin1,2151			collection_id,2152			1,2153			variable_data.clone()2154		));21552156		assert_eq!(2157			TemplateModule::nft_item_id(collection_id, 1)2158				.unwrap()2159				.variable_data,2160			variable_data2161		);2162	});2163}21642165#[test]2166fn set_variable_meta_data_on_nft_with_admin_flag_neg() {2167	new_test_ext().execute_with(|| {2168		// default_limits();21692170		let collection_id = create_test_collection_for_owner(&CollectionMode::NFT, 2, 1);21712172		let origin1 = Origin::signed(1);2173		let origin2 = Origin::signed(2);21742175		assert_ok!(TemplateModule::set_mint_permission(2176			origin2.clone(),2177			collection_id,2178			true2179		));2180		assert_ok!(TemplateModule::add_to_white_list(2181			origin2.clone(),2182			collection_id,2183			account(1)2184		));21852186		let data = default_nft_data();2187		create_test_item(1, &data.into());21882189		assert_ok!(TemplateModule::set_meta_update_permission_flag(2190			origin2.clone(),2191			collection_id,2192			MetaUpdatePermission::Admin,2193		));21942195		let variable_data = b"test.".to_vec();2196		assert_noop!(2197			TemplateModule::set_variable_meta_data(2198				origin1,2199				collection_id,2200				1,2201				variable_data.clone()2202			),2203			Error::<Test>::NoPermission2204		);2205	});2206}22072208#[test]2209fn set_variable_meta_flag_after_freeze() {2210	new_test_ext().execute_with(|| {2211		// default_limits();22122213		let collection_id = create_test_collection_for_owner(&CollectionMode::NFT, 2, 1);22142215		let origin2 = Origin::signed(2);22162217		assert_ok!(TemplateModule::set_meta_update_permission_flag(2218			origin2.clone(),2219			collection_id,2220			MetaUpdatePermission::None,2221		));2222		assert_noop!(2223			TemplateModule::set_meta_update_permission_flag(2224				origin2.clone(),2225				collection_id,2226				MetaUpdatePermission::Admin2227			),2228			Error::<Test>::MetadataFlagFrozen2229		);2230	});2231}22322233#[test]2234fn set_variable_meta_data_on_nft_with_none_flag_neg() {2235	new_test_ext().execute_with(|| {2236		// default_limits();22372238		let collection_id = create_test_collection_for_owner(&CollectionMode::NFT, 1, 1);2239		let origin1 = Origin::signed(1);22402241		let data = default_nft_data();2242		create_test_item(1, &data.into());22432244		assert_ok!(TemplateModule::set_meta_update_permission_flag(2245			origin1.clone(),2246			collection_id,2247			MetaUpdatePermission::None,2248		));22492250		let variable_data = b"test.".to_vec();2251		assert_noop!(2252			TemplateModule::set_variable_meta_data(2253				origin1.clone(),2254				collection_id,2255				1,2256				variable_data.clone()2257			),2258			Error::<Test>::MetadataUpdateDenied2259		);2260	});2261}22622263#[test]2264fn collection_transfer_flag_works_neg() {2265	new_test_ext().execute_with(|| {2266		let origin1 = Origin::signed(1);22672268		let collection_id = create_test_collection(&CollectionMode::NFT, 1);2269		assert_ok!(TemplateModule::set_transfers_enabled_flag(2270			origin1, 1, false2271		));22722273		let data = default_nft_data();2274		create_test_item(collection_id, &data.into());2275		assert_eq!(TemplateModule::balance_count(1, 1), 1);2276		assert_eq!(TemplateModule::address_tokens(1, 1), [1]);22772278		let origin1 = Origin::signed(1);22792280		// default scenario2281		assert_noop!(2282			TemplateModule::transfer(origin1, account(2), 1, 1, 1000),2283			Error::<Test>::TransferNotAllowed2284		);2285		assert_eq!(TemplateModule::nft_item_id(1, 1).unwrap().owner, account(1));2286		assert_eq!(TemplateModule::balance_count(1, 1), 1);2287		assert_eq!(TemplateModule::balance_count(1, 2), 0);22882289		assert_eq!(TemplateModule::address_tokens(1, 1), [1]);2290	});2291}
modifiedpallets/nft/src/weights.rsdiffbeforeafterboth
--- a/pallets/nft/src/weights.rs
+++ b/pallets/nft/src/weights.rs
@@ -33,8 +33,8 @@
 pub trait WeightInfo {
 	fn create_collection() -> Weight;
 	fn destroy_collection() -> Weight;
-	fn add_to_white_list() -> Weight;
-	fn remove_from_white_list() -> Weight;
+	fn add_to_allow_list() -> Weight;
+	fn remove_from_allow_list() -> Weight;
 	fn set_public_access_mode() -> Weight;
 	fn set_mint_permission() -> Weight;
 	fn change_collection_owner() -> Weight;
@@ -75,14 +75,14 @@
 	}
 	// Storage: Common CollectionById (r:1 w:0)
 	// Storage: Common Allowlist (r:0 w:1)
-	fn add_to_white_list() -> Weight {
+	fn add_to_allow_list() -> Weight {
 		(6_629_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:0)
 	// Storage: Common Allowlist (r:0 w:1)
-	fn remove_from_white_list() -> Weight {
+	fn remove_from_allow_list() -> Weight {
 		(6_596_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
@@ -205,14 +205,14 @@
 	}
 	// Storage: Common CollectionById (r:1 w:0)
 	// Storage: Common Allowlist (r:0 w:1)
-	fn add_to_white_list() -> Weight {
+	fn add_to_allow_list() -> Weight {
 		(6_629_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:0)
 	// Storage: Common Allowlist (r:0 w:1)
-	fn remove_from_white_list() -> Weight {
+	fn remove_from_allow_list() -> Weight {
 		(6_596_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -169,7 +169,7 @@
 			<CommonError<T>>::NoPermission
 		);
 
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			collection.check_allowlist(sender)?;
 		}
 
@@ -228,7 +228,7 @@
 			<CommonError<T>>::NoPermission
 		);
 
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			collection.check_allowlist(from)?;
 			collection.check_allowlist(to)?;
 		}
@@ -449,7 +449,7 @@
 		token: TokenId,
 		spender: Option<&T::CrossAccountId>,
 	) -> DispatchResult {
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			collection.check_allowlist(&sender)?;
 			if let Some(spender) = spender {
 				collection.check_allowlist(&spender)?;
@@ -484,7 +484,7 @@
 		if spender.conv_eq(from) {
 			return Self::transfer(collection, from, to, token);
 		}
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			// `from`, `to` checked in [`transfer`]
 			collection.check_allowlist(spender)?;
 		}
@@ -512,7 +512,7 @@
 		if spender.conv_eq(from) {
 			return Self::burn(collection, from, token);
 		}
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			// `from` checked in [`burn`]
 			collection.check_allowlist(spender)?;
 		}
modifiedpallets/refungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -272,7 +272,7 @@
 			<CommonError<T>>::TransferNotAllowed
 		);
 
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			collection.check_allowlist(from)?;
 			collection.check_allowlist(to)?;
 		}
@@ -483,7 +483,7 @@
 		token: TokenId,
 		amount: u128,
 	) -> DispatchResult {
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			collection.check_allowlist(&sender)?;
 			collection.check_allowlist(&spender)?;
 		}
@@ -514,7 +514,7 @@
 		if spender.conv_eq(from) {
 			return Self::transfer(collection, from, to, token, amount);
 		}
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			// `from`, `to` checked in [`transfer`]
 			collection.check_allowlist(spender)?;
 		}
@@ -547,7 +547,7 @@
 		if spender.conv_eq(from) {
 			return Self::burn(collection, from, token, amount);
 		}
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			// `from` checked in [`burn`]
 			collection.check_allowlist(spender)?;
 		}
modifiedprimitives/nft/src/lib.rsdiffbeforeafterboth
--- a/primitives/nft/src/lib.rs
+++ b/primitives/nft/src/lib.rs
@@ -142,7 +142,7 @@
 #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
 pub enum AccessMode {
 	Normal,
-	WhiteList,
+	AllowList,
 }
 impl Default for AccessMode {
 	fn default() -> Self {
modifiedruntime/src/chain_extension.rsdiffbeforeafterboth
--- a/runtime/src/chain_extension.rs
+++ b/runtime/src/chain_extension.rs
@@ -75,10 +75,10 @@
 }
 
 #[derive(Debug, PartialEq, Encode, Decode, MaxEncodedLen)]
-pub struct NFTExtToggleWhiteList<AccountId> {
+pub struct NFTExtToggleAllowList<AccountId> {
 	pub collection_id: u32,
 	pub address: AccountId,
-	pub whitelisted: bool,
+	pub allowlisted: bool,
 }
 
 /// The chain Extension of NFT pallet
@@ -211,18 +211,18 @@
 				Ok(RetVal::Converging(0))
 			}
 			6 => {
-				// Toggle whitelist
+				// Toggle allowlist
 				let mut env = env.buf_in_buf_out();
-				let input: NFTExtToggleWhiteList<AccountIdOf<C>> = env.read_as()?;
-				env.charge_weight(NftWeightInfoOf::<C>::add_to_white_list())?;
+				let input: NFTExtToggleAllowList<AccountIdOf<C>> = env.read_as()?;
+				env.charge_weight(NftWeightInfoOf::<C>::add_to_allow_list())?;
 
 				let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;
 
-				pallet_nft::Module::<C>::toggle_white_list_internal(
+				pallet_nft::Module::<C>::toggle_allow_list_internal(
 					&C::CrossAccountId::from_sub(env.ext().address().clone()),
 					&collection,
 					&C::CrossAccountId::from_sub(input.address),
-					input.whitelisted,
+					input.allowlisted,
 				)?;
 
 				collection.submit_logs()?;
modifiedruntime/src/lib.rsdiffbeforeafterboth
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -1340,7 +1340,7 @@
 		) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
 			use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
 
-			let whitelist: Vec<TrackedStorageKey> = vec![
+			let allowlist: Vec<TrackedStorageKey> = vec![
 				// Block Number
 				hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),
 				// Total Issuance
@@ -1354,7 +1354,7 @@
 			];
 
 			let mut batches = Vec::<BenchmarkBatch>::new();
-			let params = (&config, &whitelist);
+			let params = (&config, &allowlist);
 
 			add_benchmark!(params, batches, pallet_evm_migration, EvmMigration);
 			add_benchmark!(params, batches, pallet_nft, Nft);
modifiedsmart_contracs/transfer/lib.rsdiffbeforeafterboth
--- a/smart_contracs/transfer/lib.rs
+++ b/smart_contracs/transfer/lib.rs
@@ -75,7 +75,7 @@
     #[ink(extension = 5, returns_result = false)]
     fn set_variable_meta_data(collection_id: u32, item_id: u32, data: Vec<u8>);
     #[ink(extension = 6, returns_result = false)]
-    fn toggle_white_list(collection_id: u32, address: DefaultAccountId, whitelisted: bool);
+    fn toggle_allow_list(collection_id: u32, address: DefaultAccountId, allowlisted: bool);
 }
 
 #[ink::contract(env = crate::NftEnvironment, dynamic_storage_allocator = true)]
@@ -135,10 +135,10 @@
                 .set_variable_meta_data(collection_id, item_id, data);
         }
         #[ink(message)]
-        pub fn toggle_white_list(&mut self, collection_id: u32, address: AccountId, whitelisted: bool) {
+        pub fn toggle_allow_list(&mut self, collection_id: u32, address: AccountId, allowlisted: bool) {
             let _ = self.env()
                 .extension()
-                .toggle_white_list(collection_id, address, whitelisted);
+                .toggle_allow_list(collection_id, address, allowlisted);
         }
 
     }
modifiedtests/package.jsondiffbeforeafterboth
--- a/tests/package.json
+++ b/tests/package.json
@@ -42,7 +42,7 @@
     "testConfirmSponsorship": "mocha --timeout 9999999 -r ts-node/register ./**/confirmSponsorship.test.ts",
     "testRemoveCollectionAdmin": "mocha --timeout 9999999 -r ts-node/register ./**/removeCollectionAdmin.test.ts",
     "testRemoveCollectionSponsor": "mocha --timeout 9999999 -r ts-node/register ./**/removeCollectionSponsor.test.ts",
-    "testRemoveFromWhiteList": "mocha --timeout 9999999 -r ts-node/register ./**/removeFromWhiteList.test.ts",
+    "testRemoveFromAllowList": "mocha --timeout 9999999 -r ts-node/register ./**/removeFromAllowList.test.ts",
     "testConnection": "mocha --timeout 9999999 -r ts-node/register ./**/connection.test.ts",
     "testCollection": "mocha --timeout 9999999 -r ts-node/register ./**/createCollection.test.ts",
     "testContracts": "mocha --timeout 9999999 -r ts-node/register ./**/contracts.test.ts",
@@ -51,14 +51,14 @@
     "testApprove": "mocha --timeout 9999999 -r ts-node/register ./**/approve.test.ts",
     "testTransferFrom": "mocha --timeout 9999999 -r ts-node/register ./**/transferFrom.test.ts",
     "testCreateCollection": "mocha --timeout 9999999 -r ts-node/register ./**/createCollection.test.ts",
-    "testToggleContractWhiteList": "mocha --timeout 9999999 -r ts-node/register ./**/toggleContractWhiteList.test.ts",
-    "testAddToContractWhiteList": "mocha --timeout 9999999 -r ts-node/register ./**/addToContractWhiteList.test.ts",
+    "testToggleContractAllowList": "mocha --timeout 9999999 -r ts-node/register ./**/toggleContractAllowList.test.ts",
+    "testAddToContractAllowList": "mocha --timeout 9999999 -r ts-node/register ./**/addToContractAllowList.test.ts",
     "testTransfer": "mocha --timeout 9999999 -r ts-node/register ./**/transfer.test.ts",
     "testBurnItem": "mocha --timeout 9999999 -r ts-node/register ./**/burnItem.test.ts",
     "testSetMintPermission": "mocha --timeout 9999999 -r ts-node/register ./**/setMintPermission.test.ts",
     "testCreditFeesToTreasury": "mocha --timeout 9999999 -r ts-node/register ./**/creditFeesToTreasury.test.ts",
     "testEnableContractSponsoring": "mocha --timeout 9999999 -r ts-node/register ./**/enableContractSponsoring.test.ts",
-    "testRemoveFromContractWhiteList": "mocha --timeout 9999999 -r ts-node/register ./**/removeFromContractWhiteList.test.ts",
+    "testRemoveFromContractAllowList": "mocha --timeout 9999999 -r ts-node/register ./**/removeFromContractAllowList.test.ts",
     "testSetContractSponsoringRateLimit": "mocha --timeout 9999999 -r ts-node/register ./**/setContractSponsoringRateLimit.test.ts",
     "testSetOffchainSchema": "mocha --timeout 9999999 -r ts-node/register ./**/setOffchainSchema.test.ts",
     "testOverflow": "mocha --timeout 9999999 -r ts-node/register ./**/overflow.test.ts",
addedtests/src/addToAllowList.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/addToAllowList.test.ts
@@ -0,0 +1,124 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
+import {IKeyringPair} from '@polkadot/types/types';
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import privateKey from './substrate/privateKey';
+import usingApi, {submitTransactionExpectFailAsync} from './substrate/substrate-api';
+import {
+  addToAllowListExpectSuccess,
+  createCollectionExpectSuccess,
+  createItemExpectSuccess,
+  destroyCollectionExpectSuccess,
+  enablePublicMintingExpectSuccess,
+  enableAllowListExpectSuccess,
+  normalizeAccountId,
+  addCollectionAdminExpectSuccess,
+  addToAllowListExpectFail,
+} from './util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+
+let alice: IKeyringPair;
+let bob: IKeyringPair;
+let charlie: IKeyringPair;
+
+describe('Integration Test ext. addToAllowList()', () => {
+
+  before(async () => {
+    await usingApi(async () => {
+      alice = privateKey('//Alice');
+      bob = privateKey('//Bob');
+    });
+  });
+
+  it('Execute the extrinsic with parameters: Collection ID and address to add to the allow list', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addToAllowListExpectSuccess(alice, collectionId, bob.address);
+  });
+
+  it('Allowlisted minting: list restrictions', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addToAllowListExpectSuccess(alice, collectionId, bob.address);
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await enablePublicMintingExpectSuccess(alice, collectionId);
+    await createItemExpectSuccess(bob, collectionId, 'NFT', bob.address);
+  });
+});
+
+describe('Negative Integration Test ext. addToAllowList()', () => {
+
+  it('Allow list an address in the collection that does not exist', async () => {
+    await usingApi(async (api) => {
+      // tslint:disable-next-line: no-bitwise
+      const collectionId = ((await api.query.common.createdCollectionCount()).toNumber()) + 1;
+      const bob = privateKey('//Bob');
+
+      const tx = api.tx.nft.addToAllowList(collectionId, normalizeAccountId(bob.address));
+      await expect(submitTransactionExpectFailAsync(alice, tx)).to.be.rejected;
+    });
+  });
+
+  it('Allow list an address in the collection that was destroyed', async () => {
+    await usingApi(async (api) => {
+      const alice = privateKey('//Alice');
+      const bob = privateKey('//Bob');
+      // tslint:disable-next-line: no-bitwise
+      const collectionId = await createCollectionExpectSuccess();
+      await destroyCollectionExpectSuccess(collectionId);
+      const tx = api.tx.nft.addToAllowList(collectionId, normalizeAccountId(bob.address));
+      await expect(submitTransactionExpectFailAsync(alice, tx)).to.be.rejected;
+    });
+  });
+
+  it('Allow list an address in the collection that does not have allow list access enabled', async () => {
+    await usingApi(async (api) => {
+      const alice = privateKey('//Alice');
+      const ferdie = privateKey('//Ferdie');
+      const collectionId = await createCollectionExpectSuccess();
+      await enableAllowListExpectSuccess(alice, collectionId);
+      await enablePublicMintingExpectSuccess(alice, collectionId);
+      const tx = api.tx.nft.createItem(collectionId, normalizeAccountId(ferdie.address), 'NFT');
+      await expect(submitTransactionExpectFailAsync(ferdie, tx)).to.be.rejected;
+    });
+  });
+
+});
+
+describe('Integration Test ext. addToAllowList() with collection admin permissions:', () => {
+
+  before(async () => {
+    await usingApi(async () => {
+      alice = privateKey('//Alice');
+      bob = privateKey('//Bob');
+      charlie = privateKey('//Charlie');
+    });
+  });
+
+  it('Negative. Add to the allow list by regular user', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addToAllowListExpectFail(bob, collectionId, charlie.address);
+  });
+
+  it('Execute the extrinsic with parameters: Collection ID and address to add to the allow list', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
+    await addToAllowListExpectSuccess(bob, collectionId, charlie.address);
+  });
+
+  it('Allowlisted minting: list restrictions', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
+    await addToAllowListExpectSuccess(bob, collectionId, charlie.address);
+
+    // allowed only for collection owner
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await enablePublicMintingExpectSuccess(alice, collectionId);
+
+    await createItemExpectSuccess(charlie, collectionId, 'NFT', charlie.address);
+  });
+});
addedtests/src/addToContractAllowList.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/addToContractAllowList.test.ts
@@ -0,0 +1,92 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import usingApi, {submitTransactionAsync, submitTransactionExpectFailAsync} from './substrate/substrate-api';
+import privateKey from './substrate/privateKey';
+import {
+  deployFlipper,
+} from './util/contracthelpers';
+import {
+  getGenericResult,
+} from './util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+
+describe.skip('Integration Test addToContractAllowList', () => {
+
+  it('Add an address to a contract allow list', async () => {
+    await usingApi(async api => {
+      const bob = privateKey('//Bob');
+      const [contract, deployer] = await deployFlipper(api);
+
+      const allowListedBefore = (await api.query.nft.contractAllowList(contract.address, bob.address)).toJSON();
+      const addTx = api.tx.nft.addToContractAllowList(contract.address, bob.address);
+      const addEvents = await submitTransactionAsync(deployer, addTx);
+      const allowListedAfter = (await api.query.nft.contractAllowList(contract.address, bob.address)).toJSON();
+
+      expect(getGenericResult(addEvents).success).to.be.true;
+      expect(allowListedBefore).to.be.false;
+      expect(allowListedAfter).to.be.true;
+    });
+  });
+
+  it('Adding same address to allow list repeatedly should not produce errors', async () => {
+    await usingApi(async api => {
+      const bob = privateKey('//Bob');
+      const [contract, deployer] = await deployFlipper(api);
+
+      const allowListedBefore = (await api.query.nft.contractAllowList(contract.address, bob.address)).toJSON();
+      const addTx = api.tx.nft.addToContractAllowList(contract.address, bob.address);
+      const addEvents = await submitTransactionAsync(deployer, addTx);
+      const allowListedAfter = (await api.query.nft.contractAllowList(contract.address, bob.address)).toJSON();
+      const addAgainEvents = await submitTransactionAsync(deployer, addTx);
+      const allowListedAgainAfter = (await api.query.nft.contractAllowList(contract.address, bob.address)).toJSON();
+
+      expect(getGenericResult(addEvents).success).to.be.true;
+      expect(allowListedBefore).to.be.false;
+      expect(allowListedAfter).to.be.true;
+      expect(getGenericResult(addAgainEvents).success).to.be.true;
+      expect(allowListedAgainAfter).to.be.true;
+    });
+  });
+});
+
+describe.skip('Negative Integration Test addToContractAllowList', () => {
+
+  it('Add an address to a allow list of a non-contract', async () => {
+    await usingApi(async api => {
+      const alice = privateKey('//Bob');
+      const bob = privateKey('//Bob');
+      const charlieGuineaPig = privateKey('//Charlie');
+
+      const allowListedBefore = (await api.query.nft.contractAllowList(charlieGuineaPig.address, bob.address)).toJSON();
+      const addTx = api.tx.nft.addToContractAllowList(charlieGuineaPig.address, bob.address);
+      await expect(submitTransactionExpectFailAsync(alice, addTx)).to.be.rejected;
+      const allowListedAfter = (await api.query.nft.contractAllowList(charlieGuineaPig.address, bob.address)).toJSON();
+
+      expect(allowListedBefore).to.be.false;
+      expect(allowListedAfter).to.be.false;
+    });
+  });
+
+  it('Add to a contract allow list using a non-owner address', async () => {
+    await usingApi(async api => {
+      const bob = privateKey('//Bob');
+      const [contract] = await deployFlipper(api);
+
+      const allowListedBefore = (await api.query.nft.contractAllowList(contract.address, bob.address)).toJSON();
+      const addTx = api.tx.nft.addToContractAllowList(contract.address, bob.address);
+      await expect(submitTransactionExpectFailAsync(bob, addTx)).to.be.rejected;
+      const allowListedAfter = (await api.query.nft.contractAllowList(contract.address, bob.address)).toJSON();
+
+      expect(allowListedBefore).to.be.false;
+      expect(allowListedAfter).to.be.false;
+    });
+  });
+
+});
deletedtests/src/addToContractWhiteList.test.tsdiffbeforeafterboth
--- a/tests/src/addToContractWhiteList.test.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
-
-import chai from 'chai';
-import chaiAsPromised from 'chai-as-promised';
-import usingApi, {submitTransactionAsync, submitTransactionExpectFailAsync} from './substrate/substrate-api';
-import privateKey from './substrate/privateKey';
-import {
-  deployFlipper,
-} from './util/contracthelpers';
-import {
-  getGenericResult,
-} from './util/helpers';
-
-chai.use(chaiAsPromised);
-const expect = chai.expect;
-
-describe.skip('Integration Test addToContractWhiteList', () => {
-
-  it('Add an address to a contract white list', async () => {
-    await usingApi(async api => {
-      const bob = privateKey('//Bob');
-      const [contract, deployer] = await deployFlipper(api);
-
-      const whiteListedBefore = (await api.query.nft.contractWhiteList(contract.address, bob.address)).toJSON();
-      const addTx = api.tx.nft.addToContractWhiteList(contract.address, bob.address);
-      const addEvents = await submitTransactionAsync(deployer, addTx);
-      const whiteListedAfter = (await api.query.nft.contractWhiteList(contract.address, bob.address)).toJSON();
-
-      expect(getGenericResult(addEvents).success).to.be.true;
-      expect(whiteListedBefore).to.be.false;
-      expect(whiteListedAfter).to.be.true;
-    });
-  });
-
-  it('Adding same address to white list repeatedly should not produce errors', async () => {
-    await usingApi(async api => {
-      const bob = privateKey('//Bob');
-      const [contract, deployer] = await deployFlipper(api);
-
-      const whiteListedBefore = (await api.query.nft.contractWhiteList(contract.address, bob.address)).toJSON();
-      const addTx = api.tx.nft.addToContractWhiteList(contract.address, bob.address);
-      const addEvents = await submitTransactionAsync(deployer, addTx);
-      const whiteListedAfter = (await api.query.nft.contractWhiteList(contract.address, bob.address)).toJSON();
-      const addAgainEvents = await submitTransactionAsync(deployer, addTx);
-      const whiteListedAgainAfter = (await api.query.nft.contractWhiteList(contract.address, bob.address)).toJSON();
-
-      expect(getGenericResult(addEvents).success).to.be.true;
-      expect(whiteListedBefore).to.be.false;
-      expect(whiteListedAfter).to.be.true;
-      expect(getGenericResult(addAgainEvents).success).to.be.true;
-      expect(whiteListedAgainAfter).to.be.true;
-    });
-  });
-});
-
-describe.skip('Negative Integration Test addToContractWhiteList', () => {
-
-  it('Add an address to a white list of a non-contract', async () => {
-    await usingApi(async api => {
-      const alice = privateKey('//Bob');
-      const bob = privateKey('//Bob');
-      const charlieGuineaPig = privateKey('//Charlie');
-
-      const whiteListedBefore = (await api.query.nft.contractWhiteList(charlieGuineaPig.address, bob.address)).toJSON();
-      const addTx = api.tx.nft.addToContractWhiteList(charlieGuineaPig.address, bob.address);
-      await expect(submitTransactionExpectFailAsync(alice, addTx)).to.be.rejected;
-      const whiteListedAfter = (await api.query.nft.contractWhiteList(charlieGuineaPig.address, bob.address)).toJSON();
-
-      expect(whiteListedBefore).to.be.false;
-      expect(whiteListedAfter).to.be.false;
-    });
-  });
-
-  it('Add to a contract white list using a non-owner address', async () => {
-    await usingApi(async api => {
-      const bob = privateKey('//Bob');
-      const [contract] = await deployFlipper(api);
-
-      const whiteListedBefore = (await api.query.nft.contractWhiteList(contract.address, bob.address)).toJSON();
-      const addTx = api.tx.nft.addToContractWhiteList(contract.address, bob.address);
-      await expect(submitTransactionExpectFailAsync(bob, addTx)).to.be.rejected;
-      const whiteListedAfter = (await api.query.nft.contractWhiteList(contract.address, bob.address)).toJSON();
-
-      expect(whiteListedBefore).to.be.false;
-      expect(whiteListedAfter).to.be.false;
-    });
-  });
-
-});
deletedtests/src/addToWhiteList.test.tsdiffbeforeafterboth
--- a/tests/src/addToWhiteList.test.ts
+++ /dev/null
@@ -1,124 +0,0 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
-
-import {IKeyringPair} from '@polkadot/types/types';
-import chai from 'chai';
-import chaiAsPromised from 'chai-as-promised';
-import privateKey from './substrate/privateKey';
-import usingApi, {submitTransactionExpectFailAsync} from './substrate/substrate-api';
-import {
-  addToWhiteListExpectSuccess,
-  createCollectionExpectSuccess,
-  createItemExpectSuccess,
-  destroyCollectionExpectSuccess,
-  enablePublicMintingExpectSuccess,
-  enableWhiteListExpectSuccess,
-  normalizeAccountId,
-  addCollectionAdminExpectSuccess,
-  addToWhiteListExpectFail,
-} from './util/helpers';
-
-chai.use(chaiAsPromised);
-const expect = chai.expect;
-
-let alice: IKeyringPair;
-let bob: IKeyringPair;
-let charlie: IKeyringPair;
-
-describe('Integration Test ext. addToWhiteList()', () => {
-
-  before(async () => {
-    await usingApi(async () => {
-      alice = privateKey('//Alice');
-      bob = privateKey('//Bob');
-    });
-  });
-
-  it('Execute the extrinsic with parameters: Collection ID and address to add to the white list', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
-  });
-
-  it('Whitelisted minting: list restrictions', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await enablePublicMintingExpectSuccess(alice, collectionId);
-    await createItemExpectSuccess(bob, collectionId, 'NFT', bob.address);
-  });
-});
-
-describe('Negative Integration Test ext. addToWhiteList()', () => {
-
-  it('White list an address in the collection that does not exist', async () => {
-    await usingApi(async (api) => {
-      // tslint:disable-next-line: no-bitwise
-      const collectionId = ((await api.query.common.createdCollectionCount()).toNumber()) + 1;
-      const bob = privateKey('//Bob');
-
-      const tx = api.tx.nft.addToWhiteList(collectionId, normalizeAccountId(bob.address));
-      await expect(submitTransactionExpectFailAsync(alice, tx)).to.be.rejected;
-    });
-  });
-
-  it('White list an address in the collection that was destroyed', async () => {
-    await usingApi(async (api) => {
-      const alice = privateKey('//Alice');
-      const bob = privateKey('//Bob');
-      // tslint:disable-next-line: no-bitwise
-      const collectionId = await createCollectionExpectSuccess();
-      await destroyCollectionExpectSuccess(collectionId);
-      const tx = api.tx.nft.addToWhiteList(collectionId, normalizeAccountId(bob.address));
-      await expect(submitTransactionExpectFailAsync(alice, tx)).to.be.rejected;
-    });
-  });
-
-  it('White list an address in the collection that does not have white list access enabled', async () => {
-    await usingApi(async (api) => {
-      const alice = privateKey('//Alice');
-      const ferdie = privateKey('//Ferdie');
-      const collectionId = await createCollectionExpectSuccess();
-      await enableWhiteListExpectSuccess(alice, collectionId);
-      await enablePublicMintingExpectSuccess(alice, collectionId);
-      const tx = api.tx.nft.createItem(collectionId, normalizeAccountId(ferdie.address), 'NFT');
-      await expect(submitTransactionExpectFailAsync(ferdie, tx)).to.be.rejected;
-    });
-  });
-
-});
-
-describe('Integration Test ext. addToWhiteList() with collection admin permissions:', () => {
-
-  before(async () => {
-    await usingApi(async () => {
-      alice = privateKey('//Alice');
-      bob = privateKey('//Bob');
-      charlie = privateKey('//Charlie');
-    });
-  });
-
-  it('Negative. Add to the white list by regular user', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addToWhiteListExpectFail(bob, collectionId, charlie.address);
-  });
-
-  it('Execute the extrinsic with parameters: Collection ID and address to add to the white list', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
-    await addToWhiteListExpectSuccess(bob, collectionId, charlie.address);
-  });
-
-  it('Whitelisted minting: list restrictions', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
-    await addToWhiteListExpectSuccess(bob, collectionId, charlie.address);
-
-    // allowed only for collection owner
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await enablePublicMintingExpectSuccess(alice, collectionId);
-
-    await createItemExpectSuccess(charlie, collectionId, 'NFT', charlie.address);
-  });
-});
addedtests/src/allowLists.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/allowLists.test.ts
@@ -0,0 +1,304 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
+import {IKeyringPair} from '@polkadot/types/types';
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import privateKey from './substrate/privateKey';
+import usingApi, {submitTransactionExpectFailAsync} from './substrate/substrate-api';
+import {
+  addToAllowListExpectSuccess,
+  createCollectionExpectSuccess,
+  createItemExpectSuccess,
+  destroyCollectionExpectSuccess,
+  enableAllowListExpectSuccess,
+  normalizeAccountId,
+  addCollectionAdminExpectSuccess,
+  addToAllowListExpectFail,
+  removeFromAllowListExpectSuccess,
+  removeFromAllowListExpectFailure,
+  addToAllowListAgainExpectSuccess,
+  transferExpectFailure,
+  approveExpectSuccess,
+  approveExpectFail,
+  transferExpectSuccess,
+  transferFromExpectSuccess,
+  setMintPermissionExpectSuccess,
+  createItemExpectFailure,
+} from './util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+
+let alice: IKeyringPair;
+let bob: IKeyringPair;
+let charlie: IKeyringPair;
+
+describe('Integration Test ext. Allow list tests', () => {
+
+  before(async () => {
+    await usingApi(async () => {
+      alice = privateKey('//Alice');
+      bob = privateKey('//Bob');
+      charlie = privateKey('//Charlie');
+    });
+  });
+
+  it('Owner can add address to allow list', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addToAllowListExpectSuccess(alice, collectionId, bob.address);
+  });
+
+  it('Admin can add address to allow list', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
+    await addToAllowListExpectSuccess(bob, collectionId, charlie.address);
+  });
+
+  it('Non-privileged user cannot add address to allow list', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addToAllowListExpectFail(bob, collectionId, charlie.address);
+  });
+
+  it('Nobody can add address to allow list of non-existing collection', async () => {
+    const collectionId = (1<<32) - 1;
+    await addToAllowListExpectFail(alice, collectionId, bob.address);
+  });
+
+  it('Nobody can add address to allow list of destroyed collection', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await destroyCollectionExpectSuccess(collectionId, '//Alice');
+    await addToAllowListExpectFail(alice, collectionId, bob.address);
+  });
+
+  it('If address is already added to allow list, nothing happens', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addToAllowListExpectSuccess(alice, collectionId, bob.address);
+    await addToAllowListAgainExpectSuccess(alice, collectionId, bob.address);
+  });
+
+  it('Owner can remove address from allow list', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addToAllowListExpectSuccess(alice, collectionId, bob.address);
+    await removeFromAllowListExpectSuccess(alice, collectionId, normalizeAccountId(bob));
+  });
+
+  it('Admin can remove address from allow list', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
+    await addToAllowListExpectSuccess(alice, collectionId, charlie.address);
+    await removeFromAllowListExpectSuccess(bob, collectionId, normalizeAccountId(charlie));
+  });
+
+  it('Non-privileged user cannot remove address from allow list', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addToAllowListExpectSuccess(alice, collectionId, charlie.address);
+    await removeFromAllowListExpectFailure(bob, collectionId, normalizeAccountId(charlie));
+  });
+
+  it('Nobody can remove address from allow list of non-existing collection', async () => {
+    const collectionId = (1<<32) - 1;
+    await removeFromAllowListExpectFailure(alice, collectionId, normalizeAccountId(charlie));
+  });
+
+  it('Nobody can remove address from allow list of deleted collection', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addToAllowListExpectSuccess(alice, collectionId, charlie.address);
+    await destroyCollectionExpectSuccess(collectionId, '//Alice');
+    await removeFromAllowListExpectFailure(alice, collectionId, normalizeAccountId(charlie));
+  });
+
+  it('If address is already removed from allow list, nothing happens', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await addToAllowListExpectSuccess(alice, collectionId, charlie.address);
+    await removeFromAllowListExpectSuccess(alice, collectionId, normalizeAccountId(charlie));
+    await removeFromAllowListExpectSuccess(alice, collectionId, normalizeAccountId(charlie));
+  });
+
+  it('If Public Access mode is set to AllowList, tokens can’t be transferred from a non-allowlisted address with transfer or transferFrom. Test1', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await addToAllowListExpectSuccess(alice, collectionId, charlie.address);
+
+    await transferExpectFailure(
+      collectionId,
+      itemId,
+      alice,
+      charlie,
+      1,
+    );
+  });
+
+  it('If Public Access mode is set to AllowList, tokens can’t be transferred from a non-allowlisted address with transfer or transferFrom. Test2', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await addToAllowListExpectSuccess(alice, collectionId, alice.address);
+    await addToAllowListExpectSuccess(alice, collectionId, charlie.address);
+    await approveExpectSuccess(collectionId, itemId, alice, charlie.address);
+    await removeFromAllowListExpectSuccess(alice, collectionId, normalizeAccountId(alice));
+
+    await transferExpectFailure(
+      collectionId,
+      itemId,
+      alice,
+      charlie,
+      1,
+    );
+  });
+
+  it('If Public Access mode is set to AllowList, tokens can’t be transferred to a non-allowlisted address with transfer or transferFrom. Test1', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await addToAllowListExpectSuccess(alice, collectionId, alice.address);
+
+    await transferExpectFailure(
+      collectionId,
+      itemId,
+      alice,
+      charlie,
+      1,
+    );
+  });
+
+  it('If Public Access mode is set to AllowList, tokens can’t be transferred to a non-allowlisted address with transfer or transferFrom. Test2', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await addToAllowListExpectSuccess(alice, collectionId, alice.address);
+    await addToAllowListExpectSuccess(alice, collectionId, charlie.address);
+    await approveExpectSuccess(collectionId, itemId, alice, charlie.address);
+    await removeFromAllowListExpectSuccess(alice, collectionId, normalizeAccountId(alice));
+
+    await transferExpectFailure(
+      collectionId,
+      itemId,
+      alice,
+      charlie,
+      1,
+    );
+  });
+
+  it('If Public Access mode is set to AllowList, tokens can’t be destroyed by a non-allowlisted address (even if it owned them before enabling AllowList mode)', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
+    await enableAllowListExpectSuccess(alice, collectionId);
+
+    await usingApi(async (api) => {
+      const tx = api.tx.nft.burnItem(collectionId, itemId, /*normalizeAccountId(Alice.address),*/ 11);
+      const badTransaction = async function () {
+        await submitTransactionExpectFailAsync(alice, tx);
+      };
+      await expect(badTransaction()).to.be.rejected;
+    });
+  });
+
+  it('If Public Access mode is set to AllowList, token transfers can’t be Approved by a non-allowlisted address (see Approve method)', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await approveExpectFail(collectionId, itemId, alice, bob);
+  });
+
+  it('If Public Access mode is set to AllowList, tokens can be transferred to a allowlisted address with transfer.', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await addToAllowListExpectSuccess(alice, collectionId, alice.address);
+    await addToAllowListExpectSuccess(alice, collectionId, charlie.address);
+    await transferExpectSuccess(collectionId, itemId, alice, charlie, 1, 'NFT');
+  });
+
+  it('If Public Access mode is set to AllowList, tokens can be transferred to a alowlisted address with transferFrom.', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await addToAllowListExpectSuccess(alice, collectionId, alice.address);
+    await addToAllowListExpectSuccess(alice, collectionId, charlie.address);
+    await approveExpectSuccess(collectionId, itemId, alice, charlie.address);
+    await transferFromExpectSuccess(collectionId, itemId, alice, alice, charlie, 1, 'NFT');
+  });
+
+  it('If Public Access mode is set to AllowList, tokens can be transferred from a allowlisted address with transfer', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await addToAllowListExpectSuccess(alice, collectionId, alice.address);
+    await addToAllowListExpectSuccess(alice, collectionId, charlie.address);
+    await transferExpectSuccess(collectionId, itemId, alice, charlie, 1, 'NFT');
+  });
+
+  it('If Public Access mode is set to AllowList, tokens can be transferred from a allowlisted address with transferFrom', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await addToAllowListExpectSuccess(alice, collectionId, alice.address);
+    await addToAllowListExpectSuccess(alice, collectionId, charlie.address);
+    await approveExpectSuccess(collectionId, itemId, alice, charlie.address);
+    await transferFromExpectSuccess(collectionId, itemId, alice, alice, charlie, 1, 'NFT');
+  });
+
+  it('If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by owner', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await setMintPermissionExpectSuccess(alice, collectionId, false);
+    await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
+  });
+
+  it('If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by admin', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await setMintPermissionExpectSuccess(alice, collectionId, false);
+    await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
+    await createItemExpectSuccess(bob, collectionId, 'NFT', bob.address);
+  });
+
+  it('If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and allow-listed address', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await setMintPermissionExpectSuccess(alice, collectionId, false);
+    await addToAllowListExpectSuccess(alice, collectionId, bob.address);
+    await createItemExpectFailure(bob, collectionId, 'NFT', bob.address);
+  });
+
+  it('If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and non-allow listed address', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await setMintPermissionExpectSuccess(alice, collectionId, false);
+    await createItemExpectFailure(bob, collectionId, 'NFT', bob.address);
+  });
+
+  it('If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by owner', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await setMintPermissionExpectSuccess(alice, collectionId, true);
+    await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
+  });
+
+  it('If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by admin', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await setMintPermissionExpectSuccess(alice, collectionId, true);
+    await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
+    await createItemExpectSuccess(bob, collectionId, 'NFT', bob.address);
+  });
+
+  it('If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens cannot be created by non-privileged and non-allow listed address', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await setMintPermissionExpectSuccess(alice, collectionId, true);
+    await createItemExpectFailure(bob, collectionId, 'NFT', bob.address);
+  });
+
+  it('If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by non-privileged and allow listed address', async () => {
+    const collectionId = await createCollectionExpectSuccess();
+    await enableAllowListExpectSuccess(alice, collectionId);
+    await setMintPermissionExpectSuccess(alice, collectionId, true);
+    await addToAllowListExpectSuccess(alice, collectionId, bob.address);
+    await createItemExpectSuccess(bob, collectionId, 'NFT', bob.address);
+  });
+});
modifiedtests/src/change-collection-owner.test.tsdiffbeforeafterboth
--- a/tests/src/change-collection-owner.test.ts
+++ b/tests/src/change-collection-owner.test.ts
@@ -12,13 +12,13 @@
   setCollectionSponsorExpectSuccess,
   confirmSponsorshipExpectSuccess,
   removeCollectionSponsorExpectSuccess,
-  enableWhiteListExpectSuccess,
+  enableAllowListExpectSuccess,
   setMintPermissionExpectSuccess,
   destroyCollectionExpectSuccess,
   setCollectionSponsorExpectFailure,
   confirmSponsorshipExpectFailure,
   removeCollectionSponsorExpectFailure,
-  enableWhiteListExpectFail,
+  enableAllowListExpectFail,
   setMintPermissionExpectFailure,
   destroyCollectionExpectFailure,
   setPublicAccessModeExpectSuccess,
@@ -104,8 +104,8 @@
       );
       await submitTransactionAsync(bob, tx1);
 
-      await setPublicAccessModeExpectSuccess(bob, collectionId, 'WhiteList');
-      await enableWhiteListExpectSuccess(bob, collectionId);
+      await setPublicAccessModeExpectSuccess(bob, collectionId, 'AllowList');
+      await enableAllowListExpectSuccess(bob, collectionId);
       await setMintPermissionExpectSuccess(bob, collectionId, true);
       await destroyCollectionExpectSuccess(collectionId, '//Bob');
     });
@@ -225,7 +225,7 @@
       );
       await expect(submitTransactionExpectFailAsync(alice, tx1)).to.be.rejected;
 
-      await enableWhiteListExpectFail(alice, collectionId);
+      await enableAllowListExpectFail(alice, collectionId);
       await setMintPermissionExpectFailure(alice, collectionId, true);
       await destroyCollectionExpectFailure(collectionId, '//Alice');
     });
modifiedtests/src/collision-tests/adminDestroyCollection.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/adminDestroyCollection.test.ts
+++ b/tests/src/collision-tests/adminDestroyCollection.test.ts
@@ -27,26 +27,26 @@
   });
 });
 
-describe('Deleting a collection while add address to whitelist: ', () => {
+describe('Deleting a collection while add address to allowlist: ', () => {
   // tslint:disable-next-line: max-line-length
-  it('Adding an address to the collection whitelist in a block by the admin, and deleting the collection by the owner ', async () => {
+  it('Adding an address to the collection allowlist in a block by the admin, and deleting the collection by the owner ', async () => {
     await usingApi(async (api) => {
       const collectionId = await createCollectionExpectSuccess();
       const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));
       await submitTransactionAsync(Alice, changeAdminTx);
       await waitNewBlocks(1);
       //
-      const addWhitelistAdm = api.tx.nft.addToWhiteList(collectionId, normalizeAccountId(Ferdie.address));
+      const addAllowlistAdm = api.tx.nft.addToAllowList(collectionId, normalizeAccountId(Ferdie.address));
       const destroyCollection = api.tx.nft.destroyCollection(collectionId);
       await Promise.all([
-        addWhitelistAdm.signAndSend(Bob),
+        addAllowlistAdm.signAndSend(Bob),
         destroyCollection.signAndSend(Alice),
       ]);
       await waitNewBlocks(1);
-      let whiteList = false;
-      whiteList = (await api.query.nft.whiteList(collectionId, Ferdie.address)).toJSON() as boolean;
+      let allowList = false;
+      allowList = (await api.query.nft.allowList(collectionId, Ferdie.address)).toJSON() as boolean;
       // tslint:disable-next-line: no-unused-expression
-      expect(whiteList).to.be.false;
+      expect(allowList).to.be.false;
       await waitNewBlocks(2);
     });
   });
modifiedtests/src/collision-tests/tokenLimitsOff.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/tokenLimitsOff.test.ts
+++ b/tests/src/collision-tests/tokenLimitsOff.test.ts
@@ -9,7 +9,7 @@
 import privateKey from '../substrate/privateKey';
 import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';
 import {
-  addToWhiteListExpectSuccess,
+  addToAllowListExpectSuccess,
   createCollectionExpectSuccess,
   getCreateItemResult,
   setMintPermissionExpectSuccess,
@@ -44,8 +44,8 @@
     await usingApi(async (api) => {
       const collectionId = await createCollectionExpectSuccess();
       await setMintPermissionExpectSuccess(Alice, collectionId, true);
-      await addToWhiteListExpectSuccess(Alice, collectionId, Ferdie.address);
-      await addToWhiteListExpectSuccess(Alice, collectionId, Bob.address);
+      await addToAllowListExpectSuccess(Alice, collectionId, Ferdie.address);
+      await addToAllowListExpectSuccess(Alice, collectionId, Bob.address);
       const setCollectionLim = api.tx.nft.setCollectionLimits(
         collectionId,
         {
modifiedtests/src/collision-tests/turnsOffMinting.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/turnsOffMinting.test.ts
+++ b/tests/src/collision-tests/turnsOffMinting.test.ts
@@ -8,7 +8,7 @@
 import privateKey from '../substrate/privateKey';
 import usingApi from '../substrate/substrate-api';
 import {
-  addToWhiteListExpectSuccess,
+  addToAllowListExpectSuccess,
   createCollectionExpectSuccess,
   setMintPermissionExpectSuccess,
   normalizeAccountId,
@@ -33,7 +33,7 @@
     await usingApi(async (api) => {
       const collectionId = await createCollectionExpectSuccess();
       await setMintPermissionExpectSuccess(Alice, collectionId, true);
-      await addToWhiteListExpectSuccess(Alice, collectionId, Ferdie.address);
+      await addToAllowListExpectSuccess(Alice, collectionId, Ferdie.address);
 
       const mintItem = api.tx.nft.createItem(collectionId, normalizeAccountId(Ferdie.address), 'NFT');
       const offMinting = api.tx.nft.setMintPermission(collectionId, false);
modifiedtests/src/confirmSponsorship.test.tsdiffbeforeafterboth
--- a/tests/src/confirmSponsorship.test.ts
+++ b/tests/src/confirmSponsorship.test.ts
@@ -15,9 +15,9 @@
   createItemExpectSuccess,
   findUnusedAddress,
   getGenericResult,
-  enableWhiteListExpectSuccess,
+  enableAllowListExpectSuccess,
   enablePublicMintingExpectSuccess,
-  addToWhiteListExpectSuccess,
+  addToAllowListExpectSuccess,
   normalizeAccountId,
   addCollectionAdminExpectSuccess,
 } from './util/helpers';
@@ -144,8 +144,8 @@
     await setCollectionSponsorExpectSuccess(collectionId, bob.address);
     await confirmSponsorshipExpectSuccess(collectionId, '//Bob');
 
-    // Enable collection white list
-    await enableWhiteListExpectSuccess(alice, collectionId);
+    // Enable collection allow list
+    await enableAllowListExpectSuccess(alice, collectionId);
 
     // Enable public minting
     await enablePublicMintingExpectSuccess(alice, collectionId);
@@ -157,8 +157,8 @@
       // Find unused address
       const zeroBalance = await findUnusedAddress(api);
 
-      // Add zeroBalance address to white list
-      await addToWhiteListExpectSuccess(alice, collectionId, zeroBalance.address);
+      // Add zeroBalance address to allow list
+      await addToAllowListExpectSuccess(alice, collectionId, zeroBalance.address);
 
       // Mint token using unused address as signer
       await createItemExpectSuccess(zeroBalance, collectionId, 'NFT', zeroBalance.address);
@@ -285,8 +285,8 @@
     await setCollectionSponsorExpectSuccess(collectionId, bob.address);
     await confirmSponsorshipExpectSuccess(collectionId, '//Bob');
 
-    // Enable collection white list
-    await enableWhiteListExpectSuccess(alice, collectionId);
+    // Enable collection allow list
+    await enableAllowListExpectSuccess(alice, collectionId);
 
     // Enable public minting
     await enablePublicMintingExpectSuccess(alice, collectionId);
@@ -295,8 +295,8 @@
       // Find unused address
       const zeroBalance = await findUnusedAddress(api);
 
-      // Add zeroBalance address to white list
-      await addToWhiteListExpectSuccess(alice, collectionId, zeroBalance.address);
+      // Add zeroBalance address to allow list
+      await addToAllowListExpectSuccess(alice, collectionId, zeroBalance.address);
 
       // Mint token using unused address as signer - gets sponsored
       await createItemExpectSuccess(zeroBalance, collectionId, 'NFT', zeroBalance.address);
modifiedtests/src/contracts.test.tsdiffbeforeafterboth
--- a/tests/src/contracts.test.ts
+++ b/tests/src/contracts.test.ts
@@ -16,15 +16,15 @@
 } from './util/contracthelpers';
 
 import {
-  addToWhiteListExpectSuccess,
+  addToAllowListExpectSuccess,
   approveExpectSuccess,
   createCollectionExpectSuccess,
   createItemExpectSuccess,
   enablePublicMintingExpectSuccess,
-  enableWhiteListExpectSuccess,
+  enableAllowListExpectSuccess,
   getGenericResult,
   normalizeAccountId,
-  isWhitelisted,
+  isAllowlisted,
   transferFromExpectSuccess,
   getTokenOwner,
 } from './util/helpers';
@@ -96,9 +96,9 @@
       const collectionId = await createCollectionExpectSuccess();
       const [contract] = await deployTransferContract(api);
       await enablePublicMintingExpectSuccess(alice, collectionId);
-      await enableWhiteListExpectSuccess(alice, collectionId);
-      await addToWhiteListExpectSuccess(alice, collectionId, contract.address);
-      await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
+      await enableAllowListExpectSuccess(alice, collectionId);
+      await addToAllowListExpectSuccess(alice, collectionId, contract.address);
+      await addToAllowListExpectSuccess(alice, collectionId, bob.address);
 
       const transferTx = contract.tx.createItem(value, gasLimit, bob.address, collectionId, {Nft: {const_data: '0x010203', variable_data: '0x020304'}});
       const events = await submitTransactionAsync(alice, transferTx);
@@ -124,9 +124,9 @@
       const collectionId = await createCollectionExpectSuccess();
       const [contract] = await deployTransferContract(api);
       await enablePublicMintingExpectSuccess(alice, collectionId);
-      await enableWhiteListExpectSuccess(alice, collectionId);
-      await addToWhiteListExpectSuccess(alice, collectionId, contract.address);
-      await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
+      await enableAllowListExpectSuccess(alice, collectionId);
+      await addToAllowListExpectSuccess(alice, collectionId, contract.address);
+      await addToAllowListExpectSuccess(alice, collectionId, bob.address);
 
       const transferTx = contract.tx.createMultipleItems(value, gasLimit, bob.address, collectionId, [
         {Nft: {const_data: '0x010203', variable_data: '0x020304'}},
@@ -218,7 +218,7 @@
     });
   });
 
-  it('ToggleWhiteList CE', async () => {
+  it('ToggleAllowList CE', async () => {
     await usingApi(async api => {
       const alice = privateKey('//Alice');
       const bob = privateKey('//Bob');
@@ -228,23 +228,23 @@
       const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, contract.address);
       await submitTransactionAsync(alice, changeAdminTx);
 
-      expect(await isWhitelisted(collectionId, bob.address)).to.be.false;
+      expect(await isAllowlisted(collectionId, bob.address)).to.be.false;
 
       {
-        const transferTx = contract.tx.toggleWhiteList(value, gasLimit, collectionId, bob.address, true);
+        const transferTx = contract.tx.toggleAllowList(value, gasLimit, collectionId, bob.address, true);
         const events = await submitTransactionAsync(alice, transferTx);
         const result = getGenericResult(events);
         expect(result.success).to.be.true;
 
-        expect(await isWhitelisted(collectionId, bob.address)).to.be.true;
+        expect(await isAllowlisted(collectionId, bob.address)).to.be.true;
       }
       {
-        const transferTx = contract.tx.toggleWhiteList(value, gasLimit, collectionId, bob.address, false);
+        const transferTx = contract.tx.toggleAllowList(value, gasLimit, collectionId, bob.address, false);
         const events = await submitTransactionAsync(alice, transferTx);
         const result = getGenericResult(events);
         expect(result.success).to.be.true;
 
-        expect(await isWhitelisted(collectionId, bob.address)).to.be.false;
+        expect(await isAllowlisted(collectionId, bob.address)).to.be.false;
       }
     });
   });
modifiedtests/src/eth/allowlist.test.tsdiffbeforeafterboth
--- a/tests/src/eth/allowlist.test.ts
+++ b/tests/src/eth/allowlist.test.ts
@@ -24,7 +24,7 @@
     expect(await helpers.methods.allowed(flipper.options.address, randomUser).call()).to.be.true;
   });
 
-  itWeb3('Non-whitelisted user can\'t call contract with allowlist enabled', async ({api, web3}) => {
+  itWeb3('Non-allowlisted user can\'t call contract with allowlist enabled', async ({api, web3}) => {
     const owner = await createEthAccountWithBalance(api, web3);
     const flipper = await deployFlipper(web3, owner);
     const caller = await createEthAccountWithBalance(api, web3);
@@ -35,7 +35,7 @@
     await flipper.methods.flip().send({from: caller});
     expect(await flipper.methods.getValue().call()).to.be.true;
 
-    // Tx will be reverted if user is not in whitelist
+    // Tx will be reverted if user is not in allowlist
     await helpers.methods.toggleAllowlist(flipper.options.address, true).send({from: owner});
     await expect(flipper.methods.flip().send({from: caller})).to.rejected;
     expect(await flipper.methods.getValue().call()).to.be.true;
modifiedtests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/eth/contractSponsoring.test.ts
+++ b/tests/src/eth/contractSponsoring.test.ts
@@ -32,7 +32,7 @@
     expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false;
   });
 
-  itWeb3('Sponsoring is set, an address that has no UNQ can send a transaction and it works. Sponsor balance should decrease (whitelisted)', async ({api, web3}) => {
+  itWeb3('Sponsoring is set, an address that has no UNQ can send a transaction and it works. Sponsor balance should decrease (allowlisted)', async ({api, web3}) => {
     const alice = privateKey('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
@@ -62,7 +62,7 @@
     expect(+balanceAfter).to.be.lessThan(+originalFlipperBalance);
   });
 
-  itWeb3('Sponsoring is set, an address that has no UNQ can send a transaction and it works. Sponsor balance should not decrease (non-whitelisted)', async ({api, web3}) => {
+  itWeb3('Sponsoring is set, an address that has no UNQ can send a transaction and it works. Sponsor balance should not decrease (non-allowlisted)', async ({api, web3}) => {
     const alice = privateKey('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
@@ -158,7 +158,7 @@
     expect(await helpers.methods.getSponsoringRateLimit(flipper.options.address).call()).to.be.equals('7200');
   });
 
-  itWeb3('If whitelist mode is off and sponsorship is on, sponsorship does not work', async ({api, web3}) => {
+  itWeb3('If allowlist mode is off and sponsorship is on, sponsorship does not work', async ({api, web3}) => {
     const alice = privateKey('//Alice');
 
     const owner = await createEthAccountWithBalance(api, web3);
modifiedtests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -53,7 +53,7 @@
        **/
       AddressIsZero: AugmentedError<ApiType>;
       /**
-       * Address is not in white list.
+       * Address is not in allow list.
        **/
       AddressNotInAllowlist: AugmentedError<ApiType>;
       /**
modifiedtests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth
--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -219,7 +219,7 @@
        **/
       addCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newAdminId: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
       /**
-       * Add an address to white list.
+       * Add an address to allow list.
        * 
        * # Permissions
        * 
@@ -232,7 +232,7 @@
        * 
        * * address.
        **/
-      addToWhiteList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+      addToAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
       /**
        * Set, change, or remove approved address to transfer the ownership of the NFT.
        * 
@@ -336,8 +336,8 @@
        * * Collection Owner.
        * * Collection Admin.
        * * Anyone if
-       * * White List is enabled, and
-       * * Address is added to white list, and
+       * * Allow List is enabled, and
+       * * Address is added to allow list, and
        * * MintPermission is enabled (see SetMintPermission method)
        * 
        * # Arguments
@@ -357,8 +357,8 @@
        * * Collection Owner.
        * * Collection Admin.
        * * Anyone if
-       * * White List is enabled, and
-       * * Address is added to white list, and
+       * * Allow List is enabled, and
+       * * Address is added to allow list, and
        * * MintPermission is enabled (see SetMintPermission method)
        * 
        * # Arguments
@@ -410,7 +410,7 @@
        **/
       removeCollectionSponsor: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
       /**
-       * Remove an address from white list.
+       * Remove an address from allow list.
        * 
        * # Permissions
        * 
@@ -423,7 +423,7 @@
        * 
        * * address.
        **/
-      removeFromWhiteList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+      removeFromAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
       setCollectionLimits: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newLimit: NftDataStructsCollectionLimits | { accountTokenOwnershipLimit?: any; sponsoredDataSize?: any; sponsoredDataRateLimit?: any; tokenLimit?: any; sponsorTransferTimeout?: any; ownerCanTransfer?: any; ownerCanDestroy?: any; transfersEnabled?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, NftDataStructsCollectionLimits]>;
       /**
        * # Permissions
@@ -468,8 +468,8 @@
       setMetaUpdatePermissionFlag: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, value: NftDataStructsMetaUpdatePermission | 'ItemOwner' | 'Admin' | 'None' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, NftDataStructsMetaUpdatePermission]>;
       /**
        * Allows Anyone to create tokens if:
-       * * White List is enabled, and
-       * * Address is added to white list, and
+       * * Allow List is enabled, and
+       * * Address is added to allow list, and
        * * This method was called with True parameter
        * 
        * # Permissions
@@ -498,7 +498,7 @@
        **/
       setOffchainSchema: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, schema: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
       /**
-       * Toggle between normal and white list access for the methods with access for `Anyone`.
+       * Toggle between normal and allow list access for the methods with access for `Anyone`.
        * 
        * # Permissions
        * 
@@ -510,7 +510,7 @@
        * 
        * * mode: [AccessMode]
        **/
-      setPublicAccessMode: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, mode: NftDataStructsAccessMode | 'Normal' | 'WhiteList' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, NftDataStructsAccessMode]>;
+      setPublicAccessMode: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, mode: NftDataStructsAccessMode | 'Normal' | 'AllowList' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, NftDataStructsAccessMode]>;
       /**
        * Set schema standard
        * ImageURL
modifiedtests/src/interfaces/nft/definitions.tsdiffbeforeafterboth
--- a/tests/src/interfaces/nft/definitions.ts
+++ b/tests/src/interfaces/nft/definitions.ts
@@ -91,7 +91,7 @@
       },
     },
     NftDataStructsAccessMode: {
-      _enum: ['Normal', 'WhiteList'],
+      _enum: ['Normal', 'AllowList'],
     },
     NftDataStructsSchemaVersion: mkDummy('SchemaVersion'),
 
modifiedtests/src/interfaces/nft/types.tsdiffbeforeafterboth
--- a/tests/src/interfaces/nft/types.ts
+++ b/tests/src/interfaces/nft/types.ts
@@ -7,7 +7,7 @@
 /** @name NftDataStructsAccessMode */
 export interface NftDataStructsAccessMode extends Enum {
   readonly isNormal: boolean;
-  readonly isWhiteList: boolean;
+  readonly isAllowList: boolean;
 }
 
 /** @name NftDataStructsCollection */
modifiedtests/src/metadataUpdate.test.tsdiffbeforeafterboth
--- a/tests/src/metadataUpdate.test.ts
+++ b/tests/src/metadataUpdate.test.ts
@@ -12,11 +12,11 @@
   createItemExpectSuccess,
   createCollectionExpectSuccess,
   enablePublicMintingExpectSuccess,
-  enableWhiteListExpectSuccess,
+  enableAllowListExpectSuccess,
   setMetadataUpdatePermissionFlagExpectSuccess,
   setVariableMetaDataExpectSuccess,
   setMintPermissionExpectSuccess,
-  addToWhiteListExpectSuccess,
+  addToAllowListExpectSuccess,
   addCollectionAdminExpectSuccess,
   setVariableMetaDataExpectFailure,
   setMetadataUpdatePermissionFlagExpectFailure,
@@ -53,7 +53,7 @@
       await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'ItemOwner');
 
       await setMintPermissionExpectSuccess(alice, nftCollectionId, true);
-      await addToWhiteListExpectSuccess(alice, nftCollectionId, bob.address);
+      await addToAllowListExpectSuccess(alice, nftCollectionId, bob.address);
       await addCollectionAdminExpectSuccess(alice, nftCollectionId, bob.address);
 
       await setVariableMetaDataExpectFailure(bob, nftCollectionId, newNftTokenId, data);
@@ -92,7 +92,7 @@
       await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'Admin');
 
       await setMintPermissionExpectSuccess(alice, nftCollectionId, true);
-      await addToWhiteListExpectSuccess(alice, nftCollectionId, bob.address);
+      await addToAllowListExpectSuccess(alice, nftCollectionId, bob.address);
       await addCollectionAdminExpectSuccess(alice, nftCollectionId, bob.address);
 
       await setVariableMetaDataExpectSuccess(bob, nftCollectionId, newNftTokenId, data);
@@ -112,7 +112,7 @@
       await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'Admin');
 
       await setMintPermissionExpectSuccess(alice, nftCollectionId, true);
-      await addToWhiteListExpectSuccess(alice, nftCollectionId, bob.address);
+      await addToAllowListExpectSuccess(alice, nftCollectionId, bob.address);
       await addCollectionAdminExpectSuccess(alice, nftCollectionId, bob.address);
 
       await setVariableMetaDataExpectSuccess(bob, nftCollectionId, newNftTokenId, data);
@@ -129,8 +129,8 @@
       // nft
       const nftCollectionId = await createCollectionExpectSuccess();
       await enablePublicMintingExpectSuccess(alice, nftCollectionId);
-      await addToWhiteListExpectSuccess(alice, nftCollectionId, bob.address);
-      await enableWhiteListExpectSuccess(alice, nftCollectionId);
+      await addToAllowListExpectSuccess(alice, nftCollectionId, bob.address);
+      await enableAllowListExpectSuccess(alice, nftCollectionId);
       const newNftTokenId = await createItemExpectSuccess(bob, nftCollectionId, 'NFT');
       await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'Admin');
 
@@ -169,7 +169,7 @@
       await setMetadataUpdatePermissionFlagExpectSuccess(alice, nftCollectionId, 'None');
 
       await setMintPermissionExpectSuccess(alice, nftCollectionId, true);
-      await addToWhiteListExpectSuccess(alice, nftCollectionId, bob.address);
+      await addToAllowListExpectSuccess(alice, nftCollectionId, bob.address);
       await addCollectionAdminExpectSuccess(alice, nftCollectionId, bob.address);
 
       await setVariableMetaDataExpectFailure(bob, nftCollectionId, newNftTokenId, data);
modifiedtests/src/mintModes.test.tsdiffbeforeafterboth
--- a/tests/src/mintModes.test.ts
+++ b/tests/src/mintModes.test.ts
@@ -7,14 +7,14 @@
 import privateKey from './substrate/privateKey';
 import usingApi from './substrate/substrate-api';
 import {
-  addToWhiteListExpectSuccess,
+  addToAllowListExpectSuccess,
   createCollectionExpectSuccess,
   createItemExpectFailure,
   createItemExpectSuccess,
-  enableWhiteListExpectSuccess,
+  enableAllowListExpectSuccess,
   setMintPermissionExpectSuccess,
   addCollectionAdminExpectSuccess,
-  disableWhiteListExpectSuccess,
+  disableAllowListExpectSuccess,
 } from './util/helpers';
 
 describe('Integration Test public minting', () => {
@@ -28,40 +28,40 @@
     });
   });
 
-  it('If the AllowList mode is enabled, then the address added to the whitelist and not the owner or administrator can create tokens', async () => {
+  it('If the AllowList mode is enabled, then the address added to the allowlist and not the owner or administrator can create tokens', async () => {
     await usingApi(async () => {
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await enableWhiteListExpectSuccess(alice, collectionId);
+      await enableAllowListExpectSuccess(alice, collectionId);
       await setMintPermissionExpectSuccess(alice, collectionId, true);
-      await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
+      await addToAllowListExpectSuccess(alice, collectionId, bob.address);
 
       await createItemExpectSuccess(bob, collectionId, 'NFT');
     });
   });
 
-  it('If the AllowList mode is enabled, address not included in whitelist that is regular user cannot create tokens', async () => {
+  it('If the AllowList mode is enabled, address not included in allowlist that is regular user cannot create tokens', async () => {
     await usingApi(async () => {
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await enableWhiteListExpectSuccess(alice, collectionId);
+      await enableAllowListExpectSuccess(alice, collectionId);
       await setMintPermissionExpectSuccess(alice, collectionId, true);
       await createItemExpectFailure(bob, collectionId, 'NFT');
     });
   });
 
-  it('If the AllowList mode is enabled, address not included in whitelist that is admin can create tokens', async () => {
+  it('If the AllowList mode is enabled, address not included in allowlist that is admin can create tokens', async () => {
     await usingApi(async () => {
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await enableWhiteListExpectSuccess(alice, collectionId);
+      await enableAllowListExpectSuccess(alice, collectionId);
       await setMintPermissionExpectSuccess(alice, collectionId, true);
       await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
       await createItemExpectSuccess(bob, collectionId, 'NFT');
     });
   });
 
-  it('If the AllowList mode is enabled, address not included in whitelist that is owner can create tokens', async () => {
+  it('If the AllowList mode is enabled, address not included in allowlist that is owner can create tokens', async () => {
     await usingApi(async () => {
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await enableWhiteListExpectSuccess(alice, collectionId);
+      await enableAllowListExpectSuccess(alice, collectionId);
       await setMintPermissionExpectSuccess(alice, collectionId, true);
       await createItemExpectSuccess(alice, collectionId, 'NFT');
     });
@@ -70,7 +70,7 @@
   it('If the AllowList mode is disabled, owner can create tokens', async () => {
     await usingApi(async () => {
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await disableWhiteListExpectSuccess(alice, collectionId);
+      await disableAllowListExpectSuccess(alice, collectionId);
       await setMintPermissionExpectSuccess(alice, collectionId, true);
       await createItemExpectSuccess(alice, collectionId, 'NFT');
     });
@@ -79,7 +79,7 @@
   it('If the AllowList mode is disabled, collection admin can create tokens', async () => {
     await usingApi(async () => {
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await disableWhiteListExpectSuccess(alice, collectionId);
+      await disableAllowListExpectSuccess(alice, collectionId);
       await setMintPermissionExpectSuccess(alice, collectionId, true);
       await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
       await createItemExpectSuccess(bob, collectionId, 'NFT');
@@ -89,7 +89,7 @@
   it('If the AllowList mode is disabled, regular user can`t create tokens', async () => {
     await usingApi(async () => {
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await disableWhiteListExpectSuccess(alice, collectionId);
+      await disableAllowListExpectSuccess(alice, collectionId);
       await setMintPermissionExpectSuccess(alice, collectionId, true);
       await createItemExpectFailure(bob, collectionId, 'NFT');
     });
@@ -110,9 +110,9 @@
   it('Address that is the not owner or not admin cannot create tokens', async () => {
     await usingApi(async () => {
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await enableWhiteListExpectSuccess(alice, collectionId);
+      await enableAllowListExpectSuccess(alice, collectionId);
       await setMintPermissionExpectSuccess(alice, collectionId, false);
-      await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
+      await addToAllowListExpectSuccess(alice, collectionId, bob.address);
       await createItemExpectFailure(bob, collectionId, 'NFT');
     });
   });
@@ -120,7 +120,7 @@
   it('Address that is collection owner can create tokens', async () => {
     await usingApi(async () => {
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await disableWhiteListExpectSuccess(alice, collectionId);
+      await disableAllowListExpectSuccess(alice, collectionId);
       await setMintPermissionExpectSuccess(alice, collectionId, false);
       await createItemExpectSuccess(alice, collectionId, 'NFT');
     });
@@ -129,7 +129,7 @@
   it('Address that is admin can create tokens', async () => {
     await usingApi(async () => {
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await disableWhiteListExpectSuccess(alice, collectionId);
+      await disableAllowListExpectSuccess(alice, collectionId);
       await setMintPermissionExpectSuccess(alice, collectionId, false);
       await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
       await createItemExpectSuccess(bob, collectionId, 'NFT');
addedtests/src/removeFromAllowList.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/removeFromAllowList.test.ts
@@ -0,0 +1,136 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import {default as usingApi} from './substrate/substrate-api';
+import {
+  createCollectionExpectSuccess,
+  destroyCollectionExpectSuccess,
+  enableAllowListExpectSuccess,
+  addToAllowListExpectSuccess,
+  removeFromAllowListExpectSuccess,
+  isAllowlisted,
+  findNotExistingCollection,
+  removeFromAllowListExpectFailure,
+  disableAllowListExpectSuccess,
+  normalizeAccountId,
+  addCollectionAdminExpectSuccess,
+} from './util/helpers';
+import {IKeyringPair} from '@polkadot/types/types';
+import privateKey from './substrate/privateKey';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+
+describe('Integration Test removeFromAllowList', () => {
+  let alice: IKeyringPair;
+  let bob: IKeyringPair;
+
+  before(async () => {
+    await usingApi(async () => {
+      alice = privateKey('//Alice');
+      bob = privateKey('//Bob');
+    });
+  });
+
+  it('ensure bob is not in allowlist after removal', async () => {
+    await usingApi(async () => {
+      const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
+      await enableAllowListExpectSuccess(alice, collectionId);
+      await addToAllowListExpectSuccess(alice, collectionId, bob.address);
+
+      await removeFromAllowListExpectSuccess(alice, collectionId, normalizeAccountId(bob.address));
+      expect(await isAllowlisted(collectionId, bob.address)).to.be.false;
+    });
+  });
+
+  it('allows removal from collection with unset allowlist status', async () => {
+    await usingApi(async () => {
+      const collectionWithoutAllowlistId = await createCollectionExpectSuccess();
+      await enableAllowListExpectSuccess(alice, collectionWithoutAllowlistId);
+      await addToAllowListExpectSuccess(alice, collectionWithoutAllowlistId, bob.address);
+      await disableAllowListExpectSuccess(alice, collectionWithoutAllowlistId);
+
+      await removeFromAllowListExpectSuccess(alice, collectionWithoutAllowlistId, normalizeAccountId(bob.address));
+    });
+  });
+});
+
+describe('Negative Integration Test removeFromAllowList', () => {
+  let alice: IKeyringPair;
+  let bob: IKeyringPair;
+
+  before(async () => {
+    await usingApi(async () => {
+      alice = privateKey('//Alice');
+      bob = privateKey('//Bob');
+    });
+  });
+
+  it('fails on removal from not existing collection', async () => {
+    await usingApi(async (api) => {
+      const collectionId = await findNotExistingCollection(api);
+
+      await removeFromAllowListExpectFailure(alice, collectionId, normalizeAccountId(bob.address));
+    });
+  });
+
+  it('fails on removal from removed collection', async () => {
+    await usingApi(async () => {
+      const collectionId = await createCollectionExpectSuccess();
+      await enableAllowListExpectSuccess(alice, collectionId);
+      await addToAllowListExpectSuccess(alice, collectionId, bob.address);
+      await destroyCollectionExpectSuccess(collectionId);
+
+      await removeFromAllowListExpectFailure(alice, collectionId, normalizeAccountId(bob.address));
+    });
+  });
+});
+
+describe('Integration Test removeFromAllowList with collection admin permissions', () => {
+  let alice: IKeyringPair;
+  let bob: IKeyringPair;
+  let charlie: IKeyringPair;
+
+  before(async () => {
+    await usingApi(async () => {
+      alice = privateKey('//Alice');
+      bob = privateKey('//Bob');
+      charlie = privateKey('//Charlie');
+    });
+  });
+
+  it('ensure address is not in allowlist after removal', async () => {
+    await usingApi(async () => {
+      const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
+      await enableAllowListExpectSuccess(alice, collectionId);
+      await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
+      await addToAllowListExpectSuccess(alice, collectionId, charlie.address);
+      await removeFromAllowListExpectSuccess(bob, collectionId, normalizeAccountId(charlie.address));
+      expect(await isAllowlisted(collectionId, charlie.address)).to.be.false;
+    });
+  });
+
+  it('Collection admin allowed to remove from allowlist with unset allowlist status', async () => {
+    await usingApi(async () => {
+      const collectionWithoutAllowlistId = await createCollectionExpectSuccess();
+      await enableAllowListExpectSuccess(alice, collectionWithoutAllowlistId);
+      await addCollectionAdminExpectSuccess(alice, collectionWithoutAllowlistId, bob.address);
+      await addToAllowListExpectSuccess(alice, collectionWithoutAllowlistId, charlie.address);
+      await disableAllowListExpectSuccess(alice, collectionWithoutAllowlistId);
+      await removeFromAllowListExpectSuccess(bob, collectionWithoutAllowlistId, normalizeAccountId(charlie.address));
+    });
+  });
+
+  it('Regular user can`t remove from allowlist', async () => {
+    await usingApi(async () => {
+      const collectionWithoutAllowlistId = await createCollectionExpectSuccess();
+      await enableAllowListExpectSuccess(alice, collectionWithoutAllowlistId);
+      await addToAllowListExpectSuccess(alice, collectionWithoutAllowlistId, charlie.address);
+      await removeFromAllowListExpectFailure(bob, collectionWithoutAllowlistId, normalizeAccountId(charlie.address));
+    });
+  });
+});
addedtests/src/removeFromContractAllowList.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/removeFromContractAllowList.test.ts
@@ -0,0 +1,81 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
+import privateKey from './substrate/privateKey';
+import usingApi from './substrate/substrate-api';
+import {deployFlipper, toggleFlipValueExpectFailure, toggleFlipValueExpectSuccess} from './util/contracthelpers';
+import {addToContractAllowListExpectSuccess, isAllowlistedInContract, removeFromContractAllowListExpectFailure, removeFromContractAllowListExpectSuccess, toggleContractAllowlistExpectSuccess} from './util/helpers';
+import {IKeyringPair} from '@polkadot/types/types';
+import {expect} from 'chai';
+
+describe.skip('Integration Test removeFromContractAllowList', () => {
+  let bob: IKeyringPair;
+
+  before(async () => {
+    await usingApi(async () => {
+      bob = privateKey('//Bob');
+    });
+  });
+
+  it('user is no longer allowlisted after removal', async () => {
+    await usingApi(async (api) => {
+      const [flipper, deployer] = await deployFlipper(api);
+
+      await addToContractAllowListExpectSuccess(deployer, flipper.address.toString(), bob.address);
+      await removeFromContractAllowListExpectSuccess(deployer, flipper.address.toString(), bob.address);
+
+      expect(await isAllowlistedInContract(flipper.address, bob.address)).to.be.false;
+    });
+  });
+
+  it('user can\'t execute contract after removal', async () => {
+    await usingApi(async (api) => {
+      const [flipper, deployer] = await deployFlipper(api);
+      await toggleContractAllowlistExpectSuccess(deployer, flipper.address.toString(), true);
+
+      await addToContractAllowListExpectSuccess(deployer, flipper.address.toString(), bob.address);
+      await toggleFlipValueExpectSuccess(bob, flipper);
+
+      await removeFromContractAllowListExpectSuccess(deployer, flipper.address.toString(), bob.address);
+      await toggleFlipValueExpectFailure(bob, flipper);
+    });
+  });
+
+  it('can be called twice', async () => {
+    await usingApi(async (api) => {
+      const [flipper, deployer] = await deployFlipper(api);
+
+      await addToContractAllowListExpectSuccess(deployer, flipper.address.toString(), bob.address);
+      await removeFromContractAllowListExpectSuccess(deployer, flipper.address.toString(), bob.address);
+      await removeFromContractAllowListExpectSuccess(deployer, flipper.address.toString(), bob.address);
+    });
+  });
+});
+
+describe.skip('Negative Integration Test removeFromContractAllowList', () => {
+  let alice: IKeyringPair;
+  let bob: IKeyringPair;
+
+  before(async () => {
+    await usingApi(async () => {
+      alice = privateKey('//Alice');
+      bob = privateKey('//Bob');
+    });
+  });
+
+  it('fails when called with non-contract address', async () => {
+    await usingApi(async () => {
+      await removeFromContractAllowListExpectFailure(alice, alice.address, bob.address);
+    });
+  });
+
+  it('fails when executed by non owner', async () => {
+    await usingApi(async (api) => {
+      const [flipper] = await deployFlipper(api);
+
+      await removeFromContractAllowListExpectFailure(alice, flipper.address.toString(), bob.address);
+    });
+  });
+});
deletedtests/src/removeFromContractWhiteList.test.tsdiffbeforeafterboth
--- a/tests/src/removeFromContractWhiteList.test.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
-
-import privateKey from './substrate/privateKey';
-import usingApi from './substrate/substrate-api';
-import {deployFlipper, toggleFlipValueExpectFailure, toggleFlipValueExpectSuccess} from './util/contracthelpers';
-import {addToContractWhiteListExpectSuccess, isWhitelistedInContract, removeFromContractWhiteListExpectFailure, removeFromContractWhiteListExpectSuccess, toggleContractWhitelistExpectSuccess} from './util/helpers';
-import {IKeyringPair} from '@polkadot/types/types';
-import {expect} from 'chai';
-
-describe.skip('Integration Test removeFromContractWhiteList', () => {
-  let bob: IKeyringPair;
-
-  before(async () => {
-    await usingApi(async () => {
-      bob = privateKey('//Bob');
-    });
-  });
-
-  it('user is no longer whitelisted after removal', async () => {
-    await usingApi(async (api) => {
-      const [flipper, deployer] = await deployFlipper(api);
-
-      await addToContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
-      await removeFromContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
-
-      expect(await isWhitelistedInContract(flipper.address, bob.address)).to.be.false;
-    });
-  });
-
-  it('user can\'t execute contract after removal', async () => {
-    await usingApi(async (api) => {
-      const [flipper, deployer] = await deployFlipper(api);
-      await toggleContractWhitelistExpectSuccess(deployer, flipper.address.toString(), true);
-
-      await addToContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
-      await toggleFlipValueExpectSuccess(bob, flipper);
-
-      await removeFromContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
-      await toggleFlipValueExpectFailure(bob, flipper);
-    });
-  });
-
-  it('can be called twice', async () => {
-    await usingApi(async (api) => {
-      const [flipper, deployer] = await deployFlipper(api);
-
-      await addToContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
-      await removeFromContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
-      await removeFromContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
-    });
-  });
-});
-
-describe.skip('Negative Integration Test removeFromContractWhiteList', () => {
-  let alice: IKeyringPair;
-  let bob: IKeyringPair;
-
-  before(async () => {
-    await usingApi(async () => {
-      alice = privateKey('//Alice');
-      bob = privateKey('//Bob');
-    });
-  });
-
-  it('fails when called with non-contract address', async () => {
-    await usingApi(async () => {
-      await removeFromContractWhiteListExpectFailure(alice, alice.address, bob.address);
-    });
-  });
-
-  it('fails when executed by non owner', async () => {
-    await usingApi(async (api) => {
-      const [flipper] = await deployFlipper(api);
-
-      await removeFromContractWhiteListExpectFailure(alice, flipper.address.toString(), bob.address);
-    });
-  });
-});
deletedtests/src/removeFromWhiteList.test.tsdiffbeforeafterboth
--- a/tests/src/removeFromWhiteList.test.ts
+++ /dev/null
@@ -1,136 +0,0 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
-
-import chai from 'chai';
-import chaiAsPromised from 'chai-as-promised';
-import {default as usingApi} from './substrate/substrate-api';
-import {
-  createCollectionExpectSuccess,
-  destroyCollectionExpectSuccess,
-  enableWhiteListExpectSuccess,
-  addToWhiteListExpectSuccess,
-  removeFromWhiteListExpectSuccess,
-  isWhitelisted,
-  findNotExistingCollection,
-  removeFromWhiteListExpectFailure,
-  disableWhiteListExpectSuccess,
-  normalizeAccountId,
-  addCollectionAdminExpectSuccess,
-} from './util/helpers';
-import {IKeyringPair} from '@polkadot/types/types';
-import privateKey from './substrate/privateKey';
-
-chai.use(chaiAsPromised);
-const expect = chai.expect;
-
-describe('Integration Test removeFromWhiteList', () => {
-  let alice: IKeyringPair;
-  let bob: IKeyringPair;
-
-  before(async () => {
-    await usingApi(async () => {
-      alice = privateKey('//Alice');
-      bob = privateKey('//Bob');
-    });
-  });
-
-  it('ensure bob is not in whitelist after removal', async () => {
-    await usingApi(async () => {
-      const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await enableWhiteListExpectSuccess(alice, collectionId);
-      await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
-
-      await removeFromWhiteListExpectSuccess(alice, collectionId, normalizeAccountId(bob.address));
-      expect(await isWhitelisted(collectionId, bob.address)).to.be.false;
-    });
-  });
-
-  it('allows removal from collection with unset whitelist status', async () => {
-    await usingApi(async () => {
-      const collectionWithoutWhitelistId = await createCollectionExpectSuccess();
-      await enableWhiteListExpectSuccess(alice, collectionWithoutWhitelistId);
-      await addToWhiteListExpectSuccess(alice, collectionWithoutWhitelistId, bob.address);
-      await disableWhiteListExpectSuccess(alice, collectionWithoutWhitelistId);
-
-      await removeFromWhiteListExpectSuccess(alice, collectionWithoutWhitelistId, normalizeAccountId(bob.address));
-    });
-  });
-});
-
-describe('Negative Integration Test removeFromWhiteList', () => {
-  let alice: IKeyringPair;
-  let bob: IKeyringPair;
-
-  before(async () => {
-    await usingApi(async () => {
-      alice = privateKey('//Alice');
-      bob = privateKey('//Bob');
-    });
-  });
-
-  it('fails on removal from not existing collection', async () => {
-    await usingApi(async (api) => {
-      const collectionId = await findNotExistingCollection(api);
-
-      await removeFromWhiteListExpectFailure(alice, collectionId, normalizeAccountId(bob.address));
-    });
-  });
-
-  it('fails on removal from removed collection', async () => {
-    await usingApi(async () => {
-      const collectionId = await createCollectionExpectSuccess();
-      await enableWhiteListExpectSuccess(alice, collectionId);
-      await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
-      await destroyCollectionExpectSuccess(collectionId);
-
-      await removeFromWhiteListExpectFailure(alice, collectionId, normalizeAccountId(bob.address));
-    });
-  });
-});
-
-describe('Integration Test removeFromWhiteList with collection admin permissions', () => {
-  let alice: IKeyringPair;
-  let bob: IKeyringPair;
-  let charlie: IKeyringPair;
-
-  before(async () => {
-    await usingApi(async () => {
-      alice = privateKey('//Alice');
-      bob = privateKey('//Bob');
-      charlie = privateKey('//Charlie');
-    });
-  });
-
-  it('ensure address is not in whitelist after removal', async () => {
-    await usingApi(async () => {
-      const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await enableWhiteListExpectSuccess(alice, collectionId);
-      await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
-      await addToWhiteListExpectSuccess(alice, collectionId, charlie.address);
-      await removeFromWhiteListExpectSuccess(bob, collectionId, normalizeAccountId(charlie.address));
-      expect(await isWhitelisted(collectionId, charlie.address)).to.be.false;
-    });
-  });
-
-  it('Collection admin allowed to remove from whitelist with unset whitelist status', async () => {
-    await usingApi(async () => {
-      const collectionWithoutWhitelistId = await createCollectionExpectSuccess();
-      await enableWhiteListExpectSuccess(alice, collectionWithoutWhitelistId);
-      await addCollectionAdminExpectSuccess(alice, collectionWithoutWhitelistId, bob.address);
-      await addToWhiteListExpectSuccess(alice, collectionWithoutWhitelistId, charlie.address);
-      await disableWhiteListExpectSuccess(alice, collectionWithoutWhitelistId);
-      await removeFromWhiteListExpectSuccess(bob, collectionWithoutWhitelistId, normalizeAccountId(charlie.address));
-    });
-  });
-
-  it('Regular user can`t remove from whitelist', async () => {
-    await usingApi(async () => {
-      const collectionWithoutWhitelistId = await createCollectionExpectSuccess();
-      await enableWhiteListExpectSuccess(alice, collectionWithoutWhitelistId);
-      await addToWhiteListExpectSuccess(alice, collectionWithoutWhitelistId, charlie.address);
-      await removeFromWhiteListExpectFailure(bob, collectionWithoutWhitelistId, normalizeAccountId(charlie.address));
-    });
-  });
-});
modifiedtests/src/setMintPermission.test.tsdiffbeforeafterboth
--- a/tests/src/setMintPermission.test.ts
+++ b/tests/src/setMintPermission.test.ts
@@ -7,12 +7,12 @@
 import privateKey from './substrate/privateKey';
 import usingApi from './substrate/substrate-api';
 import {
-  addToWhiteListExpectSuccess,
+  addToAllowListExpectSuccess,
   createCollectionExpectSuccess,
   createItemExpectFailure,
   createItemExpectSuccess,
   destroyCollectionExpectSuccess,
-  enableWhiteListExpectSuccess,
+  enableAllowListExpectSuccess,
   findNotExistingCollection,
   setMintPermissionExpectFailure,
   setMintPermissionExpectSuccess,
@@ -30,12 +30,12 @@
     });
   });
 
-  it('ensure white-listed non-privileged address can mint tokens', async () => {
+  it('ensure allow-listed non-privileged address can mint tokens', async () => {
     await usingApi(async () => {
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await enableWhiteListExpectSuccess(alice, collectionId);
+      await enableAllowListExpectSuccess(alice, collectionId);
       await setMintPermissionExpectSuccess(alice, collectionId, true);
-      await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
+      await addToAllowListExpectSuccess(alice, collectionId, bob.address);
 
       await createItemExpectSuccess(bob, collectionId, 'NFT');
     });
@@ -88,7 +88,7 @@
 
   it('fails when not collection owner tries to set mint status', async () => {
     const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-    await enableWhiteListExpectSuccess(alice, collectionId);
+    await enableAllowListExpectSuccess(alice, collectionId);
     await setMintPermissionExpectFailure(bob, collectionId, true);
   });
 
@@ -100,10 +100,10 @@
     });
   });
 
-  it('ensure non-white-listed non-privileged address can\'t mint tokens', async () => {
+  it('ensure non-allow-listed non-privileged address can\'t mint tokens', async () => {
     await usingApi(async () => {
       const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
-      await enableWhiteListExpectSuccess(alice, collectionId);
+      await enableAllowListExpectSuccess(alice, collectionId);
       await setMintPermissionExpectSuccess(alice, collectionId, true);
 
       await createItemExpectFailure(bob, collectionId, 'NFT');
modifiedtests/src/setPublicAccessMode.test.tsdiffbeforeafterboth
--- a/tests/src/setPublicAccessMode.test.ts
+++ b/tests/src/setPublicAccessMode.test.ts
@@ -11,12 +11,12 @@
 import privateKey from './substrate/privateKey';
 import usingApi, {submitTransactionExpectFailAsync} from './substrate/substrate-api';
 import {
-  addToWhiteListExpectSuccess,
+  addToAllowListExpectSuccess,
   createCollectionExpectSuccess,
   createItemExpectSuccess,
   destroyCollectionExpectSuccess,
   enablePublicMintingExpectSuccess,
-  enableWhiteListExpectSuccess,
+  enableAllowListExpectSuccess,
   normalizeAccountId,
   addCollectionAdminExpectSuccess,
 } from './util/helpers';
@@ -35,20 +35,20 @@
     });
   });
 
-  it('Run extrinsic with collection id parameters, set the whitelist mode for the collection', async () => {
+  it('Run extrinsic with collection id parameters, set the allowlist mode for the collection', async () => {
     await usingApi(async () => {
       const collectionId: number = await createCollectionExpectSuccess();
-      await enableWhiteListExpectSuccess(alice, collectionId);
+      await enableAllowListExpectSuccess(alice, collectionId);
       await enablePublicMintingExpectSuccess(alice, collectionId);
-      await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
+      await addToAllowListExpectSuccess(alice, collectionId, bob.address);
       await createItemExpectSuccess(bob, collectionId, 'NFT', bob.address);
     });
   });
 
-  it('Whitelisted collection limits', async () => {
+  it('Allowlisted collection limits', async () => {
     await usingApi(async (api: ApiPromise) => {
       const collectionId = await createCollectionExpectSuccess();
-      await enableWhiteListExpectSuccess(alice, collectionId);
+      await enableAllowListExpectSuccess(alice, collectionId);
       await enablePublicMintingExpectSuccess(alice, collectionId);
       const tx = api.tx.nft.createItem(collectionId, normalizeAccountId(bob.address), 'NFT');
       await expect(submitTransactionExpectFailAsync(bob, tx)).to.be.rejected;
@@ -61,7 +61,7 @@
     await usingApi(async (api: ApiPromise) => {
       // tslint:disable-next-line: radix
       const collectionId = (await api.query.common.createdCollectionCount()).toNumber() + 1;
-      const tx = api.tx.nft.setPublicAccessMode(collectionId, 'WhiteList');
+      const tx = api.tx.nft.setPublicAccessMode(collectionId, 'AllowList');
       await expect(submitTransactionExpectFailAsync(alice, tx)).to.be.rejected;
     });
   });
@@ -71,7 +71,7 @@
       // tslint:disable-next-line: no-bitwise
       const collectionId = await createCollectionExpectSuccess();
       await destroyCollectionExpectSuccess(collectionId);
-      const tx = api.tx.nft.setPublicAccessMode(collectionId, 'WhiteList');
+      const tx = api.tx.nft.setPublicAccessMode(collectionId, 'AllowList');
       await expect(submitTransactionExpectFailAsync(alice, tx)).to.be.rejected;
     });
   });
@@ -79,8 +79,8 @@
   it('Re-set the list mode already set in quantity', async () => {
     await usingApi(async () => {
       const collectionId: number = await createCollectionExpectSuccess();
-      await enableWhiteListExpectSuccess(alice, collectionId);
-      await enableWhiteListExpectSuccess(alice, collectionId);
+      await enableAllowListExpectSuccess(alice, collectionId);
+      await enableAllowListExpectSuccess(alice, collectionId);
     });
   });
 
@@ -88,7 +88,7 @@
     await usingApi(async (api: ApiPromise) => {
       // tslint:disable-next-line: no-bitwise
       const collectionId = await createCollectionExpectSuccess();
-      const tx = api.tx.nft.setPublicAccessMode(collectionId, 'WhiteList');
+      const tx = api.tx.nft.setPublicAccessMode(collectionId, 'AllowList');
       await expect(submitTransactionExpectFailAsync(bob, tx)).to.be.rejected;
     });
   });
@@ -106,7 +106,7 @@
       // tslint:disable-next-line: no-bitwise
       const collectionId = await createCollectionExpectSuccess();
       await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
-      const tx = api.tx.nft.setPublicAccessMode(collectionId, 'WhiteList');
+      const tx = api.tx.nft.setPublicAccessMode(collectionId, 'AllowList');
       await expect(submitTransactionExpectFailAsync(bob, tx)).to.be.rejected;
     });
   });
addedtests/src/toggleContractAllowList.test.tsdiffbeforeafterboth
--- /dev/null
+++ b/tests/src/toggleContractAllowList.test.ts
@@ -0,0 +1,156 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+import usingApi, {submitTransactionAsync, submitTransactionExpectFailAsync} from './substrate/substrate-api';
+import privateKey from './substrate/privateKey';
+import {
+  deployFlipper,
+  getFlipValue,
+} from './util/contracthelpers';
+import {
+  getGenericResult,
+} from './util/helpers';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+
+const value = 0;
+const gasLimit = 3000n * 1000000n;
+
+describe.skip('Integration Test toggleContractAllowList', () => {
+
+  it('Enable allow list contract mode', async () => {
+    await usingApi(async api => {
+      const [contract, deployer] = await deployFlipper(api);
+
+      const enabledBefore = (await api.query.nft.contractAllowListEnabled(contract.address)).toJSON();
+      const enableAllowListTx = api.tx.nft.toggleContractAllowList(contract.address, true);
+      const enableEvents = await submitTransactionAsync(deployer, enableAllowListTx);
+      const enabled = (await api.query.nft.contractAllowListEnabled(contract.address)).toJSON();
+
+      expect(getGenericResult(enableEvents).success).to.be.true;
+      expect(enabledBefore).to.be.false;
+      expect(enabled).to.be.true;
+    });
+  });
+
+  it('Only allowlisted account can call contract', async () => {
+    await usingApi(async api => {
+      const bob = privateKey('//Bob');
+
+      const [contract, deployer] = await deployFlipper(api);
+
+      let flipValueBefore = await getFlipValue(contract, deployer);
+      const flip = contract.tx.flip(value, gasLimit);
+      await submitTransactionAsync(bob, flip);
+      const flipValueAfter = await getFlipValue(contract,deployer);
+      expect(flipValueAfter).to.be.eq(!flipValueBefore, 'Anyone can call new contract.');
+
+      const deployerCanFlip = async () => {
+        const flipValueBefore = await getFlipValue(contract, deployer);
+        const deployerFlip = contract.tx.flip(value, gasLimit);
+        await submitTransactionAsync(deployer, deployerFlip);
+        const aliceFlip1Response = await getFlipValue(contract, deployer);
+        expect(aliceFlip1Response).to.be.eq(!flipValueBefore, 'Deployer always can flip.');
+      };
+      await deployerCanFlip();
+
+      flipValueBefore = await getFlipValue(contract, deployer);
+      const enableAllowListTx = api.tx.nft.toggleContractAllowList(contract.address, true);
+      await submitTransactionAsync(deployer, enableAllowListTx);
+      const flipWithEnabledAllowList = contract.tx.flip(value, gasLimit);
+      await expect(submitTransactionExpectFailAsync(bob, flipWithEnabledAllowList)).to.be.rejected;
+      const flipValueAfterEnableAllowList = await getFlipValue(contract, deployer);
+      expect(flipValueAfterEnableAllowList).to.be.eq(flipValueBefore, 'Enabling allowlist doesn\'t make it possible to call contract for everyone.');
+
+      await deployerCanFlip();
+
+      flipValueBefore = await getFlipValue(contract, deployer);
+      const addBobToAllowListTx = api.tx.nft.addToContractAllowList(contract.address, bob.address);
+      await submitTransactionAsync(deployer, addBobToAllowListTx);
+      const flipWithAllowlistedBob = contract.tx.flip(value, gasLimit);
+      await submitTransactionAsync(bob, flipWithAllowlistedBob);
+      const flipAfterAllowListed = await getFlipValue(contract,deployer);
+      expect(flipAfterAllowListed).to.be.eq(!flipValueBefore, 'Bob was allowlisted, now he can flip.');
+
+      await deployerCanFlip();
+
+      flipValueBefore = await getFlipValue(contract, deployer);
+      const removeBobFromAllowListTx = api.tx.nft.removeFromContractAllowList(contract.address, bob.address);
+      await submitTransactionAsync(deployer, removeBobFromAllowListTx);
+      const bobRemoved = contract.tx.flip(value, gasLimit);
+      await expect(submitTransactionExpectFailAsync(bob, bobRemoved)).to.be.rejected;
+      const afterBobRemoved = await getFlipValue(contract, deployer);
+      expect(afterBobRemoved).to.be.eq(flipValueBefore, 'Bob can\'t call contract, now when he is removeed from allow list.');
+
+      await deployerCanFlip();
+
+      flipValueBefore = await getFlipValue(contract, deployer);
+      const disableAllowListTx = api.tx.nft.toggleContractAllowList(contract.address, false);
+      await submitTransactionAsync(deployer, disableAllowListTx);
+      const allowListDisabledFlip = contract.tx.flip(value, gasLimit);
+      await submitTransactionAsync(bob, allowListDisabledFlip);
+      const afterAllowListDisabled = await getFlipValue(contract,deployer);
+      expect(afterAllowListDisabled).to.be.eq(!flipValueBefore, 'Anyone can call contract with disabled allowlist.');
+
+    });
+  });
+
+  it('Enabling allow list repeatedly should not produce errors', async () => {
+    await usingApi(async api => {
+      const [contract, deployer] = await deployFlipper(api);
+
+      const enabledBefore = (await api.query.nft.contractAllowListEnabled(contract.address)).toJSON();
+      const enableAllowListTx = api.tx.nft.toggleContractAllowList(contract.address, true);
+      const enableEvents = await submitTransactionAsync(deployer, enableAllowListTx);
+      const enabled = (await api.query.nft.contractAllowListEnabled(contract.address)).toJSON();
+      const enableAgainEvents = await submitTransactionAsync(deployer, enableAllowListTx);
+      const enabledAgain = (await api.query.nft.contractAllowListEnabled(contract.address)).toJSON();
+
+      expect(getGenericResult(enableEvents).success).to.be.true;
+      expect(enabledBefore).to.be.false;
+      expect(enabled).to.be.true;
+      expect(getGenericResult(enableAgainEvents).success).to.be.true;
+      expect(enabledAgain).to.be.true;
+    });
+  });
+
+});
+
+describe.skip('Negative Integration Test toggleContractAllowList', () => {
+
+  it('Enable allow list for a non-contract', async () => {
+    await usingApi(async api => {
+      const alice = privateKey('//Alice');
+      const bobGuineaPig = privateKey('//Bob');
+
+      const enabledBefore = (await api.query.nft.contractAllowListEnabled(bobGuineaPig.address)).toJSON();
+      const enableAllowListTx = api.tx.nft.toggleContractAllowList(bobGuineaPig.address, true);
+      await expect(submitTransactionExpectFailAsync(alice, enableAllowListTx)).to.be.rejected;
+      const enabled = (await api.query.nft.contractAllowListEnabled(bobGuineaPig.address)).toJSON();
+
+      expect(enabledBefore).to.be.false;
+      expect(enabled).to.be.false;
+    });
+  });
+
+  it('Enable allow list using a non-owner address', async () => {
+    await usingApi(async api => {
+      const bob = privateKey('//Bob');
+      const [contract] = await deployFlipper(api);
+
+      const enabledBefore = (await api.query.nft.contractAllowListEnabled(contract.address)).toJSON();
+      const enableAllowListTx = api.tx.nft.toggleContractAllowList(contract.address, true);
+      await expect(submitTransactionExpectFailAsync(bob, enableAllowListTx)).to.be.rejected;
+      const enabled = (await api.query.nft.contractAllowListEnabled(contract.address)).toJSON();
+
+      expect(enabledBefore).to.be.false;
+      expect(enabled).to.be.false;
+    });
+  });
+
+});
deletedtests/src/toggleContractWhiteList.test.tsdiffbeforeafterboth
--- a/tests/src/toggleContractWhiteList.test.ts
+++ /dev/null
@@ -1,156 +0,0 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
-
-import chai from 'chai';
-import chaiAsPromised from 'chai-as-promised';
-import usingApi, {submitTransactionAsync, submitTransactionExpectFailAsync} from './substrate/substrate-api';
-import privateKey from './substrate/privateKey';
-import {
-  deployFlipper,
-  getFlipValue,
-} from './util/contracthelpers';
-import {
-  getGenericResult,
-} from './util/helpers';
-
-chai.use(chaiAsPromised);
-const expect = chai.expect;
-
-const value = 0;
-const gasLimit = 3000n * 1000000n;
-
-describe.skip('Integration Test toggleContractWhiteList', () => {
-
-  it('Enable white list contract mode', async () => {
-    await usingApi(async api => {
-      const [contract, deployer] = await deployFlipper(api);
-
-      const enabledBefore = (await api.query.nft.contractWhiteListEnabled(contract.address)).toJSON();
-      const enableWhiteListTx = api.tx.nft.toggleContractWhiteList(contract.address, true);
-      const enableEvents = await submitTransactionAsync(deployer, enableWhiteListTx);
-      const enabled = (await api.query.nft.contractWhiteListEnabled(contract.address)).toJSON();
-
-      expect(getGenericResult(enableEvents).success).to.be.true;
-      expect(enabledBefore).to.be.false;
-      expect(enabled).to.be.true;
-    });
-  });
-
-  it('Only whitelisted account can call contract', async () => {
-    await usingApi(async api => {
-      const bob = privateKey('//Bob');
-
-      const [contract, deployer] = await deployFlipper(api);
-
-      let flipValueBefore = await getFlipValue(contract, deployer);
-      const flip = contract.tx.flip(value, gasLimit);
-      await submitTransactionAsync(bob, flip);
-      const flipValueAfter = await getFlipValue(contract,deployer);
-      expect(flipValueAfter).to.be.eq(!flipValueBefore, 'Anyone can call new contract.');
-
-      const deployerCanFlip = async () => {
-        const flipValueBefore = await getFlipValue(contract, deployer);
-        const deployerFlip = contract.tx.flip(value, gasLimit);
-        await submitTransactionAsync(deployer, deployerFlip);
-        const aliceFlip1Response = await getFlipValue(contract, deployer);
-        expect(aliceFlip1Response).to.be.eq(!flipValueBefore, 'Deployer always can flip.');
-      };
-      await deployerCanFlip();
-
-      flipValueBefore = await getFlipValue(contract, deployer);
-      const enableWhiteListTx = api.tx.nft.toggleContractWhiteList(contract.address, true);
-      await submitTransactionAsync(deployer, enableWhiteListTx);
-      const flipWithEnabledWhiteList = contract.tx.flip(value, gasLimit);
-      await expect(submitTransactionExpectFailAsync(bob, flipWithEnabledWhiteList)).to.be.rejected;
-      const flipValueAfterEnableWhiteList = await getFlipValue(contract, deployer);
-      expect(flipValueAfterEnableWhiteList).to.be.eq(flipValueBefore, 'Enabling whitelist doesn\'t make it possible to call contract for everyone.');
-
-      await deployerCanFlip();
-
-      flipValueBefore = await getFlipValue(contract, deployer);
-      const addBobToWhiteListTx = api.tx.nft.addToContractWhiteList(contract.address, bob.address);
-      await submitTransactionAsync(deployer, addBobToWhiteListTx);
-      const flipWithWhitelistedBob = contract.tx.flip(value, gasLimit);
-      await submitTransactionAsync(bob, flipWithWhitelistedBob);
-      const flipAfterWhiteListed = await getFlipValue(contract,deployer);
-      expect(flipAfterWhiteListed).to.be.eq(!flipValueBefore, 'Bob was whitelisted, now he can flip.');
-
-      await deployerCanFlip();
-
-      flipValueBefore = await getFlipValue(contract, deployer);
-      const removeBobFromWhiteListTx = api.tx.nft.removeFromContractWhiteList(contract.address, bob.address);
-      await submitTransactionAsync(deployer, removeBobFromWhiteListTx);
-      const bobRemoved = contract.tx.flip(value, gasLimit);
-      await expect(submitTransactionExpectFailAsync(bob, bobRemoved)).to.be.rejected;
-      const afterBobRemoved = await getFlipValue(contract, deployer);
-      expect(afterBobRemoved).to.be.eq(flipValueBefore, 'Bob can\'t call contract, now when he is removeed from white list.');
-
-      await deployerCanFlip();
-
-      flipValueBefore = await getFlipValue(contract, deployer);
-      const disableWhiteListTx = api.tx.nft.toggleContractWhiteList(contract.address, false);
-      await submitTransactionAsync(deployer, disableWhiteListTx);
-      const whiteListDisabledFlip = contract.tx.flip(value, gasLimit);
-      await submitTransactionAsync(bob, whiteListDisabledFlip);
-      const afterWhiteListDisabled = await getFlipValue(contract,deployer);
-      expect(afterWhiteListDisabled).to.be.eq(!flipValueBefore, 'Anyone can call contract with disabled whitelist.');
-
-    });
-  });
-
-  it('Enabling white list repeatedly should not produce errors', async () => {
-    await usingApi(async api => {
-      const [contract, deployer] = await deployFlipper(api);
-
-      const enabledBefore = (await api.query.nft.contractWhiteListEnabled(contract.address)).toJSON();
-      const enableWhiteListTx = api.tx.nft.toggleContractWhiteList(contract.address, true);
-      const enableEvents = await submitTransactionAsync(deployer, enableWhiteListTx);
-      const enabled = (await api.query.nft.contractWhiteListEnabled(contract.address)).toJSON();
-      const enableAgainEvents = await submitTransactionAsync(deployer, enableWhiteListTx);
-      const enabledAgain = (await api.query.nft.contractWhiteListEnabled(contract.address)).toJSON();
-
-      expect(getGenericResult(enableEvents).success).to.be.true;
-      expect(enabledBefore).to.be.false;
-      expect(enabled).to.be.true;
-      expect(getGenericResult(enableAgainEvents).success).to.be.true;
-      expect(enabledAgain).to.be.true;
-    });
-  });
-
-});
-
-describe.skip('Negative Integration Test toggleContractWhiteList', () => {
-
-  it('Enable white list for a non-contract', async () => {
-    await usingApi(async api => {
-      const alice = privateKey('//Alice');
-      const bobGuineaPig = privateKey('//Bob');
-
-      const enabledBefore = (await api.query.nft.contractWhiteListEnabled(bobGuineaPig.address)).toJSON();
-      const enableWhiteListTx = api.tx.nft.toggleContractWhiteList(bobGuineaPig.address, true);
-      await expect(submitTransactionExpectFailAsync(alice, enableWhiteListTx)).to.be.rejected;
-      const enabled = (await api.query.nft.contractWhiteListEnabled(bobGuineaPig.address)).toJSON();
-
-      expect(enabledBefore).to.be.false;
-      expect(enabled).to.be.false;
-    });
-  });
-
-  it('Enable white list using a non-owner address', async () => {
-    await usingApi(async api => {
-      const bob = privateKey('//Bob');
-      const [contract] = await deployFlipper(api);
-
-      const enabledBefore = (await api.query.nft.contractWhiteListEnabled(contract.address)).toJSON();
-      const enableWhiteListTx = api.tx.nft.toggleContractWhiteList(contract.address, true);
-      await expect(submitTransactionExpectFailAsync(bob, enableWhiteListTx)).to.be.rejected;
-      const enabled = (await api.query.nft.contractWhiteListEnabled(contract.address)).toJSON();
-
-      expect(enabledBefore).to.be.false;
-      expect(enabled).to.be.false;
-    });
-  });
-
-});
modifiedtests/src/transfer_contract/metadata.jsondiffbeforeafterboth
--- a/tests/src/transfer_contract/metadata.json
+++ b/tests/src/transfer_contract/metadata.json
@@ -323,7 +323,7 @@
             }
           },
           {
-            "name": "whitelisted",
+            "name": "allowlisted",
             "type": {
               "displayName": [
                 "bool"
@@ -335,7 +335,7 @@
         "docs": [],
         "mutates": true,
         "name": [
-          "toggle_white_list"
+          "toggle_allow_list"
         ],
         "payable": false,
         "returnType": null,
modifiedtests/src/util/helpers.tsdiffbeforeafterboth
--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -597,9 +597,9 @@
   });
 }
 
-export async function toggleContractWhitelistExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, value = true) {
+export async function toggleContractAllowlistExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, value = true) {
   await usingApi(async (api) => {
-    const tx = api.tx.nft.toggleContractWhiteList(contractAddress, value);
+    const tx = api.tx.nft.toggleContractAllowList(contractAddress, value);
     const events = await submitTransactionAsync(sender, tx);
     const result = getGenericResult(events);
 
@@ -607,17 +607,17 @@
   });
 }
 
-export async function isWhitelistedInContract(contractAddress: AccountId | string, user: string) {
-  let whitelisted = false;
+export async function isAllowlistedInContract(contractAddress: AccountId | string, user: string) {
+  let allowlisted = false;
   await usingApi(async (api) => {
-    whitelisted = (await api.query.nft.contractWhiteList(contractAddress, user)).toJSON() as boolean;
+    allowlisted = (await api.query.nft.contractAllowList(contractAddress, user)).toJSON() as boolean;
   });
-  return whitelisted;
+  return allowlisted;
 }
 
-export async function addToContractWhiteListExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, user: AccountId | string) {
+export async function addToContractAllowListExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, user: AccountId | string) {
   await usingApi(async (api) => {
-    const tx = api.tx.nft.addToContractWhiteList(contractAddress.toString(), user.toString());
+    const tx = api.tx.nft.addToContractAllowList(contractAddress.toString(), user.toString());
     const events = await submitTransactionAsync(sender, tx);
     const result = getGenericResult(events);
 
@@ -625,9 +625,9 @@
   });
 }
 
-export async function removeFromContractWhiteListExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, user: AccountId | string) {
+export async function removeFromContractAllowListExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, user: AccountId | string) {
   await usingApi(async (api) => {
-    const tx = api.tx.nft.removeFromContractWhiteList(contractAddress.toString(), user.toString());
+    const tx = api.tx.nft.removeFromContractAllowList(contractAddress.toString(), user.toString());
     const events = await submitTransactionAsync(sender, tx);
     const result = getGenericResult(events);
 
@@ -635,9 +635,9 @@
   });
 }
 
-export async function removeFromContractWhiteListExpectFailure(sender: IKeyringPair, contractAddress: AccountId | string, user: AccountId | string) {
+export async function removeFromContractAllowListExpectFailure(sender: IKeyringPair, contractAddress: AccountId | string, user: AccountId | string) {
   await usingApi(async (api) => {
-    const tx = api.tx.nft.removeFromContractWhiteList(contractAddress.toString(), user.toString());
+    const tx = api.tx.nft.removeFromContractAllowList(contractAddress.toString(), user.toString());
     const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
     const result = getGenericResult(events);
 
@@ -1048,7 +1048,7 @@
 
 export async function setPublicAccessModeExpectSuccess(
   sender: IKeyringPair, collectionId: number,
-  accessMode: 'Normal' | 'WhiteList',
+  accessMode: 'Normal' | 'AllowList',
 ) {
   await usingApi(async (api) => {
 
@@ -1069,7 +1069,7 @@
 
 export async function setPublicAccessModeExpectFail(
   sender: IKeyringPair, collectionId: number,
-  accessMode: 'Normal' | 'WhiteList',
+  accessMode: 'Normal' | 'AllowList',
 ) {
   await usingApi(async (api) => {
 
@@ -1084,15 +1084,15 @@
   });
 }
 
-export async function enableWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number) {
-  await setPublicAccessModeExpectSuccess(sender, collectionId, 'WhiteList');
+export async function enableAllowListExpectSuccess(sender: IKeyringPair, collectionId: number) {
+  await setPublicAccessModeExpectSuccess(sender, collectionId, 'AllowList');
 }
 
-export async function enableWhiteListExpectFail(sender: IKeyringPair, collectionId: number) {
-  await setPublicAccessModeExpectFail(sender, collectionId, 'WhiteList');
+export async function enableAllowListExpectFail(sender: IKeyringPair, collectionId: number) {
+  await setPublicAccessModeExpectFail(sender, collectionId, 'AllowList');
 }
 
-export async function disableWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number) {
+export async function disableAllowListExpectSuccess(sender: IKeyringPair, collectionId: number) {
   await setPublicAccessModeExpectSuccess(sender, collectionId, 'Normal');
 }
 
@@ -1138,46 +1138,46 @@
   });
 }
 
-export async function isWhitelisted(collectionId: number, address: string | CrossAccountId) {
+export async function isAllowlisted(collectionId: number, address: string | CrossAccountId) {
   return await usingApi(async (api) => {
     return (await api.query.common.allowlist(collectionId, normalizeAccountId(address))).toJSON();
   });
 }
 
-export async function addToWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number, address: string | AccountId | CrossAccountId) {
+export async function addToAllowListExpectSuccess(sender: IKeyringPair, collectionId: number, address: string | AccountId | CrossAccountId) {
   await usingApi(async (api) => {
-    expect(await isWhitelisted(collectionId, normalizeAccountId(address))).to.be.false;
+    expect(await isAllowlisted(collectionId, normalizeAccountId(address))).to.be.false;
 
     // Run the transaction
-    const tx = api.tx.nft.addToWhiteList(collectionId, normalizeAccountId(address));
+    const tx = api.tx.nft.addToAllowList(collectionId, normalizeAccountId(address));
     const events = await submitTransactionAsync(sender, tx);
     const result = getGenericResult(events);
     expect(result.success).to.be.true;
 
-    expect(await isWhitelisted(collectionId, normalizeAccountId(address))).to.be.true;
+    expect(await isAllowlisted(collectionId, normalizeAccountId(address))).to.be.true;
   });
 }
 
-export async function addToWhiteListAgainExpectSuccess(sender: IKeyringPair, collectionId: number, address: string | AccountId) {
+export async function addToAllowListAgainExpectSuccess(sender: IKeyringPair, collectionId: number, address: string | AccountId) {
   await usingApi(async (api) => {
 
-    expect(await isWhitelisted(collectionId, normalizeAccountId(address))).to.be.true;
+    expect(await isAllowlisted(collectionId, normalizeAccountId(address))).to.be.true;
 
     // Run the transaction
-    const tx = api.tx.nft.addToWhiteList(collectionId, normalizeAccountId(address));
+    const tx = api.tx.nft.addToAllowList(collectionId, normalizeAccountId(address));
     const events = await submitTransactionAsync(sender, tx);
     const result = getGenericResult(events);
     expect(result.success).to.be.true;
 
-    expect(await isWhitelisted(collectionId, normalizeAccountId(address))).to.be.true;
+    expect(await isAllowlisted(collectionId, normalizeAccountId(address))).to.be.true;
   });
 }
 
-export async function addToWhiteListExpectFail(sender: IKeyringPair, collectionId: number, address: string | AccountId) {
+export async function addToAllowListExpectFail(sender: IKeyringPair, collectionId: number, address: string | AccountId) {
   await usingApi(async (api) => {
 
     // Run the transaction
-    const tx = api.tx.nft.addToWhiteList(collectionId, normalizeAccountId(address));
+    const tx = api.tx.nft.addToAllowList(collectionId, normalizeAccountId(address));
     const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
     const result = getGenericResult(events);
 
@@ -1187,10 +1187,10 @@
   });
 }
 
-export async function removeFromWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number, address: CrossAccountId) {
+export async function removeFromAllowListExpectSuccess(sender: IKeyringPair, collectionId: number, address: CrossAccountId) {
   await usingApi(async (api) => {
     // Run the transaction
-    const tx = api.tx.nft.removeFromWhiteList(collectionId, normalizeAccountId(address));
+    const tx = api.tx.nft.removeFromAllowList(collectionId, normalizeAccountId(address));
     const events = await submitTransactionAsync(sender, tx);
     const result = getGenericResult(events);
 
@@ -1200,10 +1200,10 @@
   });
 }
 
-export async function removeFromWhiteListExpectFailure(sender: IKeyringPair, collectionId: number, address: CrossAccountId) {
+export async function removeFromAllowListExpectFailure(sender: IKeyringPair, collectionId: number, address: CrossAccountId) {
   await usingApi(async (api) => {
     // Run the transaction
-    const tx = api.tx.nft.removeFromWhiteList(collectionId, normalizeAccountId(address));
+    const tx = api.tx.nft.removeFromAllowList(collectionId, normalizeAccountId(address));
     const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
     const result = getGenericResult(events);
 
deletedtests/src/whiteLists.test.tsdiffbeforeafterboth
--- a/tests/src/whiteLists.test.ts
+++ /dev/null
@@ -1,304 +0,0 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
-
-import {IKeyringPair} from '@polkadot/types/types';
-import chai from 'chai';
-import chaiAsPromised from 'chai-as-promised';
-import privateKey from './substrate/privateKey';
-import usingApi, {submitTransactionExpectFailAsync} from './substrate/substrate-api';
-import {
-  addToWhiteListExpectSuccess,
-  createCollectionExpectSuccess,
-  createItemExpectSuccess,
-  destroyCollectionExpectSuccess,
-  enableWhiteListExpectSuccess,
-  normalizeAccountId,
-  addCollectionAdminExpectSuccess,
-  addToWhiteListExpectFail,
-  removeFromWhiteListExpectSuccess,
-  removeFromWhiteListExpectFailure,
-  addToWhiteListAgainExpectSuccess,
-  transferExpectFailure,
-  approveExpectSuccess,
-  approveExpectFail,
-  transferExpectSuccess,
-  transferFromExpectSuccess,
-  setMintPermissionExpectSuccess,
-  createItemExpectFailure,
-} from './util/helpers';
-
-chai.use(chaiAsPromised);
-const expect = chai.expect;
-
-let alice: IKeyringPair;
-let bob: IKeyringPair;
-let charlie: IKeyringPair;
-
-describe('Integration Test ext. White list tests', () => {
-
-  before(async () => {
-    await usingApi(async () => {
-      alice = privateKey('//Alice');
-      bob = privateKey('//Bob');
-      charlie = privateKey('//Charlie');
-    });
-  });
-
-  it('Owner can add address to white list', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
-  });
-
-  it('Admin can add address to white list', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
-    await addToWhiteListExpectSuccess(bob, collectionId, charlie.address);
-  });
-
-  it('Non-privileged user cannot add address to white list', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addToWhiteListExpectFail(bob, collectionId, charlie.address);
-  });
-
-  it('Nobody can add address to white list of non-existing collection', async () => {
-    const collectionId = (1<<32) - 1;
-    await addToWhiteListExpectFail(alice, collectionId, bob.address);
-  });
-
-  it('Nobody can add address to white list of destroyed collection', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await destroyCollectionExpectSuccess(collectionId, '//Alice');
-    await addToWhiteListExpectFail(alice, collectionId, bob.address);
-  });
-
-  it('If address is already added to white list, nothing happens', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
-    await addToWhiteListAgainExpectSuccess(alice, collectionId, bob.address);
-  });
-
-  it('Owner can remove address from white list', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
-    await removeFromWhiteListExpectSuccess(alice, collectionId, normalizeAccountId(bob));
-  });
-
-  it('Admin can remove address from white list', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
-    await addToWhiteListExpectSuccess(alice, collectionId, charlie.address);
-    await removeFromWhiteListExpectSuccess(bob, collectionId, normalizeAccountId(charlie));
-  });
-
-  it('Non-privileged user cannot remove address from white list', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addToWhiteListExpectSuccess(alice, collectionId, charlie.address);
-    await removeFromWhiteListExpectFailure(bob, collectionId, normalizeAccountId(charlie));
-  });
-
-  it('Nobody can remove address from white list of non-existing collection', async () => {
-    const collectionId = (1<<32) - 1;
-    await removeFromWhiteListExpectFailure(alice, collectionId, normalizeAccountId(charlie));
-  });
-
-  it('Nobody can remove address from white list of deleted collection', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addToWhiteListExpectSuccess(alice, collectionId, charlie.address);
-    await destroyCollectionExpectSuccess(collectionId, '//Alice');
-    await removeFromWhiteListExpectFailure(alice, collectionId, normalizeAccountId(charlie));
-  });
-
-  it('If address is already removed from white list, nothing happens', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await addToWhiteListExpectSuccess(alice, collectionId, charlie.address);
-    await removeFromWhiteListExpectSuccess(alice, collectionId, normalizeAccountId(charlie));
-    await removeFromWhiteListExpectSuccess(alice, collectionId, normalizeAccountId(charlie));
-  });
-
-  it('If Public Access mode is set to WhiteList, tokens can’t be transferred from a non-whitelisted address with transfer or transferFrom. Test1', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await addToWhiteListExpectSuccess(alice, collectionId, charlie.address);
-
-    await transferExpectFailure(
-      collectionId,
-      itemId,
-      alice,
-      charlie,
-      1,
-    );
-  });
-
-  it('If Public Access mode is set to WhiteList, tokens can’t be transferred from a non-whitelisted address with transfer or transferFrom. Test2', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await addToWhiteListExpectSuccess(alice, collectionId, alice.address);
-    await addToWhiteListExpectSuccess(alice, collectionId, charlie.address);
-    await approveExpectSuccess(collectionId, itemId, alice, charlie.address);
-    await removeFromWhiteListExpectSuccess(alice, collectionId, normalizeAccountId(alice));
-
-    await transferExpectFailure(
-      collectionId,
-      itemId,
-      alice,
-      charlie,
-      1,
-    );
-  });
-
-  it('If Public Access mode is set to WhiteList, tokens can’t be transferred to a non-whitelisted address with transfer or transferFrom. Test1', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await addToWhiteListExpectSuccess(alice, collectionId, alice.address);
-
-    await transferExpectFailure(
-      collectionId,
-      itemId,
-      alice,
-      charlie,
-      1,
-    );
-  });
-
-  it('If Public Access mode is set to WhiteList, tokens can’t be transferred to a non-whitelisted address with transfer or transferFrom. Test2', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await addToWhiteListExpectSuccess(alice, collectionId, alice.address);
-    await addToWhiteListExpectSuccess(alice, collectionId, charlie.address);
-    await approveExpectSuccess(collectionId, itemId, alice, charlie.address);
-    await removeFromWhiteListExpectSuccess(alice, collectionId, normalizeAccountId(alice));
-
-    await transferExpectFailure(
-      collectionId,
-      itemId,
-      alice,
-      charlie,
-      1,
-    );
-  });
-
-  it('If Public Access mode is set to WhiteList, tokens can’t be destroyed by a non-whitelisted address (even if it owned them before enabling WhiteList mode)', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
-    await enableWhiteListExpectSuccess(alice, collectionId);
-
-    await usingApi(async (api) => {
-      const tx = api.tx.nft.burnItem(collectionId, itemId, /*normalizeAccountId(Alice.address),*/ 11);
-      const badTransaction = async function () {
-        await submitTransactionExpectFailAsync(alice, tx);
-      };
-      await expect(badTransaction()).to.be.rejected;
-    });
-  });
-
-  it('If Public Access mode is set to WhiteList, token transfers can’t be Approved by a non-whitelisted address (see Approve method)', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await approveExpectFail(collectionId, itemId, alice, bob);
-  });
-
-  it('If Public Access mode is set to WhiteList, tokens can be transferred to a whitelisted address with transfer.', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await addToWhiteListExpectSuccess(alice, collectionId, alice.address);
-    await addToWhiteListExpectSuccess(alice, collectionId, charlie.address);
-    await transferExpectSuccess(collectionId, itemId, alice, charlie, 1, 'NFT');
-  });
-
-  it('If Public Access mode is set to WhiteList, tokens can be transferred to a whitelisted address with transferFrom.', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await addToWhiteListExpectSuccess(alice, collectionId, alice.address);
-    await addToWhiteListExpectSuccess(alice, collectionId, charlie.address);
-    await approveExpectSuccess(collectionId, itemId, alice, charlie.address);
-    await transferFromExpectSuccess(collectionId, itemId, alice, alice, charlie, 1, 'NFT');
-  });
-
-  it('If Public Access mode is set to WhiteList, tokens can be transferred from a whitelisted address with transfer', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await addToWhiteListExpectSuccess(alice, collectionId, alice.address);
-    await addToWhiteListExpectSuccess(alice, collectionId, charlie.address);
-    await transferExpectSuccess(collectionId, itemId, alice, charlie, 1, 'NFT');
-  });
-
-  it('If Public Access mode is set to WhiteList, tokens can be transferred from a whitelisted address with transferFrom', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await addToWhiteListExpectSuccess(alice, collectionId, alice.address);
-    await addToWhiteListExpectSuccess(alice, collectionId, charlie.address);
-    await approveExpectSuccess(collectionId, itemId, alice, charlie.address);
-    await transferFromExpectSuccess(collectionId, itemId, alice, alice, charlie, 1, 'NFT');
-  });
-
-  it('If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens can be created by owner', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await setMintPermissionExpectSuccess(alice, collectionId, false);
-    await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
-  });
-
-  it('If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens can be created by admin', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await setMintPermissionExpectSuccess(alice, collectionId, false);
-    await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
-    await createItemExpectSuccess(bob, collectionId, 'NFT', bob.address);
-  });
-
-  it('If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens cannot be created by non-privileged and white-listed address', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await setMintPermissionExpectSuccess(alice, collectionId, false);
-    await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
-    await createItemExpectFailure(bob, collectionId, 'NFT', bob.address);
-  });
-
-  it('If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens cannot be created by non-privileged and non-white listed address', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await setMintPermissionExpectSuccess(alice, collectionId, false);
-    await createItemExpectFailure(bob, collectionId, 'NFT', bob.address);
-  });
-
-  it('If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by owner', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await setMintPermissionExpectSuccess(alice, collectionId, true);
-    await createItemExpectSuccess(alice, collectionId, 'NFT', alice.address);
-  });
-
-  it('If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by admin', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await setMintPermissionExpectSuccess(alice, collectionId, true);
-    await addCollectionAdminExpectSuccess(alice, collectionId, bob.address);
-    await createItemExpectSuccess(bob, collectionId, 'NFT', bob.address);
-  });
-
-  it('If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens cannot be created by non-privileged and non-white listed address', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await setMintPermissionExpectSuccess(alice, collectionId, true);
-    await createItemExpectFailure(bob, collectionId, 'NFT', bob.address);
-  });
-
-  it('If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by non-privileged and white listed address', async () => {
-    const collectionId = await createCollectionExpectSuccess();
-    await enableWhiteListExpectSuccess(alice, collectionId);
-    await setMintPermissionExpectSuccess(alice, collectionId, true);
-    await addToWhiteListExpectSuccess(alice, collectionId, bob.address);
-    await createItemExpectSuccess(bob, collectionId, 'NFT', bob.address);
-  });
-});