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

difftreelog

misk: Turn off eth metods for substrate addresses.

Trubnikov Sergey2022-09-26parent: #edc6ac8.patch.diff
in: master

16 files changed

modifiedpallets/common/src/erc.rsdiffbeforeafterboth
--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -139,25 +139,26 @@
 		save(self)
 	}
 
-	/// Set the substrate sponsor of the collection.
-	///
-	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
-	///
-	/// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
-	fn set_collection_sponsor_substrate(
-		&mut self,
-		caller: caller,
-		sponsor: uint256,
-	) -> Result<void> {
-		self.consume_store_reads_and_writes(1, 1)?;
+	// TODO: Temprorary off. Need refactor
+	// /// Set the substrate sponsor of the collection.
+	// ///
+	// /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+	// ///
+	// /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
+	// fn set_collection_sponsor_substrate(
+	// 	&mut self,
+	// 	caller: caller,
+	// 	sponsor: uint256,
+	// ) -> Result<void> {
+	// 	self.consume_store_reads_and_writes(1, 1)?;
 
-		check_is_owner_or_admin(caller, self)?;
+	// 	check_is_owner_or_admin(caller, self)?;
 
-		let sponsor = convert_uint256_to_cross_account::<T>(sponsor);
-		self.set_sponsor(sponsor.as_sub().clone())
-			.map_err(dispatch_to_evm::<T>)?;
-		save(self)
-	}
+	// 	let sponsor = convert_uint256_to_cross_account::<T>(sponsor);
+	// 	self.set_sponsor(sponsor.as_sub().clone())
+	// 		.map_err(dispatch_to_evm::<T>)?;
+	// 	save(self)
+	// }
 
 	/// Whether there is a pending sponsor.
 	fn has_collection_pending_sponsor(&self) -> Result<bool> {
@@ -299,35 +300,37 @@
 		Ok(crate::eth::collection_id_to_address(self.id))
 	}
 
-	/// Add collection admin by substrate address.
-	/// @param newAdmin Substrate administrator address.
-	fn add_collection_admin_substrate(
-		&mut self,
-		caller: caller,
-		new_admin: uint256,
-	) -> Result<void> {
-		self.consume_store_writes(2)?;
+	// TODO: Temprorary off. Need refactor
+	// /// Add collection admin by substrate address.
+	// /// @param newAdmin Substrate administrator address.
+	// fn add_collection_admin_substrate(
+	// 	&mut self,
+	// 	caller: caller,
+	// 	new_admin: uint256,
+	// ) -> Result<void> {
+	// 	self.consume_store_writes(2)?;
 
-		let caller = T::CrossAccountId::from_eth(caller);
-		let new_admin = convert_uint256_to_cross_account::<T>(new_admin);
-		<Pallet<T>>::toggle_admin(self, &caller, &new_admin, true).map_err(dispatch_to_evm::<T>)?;
-		Ok(())
-	}
+	// 	let caller = T::CrossAccountId::from_eth(caller);
+	// 	let new_admin = convert_uint256_to_cross_account::<T>(new_admin);
+	// 	<Pallet<T>>::toggle_admin(self, &caller, &new_admin, true).map_err(dispatch_to_evm::<T>)?;
+	// 	Ok(())
+	// }
 
-	/// Remove collection admin by substrate address.
-	/// @param admin Substrate administrator address.
-	fn remove_collection_admin_substrate(
-		&mut self,
-		caller: caller,
-		admin: uint256,
-	) -> Result<void> {
-		self.consume_store_writes(2)?;
+	// TODO: Temprorary off. Need refactor
+	// /// Remove collection admin by substrate address.
+	// /// @param admin Substrate administrator address.
+	// fn remove_collection_admin_substrate(
+	// 	&mut self,
+	// 	caller: caller,
+	// 	admin: uint256,
+	// ) -> Result<void> {
+	// 	self.consume_store_writes(2)?;
 
-		let caller = T::CrossAccountId::from_eth(caller);
-		let admin = convert_uint256_to_cross_account::<T>(admin);
-		<Pallet<T>>::toggle_admin(self, &caller, &admin, false).map_err(dispatch_to_evm::<T>)?;
-		Ok(())
-	}
+	// 	let caller = T::CrossAccountId::from_eth(caller);
+	// 	let admin = convert_uint256_to_cross_account::<T>(admin);
+	// 	<Pallet<T>>::toggle_admin(self, &caller, &admin, false).map_err(dispatch_to_evm::<T>)?;
+	// 	Ok(())
+	// }
 
 	/// Add collection admin.
 	/// @param newAdmin Address of the added administrator.
@@ -476,21 +479,22 @@
 		Ok(())
 	}
 
-	/// Add substrate user to allowed list.
-	///
-	/// @param user User substrate address.
-	fn add_to_collection_allow_list_substrate(
-		&mut self,
-		caller: caller,
-		user: uint256,
-	) -> Result<void> {
-		self.consume_store_writes(1)?;
+	// TODO: Temprorary off. Need refactor
+	// /// Add substrate user to allowed list.
+	// ///
+	// /// @param user User substrate address.
+	// fn add_to_collection_allow_list_substrate(
+	// 	&mut self,
+	// 	caller: caller,
+	// 	user: uint256,
+	// ) -> Result<void> {
+	// 	self.consume_store_writes(1)?;
 
-		let caller = T::CrossAccountId::from_eth(caller);
-		let user = convert_uint256_to_cross_account::<T>(user);
-		Pallet::<T>::toggle_allowlist(self, &caller, &user, true).map_err(dispatch_to_evm::<T>)?;
-		Ok(())
-	}
+	// 	let caller = T::CrossAccountId::from_eth(caller);
+	// 	let user = convert_uint256_to_cross_account::<T>(user);
+	// 	Pallet::<T>::toggle_allowlist(self, &caller, &user, true).map_err(dispatch_to_evm::<T>)?;
+	// 	Ok(())
+	// }
 
 	/// Remove the user from the allowed list.
 	///
@@ -504,21 +508,22 @@
 		Ok(())
 	}
 
-	/// Remove substrate user from allowed list.
-	///
-	/// @param user User substrate address.
-	fn remove_from_collection_allow_list_substrate(
-		&mut self,
-		caller: caller,
-		user: uint256,
-	) -> Result<void> {
-		self.consume_store_writes(1)?;
+	// TODO: Temprorary off. Need refactor
+	// /// Remove substrate user from allowed list.
+	// ///
+	// /// @param user User substrate address.
+	// fn remove_from_collection_allow_list_substrate(
+	// 	&mut self,
+	// 	caller: caller,
+	// 	user: uint256,
+	// ) -> Result<void> {
+	// 	self.consume_store_writes(1)?;
 
-		let caller = T::CrossAccountId::from_eth(caller);
-		let user = convert_uint256_to_cross_account::<T>(user);
-		Pallet::<T>::toggle_allowlist(self, &caller, &user, false).map_err(dispatch_to_evm::<T>)?;
-		Ok(())
-	}
+	// 	let caller = T::CrossAccountId::from_eth(caller);
+	// 	let user = convert_uint256_to_cross_account::<T>(user);
+	// 	Pallet::<T>::toggle_allowlist(self, &caller, &user, false).map_err(dispatch_to_evm::<T>)?;
+	// 	Ok(())
+	// }
 
 	/// Switch permission for minting.
 	///
@@ -551,14 +556,15 @@
 		Ok(self.is_owner_or_admin(&user))
 	}
 
-	/// Check that substrate account is the owner or admin of the collection
-	///
-	/// @param user account to verify
-	/// @return "true" if account is the owner or admin
-	fn is_owner_or_admin_substrate(&self, user: uint256) -> Result<bool> {
-		let user = convert_uint256_to_cross_account::<T>(user);
-		Ok(self.is_owner_or_admin(&user))
-	}
+	// TODO: Temprorary off. Need refactor
+	// /// Check that substrate account is the owner or admin of the collection
+	// ///
+	// /// @param user account to verify
+	// /// @return "true" if account is the owner or admin
+	// fn is_owner_or_admin_substrate(&self, user: uint256) -> Result<bool> {
+	// 	let user = convert_uint256_to_cross_account::<T>(user);
+	// 	Ok(self.is_owner_or_admin(&user))
+	// }
 
 	/// Returns collection type
 	///
@@ -595,18 +601,19 @@
 			.map_err(dispatch_to_evm::<T>)
 	}
 
-	/// Changes collection owner to another substrate account
-	///
-	/// @dev Owner can be changed only by current owner
-	/// @param newOwner new owner substrate account
-	fn set_owner_substrate(&mut self, caller: caller, new_owner: uint256) -> Result<void> {
-		self.consume_store_writes(1)?;
+	// TODO: Temprorary off. Need refactor
+	// /// Changes collection owner to another substrate account
+	// ///
+	// /// @dev Owner can be changed only by current owner
+	// /// @param newOwner new owner substrate account
+	// fn set_owner_substrate(&mut self, caller: caller, new_owner: uint256) -> Result<void> {
+	// 	self.consume_store_writes(1)?;
 
-		let caller = T::CrossAccountId::from_eth(caller);
-		let new_owner = convert_uint256_to_cross_account::<T>(new_owner);
-		self.set_owner_internal(caller, new_owner)
-			.map_err(dispatch_to_evm::<T>)
-	}
+	// 	let caller = T::CrossAccountId::from_eth(caller);
+	// 	let new_owner = convert_uint256_to_cross_account::<T>(new_owner);
+	// 	self.set_owner_internal(caller, new_owner)
+	// 		.map_err(dispatch_to_evm::<T>)
+	// }
 
 	// TODO: need implement AbiWriter for &Vec<T>
 	// fn collection_admins(&self) -> Result<Vec<(address, uint256)>> {
modifiedpallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth
--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -18,7 +18,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x47dbc105
+/// @dev the ERC-165 identifier for this interface is 0x3e1e8083
 contract Collection is Dummy, ERC165 {
 	/// Set collection property.
 	///
@@ -72,19 +72,6 @@
 		dummy = 0;
 	}
 
-	/// Set the substrate sponsor of the collection.
-	///
-	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
-	///
-	/// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
-	/// @dev EVM selector for this function is: 0xc74d6751,
-	///  or in textual repr: setCollectionSponsorSubstrate(uint256)
-	function setCollectionSponsorSubstrate(uint256 sponsor) public {
-		require(false, stub_error);
-		sponsor;
-		dummy = 0;
-	}
-
 	/// Whether there is a pending sponsor.
 	/// @dev EVM selector for this function is: 0x058ac185,
 	///  or in textual repr: hasCollectionPendingSponsor()
@@ -167,26 +154,6 @@
 		return 0x0000000000000000000000000000000000000000;
 	}
 
