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

difftreelog

chore code review requests

Grigoriy Simonov2022-10-12parent: #0649e61.patch.diff
in: master

20 files changed

modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -34,15 +34,14 @@
 use sp_std::vec::Vec;
 use pallet_common::{
 	erc::{
-		CommonEvmHandler, PrecompileResult, CollectionCall,
-		static_property::{key, value as property_value},
+		CommonEvmHandler, PrecompileResult, CollectionCall, static_property::key,
+		static_property::value,
 	},
 	CollectionHandle, CollectionPropertyPermissions,
 };
 use pallet_evm::{account::CrossAccountId, PrecompileHandle};
 use pallet_evm_coder_substrate::call;
 use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};
-use alloc::string::ToString;
 
 use crate::{
 	AccountBalance, Config, CreateItemData, NonfungibleHandle, Pallet, TokenData, TokensMinted,
@@ -226,37 +225,44 @@
 	/// @return token's const_metadata
 	#[solidity(rename_selector = "tokenURI")]
 	fn token_uri(&self, token_id: uint256) -> Result<string> {
+		if !self.supports_metadata() {
+			return Ok("".into());
+		}
+
 		let token_id_u32: u32 = token_id.try_into().map_err(|_| "token id overflow")?;
 
-		if let Ok(url) = get_token_property(self, token_id_u32, &key::url()) {
-			if !url.is_empty() {
-				return Ok(url);
+		match get_token_property(self, token_id_u32, &key::url()).as_deref() {
+			Err(_) | Ok("") => (),
+			Ok(url) => {
+				return Ok(url.into());
 			}
-		} else if !self.supports_metadata() {
-			return Err("tokenURI not set".into());
-		}
+		};
 
-		if let Some(base_uri) =
+		let base_uri =
 			pallet_common::Pallet::<T>::get_collection_property(self.id, &key::base_uri())
-		{
-			if !base_uri.is_empty() {
-				let base_uri = string::from_utf8(base_uri.into_inner()).map_err(|e| {
+				.map(BoundedVec::into_inner)
+				.map(string::from_utf8)
+				.transpose()
+				.map_err(|e| {
 					Error::Revert(alloc::format!(
 						"Can not convert value \"baseURI\" to string with error \"{}\"",
 						e
 					))
 				})?;
-				if let Ok(suffix) = get_token_property(self, token_id_u32, &key::suffix()) {
-					if !suffix.is_empty() {
-						return Ok(base_uri + suffix.as_str());
-					}
-				}
 
-				return Ok(base_uri);
+		let base_uri = match base_uri.as_deref() {
+			None | Some("") => {
+				return Ok("".into());
 			}
-		}
+			Some(base_uri) => base_uri.into(),
+		};
 
-		Ok("".into())
+		Ok(
+			match get_token_property(self, token_id_u32, &key::suffix()).as_deref() {
+				Err(_) | Ok("") => base_uri,
+				Ok(suffix) => base_uri + suffix,
+			},
+		)
 	}
 }
 
@@ -706,17 +712,29 @@
 	}
 }
 
+impl<T: Config> NonfungibleHandle<T> {
+	pub fn supports_metadata(&self) -> bool {
+		if let Some(erc721_metadata) =
+			pallet_common::Pallet::<T>::get_collection_property(self.id, &key::erc721_metadata())
+		{
+			*erc721_metadata.into_inner() == *value::ERC721_METADATA_SUPPORTED
+		} else {
+			false
+		}
+	}
+}
+
 #[solidity_interface(
 	name = UniqueNFT,
 	is(
 		ERC721,
-		ERC721Metadata(if(this.supports_metadata())),
 		ERC721Enumerable,
 		ERC721UniqueExtensions,
 		ERC721Mintable,
 		ERC721Burnable,
 		Collection(via(common_mut returns CollectionHandle<T>)),
 		TokenProperties,
+		ERC721Metadata(if(this.supports_metadata())),
 	)
 )]
 impl<T: Config> NonfungibleHandle<T> where T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]> {}
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -297,18 +297,6 @@
 	}
 }
 
-impl<T: Config> NonfungibleHandle<T> {
-	pub fn supports_metadata(&self) -> bool {
-		if let Some(erc721_metadata) =
-			pallet_common::Pallet::<T>::get_collection_property(self.id, &key::erc721_metadata())
-		{
-			*erc721_metadata.into_inner() == *value::ERC721_METADATA_SUPPORTED
-		} else {
-			false
-		}
-	}
-}
-
 impl<T: Config> WithRecorder<T> for NonfungibleHandle<T> {
 	fn recorder(&self) -> &SubstrateRecorder<T> {
 		self.0.recorder()
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
@@ -17,6 +17,47 @@
 	}
 }
 
