git.delta.rocks / unique-network / refs/commits / 8dd8a836164d

difftreelog

Whitelist to allowlist renamed

str-mv2021-11-08parent: #6cd8e0c.patch.diff
in: master

9 files changed

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)?;
 		}
@@ -305,7 +305,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)?;
 		}
@@ -333,7 +333,7 @@
 		if spender == 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)?;
 		}
@@ -365,7 +365,7 @@
 		if spender == 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 collection = create_nft_collection::<T>(caller.clone())?;
 	}: _(RawOrigin::Signed(caller.clone()), collection, T::CrossAccountId::from_sub(whitelist_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 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()))?;
+		<Pallet<T>>::add_to_allow_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))
 
 	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
@@ -274,9 +274,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)?;
@@ -303,9 +303,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)?;
modifiedpallets/nft/src/tests.rsdiffbeforeafterboth
--- a/pallets/nft/src/tests.rs
+++ b/pallets/nft/src/tests.rs
@@ -485,19 +485,19 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			1,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(1)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(2)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(3)
@@ -549,19 +549,19 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			1,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(1)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(2)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(3)
@@ -609,19 +609,19 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			1,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(1)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(2)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(3)
@@ -765,9 +765,9 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(1)
@@ -952,19 +952,19 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			1,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(1)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(2)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(origin1, 1, account(3)));
+		assert_ok!(TemplateModule::add_to_allow_list(origin1, 1, account(3)));
 
 		assert_ok!(TemplateModule::transfer_from(
 			origin2,
@@ -992,7 +992,7 @@
 		let collection_id = create_test_collection(&CollectionMode::NFT, 1);
 
 		let origin1 = Origin::signed(1);
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1,
 			collection_id,
 			account(2)
@@ -1013,7 +1013,7 @@
 			collection_id,
 			account(2)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin2,
 			collection_id,
 			account(3)
@@ -1029,7 +1029,7 @@
 
 		let origin2 = Origin::signed(2);
 		assert_noop!(
-			TemplateModule::add_to_white_list(origin2, collection_id, account(3)),
+			TemplateModule::add_to_allow_list(origin2, collection_id, account(3)),
 			Error::<Test>::NoPermission
 		);
 	});
@@ -1041,7 +1041,7 @@
 		let origin1 = Origin::signed(1);
 
 		assert_noop!(
-			TemplateModule::add_to_white_list(origin1, 1, account(2)),
+			TemplateModule::add_to_allow_list(origin1, 1, account(2)),
 			Error::<Test>::CollectionNotFound
 		);
 	});
@@ -1058,7 +1058,7 @@
 			collection_id
 		));
 		assert_noop!(
-			TemplateModule::add_to_white_list(origin1, collection_id, account(2)),
+			TemplateModule::add_to_allow_list(origin1, collection_id, account(2)),
 			Error::<Test>::CollectionNotFound
 		);
 	});
@@ -1071,12 +1071,12 @@
 		let collection_id = create_test_collection(&CollectionMode::NFT, 1);
 		let origin1 = Origin::signed(1);
 
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(2)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1,
 			collection_id,
 			account(2)
@@ -1091,12 +1091,12 @@
 		let collection_id = create_test_collection(&CollectionMode::NFT, 1);
 
 		let origin1 = Origin::signed(1);
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(2)
 		));
-		assert_ok!(TemplateModule::remove_from_white_list(
+		assert_ok!(TemplateModule::remove_from_allow_list(
 			origin1,
 			collection_id,
 			account(2)
@@ -1118,12 +1118,12 @@
 			account(2)
 		));
 
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1,
 			collection_id,
 			account(3)
 		));