-	/// Add collection admin by substrate address.
-	/// @param newAdmin Substrate administrator address.
-	/// @dev EVM selector for this function is: 0x5730062b,
-	///  or in textual repr: addCollectionAdminSubstrate(uint256)
-	function addCollectionAdminSubstrate(uint256 newAdmin) public {
-		require(false, stub_error);
-		newAdmin;
-		dummy = 0;
-	}
-
-	/// Remove collection admin by substrate address.
-	/// @param admin Substrate administrator address.
-	/// @dev EVM selector for this function is: 0x4048fcf9,
-	///  or in textual repr: removeCollectionAdminSubstrate(uint256)
-	function removeCollectionAdminSubstrate(uint256 admin) public {
-		require(false, stub_error);
-		admin;
-		dummy = 0;
-	}
-
 	/// Add collection admin.
 	/// @param newAdmin Address of the added administrator.
 	/// @dev EVM selector for this function is: 0x92e462c7,
@@ -262,17 +229,6 @@
 	/// @dev EVM selector for this function is: 0x67844fe6,
 	///  or in textual repr: addToCollectionAllowList(address)
 	function addToCollectionAllowList(address user) public {
-		require(false, stub_error);
-		user;
-		dummy = 0;
-	}
-
-	/// Add substrate user to allowed list.
-	///
-	/// @param user User substrate address.
-	/// @dev EVM selector for this function is: 0xd06ad267,
-	///  or in textual repr: addToCollectionAllowListSubstrate(uint256)
-	function addToCollectionAllowListSubstrate(uint256 user) public {
 		require(false, stub_error);
 		user;
 		dummy = 0;
@@ -289,17 +245,6 @@
 		dummy = 0;
 	}
 
-	/// Remove substrate user from allowed list.
-	///
-	/// @param user User substrate address.
-	/// @dev EVM selector for this function is: 0xa31913ed,
-	///  or in textual repr: removeFromCollectionAllowListSubstrate(uint256)
-	function removeFromCollectionAllowListSubstrate(uint256 user) public {
-		require(false, stub_error);
-		user;
-		dummy = 0;
-	}
-
 	/// Switch permission for minting.
 	///
 	/// @param mode Enable if "true".
@@ -324,19 +269,6 @@
 		return false;
 	}
 
-	/// Check that substrate account is the owner or admin of the collection
-	///
-	/// @param user account to verify
-	/// @return "true" if account is the owner or admin
-	/// @dev EVM selector for this function is: 0x68910e00,
-	///  or in textual repr: isOwnerOrAdminSubstrate(uint256)
-	function isOwnerOrAdminSubstrate(uint256 user) public view returns (bool) {
-		require(false, stub_error);
-		user;
-		dummy;
-		return false;
-	}
-
 	/// Returns collection type
 	///
 	/// @return `Fungible` or `NFT` or `ReFungible`
@@ -367,18 +299,6 @@
 	/// @dev EVM selector for this function is: 0x13af4035,
 	///  or in textual repr: setOwner(address)
 	function setOwner(address newOwner) public {
-		require(false, stub_error);
-		newOwner;
-		dummy = 0;
-	}
-
-	/// Changes collection owner to another substrate account
-	///
-	/// @dev Owner can be changed only by current owner
-	/// @param newOwner new owner substrate account
-	/// @dev EVM selector for this function is: 0xb212138f,
-	///  or in textual repr: setOwnerSubstrate(uint256)
-	function setOwnerSubstrate(uint256 newOwner) public {
 		require(false, stub_error);
 		newOwner;
 		dummy = 0;
modifiedpallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth
--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -91,7 +91,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x47dbc105
+/// @dev the ERC-165 identifier for this interface is 0x3e1e8083
 contract Collection is Dummy, ERC165 {
 	/// Set collection property.
 	///
@@ -145,19 +145,6 @@
 		dummy = 0;
 	}
 
-	/// Set the substrate sponsor of the collection.
-	///
-	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
-	///
-	/// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
-	/// @dev EVM selector for this function is: 0xc74d6751,
-	///  or in textual repr: setCollectionSponsorSubstrate(uint256)
-	function setCollectionSponsorSubstrate(uint256 sponsor) public {
-		require(false, stub_error);
-		sponsor;
-		dummy = 0;
-	}
-
 	/// Whether there is a pending sponsor.
 	/// @dev EVM selector for this function is: 0x058ac185,
 	///  or in textual repr: hasCollectionPendingSponsor()
@@ -240,26 +227,6 @@
 		return 0x0000000000000000000000000000000000000000;
 	}
 
-	/// Add collection admin by substrate address.
-	/// @param newAdmin Substrate administrator address.
-	/// @dev EVM selector for this function is: 0x5730062b,
-	///  or in textual repr: addCollectionAdminSubstrate(uint256)
-	function addCollectionAdminSubstrate(uint256 newAdmin) public {
-		require(false, stub_error);
-		newAdmin;
-		dummy = 0;
-	}
-
-	/// Remove collection admin by substrate address.
-	/// @param admin Substrate administrator address.
-	/// @dev EVM selector for this function is: 0x4048fcf9,
-	///  or in textual repr: removeCollectionAdminSubstrate(uint256)
-	function removeCollectionAdminSubstrate(uint256 admin) public {
-		require(false, stub_error);
-		admin;
-		dummy = 0;
-	}
-
 	/// Add collection admin.
 	/// @param newAdmin Address of the added administrator.
 	/// @dev EVM selector for this function is: 0x92e462c7,
@@ -335,17 +302,6 @@
 	/// @dev EVM selector for this function is: 0x67844fe6,
 	///  or in textual repr: addToCollectionAllowList(address)
 	function addToCollectionAllowList(address user) public {
-		require(false, stub_error);
-		user;
-		dummy = 0;
-	}
-
-	/// Add substrate user to allowed list.
-	///
-	/// @param user User substrate address.
-	/// @dev EVM selector for this function is: 0xd06ad267,
-	///  or in textual repr: addToCollectionAllowListSubstrate(uint256)
-	function addToCollectionAllowListSubstrate(uint256 user) public {
 		require(false, stub_error);
 		user;
 		dummy = 0;
@@ -362,17 +318,6 @@
 		dummy = 0;
 	}
 
-	/// Remove substrate user from allowed list.
-	///
-	/// @param user User substrate address.
-	/// @dev EVM selector for this function is: 0xa31913ed,
-	///  or in textual repr: removeFromCollectionAllowListSubstrate(uint256)
-	function removeFromCollectionAllowListSubstrate(uint256 user) public {
-		require(false, stub_error);
-		user;
-		dummy = 0;
-	}
-
 	/// Switch permission for minting.
 	///
 	/// @param mode Enable if "true".
@@ -397,19 +342,6 @@
 		return false;
 	}
 
-	/// Check that substrate account is the owner or admin of the collection
-	///
-	/// @param user account to verify
-	/// @return "true" if account is the owner or admin
-	/// @dev EVM selector for this function is: 0x68910e00,
-	///  or in textual repr: isOwnerOrAdminSubstrate(uint256)
-	function isOwnerOrAdminSubstrate(uint256 user) public view returns (bool) {
-		require(false, stub_error);
-		user;
-		dummy;
-		return false;
-	}
-
 	/// Returns collection type
 	///
 	/// @return `Fungible` or `NFT` or `ReFungible`
@@ -440,18 +372,6 @@
 	/// @dev EVM selector for this function is: 0x13af4035,
 	///  or in textual repr: setOwner(address)
 	function setOwner(address newOwner) public {
-		require(false, stub_error);
-		newOwner;
-		dummy = 0;
-	}
-
-	/// Changes collection owner to another substrate account
-	///
-	/// @dev Owner can be changed only by current owner
-	/// @param newOwner new owner substrate account
-	/// @dev EVM selector for this function is: 0xb212138f,
-	///  or in textual repr: setOwnerSubstrate(uint256)
-	function setOwnerSubstrate(uint256 newOwner) public {
 		require(false, stub_error);
 		newOwner;
 		dummy = 0;
modifiedpallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth
--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -91,7 +91,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x47dbc105
+/// @dev the ERC-165 identifier for this interface is 0x3e1e8083
 contract Collection is Dummy, ERC165 {
 	/// Set collection property.
 	///
@@ -145,19 +145,6 @@
 		dummy = 0;
 	}
 
-	/// Set the substrate sponsor of the collection.
-	///
-	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
-	///
-	/// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
-	/// @dev EVM selector for this function is: 0xc74d6751,
-	///  or in textual repr: setCollectionSponsorSubstrate(uint256)
-	function setCollectionSponsorSubstrate(uint256 sponsor) public {
-		require(false, stub_error);
-		sponsor;
-		dummy = 0;
-	}
-
 	/// Whether there is a pending sponsor.
 	/// @dev EVM selector for this function is: 0x058ac185,
 	///  or in textual repr: hasCollectionPendingSponsor()
@@ -240,26 +227,6 @@
 		return 0x0000000000000000000000000000000000000000;
 	}
 
-	/// Add collection admin by substrate address.
-	/// @param newAdmin Substrate administrator address.
-	/// @dev EVM selector for this function is: 0x5730062b,
-	///  or in textual repr: addCollectionAdminSubstrate(uint256)
-	function addCollectionAdminSubstrate(uint256 newAdmin) public {
-		require(false, stub_error);
-		newAdmin;
-		dummy = 0;
-	}
-
-	/// Remove collection admin by substrate address.
-	/// @param admin Substrate administrator address.
-	/// @dev EVM selector for this function is: 0x4048fcf9,
-	///  or in textual repr: removeCollectionAdminSubstrate(uint256)
-	function removeCollectionAdminSubstrate(uint256 admin) public {
-		require(false, stub_error);
-		admin;
-		dummy = 0;
-	}
-
 	/// Add collection admin.
 	/// @param newAdmin Address of the added administrator.
 	/// @dev EVM selector for this function is: 0x92e462c7,
@@ -335,17 +302,6 @@
 	/// @dev EVM selector for this function is: 0x67844fe6,
 	///  or in textual repr: addToCollectionAllowList(address)
 	function addToCollectionAllowList(address user) public {
-		require(false, stub_error);
-		user;
-		dummy = 0;
-	}
-
-	/// Add substrate user to allowed list.
-	///
-	/// @param user User substrate address.
-	/// @dev EVM selector for this function is: 0xd06ad267,
-	///  or in textual repr: addToCollectionAllowListSubstrate(uint256)
-	function addToCollectionAllowListSubstrate(uint256 user) public {
 		require(false, stub_error);
 		user;
 		dummy = 0;
@@ -362,17 +318,6 @@
 		dummy = 0;
 	}
 