+/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
+/// @dev See https://eips.ethereum.org/EIPS/eip-721
+/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
+contract ERC721Metadata is Dummy, ERC165 {
+	/// @notice A descriptive name for a collection of NFTs in this contract
+	/// @dev EVM selector for this function is: 0x06fdde03,
+	///  or in textual repr: name()
+	function name() public view returns (string memory) {
+		require(false, stub_error);
+		dummy;
+		return "";
+	}
+
+	/// @notice An abbreviated name for NFTs in this contract
+	/// @dev EVM selector for this function is: 0x95d89b41,
+	///  or in textual repr: symbol()
+	function symbol() public view returns (string memory) {
+		require(false, stub_error);
+		dummy;
+		return "";
+	}
+
+	/// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
+	///
+	/// @dev If the token has a `url` property and it is not empty, it is returned.
+	///  Else If the collection does not have a property with key `schemaName` or its value is not equal to `ERC721Metadata`, it return an error `tokenURI not set`.
+	///  If the collection property `baseURI` is empty or absent, return "" (empty string)
+	///  otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
+	///  otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
+	///
+	/// @return token's const_metadata
+	/// @dev EVM selector for this function is: 0xc87b56dd,
+	///  or in textual repr: tokenURI(uint256)
+	function tokenURI(uint256 tokenId) public view returns (string memory) {
+		require(false, stub_error);
+		tokenId;
+		dummy;
+		return "";
+	}
+}
+
 /// @title A contract that allows to set and delete token properties and change token property permissions.
 /// @dev the ERC-165 identifier for this interface is 0x41369377
 contract TokenProperties is Dummy, ERC165 {
@@ -177,10 +218,10 @@
 	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
 	/// @dev EVM selector for this function is: 0x6ec0a9f1,
 	///  or in textual repr: collectionSponsor()
-	function collectionSponsor() public view returns (Tuple17 memory) {
+	function collectionSponsor() public view returns (Tuple15 memory) {
 		require(false, stub_error);
 		dummy;
-		return Tuple17(0x0000000000000000000000000000000000000000, 0);
+		return Tuple15(0x0000000000000000000000000000000000000000, 0);
 	}
 
 	/// Set limits for the collection.
@@ -359,10 +400,10 @@
 	/// If address is canonical then substrate mirror is zero and vice versa.
 	/// @dev EVM selector for this function is: 0xdf727d3b,
 	///  or in textual repr: collectionOwner()
-	function collectionOwner() public view returns (Tuple17 memory) {
+	function collectionOwner() public view returns (Tuple15 memory) {
 		require(false, stub_error);
 		dummy;
-		return Tuple17(0x0000000000000000000000000000000000000000, 0);
+		return Tuple15(0x0000000000000000000000000000000000000000, 0);
 	}
 
 	/// Changes collection owner to another account
@@ -379,7 +420,7 @@
 }
 
 /// @dev anonymous struct
-struct Tuple17 {
+struct Tuple15 {
 	address field_0;
 	uint256 field_1;
 }
@@ -525,7 +566,7 @@
 	/// @param tokens array of pairs of token ID and token URI for minted tokens
 	/// @dev EVM selector for this function is: 0x36543006,
 	///  or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
-	function mintBulkWithTokenURI(address to, Tuple8[] memory tokens) public returns (bool) {
+	function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) public returns (bool) {
 		require(false, stub_error);
 		to;
 		tokens;
@@ -535,7 +576,7 @@
 }
 
 /// @dev anonymous struct
-struct Tuple8 {
+struct Tuple6 {
 	uint256 field_0;
 	string field_1;
 }
@@ -577,48 +618,7 @@
 		require(false, stub_error);
 		dummy;
 		return 0;
-	}
-}
-
-/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
-/// @dev See https://eips.ethereum.org/EIPS/eip-721
-/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
-contract ERC721Metadata is Dummy, ERC165 {
-	/// @notice A descriptive name for a collection of NFTs in this contract
-	/// @dev EVM selector for this function is: 0x06fdde03,
-	///  or in textual repr: name()
-	function name() public view returns (string memory) {
-		require(false, stub_error);
-		dummy;
-		return "";
-	}
-
-	/// @notice An abbreviated name for NFTs in this contract
-	/// @dev EVM selector for this function is: 0x95d89b41,
-	///  or in textual repr: symbol()
-	function symbol() public view returns (string memory) {
-		require(false, stub_error);
-		dummy;
-		return "";
 	}
-
-	/// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
-	///
-	/// @dev If the token has a `url` property and it is not empty, it is returned.
-	///  Else If the collection does not have a property with key `schemaName` or its value is not equal to `ERC721Metadata`, it return an error `tokenURI not set`.
-	///  If the collection property `baseURI` is empty or absent, return "" (empty string)
-	///  otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
-	///  otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
-	///
-	/// @return token's const_metadata
-	/// @dev EVM selector for this function is: 0xc87b56dd,
-	///  or in textual repr: tokenURI(uint256)
-	function tokenURI(uint256 tokenId) public view returns (string memory) {
-		require(false, stub_error);
-		tokenId;
-		dummy;
-		return "";
-	}
 }
 
 /// @dev inlined interface
@@ -766,11 +766,11 @@
 	Dummy,
 	ERC165,
 	ERC721,
-	ERC721Metadata,
 	ERC721Enumerable,
 	ERC721UniqueExtensions,
 	ERC721Mintable,
 	ERC721Burnable,
 	Collection,
-	TokenProperties
+	TokenProperties,
+	ERC721Metadata
 {}
modifiedpallets/refungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -21,19 +21,15 @@
 
 extern crate alloc;
 
-use alloc::string::ToString;
 use core::{
 	char::{REPLACEMENT_CHARACTER, decode_utf16},
 	convert::TryInto,
 };
 use evm_coder::{ToLog, execution::*, generate_stubgen, solidity, solidity_interface, types::*, weight};
-use frame_support::BoundedBTreeMap;
+use frame_support::{BoundedBTreeMap, BoundedVec};
 use pallet_common::{
 	CollectionHandle, CollectionPropertyPermissions,
-	erc::{
-		CommonEvmHandler, CollectionCall,
-		static_property::{key, value as property_value},
-	},
+	erc::{CommonEvmHandler, CollectionCall, static_property::key, static_property::value},
 };
 use pallet_evm::{account::CrossAccountId, PrecompileHandle};
 use pallet_evm_coder_substrate::{call, dispatch_to_evm};
@@ -222,37 +218,44 @@
 	/// @return token's const_metadata
 	#[solidity(rename_selector = "tokenURI")]
 	fn token_uri(&self, token_id: uint256) -> Result<string> {
+		if !self.supports_metadata() {
+			return Ok("".into());
+		}
+
 		let token_id_u32: u32 = token_id.try_into().map_err(|_| "token id overflow")?;
 
-		if let Ok(url) = get_token_property(self, token_id_u32, &key::url()) {
-			if !url.is_empty() {
-				return Ok(url);
+		match get_token_property(self, token_id_u32, &key::url()).as_deref() {
+			Err(_) | Ok("") => (),
+			Ok(url) => {
+				return Ok(url.into());
 			}
-		} else if !self.supports_metadata() {
-			return Err("tokenURI not set".into());
-		}
+		};
 
-		if let Some(base_uri) =
+		let base_uri =
 			pallet_common::Pallet::<T>::get_collection_property(self.id, &key::base_uri())
-		{
-			if !base_uri.is_empty() {
-				let base_uri = string::from_utf8(base_uri.into_inner()).map_err(|e| {
+				.map(BoundedVec::into_inner)
+				.map(string::from_utf8)
+				.transpose()
+				.map_err(|e| {
 					Error::Revert(alloc::format!(
 						"Can not convert value \"baseURI\" to string with error \"{}\"",
 						e
 					))
 				})?;
-				if let Ok(suffix) = get_token_property(self, token_id_u32, &key::suffix()) {
-					if !suffix.is_empty() {
-						return Ok(base_uri + suffix.as_str());
-					}
-				}
 
-				return Ok(base_uri);
+		let base_uri = match base_uri.as_deref() {
+			None | Some("") => {
+				return Ok("".into());
 			}
-		}
+			Some(base_uri) => base_uri.into(),
+		};
 
-		Ok("".into())
+		Ok(
+			match get_token_property(self, token_id_u32, &key::suffix()).as_deref() {
+				Err(_) | Ok("") => base_uri,
+				Ok(suffix) => base_uri + suffix,
+			},
+		)
 	}
 }
 
@@ -765,17 +768,29 @@
 	}
 }
 
+impl<T: Config> RefungibleHandle<T> {
+	pub fn supports_metadata(&self) -> bool {
+		if let Some(erc721_metadata) =
+			pallet_common::Pallet::<T>::get_collection_property(self.id, &key::erc721_metadata())
+		{
+			*erc721_metadata.into_inner() == *value::ERC721_METADATA_SUPPORTED
+		} else {
+			false
+		}
+	}
+}
+
 #[solidity_interface(
 	name = UniqueRefungible,
 	is(
 		ERC721,
-		ERC721Metadata(if(this.supports_metadata())),
 		ERC721Enumerable,
 		ERC721UniqueExtensions,
 		ERC721Mintable,
 		ERC721Burnable,
 		Collection(via(common_mut returns CollectionHandle<T>)),
 		TokenProperties,
+		ERC721Metadata(if(this.supports_metadata())),
 	)
 )]
 impl<T: Config> RefungibleHandle<T> where T::AccountId: From<[u8; 32]> + AsRef<[u8; 32]> {}
modifiedpallets/refungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -304,18 +304,6 @@
 	}
 }
 