-		assert_ok!(TemplateModule::remove_from_white_list(
+		assert_ok!(TemplateModule::remove_from_allow_list(
 			origin2,
 			collection_id,
 			account(3)
@@ -1139,13 +1139,13 @@
 		let origin1 = Origin::signed(1);
 		let origin2 = Origin::signed(2);
 
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1,
 			collection_id,
 			account(2)
 		));
 		assert_noop!(
-			TemplateModule::remove_from_white_list(origin2, collection_id, account(2)),
+			TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),
 			Error::<Test>::NoPermission
 		);
 		assert!(TemplateModule::white_list(collection_id, 2));
@@ -1158,7 +1158,7 @@
 		let origin1 = Origin::signed(1);
 
 		assert_noop!(
-			TemplateModule::remove_from_white_list(origin1, 1, account(2)),
+			TemplateModule::remove_from_allow_list(origin1, 1, account(2)),
 			Error::<Test>::CollectionNotFound
 		);
 	});
@@ -1171,14 +1171,14 @@
 		let origin1 = Origin::signed(1);
 		let origin2 = Origin::signed(2);
 
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(2)
 		));
 		assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));
 		assert_noop!(
-			TemplateModule::remove_from_white_list(origin2, collection_id, account(2)),
+			TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),
 			Error::<Test>::CollectionNotFound
 		);
 		assert!(!TemplateModule::white_list(collection_id, 2));
@@ -1192,17 +1192,17 @@
 		let collection_id = create_test_collection(&CollectionMode::NFT, 1);
 		let origin1 = Origin::signed(1);
 
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(2)
 		));