-	/// Remove substrate user from allowed list.
-	///
-	/// @param user User substrate address.
-	/// @dev EVM selector for this function is: 0xa31913ed,
-	///  or in textual repr: removeFromCollectionAllowListSubstrate(uint256)
-	function removeFromCollectionAllowListSubstrate(uint256 user) public {
-		require(false, stub_error);
-		user;
-		dummy = 0;
-	}
-
 	/// Switch permission for minting.
 	///
 	/// @param mode Enable if "true".
@@ -397,19 +342,6 @@
 		return false;
 	}
 
-	/// Check that substrate account is the owner or admin of the collection
-	///
-	/// @param user account to verify
-	/// @return "true" if account is the owner or admin
-	/// @dev EVM selector for this function is: 0x68910e00,
-	///  or in textual repr: isOwnerOrAdminSubstrate(uint256)
-	function isOwnerOrAdminSubstrate(uint256 user) public view returns (bool) {
-		require(false, stub_error);
-		user;
-		dummy;
-		return false;
-	}
-
 	/// Returns collection type
 	///
 	/// @return `Fungible` or `NFT` or `ReFungible`
@@ -440,18 +372,6 @@
 	/// @dev EVM selector for this function is: 0x13af4035,
 	///  or in textual repr: setOwner(address)
 	function setOwner(address newOwner) public {
-		require(false, stub_error);
-		newOwner;
-		dummy = 0;
-	}
-
-	/// Changes collection owner to another substrate account
-	///
-	/// @dev Owner can be changed only by current owner
-	/// @param newOwner new owner substrate account
-	/// @dev EVM selector for this function is: 0xb212138f,
-	///  or in textual repr: setOwnerSubstrate(uint256)
-	function setOwnerSubstrate(uint256 newOwner) public {
 		require(false, stub_error);
 		newOwner;
 		dummy = 0;
modifiedtests/src/eth/allowlist.test.tsdiffbeforeafterboth
--- a/tests/src/eth/allowlist.test.ts
+++ b/tests/src/eth/allowlist.test.ts
@@ -95,20 +95,21 @@
     expect(await collectionEvm.methods.allowed(user).call({from: owner})).to.be.false;
   });
 
-  itEth('Collection allowlist can be added and removed by [sub] address', async ({helper}) => {
-    const owner = await helper.eth.createAccountWithBalance(donor);
-    const user = donor;
+  // TODO: Temprorary off. Need refactor
+  // itEth('Collection allowlist can be added and removed by [sub] address', async ({helper}) => {
+  //   const owner = await helper.eth.createAccountWithBalance(donor);
+  //   const user = donor;
     
-    const {collectionAddress, collectionId} = await helper.eth.createNonfungibleCollection(owner, 'A', 'B', 'C');
-    const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+  //   const {collectionAddress, collectionId} = await helper.eth.createNonfungibleCollection(owner, 'A', 'B', 'C');
+  //   const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
     
-    expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
-    await collectionEvm.methods.addToCollectionAllowListSubstrate(user.addressRaw).send({from: owner});
-    expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.true;
+  //   expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
+  //   await collectionEvm.methods.addToCollectionAllowListSubstrate(user.addressRaw).send({from: owner});
+  //   expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.true;
     
-    await collectionEvm.methods.removeFromCollectionAllowListSubstrate(user.addressRaw).send({from: owner});
-    expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
-  });
+  //   await collectionEvm.methods.removeFromCollectionAllowListSubstrate(user.addressRaw).send({from: owner});
+  //   expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
+  // });
 
   itEth('Collection allowlist can not be add and remove [eth] address by not owner', async ({helper}) => {
     const owner = await helper.eth.createAccountWithBalance(donor);
@@ -128,21 +129,22 @@
     expect(await collectionEvm.methods.allowed(user).call({from: owner})).to.be.true;
   });
 
-  itEth('Collection allowlist can not be add and remove [sub] address by not owner', async ({helper}) => {
-    const owner = await helper.eth.createAccountWithBalance(donor);
-    const notOwner = await helper.eth.createAccountWithBalance(donor);
-    const user = donor;
+  // TODO: Temprorary off. Need refactor
+  // itEth('Collection allowlist can not be add and remove [sub] address by not owner', async ({helper}) => {
+  //   const owner = await helper.eth.createAccountWithBalance(donor);
+  //   const notOwner = await helper.eth.createAccountWithBalance(donor);
+  //   const user = donor;
     
-    const {collectionAddress, collectionId} = await helper.eth.createNonfungibleCollection(owner, 'A', 'B', 'C');
-    const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+  //   const {collectionAddress, collectionId} = await helper.eth.createNonfungibleCollection(owner, 'A', 'B', 'C');
+  //   const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
     
-    expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
-    await expect(collectionEvm.methods.addToCollectionAllowListSubstrate(user.addressRaw).call({from: notOwner})).to.be.rejectedWith('NoPermission');
-    expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
-    await collectionEvm.methods.addToCollectionAllowListSubstrate(user.addressRaw).send({from: owner});
+  //   expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
+  //   await expect(collectionEvm.methods.addToCollectionAllowListSubstrate(user.addressRaw).call({from: notOwner})).to.be.rejectedWith('NoPermission');
+  //   expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.false;
+  //   await collectionEvm.methods.addToCollectionAllowListSubstrate(user.addressRaw).send({from: owner});
     
-    expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.true;
-    await expect(collectionEvm.methods.removeFromCollectionAllowListSubstrate(user.addressRaw).call({from: notOwner})).to.be.rejectedWith('NoPermission');
-    expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.true;
-  });
+  //   expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.true;
+  //   await expect(collectionEvm.methods.removeFromCollectionAllowListSubstrate(user.addressRaw).call({from: notOwner})).to.be.rejectedWith('NoPermission');
+  //   expect(await helper.collection.allowed(collectionId, {Substrate: user.address})).to.be.true;
+  // });
 });
modifiedtests/src/eth/api/UniqueFungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -13,7 +13,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x47dbc105
+/// @dev the ERC-165 identifier for this interface is 0x3e1e8083
 interface Collection is Dummy, ERC165 {
 	/// Set collection property.
 	///
@@ -48,15 +48,6 @@
 	/// @dev EVM selector for this function is: 0x7623402e,
 	///  or in textual repr: setCollectionSponsor(address)
 	function setCollectionSponsor(address sponsor) external;
-
-	/// Set the substrate sponsor of the collection.
-	///
-	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
-	///
-	/// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
-	/// @dev EVM selector for this function is: 0xc74d6751,
-	///  or in textual repr: setCollectionSponsorSubstrate(uint256)
-	function setCollectionSponsorSubstrate(uint256 sponsor) external;
 
 	/// Whether there is a pending sponsor.
 	/// @dev EVM selector for this function is: 0x058ac185,
@@ -112,18 +103,6 @@
 	///  or in textual repr: contractAddress()
 	function contractAddress() external view returns (address);
 
-	/// Add collection admin by substrate address.
-	/// @param newAdmin Substrate administrator address.
-	/// @dev EVM selector for this function is: 0x5730062b,
-	///  or in textual repr: addCollectionAdminSubstrate(uint256)
-	function addCollectionAdminSubstrate(uint256 newAdmin) external;
-
-	/// Remove collection admin by substrate address.
-	/// @param admin Substrate administrator address.
-	/// @dev EVM selector for this function is: 0x4048fcf9,
-	///  or in textual repr: removeCollectionAdminSubstrate(uint256)
-	function removeCollectionAdminSubstrate(uint256 admin) external;
-
 	/// Add collection admin.
 	/// @param newAdmin Address of the added administrator.
 	/// @dev EVM selector for this function is: 0x92e462c7,
@@ -174,13 +153,6 @@
 	///  or in textual repr: addToCollectionAllowList(address)
 	function addToCollectionAllowList(address user) external;
 
-	/// Add substrate user to allowed list.
-	///
-	/// @param user User substrate address.
-	/// @dev EVM selector for this function is: 0xd06ad267,
-	///  or in textual repr: addToCollectionAllowListSubstrate(uint256)
-	function addToCollectionAllowListSubstrate(uint256 user) external;
-
 	/// Remove the user from the allowed list.
 	///
 	/// @param user Address of a removed user.
@@ -188,13 +160,6 @@
 	///  or in textual repr: removeFromCollectionAllowList(address)
 	function removeFromCollectionAllowList(address user) external;
 
-	/// Remove substrate user from allowed list.
-	///
-	/// @param user User substrate address.
-	/// @dev EVM selector for this function is: 0xa31913ed,
-	///  or in textual repr: removeFromCollectionAllowListSubstrate(uint256)
-	function removeFromCollectionAllowListSubstrate(uint256 user) external;
-
 	/// Switch permission for minting.
 	///
 	/// @param mode Enable if "true".
@@ -209,14 +174,6 @@
 	/// @dev EVM selector for this function is: 0x9811b0c7,
 	///  or in textual repr: isOwnerOrAdmin(address)
 	function isOwnerOrAdmin(address user) external view returns (bool);
-
-	/// Check that substrate account is the owner or admin of the collection
-	///
-	/// @param user account to verify
-	/// @return "true" if account is the owner or admin
-	/// @dev EVM selector for this function is: 0x68910e00,
-	///  or in textual repr: isOwnerOrAdminSubstrate(uint256)
-	function isOwnerOrAdminSubstrate(uint256 user) external view returns (bool);
 
 	/// Returns collection type
 	///
@@ -240,14 +197,6 @@
 	/// @dev EVM selector for this function is: 0x13af4035,
 	///  or in textual repr: setOwner(address)
 	function setOwner(address newOwner) external;
-
-	/// Changes collection owner to another substrate account
-	///
-	/// @dev Owner can be changed only by current owner
-	/// @param newOwner new owner substrate account
-	/// @dev EVM selector for this function is: 0xb212138f,
-	///  or in textual repr: setOwnerSubstrate(uint256)
-	function setOwnerSubstrate(uint256 newOwner) external;
 }
 
 /// @dev the ERC-165 identifier for this interface is 0x63034ac5
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -62,7 +62,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x47dbc105
+/// @dev the ERC-165 identifier for this interface is 0x3e1e8083
 interface Collection is Dummy, ERC165 {
 	/// Set collection property.
 	///
@@ -97,15 +97,6 @@
 	/// @dev EVM selector for this function is: 0x7623402e,
 	///  or in textual repr: setCollectionSponsor(address)
 	function setCollectionSponsor(address sponsor) external;
-
-	/// Set the substrate sponsor of the collection.
-	///
-	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
-	///
-	/// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
-	/// @dev EVM selector for this function is: 0xc74d6751,
-	///  or in textual repr: setCollectionSponsorSubstrate(uint256)
-	function setCollectionSponsorSubstrate(uint256 sponsor) external;
 
 	/// Whether there is a pending sponsor.
 	/// @dev EVM selector for this function is: 0x058ac185,
@@ -161,18 +152,6 @@
 	///  or in textual repr: contractAddress()
 	function contractAddress() external view returns (address);
 
-	/// Add collection admin by substrate address.
-	/// @param newAdmin Substrate administrator address.
-	/// @dev EVM selector for this function is: 0x5730062b,
-	///  or in textual repr: addCollectionAdminSubstrate(uint256)
-	function addCollectionAdminSubstrate(uint256 newAdmin) external;
-
-	/// Remove collection admin by substrate address.
-	/// @param admin Substrate administrator address.
-	/// @dev EVM selector for this function is: 0x4048fcf9,
-	///  or in textual repr: removeCollectionAdminSubstrate(uint256)
-	function removeCollectionAdminSubstrate(uint256 admin) external;
-
 	/// Add collection admin.
 	/// @param newAdmin Address of the added administrator.
 	/// @dev EVM selector for this function is: 0x92e462c7,
@@ -223,13 +202,6 @@
 	///  or in textual repr: addToCollectionAllowList(address)
 	function addToCollectionAllowList(address user) external;
 
-	/// Add substrate user to allowed list.
-	///
-	/// @param user User substrate address.
-	/// @dev EVM selector for this function is: 0xd06ad267,
-	///  or in textual repr: addToCollectionAllowListSubstrate(uint256)
-	function addToCollectionAllowListSubstrate(uint256 user) external;
-
 	/// Remove the user from the allowed list.
 	///
 	/// @param user Address of a removed user.
@@ -237,13 +209,6 @@
 	///  or in textual repr: removeFromCollectionAllowList(address)
 	function removeFromCollectionAllowList(address user) external;
 
-	/// Remove substrate user from allowed list.
-	///
-	/// @param user User substrate address.
-	/// @dev EVM selector for this function is: 0xa31913ed,
-	///  or in textual repr: removeFromCollectionAllowListSubstrate(uint256)
-	function removeFromCollectionAllowListSubstrate(uint256 user) external;
-
 	/// Switch permission for minting.
 	///
 	/// @param mode Enable if "true".
@@ -258,14 +223,6 @@
 	/// @dev EVM selector for this function is: 0x9811b0c7,
 	///  or in textual repr: isOwnerOrAdmin(address)
 	function isOwnerOrAdmin(address user) external view returns (bool);
-
-	/// Check that substrate account is the owner or admin of the collection
-	///
-	/// @param user account to verify
-	/// @return "true" if account is the owner or admin
-	/// @dev EVM selector for this function is: 0x68910e00,
-	///  or in textual repr: isOwnerOrAdminSubstrate(uint256)
-	function isOwnerOrAdminSubstrate(uint256 user) external view returns (bool);
 
 	/// Returns collection type
 	///
@@ -289,14 +246,6 @@
 	/// @dev EVM selector for this function is: 0x13af4035,
 	///  or in textual repr: setOwner(address)
 	function setOwner(address newOwner) external;
-
-	/// Changes collection owner to another substrate account
-	///
-	/// @dev Owner can be changed only by current owner
-	/// @param newOwner new owner substrate account
-	/// @dev EVM selector for this function is: 0xb212138f,
-	///  or in textual repr: setOwnerSubstrate(uint256)
-	function setOwnerSubstrate(uint256 newOwner) external;
 }
 
 /// @dev anonymous struct