-impl<T: Config> RefungibleHandle<T> {
-	pub fn supports_metadata(&self) -> bool {
-		if let Some(erc721_metadata) =
-			pallet_common::Pallet::<T>::get_collection_property(self.id, &key::erc721_metadata())
-		{
-			*erc721_metadata.into_inner() == *value::ERC721_METADATA_SUPPORTED
-		} else {
-			false
-		}
-	}
-}
-
 impl<T: Config> Deref for RefungibleHandle<T> {
 	type Target = pallet_common::CollectionHandle<T>;
 
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
@@ -17,6 +17,45 @@
 	}
 }
 
+/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
+contract ERC721Metadata is Dummy, ERC165 {
+	/// @notice A descriptive name for a collection of RFTs in this contract
+	/// @dev EVM selector for this function is: 0x06fdde03,
+	///  or in textual repr: name()
+	function name() public view returns (string memory) {
+		require(false, stub_error);
+		dummy;
+		return "";
+	}
+
+	/// @notice An abbreviated name for RFTs in this contract
+	/// @dev EVM selector for this function is: 0x95d89b41,
+	///  or in textual repr: symbol()
+	function symbol() public view returns (string memory) {
+		require(false, stub_error);
+		dummy;
+		return "";
+	}
+
+	/// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
+	///
+	/// @dev If the token has a `url` property and it is not empty, it is returned.
+	///  Else If the collection does not have a property with key `schemaName` or its value is not equal to `ERC721Metadata`, it return an error `tokenURI not set`.
+	///  If the collection property `baseURI` is empty or absent, return "" (empty string)
+	///  otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
+	///  otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
+	///
+	/// @return token's const_metadata
+	/// @dev EVM selector for this function is: 0xc87b56dd,
+	///  or in textual repr: tokenURI(uint256)
+	function tokenURI(uint256 tokenId) public view returns (string memory) {
+		require(false, stub_error);
+		tokenId;
+		dummy;
+		return "";
+	}
+}
+
 /// @title A contract that allows to set and delete token properties and change token property permissions.
 /// @dev the ERC-165 identifier for this interface is 0x41369377
 contract TokenProperties is Dummy, ERC165 {
@@ -177,10 +216,10 @@
 	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
 	/// @dev EVM selector for this function is: 0x6ec0a9f1,
 	///  or in textual repr: collectionSponsor()
-	function collectionSponsor() public view returns (Tuple17 memory) {
+	function collectionSponsor() public view returns (Tuple15 memory) {
 		require(false, stub_error);
 		dummy;
-		return Tuple17(0x0000000000000000000000000000000000000000, 0);
+		return Tuple15(0x0000000000000000000000000000000000000000, 0);
 	}
 
 	/// Set limits for the collection.
@@ -359,10 +398,10 @@
 	/// If address is canonical then substrate mirror is zero and vice versa.
 	/// @dev EVM selector for this function is: 0xdf727d3b,
 	///  or in textual repr: collectionOwner()
-	function collectionOwner() public view returns (Tuple17 memory) {
+	function collectionOwner() public view returns (Tuple15 memory) {
 		require(false, stub_error);
 		dummy;
-		return Tuple17(0x0000000000000000000000000000000000000000, 0);
+		return Tuple15(0x0000000000000000000000000000000000000000, 0);
 	}
 
 	/// Changes collection owner to another account
@@ -379,7 +418,7 @@
 }
 
 /// @dev anonymous struct
-struct Tuple17 {
+struct Tuple15 {
 	address field_0;
 	uint256 field_1;
 }
@@ -527,7 +566,7 @@
 	/// @param tokens array of pairs of token ID and token URI for minted tokens
 	/// @dev EVM selector for this function is: 0x36543006,
 	///  or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
-	function mintBulkWithTokenURI(address to, Tuple8[] memory tokens) public returns (bool) {
+	function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) public returns (bool) {
 		require(false, stub_error);
 		to;
 		tokens;
@@ -549,7 +588,7 @@
 }
 
 /// @dev anonymous struct
-struct Tuple8 {
+struct Tuple6 {
 	uint256 field_0;
 	string field_1;
 }
@@ -591,45 +630,6 @@
 		require(false, stub_error);
 		dummy;
 		return 0;
-	}
-}
-
-/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
-contract ERC721Metadata is Dummy, ERC165 {
-	/// @notice A descriptive name for a collection of RFTs in this contract
-	/// @dev EVM selector for this function is: 0x06fdde03,
-	///  or in textual repr: name()
-	function name() public view returns (string memory) {
-		require(false, stub_error);
-		dummy;
-		return "";
-	}
-
-	/// @notice An abbreviated name for RFTs in this contract
-	/// @dev EVM selector for this function is: 0x95d89b41,
-	///  or in textual repr: symbol()
-	function symbol() public view returns (string memory) {
-		require(false, stub_error);
-		dummy;
-		return "";
-	}
-
-	/// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
-	///
-	/// @dev If the token has a `url` property and it is not empty, it is returned.
-	///  Else If the collection does not have a property with key `schemaName` or its value is not equal to `ERC721Metadata`, it return an error `tokenURI not set`.
-	///  If the collection property `baseURI` is empty or absent, return "" (empty string)
-	///  otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
-	///  otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
-	///
-	/// @return token's const_metadata
-	/// @dev EVM selector for this function is: 0xc87b56dd,
-	///  or in textual repr: tokenURI(uint256)
-	function tokenURI(uint256 tokenId) public view returns (string memory) {
-		require(false, stub_error);
-		tokenId;
-		dummy;
-		return "";
 	}
 }
 
@@ -776,11 +776,11 @@
 	Dummy,
 	ERC165,
 	ERC721,
-	ERC721Metadata,
 	ERC721Enumerable,
 	ERC721UniqueExtensions,
 	ERC721Mintable,
 	ERC721Burnable,
 	Collection,
-	TokenProperties
+	TokenProperties,
+	ERC721Metadata
 {}
modifiedpallets/unique/src/eth/mod.rsdiffbeforeafterboth
--- a/pallets/unique/src/eth/mod.rs
+++ b/pallets/unique/src/eth/mod.rs
@@ -336,27 +336,6 @@
 	}
 
 	#[weight(<SelfWeightOf<T>>::create_collection())]
-	#[deprecated(note = "mathod was renamed to `create_rft_collection`, prefer it instead")]
-	fn create_refungible_collection(
-		&mut self,
-		caller: caller,
-		value: value,
-		name: string,
-		description: string,
-		token_prefix: string,
-	) -> Result<address> {
-		create_refungible_collection_internal::<T>(
-			caller,
-			value,
-			name,
-			description,
-			token_prefix,
-			Default::default(),
-			false,
-		)
-	}
-
-	#[weight(<SelfWeightOf<T>>::create_collection())]
 	#[solidity(rename_selector = "createERC721MetadataCompatibleRFTCollection")]
 	fn create_refungible_collection_with_properties(
 		&mut self,
modifiedpallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/unique/src/eth/stubs/CollectionHelpers.soldiffbeforeafterboth
--- a/pallets/unique/src/eth/stubs/CollectionHelpers.sol
+++ b/pallets/unique/src/eth/stubs/CollectionHelpers.sol
@@ -23,7 +23,7 @@
 }
 
 /// @title Contract, which allows users to operate with collections
-/// @dev the ERC-165 identifier for this interface is 0x95eb98f4
+/// @dev the ERC-165 identifier for this interface is 0xd14d1221
 contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {
 	/// Create an NFT collection
 	/// @param name Name of the collection
@@ -85,21 +85,6 @@
 	/// @dev EVM selector for this function is: 0xab173450,
 	///  or in textual repr: createRFTCollection(string,string,string)
 	function createRFTCollection(
-		string memory name,
-		string memory description,
-		string memory tokenPrefix
-	) public payable returns (address) {
-		require(false, stub_error);
-		name;
-		description;
-		tokenPrefix;
-		dummy = 0;
-		return 0x0000000000000000000000000000000000000000;
-	}
-
-	/// @dev EVM selector for this function is: 0x44a68ad5,
-	///  or in textual repr: createRefungibleCollection(string,string,string)
-	function createRefungibleCollection(
 		string memory name,
 		string memory description,
 		string memory tokenPrefix
modifiedtests/src/eth/api/CollectionHelpers.soldiffbeforeafterboth
--- a/tests/src/eth/api/CollectionHelpers.sol
+++ b/tests/src/eth/api/CollectionHelpers.sol
@@ -18,7 +18,7 @@
 }
 
 /// @title Contract, which allows users to operate with collections
-/// @dev the ERC-165 identifier for this interface is 0x95eb98f4
+/// @dev the ERC-165 identifier for this interface is 0xd14d1221
 interface CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {
 	/// Create an NFT collection
 	/// @param name Name of the collection
@@ -58,14 +58,6 @@
 	/// @dev EVM selector for this function is: 0xab173450,
 	///  or in textual repr: createRFTCollection(string,string,string)
 	function createRFTCollection(
-		string memory name,
-		string memory description,
-		string memory tokenPrefix
-	) external payable returns (address);
-
-	/// @dev EVM selector for this function is: 0x44a68ad5,
-	///  or in textual repr: createRefungibleCollection(string,string,string)
-	function createRefungibleCollection(
 		string memory name,
 		string memory description,
 		string memory tokenPrefix
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -12,6 +12,34 @@
 	function supportsInterface(bytes4 interfaceID) external view returns (bool);
 }
 
+/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
+/// @dev See https://eips.ethereum.org/EIPS/eip-721
+/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
+interface ERC721Metadata is Dummy, ERC165 {
+	/// @notice A descriptive name for a collection of NFTs in this contract
+	/// @dev EVM selector for this function is: 0x06fdde03,
+	///  or in textual repr: name()
+	function name() external view returns (string memory);
+
+	/// @notice An abbreviated name for NFTs in this contract
+	/// @dev EVM selector for this function is: 0x95d89b41,
+	///  or in textual repr: symbol()
+	function symbol() external view returns (string memory);
+
+	/// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
+	///
+	/// @dev If the token has a `url` property and it is not empty, it is returned.
+	///  Else If the collection does not have a property with key `schemaName` or its value is not equal to `ERC721Metadata`, it return an error `tokenURI not set`.
+	///  If the collection property `baseURI` is empty or absent, return "" (empty string)
+	///  otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
+	///  otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
+	///
+	/// @return token's const_metadata
+	/// @dev EVM selector for this function is: 0xc87b56dd,
+	///  or in textual repr: tokenURI(uint256)
+	function tokenURI(uint256 tokenId) external view returns (string memory);
+}
+
 /// @title A contract that allows to set and delete token properties and change token property permissions.
 /// @dev the ERC-165 identifier for this interface is 0x41369377
 interface TokenProperties is Dummy, ERC165 {
@@ -120,7 +148,7 @@
 	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
 	/// @dev EVM selector for this function is: 0x6ec0a9f1,
 	///  or in textual repr: collectionSponsor()
-	function collectionSponsor() external view returns (Tuple17 memory);
+	function collectionSponsor() external view returns (Tuple15 memory);
 
 	/// Set limits for the collection.
 	/// @dev Throws error if limit not found.
@@ -237,7 +265,7 @@
 	/// If address is canonical then substrate mirror is zero and vice versa.
 	/// @dev EVM selector for this function is: 0xdf727d3b,
 	///  or in textual repr: collectionOwner()
-	function collectionOwner() external view returns (Tuple17 memory);
+	function collectionOwner() external view returns (Tuple15 memory);
 
 	/// Changes collection owner to another account
 	///
@@ -249,7 +277,7 @@
 }
 
 /// @dev anonymous struct
-struct Tuple17 {
+struct Tuple15 {
 	address field_0;
 	uint256 field_1;
 }
@@ -350,11 +378,11 @@
 	/// @param tokens array of pairs of token ID and token URI for minted tokens
 	/// @dev EVM selector for this function is: 0x36543006,
 	///  or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
-	function mintBulkWithTokenURI(address to, Tuple8[] memory tokens) external returns (bool);
+	function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) external returns (bool);
 }
 
 /// @dev anonymous struct
-struct Tuple8 {
+struct Tuple6 {
 	uint256 field_0;
 	string field_1;
 }
@@ -383,35 +411,7 @@
 	///  or in textual repr: totalSupply()
 	function totalSupply() external view returns (uint256);
 }
-
-/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
-/// @dev See https://eips.ethereum.org/EIPS/eip-721
-/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
-interface ERC721Metadata is Dummy, ERC165 {
-	/// @notice A descriptive name for a collection of NFTs in this contract
-	/// @dev EVM selector for this function is: 0x06fdde03,
-	///  or in textual repr: name()
-	function name() external view returns (string memory);
 
-	/// @notice An abbreviated name for NFTs in this contract
-	/// @dev EVM selector for this function is: 0x95d89b41,
-	///  or in textual repr: symbol()
-	function symbol() external view returns (string memory);
-
-	/// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
-	///
-	/// @dev If the token has a `url` property and it is not empty, it is returned.
-	///  Else If the collection does not have a property with key `schemaName` or its value is not equal to `ERC721Metadata`, it return an error `tokenURI not set`.
-	///  If the collection property `baseURI` is empty or absent, return "" (empty string)
-	///  otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
-	///  otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
-	///
-	/// @return token's const_metadata
-	/// @dev EVM selector for this function is: 0xc87b56dd,
-	///  or in textual repr: tokenURI(uint256)
-	function tokenURI(uint256 tokenId) external view returns (string memory);
-}
-
 /// @dev inlined interface
 interface ERC721Events {
 	event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
@@ -507,11 +507,11 @@
 	Dummy,
 	ERC165,
 	ERC721,
-	ERC721Metadata,
 	ERC721Enumerable,
 	ERC721UniqueExtensions,
 	ERC721Mintable,
 	ERC721Burnable,
 	Collection,
-	TokenProperties
+	TokenProperties,
+	ERC721Metadata
 {}
modifiedtests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -12,6 +12,32 @@
 	function supportsInterface(bytes4 interfaceID) external view returns (bool);
 }
 
+/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
+interface ERC721Metadata is Dummy, ERC165 {
+	/// @notice A descriptive name for a collection of RFTs in this contract
+	/// @dev EVM selector for this function is: 0x06fdde03,
+	///  or in textual repr: name()
+	function name() external view returns (string memory);
+
+	/// @notice An abbreviated name for RFTs in this contract
+	/// @dev EVM selector for this function is: 0x95d89b41,
+	///  or in textual repr: symbol()
+	function symbol() external view returns (string memory);
+
+	/// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
+	///
+	/// @dev If the token has a `url` property and it is not empty, it is returned.
+	///  Else If the collection does not have a property with key `schemaName` or its value is not equal to `ERC721Metadata`, it return an error `tokenURI not set`.
+	///  If the collection property `baseURI` is empty or absent, return "" (empty string)
+	///  otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
+	///  otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
+	///
+	/// @return token's const_metadata
+	/// @dev EVM selector for this function is: 0xc87b56dd,
+	///  or in textual repr: tokenURI(uint256)
+	function tokenURI(uint256 tokenId) external view returns (string memory);
+}
+
 /// @title A contract that allows to set and delete token properties and change token property permissions.
 /// @dev the ERC-165 identifier for this interface is 0x41369377
 interface TokenProperties is Dummy, ERC165 {
@@ -120,7 +146,7 @@
 	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
 	/// @dev EVM selector for this function is: 0x6ec0a9f1,
 	///  or in textual repr: collectionSponsor()
-	function collectionSponsor() external view returns (Tuple17 memory);
+	function collectionSponsor() external view returns (Tuple15 memory);
 
 	/// Set limits for the collection.
 	/// @dev Throws error if limit not found.
@@ -237,7 +263,7 @@
 	/// If address is canonical then substrate mirror is zero and vice versa.
 	/// @dev EVM selector for this function is: 0xdf727d3b,
 	///  or in textual repr: collectionOwner()
-	function collectionOwner() external view returns (Tuple17 memory);
+	function collectionOwner() external view returns (Tuple15 memory);
 
 	/// Changes collection owner to another account
 	///
@@ -249,7 +275,7 @@
 }
 
 /// @dev anonymous struct
-struct Tuple17 {
+struct Tuple15 {
 	address field_0;
 	uint256 field_1;
 }
@@ -352,7 +378,7 @@
 	/// @param tokens array of pairs of token ID and token URI for minted tokens
 	/// @dev EVM selector for this function is: 0x36543006,
 	///  or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
-	function mintBulkWithTokenURI(address to, Tuple8[] memory tokens) external returns (bool);
+	function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) external returns (bool);
 
 	/// Returns EVM address for refungible token
 	///
@@ -363,7 +389,7 @@
 }
 
 /// @dev anonymous struct
-struct Tuple8 {
+struct Tuple6 {
 	uint256 field_0;
 	string field_1;
 }
@@ -393,32 +419,6 @@
 	function totalSupply() external view returns (uint256);
 }
 
-/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
-interface ERC721Metadata is Dummy, ERC165 {
-	/// @notice A descriptive name for a collection of RFTs in this contract
-	/// @dev EVM selector for this function is: 0x06fdde03,
-	///  or in textual repr: name()
-	function name() external view returns (string memory);
-
-	/// @notice An abbreviated name for RFTs in this contract
-	/// @dev EVM selector for this function is: 0x95d89b41,
-	///  or in textual repr: symbol()
-	function symbol() external view returns (string memory);
-
-	/// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
-	///
-	/// @dev If the token has a `url` property and it is not empty, it is returned.
-	///  Else If the collection does not have a property with key `schemaName` or its value is not equal to `ERC721Metadata`, it return an error `tokenURI not set`.
-	///  If the collection property `baseURI` is empty or absent, return "" (empty string)
-	///  otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix
-	///  otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).
-	///
-	/// @return token's const_metadata
-	/// @dev EVM selector for this function is: 0xc87b56dd,
-	///  or in textual repr: tokenURI(uint256)
-	function tokenURI(uint256 tokenId) external view returns (string memory);
-}
-
 /// @dev inlined interface
 interface ERC721Events {
 	event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
@@ -512,11 +512,11 @@
 	Dummy,
 	ERC165,
 	ERC721,
-	ERC721Metadata,
 	ERC721Enumerable,
 	ERC721UniqueExtensions,
 	ERC721Mintable,
 	ERC721Burnable,
 	Collection,
-	TokenProperties
+	TokenProperties,
+	ERC721Metadata
 {}
modifiedtests/src/eth/collectionHelpersAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/collectionHelpersAbi.json
+++ b/tests/src/eth/collectionHelpersAbi.json
@@ -84,17 +84,6 @@
   },
   {
     "inputs": [
-      { "internalType": "string", "name": "name", "type": "string" },
-      { "internalType": "string", "name": "description", "type": "string" },
-      { "internalType": "string", "name": "tokenPrefix", "type": "string" }
-    ],
-    "name": "createRefungibleCollection",
-    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
-    "stateMutability": "payable",
-    "type": "function"
-  },
-  {
-    "inputs": [
       {
         "internalType": "address",
         "name": "collectionAddress",
modifiedtests/src/eth/collectionProperties.test.tsdiffbeforeafterboth
--- a/tests/src/eth/collectionProperties.test.ts
+++ b/tests/src/eth/collectionProperties.test.ts
@@ -1,5 +1,6 @@
 import {itEth, usingEthPlaygrounds, expect} from './util/playgrounds';
 import {IKeyringPair} from '@polkadot/types/types';
+import {Pallets} from '../util/playgrounds';
 
 describe('EVM collection properties', () => {
   let donor: IKeyringPair;
@@ -80,7 +81,7 @@
     expect(await contract.methods.supportsInterface('0x5b5e139f').call()).to.be.false;
   });
 
-  itEth('ERC721Metadata property can be set for RFT collection', async({helper}) => {
+  itEth.ifWithPallets('ERC721Metadata property can be set for RFT collection', [Pallets.ReFungible], async({helper}) => {
     const caller = await helper.eth.createAccountWithBalance(donor);
     const collection = await helper.rft.mintCollection(donor, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
 
modifiedtests/src/eth/nonFungible.test.tsdiffbeforeafterboth
--- a/tests/src/eth/nonFungible.test.ts
+++ b/tests/src/eth/nonFungible.test.ts
@@ -79,11 +79,11 @@
     });
   });
 
-  async function setup(helper: EthUniqueHelper, tokenPrefix: string, propertyKey?: string, propertyValue?: string): Promise<{contract: Contract, nextTokenId: string}> {
+  async function setup(helper: EthUniqueHelper, baseUri: string, propertyKey?: string, propertyValue?: string): Promise<{contract: Contract, nextTokenId: string}> {
     const owner = await helper.eth.createAccountWithBalance(donor);
     const receiver = helper.eth.createAccount();
 
-    const {collectionAddress} = await helper.eth.createERC721MetadataCompatibleNFTCollection(owner, 'Mint collection', 'a', 'b', tokenPrefix);
+    const {collectionAddress} = await helper.eth.createERC721MetadataCompatibleNFTCollection(owner, 'Mint collection', 'a', 'b', baseUri);
     const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
     
     const nextTokenId = await contract.methods.nextTokenId().call();
modifiedtests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/nonFungibleAbi.json
+++ b/tests/src/eth/nonFungibleAbi.json
@@ -154,7 +154,7 @@
           { "internalType": "address", "name": "field_0", "type": "address" },
           { "internalType": "uint256", "name": "field_1", "type": "uint256" }
         ],
-        "internalType": "struct Tuple17",
+        "internalType": "struct Tuple15",
         "name": "",
         "type": "tuple"
       }
@@ -178,7 +178,7 @@
           { "internalType": "address", "name": "field_0", "type": "address" },
           { "internalType": "uint256", "name": "field_1", "type": "uint256" }
         ],
-        "internalType": "struct Tuple17",
+        "internalType": "struct Tuple15",
         "name": "",
         "type": "tuple"
       }
@@ -287,7 +287,7 @@
           { "internalType": "uint256", "name": "field_0", "type": "uint256" },
           { "internalType": "string", "name": "field_1", "type": "string" }
         ],
-        "internalType": "struct Tuple8[]",
+        "internalType": "struct Tuple6[]",
         "name": "tokens",
         "type": "tuple[]"
       }
modifiedtests/src/eth/reFungibleAbi.jsondiffbeforeafterboth
before · tests/src/eth/reFungibleAbi.json
1[2  {3    "anonymous": false,4    "inputs": [5      {6        "indexed": true,7        "internalType": "address",8        "name": "owner",9        "type": "address"10      },11      {12        "indexed": true,13        "internalType": "address",14        "name": "approved",15        "type": "address"16      },17      {18        "indexed": true,19        "internalType": "uint256",20        "name": "tokenId",21        "type": "uint256"22      }23    ],24    "name": "Approval",25    "type": "event"26  },27  {28    "anonymous": false,29    "inputs": [30      {31        "indexed": true,32        "internalType": "address",33        "name": "owner",34        "type": "address"35      },36      {37        "indexed": true,38        "internalType": "address",39        "name": "operator",40        "type": "address"41      },42      {43        "indexed": false,44        "internalType": "bool",45        "name": "approved",46        "type": "bool"47      }48    ],49    "name": "ApprovalForAll",50    "type": "event"51  },52  {53    "anonymous": false,54    "inputs": [],55    "name": "MintingFinished",56    "type": "event"57  },58  {59    "anonymous": false,60    "inputs": [61      {62        "indexed": true,63        "internalType": "address",64        "name": "from",65        "type": "address"66      },67      {68        "indexed": true,69        "internalType": "address",70        "name": "to",71        "type": "address"72      },73      {74        "indexed": true,75        "internalType": "uint256",76        "name": "tokenId",77        "type": "uint256"78      }79    ],80    "name": "Transfer",81    "type": "event"82  },83  {84    "inputs": [85      { "internalType": "address", "name": "newAdmin", "type": "address" }86    ],87    "name": "addCollectionAdmin",88    "outputs": [],89    "stateMutability": "nonpayable",90    "type": "function"91  },92  {93    "inputs": [94      { "internalType": "address", "name": "user", "type": "address" }95    ],96    "name": "addToCollectionAllowList",97    "outputs": [],98    "stateMutability": "nonpayable",99    "type": "function"100  },101  {102    "inputs": [103      { "internalType": "address", "name": "user", "type": "address" }104    ],105    "name": "allowed",106    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],107    "stateMutability": "view",108    "type": "function"109  },110  {111    "inputs": [112      { "internalType": "address", "name": "approved", "type": "address" },113      { "internalType": "uint256", "name": "tokenId", "type": "uint256" }114    ],115    "name": "approve",116    "outputs": [],117    "stateMutability": "nonpayable",118    "type": "function"119  },120  {121    "inputs": [122      { "internalType": "address", "name": "owner", "type": "address" }123    ],124    "name": "balanceOf",125    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],126    "stateMutability": "view",127    "type": "function"128  },129  {130    "inputs": [131      { "internalType": "uint256", "name": "tokenId", "type": "uint256" }132    ],133    "name": "burn",134    "outputs": [],135    "stateMutability": "nonpayable",136    "type": "function"137  },138  {139    "inputs": [140      { "internalType": "address", "name": "from", "type": "address" },141      { "internalType": "uint256", "name": "tokenId", "type": "uint256" }142    ],143    "name": "burnFrom",144    "outputs": [],145    "stateMutability": "nonpayable",146    "type": "function"147  },148  {149    "inputs": [],150    "name": "collectionOwner",151    "outputs": [152      {153        "components": [154          { "internalType": "address", "name": "field_0", "type": "address" },155          { "internalType": "uint256", "name": "field_1", "type": "uint256" }156        ],157        "internalType": "struct Tuple17",158        "name": "",159        "type": "tuple"160      }161    ],162    "stateMutability": "view",163    "type": "function"164  },165  {166    "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],167    "name": "collectionProperty",168    "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],169    "stateMutability": "view",170    "type": "function"171  },172  {173    "inputs": [],174    "name": "collectionSponsor",175    "outputs": [176      {177        "components": [178          { "internalType": "address", "name": "field_0", "type": "address" },179          { "internalType": "uint256", "name": "field_1", "type": "uint256" }180        ],181        "internalType": "struct Tuple17",182        "name": "",183        "type": "tuple"184      }185    ],186    "stateMutability": "view",187    "type": "function"188  },189  {190    "inputs": [],191    "name": "confirmCollectionSponsorship",192    "outputs": [],193    "stateMutability": "nonpayable",194    "type": "function"195  },196  {197    "inputs": [],198    "name": "contractAddress",199    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],200    "stateMutability": "view",201    "type": "function"202  },203  {204    "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],205    "name": "deleteCollectionProperty",206    "outputs": [],207    "stateMutability": "nonpayable",208    "type": "function"209  },210  {211    "inputs": [212      { "internalType": "uint256", "name": "tokenId", "type": "uint256" },213      { "internalType": "string", "name": "key", "type": "string" }214    ],215    "name": "deleteProperty",216    "outputs": [],217    "stateMutability": "nonpayable",218    "type": "function"219  },220  {221    "inputs": [],222    "name": "finishMinting",223    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],224    "stateMutability": "nonpayable",225    "type": "function"226  },227  {228    "inputs": [229      { "internalType": "uint256", "name": "tokenId", "type": "uint256" }230    ],231    "name": "getApproved",232    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],233    "stateMutability": "view",234    "type": "function"235  },236  {237    "inputs": [],238    "name": "hasCollectionPendingSponsor",239    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],240    "stateMutability": "view",241    "type": "function"242  },243  {244    "inputs": [245      { "internalType": "address", "name": "owner", "type": "address" },246      { "internalType": "address", "name": "operator", "type": "address" }247    ],248    "name": "isApprovedForAll",249    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],250    "stateMutability": "view",251    "type": "function"252  },253  {254    "inputs": [255      { "internalType": "address", "name": "user", "type": "address" }256    ],257    "name": "isOwnerOrAdmin",258    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],259    "stateMutability": "view",260    "type": "function"261  },262  {263    "inputs": [264      { "internalType": "address", "name": "to", "type": "address" },265      { "internalType": "uint256", "name": "tokenId", "type": "uint256" }266    ],267    "name": "mint",268    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],269    "stateMutability": "nonpayable",270    "type": "function"271  },272  {273    "inputs": [274      { "internalType": "address", "name": "to", "type": "address" },275      { "internalType": "uint256[]", "name": "tokenIds", "type": "uint256[]" }276    ],277    "name": "mintBulk",278    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],279    "stateMutability": "nonpayable",280    "type": "function"281  },282  {283    "inputs": [284      { "internalType": "address", "name": "to", "type": "address" },285      {286        "components": [287          { "internalType": "uint256", "name": "field_0", "type": "uint256" },288          { "internalType": "string", "name": "field_1", "type": "string" }289        ],290        "internalType": "struct Tuple8[]",291        "name": "tokens",292        "type": "tuple[]"293      }294    ],295    "name": "mintBulkWithTokenURI",296    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],297    "stateMutability": "nonpayable",298    "type": "function"299  },300  {301    "inputs": [302      { "internalType": "address", "name": "to", "type": "address" },303      { "internalType": "uint256", "name": "tokenId", "type": "uint256" },304      { "internalType": "string", "name": "tokenUri", "type": "string" }305    ],306    "name": "mintWithTokenURI",307    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],308    "stateMutability": "nonpayable",309    "type": "function"310  },311  {312    "inputs": [],313    "name": "mintingFinished",314    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],315    "stateMutability": "view",316    "type": "function"317  },318  {319    "inputs": [],320    "name": "name",321    "outputs": [{ "internalType": "string", "name": "", "type": "string" }],322    "stateMutability": "view",323    "type": "function"324  },325  {326    "inputs": [],327    "name": "nextTokenId",328    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],329    "stateMutability": "view",330    "type": "function"331  },332  {333    "inputs": [334      { "internalType": "uint256", "name": "tokenId", "type": "uint256" }335    ],336    "name": "ownerOf",337    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],338    "stateMutability": "view",339    "type": "function"340  },341  {342    "inputs": [343      { "internalType": "uint256", "name": "tokenId", "type": "uint256" },344      { "internalType": "string", "name": "key", "type": "string" }345    ],346    "name": "property",347    "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],348    "stateMutability": "view",349    "type": "function"350  },351  {352    "inputs": [353      { "internalType": "address", "name": "admin", "type": "address" }354    ],355    "name": "removeCollectionAdmin",356    "outputs": [],357    "stateMutability": "nonpayable",358    "type": "function"359  },360  {361    "inputs": [],362    "name": "removeCollectionSponsor",363    "outputs": [],364    "stateMutability": "nonpayable",365    "type": "function"366  },367  {368    "inputs": [369      { "internalType": "address", "name": "user", "type": "address" }370    ],371    "name": "removeFromCollectionAllowList",372    "outputs": [],373    "stateMutability": "nonpayable",374    "type": "function"375  },376  {377    "inputs": [378      { "internalType": "address", "name": "from", "type": "address" },379      { "internalType": "address", "name": "to", "type": "address" },380      { "internalType": "uint256", "name": "tokenId", "type": "uint256" }381    ],382    "name": "safeTransferFrom",383    "outputs": [],384    "stateMutability": "nonpayable",385    "type": "function"386  },387  {388    "inputs": [389      { "internalType": "address", "name": "from", "type": "address" },390      { "internalType": "address", "name": "to", "type": "address" },391      { "internalType": "uint256", "name": "tokenId", "type": "uint256" },392      { "internalType": "bytes", "name": "data", "type": "bytes" }393    ],394    "name": "safeTransferFromWithData",395    "outputs": [],396    "stateMutability": "nonpayable",397    "type": "function"398  },399  {400    "inputs": [401      { "internalType": "address", "name": "operator", "type": "address" },402      { "internalType": "bool", "name": "approved", "type": "bool" }403    ],404    "name": "setApprovalForAll",405    "outputs": [],406    "stateMutability": "nonpayable",407    "type": "function"408  },409  {410    "inputs": [{ "internalType": "uint8", "name": "mode", "type": "uint8" }],411    "name": "setCollectionAccess",412    "outputs": [],413    "stateMutability": "nonpayable",414    "type": "function"415  },416  {417    "inputs": [418      { "internalType": "string", "name": "limit", "type": "string" },419      { "internalType": "uint32", "name": "value", "type": "uint32" }420    ],421    "name": "setCollectionLimit",422    "outputs": [],423    "stateMutability": "nonpayable",424    "type": "function"425  },426  {427    "inputs": [428      { "internalType": "string", "name": "limit", "type": "string" },429      { "internalType": "bool", "name": "value", "type": "bool" }430    ],431    "name": "setCollectionLimit",432    "outputs": [],433    "stateMutability": "nonpayable",434    "type": "function"435  },436  {437    "inputs": [{ "internalType": "bool", "name": "mode", "type": "bool" }],438    "name": "setCollectionMintMode",439    "outputs": [],440    "stateMutability": "nonpayable",441    "type": "function"442  },443  {444    "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],445    "name": "setCollectionNesting",446    "outputs": [],447    "stateMutability": "nonpayable",448    "type": "function"449  },450  {451    "inputs": [452      { "internalType": "bool", "name": "enable", "type": "bool" },453      {454        "internalType": "address[]",455        "name": "collections",456        "type": "address[]"457      }458    ],459    "name": "setCollectionNesting",460    "outputs": [],461    "stateMutability": "nonpayable",462    "type": "function"463  },464  {465    "inputs": [466      { "internalType": "string", "name": "key", "type": "string" },467      { "internalType": "bytes", "name": "value", "type": "bytes" }468    ],469    "name": "setCollectionProperty",470    "outputs": [],471    "stateMutability": "nonpayable",472    "type": "function"473  },474  {475    "inputs": [476      { "internalType": "address", "name": "sponsor", "type": "address" }477    ],478    "name": "setCollectionSponsor",479    "outputs": [],480    "stateMutability": "nonpayable",481    "type": "function"482  },483  {484    "inputs": [485      { "internalType": "address", "name": "newOwner", "type": "address" }486    ],487    "name": "setOwner",488    "outputs": [],489    "stateMutability": "nonpayable",490    "type": "function"491  },492  {493    "inputs": [494      { "internalType": "uint256", "name": "tokenId", "type": "uint256" },495      { "internalType": "string", "name": "key", "type": "string" },496      { "internalType": "bytes", "name": "value", "type": "bytes" }497    ],498    "name": "setProperty",499    "outputs": [],500    "stateMutability": "nonpayable",501    "type": "function"502  },503  {504    "inputs": [505      { "internalType": "string", "name": "key", "type": "string" },506      { "internalType": "bool", "name": "isMutable", "type": "bool" },507      { "internalType": "bool", "name": "collectionAdmin", "type": "bool" },508      { "internalType": "bool", "name": "tokenOwner", "type": "bool" }509    ],510    "name": "setTokenPropertyPermission",511    "outputs": [],512    "stateMutability": "nonpayable",513    "type": "function"514  },515  {516    "inputs": [517      { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }518    ],519    "name": "supportsInterface",520    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],521    "stateMutability": "view",522    "type": "function"523  },524  {525    "inputs": [],526    "name": "symbol",527    "outputs": [{ "internalType": "string", "name": "", "type": "string" }],528    "stateMutability": "view",529    "type": "function"530  },531  {532    "inputs": [533      { "internalType": "uint256", "name": "index", "type": "uint256" }534    ],535    "name": "tokenByIndex",536    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],537    "stateMutability": "view",538    "type": "function"539  },540  {541    "inputs": [542      { "internalType": "uint256", "name": "token", "type": "uint256" }543    ],544    "name": "tokenContractAddress",545    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],546    "stateMutability": "view",547    "type": "function"548  },549  {550    "inputs": [551      { "internalType": "address", "name": "owner", "type": "address" },552      { "internalType": "uint256", "name": "index", "type": "uint256" }553    ],554    "name": "tokenOfOwnerByIndex",555    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],556    "stateMutability": "view",557    "type": "function"558  },559  {560    "inputs": [561      { "internalType": "uint256", "name": "tokenId", "type": "uint256" }562    ],563    "name": "tokenURI",564    "outputs": [{ "internalType": "string", "name": "", "type": "string" }],565    "stateMutability": "view",566    "type": "function"567  },568  {569    "inputs": [],570    "name": "totalSupply",571    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],572    "stateMutability": "view",573    "type": "function"574  },575  {576    "inputs": [577      { "internalType": "address", "name": "to", "type": "address" },578      { "internalType": "uint256", "name": "tokenId", "type": "uint256" }579    ],580    "name": "transfer",581    "outputs": [],582    "stateMutability": "nonpayable",583    "type": "function"584  },585  {586    "inputs": [587      { "internalType": "address", "name": "from", "type": "address" },588      { "internalType": "address", "name": "to", "type": "address" },589      { "internalType": "uint256", "name": "tokenId", "type": "uint256" }590    ],591    "name": "transferFrom",592    "outputs": [],593    "stateMutability": "nonpayable",594    "type": "function"595  },596  {597    "inputs": [],598    "name": "uniqueCollectionType",599    "outputs": [{ "internalType": "string", "name": "", "type": "string" }],600    "stateMutability": "view",601    "type": "function"602  }603]
modifiedtests/src/eth/reFungibleToken.test.tsdiffbeforeafterboth
--- a/tests/src/eth/reFungibleToken.test.ts
+++ b/tests/src/eth/reFungibleToken.test.ts
@@ -76,11 +76,11 @@
     });
   });
 
-  async function setup(helper: EthUniqueHelper, tokenPrefix: string, propertyKey?: string, propertyValue?: string): Promise<{contract: Contract, nextTokenId: string}> {
+  async function setup(helper: EthUniqueHelper, baseUri: string, propertyKey?: string, propertyValue?: string): Promise<{contract: Contract, nextTokenId: string}> {
     const owner = await helper.eth.createAccountWithBalance(donor);
     const receiver = helper.eth.createAccount();
 
-    const {collectionAddress} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner, 'Mint collection', 'a', 'b', tokenPrefix);
+    const {collectionAddress} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner, 'Mint collection', 'a', 'b', baseUri);
     const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', owner);
     
     const nextTokenId = await contract.methods.nextTokenId().call();