-		assert_ok!(TemplateModule::remove_from_white_list(
+		assert_ok!(TemplateModule::remove_from_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(2)
 		));
-		assert_ok!(TemplateModule::remove_from_white_list(
+		assert_ok!(TemplateModule::remove_from_allow_list(
 			origin1,
 			collection_id,
 			account(2)
@@ -1225,9 +1225,9 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(2)
@@ -1252,14 +1252,14 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(1)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(2)
@@ -1275,7 +1275,7 @@
 		));
 		assert_eq!(TemplateModule::approved(1, (1, 1, 1)), 1);
 
-		assert_ok!(TemplateModule::remove_from_white_list(
+		assert_ok!(TemplateModule::remove_from_allow_list(
 			origin1.clone(),
 			1,
 			account(1)
@@ -1302,9 +1302,9 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			1,
 			account(1)
@@ -1330,14 +1330,14 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(1)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(2)
@@ -1353,7 +1353,7 @@
 		));
 		assert_eq!(TemplateModule::approved(1, (1, 1, 1)), 1);
 
-		assert_ok!(TemplateModule::remove_from_white_list(
+		assert_ok!(TemplateModule::remove_from_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(2)
@@ -1380,7 +1380,7 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
 		assert_noop!(
 			TemplateModule::burn_item(origin1.clone(), 1, 1, 5),
@@ -1403,7 +1403,7 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
 
 		// do approve
@@ -1429,14 +1429,14 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(1)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(2)
@@ -1459,14 +1459,14 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(1)
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(2)
@@ -1503,7 +1503,7 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
 		assert_ok!(TemplateModule::set_mint_permission(
 			origin1,
@@ -1528,7 +1528,7 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
 		assert_ok!(TemplateModule::set_mint_permission(
 			origin1.clone(),
@@ -1563,14 +1563,14 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
 		assert_ok!(TemplateModule::set_mint_permission(
 			origin1.clone(),
 			collection_id,
 			false
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1,
 			collection_id,
 			account(2)
@@ -1595,7 +1595,7 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
 		assert_ok!(TemplateModule::set_mint_permission(
 			origin1,
@@ -1621,7 +1621,7 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
 		assert_ok!(TemplateModule::set_mint_permission(
 			origin1,
@@ -1646,7 +1646,7 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
 		assert_ok!(TemplateModule::set_mint_permission(
 			origin1.clone(),
@@ -1681,7 +1681,7 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
 		assert_ok!(TemplateModule::set_mint_permission(
 			origin1,
@@ -1708,14 +1708,14 @@
 		assert_ok!(TemplateModule::set_public_access_mode(
 			origin1.clone(),
 			collection_id,
-			AccessMode::WhiteList
+			AccessMode::AllowList
 		));
 		assert_ok!(TemplateModule::set_mint_permission(
 			origin1.clone(),
 			collection_id,
 			true
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1,
 			collection_id,
 			account(2)
@@ -2056,7 +2056,7 @@
 			collection_id,
 			true
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin1.clone(),
 			collection_id,
 			account(1)
@@ -2124,7 +2124,7 @@
 			collection_id,
 			true
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin2.clone(),
 			collection_id,
 			account(1)
@@ -2177,7 +2177,7 @@
 			collection_id,
 			true
 		));
-		assert_ok!(TemplateModule::add_to_white_list(
+		assert_ok!(TemplateModule::add_to_allow_list(
 			origin2.clone(),
 			collection_id,
 			account(1)
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)?;
 		}
 
@@ -227,7 +227,7 @@
 			<CommonError<T>>::NoPermission
 		);
 
-		if collection.access == AccessMode::WhiteList {
+		if collection.access == AccessMode::AllowList {
 			collection.check_allowlist(from)?;
 			collection.check_allowlist(to)?;
 		}
@@ -445,7 +445,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)?;
@@ -480,7 +480,7 @@
 		if spender == 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)?;
 		}
@@ -508,7 +508,7 @@
 		if spender == 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
272 <CommonError<T>>::TransferNotAllowed272 <CommonError<T>>::TransferNotAllowed
273 );273 );
274274
275 if collection.access == AccessMode::WhiteList {275 if collection.access == AccessMode::AllowList {
276 collection.check_allowlist(from)?;276 collection.check_allowlist(from)?;
277 collection.check_allowlist(to)?;277 collection.check_allowlist(to)?;
278 }278 }
483 token: TokenId,483 token: TokenId,
484 amount: u128,484 amount: u128,
485 ) -> DispatchResult {485 ) -> DispatchResult {
486 if collection.access == AccessMode::WhiteList {486 if collection.access == AccessMode::AllowList {
487 collection.check_allowlist(&sender)?;487 collection.check_allowlist(&sender)?;
488 collection.check_allowlist(&spender)?;488 collection.check_allowlist(&spender)?;
489 }489 }
514 if spender == from {514 if spender == from {
515 return Self::transfer(collection, from, to, token, amount);515 return Self::transfer(collection, from, to, token, amount);
516 }516 }
517 if collection.access == AccessMode::WhiteList {517 if collection.access == AccessMode::AllowList {
518 // `from`, `to` checked in [`transfer`]518 // `from`, `to` checked in [`transfer`]
519 collection.check_allowlist(spender)?;519 collection.check_allowlist(spender)?;
520 }520 }
547 if spender == from {547 if spender == from {
548 return Self::burn(collection, from, token, amount);548 return Self::burn(collection, from, token, amount);
549 }549 }
550 if collection.access == AccessMode::WhiteList {550 if collection.access == AccessMode::AllowList {
551 // `from` checked in [`burn`]551 // `from` checked in [`burn`]
552 collection.check_allowlist(spender)?;552 collection.check_allowlist(spender)?;
553 }553 }
modifiedprimitives/nft/src/lib.rsdiffbeforeafterboth
--- a/primitives/nft/src/lib.rs
+++ b/primitives/nft/src/lib.rs
@@ -141,7 +141,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
@@ -213,8 +213,8 @@
 			6 => {
 				// Toggle whitelist
 				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)?;
 
@@ -222,7 +222,7 @@
 					&C::CrossAccountId::from_sub(env.ext().address().clone()),
 					&collection,
 					&C::CrossAccountId::from_sub(input.address),
-					input.whitelisted,
+					input.allowlisted,
 				)?;
 
 				collection.submit_logs()?;