modifiedtests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -62,7 +62,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x47dbc105
+/// @dev the ERC-165 identifier for this interface is 0x3e1e8083
 interface Collection is Dummy, ERC165 {
 	/// Set collection property.
 	///
@@ -97,15 +97,6 @@
 	/// @dev EVM selector for this function is: 0x7623402e,
 	///  or in textual repr: setCollectionSponsor(address)
 	function setCollectionSponsor(address sponsor) external;
-
-	/// Set the substrate sponsor of the collection.
-	///
-	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
-	///
-	/// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
-	/// @dev EVM selector for this function is: 0xc74d6751,
-	///  or in textual repr: setCollectionSponsorSubstrate(uint256)
-	function setCollectionSponsorSubstrate(uint256 sponsor) external;
 
 	/// Whether there is a pending sponsor.
 	/// @dev EVM selector for this function is: 0x058ac185,
@@ -161,18 +152,6 @@
 	///  or in textual repr: contractAddress()
 	function contractAddress() external view returns (address);
 
-	/// Add collection admin by substrate address.
-	/// @param newAdmin Substrate administrator address.
-	/// @dev EVM selector for this function is: 0x5730062b,
-	///  or in textual repr: addCollectionAdminSubstrate(uint256)
-	function addCollectionAdminSubstrate(uint256 newAdmin) external;
-
-	/// Remove collection admin by substrate address.
-	/// @param admin Substrate administrator address.
-	/// @dev EVM selector for this function is: 0x4048fcf9,
-	///  or in textual repr: removeCollectionAdminSubstrate(uint256)
-	function removeCollectionAdminSubstrate(uint256 admin) external;
-
 	/// Add collection admin.
 	/// @param newAdmin Address of the added administrator.
 	/// @dev EVM selector for this function is: 0x92e462c7,
@@ -223,13 +202,6 @@
 	///  or in textual repr: addToCollectionAllowList(address)
 	function addToCollectionAllowList(address user) external;
 
-	/// Add substrate user to allowed list.
-	///
-	/// @param user User substrate address.
-	/// @dev EVM selector for this function is: 0xd06ad267,
-	///  or in textual repr: addToCollectionAllowListSubstrate(uint256)
-	function addToCollectionAllowListSubstrate(uint256 user) external;
-
 	/// Remove the user from the allowed list.
 	///
 	/// @param user Address of a removed user.
@@ -237,13 +209,6 @@
 	///  or in textual repr: removeFromCollectionAllowList(address)
 	function removeFromCollectionAllowList(address user) external;
 
-	/// Remove substrate user from allowed list.
-	///
-	/// @param user User substrate address.
-	/// @dev EVM selector for this function is: 0xa31913ed,
-	///  or in textual repr: removeFromCollectionAllowListSubstrate(uint256)
-	function removeFromCollectionAllowListSubstrate(uint256 user) external;
-
 	/// Switch permission for minting.
 	///
 	/// @param mode Enable if "true".
@@ -258,14 +223,6 @@
 	/// @dev EVM selector for this function is: 0x9811b0c7,
 	///  or in textual repr: isOwnerOrAdmin(address)
 	function isOwnerOrAdmin(address user) external view returns (bool);
-
-	/// Check that substrate account is the owner or admin of the collection
-	///
-	/// @param user account to verify
-	/// @return "true" if account is the owner or admin
-	/// @dev EVM selector for this function is: 0x68910e00,
-	///  or in textual repr: isOwnerOrAdminSubstrate(uint256)
-	function isOwnerOrAdminSubstrate(uint256 user) external view returns (bool);
 
 	/// Returns collection type
 	///
@@ -289,14 +246,6 @@
 	/// @dev EVM selector for this function is: 0x13af4035,
 	///  or in textual repr: setOwner(address)
 	function setOwner(address newOwner) external;
-
-	/// Changes collection owner to another substrate account
-	///
-	/// @dev Owner can be changed only by current owner
-	/// @param newOwner new owner substrate account
-	/// @dev EVM selector for this function is: 0xb212138f,
-	///  or in textual repr: setOwnerSubstrate(uint256)
-	function setOwnerSubstrate(uint256 newOwner) external;
 }
 
 /// @dev anonymous struct
modifiedtests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth
before · tests/src/eth/collectionAdmin.test.ts
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.3// Unique Network is free software: you can redistribute it and/or modify4// it under the terms of the GNU General Public License as published by5// the Free Software Foundation, either version 3 of the License, or6// (at your option) any later version.7//8// Unique Network is distributed in the hope that it will be useful,9// but WITHOUT ANY WARRANTY; without even the implied warranty of10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the11// GNU General Public License for more details.1213// You should have received a copy of the GNU General Public License14// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1516import {expect} from 'chai';17import privateKey from '../substrate/privateKey';18import {UNIQUE} from '../util/helpers';19import {20  createEthAccount,21  createEthAccountWithBalance, 22  evmCollection, 23  evmCollectionHelpers, 24  getCollectionAddressFromResult, 25  itWeb3,26  recordEthFee,27} from './util/helpers';2829describe('Add collection admins', () => {30  itWeb3('Add admin by owner', async ({api, web3, privateKeyWrapper}) => {31    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);32    const collectionHelper = evmCollectionHelpers(web3, owner);33        34    const result = await collectionHelper.methods35      .createNonfungibleCollection('A', 'B', 'C')36      .send();37    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);3839    const newAdmin = createEthAccount(web3);40    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);41    await collectionEvm.methods.addCollectionAdmin(newAdmin).send();42    const adminList = await api.rpc.unique.adminlist(collectionId);43    expect(adminList[0].asEthereum.toString().toLocaleLowerCase())44      .to.be.eq(newAdmin.toLocaleLowerCase());45  });4647  itWeb3('Add substrate admin by owner', async ({api, web3, privateKeyWrapper}) => {48    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);49    const collectionHelper = evmCollectionHelpers(web3, owner);50        51    const result = await collectionHelper.methods52      .createNonfungibleCollection('A', 'B', 'C')53      .send();54    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);5556    const newAdmin = privateKeyWrapper('//Alice');57    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);58    await collectionEvm.methods.addCollectionAdminSubstrate(newAdmin.addressRaw).send();5960    const adminList = await api.rpc.unique.adminlist(collectionId);61    expect(adminList[0].asSubstrate.toString().toLocaleLowerCase())62      .to.be.eq(newAdmin.address.toLocaleLowerCase());63  });64  65  itWeb3('Verify owner or admin', async ({api, web3, privateKeyWrapper}) => {66    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);67    const collectionHelper = evmCollectionHelpers(web3, owner);68        69    const result = await collectionHelper.methods70      .createNonfungibleCollection('A', 'B', 'C')71      .send();72    const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);7374    const newAdmin = createEthAccount(web3);75    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);76    expect(await collectionEvm.methods.isOwnerOrAdmin(newAdmin).call()).to.be.false;77    await collectionEvm.methods.addCollectionAdmin(newAdmin).send();78    expect(await collectionEvm.methods.isOwnerOrAdmin(newAdmin).call()).to.be.true;79  });8081  itWeb3('(!negative tests!) Add admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {82    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);83    const collectionHelper = evmCollectionHelpers(web3, owner);84        85    const result = await collectionHelper.methods86      .createNonfungibleCollection('A', 'B', 'C')87      .send();88    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);8990    const admin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);91    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);92    await collectionEvm.methods.addCollectionAdmin(admin).send();93    94    const user = createEthAccount(web3);95    await expect(collectionEvm.methods.addCollectionAdmin(user).call({from: admin}))96      .to.be.rejectedWith('NoPermission');9798    const adminList = await api.rpc.unique.adminlist(collectionId);99    expect(adminList.length).to.be.eq(1);100    expect(adminList[0].asEthereum.toString().toLocaleLowerCase())101      .to.be.eq(admin.toLocaleLowerCase());102  });103104  itWeb3('(!negative tests!) Add admin by USER is not allowed', async ({api, web3, privateKeyWrapper}) => {105    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);106    const collectionHelper = evmCollectionHelpers(web3, owner);107        108    const result = await collectionHelper.methods109      .createNonfungibleCollection('A', 'B', 'C')110      .send();111    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);112113    const notAdmin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);114    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);115    116    const user = createEthAccount(web3);117    await expect(collectionEvm.methods.addCollectionAdmin(user).call({from: notAdmin}))118      .to.be.rejectedWith('NoPermission');119120    const adminList = await api.rpc.unique.adminlist(collectionId);121    expect(adminList.length).to.be.eq(0);122  });123124  itWeb3('(!negative tests!) Add substrate admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {125    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);126    const collectionHelper = evmCollectionHelpers(web3, owner);127        128    const result = await collectionHelper.methods129      .createNonfungibleCollection('A', 'B', 'C')130      .send();131    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);132133    const admin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);134    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);135    await collectionEvm.methods.addCollectionAdmin(admin).send();136137    const notAdmin = privateKey('//Alice');138    await expect(collectionEvm.methods.addCollectionAdminSubstrate(notAdmin.addressRaw).call({from: admin}))139      .to.be.rejectedWith('NoPermission');140141    const adminList = await api.rpc.unique.adminlist(collectionId);142    expect(adminList.length).to.be.eq(1);143    expect(adminList[0].asEthereum.toString().toLocaleLowerCase())144      .to.be.eq(admin.toLocaleLowerCase());145  });146  147  itWeb3('(!negative tests!) Add substrate admin by USER is not allowed', async ({api, web3, privateKeyWrapper}) => {148    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);149    const collectionHelper = evmCollectionHelpers(web3, owner);150        151    const result = await collectionHelper.methods152      .createNonfungibleCollection('A', 'B', 'C')153      .send();154    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);155156    const notAdmin0 = await createEthAccountWithBalance(api, web3, privateKeyWrapper);157    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);158    const notAdmin1 = privateKey('//Alice');159    await expect(collectionEvm.methods.addCollectionAdminSubstrate(notAdmin1.addressRaw).call({from: notAdmin0}))160      .to.be.rejectedWith('NoPermission');161162    const adminList = await api.rpc.unique.adminlist(collectionId);163    expect(adminList.length).to.be.eq(0);164  });165});166167describe('Remove collection admins', () => {168  itWeb3('Remove admin by owner', async ({api, web3, privateKeyWrapper}) => {169    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);170    const collectionHelper = evmCollectionHelpers(web3, owner);171        172    const result = await collectionHelper.methods173      .createNonfungibleCollection('A', 'B', 'C')174      .send();175    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);176177    const newAdmin = createEthAccount(web3);178    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);179    await collectionEvm.methods.addCollectionAdmin(newAdmin).send();180    {181      const adminList = await api.rpc.unique.adminlist(collectionId);182      expect(adminList.length).to.be.eq(1);183      expect(adminList[0].asEthereum.toString().toLocaleLowerCase())184        .to.be.eq(newAdmin.toLocaleLowerCase());185    }186187    await collectionEvm.methods.removeCollectionAdmin(newAdmin).send();188    const adminList = await api.rpc.unique.adminlist(collectionId);189    expect(adminList.length).to.be.eq(0);190  });191192  itWeb3('Remove substrate admin by owner', async ({api, web3, privateKeyWrapper}) => {193    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);194    const collectionHelper = evmCollectionHelpers(web3, owner);195        196    const result = await collectionHelper.methods197      .createNonfungibleCollection('A', 'B', 'C')198      .send();199    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);200201    const newAdmin = privateKeyWrapper('//Alice');202    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);203    await collectionEvm.methods.addCollectionAdminSubstrate(newAdmin.addressRaw).send();204    {205      const adminList = await api.rpc.unique.adminlist(collectionId);206      expect(adminList[0].asSubstrate.toString().toLocaleLowerCase())207        .to.be.eq(newAdmin.address.toLocaleLowerCase());208    }209    210    await collectionEvm.methods.removeCollectionAdminSubstrate(newAdmin.addressRaw).send();211    const adminList = await api.rpc.unique.adminlist(collectionId);212    expect(adminList.length).to.be.eq(0);213  });214215  itWeb3('(!negative tests!) Remove admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {216    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);217    const collectionHelper = evmCollectionHelpers(web3, owner);218        219    const result = await collectionHelper.methods220      .createNonfungibleCollection('A', 'B', 'C')221      .send();222    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);223224    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);225226    const admin0 = await createEthAccountWithBalance(api, web3, privateKeyWrapper);227    await collectionEvm.methods.addCollectionAdmin(admin0).send();228    const admin1 = createEthAccount(web3);229    await collectionEvm.methods.addCollectionAdmin(admin1).send();230231    await expect(collectionEvm.methods.removeCollectionAdmin(admin1).call({from: admin0}))232      .to.be.rejectedWith('NoPermission');233    {234      const adminList = await api.rpc.unique.adminlist(collectionId);235      expect(adminList.length).to.be.eq(2);236      expect(adminList.toString().toLocaleLowerCase())237        .to.be.deep.contains(admin0.toLocaleLowerCase())238        .to.be.deep.contains(admin1.toLocaleLowerCase());239    }240  });241242  itWeb3('(!negative tests!) Remove admin by USER is not allowed', async ({api, web3, privateKeyWrapper}) => {243    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);244    const collectionHelper = evmCollectionHelpers(web3, owner);245        246    const result = await collectionHelper.methods247      .createNonfungibleCollection('A', 'B', 'C')248      .send();249    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);250251    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);252253    const admin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);254    await collectionEvm.methods.addCollectionAdmin(admin).send();255    const notAdmin = createEthAccount(web3);256257    await expect(collectionEvm.methods.removeCollectionAdmin(admin).call({from: notAdmin}))258      .to.be.rejectedWith('NoPermission');259    {260      const adminList = await api.rpc.unique.adminlist(collectionId);261      expect(adminList[0].asEthereum.toString().toLocaleLowerCase())262        .to.be.eq(admin.toLocaleLowerCase());263      expect(adminList.length).to.be.eq(1);264    }265  });266267  itWeb3('(!negative tests!) Remove substrate admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {268    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);269    const collectionHelper = evmCollectionHelpers(web3, owner);270        271    const result = await collectionHelper.methods272      .createNonfungibleCollection('A', 'B', 'C')273      .send();274    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);275276    const adminSub = privateKeyWrapper('//Alice');277    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);278    await collectionEvm.methods.addCollectionAdminSubstrate(adminSub.addressRaw).send();279    const adminEth = await createEthAccountWithBalance(api, web3, privateKeyWrapper);280    await collectionEvm.methods.addCollectionAdmin(adminEth).send();281282    await expect(collectionEvm.methods.removeCollectionAdminSubstrate(adminSub.addressRaw).call({from: adminEth}))283      .to.be.rejectedWith('NoPermission');284285    const adminList = await api.rpc.unique.adminlist(collectionId);286    expect(adminList.length).to.be.eq(2);287    expect(adminList.toString().toLocaleLowerCase())288      .to.be.deep.contains(adminSub.address.toLocaleLowerCase())289      .to.be.deep.contains(adminEth.toLocaleLowerCase());290  });291292  itWeb3('(!negative tests!) Remove substrate admin by USER is not allowed', async ({api, web3, privateKeyWrapper}) => {293    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);294    const collectionHelper = evmCollectionHelpers(web3, owner);295        296    const result = await collectionHelper.methods297      .createNonfungibleCollection('A', 'B', 'C')298      .send();299    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);300301    const adminSub = privateKeyWrapper('//Alice');302    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);303    await collectionEvm.methods.addCollectionAdminSubstrate(adminSub.addressRaw).send();304    const notAdminEth = await createEthAccountWithBalance(api, web3, privateKeyWrapper);305306    await expect(collectionEvm.methods.removeCollectionAdminSubstrate(adminSub.addressRaw).call({from: notAdminEth}))307      .to.be.rejectedWith('NoPermission');308309    const adminList = await api.rpc.unique.adminlist(collectionId);310    expect(adminList.length).to.be.eq(1);311    expect(adminList[0].asSubstrate.toString().toLocaleLowerCase())312      .to.be.eq(adminSub.address.toLocaleLowerCase());313  });314});315316describe('Change owner tests', () => {317  itWeb3('Change owner', async ({api, web3, privateKeyWrapper}) => {318    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);319    const newOwner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);320    const collectionHelper = evmCollectionHelpers(web3, owner);321    const result = await collectionHelper.methods322      .createNonfungibleCollection('A', 'B', 'C')323      .send();324    const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);325    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);326  327    await collectionEvm.methods.setOwner(newOwner).send();328  329    expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.false;330    expect(await collectionEvm.methods.isOwnerOrAdmin(newOwner).call()).to.be.true;331  });332333  itWeb3('change owner call fee', async ({web3, api, privateKeyWrapper}) => {334    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);335    const newOwner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);336    const collectionHelper = evmCollectionHelpers(web3, owner);337    const result = await collectionHelper.methods338      .createNonfungibleCollection('A', 'B', 'C')339      .send();340    const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);341    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);342343    const cost = await recordEthFee(api, owner, () => collectionEvm.methods.setOwner(newOwner).send());344    expect(cost < BigInt(0.2 * Number(UNIQUE)));345    expect(cost > 0);346  });347348  itWeb3('(!negative tests!) call setOwner by non owner', async ({api, web3, privateKeyWrapper}) => {349    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);350    const newOwner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);351    const collectionHelper = evmCollectionHelpers(web3, owner);352    const result = await collectionHelper.methods353      .createNonfungibleCollection('A', 'B', 'C')354      .send();355    const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);356    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);357  358    await expect(collectionEvm.methods.setOwner(newOwner).send({from: newOwner})).to.be.rejected;359    expect(await collectionEvm.methods.isOwnerOrAdmin(newOwner).call()).to.be.false;360  });361});362363describe('Change substrate owner tests', () => {364  itWeb3('Change owner', async ({api, web3, privateKeyWrapper}) => {365    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);366    const newOwner = privateKeyWrapper('//Alice');367    const collectionHelper = evmCollectionHelpers(web3, owner);368    const result = await collectionHelper.methods369      .createNonfungibleCollection('A', 'B', 'C')370      .send();371    const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);372    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);373  374    expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.true;375    expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;376    377    await collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send();378  379    expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.false;380    expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.true;381  });382383  itWeb3('change owner call fee', async ({web3, api, privateKeyWrapper}) => {384    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);385    const newOwner = privateKeyWrapper('//Alice');386    const collectionHelper = evmCollectionHelpers(web3, owner);387    const result = await collectionHelper.methods388      .createNonfungibleCollection('A', 'B', 'C')389      .send();390    const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);391    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);392393    const cost = await recordEthFee(api, owner, () => collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send());394    expect(cost < BigInt(0.2 * Number(UNIQUE)));395    expect(cost > 0);396  });397398  itWeb3('(!negative tests!) call setOwner by non owner', async ({api, web3, privateKeyWrapper}) => {399    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);400    const otherReceiver = await createEthAccountWithBalance(api, web3, privateKeyWrapper);401    const newOwner = privateKeyWrapper('//Alice');402    const collectionHelper = evmCollectionHelpers(web3, owner);403    const result = await collectionHelper.methods404      .createNonfungibleCollection('A', 'B', 'C')405      .send();406    const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);407    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);408  409    await expect(collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send({from: otherReceiver})).to.be.rejected;410    expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;411  });412});
after · tests/src/eth/collectionAdmin.test.ts
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.3// Unique Network is free software: you can redistribute it and/or modify4// it under the terms of the GNU General Public License as published by5// the Free Software Foundation, either version 3 of the License, or6// (at your option) any later version.7//8// Unique Network is distributed in the hope that it will be useful,9// but WITHOUT ANY WARRANTY; without even the implied warranty of10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the11// GNU General Public License for more details.1213// You should have received a copy of the GNU General Public License14// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1516import {expect} from 'chai';17import privateKey from '../substrate/privateKey';18import {UNIQUE} from '../util/helpers';19import {20  createEthAccount,21  createEthAccountWithBalance, 22  evmCollection, 23  evmCollectionHelpers, 24  getCollectionAddressFromResult, 25  itWeb3,26  recordEthFee,27} from './util/helpers';2829describe('Add collection admins', () => {30  itWeb3('Add admin by owner', async ({api, web3, privateKeyWrapper}) => {31    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);32    const collectionHelper = evmCollectionHelpers(web3, owner);33        34    const result = await collectionHelper.methods35      .createNonfungibleCollection('A', 'B', 'C')36      .send();37    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);3839    const newAdmin = createEthAccount(web3);40    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);41    await collectionEvm.methods.addCollectionAdmin(newAdmin).send();42    const adminList = await api.rpc.unique.adminlist(collectionId);43    expect(adminList[0].asEthereum.toString().toLocaleLowerCase())44      .to.be.eq(newAdmin.toLocaleLowerCase());45  });4647  // TODO: Temprorary off. Need refactor48  // itWeb3('Add substrate admin by owner', async ({api, web3, privateKeyWrapper}) => {49  //   const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);50  //   const collectionHelper = evmCollectionHelpers(web3, owner);51        52  //   const result = await collectionHelper.methods53  //     .createNonfungibleCollection('A', 'B', 'C')54  //     .send();55  //   const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);5657  //   const newAdmin = privateKeyWrapper('//Alice');58  //   const collectionEvm = evmCollection(web3, owner, collectionIdAddress);59  //   await collectionEvm.methods.addCollectionAdminSubstrate(newAdmin.addressRaw).send();6061  //   const adminList = await api.rpc.unique.adminlist(collectionId);62  //   expect(adminList[0].asSubstrate.toString().toLocaleLowerCase())63  //     .to.be.eq(newAdmin.address.toLocaleLowerCase());64  // });65  66  itWeb3('Verify owner or admin', async ({api, web3, privateKeyWrapper}) => {67    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);68    const collectionHelper = evmCollectionHelpers(web3, owner);69        70    const result = await collectionHelper.methods71      .createNonfungibleCollection('A', 'B', 'C')72      .send();73    const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);7475    const newAdmin = createEthAccount(web3);76    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);77    expect(await collectionEvm.methods.isOwnerOrAdmin(newAdmin).call()).to.be.false;78    await collectionEvm.methods.addCollectionAdmin(newAdmin).send();79    expect(await collectionEvm.methods.isOwnerOrAdmin(newAdmin).call()).to.be.true;80  });8182  itWeb3('(!negative tests!) Add admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {83    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);84    const collectionHelper = evmCollectionHelpers(web3, owner);85        86    const result = await collectionHelper.methods87      .createNonfungibleCollection('A', 'B', 'C')88      .send();89    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);9091    const admin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);92    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);93    await collectionEvm.methods.addCollectionAdmin(admin).send();94    95    const user = createEthAccount(web3);96    await expect(collectionEvm.methods.addCollectionAdmin(user).call({from: admin}))97      .to.be.rejectedWith('NoPermission');9899    const adminList = await api.rpc.unique.adminlist(collectionId);100    expect(adminList.length).to.be.eq(1);101    expect(adminList[0].asEthereum.toString().toLocaleLowerCase())102      .to.be.eq(admin.toLocaleLowerCase());103  });104105  itWeb3('(!negative tests!) Add admin by USER is not allowed', async ({api, web3, privateKeyWrapper}) => {106    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);107    const collectionHelper = evmCollectionHelpers(web3, owner);108        109    const result = await collectionHelper.methods110      .createNonfungibleCollection('A', 'B', 'C')111      .send();112    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);113114    const notAdmin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);115    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);116    117    const user = createEthAccount(web3);118    await expect(collectionEvm.methods.addCollectionAdmin(user).call({from: notAdmin}))119      .to.be.rejectedWith('NoPermission');120121    const adminList = await api.rpc.unique.adminlist(collectionId);122    expect(adminList.length).to.be.eq(0);123  });124125  // TODO: Temprorary off. Need refactor126  // itWeb3('(!negative tests!) Add substrate admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {127  //   const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);128  //   const collectionHelper = evmCollectionHelpers(web3, owner);129        130  //   const result = await collectionHelper.methods131  //     .createNonfungibleCollection('A', 'B', 'C')132  //     .send();133  //   const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);134135  //   const admin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);136  //   const collectionEvm = evmCollection(web3, owner, collectionIdAddress);137  //   await collectionEvm.methods.addCollectionAdmin(admin).send();138139  //   const notAdmin = privateKey('//Alice');140  //   await expect(collectionEvm.methods.addCollectionAdminSubstrate(notAdmin.addressRaw).call({from: admin}))141  //     .to.be.rejectedWith('NoPermission');142143  //   const adminList = await api.rpc.unique.adminlist(collectionId);144  //   expect(adminList.length).to.be.eq(1);145  //   expect(adminList[0].asEthereum.toString().toLocaleLowerCase())146  //     .to.be.eq(admin.toLocaleLowerCase());147  // });148  149  // TODO: Temprorary off. Need refactor150  // itWeb3('(!negative tests!) Add substrate admin by USER is not allowed', async ({api, web3, privateKeyWrapper}) => {151  //   const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);152  //   const collectionHelper = evmCollectionHelpers(web3, owner);153        154  //   const result = await collectionHelper.methods155  //     .createNonfungibleCollection('A', 'B', 'C')156  //     .send();157  //   const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);158159  //   const notAdmin0 = await createEthAccountWithBalance(api, web3, privateKeyWrapper);160  //   const collectionEvm = evmCollection(web3, owner, collectionIdAddress);161  //   const notAdmin1 = privateKey('//Alice');162  //   await expect(collectionEvm.methods.addCollectionAdminSubstrate(notAdmin1.addressRaw).call({from: notAdmin0}))163  //     .to.be.rejectedWith('NoPermission');164165  //   const adminList = await api.rpc.unique.adminlist(collectionId);166  //   expect(adminList.length).to.be.eq(0);167  // });168});169170describe('Remove collection admins', () => {171  itWeb3('Remove admin by owner', async ({api, web3, privateKeyWrapper}) => {172    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);173    const collectionHelper = evmCollectionHelpers(web3, owner);174        175    const result = await collectionHelper.methods176      .createNonfungibleCollection('A', 'B', 'C')177      .send();178    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);179180    const newAdmin = createEthAccount(web3);181    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);182    await collectionEvm.methods.addCollectionAdmin(newAdmin).send();183    {184      const adminList = await api.rpc.unique.adminlist(collectionId);185      expect(adminList.length).to.be.eq(1);186      expect(adminList[0].asEthereum.toString().toLocaleLowerCase())187        .to.be.eq(newAdmin.toLocaleLowerCase());188    }189190    await collectionEvm.methods.removeCollectionAdmin(newAdmin).send();191    const adminList = await api.rpc.unique.adminlist(collectionId);192    expect(adminList.length).to.be.eq(0);193  });194195  // TODO: Temprorary off. Need refactor196  // itWeb3('Remove substrate admin by owner', async ({api, web3, privateKeyWrapper}) => {197  //   const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);198  //   const collectionHelper = evmCollectionHelpers(web3, owner);199        200  //   const result = await collectionHelper.methods201  //     .createNonfungibleCollection('A', 'B', 'C')202  //     .send();203  //   const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);204205  //   const newAdmin = privateKeyWrapper('//Alice');206  //   const collectionEvm = evmCollection(web3, owner, collectionIdAddress);207  //   await collectionEvm.methods.addCollectionAdminSubstrate(newAdmin.addressRaw).send();208  //   {209  //     const adminList = await api.rpc.unique.adminlist(collectionId);210  //     expect(adminList[0].asSubstrate.toString().toLocaleLowerCase())211  //       .to.be.eq(newAdmin.address.toLocaleLowerCase());212  //   }213    214  //   await collectionEvm.methods.removeCollectionAdminSubstrate(newAdmin.addressRaw).send();215  //   const adminList = await api.rpc.unique.adminlist(collectionId);216  //   expect(adminList.length).to.be.eq(0);217  // });218219  itWeb3('(!negative tests!) Remove admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {220    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);221    const collectionHelper = evmCollectionHelpers(web3, owner);222        223    const result = await collectionHelper.methods224      .createNonfungibleCollection('A', 'B', 'C')225      .send();226    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);227228    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);229230    const admin0 = await createEthAccountWithBalance(api, web3, privateKeyWrapper);231    await collectionEvm.methods.addCollectionAdmin(admin0).send();232    const admin1 = createEthAccount(web3);233    await collectionEvm.methods.addCollectionAdmin(admin1).send();234235    await expect(collectionEvm.methods.removeCollectionAdmin(admin1).call({from: admin0}))236      .to.be.rejectedWith('NoPermission');237    {238      const adminList = await api.rpc.unique.adminlist(collectionId);239      expect(adminList.length).to.be.eq(2);240      expect(adminList.toString().toLocaleLowerCase())241        .to.be.deep.contains(admin0.toLocaleLowerCase())242        .to.be.deep.contains(admin1.toLocaleLowerCase());243    }244  });245246  itWeb3('(!negative tests!) Remove admin by USER is not allowed', async ({api, web3, privateKeyWrapper}) => {247    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);248    const collectionHelper = evmCollectionHelpers(web3, owner);249        250    const result = await collectionHelper.methods251      .createNonfungibleCollection('A', 'B', 'C')252      .send();253    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);254255    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);256257    const admin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);258    await collectionEvm.methods.addCollectionAdmin(admin).send();259    const notAdmin = createEthAccount(web3);260261    await expect(collectionEvm.methods.removeCollectionAdmin(admin).call({from: notAdmin}))262      .to.be.rejectedWith('NoPermission');263    {264      const adminList = await api.rpc.unique.adminlist(collectionId);265      expect(adminList[0].asEthereum.toString().toLocaleLowerCase())266        .to.be.eq(admin.toLocaleLowerCase());267      expect(adminList.length).to.be.eq(1);268    }269  });270271  // TODO: Temprorary off. Need refactor272  // itWeb3('(!negative tests!) Remove substrate admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {273  //   const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);274  //   const collectionHelper = evmCollectionHelpers(web3, owner);275        276  //   const result = await collectionHelper.methods277  //     .createNonfungibleCollection('A', 'B', 'C')278  //     .send();279  //   const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);280281  //   const adminSub = privateKeyWrapper('//Alice');282  //   const collectionEvm = evmCollection(web3, owner, collectionIdAddress);283  //   await collectionEvm.methods.addCollectionAdminSubstrate(adminSub.addressRaw).send();284  //   const adminEth = await createEthAccountWithBalance(api, web3, privateKeyWrapper);285  //   await collectionEvm.methods.addCollectionAdmin(adminEth).send();286287  //   await expect(collectionEvm.methods.removeCollectionAdminSubstrate(adminSub.addressRaw).call({from: adminEth}))288  //     .to.be.rejectedWith('NoPermission');289290  //   const adminList = await api.rpc.unique.adminlist(collectionId);291  //   expect(adminList.length).to.be.eq(2);292  //   expect(adminList.toString().toLocaleLowerCase())293  //     .to.be.deep.contains(adminSub.address.toLocaleLowerCase())294  //     .to.be.deep.contains(adminEth.toLocaleLowerCase());295  // });296297  // TODO: Temprorary off. Need refactor298  // itWeb3('(!negative tests!) Remove substrate admin by USER is not allowed', async ({api, web3, privateKeyWrapper}) => {299  //   const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);300  //   const collectionHelper = evmCollectionHelpers(web3, owner);301        302  //   const result = await collectionHelper.methods303  //     .createNonfungibleCollection('A', 'B', 'C')304  //     .send();305  //   const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);306307  //   const adminSub = privateKeyWrapper('//Alice');308  //   const collectionEvm = evmCollection(web3, owner, collectionIdAddress);309  //   await collectionEvm.methods.addCollectionAdminSubstrate(adminSub.addressRaw).send();310  //   const notAdminEth = await createEthAccountWithBalance(api, web3, privateKeyWrapper);311312  //   await expect(collectionEvm.methods.removeCollectionAdminSubstrate(adminSub.addressRaw).call({from: notAdminEth}))313  //     .to.be.rejectedWith('NoPermission');314315  //   const adminList = await api.rpc.unique.adminlist(collectionId);316  //   expect(adminList.length).to.be.eq(1);317  //   expect(adminList[0].asSubstrate.toString().toLocaleLowerCase())318  //     .to.be.eq(adminSub.address.toLocaleLowerCase());319  // });320});321322describe('Change owner tests', () => {323  itWeb3('Change owner', async ({api, web3, privateKeyWrapper}) => {324    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);325    const newOwner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);326    const collectionHelper = evmCollectionHelpers(web3, owner);327    const result = await collectionHelper.methods328      .createNonfungibleCollection('A', 'B', 'C')329      .send();330    const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);331    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);332  333    await collectionEvm.methods.setOwner(newOwner).send();334  335    expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.false;336    expect(await collectionEvm.methods.isOwnerOrAdmin(newOwner).call()).to.be.true;337  });338339  itWeb3('change owner call fee', async ({web3, api, privateKeyWrapper}) => {340    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);341    const newOwner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);342    const collectionHelper = evmCollectionHelpers(web3, owner);343    const result = await collectionHelper.methods344      .createNonfungibleCollection('A', 'B', 'C')345      .send();346    const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);347    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);348349    const cost = await recordEthFee(api, owner, () => collectionEvm.methods.setOwner(newOwner).send());350    expect(cost < BigInt(0.2 * Number(UNIQUE)));351    expect(cost > 0);352  });353354  itWeb3('(!negative tests!) call setOwner by non owner', async ({api, web3, privateKeyWrapper}) => {355    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);356    const newOwner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);357    const collectionHelper = evmCollectionHelpers(web3, owner);358    const result = await collectionHelper.methods359      .createNonfungibleCollection('A', 'B', 'C')360      .send();361    const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);362    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);363  364    await expect(collectionEvm.methods.setOwner(newOwner).send({from: newOwner})).to.be.rejected;365    expect(await collectionEvm.methods.isOwnerOrAdmin(newOwner).call()).to.be.false;366  });367});368369describe('Change substrate owner tests', () => {370  // TODO: Temprorary off. Need refactor371  // itWeb3('Change owner', async ({api, web3, privateKeyWrapper}) => {372  //   const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);373  //   const newOwner = privateKeyWrapper('//Alice');374  //   const collectionHelper = evmCollectionHelpers(web3, owner);375  //   const result = await collectionHelper.methods376  //     .createNonfungibleCollection('A', 'B', 'C')377  //     .send();378  //   const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);379  //   const collectionEvm = evmCollection(web3, owner, collectionIdAddress);380  381  //   expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.true;382  //   expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;383    384  //   await collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send();385  386  //   expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.false;387  //   expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.true;388  // });389390  // TODO: Temprorary off. Need refactor391  // itWeb3('change owner call fee', async ({web3, api, privateKeyWrapper}) => {392  //   const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);393  //   const newOwner = privateKeyWrapper('//Alice');394  //   const collectionHelper = evmCollectionHelpers(web3, owner);395  //   const result = await collectionHelper.methods396  //     .createNonfungibleCollection('A', 'B', 'C')397  //     .send();398  //   const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);399  //   const collectionEvm = evmCollection(web3, owner, collectionIdAddress);400401  //   const cost = await recordEthFee(api, owner, () => collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send());402  //   expect(cost < BigInt(0.2 * Number(UNIQUE)));403  //   expect(cost > 0);404  // });405406  // TODO: Temprorary off. Need refactor407  // itWeb3('(!negative tests!) call setOwner by non owner', async ({api, web3, privateKeyWrapper}) => {408  //   const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);409  //   const otherReceiver = await createEthAccountWithBalance(api, web3, privateKeyWrapper);410  //   const newOwner = privateKeyWrapper('//Alice');411  //   const collectionHelper = evmCollectionHelpers(web3, owner);412  //   const result = await collectionHelper.methods413  //     .createNonfungibleCollection('A', 'B', 'C')414  //     .send();415  //   const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);416  //   const collectionEvm = evmCollection(web3, owner, collectionIdAddress);417  418  //   await expect(collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send({from: otherReceiver})).to.be.rejected;419  //   expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;420  // });421});
modifiedtests/src/eth/collectionSponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/eth/collectionSponsoring.test.ts
+++ b/tests/src/eth/collectionSponsoring.test.ts
@@ -40,25 +40,26 @@
     ]);
   });
 
-  itWeb3('Set substrate sponsor', async ({api, web3, privateKeyWrapper}) => {
-    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
-    const collectionHelpers = evmCollectionHelpers(web3, owner);
-    let result = await collectionHelpers.methods.createNonfungibleCollection('Sponsor collection', '1', '1').send();
-    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
-    const sponsor = privateKeyWrapper('//Alice');
-    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+  // TODO: Temprorary off. Need refactor
+  // itWeb3('Set substrate sponsor', async ({api, web3, privateKeyWrapper}) => {
+  //   const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+  //   const collectionHelpers = evmCollectionHelpers(web3, owner);
+  //   let result = await collectionHelpers.methods.createNonfungibleCollection('Sponsor collection', '1', '1').send();
+  //   const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
+  //   const sponsor = privateKeyWrapper('//Alice');
+  //   const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
 
-    expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
-    result = await collectionEvm.methods.setCollectionSponsorSubstrate(sponsor.addressRaw).send({from: owner});
-    expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.true;
+  //   expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
+  //   result = await collectionEvm.methods.setCollectionSponsorSubstrate(sponsor.addressRaw).send({from: owner});
+  //   expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.true;
     
-    const confirmTx = await api.tx.unique.confirmSponsorship(collectionId);
-    await submitTransactionAsync(sponsor, confirmTx);
-    expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
+  //   const confirmTx = await api.tx.unique.confirmSponsorship(collectionId);
+  //   await submitTransactionAsync(sponsor, confirmTx);
+  //   expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
     
-    const sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner});
-    expect(bigIntToSub(api, BigInt(sponsorTuple[1]))).to.be.eq(sponsor.address);
-  });
+  //   const sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner});
+  //   expect(bigIntToSub(api, BigInt(sponsorTuple[1]))).to.be.eq(sponsor.address);
+  // });
 
   itWeb3('Remove sponsor', async ({api, web3, privateKeyWrapper}) => {
     const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
@@ -150,60 +151,61 @@
     }
   });
 
-  itWeb3('Sponsoring collection from substrate address via access list', async ({api, web3, privateKeyWrapper}) => {
-    const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
-    const collectionHelpers = evmCollectionHelpers(web3, owner);
-    const result = await collectionHelpers.methods.createNonfungibleCollection('Sponsor collection', '1', '1').send();
-    const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
-    const sponsor = privateKeyWrapper('//Alice');
-    const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
+  // TODO: Temprorary off. Need refactor
+  // itWeb3('Sponsoring collection from substrate address via access list', async ({api, web3, privateKeyWrapper}) => {
+  //   const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
+  //   const collectionHelpers = evmCollectionHelpers(web3, owner);
+  //   const result = await collectionHelpers.methods.createNonfungibleCollection('Sponsor collection', '1', '1').send();
+  //   const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
+  //   const sponsor = privateKeyWrapper('//Alice');
+  //   const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
 
-    await collectionEvm.methods.setCollectionSponsorSubstrate(sponsor.addressRaw).send({from: owner});
+  //   await collectionEvm.methods.setCollectionSponsorSubstrate(sponsor.addressRaw).send({from: owner});
     
-    const confirmTx = await api.tx.unique.confirmSponsorship(collectionId);
-    await submitTransactionAsync(sponsor, confirmTx);
+  //   const confirmTx = await api.tx.unique.confirmSponsorship(collectionId);
+  //   await submitTransactionAsync(sponsor, confirmTx);
     
-    const user = createEthAccount(web3);
-    const nextTokenId = await collectionEvm.methods.nextTokenId().call();
-    expect(nextTokenId).to.be.equal('1');
+  //   const user = createEthAccount(web3);
+  //   const nextTokenId = await collectionEvm.methods.nextTokenId().call();
+  //   expect(nextTokenId).to.be.equal('1');
 
-    await collectionEvm.methods.setCollectionAccess(1 /*'AllowList'*/).send({from: owner});
-    await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner});
-    await collectionEvm.methods.setCollectionMintMode(true).send({from: owner});
+  //   await collectionEvm.methods.setCollectionAccess(1 /*'AllowList'*/).send({from: owner});
+  //   await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner});
+  //   await collectionEvm.methods.setCollectionMintMode(true).send({from: owner});
 
-    const ownerBalanceBefore = await ethBalanceViaSub(api, owner);
-    const sponsorBalanceBefore = (await getBalance(api, [sponsor.address]))[0];
+  //   const ownerBalanceBefore = await ethBalanceViaSub(api, owner);
+  //   const sponsorBalanceBefore = (await getBalance(api, [sponsor.address]))[0];
 
-    {
-      const nextTokenId = await collectionEvm.methods.nextTokenId().call();
-      expect(nextTokenId).to.be.equal('1');
-      const result = await collectionEvm.methods.mintWithTokenURI(
-        user,
-        nextTokenId,
-        'Test URI',
-      ).send({from: user});
-      const events = normalizeEvents(result.events);
+  //   {
+  //     const nextTokenId = await collectionEvm.methods.nextTokenId().call();
+  //     expect(nextTokenId).to.be.equal('1');
+  //     const result = await collectionEvm.methods.mintWithTokenURI(
+  //       user,
+  //       nextTokenId,
+  //       'Test URI',
+  //     ).send({from: user});
+  //     const events = normalizeEvents(result.events);
 
-      expect(events).to.be.deep.equal([
-        {
-          address: collectionIdAddress,
-          event: 'Transfer',
-          args: {
-            from: '0x0000000000000000000000000000000000000000',
-            to: user,
-            tokenId: nextTokenId,
-          },
-        },
-      ]);
+  //     expect(events).to.be.deep.equal([
+  //       {
+  //         address: collectionIdAddress,
+  //         event: 'Transfer',
+  //         args: {
+  //           from: '0x0000000000000000000000000000000000000000',
+  //           to: user,
+  //           tokenId: nextTokenId,
+  //         },
+  //       },
+  //     ]);
 
-      const ownerBalanceAfter = await ethBalanceViaSub(api, owner);
-      const sponsorBalanceAfter = (await getBalance(api, [sponsor.address]))[0];
+  //     const ownerBalanceAfter = await ethBalanceViaSub(api, owner);
+  //     const sponsorBalanceAfter = (await getBalance(api, [sponsor.address]))[0];
 
-      expect(await collectionEvm.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');
-      expect(ownerBalanceBefore).to.be.eq(ownerBalanceAfter);
-      expect(sponsorBalanceBefore > sponsorBalanceAfter).to.be.true;
-    }
-  });
+  //     expect(await collectionEvm.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');
+  //     expect(ownerBalanceBefore).to.be.eq(ownerBalanceAfter);
+  //     expect(sponsorBalanceBefore > sponsorBalanceAfter).to.be.true;
+  //   }
+  // });
 
   itWeb3('Check that transaction via EVM spend money from sponsor address', async ({api, web3, privateKeyWrapper}) => {
     const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
modifiedtests/src/eth/fungibleAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/fungibleAbi.json
+++ b/tests/src/eth/fungibleAbi.json
@@ -60,27 +60,9 @@
   },
   {
     "inputs": [
-      { "internalType": "uint256", "name": "newAdmin", "type": "uint256" }
-    ],
-    "name": "addCollectionAdminSubstrate",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
       { "internalType": "address", "name": "user", "type": "address" }
     ],
     "name": "addToCollectionAllowList",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "user", "type": "uint256" }
-    ],
-    "name": "addToCollectionAllowListSubstrate",
     "outputs": [],
     "stateMutability": "nonpayable",
     "type": "function"
@@ -214,15 +196,6 @@
       { "internalType": "address", "name": "user", "type": "address" }
     ],
     "name": "isOwnerOrAdmin",
-    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
-    "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "user", "type": "uint256" }
-    ],
-    "name": "isOwnerOrAdminSubstrate",
     "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
     "stateMutability": "view",
     "type": "function"
@@ -271,15 +244,6 @@
     "type": "function"
   },
   {
-    "inputs": [
-      { "internalType": "uint256", "name": "admin", "type": "uint256" }
-    ],
-    "name": "removeCollectionAdminSubstrate",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
     "inputs": [],
     "name": "removeCollectionSponsor",
     "outputs": [],
@@ -291,15 +255,6 @@
       { "internalType": "address", "name": "user", "type": "address" }
     ],
     "name": "removeFromCollectionAllowList",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "user", "type": "uint256" }
-    ],
-    "name": "removeFromCollectionAllowListSubstrate",
     "outputs": [],
     "stateMutability": "nonpayable",
     "type": "function"
@@ -380,27 +335,9 @@
   },
   {
     "inputs": [
-      { "internalType": "uint256", "name": "sponsor", "type": "uint256" }
-    ],
-    "name": "setCollectionSponsorSubstrate",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
       { "internalType": "address", "name": "newOwner", "type": "address" }
     ],
     "name": "setOwner",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "newOwner", "type": "uint256" }
-    ],
-    "name": "setOwnerSubstrate",
     "outputs": [],
     "stateMutability": "nonpayable",
     "type": "function"
modifiedtests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/nonFungibleAbi.json
+++ b/tests/src/eth/nonFungibleAbi.json
@@ -91,27 +91,9 @@
   },
   {
     "inputs": [
-      { "internalType": "uint256", "name": "newAdmin", "type": "uint256" }
-    ],
-    "name": "addCollectionAdminSubstrate",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
       { "internalType": "address", "name": "user", "type": "address" }
     ],
     "name": "addToCollectionAllowList",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "user", "type": "uint256" }
-    ],
-    "name": "addToCollectionAllowListSubstrate",
     "outputs": [],
     "stateMutability": "nonpayable",
     "type": "function"
@@ -273,15 +255,6 @@
       { "internalType": "address", "name": "user", "type": "address" }
     ],
     "name": "isOwnerOrAdmin",
-    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
-    "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "user", "type": "uint256" }
-    ],
-    "name": "isOwnerOrAdminSubstrate",
     "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
     "stateMutability": "view",
     "type": "function"
@@ -385,15 +358,6 @@
     "type": "function"
   },
   {
-    "inputs": [
-      { "internalType": "uint256", "name": "admin", "type": "uint256" }
-    ],
-    "name": "removeCollectionAdminSubstrate",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
     "inputs": [],
     "name": "removeCollectionSponsor",
     "outputs": [],
@@ -405,15 +369,6 @@
       { "internalType": "address", "name": "user", "type": "address" }
     ],
     "name": "removeFromCollectionAllowList",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "user", "type": "uint256" }
-    ],
-    "name": "removeFromCollectionAllowListSubstrate",
     "outputs": [],
     "stateMutability": "nonpayable",
     "type": "function"
@@ -527,27 +482,9 @@
   },
   {
     "inputs": [
-      { "internalType": "uint256", "name": "sponsor", "type": "uint256" }
-    ],
-    "name": "setCollectionSponsorSubstrate",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
       { "internalType": "address", "name": "newOwner", "type": "address" }
     ],
     "name": "setOwner",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "newOwner", "type": "uint256" }
-    ],
-    "name": "setOwnerSubstrate",
     "outputs": [],
     "stateMutability": "nonpayable",
     "type": "function"
modifiedtests/src/eth/reFungibleAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/reFungibleAbi.json
+++ b/tests/src/eth/reFungibleAbi.json
@@ -91,27 +91,9 @@
   },
   {
     "inputs": [
-      { "internalType": "uint256", "name": "newAdmin", "type": "uint256" }
-    ],
-    "name": "addCollectionAdminSubstrate",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
       { "internalType": "address", "name": "user", "type": "address" }
     ],
     "name": "addToCollectionAllowList",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "user", "type": "uint256" }
-    ],
-    "name": "addToCollectionAllowListSubstrate",
     "outputs": [],
     "stateMutability": "nonpayable",
     "type": "function"
@@ -273,15 +255,6 @@
       { "internalType": "address", "name": "user", "type": "address" }
     ],
     "name": "isOwnerOrAdmin",
-    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
-    "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "user", "type": "uint256" }
-    ],
-    "name": "isOwnerOrAdminSubstrate",
     "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
     "stateMutability": "view",
     "type": "function"
@@ -385,15 +358,6 @@
     "type": "function"
   },
   {
-    "inputs": [
-      { "internalType": "uint256", "name": "admin", "type": "uint256" }
-    ],
-    "name": "removeCollectionAdminSubstrate",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
     "inputs": [],
     "name": "removeCollectionSponsor",
     "outputs": [],
@@ -405,15 +369,6 @@
       { "internalType": "address", "name": "user", "type": "address" }
     ],
     "name": "removeFromCollectionAllowList",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "user", "type": "uint256" }
-    ],
-    "name": "removeFromCollectionAllowListSubstrate",
     "outputs": [],
     "stateMutability": "nonpayable",
     "type": "function"
@@ -527,27 +482,9 @@
   },
   {
     "inputs": [
-      { "internalType": "uint256", "name": "sponsor", "type": "uint256" }
-    ],
-    "name": "setCollectionSponsorSubstrate",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
       { "internalType": "address", "name": "newOwner", "type": "address" }
     ],
     "name": "setOwner",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "newOwner", "type": "uint256" }
-    ],
-    "name": "setOwnerSubstrate",
     "outputs": [],
     "stateMutability": "nonpayable",
     "type": "function"