git.delta.rocks / unique-network / refs/commits / 4e01cb3cfaf7

difftreelog

build upgrade to new evm-coder syntax

Yaroslav Bolyukin2022-07-12parent: #b6f414f.patch.diff
in: master

29 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1772,41 +1772,6 @@
 ]
 
 [[package]]
-name = "darling"
-version = "0.13.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c"
-dependencies = [
- "darling_core",
- "darling_macro",
-]
-
-[[package]]
-name = "darling_core"
-version = "0.13.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610"
-dependencies = [
- "fnv",
- "ident_case",
- "proc-macro2",
- "quote",
- "strsim",
- "syn",
-]
-
-[[package]]
-name = "darling_macro"
-version = "0.13.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"
-dependencies = [
- "darling_core",
- "quote",
- "syn",
-]
-
-[[package]]
 name = "data-encoding"
 version = "2.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2217,14 +2182,13 @@
 
 [[package]]
 name = "evm-coder-macros"
-version = "0.1.0"
+version = "0.2.0"
 dependencies = [
  "Inflector",
- "darling",
  "hex",
  "proc-macro2",
  "quote",
- "sha3 0.9.1",
+ "sha3 0.10.2",
  "syn",
 ]
 
@@ -3427,12 +3391,6 @@
  "wasm-bindgen",
  "winapi",
 ]
-
-[[package]]
-name = "ident_case"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
 
 [[package]]
 name = "idna"
modifiedpallets/common/src/erc.rsdiffbeforeafterboth
--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -60,7 +60,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-#[solidity_interface(name = "Collection")]
+#[solidity_interface(name = Collection)]
 impl<T: Config> CollectionHandle<T>
 where
 	T::AccountId: From<[u8; 32]>,
@@ -228,7 +228,7 @@
 	}
 
 	/// Add collection admin by substrate address.
-	/// @param new_admin Substrate administrator address.
+	/// @param newAdmin Substrate administrator address.
 	fn add_collection_admin_substrate(
 		&mut self,
 		caller: caller,
@@ -254,7 +254,7 @@
 	}
 
 	/// Add collection admin.
-	/// @param new_admin Address of the added administrator.
+	/// @param newAdmin Address of the added administrator.
 	fn add_collection_admin(&mut self, caller: caller, new_admin: address) -> Result<void> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let new_admin = T::CrossAccountId::from_eth(new_admin);
@@ -264,7 +264,7 @@
 
 	/// Remove collection admin.
 	///
-	/// @param new_admin Address of the removed administrator.
+	/// @param admin Address of the removed administrator.
 	fn remove_collection_admin(&mut self, caller: caller, admin: address) -> Result<void> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let admin = T::CrossAccountId::from_eth(admin);
modifiedpallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/eth.rs
+++ b/pallets/evm-contract-helpers/src/eth.rs
@@ -42,14 +42,14 @@
 	}
 }
 
-#[solidity_interface(name = "ContractHelpers")]
+#[solidity_interface(name = ContractHelpers)]
 impl<T: Config> ContractHelpers<T>
 where
 	T::AccountId: AsRef<[u8; 32]>,
 {
 	/// Get contract ovner
 	///
-	/// @param Contract_address contract for which the owner is being determined.
+	/// @param contractAddress contract for which the owner is being determined.
 	/// @return Contract owner.
 	fn contract_owner(&self, contract_address: address) -> Result<address> {
 		Ok(<Owner<T>>::get(contract_address))
@@ -57,7 +57,7 @@
 
 	/// Set sponsor.
 	///
-	/// @param contract_address Contract for which a sponsor is being established.
+	/// @param contractAddress Contract for which a sponsor is being established.
 	/// @param sponsor User address who set as pending sponsor.
 	fn set_sponsor(
 		&mut self,
@@ -80,7 +80,7 @@
 
 	/// Set contract as self sponsored.
 	///
-	/// @param contract_address Contract for which a self sponsoring is being enabled.
+	/// @param contractAddress Contract for which a self sponsoring is being enabled.
 	fn self_sponsored_enable(&mut self, caller: caller, contract_address: address) -> Result<void> {
 		self.recorder().consume_sload()?;
 		self.recorder().consume_sstore()?;
@@ -93,7 +93,7 @@
 
 	/// Remove sponsor.
 	///
-	/// @param contract_address Contract for which a sponsorship is being removed.
+	/// @param contractAddress Contract for which a sponsorship is being removed.
 	fn remove_sponsor(&mut self, caller: caller, contract_address: address) -> Result<void> {
 		self.recorder().consume_sload()?;
 		self.recorder().consume_sstore()?;
@@ -106,9 +106,9 @@
 
 	/// Confirm sponsorship.
 	///
-	/// @dev Caller must be same that set via [`set_sponsor`].
+	/// @dev Caller must be same that set via [`setSponsor`].
 	///
-	/// @param contract_address Сontract for which need to confirm sponsorship.
+	/// @param contractAddress Сontract for which need to confirm sponsorship.
 	fn confirm_sponsorship(&mut self, caller: caller, contract_address: address) -> Result<void> {
 		self.recorder().consume_sload()?;
 		self.recorder().consume_sstore()?;
@@ -121,7 +121,7 @@
 
 	/// Get current sponsor.
 	///
-	/// @param contract_address The contract for which a sponsor is requested.
+	/// @param contractAddress The contract for which a sponsor is requested.
 	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
 	fn get_sponsor(&self, contract_address: address) -> Result<(address, uint256)> {
 		let sponsor =
@@ -138,7 +138,7 @@
 
 	/// Check tat contract has confirmed sponsor.
 	///
-	/// @param contract_address The contract for which the presence of a confirmed sponsor is checked.
+	/// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.
 	/// @return **true** if contract has confirmed sponsor.
 	fn has_sponsor(&self, contract_address: address) -> Result<bool> {
 		Ok(Pallet::<T>::get_sponsor(contract_address).is_some())
@@ -146,7 +146,7 @@
 
 	/// Check tat contract has pending sponsor.
 	///
-	/// @param contract_address The contract for which the presence of a pending sponsor is checked.
+	/// @param contractAddress The contract for which the presence of a pending sponsor is checked.
 	/// @return **true** if contract has pending sponsor.
 	fn has_pending_sponsor(&self, contract_address: address) -> Result<bool> {
 		Ok(match Sponsoring::<T>::get(contract_address) {
@@ -229,13 +229,13 @@
 		caller: caller,
 		contract_address: address,
 		user: address,
-		allowed: bool,
+		is_allowed: bool,
 	) -> Result<void> {
 		self.recorder().consume_sload()?;
 		self.recorder().consume_sstore()?;
 
 		<Pallet<T>>::ensure_owner(contract_address, caller).map_err(dispatch_to_evm::<T>)?;
-		<Pallet<T>>::toggle_allowed(contract_address, user, allowed);
+		<Pallet<T>>::toggle_allowed(contract_address, user, is_allowed);
 
 		Ok(())
 	}
modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
+++ b/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
@@ -3,13 +3,13 @@
 
 pragma solidity >=0.8.0 <0.9.0;
 
-// Anonymous struct
+/// @dev anonymous struct
 struct Tuple0 {
 	address field_0;
 	uint256 field_1;
 }
 
-// Common stubs holder
+/// @dev common stubs holder
 contract Dummy {
 	uint8 dummy;
 	string stub_error = "this contract is implemented in native";
@@ -27,14 +27,14 @@
 	}
 }
 
-// Selector: 6073d917
+/// @dev the ERC-165 identifier for this interface is 0x6073d917
 contract ContractHelpers is Dummy, ERC165 {
-	// Get contract ovner
-	//
-	// @param Contract_address contract for which the owner is being determined.
-	// @return Contract owner.
-	//
-	// Selector: contractOwner(address) 5152b14c
+	/// Get contract ovner
+	///
+	/// @param contractAddress contract for which the owner is being determined.
+	/// @return Contract owner.
+	///
+	/// Selector: contractOwner(address) 5152b14c
 	function contractOwner(address contractAddress)
 		public
 		view
@@ -46,12 +46,12 @@
 		return 0x0000000000000000000000000000000000000000;
 	}
 
-	// Set sponsor.
-	//
-	// @param contract_address Contract for which a sponsor is being established.
-	// @param sponsor User address who set as pending sponsor.
-	//
-	// Selector: setSponsor(address,address) f01fba93
+	/// Set sponsor.
+	///
+	/// @param contractAddress Contract for which a sponsor is being established.
+	/// @param sponsor User address who set as pending sponsor.
+	///
+	/// Selector: setSponsor(address,address) f01fba93
 	function setSponsor(address contractAddress, address sponsor) public {
 		require(false, stub_error);
 		contractAddress;
@@ -59,47 +59,47 @@
 		dummy = 0;
 	}
 
-	// Set contract as self sponsored.
-	//
-	// @param contract_address Contract for which a self sponsoring is being enabled.
-	//
-	// Selector: selfSponsoredEnable(address) 89f7d9ae
+	/// Set contract as self sponsored.
+	///
+	/// @param contractAddress Contract for which a self sponsoring is being enabled.
+	///
+	/// Selector: selfSponsoredEnable(address) 89f7d9ae
 	function selfSponsoredEnable(address contractAddress) public {
 		require(false, stub_error);
 		contractAddress;
 		dummy = 0;
 	}
 
-	// Remove sponsor.
-	//
-	// @param contract_address Contract for which a sponsorship is being removed.
-	//
-	// Selector: removeSponsor(address) ef784250
+	/// Remove sponsor.
+	///
+	/// @param contractAddress Contract for which a sponsorship is being removed.
+	///
+	/// Selector: removeSponsor(address) ef784250
 	function removeSponsor(address contractAddress) public {
 		require(false, stub_error);
 		contractAddress;
 		dummy = 0;
 	}
 
-	// Confirm sponsorship.
-	//
-	// @dev Caller must be same that set via [`set_sponsor`].
-	//
-	// @param contract_address Сontract for which need to confirm sponsorship.
-	//
-	// Selector: confirmSponsorship(address) abc00001
+	/// Confirm sponsorship.
+	///
+	/// @dev Caller must be same that set via [`setSponsor`].
+	///
+	/// @param contractAddress Сontract for which need to confirm sponsorship.
+	///
+	/// Selector: confirmSponsorship(address) abc00001
 	function confirmSponsorship(address contractAddress) public {
 		require(false, stub_error);
 		contractAddress;
 		dummy = 0;
 	}
 
-	// Get current sponsor.
-	//
-	// @param contract_address The contract for which a sponsor is requested.
-	// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
-	//
-	// Selector: getSponsor(address) 743fc745
+	/// Get current sponsor.
+	///
+	/// @param contractAddress The contract for which a sponsor is requested.
+	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
+	///
+	/// Selector: getSponsor(address) 743fc745
 	function getSponsor(address contractAddress)
 		public
 		view
@@ -111,12 +111,12 @@
 		return Tuple0(0x0000000000000000000000000000000000000000, 0);
 	}
 
-	// Check tat contract has confirmed sponsor.
-	//
-	// @param contract_address The contract for which the presence of a confirmed sponsor is checked.
-	// @return **true** if contract has confirmed sponsor.
-	//
-	// Selector: hasSponsor(address) 97418603
+	/// Check tat contract has confirmed sponsor.
+	///
+	/// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.
+	/// @return **true** if contract has confirmed sponsor.
+	///
+	/// Selector: hasSponsor(address) 97418603
 	function hasSponsor(address contractAddress) public view returns (bool) {
 		require(false, stub_error);
 		contractAddress;
@@ -124,12 +124,12 @@
 		return false;
 	}
 
-	// Check tat contract has pending sponsor.
-	//
-	// @param contract_address The contract for which the presence of a pending sponsor is checked.
-	// @return **true** if contract has pending sponsor.
-	//
-	// Selector: hasPendingSponsor(address) 39b9b242
+	/// Check tat contract has pending sponsor.
+	///
+	/// @param contractAddress The contract for which the presence of a pending sponsor is checked.
+	/// @return **true** if contract has pending sponsor.
+	///
+	/// Selector: hasPendingSponsor(address) 39b9b242
 	function hasPendingSponsor(address contractAddress)
 		public
 		view
@@ -141,7 +141,7 @@
 		return false;
 	}
 
-	// Selector: sponsoringEnabled(address) 6027dc61
+	/// Selector: sponsoringEnabled(address) 6027dc61
 	function sponsoringEnabled(address contractAddress)
 		public
 		view
@@ -153,7 +153,7 @@
 		return false;
 	}
 
-	// Selector: setSponsoringMode(address,uint8) fde8a560
+	/// Selector: setSponsoringMode(address,uint8) fde8a560
 	function setSponsoringMode(address contractAddress, uint8 mode) public {
 		require(false, stub_error);
 		contractAddress;
@@ -161,7 +161,7 @@
 		dummy = 0;
 	}
 
-	// Selector: sponsoringMode(address) b70c7267
+	/// Selector: sponsoringMode(address) b70c7267
 	function sponsoringMode(address contractAddress)
 		public
 		view
@@ -173,7 +173,7 @@
 		return 0;
 	}
 
-	// Selector: setSponsoringRateLimit(address,uint32) 77b6c908
+	/// Selector: setSponsoringRateLimit(address,uint32) 77b6c908
 	function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)
 		public
 	{
@@ -183,7 +183,7 @@
 		dummy = 0;
 	}
 
-	// Selector: getSponsoringRateLimit(address) 610cfabd
+	/// Selector: getSponsoringRateLimit(address) 610cfabd
 	function getSponsoringRateLimit(address contractAddress)
 		public
 		view
@@ -195,7 +195,7 @@
 		return 0;
 	}
 
-	// Selector: allowed(address,address) 5c658165
+	/// Selector: allowed(address,address) 5c658165
 	function allowed(address contractAddress, address user)
 		public
 		view
@@ -208,7 +208,7 @@
 		return false;
 	}
 
-	// Selector: allowlistEnabled(address) c772ef6c
+	/// Selector: allowlistEnabled(address) c772ef6c
 	function allowlistEnabled(address contractAddress)
 		public
 		view
@@ -220,7 +220,7 @@
 		return false;
 	}
 
-	// Selector: toggleAllowlist(address,bool) 36de20f5
+	/// Selector: toggleAllowlist(address,bool) 36de20f5
 	function toggleAllowlist(address contractAddress, bool enabled) public {
 		require(false, stub_error);
 		contractAddress;
@@ -228,16 +228,16 @@
 		dummy = 0;
 	}
 
-	// Selector: toggleAllowed(address,address,bool) 4706cc1c
+	/// Selector: toggleAllowed(address,address,bool) 4706cc1c
 	function toggleAllowed(
 		address contractAddress,
 		address user,
-		bool allowed
+		bool isAllowed
 	) public {
 		require(false, stub_error);
 		contractAddress;
 		user;
-		allowed;
+		isAllowed;
 		dummy = 0;
 	}
 }
modifiedpallets/fungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/fungible/src/erc.rs
+++ b/pallets/fungible/src/erc.rs
@@ -50,7 +50,7 @@
 	},
 }
 
-#[solidity_interface(name = "ERC20", events(ERC20Events))]
+#[solidity_interface(name = ERC20, events(ERC20Events))]
 impl<T: Config> FungibleHandle<T> {
 	fn name(&self) -> Result<string> {
 		Ok(decode_utf16(self.name.iter().copied())
@@ -129,7 +129,7 @@
 	}
 }
 
-#[solidity_interface(name = "ERC20UniqueExtensions")]
+#[solidity_interface(name = ERC20UniqueExtensions)]
 impl<T: Config> FungibleHandle<T> {
 	#[weight(<SelfWeightOf<T>>::burn_from())]
 	fn burn_from(&mut self, caller: caller, from: address, amount: uint256) -> Result<bool> {
@@ -147,11 +147,11 @@
 }
 
 #[solidity_interface(
-	name = "UniqueFungible",
+	name = UniqueFungible,
 	is(
 		ERC20,
 		ERC20UniqueExtensions,
-		via("CollectionHandle<T>", common_mut, Collection)
+		Collection(common_mut, CollectionHandle<T>),
 	)
 )]
 impl<T: Config> FungibleHandle<T> where T::AccountId: From<[u8; 32]> {}
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
@@ -3,7 +3,7 @@
 
 pragma solidity >=0.8.0 <0.9.0;
 
-// Common stubs holder
+/// @dev common stubs holder
 contract Dummy {
 	uint8 dummy;
 	string stub_error = "this contract is implemented in native";
@@ -19,122 +19,17 @@
 		interfaceID;
 		return true;
 	}
-}
-
-// Inline
-contract ERC20Events {
-	event Transfer(address indexed from, address indexed to, uint256 value);
-	event Approval(
-		address indexed owner,
-		address indexed spender,
-		uint256 value
-	);
 }
 
-// Selector: 79cc6790
-contract ERC20UniqueExtensions is Dummy, ERC165 {
-	// Selector: burnFrom(address,uint256) 79cc6790
-	function burnFrom(address from, uint256 amount) public returns (bool) {
-		require(false, stub_error);
-		from;
-		amount;
-		dummy = 0;
-		return false;
-	}
-}
-
-// Selector: 942e8b22
-contract ERC20 is Dummy, ERC165, ERC20Events {
-	// Selector: name() 06fdde03
-	function name() public view returns (string memory) {
-		require(false, stub_error);
-		dummy;
-		return "";
-	}
-
-	// Selector: symbol() 95d89b41
-	function symbol() public view returns (string memory) {
-		require(false, stub_error);
-		dummy;
-		return "";
-	}
-
-	// Selector: totalSupply() 18160ddd
-	function totalSupply() public view returns (uint256) {
-		require(false, stub_error);
-		dummy;
-		return 0;
-	}
-
-	// Selector: decimals() 313ce567
-	function decimals() public view returns (uint8) {
-		require(false, stub_error);
-		dummy;
-		return 0;
-	}
-
-	// Selector: balanceOf(address) 70a08231
-	function balanceOf(address owner) public view returns (uint256) {
-		require(false, stub_error);
-		owner;
-		dummy;
-		return 0;
-	}
-
-	// Selector: transfer(address,uint256) a9059cbb
-	function transfer(address to, uint256 amount) public returns (bool) {
-		require(false, stub_error);
-		to;
-		amount;
-		dummy = 0;
-		return false;
-	}
-
-	// Selector: transferFrom(address,address,uint256) 23b872dd
-	function transferFrom(
-		address from,
-		address to,
-		uint256 amount
-	) public returns (bool) {
-		require(false, stub_error);
-		from;
-		to;
-		amount;
-		dummy = 0;
-		return false;
-	}
-
-	// Selector: approve(address,uint256) 095ea7b3
-	function approve(address spender, uint256 amount) public returns (bool) {
-		require(false, stub_error);
-		spender;
-		amount;
-		dummy = 0;
-		return false;
-	}
-
-	// Selector: allowance(address,address) dd62ed3e
-	function allowance(address owner, address spender)
-		public
-		view
-		returns (uint256)
-	{
-		require(false, stub_error);
-		owner;
-		spender;
-		dummy;
-		return 0;
-	}
-}
-
-// Selector: ffe4da23
+/// @title A contract that allows you to work with collections.
+/// @dev the ERC-165 identifier for this interface is 0xffe4da23
 contract Collection is Dummy, ERC165 {
-	// Set collection property.
-	//
-	// @param key Property key.
-	// @param value Propery value.
-	//
-	// Selector: setCollectionProperty(string,bytes) 2f073f66
+	/// Set collection property.
+	///
+	/// @param key Property key.
+	/// @param value Propery value.
+	/// @dev EVM selector for this function is: 0x2f073f66,
+	///  or in textual repr: setCollectionProperty(string,bytes)
 	function setCollectionProperty(string memory key, bytes memory value)
 		public
 	{
@@ -144,25 +39,25 @@
 		dummy = 0;
 	}
 
-	// Delete collection property.
-	//
-	// @param key Property key.
-	//
-	// Selector: deleteCollectionProperty(string) 7b7debce
+	/// Delete collection property.
+	///
+	/// @param key Property key.
+	/// @dev EVM selector for this function is: 0x7b7debce,
+	///  or in textual repr: deleteCollectionProperty(string)
 	function deleteCollectionProperty(string memory key) public {
 		require(false, stub_error);
 		key;
 		dummy = 0;
 	}
 
-	// Get collection property.
-	//
-	// @dev Throws error if key not found.
-	//
-	// @param key Property key.
-	// @return bytes The property corresponding to the key.
-	//
-	// Selector: collectionProperty(string) cf24fd6d
+	/// Get collection property.
+	///
+	/// @dev Throws error if key not found.
+	///
+	/// @param key Property key.
+	/// @return bytes The property corresponding to the key.
+	/// @dev EVM selector for this function is: 0xcf24fd6d,
+	///  or in textual repr: collectionProperty(string)
 	function collectionProperty(string memory key)
 		public
 		view
@@ -174,41 +69,41 @@
 		return hex"";
 	}
 
-	// Set the sponsor of the collection.
-	//
-	// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
-	//
-	// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
-	//
-	// Selector: setCollectionSponsor(address) 7623402e
+	/// Set the sponsor of the collection.
+	///
+	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+	///
+	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+	/// @dev EVM selector for this function is: 0x7623402e,
+	///  or in textual repr: setCollectionSponsor(address)
 	function setCollectionSponsor(address sponsor) public {
 		require(false, stub_error);
 		sponsor;
 		dummy = 0;
 	}
 
-	// Collection sponsorship confirmation.
-	//
-	// @dev After setting the sponsor for the collection, it must be confirmed with this function.
-	//
-	// Selector: confirmCollectionSponsorship() 3c50e97a
+	/// Collection sponsorship confirmation.
+	///
+	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.
+	/// @dev EVM selector for this function is: 0x3c50e97a,
+	///  or in textual repr: confirmCollectionSponsorship()
 	function confirmCollectionSponsorship() public {
 		require(false, stub_error);
 		dummy = 0;
 	}
 
-	// Set limits for the collection.
-	// @dev Throws error if limit not found.
-	// @param limit Name of the limit. Valid names:
-	// 	"accountTokenOwnershipLimit",
-	// 	"sponsoredDataSize",
-	// 	"sponsoredDataRateLimit",
-	// 	"tokenLimit",
-	// 	"sponsorTransferTimeout",
-	// 	"sponsorApproveTimeout"
-	// @param value Value of the limit.
-	//
-	// Selector: setCollectionLimit(string,uint32) 6a3841db
+	/// Set limits for the collection.
+	/// @dev Throws error if limit not found.
+	/// @param limit Name of the limit. Valid names:
+	/// 	"accountTokenOwnershipLimit",
+	/// 	"sponsoredDataSize",
+	/// 	"sponsoredDataRateLimit",
+	/// 	"tokenLimit",
+	/// 	"sponsorTransferTimeout",
+	/// 	"sponsorApproveTimeout"
+	/// @param value Value of the limit.
+	/// @dev EVM selector for this function is: 0x6a3841db,
+	///  or in textual repr: setCollectionLimit(string,uint32)
 	function setCollectionLimit(string memory limit, uint32 value) public {
 		require(false, stub_error);
 		limit;
@@ -216,15 +111,15 @@
 		dummy = 0;
 	}
 
-	// Set limits for the collection.
-	// @dev Throws error if limit not found.
-	// @param limit Name of the limit. Valid names:
-	// 	"ownerCanTransfer",
-	// 	"ownerCanDestroy",
-	// 	"transfersEnabled"
-	// @param value Value of the limit.
-	//
-	// Selector: setCollectionLimit(string,bool) 993b7fba
+	/// Set limits for the collection.
+	/// @dev Throws error if limit not found.
+	/// @param limit Name of the limit. Valid names:
+	/// 	"ownerCanTransfer",
+	/// 	"ownerCanDestroy",
+	/// 	"transfersEnabled"
+	/// @param value Value of the limit.
+	/// @dev EVM selector for this function is: 0x993b7fba,
+	///  or in textual repr: setCollectionLimit(string,bool)
 	function setCollectionLimit(string memory limit, bool value) public {
 		require(false, stub_error);
 		limit;
@@ -232,73 +127,73 @@
 		dummy = 0;
 	}
 
-	// Get contract address.
-	//
-	// Selector: contractAddress() f6b4dfb4
+	/// Get contract address.
+	/// @dev EVM selector for this function is: 0xf6b4dfb4,
+	///  or in textual repr: contractAddress()
 	function contractAddress() public view returns (address) {
 		require(false, stub_error);
 		dummy;
 		return 0x0000000000000000000000000000000000000000;
 	}
 
-	// Add collection admin by substrate address.
-	// @param new_admin Substrate administrator address.
-	//
-	// Selector: addCollectionAdminSubstrate(uint256) 5730062b
+	/// 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.
-	//
-	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
+	/// 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 new_admin Address of the added administrator.
-	//
-	// Selector: addCollectionAdmin(address) 92e462c7
+	/// Add collection admin.
+	/// @param newAdmin Address of the added administrator.
+	/// @dev EVM selector for this function is: 0x92e462c7,
+	///  or in textual repr: addCollectionAdmin(address)
 	function addCollectionAdmin(address newAdmin) public {
 		require(false, stub_error);
 		newAdmin;
 		dummy = 0;
 	}
 
-	// Remove collection admin.
-	//
-	// @param new_admin Address of the removed administrator.
-	//
-	// Selector: removeCollectionAdmin(address) fafd7b42
+	/// Remove collection admin.
+	///
+	/// @param admin Address of the removed administrator.
+	/// @dev EVM selector for this function is: 0xfafd7b42,
+	///  or in textual repr: removeCollectionAdmin(address)
 	function removeCollectionAdmin(address admin) public {
 		require(false, stub_error);
 		admin;
 		dummy = 0;
 	}
 
-	// Toggle accessibility of collection nesting.
-	//
-	// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
-	//
-	// Selector: setCollectionNesting(bool) 112d4586
+	/// Toggle accessibility of collection nesting.
+	///
+	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+	/// @dev EVM selector for this function is: 0x112d4586,
+	///  or in textual repr: setCollectionNesting(bool)
 	function setCollectionNesting(bool enable) public {
 		require(false, stub_error);
 		enable;
 		dummy = 0;
 	}
 
-	// Toggle accessibility of collection nesting.
-	//
-	// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
-	// @param collections Addresses of collections that will be available for nesting.
-	//
-	// Selector: setCollectionNesting(bool,address[]) 64872396
+	/// Toggle accessibility of collection nesting.
+	///
+	/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+	/// @param collections Addresses of collections that will be available for nesting.
+	/// @dev EVM selector for this function is: 0x64872396,
+	///  or in textual repr: setCollectionNesting(bool,address[])
 	function setCollectionNesting(bool enable, address[] memory collections)
 		public
 	{
@@ -308,57 +203,57 @@
 		dummy = 0;
 	}
 
-	// Set the collection access method.
-	// @param mode Access mode
-	// 	0 for Normal
-	// 	1 for AllowList
-	//
-	// Selector: setCollectionAccess(uint8) 41835d4c
+	/// Set the collection access method.
+	/// @param mode Access mode
+	/// 	0 for Normal
+	/// 	1 for AllowList
+	/// @dev EVM selector for this function is: 0x41835d4c,
+	///  or in textual repr: setCollectionAccess(uint8)
 	function setCollectionAccess(uint8 mode) public {
 		require(false, stub_error);
 		mode;
 		dummy = 0;
 	}
 
-	// Add the user to the allowed list.
-	//
-	// @param user Address of a trusted user.
-	//
-	// Selector: addToCollectionAllowList(address) 67844fe6
+	/// Add the user to the allowed list.
+	///
+	/// @param user Address of a trusted user.
+	/// @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;
 	}
 
-	// Remove the user from the allowed list.
-	//
-	// @param user Address of a removed user.
-	//
-	// Selector: removeFromCollectionAllowList(address) 85c51acb
+	/// Remove the user from the allowed list.
+	///
+	/// @param user Address of a removed user.
+	/// @dev EVM selector for this function is: 0x85c51acb,
+	///  or in textual repr: removeFromCollectionAllowList(address)
 	function removeFromCollectionAllowList(address user) public {
 		require(false, stub_error);
 		user;
 		dummy = 0;
 	}
 
-	// Switch permission for minting.
-	//
-	// @param mode Enable if "true".
-	//
-	// Selector: setCollectionMintMode(bool) 00018e84
+	/// Switch permission for minting.
+	///
+	/// @param mode Enable if "true".
+	/// @dev EVM selector for this function is: 0x00018e84,
+	///  or in textual repr: setCollectionMintMode(bool)
 	function setCollectionMintMode(bool mode) public {
 		require(false, stub_error);
 		mode;
 		dummy = 0;
 	}
 
-	// Check that account is the owner or admin of the collection
-	//
-	// @param user account to verify
-	// @return "true" if account is the owner or admin
-	//
-	// Selector: isOwnerOrAdmin(address) 9811b0c7
+	/// Check that 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: 0x9811b0c7,
+	///  or in textual repr: isOwnerOrAdmin(address)
 	function isOwnerOrAdmin(address user) public view returns (bool) {
 		require(false, stub_error);
 		user;
@@ -366,12 +261,12 @@
 		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
-	//
-	// Selector: isOwnerOrAdminSubstrate(uint256) 68910e00
+	/// 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;
@@ -379,35 +274,35 @@
 		return false;
 	}
 
-	// Returns collection type
-	//
-	// @return `Fungible` or `NFT` or `ReFungible`
-	//
-	// Selector: uniqueCollectionType() d34b55b8
+	/// Returns collection type
+	///
+	/// @return `Fungible` or `NFT` or `ReFungible`
+	/// @dev EVM selector for this function is: 0xd34b55b8,
+	///  or in textual repr: uniqueCollectionType()
 	function uniqueCollectionType() public returns (string memory) {
 		require(false, stub_error);
 		dummy = 0;
 		return "";
 	}
 
-	// Changes collection owner to another account
-	//
-	// @dev Owner can be changed only by current owner
-	// @param newOwner new owner account
-	//
-	// Selector: setOwner(address) 13af4035
+	/// Changes collection owner to another account
+	///
+	/// @dev Owner can be changed only by current owner
+	/// @param newOwner new owner account
+	/// @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
-	//
-	// Selector: setOwnerSubstrate(uint256) b212138f
+	/// 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;
@@ -415,6 +310,122 @@
 	}
 }
 
+/// @dev the ERC-165 identifier for this interface is 0x79cc6790
+contract ERC20UniqueExtensions is Dummy, ERC165 {
+	/// @dev EVM selector for this function is: 0x79cc6790,
+	///  or in textual repr: burnFrom(address,uint256)
+	function burnFrom(address from, uint256 amount) public returns (bool) {
+		require(false, stub_error);
+		from;
+		amount;
+		dummy = 0;
+		return false;
+	}
+}
+
+/// @dev inlined interface
+contract ERC20Events {
+	event Transfer(address indexed from, address indexed to, uint256 value);
+	event Approval(
+		address indexed owner,
+		address indexed spender,
+		uint256 value
+	);
+}
+
+/// @dev the ERC-165 identifier for this interface is 0x942e8b22
+contract ERC20 is Dummy, ERC165, ERC20Events {
+	/// @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 "";
+	}
+
+	/// @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 "";
+	}
+
+	/// @dev EVM selector for this function is: 0x18160ddd,
+	///  or in textual repr: totalSupply()
+	function totalSupply() public view returns (uint256) {
+		require(false, stub_error);
+		dummy;
+		return 0;
+	}
+
+	/// @dev EVM selector for this function is: 0x313ce567,
+	///  or in textual repr: decimals()
+	function decimals() public view returns (uint8) {
+		require(false, stub_error);
+		dummy;
+		return 0;
+	}
+
+	/// @dev EVM selector for this function is: 0x70a08231,
+	///  or in textual repr: balanceOf(address)
+	function balanceOf(address owner) public view returns (uint256) {
+		require(false, stub_error);
+		owner;
+		dummy;
+		return 0;
+	}
+
+	/// @dev EVM selector for this function is: 0xa9059cbb,
+	///  or in textual repr: transfer(address,uint256)
+	function transfer(address to, uint256 amount) public returns (bool) {
+		require(false, stub_error);
+		to;
+		amount;
+		dummy = 0;
+		return false;
+	}
+
+	/// @dev EVM selector for this function is: 0x23b872dd,
+	///  or in textual repr: transferFrom(address,address,uint256)
+	function transferFrom(
+		address from,
+		address to,
+		uint256 amount
+	) public returns (bool) {
+		require(false, stub_error);
+		from;
+		to;
+		amount;
+		dummy = 0;
+		return false;
+	}
+
+	/// @dev EVM selector for this function is: 0x095ea7b3,
+	///  or in textual repr: approve(address,uint256)
+	function approve(address spender, uint256 amount) public returns (bool) {
+		require(false, stub_error);
+		spender;
+		amount;
+		dummy = 0;
+		return false;
+	}
+
+	/// @dev EVM selector for this function is: 0xdd62ed3e,
+	///  or in textual repr: allowance(address,address)
+	function allowance(address owner, address spender)
+		public
+		view
+		returns (uint256)
+	{
+		require(false, stub_error);
+		owner;
+		spender;
+		dummy;
+		return 0;
+	}
+}
+
 contract UniqueFungible is
 	Dummy,
 	ERC165,
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -50,14 +50,14 @@
 };
 
 /// @title A contract that allows to set and delete token properties and change token property permissions.
-#[solidity_interface(name = "TokenProperties")]
+#[solidity_interface(name = TokenProperties)]
 impl<T: Config> NonfungibleHandle<T> {
 	/// @notice Set permissions for token property.
 	/// @dev Throws error if `msg.sender` is not admin or owner of the collection.
 	/// @param key Property key.
-	/// @param is_mutable Permission to mutate property.
-	/// @param collection_admin Permission to mutate property by collection admin if property is mutable.
-	/// @param token_owner Permission to mutate property by token owner if property is mutable.
+	/// @param isMutable Permission to mutate property.
+	/// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.
+	/// @param tokenOwner Permission to mutate property by token owner if property is mutable.
 	fn set_token_property_permission(
 		&mut self,
 		caller: caller,
@@ -201,7 +201,7 @@
 
 /// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 /// @dev See https://eips.ethereum.org/EIPS/eip-721
-#[solidity_interface(name = "ERC721Metadata")]
+#[solidity_interface(name = ERC721Metadata, expect_selector = 0x5b5e139f)]
 impl<T: Config> NonfungibleHandle<T> {
 	/// @notice A descriptive name for a collection of NFTs in this contract
 	fn name(&self) -> Result<string> {
@@ -262,7 +262,7 @@
 
 /// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 /// @dev See https://eips.ethereum.org/EIPS/eip-721
-#[solidity_interface(name = "ERC721Enumerable")]
+#[solidity_interface(name = ERC721Enumerable, expect_selector = 0x780e9d63)]
 impl<T: Config> NonfungibleHandle<T> {
 	/// @notice Enumerate valid NFTs
 	/// @param index A counter less than `totalSupply()`
@@ -289,7 +289,7 @@
 
 /// @title ERC-721 Non-Fungible Token Standard
 /// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
-#[solidity_interface(name = "ERC721", events(ERC721Events))]
+#[solidity_interface(name = ERC721, events(ERC721Events), expect_selector = 0x80ac58cd)]
 impl<T: Config> NonfungibleHandle<T> {
 	/// @notice Count all NFTs assigned to an owner
 	/// @dev NFTs assigned to the zero address are considered invalid, and this
@@ -316,13 +316,13 @@
 			.as_eth())
 	}
 	/// @dev Not implemented
+	#[solidity(rename_selector = "safeTransferFrom")]
 	fn safe_transfer_from_with_data(
 		&mut self,
 		_from: address,
 		_to: address,
 		_token_id: uint256,
 		_data: bytes,
-		_value: value,
 	) -> Result<void> {
 		// TODO: Not implemetable
 		Err("not implemented".into())
@@ -333,7 +333,6 @@
 		_from: address,
 		_to: address,
 		_token_id: uint256,
-		_value: value,
 	) -> Result<void> {
 		// TODO: Not implemetable
 		Err("not implemented".into())
@@ -348,7 +347,6 @@
 	/// @param from The current owner of the NFT
 	/// @param to The new owner
 	/// @param tokenId The NFT to transfer
-	/// @param _value Not used for an NFT
 	#[weight(<SelfWeightOf<T>>::transfer_from())]
 	fn transfer_from(
 		&mut self,
@@ -356,7 +354,6 @@
 		from: address,
 		to: address,
 		token_id: uint256,
-		_value: value,
 	) -> Result<void> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let from = T::CrossAccountId::from_eth(from);
@@ -378,13 +375,7 @@
 	/// @param approved The new approved NFT controller
 	/// @param tokenId The NFT to approve
 	#[weight(<SelfWeightOf<T>>::approve())]
-	fn approve(
-		&mut self,
-		caller: caller,
-		approved: address,
-		token_id: uint256,
-		_value: value,
-	) -> Result<void> {
+	fn approve(&mut self, caller: caller, approved: address, token_id: uint256) -> Result<void> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let approved = T::CrossAccountId::from_eth(approved);
 		let token = token_id.try_into()?;
@@ -419,7 +410,7 @@
 }
 
 /// @title ERC721 Token that can be irreversibly burned (destroyed).
-#[solidity_interface(name = "ERC721Burnable")]
+#[solidity_interface(name = ERC721Burnable)]
 impl<T: Config> NonfungibleHandle<T> {
 	/// @notice Burns a specific ERC721 token.
 	/// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized
@@ -436,7 +427,7 @@
 }
 
 /// @title ERC721 minting logic.
-#[solidity_interface(name = "ERC721Mintable", events(ERC721MintableEvents))]
+#[solidity_interface(name = ERC721Mintable, events(ERC721MintableEvents))]
 impl<T: Config> NonfungibleHandle<T> {
 	fn minting_finished(&self) -> Result<bool> {
 		Ok(false)
@@ -597,22 +588,15 @@
 }
 
 /// @title Unique extensions for ERC721.
-#[solidity_interface(name = "ERC721UniqueExtensions")]
+#[solidity_interface(name = ERC721UniqueExtensions)]
 impl<T: Config> NonfungibleHandle<T> {
 	/// @notice Transfer ownership of an NFT
 	/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
 	///  is the zero address. Throws if `tokenId` is not a valid NFT.
 	/// @param to The new owner
 	/// @param tokenId The NFT to transfer
-	/// @param _value Not used for an NFT
 	#[weight(<SelfWeightOf<T>>::transfer())]
-	fn transfer(
-		&mut self,
-		caller: caller,
-		to: address,
-		token_id: uint256,
-		_value: value,
-	) -> Result<void> {
+	fn transfer(&mut self, caller: caller, to: address, token_id: uint256) -> Result<void> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let to = T::CrossAccountId::from_eth(to);
 		let token = token_id.try_into()?;
@@ -630,15 +614,8 @@
 	///  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.
 	/// @param from The current owner of the NFT
 	/// @param tokenId The NFT to transfer
-	/// @param _value Not used for an NFT
 	#[weight(<SelfWeightOf<T>>::burn_from())]
-	fn burn_from(
-		&mut self,
-		caller: caller,
-		from: address,
-		token_id: uint256,
-		_value: value,
-	) -> Result<void> {
+	fn burn_from(&mut self, caller: caller, from: address, token_id: uint256) -> Result<void> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let from = T::CrossAccountId::from_eth(from);
 		let token = token_id.try_into()?;
@@ -751,7 +728,7 @@
 }
 
 #[solidity_interface(
-	name = "UniqueNFT",
+	name = UniqueNFT,
 	is(
 		ERC721,
 		ERC721Metadata,
@@ -759,7 +736,7 @@
 		ERC721UniqueExtensions,
 		ERC721Mintable,
 		ERC721Burnable,
-		via("CollectionHandle<T>", common_mut, Collection),
+		Collection(common_mut, CollectionHandle<T>),
 		TokenProperties,
 	)
 )]
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
@@ -3,13 +3,7 @@
 
 pragma solidity >=0.8.0 <0.9.0;
 
-// Anonymous struct
-struct Tuple0 {
-	uint256 field_0;
-	string field_1;
-}
-
-// Common stubs holder
+/// @dev common stubs holder
 contract Dummy {
 	uint8 dummy;
 	string stub_error = "this contract is implemented in native";
@@ -27,40 +21,17 @@
 	}
 }
 
-// Inline
-contract ERC721Events {
-	event Transfer(
-		address indexed from,
-		address indexed to,
-		uint256 indexed tokenId
-	);
-	event Approval(
-		address indexed owner,
-		address indexed approved,
-		uint256 indexed tokenId
-	);
-	event ApprovalForAll(
-		address indexed owner,
-		address indexed operator,
-		bool approved
-	);
-}
-
-// Inline
-contract ERC721MintableEvents {
-	event MintingFinished();
-}
-
-// Selector: 41369377
+/// @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 {
-	// @notice Set permissions for token property.
-	// @dev Throws error if `msg.sender` is not admin or owner of the collection.
-	// @param key Property key.
-	// @param is_mutable Permission to mutate property.
-	// @param collection_admin Permission to mutate property by collection admin if property is mutable.
-	// @param token_owner Permission to mutate property by token owner if property is mutable.
-	//
-	// Selector: setTokenPropertyPermission(string,bool,bool,bool) 222d97fa
+	/// @notice Set permissions for token property.
+	/// @dev Throws error if `msg.sender` is not admin or owner of the collection.
+	/// @param key Property key.
+	/// @param isMutable Permission to mutate property.
+	/// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.
+	/// @param tokenOwner Permission to mutate property by token owner if property is mutable.
+	/// @dev EVM selector for this function is: 0x222d97fa,
+	///  or in textual repr: setTokenPropertyPermission(string,bool,bool,bool)
 	function setTokenPropertyPermission(
 		string memory key,
 		bool isMutable,
@@ -75,13 +46,13 @@
 		dummy = 0;
 	}
 
-	// @notice Set token property value.
-	// @dev Throws error if `msg.sender` has no permission to edit the property.
-	// @param tokenId ID of the token.
-	// @param key Property key.
-	// @param value Property value.
-	//
-	// Selector: setProperty(uint256,string,bytes) 1752d67b
+	/// @notice Set token property value.
+	/// @dev Throws error if `msg.sender` has no permission to edit the property.
+	/// @param tokenId ID of the token.
+	/// @param key Property key.
+	/// @param value Property value.
+	/// @dev EVM selector for this function is: 0x1752d67b,
+	///  or in textual repr: setProperty(uint256,string,bytes)
 	function setProperty(
 		uint256 tokenId,
 		string memory key,
@@ -94,12 +65,12 @@
 		dummy = 0;
 	}
 
-	// @notice Delete token property value.
-	// @dev Throws error if `msg.sender` has no permission to edit the property.
-	// @param tokenId ID of the token.
-	// @param key Property key.
-	//
-	// Selector: deleteProperty(uint256,string) 066111d1
+	/// @notice Delete token property value.
+	/// @dev Throws error if `msg.sender` has no permission to edit the property.
+	/// @param tokenId ID of the token.
+	/// @param key Property key.
+	/// @dev EVM selector for this function is: 0x066111d1,
+	///  or in textual repr: deleteProperty(uint256,string)
 	function deleteProperty(uint256 tokenId, string memory key) public {
 		require(false, stub_error);
 		tokenId;
@@ -107,13 +78,13 @@
 		dummy = 0;
 	}
 
-	// @notice Get token property value.
-	// @dev Throws error if key not found
-	// @param tokenId ID of the token.
-	// @param key Property key.
-	// @return Property value bytes
-	//
-	// Selector: property(uint256,string) 7228c327
+	/// @notice Get token property value.
+	/// @dev Throws error if key not found
+	/// @param tokenId ID of the token.
+	/// @param key Property key.
+	/// @return Property value bytes
+	/// @dev EVM selector for this function is: 0x7228c327,
+	///  or in textual repr: property(uint256,string)
 	function property(uint256 tokenId, string memory key)
 		public
 		view
@@ -127,213 +98,334 @@
 	}
 }
 
-// Selector: 42966c68
-contract ERC721Burnable is Dummy, ERC165 {
-	// @notice Burns a specific ERC721 token.
-	// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized
-	//  operator of the current owner.
-	// @param tokenId The NFT to approve
-	//
-	// Selector: burn(uint256) 42966c68
-	function burn(uint256 tokenId) public {
+/// @title A contract that allows you to work with collections.
+/// @dev the ERC-165 identifier for this interface is 0xffe4da23
+contract Collection is Dummy, ERC165 {
+	/// Set collection property.
+	///
+	/// @param key Property key.
+	/// @param value Propery value.
+	/// @dev EVM selector for this function is: 0x2f073f66,
+	///  or in textual repr: setCollectionProperty(string,bytes)
+	function setCollectionProperty(string memory key, bytes memory value)
+		public
+	{
 		require(false, stub_error);
-		tokenId;
+		key;
+		value;
 		dummy = 0;
 	}
-}
 
-// Selector: 58800161
-contract ERC721 is Dummy, ERC165, ERC721Events {
-	// @notice Count all NFTs assigned to an owner
-	// @dev NFTs assigned to the zero address are considered invalid, and this
-	//  function throws for queries about the zero address.
-	// @param owner An address for whom to query the balance
-	// @return The number of NFTs owned by `owner`, possibly zero
-	//
-	// Selector: balanceOf(address) 70a08231
-	function balanceOf(address owner) public view returns (uint256) {
+	/// Delete collection property.
+	///
+	/// @param key Property key.
+	/// @dev EVM selector for this function is: 0x7b7debce,
+	///  or in textual repr: deleteCollectionProperty(string)
+	function deleteCollectionProperty(string memory key) public {
 		require(false, stub_error);
-		owner;
-		dummy;
-		return 0;
+		key;
+		dummy = 0;
 	}
 
-	// @notice Find the owner of an NFT
-	// @dev NFTs assigned to zero address are considered invalid, and queries
-	//  about them do throw.
-	// @param tokenId The identifier for an NFT
-	// @return The address of the owner of the NFT
-	//
-	// Selector: ownerOf(uint256) 6352211e
-	function ownerOf(uint256 tokenId) public view returns (address) {
+	/// Get collection property.
+	///
+	/// @dev Throws error if key not found.
+	///
+	/// @param key Property key.
+	/// @return bytes The property corresponding to the key.
+	/// @dev EVM selector for this function is: 0xcf24fd6d,
+	///  or in textual repr: collectionProperty(string)
+	function collectionProperty(string memory key)
+		public
+		view
+		returns (bytes memory)
+	{
 		require(false, stub_error);
-		tokenId;
+		key;
 		dummy;
-		return 0x0000000000000000000000000000000000000000;
+		return hex"";
 	}
 
-	// @dev Not implemented
-	//
-	// Selector: safeTransferFromWithData(address,address,uint256,bytes) 60a11672
-	function safeTransferFromWithData(
-		address from,
-		address to,
-		uint256 tokenId,
-		bytes memory data
-	) public {
+	/// Set the sponsor of the collection.
+	///
+	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+	///
+	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+	/// @dev EVM selector for this function is: 0x7623402e,
+	///  or in textual repr: setCollectionSponsor(address)
+	function setCollectionSponsor(address sponsor) public {
 		require(false, stub_error);
-		from;
-		to;
-		tokenId;
-		data;
+		sponsor;
 		dummy = 0;
 	}
 
-	// @dev Not implemented
-	//
-	// Selector: safeTransferFrom(address,address,uint256) 42842e0e
-	function safeTransferFrom(
-		address from,
-		address to,
-		uint256 tokenId
-	) public {
+	/// Collection sponsorship confirmation.
+	///
+	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.
+	/// @dev EVM selector for this function is: 0x3c50e97a,
+	///  or in textual repr: confirmCollectionSponsorship()
+	function confirmCollectionSponsorship() public {
 		require(false, stub_error);
-		from;
-		to;
-		tokenId;
 		dummy = 0;
 	}
 
-	// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
-	//  TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE
-	//  THEY MAY BE PERMANENTLY LOST
-	// @dev Throws unless `msg.sender` is the current owner or an authorized
-	//  operator for this NFT. Throws if `from` is not the current owner. Throws
-	//  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.
-	// @param from The current owner of the NFT
-	// @param to The new owner
-	// @param tokenId The NFT to transfer
-	// @param _value Not used for an NFT
-	//
-	// Selector: transferFrom(address,address,uint256) 23b872dd
-	function transferFrom(
-		address from,
-		address to,
-		uint256 tokenId
-	) public {
+	/// Set limits for the collection.
+	/// @dev Throws error if limit not found.
+	/// @param limit Name of the limit. Valid names:
+	/// 	"accountTokenOwnershipLimit",
+	/// 	"sponsoredDataSize",
+	/// 	"sponsoredDataRateLimit",
+	/// 	"tokenLimit",
+	/// 	"sponsorTransferTimeout",
+	/// 	"sponsorApproveTimeout"
+	/// @param value Value of the limit.
+	/// @dev EVM selector for this function is: 0x6a3841db,
+	///  or in textual repr: setCollectionLimit(string,uint32)
+	function setCollectionLimit(string memory limit, uint32 value) public {
 		require(false, stub_error);
-		from;
-		to;
-		tokenId;
+		limit;
+		value;
 		dummy = 0;
 	}
 
-	// @notice Set or reaffirm the approved address for an NFT
-	// @dev The zero address indicates there is no approved address.
-	// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized
-	//  operator of the current owner.
-	// @param approved The new approved NFT controller
-	// @param tokenId The NFT to approve
-	//
-	// Selector: approve(address,uint256) 095ea7b3
-	function approve(address approved, uint256 tokenId) public {
+	/// Set limits for the collection.
+	/// @dev Throws error if limit not found.
+	/// @param limit Name of the limit. Valid names:
+	/// 	"ownerCanTransfer",
+	/// 	"ownerCanDestroy",
+	/// 	"transfersEnabled"
+	/// @param value Value of the limit.
+	/// @dev EVM selector for this function is: 0x993b7fba,
+	///  or in textual repr: setCollectionLimit(string,bool)
+	function setCollectionLimit(string memory limit, bool value) public {
 		require(false, stub_error);
-		approved;
-		tokenId;
+		limit;
+		value;
 		dummy = 0;
 	}
 
-	// @dev Not implemented
-	//
-	// Selector: setApprovalForAll(address,bool) a22cb465
-	function setApprovalForAll(address operator, bool approved) public {
+	/// Get contract address.
+	/// @dev EVM selector for this function is: 0xf6b4dfb4,
+	///  or in textual repr: contractAddress()
+	function contractAddress() public view returns (address) {
+		require(false, stub_error);
+		dummy;
+		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,
+	///  or in textual repr: addCollectionAdmin(address)
+	function addCollectionAdmin(address newAdmin) public {
+		require(false, stub_error);
+		newAdmin;
+		dummy = 0;
+	}
+
+	/// Remove collection admin.
+	///
+	/// @param admin Address of the removed administrator.
+	/// @dev EVM selector for this function is: 0xfafd7b42,
+	///  or in textual repr: removeCollectionAdmin(address)
+	function removeCollectionAdmin(address admin) public {
 		require(false, stub_error);
-		operator;
-		approved;
+		admin;
 		dummy = 0;
 	}
 
-	// @dev Not implemented
-	//
-	// Selector: getApproved(uint256) 081812fc
-	function getApproved(uint256 tokenId) public view returns (address) {
+	/// Toggle accessibility of collection nesting.
+	///
+	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+	/// @dev EVM selector for this function is: 0x112d4586,
+	///  or in textual repr: setCollectionNesting(bool)
+	function setCollectionNesting(bool enable) public {
 		require(false, stub_error);
-		tokenId;
-		dummy;
-		return 0x0000000000000000000000000000000000000000;
+		enable;
+		dummy = 0;
 	}
 
-	// @dev Not implemented
-	//
-	// Selector: isApprovedForAll(address,address) e985e9c5
-	function isApprovedForAll(address owner, address operator)
+	/// Toggle accessibility of collection nesting.
+	///
+	/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+	/// @param collections Addresses of collections that will be available for nesting.
+	/// @dev EVM selector for this function is: 0x64872396,
+	///  or in textual repr: setCollectionNesting(bool,address[])
+	function setCollectionNesting(bool enable, address[] memory collections)
 		public
-		view
-		returns (address)
 	{
 		require(false, stub_error);
-		owner;
-		operator;
+		enable;
+		collections;
+		dummy = 0;
+	}
+
+	/// Set the collection access method.
+	/// @param mode Access mode
+	/// 	0 for Normal
+	/// 	1 for AllowList
+	/// @dev EVM selector for this function is: 0x41835d4c,
+	///  or in textual repr: setCollectionAccess(uint8)
+	function setCollectionAccess(uint8 mode) public {
+		require(false, stub_error);
+		mode;
+		dummy = 0;
+	}
+
+	/// Add the user to the allowed list.
+	///
+	/// @param user Address of a trusted user.
+	/// @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;
+	}
+
+	/// Remove the user from the allowed list.
+	///
+	/// @param user Address of a removed user.
+	/// @dev EVM selector for this function is: 0x85c51acb,
+	///  or in textual repr: removeFromCollectionAllowList(address)
+	function removeFromCollectionAllowList(address user) public {
+		require(false, stub_error);
+		user;
+		dummy = 0;
+	}
+
+	/// Switch permission for minting.
+	///
+	/// @param mode Enable if "true".
+	/// @dev EVM selector for this function is: 0x00018e84,
+	///  or in textual repr: setCollectionMintMode(bool)
+	function setCollectionMintMode(bool mode) public {
+		require(false, stub_error);
+		mode;
+		dummy = 0;
+	}
+
+	/// Check that 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: 0x9811b0c7,
+	///  or in textual repr: isOwnerOrAdmin(address)
+	function isOwnerOrAdmin(address user) public view returns (bool) {
+		require(false, stub_error);
+		user;
 		dummy;
-		return 0x0000000000000000000000000000000000000000;
+		return false;
 	}
-}
 
-// Selector: 5b5e139f
-contract ERC721Metadata is Dummy, ERC165 {
-	// @notice A descriptive name for a collection of NFTs in this contract
-	//
-	// Selector: name() 06fdde03
-	function name() public view returns (string memory) {
+	/// 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`
+	/// @dev EVM selector for this function is: 0xd34b55b8,
+	///  or in textual repr: uniqueCollectionType()
+	function uniqueCollectionType() public returns (string memory) {
+		require(false, stub_error);
+		dummy = 0;
 		return "";
 	}
 
-	// @notice An abbreviated name for NFTs in this contract
-	//
-	// Selector: symbol() 95d89b41
-	function symbol() public view returns (string memory) {
+	/// Changes collection owner to another account
+	///
+	/// @dev Owner can be changed only by current owner
+	/// @param newOwner new owner account
+	/// @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);
-		dummy;
-		return "";
+		newOwner;
+		dummy = 0;
 	}
+}
 
-	// @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
-	//
-	// Selector: tokenURI(uint256) c87b56dd
-	function tokenURI(uint256 tokenId) public view returns (string memory) {
+/// @title ERC721 Token that can be irreversibly burned (destroyed).
+/// @dev the ERC-165 identifier for this interface is 0x42966c68
+contract ERC721Burnable is Dummy, ERC165 {
+	/// @notice Burns a specific ERC721 token.
+	/// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized
+	///  operator of the current owner.
+	/// @param tokenId The NFT to approve
+	/// @dev EVM selector for this function is: 0x42966c68,
+	///  or in textual repr: burn(uint256)
+	function burn(uint256 tokenId) public {
 		require(false, stub_error);
 		tokenId;
-		dummy;
-		return "";
+		dummy = 0;
 	}
 }
 
-// Selector: 68ccfe89
+/// @dev inlined interface
+contract ERC721MintableEvents {
+	event MintingFinished();
+}
+
+/// @title ERC721 minting logic.
+/// @dev the ERC-165 identifier for this interface is 0x68ccfe89
 contract ERC721Mintable is Dummy, ERC165, ERC721MintableEvents {
-	// Selector: mintingFinished() 05d2035b
+	/// @dev EVM selector for this function is: 0x05d2035b,
+	///  or in textual repr: mintingFinished()
 	function mintingFinished() public view returns (bool) {
 		require(false, stub_error);
 		dummy;
 		return false;
 	}
 
-	// @notice Function to mint token.
-	// @dev `tokenId` should be obtained with `nextTokenId` method,
-	//  unlike standard, you can't specify it manually
-	// @param to The new owner
-	// @param tokenId ID of the minted NFT
-	//
-	// Selector: mint(address,uint256) 40c10f19
+	/// @notice Function to mint token.
+	/// @dev `tokenId` should be obtained with `nextTokenId` method,
+	///  unlike standard, you can't specify it manually
+	/// @param to The new owner
+	/// @param tokenId ID of the minted NFT
+	/// @dev EVM selector for this function is: 0x40c10f19,
+	///  or in textual repr: mint(address,uint256)
 	function mint(address to, uint256 tokenId) public returns (bool) {
 		require(false, stub_error);
 		to;
@@ -342,14 +434,14 @@
 		return false;
 	}
 
-	// @notice Function to mint token with the given tokenUri.
-	// @dev `tokenId` should be obtained with `nextTokenId` method,
-	//  unlike standard, you can't specify it manually
-	// @param to The new owner
-	// @param tokenId ID of the minted NFT
-	// @param tokenUri Token URI that would be stored in the NFT properties
-	//
-	// Selector: mintWithTokenURI(address,uint256,string) 50bb4e7f
+	/// @notice Function to mint token with the given tokenUri.
+	/// @dev `tokenId` should be obtained with `nextTokenId` method,
+	///  unlike standard, you can't specify it manually
+	/// @param to The new owner
+	/// @param tokenId ID of the minted NFT
+	/// @param tokenUri Token URI that would be stored in the NFT properties
+	/// @dev EVM selector for this function is: 0x50bb4e7f,
+	///  or in textual repr: mintWithTokenURI(address,uint256,string)
 	function mintWithTokenURI(
 		address to,
 		uint256 tokenId,
@@ -363,9 +455,9 @@
 		return false;
 	}
 
-	// @dev Not implemented
-	//
-	// Selector: finishMinting() 7d64bcb4
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x7d64bcb4,
+	///  or in textual repr: finishMinting()
 	function finishMinting() public returns (bool) {
 		require(false, stub_error);
 		dummy = 0;
@@ -373,58 +465,16 @@
 	}
 }
 
-// Selector: 780e9d63
-contract ERC721Enumerable is Dummy, ERC165 {
-	// @notice Enumerate valid NFTs
-	// @param index A counter less than `totalSupply()`
-	// @return The token identifier for the `index`th NFT,
-	//  (sort order not specified)
-	//
-	// Selector: tokenByIndex(uint256) 4f6ccce7
-	function tokenByIndex(uint256 index) public view returns (uint256) {
-		require(false, stub_error);
-		index;
-		dummy;
-		return 0;
-	}
-
-	// @dev Not implemented
-	//
-	// Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
-	function tokenOfOwnerByIndex(address owner, uint256 index)
-		public
-		view
-		returns (uint256)
-	{
-		require(false, stub_error);
-		owner;
-		index;
-		dummy;
-		return 0;
-	}
-
-	// @notice Count NFTs tracked by this contract
-	// @return A count of valid NFTs tracked by this contract, where each one of
-	//  them has an assigned and queryable owner not equal to the zero address
-	//
-	// Selector: totalSupply() 18160ddd
-	function totalSupply() public view returns (uint256) {
-		require(false, stub_error);
-		dummy;
-		return 0;
-	}
-}
-
-// Selector: d74d154f
+/// @title Unique extensions for ERC721.
+/// @dev the ERC-165 identifier for this interface is 0xd74d154f
 contract ERC721UniqueExtensions is Dummy, ERC165 {
-	// @notice Transfer ownership of an NFT
-	// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
-	//  is the zero address. Throws if `tokenId` is not a valid NFT.
-	// @param to The new owner
-	// @param tokenId The NFT to transfer
-	// @param _value Not used for an NFT
-	//
-	// Selector: transfer(address,uint256) a9059cbb
+	/// @notice Transfer ownership of an NFT
+	/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
+	///  is the zero address. Throws if `tokenId` is not a valid NFT.
+	/// @param to The new owner
+	/// @param tokenId The NFT to transfer
+	/// @dev EVM selector for this function is: 0xa9059cbb,
+	///  or in textual repr: transfer(address,uint256)
 	function transfer(address to, uint256 tokenId) public {
 		require(false, stub_error);
 		to;
@@ -432,15 +482,14 @@
 		dummy = 0;
 	}
 
-	// @notice Burns a specific ERC721 token.
-	// @dev Throws unless `msg.sender` is the current owner or an authorized
-	//  operator for this NFT. Throws if `from` is not the current owner. Throws
-	//  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.
-	// @param from The current owner of the NFT
-	// @param tokenId The NFT to transfer
-	// @param _value Not used for an NFT
-	//
-	// Selector: burnFrom(address,uint256) 79cc6790
+	/// @notice Burns a specific ERC721 token.
+	/// @dev Throws unless `msg.sender` is the current owner or an authorized
+	///  operator for this NFT. Throws if `from` is not the current owner. Throws
+	///  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.
+	/// @param from The current owner of the NFT
+	/// @param tokenId The NFT to transfer
+	/// @dev EVM selector for this function is: 0x79cc6790,
+	///  or in textual repr: burnFrom(address,uint256)
 	function burnFrom(address from, uint256 tokenId) public {
 		require(false, stub_error);
 		from;
@@ -448,22 +497,22 @@
 		dummy = 0;
 	}
 
-	// @notice Returns next free NFT ID.
-	//
-	// Selector: nextTokenId() 75794a3c
+	/// @notice Returns next free NFT ID.
+	/// @dev EVM selector for this function is: 0x75794a3c,
+	///  or in textual repr: nextTokenId()
 	function nextTokenId() public view returns (uint256) {
 		require(false, stub_error);
 		dummy;
 		return 0;
 	}
 
-	// @notice Function to mint multiple tokens.
-	// @dev `tokenIds` should be an array of consecutive numbers and first number
-	//  should be obtained with `nextTokenId` method
-	// @param to The new owner
-	// @param tokenIds IDs of the minted NFTs
-	//
-	// Selector: mintBulk(address,uint256[]) 44a9945e
+	/// @notice Function to mint multiple tokens.
+	/// @dev `tokenIds` should be an array of consecutive numbers and first number
+	///  should be obtained with `nextTokenId` method
+	/// @param to The new owner
+	/// @param tokenIds IDs of the minted NFTs
+	/// @dev EVM selector for this function is: 0x44a9945e,
+	///  or in textual repr: mintBulk(address,uint256[])
 	function mintBulk(address to, uint256[] memory tokenIds)
 		public
 		returns (bool)
@@ -475,14 +524,14 @@
 		return false;
 	}
 
-	// @notice Function to mint multiple tokens with the given tokenUris.
-	// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
-	//  numbers and first number should be obtained with `nextTokenId` method
-	// @param to The new owner
-	// @param tokens array of pairs of token ID and token URI for minted tokens
-	//
-	// Selector: mintBulkWithTokenURI(address,(uint256,string)[]) 36543006
-	function mintBulkWithTokenURI(address to, Tuple0[] memory tokens)
+	/// @notice Function to mint multiple tokens with the given tokenUris.
+	/// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
+	///  numbers and first number should be obtained with `nextTokenId` method
+	/// @param to The new owner
+	/// @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)
 	{
@@ -494,291 +543,251 @@
 	}
 }
 
-// Selector: ffe4da23
-contract Collection is Dummy, ERC165 {
-	// Set collection property.
-	//
-	// @param key Property key.
-	// @param value Propery value.
-	//
-	// Selector: setCollectionProperty(string,bytes) 2f073f66
-	function setCollectionProperty(string memory key, bytes memory value)
-		public
-	{
-		require(false, stub_error);
-		key;
-		value;
-		dummy = 0;
-	}
+/// @dev anonymous struct
+struct Tuple8 {
+	uint256 field_0;
+	string field_1;
+}
 
-	// Delete collection property.
-	//
-	// @param key Property key.
-	//
-	// Selector: deleteCollectionProperty(string) 7b7debce
-	function deleteCollectionProperty(string memory key) public {
+/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
+/// @dev See https://eips.ethereum.org/EIPS/eip-721
+/// @dev the ERC-165 identifier for this interface is 0x780e9d63
+contract ERC721Enumerable is Dummy, ERC165 {
+	/// @notice Enumerate valid NFTs
+	/// @param index A counter less than `totalSupply()`
+	/// @return The token identifier for the `index`th NFT,
+	///  (sort order not specified)
+	/// @dev EVM selector for this function is: 0x4f6ccce7,
+	///  or in textual repr: tokenByIndex(uint256)
+	function tokenByIndex(uint256 index) public view returns (uint256) {
 		require(false, stub_error);
-		key;
-		dummy = 0;
+		index;
+		dummy;
+		return 0;
 	}
 
-	// Get collection property.
-	//
-	// @dev Throws error if key not found.
-	//
-	// @param key Property key.
-	// @return bytes The property corresponding to the key.
-	//
-	// Selector: collectionProperty(string) cf24fd6d
-	function collectionProperty(string memory key)
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x2f745c59,
+	///  or in textual repr: tokenOfOwnerByIndex(address,uint256)
+	function tokenOfOwnerByIndex(address owner, uint256 index)
 		public
 		view
-		returns (bytes memory)
+		returns (uint256)
 	{
 		require(false, stub_error);
-		key;
+		owner;
+		index;
 		dummy;
-		return hex"";
+		return 0;
 	}
 
-	// Set the sponsor of the collection.
-	//
-	// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
-	//
-	// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
-	//
-	// Selector: setCollectionSponsor(address) 7623402e
-	function setCollectionSponsor(address sponsor) public {
+	/// @notice Count NFTs tracked by this contract
+	/// @return A count of valid NFTs tracked by this contract, where each one of
+	///  them has an assigned and queryable owner not equal to the zero address
+	/// @dev EVM selector for this function is: 0x18160ddd,
+	///  or in textual repr: totalSupply()
+	function totalSupply() public view returns (uint256) {
 		require(false, stub_error);
-		sponsor;
-		dummy = 0;
+		dummy;
+		return 0;
 	}
+}
 
-	// Collection sponsorship confirmation.
-	//
-	// @dev After setting the sponsor for the collection, it must be confirmed with this function.
-	//
-	// Selector: confirmCollectionSponsorship() 3c50e97a
-	function confirmCollectionSponsorship() public {
+/// @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 = 0;
+		dummy;
+		return "";
 	}
 
-	// Set limits for the collection.
-	// @dev Throws error if limit not found.
-	// @param limit Name of the limit. Valid names:
-	// 	"accountTokenOwnershipLimit",
-	// 	"sponsoredDataSize",
-	// 	"sponsoredDataRateLimit",
-	// 	"tokenLimit",
-	// 	"sponsorTransferTimeout",
-	// 	"sponsorApproveTimeout"
-	// @param value Value of the limit.
-	//
-	// Selector: setCollectionLimit(string,uint32) 6a3841db
-	function setCollectionLimit(string memory limit, uint32 value) public {
+	/// @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);
-		limit;
-		value;
-		dummy = 0;
+		dummy;
+		return "";
 	}
 
-	// Set limits for the collection.
-	// @dev Throws error if limit not found.
-	// @param limit Name of the limit. Valid names:
-	// 	"ownerCanTransfer",
-	// 	"ownerCanDestroy",
-	// 	"transfersEnabled"
-	// @param value Value of the limit.
-	//
-	// Selector: setCollectionLimit(string,bool) 993b7fba
-	function setCollectionLimit(string memory limit, bool value) public {
+	/// @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);
-		limit;
-		value;
-		dummy = 0;
-	}
-
-	// Get contract address.
-	//
-	// Selector: contractAddress() f6b4dfb4
-	function contractAddress() public view returns (address) {
-		require(false, stub_error);
+		tokenId;
 		dummy;
-		return 0x0000000000000000000000000000000000000000;
+		return "";
 	}
+}
 
-	// Add collection admin by substrate address.
-	// @param new_admin Substrate administrator address.
-	//
-	// Selector: addCollectionAdminSubstrate(uint256) 5730062b
-	function addCollectionAdminSubstrate(uint256 newAdmin) public {
-		require(false, stub_error);
-		newAdmin;
-		dummy = 0;
-	}
+/// @dev inlined interface
+contract ERC721Events {
+	event Transfer(
+		address indexed from,
+		address indexed to,
+		uint256 indexed tokenId
+	);
+	event Approval(
+		address indexed owner,
+		address indexed approved,
+		uint256 indexed tokenId
+	);
+	event ApprovalForAll(
+		address indexed owner,
+		address indexed operator,
+		bool approved
+	);
+}
 
-	// Remove collection admin by substrate address.
-	// @param admin Substrate administrator address.
-	//
-	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
-	function removeCollectionAdminSubstrate(uint256 admin) public {
+/// @title ERC-721 Non-Fungible Token Standard
+/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
+/// @dev the ERC-165 identifier for this interface is 0x80ac58cd
+contract ERC721 is Dummy, ERC165, ERC721Events {
+	/// @notice Count all NFTs assigned to an owner
+	/// @dev NFTs assigned to the zero address are considered invalid, and this
+	///  function throws for queries about the zero address.
+	/// @param owner An address for whom to query the balance
+	/// @return The number of NFTs owned by `owner`, possibly zero
+	/// @dev EVM selector for this function is: 0x70a08231,
+	///  or in textual repr: balanceOf(address)
+	function balanceOf(address owner) public view returns (uint256) {
 		require(false, stub_error);
-		admin;
-		dummy = 0;
+		owner;
+		dummy;
+		return 0;
 	}
 
-	// Add collection admin.
-	// @param new_admin Address of the added administrator.
-	//
-	// Selector: addCollectionAdmin(address) 92e462c7
-	function addCollectionAdmin(address newAdmin) public {
+	/// @notice Find the owner of an NFT
+	/// @dev NFTs assigned to zero address are considered invalid, and queries
+	///  about them do throw.
+	/// @param tokenId The identifier for an NFT
+	/// @return The address of the owner of the NFT
+	/// @dev EVM selector for this function is: 0x6352211e,
+	///  or in textual repr: ownerOf(uint256)
+	function ownerOf(uint256 tokenId) public view returns (address) {
 		require(false, stub_error);
-		newAdmin;
-		dummy = 0;
+		tokenId;
+		dummy;
+		return 0x0000000000000000000000000000000000000000;
 	}
 
-	// Remove collection admin.
-	//
-	// @param new_admin Address of the removed administrator.
-	//
-	// Selector: removeCollectionAdmin(address) fafd7b42
-	function removeCollectionAdmin(address admin) public {
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0xb88d4fde,
+	///  or in textual repr: safeTransferFrom(address,address,uint256,bytes)
+	function safeTransferFrom(
+		address from,
+		address to,
+		uint256 tokenId,
+		bytes memory data
+	) public {
 		require(false, stub_error);
-		admin;
+		from;
+		to;
+		tokenId;
+		data;
 		dummy = 0;
 	}
 
-	// Toggle accessibility of collection nesting.
-	//
-	// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
-	//
-	// Selector: setCollectionNesting(bool) 112d4586
-	function setCollectionNesting(bool enable) public {
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x42842e0e,
+	///  or in textual repr: safeTransferFrom(address,address,uint256)
+	function safeTransferFrom(
+		address from,
+		address to,
+		uint256 tokenId
+	) public {
 		require(false, stub_error);
-		enable;
+		from;
+		to;
+		tokenId;
 		dummy = 0;
 	}
 
-	// Toggle accessibility of collection nesting.
-	//
-	// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
-	// @param collections Addresses of collections that will be available for nesting.
-	//
-	// Selector: setCollectionNesting(bool,address[]) 64872396
-	function setCollectionNesting(bool enable, address[] memory collections)
-		public
-	{
+	/// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
+	///  TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE
+	///  THEY MAY BE PERMANENTLY LOST
+	/// @dev Throws unless `msg.sender` is the current owner or an authorized
+	///  operator for this NFT. Throws if `from` is not the current owner. Throws
+	///  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.
+	/// @param from The current owner of the NFT
+	/// @param to The new owner
+	/// @param tokenId The NFT to transfer
+	/// @dev EVM selector for this function is: 0x23b872dd,
+	///  or in textual repr: transferFrom(address,address,uint256)
+	function transferFrom(
+		address from,
+		address to,
+		uint256 tokenId
+	) public {
 		require(false, stub_error);
-		enable;
-		collections;
+		from;
+		to;
+		tokenId;
 		dummy = 0;
 	}
 
-	// Set the collection access method.
-	// @param mode Access mode
-	// 	0 for Normal
-	// 	1 for AllowList
-	//
-	// Selector: setCollectionAccess(uint8) 41835d4c
-	function setCollectionAccess(uint8 mode) public {
+	/// @notice Set or reaffirm the approved address for an NFT
+	/// @dev The zero address indicates there is no approved address.
+	/// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized
+	///  operator of the current owner.
+	/// @param approved The new approved NFT controller
+	/// @param tokenId The NFT to approve
+	/// @dev EVM selector for this function is: 0x095ea7b3,
+	///  or in textual repr: approve(address,uint256)
+	function approve(address approved, uint256 tokenId) public {
 		require(false, stub_error);
-		mode;
+		approved;
+		tokenId;
 		dummy = 0;
 	}
 
-	// Add the user to the allowed list.
-	//
-	// @param user Address of a trusted user.
-	//
-	// Selector: addToCollectionAllowList(address) 67844fe6
-	function addToCollectionAllowList(address user) public {
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0xa22cb465,
+	///  or in textual repr: setApprovalForAll(address,bool)
+	function setApprovalForAll(address operator, bool approved) public {
 		require(false, stub_error);
-		user;
-		dummy = 0;
-	}
-
-	// Remove the user from the allowed list.
-	//
-	// @param user Address of a removed user.
-	//
-	// Selector: removeFromCollectionAllowList(address) 85c51acb
-	function removeFromCollectionAllowList(address user) public {
-		require(false, stub_error);
-		user;
+		operator;
+		approved;
 		dummy = 0;
 	}
 
-	// Switch permission for minting.
-	//
-	// @param mode Enable if "true".
-	//
-	// Selector: setCollectionMintMode(bool) 00018e84
-	function setCollectionMintMode(bool mode) public {
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x081812fc,
+	///  or in textual repr: getApproved(uint256)
+	function getApproved(uint256 tokenId) public view returns (address) {
 		require(false, stub_error);
-		mode;
-		dummy = 0;
-	}
-
-	// Check that account is the owner or admin of the collection
-	//
-	// @param user account to verify
-	// @return "true" if account is the owner or admin
-	//
-	// Selector: isOwnerOrAdmin(address) 9811b0c7
-	function isOwnerOrAdmin(address user) public view returns (bool) {
-		require(false, stub_error);
-		user;
+		tokenId;
 		dummy;
-		return false;
+		return 0x0000000000000000000000000000000000000000;
 	}
 
-	// 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
-	//
-	// Selector: isOwnerOrAdminSubstrate(uint256) 68910e00
-	function isOwnerOrAdminSubstrate(uint256 user) public view returns (bool) {
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0xe985e9c5,
+	///  or in textual repr: isApprovedForAll(address,address)
+	function isApprovedForAll(address owner, address operator)
+		public
+		view
+		returns (address)
+	{
 		require(false, stub_error);
-		user;
+		owner;
+		operator;
 		dummy;
-		return false;
-	}
-
-	// Returns collection type
-	//
-	// @return `Fungible` or `NFT` or `ReFungible`
-	//
-	// Selector: uniqueCollectionType() d34b55b8
-	function uniqueCollectionType() public returns (string memory) {
-		require(false, stub_error);
-		dummy = 0;
-		return "";
-	}
-
-	// Changes collection owner to another account
-	//
-	// @dev Owner can be changed only by current owner
-	// @param newOwner new owner account
-	//
-	// Selector: setOwner(address) 13af4035
-	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
-	//
-	// Selector: setOwnerSubstrate(uint256) b212138f
-	function setOwnerSubstrate(uint256 newOwner) public {
-		require(false, stub_error);
-		newOwner;
-		dummy = 0;
+		return 0x0000000000000000000000000000000000000000;
 	}
 }
 
modifiedpallets/refungible/src/erc.rsdiffbeforeafterboth
after · pallets/refungible/src/erc.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! # Refungible Pallet EVM API for tokens18//!19//! Provides ERC-721 standart support implementation and EVM API for unique extensions for Refungible Pallet.20//! Method implementations are mostly doing parameter conversion and calling Refungible Pallet methods.2122extern crate alloc;2324use alloc::string::ToString;25use core::{26	char::{REPLACEMENT_CHARACTER, decode_utf16},27	convert::TryInto,28};29use evm_coder::{ToLog, execution::*, generate_stubgen, solidity, solidity_interface, types::*, weight};30use frame_support::BoundedBTreeMap;31use pallet_common::{32	CollectionHandle, CollectionPropertyPermissions,33	erc::{34		CommonEvmHandler, CollectionCall,35		static_property::{key, value as property_value},36	},37};38use pallet_evm::{account::CrossAccountId, PrecompileHandle};39use pallet_evm_coder_substrate::{call, dispatch_to_evm};40use pallet_structure::{SelfWeightOf as StructureWeight, weights::WeightInfo as _};41use sp_core::H160;42use sp_std::{collections::btree_map::BTreeMap, vec::Vec, vec};43use up_data_structs::{44	CollectionId, CollectionPropertiesVec, mapping::TokenAddressMapping, Property, PropertyKey,45	PropertyKeyPermission, PropertyPermission, TokenId,46};4748use crate::{49	AccountBalance, Balance, Config, CreateItemData, Pallet, RefungibleHandle, SelfWeightOf,50	TokenProperties, TokensMinted, TotalSupply, weights::WeightInfo,51};5253pub const ADDRESS_FOR_PARTIALLY_OWNED_TOKENS: H160 = H160::repeat_byte(0xff);5455/// @title A contract that allows to set and delete token properties and change token property permissions.56#[solidity_interface(name = TokenProperties)]57impl<T: Config> RefungibleHandle<T> {58	/// @notice Set permissions for token property.59	/// @dev Throws error if `msg.sender` is not admin or owner of the collection.60	/// @param key Property key.61	/// @param isMutable Permission to mutate property.62	/// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.63	/// @param tokenOwner Permission to mutate property by token owner if property is mutable.64	fn set_token_property_permission(65		&mut self,66		caller: caller,67		key: string,68		is_mutable: bool,69		collection_admin: bool,70		token_owner: bool,71	) -> Result<()> {72		let caller = T::CrossAccountId::from_eth(caller);73		<Pallet<T>>::set_token_property_permissions(74			self,75			&caller,76			vec![PropertyKeyPermission {77				key: <Vec<u8>>::from(key)78					.try_into()79					.map_err(|_| "too long key")?,80				permission: PropertyPermission {81					mutable: is_mutable,82					collection_admin,83					token_owner,84				},85			}],86		)87		.map_err(dispatch_to_evm::<T>)88	}8990	/// @notice Set token property value.91	/// @dev Throws error if `msg.sender` has no permission to edit the property.92	/// @param tokenId ID of the token.93	/// @param key Property key.94	/// @param value Property value.95	fn set_property(96		&mut self,97		caller: caller,98		token_id: uint256,99		key: string,100		value: bytes,101	) -> Result<()> {102		let caller = T::CrossAccountId::from_eth(caller);103		let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;104		let key = <Vec<u8>>::from(key)105			.try_into()106			.map_err(|_| "key too long")?;107		let value = value.try_into().map_err(|_| "value too long")?;108109		let nesting_budget = self110			.recorder111			.weight_calls_budget(<StructureWeight<T>>::find_parent());112113		<Pallet<T>>::set_token_property(114			self,115			&caller,116			TokenId(token_id),117			Property { key, value },118			&nesting_budget,119		)120		.map_err(dispatch_to_evm::<T>)121	}122123	/// @notice Delete token property value.124	/// @dev Throws error if `msg.sender` has no permission to edit the property.125	/// @param tokenId ID of the token.126	/// @param key Property key.127	fn delete_property(&mut self, token_id: uint256, caller: caller, key: string) -> Result<()> {128		let caller = T::CrossAccountId::from_eth(caller);129		let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;130		let key = <Vec<u8>>::from(key)131			.try_into()132			.map_err(|_| "key too long")?;133134		let nesting_budget = self135			.recorder136			.weight_calls_budget(<StructureWeight<T>>::find_parent());137138		<Pallet<T>>::delete_token_property(self, &caller, TokenId(token_id), key, &nesting_budget)139			.map_err(dispatch_to_evm::<T>)140	}141142	/// @notice Get token property value.143	/// @dev Throws error if key not found144	/// @param tokenId ID of the token.145	/// @param key Property key.146	/// @return Property value bytes147	fn property(&self, token_id: uint256, key: string) -> Result<bytes> {148		let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;149		let key = <Vec<u8>>::from(key)150			.try_into()151			.map_err(|_| "key too long")?;152153		let props = <TokenProperties<T>>::get((self.id, token_id));154		let prop = props.get(&key).ok_or("key not found")?;155156		Ok(prop.to_vec())157	}158}159160#[derive(ToLog)]161pub enum ERC721Events {162	/// @dev This event emits when NFTs are created (`from` == 0) and destroyed163	///  (`to` == 0). Exception: during contract creation, any number of RFTs164	///  may be created and assigned without emitting Transfer.165	Transfer {166		#[indexed]167		from: address,168		#[indexed]169		to: address,170		#[indexed]171		token_id: uint256,172	},173	/// @dev Not supported174	Approval {175		#[indexed]176		owner: address,177		#[indexed]178		approved: address,179		#[indexed]180		token_id: uint256,181	},182	/// @dev Not supported183	#[allow(dead_code)]184	ApprovalForAll {185		#[indexed]186		owner: address,187		#[indexed]188		operator: address,189		approved: bool,190	},191}192193#[derive(ToLog)]194pub enum ERC721MintableEvents {195	/// @dev Not supported196	#[allow(dead_code)]197	MintingFinished {},198}199200#[solidity_interface(name = ERC721Metadata)]201impl<T: Config> RefungibleHandle<T> {202	/// @notice A descriptive name for a collection of RFTs in this contract203	fn name(&self) -> Result<string> {204		Ok(decode_utf16(self.name.iter().copied())205			.map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))206			.collect::<string>())207	}208209	/// @notice An abbreviated name for RFTs in this contract210	fn symbol(&self) -> Result<string> {211		Ok(string::from_utf8_lossy(&self.token_prefix).into())212	}213214	/// @notice A distinct Uniform Resource Identifier (URI) for a given asset.215	///216	/// @dev If the token has a `url` property and it is not empty, it is returned.217	///  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`.218	///  If the collection property `baseURI` is empty or absent, return "" (empty string)219	///  otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix220	///  otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).221	///222	/// @return token's const_metadata223	#[solidity(rename_selector = "tokenURI")]224	fn token_uri(&self, token_id: uint256) -> Result<string> {225		let token_id_u32: u32 = token_id.try_into().map_err(|_| "token id overflow")?;226227		if let Ok(url) = get_token_property(self, token_id_u32, &key::url()) {228			if !url.is_empty() {229				return Ok(url);230			}231		} else if !is_erc721_metadata_compatible::<T>(self.id) {232			return Err("tokenURI not set".into());233		}234235		if let Some(base_uri) =236			pallet_common::Pallet::<T>::get_collection_property(self.id, &key::base_uri())237		{238			if !base_uri.is_empty() {239				let base_uri = string::from_utf8(base_uri.into_inner()).map_err(|e| {240					Error::Revert(alloc::format!(241						"Can not convert value \"baseURI\" to string with error \"{}\"",242						e243					))244				})?;245				if let Ok(suffix) = get_token_property(self, token_id_u32, &key::suffix()) {246					if !suffix.is_empty() {247						return Ok(base_uri + suffix.as_str());248					}249				}250251				return Ok(base_uri + token_id.to_string().as_str());252			}253		}254255		Ok("".into())256	}257}258259/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension260/// @dev See https://eips.ethereum.org/EIPS/eip-721261#[solidity_interface(name = ERC721Enumerable)]262impl<T: Config> RefungibleHandle<T> {263	/// @notice Enumerate valid RFTs264	/// @param index A counter less than `totalSupply()`265	/// @return The token identifier for the `index`th NFT,266	///  (sort order not specified)267	fn token_by_index(&self, index: uint256) -> Result<uint256> {268		Ok(index)269	}270271	/// Not implemented272	fn token_of_owner_by_index(&self, _owner: address, _index: uint256) -> Result<uint256> {273		// TODO: Not implemetable274		Err("not implemented".into())275	}276277	/// @notice Count RFTs tracked by this contract278	/// @return A count of valid RFTs tracked by this contract, where each one of279	///  them has an assigned and queryable owner not equal to the zero address280	fn total_supply(&self) -> Result<uint256> {281		self.consume_store_reads(1)?;282		Ok(<Pallet<T>>::total_supply(self).into())283	}284}285286/// @title ERC-721 Non-Fungible Token Standard287/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md288#[solidity_interface(name = ERC721, events(ERC721Events))]289impl<T: Config> RefungibleHandle<T> {290	/// @notice Count all RFTs assigned to an owner291	/// @dev RFTs assigned to the zero address are considered invalid, and this292	///  function throws for queries about the zero address.293	/// @param owner An address for whom to query the balance294	/// @return The number of RFTs owned by `owner`, possibly zero295	fn balance_of(&self, owner: address) -> Result<uint256> {296		self.consume_store_reads(1)?;297		let owner = T::CrossAccountId::from_eth(owner);298		let balance = <AccountBalance<T>>::get((self.id, owner));299		Ok(balance.into())300	}301302	/// @notice Find the owner of an RFT303	/// @dev RFTs assigned to zero address are considered invalid, and queries304	///  about them do throw.305	///  Returns special 0xffffffffffffffffffffffffffffffffffffffff address for306	///  the tokens that are partially owned.307	/// @param tokenId The identifier for an RFT308	/// @return The address of the owner of the RFT309	fn owner_of(&self, token_id: uint256) -> Result<address> {310		self.consume_store_reads(2)?;311		let token = token_id.try_into()?;312		let owner = <Pallet<T>>::token_owner(self.id, token);313		Ok(owner314			.map(|address| *address.as_eth())315			.unwrap_or_else(|| ADDRESS_FOR_PARTIALLY_OWNED_TOKENS))316	}317318	/// @dev Not implemented319	fn safe_transfer_from_with_data(320		&mut self,321		_from: address,322		_to: address,323		_token_id: uint256,324		_data: bytes,325	) -> Result<void> {326		// TODO: Not implemetable327		Err("not implemented".into())328	}329330	/// @dev Not implemented331	fn safe_transfer_from(332		&mut self,333		_from: address,334		_to: address,335		_token_id: uint256,336	) -> Result<void> {337		// TODO: Not implemetable338		Err("not implemented".into())339	}340341	/// @notice Transfer ownership of an RFT -- THE CALLER IS RESPONSIBLE342	///  TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE343	///  THEY MAY BE PERMANENTLY LOST344	/// @dev Throws unless `msg.sender` is the current owner or an authorized345	///  operator for this RFT. Throws if `from` is not the current owner. Throws346	///  if `to` is the zero address. Throws if `tokenId` is not a valid RFT.347	///  Throws if RFT pieces have multiple owners.348	/// @param from The current owner of the NFT349	/// @param to The new owner350	/// @param tokenId The NFT to transfer351	#[weight(<SelfWeightOf<T>>::transfer_from_creating_removing())]352	fn transfer_from(353		&mut self,354		caller: caller,355		from: address,356		to: address,357		token_id: uint256,358	) -> Result<void> {359		let caller = T::CrossAccountId::from_eth(caller);360		let from = T::CrossAccountId::from_eth(from);361		let to = T::CrossAccountId::from_eth(to);362		let token = token_id.try_into()?;363		let budget = self364			.recorder365			.weight_calls_budget(<StructureWeight<T>>::find_parent());366367		let balance = balance(&self, token, &from)?;368		ensure_single_owner(&self, token, balance)?;369370		<Pallet<T>>::transfer_from(self, &caller, &from, &to, token, balance, &budget)371			.map_err(dispatch_to_evm::<T>)?;372373		Ok(())374	}375376	/// @dev Not implemented377	fn approve(&mut self, _caller: caller, _approved: address, _token_id: uint256) -> Result<void> {378		Err("not implemented".into())379	}380381	/// @dev Not implemented382	fn set_approval_for_all(383		&mut self,384		_caller: caller,385		_operator: address,386		_approved: bool,387	) -> Result<void> {388		// TODO: Not implemetable389		Err("not implemented".into())390	}391392	/// @dev Not implemented393	fn get_approved(&self, _token_id: uint256) -> Result<address> {394		// TODO: Not implemetable395		Err("not implemented".into())396	}397398	/// @dev Not implemented399	fn is_approved_for_all(&self, _owner: address, _operator: address) -> Result<address> {400		// TODO: Not implemetable401		Err("not implemented".into())402	}403}404405/// Returns amount of pieces of `token` that `owner` have406pub fn balance<T: Config>(407	collection: &RefungibleHandle<T>,408	token: TokenId,409	owner: &T::CrossAccountId,410) -> Result<u128> {411	collection.consume_store_reads(1)?;412	let balance = <Balance<T>>::get((collection.id, token, &owner));413	Ok(balance)414}415416/// Throws if `owner_balance` is lower than total amount of `token` pieces417pub fn ensure_single_owner<T: Config>(418	collection: &RefungibleHandle<T>,419	token: TokenId,420	owner_balance: u128,421) -> Result<()> {422	collection.consume_store_reads(1)?;423	let total_supply = <TotalSupply<T>>::get((collection.id, token));424	if total_supply != owner_balance {425		return Err("token has multiple owners".into());426	}427	Ok(())428}429430/// @title ERC721 Token that can be irreversibly burned (destroyed).431#[solidity_interface(name = ERC721Burnable)]432impl<T: Config> RefungibleHandle<T> {433	/// @notice Burns a specific ERC721 token.434	/// @dev Throws unless `msg.sender` is the current RFT owner, or an authorized435	///  operator of the current owner.436	/// @param tokenId The RFT to approve437	#[weight(<SelfWeightOf<T>>::burn_item_fully())]438	fn burn(&mut self, caller: caller, token_id: uint256) -> Result<void> {439		let caller = T::CrossAccountId::from_eth(caller);440		let token = token_id.try_into()?;441442		let balance = balance(&self, token, &caller)?;443		ensure_single_owner(&self, token, balance)?;444445		<Pallet<T>>::burn(self, &caller, token, balance).map_err(dispatch_to_evm::<T>)?;446		Ok(())447	}448}449450/// @title ERC721 minting logic.451#[solidity_interface(name = ERC721Mintable, events(ERC721MintableEvents))]452impl<T: Config> RefungibleHandle<T> {453	fn minting_finished(&self) -> Result<bool> {454		Ok(false)455	}456457	/// @notice Function to mint token.458	/// @dev `tokenId` should be obtained with `nextTokenId` method,459	///  unlike standard, you can't specify it manually460	/// @param to The new owner461	/// @param tokenId ID of the minted RFT462	#[weight(<SelfWeightOf<T>>::create_item())]463	fn mint(&mut self, caller: caller, to: address, token_id: uint256) -> Result<bool> {464		let caller = T::CrossAccountId::from_eth(caller);465		let to = T::CrossAccountId::from_eth(to);466		let token_id: u32 = token_id.try_into()?;467		let budget = self468			.recorder469			.weight_calls_budget(<StructureWeight<T>>::find_parent());470471		if <TokensMinted<T>>::get(self.id)472			.checked_add(1)473			.ok_or("item id overflow")?474			!= token_id475		{476			return Err("item id should be next".into());477		}478479		let users = [(to.clone(), 1)]480			.into_iter()481			.collect::<BTreeMap<_, _>>()482			.try_into()483			.unwrap();484		<Pallet<T>>::create_item(485			self,486			&caller,487			CreateItemData::<T::CrossAccountId> {488				users,489				properties: CollectionPropertiesVec::default(),490			},491			&budget,492		)493		.map_err(dispatch_to_evm::<T>)?;494495		Ok(true)496	}497498	/// @notice Function to mint token with the given tokenUri.499	/// @dev `tokenId` should be obtained with `nextTokenId` method,500	///  unlike standard, you can't specify it manually501	/// @param to The new owner502	/// @param tokenId ID of the minted RFT503	/// @param tokenUri Token URI that would be stored in the RFT properties504	#[solidity(rename_selector = "mintWithTokenURI")]505	#[weight(<SelfWeightOf<T>>::create_item())]506	fn mint_with_token_uri(507		&mut self,508		caller: caller,509		to: address,510		token_id: uint256,511		token_uri: string,512	) -> Result<bool> {513		let key = key::url();514		let permission = get_token_permission::<T>(self.id, &key)?;515		if !permission.collection_admin {516			return Err("Operation is not allowed".into());517		}518519		let caller = T::CrossAccountId::from_eth(caller);520		let to = T::CrossAccountId::from_eth(to);521		let token_id: u32 = token_id.try_into().map_err(|_| "amount overflow")?;522		let budget = self523			.recorder524			.weight_calls_budget(<StructureWeight<T>>::find_parent());525526		if <TokensMinted<T>>::get(self.id)527			.checked_add(1)528			.ok_or("item id overflow")?529			!= token_id530		{531			return Err("item id should be next".into());532		}533534		let mut properties = CollectionPropertiesVec::default();535		properties536			.try_push(Property {537				key,538				value: token_uri539					.into_bytes()540					.try_into()541					.map_err(|_| "token uri is too long")?,542			})543			.map_err(|e| Error::Revert(alloc::format!("Can't add property: {:?}", e)))?;544545		let users = [(to.clone(), 1)]546			.into_iter()547			.collect::<BTreeMap<_, _>>()548			.try_into()549			.unwrap();550		<Pallet<T>>::create_item(551			self,552			&caller,553			CreateItemData::<T::CrossAccountId> { users, properties },554			&budget,555		)556		.map_err(dispatch_to_evm::<T>)?;557		Ok(true)558	}559560	/// @dev Not implemented561	fn finish_minting(&mut self, _caller: caller) -> Result<bool> {562		Err("not implementable".into())563	}564}565566fn get_token_property<T: Config>(567	collection: &CollectionHandle<T>,568	token_id: u32,569	key: &up_data_structs::PropertyKey,570) -> Result<string> {571	collection.consume_store_reads(1)?;572	let properties = <TokenProperties<T>>::try_get((collection.id, token_id))573		.map_err(|_| Error::Revert("Token properties not found".into()))?;574	if let Some(property) = properties.get(key) {575		return Ok(string::from_utf8_lossy(property).into());576	}577578	Err("Property tokenURI not found".into())579}580581fn is_erc721_metadata_compatible<T: Config>(collection_id: CollectionId) -> bool {582	if let Some(shema_name) =583		pallet_common::Pallet::<T>::get_collection_property(collection_id, &key::schema_name())584	{585		let shema_name = shema_name.into_inner();586		shema_name == property_value::ERC721_METADATA587	} else {588		false589	}590}591592fn get_token_permission<T: Config>(593	collection_id: CollectionId,594	key: &PropertyKey,595) -> Result<PropertyPermission> {596	let token_property_permissions = CollectionPropertyPermissions::<T>::try_get(collection_id)597		.map_err(|_| Error::Revert("No permissions for collection".into()))?;598	let a = token_property_permissions599		.get(key)600		.map(Clone::clone)601		.ok_or_else(|| {602			let key = string::from_utf8(key.clone().into_inner()).unwrap_or_default();603			Error::Revert(alloc::format!("No permission for key {}", key))604		})?;605	Ok(a)606}607608/// @title Unique extensions for ERC721.609#[solidity_interface(name = ERC721UniqueExtensions)]610impl<T: Config> RefungibleHandle<T> {611	/// @notice Transfer ownership of an RFT612	/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`613	///  is the zero address. Throws if `tokenId` is not a valid RFT.614	///  Throws if RFT pieces have multiple owners.615	/// @param to The new owner616	/// @param tokenId The RFT to transfer617	#[weight(<SelfWeightOf<T>>::transfer_creating_removing())]618	fn transfer(&mut self, caller: caller, to: address, token_id: uint256) -> Result<void> {619		let caller = T::CrossAccountId::from_eth(caller);620		let to = T::CrossAccountId::from_eth(to);621		let token = token_id.try_into()?;622		let budget = self623			.recorder624			.weight_calls_budget(<StructureWeight<T>>::find_parent());625626		let balance = balance(&self, token, &caller)?;627		ensure_single_owner(&self, token, balance)?;628629		<Pallet<T>>::transfer(self, &caller, &to, token, balance, &budget)630			.map_err(dispatch_to_evm::<T>)?;631		Ok(())632	}633634	/// @notice Burns a specific ERC721 token.635	/// @dev Throws unless `msg.sender` is the current owner or an authorized636	///  operator for this RFT. Throws if `from` is not the current owner. Throws637	///  if `to` is the zero address. Throws if `tokenId` is not a valid RFT.638	///  Throws if RFT pieces have multiple owners.639	/// @param from The current owner of the RFT640	/// @param tokenId The RFT to transfer641	#[weight(<SelfWeightOf<T>>::burn_from())]642	fn burn_from(&mut self, caller: caller, from: address, token_id: uint256) -> Result<void> {643		let caller = T::CrossAccountId::from_eth(caller);644		let from = T::CrossAccountId::from_eth(from);645		let token = token_id.try_into()?;646		let budget = self647			.recorder648			.weight_calls_budget(<StructureWeight<T>>::find_parent());649650		let balance = balance(&self, token, &caller)?;651		ensure_single_owner(&self, token, balance)?;652653		<Pallet<T>>::burn_from(self, &caller, &from, token, balance, &budget)654			.map_err(dispatch_to_evm::<T>)?;655		Ok(())656	}657658	/// @notice Returns next free RFT ID.659	fn next_token_id(&self) -> Result<uint256> {660		self.consume_store_reads(1)?;661		Ok(<TokensMinted<T>>::get(self.id)662			.checked_add(1)663			.ok_or("item id overflow")?664			.into())665	}666667	/// @notice Function to mint multiple tokens.668	/// @dev `tokenIds` should be an array of consecutive numbers and first number669	///  should be obtained with `nextTokenId` method670	/// @param to The new owner671	/// @param tokenIds IDs of the minted RFTs672	#[weight(<SelfWeightOf<T>>::create_multiple_items(token_ids.len() as u32))]673	fn mint_bulk(&mut self, caller: caller, to: address, token_ids: Vec<uint256>) -> Result<bool> {674		let caller = T::CrossAccountId::from_eth(caller);675		let to = T::CrossAccountId::from_eth(to);676		let mut expected_index = <TokensMinted<T>>::get(self.id)677			.checked_add(1)678			.ok_or("item id overflow")?;679		let budget = self680			.recorder681			.weight_calls_budget(<StructureWeight<T>>::find_parent());682683		let total_tokens = token_ids.len();684		for id in token_ids.into_iter() {685			let id: u32 = id.try_into().map_err(|_| "token id overflow")?;686			if id != expected_index {687				return Err("item id should be next".into());688			}689			expected_index = expected_index.checked_add(1).ok_or("item id overflow")?;690		}691		let users = [(to.clone(), 1)]692			.into_iter()693			.collect::<BTreeMap<_, _>>()694			.try_into()695			.unwrap();696		let create_item_data = CreateItemData::<T::CrossAccountId> {697			users,698			properties: CollectionPropertiesVec::default(),699		};700		let data = (0..total_tokens)701			.map(|_| create_item_data.clone())702			.collect();703704		<Pallet<T>>::create_multiple_items(self, &caller, data, &budget)705			.map_err(dispatch_to_evm::<T>)?;706		Ok(true)707	}708709	/// @notice Function to mint multiple tokens with the given tokenUris.710	/// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive711	///  numbers and first number should be obtained with `nextTokenId` method712	/// @param to The new owner713	/// @param tokens array of pairs of token ID and token URI for minted tokens714	#[solidity(rename_selector = "mintBulkWithTokenURI")]715	#[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32))]716	fn mint_bulk_with_token_uri(717		&mut self,718		caller: caller,719		to: address,720		tokens: Vec<(uint256, string)>,721	) -> Result<bool> {722		let key = key::url();723		let caller = T::CrossAccountId::from_eth(caller);724		let to = T::CrossAccountId::from_eth(to);725		let mut expected_index = <TokensMinted<T>>::get(self.id)726			.checked_add(1)727			.ok_or("item id overflow")?;728		let budget = self729			.recorder730			.weight_calls_budget(<StructureWeight<T>>::find_parent());731732		let mut data = Vec::with_capacity(tokens.len());733		let users: BoundedBTreeMap<_, _, _> = [(to.clone(), 1)]734			.into_iter()735			.collect::<BTreeMap<_, _>>()736			.try_into()737			.unwrap();738		for (id, token_uri) in tokens {739			let id: u32 = id.try_into().map_err(|_| "token id overflow")?;740			if id != expected_index {741				return Err("item id should be next".into());742			}743			expected_index = expected_index.checked_add(1).ok_or("item id overflow")?;744745			let mut properties = CollectionPropertiesVec::default();746			properties747				.try_push(Property {748					key: key.clone(),749					value: token_uri750						.into_bytes()751						.try_into()752						.map_err(|_| "token uri is too long")?,753				})754				.map_err(|e| Error::Revert(alloc::format!("Can't add property: {:?}", e)))?;755756			let create_item_data = CreateItemData::<T::CrossAccountId> {757				users: users.clone(),758				properties,759			};760			data.push(create_item_data);761		}762763		<Pallet<T>>::create_multiple_items(self, &caller, data, &budget)764			.map_err(dispatch_to_evm::<T>)?;765		Ok(true)766	}767768	/// Returns EVM address for refungible token769	///770	/// @param token ID of the token771	fn token_contract_address(&self, token: uint256) -> Result<address> {772		Ok(T::EvmTokenAddressMapping::token_to_address(773			self.id,774			token.try_into().map_err(|_| "token id overflow")?,775		))776	}777}778779#[solidity_interface(780	name = UniqueRefungible,781	is(782		ERC721,783		ERC721Metadata,784		ERC721Enumerable,785		ERC721UniqueExtensions,786		ERC721Mintable,787		ERC721Burnable,788		Collection(common_mut, CollectionHandle<T>),789		TokenProperties,790	)791)]792impl<T: Config> RefungibleHandle<T> where T::AccountId: From<[u8; 32]> {}793794// Not a tests, but code generators795generate_stubgen!(gen_impl, UniqueRefungibleCall<()>, true);796generate_stubgen!(gen_iface, UniqueRefungibleCall<()>, false);797798impl<T: Config> CommonEvmHandler for RefungibleHandle<T>799where800	T::AccountId: From<[u8; 32]>,801{802	const CODE: &'static [u8] = include_bytes!("./stubs/UniqueRefungible.raw");803	fn call(804		self,805		handle: &mut impl PrecompileHandle,806	) -> Option<pallet_common::erc::PrecompileResult> {807		call::<T, UniqueRefungibleCall<T>, _, _>(handle, self)808	}809}
modifiedpallets/refungible/src/erc_token.rsdiffbeforeafterboth
--- a/pallets/refungible/src/erc_token.rs
+++ b/pallets/refungible/src/erc_token.rs
@@ -49,7 +49,7 @@
 
 pub struct RefungibleTokenHandle<T: Config>(pub RefungibleHandle<T>, pub TokenId);
 
-#[solidity_interface(name = "ERC1633")]
+#[solidity_interface(name = ERC1633)]
 impl<T: Config> RefungibleTokenHandle<T> {
 	fn parent_token(&self) -> Result<address> {
 		self.consume_store_reads(2)?;
@@ -87,7 +87,7 @@
 	}
 }
 
-#[solidity_interface(name = "ERC1633UniqueExtensions")]
+#[solidity_interface(name = ERC1633UniqueExtensions)]
 impl<T: Config> RefungibleTokenHandle<T> {
 	#[solidity(rename_selector = "setParentNFT")]
 	#[weight(<CommonWeights<T>>::token_owner() + <SelfWeightOf<T>>::set_parent_nft_unchecked())]
@@ -137,7 +137,7 @@
 ///
 /// @dev Implementation of the basic standard token.
 /// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
-#[solidity_interface(name = "ERC20", events(ERC20Events))]
+#[solidity_interface(name = ERC20, events(ERC20Events))]
 impl<T: Config> RefungibleTokenHandle<T> {
 	/// @return the name of the token.
 	fn name(&self) -> Result<string> {
@@ -246,7 +246,7 @@
 	}
 }
 
-#[solidity_interface(name = "ERC20UniqueExtensions")]
+#[solidity_interface(name = ERC20UniqueExtensions)]
 impl<T: Config> RefungibleTokenHandle<T> {
 	/// @dev Function that burns an amount of the token of a given account,
 	/// deducting from the sender's allowance for said account.
@@ -306,7 +306,7 @@
 }
 
 #[solidity_interface(
-	name = "UniqueRefungibleToken",
+	name = UniqueRefungibleToken,
 	is(ERC20, ERC20UniqueExtensions, ERC1633, ERC1633UniqueExtensions)
 )]
 impl<T: Config> RefungibleTokenHandle<T> where T::AccountId: From<[u8; 32]> {}
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
@@ -3,13 +3,7 @@
 
 pragma solidity >=0.8.0 <0.9.0;
 
-// Anonymous struct
-struct Tuple0 {
-	uint256 field_0;
-	string field_1;
-}
-
-// Common stubs holder
+/// @dev common stubs holder
 contract Dummy {
 	uint8 dummy;
 	string stub_error = "this contract is implemented in native";
@@ -27,40 +21,17 @@
 	}
 }
 
-// Inline
-contract ERC721Events {
-	event Transfer(
-		address indexed from,
-		address indexed to,
-		uint256 indexed tokenId
-	);
-	event Approval(
-		address indexed owner,
-		address indexed approved,
-		uint256 indexed tokenId
-	);
-	event ApprovalForAll(
-		address indexed owner,
-		address indexed operator,
-		bool approved
-	);
-}
-
-// Inline
-contract ERC721MintableEvents {
-	event MintingFinished();
-}
-
-// Selector: 41369377
+/// @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 {
-	// @notice Set permissions for token property.
-	// @dev Throws error if `msg.sender` is not admin or owner of the collection.
-	// @param key Property key.
-	// @param is_mutable Permission to mutate property.
-	// @param collection_admin Permission to mutate property by collection admin if property is mutable.
-	// @param token_owner Permission to mutate property by token owner if property is mutable.
-	//
-	// Selector: setTokenPropertyPermission(string,bool,bool,bool) 222d97fa
+	/// @notice Set permissions for token property.
+	/// @dev Throws error if `msg.sender` is not admin or owner of the collection.
+	/// @param key Property key.
+	/// @param isMutable Permission to mutate property.
+	/// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.
+	/// @param tokenOwner Permission to mutate property by token owner if property is mutable.
+	/// @dev EVM selector for this function is: 0x222d97fa,
+	///  or in textual repr: setTokenPropertyPermission(string,bool,bool,bool)
 	function setTokenPropertyPermission(
 		string memory key,
 		bool isMutable,
@@ -75,13 +46,13 @@
 		dummy = 0;
 	}
 
-	// @notice Set token property value.
-	// @dev Throws error if `msg.sender` has no permission to edit the property.
-	// @param tokenId ID of the token.
-	// @param key Property key.
-	// @param value Property value.
-	//
-	// Selector: setProperty(uint256,string,bytes) 1752d67b
+	/// @notice Set token property value.
+	/// @dev Throws error if `msg.sender` has no permission to edit the property.
+	/// @param tokenId ID of the token.
+	/// @param key Property key.
+	/// @param value Property value.
+	/// @dev EVM selector for this function is: 0x1752d67b,
+	///  or in textual repr: setProperty(uint256,string,bytes)
 	function setProperty(
 		uint256 tokenId,
 		string memory key,
@@ -94,12 +65,12 @@
 		dummy = 0;
 	}
 
-	// @notice Delete token property value.
-	// @dev Throws error if `msg.sender` has no permission to edit the property.
-	// @param tokenId ID of the token.
-	// @param key Property key.
-	//
-	// Selector: deleteProperty(uint256,string) 066111d1
+	/// @notice Delete token property value.
+	/// @dev Throws error if `msg.sender` has no permission to edit the property.
+	/// @param tokenId ID of the token.
+	/// @param key Property key.
+	/// @dev EVM selector for this function is: 0x066111d1,
+	///  or in textual repr: deleteProperty(uint256,string)
 	function deleteProperty(uint256 tokenId, string memory key) public {
 		require(false, stub_error);
 		tokenId;
@@ -107,13 +78,13 @@
 		dummy = 0;
 	}
 
-	// @notice Get token property value.
-	// @dev Throws error if key not found
-	// @param tokenId ID of the token.
-	// @param key Property key.
-	// @return Property value bytes
-	//
-	// Selector: property(uint256,string) 7228c327
+	/// @notice Get token property value.
+	/// @dev Throws error if key not found
+	/// @param tokenId ID of the token.
+	/// @param key Property key.
+	/// @return Property value bytes
+	/// @dev EVM selector for this function is: 0x7228c327,
+	///  or in textual repr: property(uint256,string)
 	function property(uint256 tokenId, string memory key)
 		public
 		view
@@ -127,211 +98,334 @@
 	}
 }
 
-// Selector: 42966c68
-contract ERC721Burnable is Dummy, ERC165 {
-	// @notice Burns a specific ERC721 token.
-	// @dev Throws unless `msg.sender` is the current RFT owner, or an authorized
-	//  operator of the current owner.
-	// @param tokenId The RFT to approve
-	//
-	// Selector: burn(uint256) 42966c68
-	function burn(uint256 tokenId) public {
+/// @title A contract that allows you to work with collections.
+/// @dev the ERC-165 identifier for this interface is 0xffe4da23
+contract Collection is Dummy, ERC165 {
+	/// Set collection property.
+	///
+	/// @param key Property key.
+	/// @param value Propery value.
+	/// @dev EVM selector for this function is: 0x2f073f66,
+	///  or in textual repr: setCollectionProperty(string,bytes)
+	function setCollectionProperty(string memory key, bytes memory value)
+		public
+	{
 		require(false, stub_error);
-		tokenId;
+		key;
+		value;
 		dummy = 0;
 	}
-}
 
-// Selector: 58800161
-contract ERC721 is Dummy, ERC165, ERC721Events {
-	// @notice Count all RFTs assigned to an owner
-	// @dev RFTs assigned to the zero address are considered invalid, and this
-	//  function throws for queries about the zero address.
-	// @param owner An address for whom to query the balance
-	// @return The number of RFTs owned by `owner`, possibly zero
-	//
-	// Selector: balanceOf(address) 70a08231
-	function balanceOf(address owner) public view returns (uint256) {
+	/// Delete collection property.
+	///
+	/// @param key Property key.
+	/// @dev EVM selector for this function is: 0x7b7debce,
+	///  or in textual repr: deleteCollectionProperty(string)
+	function deleteCollectionProperty(string memory key) public {
 		require(false, stub_error);
-		owner;
-		dummy;
-		return 0;
+		key;
+		dummy = 0;
 	}
 
-	// @notice Find the owner of an RFT
-	// @dev RFTs assigned to zero address are considered invalid, and queries
-	//  about them do throw.
-	//  Returns special 0xffffffffffffffffffffffffffffffffffffffff address for
-	//  the tokens that are partially owned.
-	// @param tokenId The identifier for an RFT
-	// @return The address of the owner of the RFT
-	//
-	// Selector: ownerOf(uint256) 6352211e
-	function ownerOf(uint256 tokenId) public view returns (address) {
+	/// Get collection property.
+	///
+	/// @dev Throws error if key not found.
+	///
+	/// @param key Property key.
+	/// @return bytes The property corresponding to the key.
+	/// @dev EVM selector for this function is: 0xcf24fd6d,
+	///  or in textual repr: collectionProperty(string)
+	function collectionProperty(string memory key)
+		public
+		view
+		returns (bytes memory)
+	{
 		require(false, stub_error);
-		tokenId;
+		key;
 		dummy;
-		return 0x0000000000000000000000000000000000000000;
+		return hex"";
 	}
 
-	// @dev Not implemented
-	//
-	// Selector: safeTransferFromWithData(address,address,uint256,bytes) 60a11672
-	function safeTransferFromWithData(
-		address from,
-		address to,
-		uint256 tokenId,
-		bytes memory data
-	) public {
+	/// Set the sponsor of the collection.
+	///
+	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+	///
+	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+	/// @dev EVM selector for this function is: 0x7623402e,
+	///  or in textual repr: setCollectionSponsor(address)
+	function setCollectionSponsor(address sponsor) public {
 		require(false, stub_error);
-		from;
-		to;
-		tokenId;
-		data;
+		sponsor;
 		dummy = 0;
 	}
 
-	// @dev Not implemented
-	//
-	// Selector: safeTransferFrom(address,address,uint256) 42842e0e
-	function safeTransferFrom(
-		address from,
-		address to,
-		uint256 tokenId
-	) public {
+	/// Collection sponsorship confirmation.
+	///
+	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.
+	/// @dev EVM selector for this function is: 0x3c50e97a,
+	///  or in textual repr: confirmCollectionSponsorship()
+	function confirmCollectionSponsorship() public {
 		require(false, stub_error);
-		from;
-		to;
-		tokenId;
 		dummy = 0;
 	}
 
-	// @notice Transfer ownership of an RFT -- THE CALLER IS RESPONSIBLE
-	//  TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE
-	//  THEY MAY BE PERMANENTLY LOST
-	// @dev Throws unless `msg.sender` is the current owner or an authorized
-	//  operator for this RFT. Throws if `from` is not the current owner. Throws
-	//  if `to` is the zero address. Throws if `tokenId` is not a valid RFT.
-	//  Throws if RFT pieces have multiple owners.
-	// @param from The current owner of the NFT
-	// @param to The new owner
-	// @param tokenId The NFT to transfer
-	// @param _value Not used for an NFT
-	//
-	// Selector: transferFrom(address,address,uint256) 23b872dd
-	function transferFrom(
-		address from,
-		address to,
-		uint256 tokenId
-	) public {
+	/// Set limits for the collection.
+	/// @dev Throws error if limit not found.
+	/// @param limit Name of the limit. Valid names:
+	/// 	"accountTokenOwnershipLimit",
+	/// 	"sponsoredDataSize",
+	/// 	"sponsoredDataRateLimit",
+	/// 	"tokenLimit",
+	/// 	"sponsorTransferTimeout",
+	/// 	"sponsorApproveTimeout"
+	/// @param value Value of the limit.
+	/// @dev EVM selector for this function is: 0x6a3841db,
+	///  or in textual repr: setCollectionLimit(string,uint32)
+	function setCollectionLimit(string memory limit, uint32 value) public {
 		require(false, stub_error);
-		from;
-		to;
-		tokenId;
+		limit;
+		value;
 		dummy = 0;
 	}
 
-	// @dev Not implemented
-	//
-	// Selector: approve(address,uint256) 095ea7b3
-	function approve(address approved, uint256 tokenId) public {
+	/// Set limits for the collection.
+	/// @dev Throws error if limit not found.
+	/// @param limit Name of the limit. Valid names:
+	/// 	"ownerCanTransfer",
+	/// 	"ownerCanDestroy",
+	/// 	"transfersEnabled"
+	/// @param value Value of the limit.
+	/// @dev EVM selector for this function is: 0x993b7fba,
+	///  or in textual repr: setCollectionLimit(string,bool)
+	function setCollectionLimit(string memory limit, bool value) public {
 		require(false, stub_error);
-		approved;
-		tokenId;
+		limit;
+		value;
 		dummy = 0;
 	}
 
-	// @dev Not implemented
-	//
-	// Selector: setApprovalForAll(address,bool) a22cb465
-	function setApprovalForAll(address operator, bool approved) public {
+	/// Get contract address.
+	/// @dev EVM selector for this function is: 0xf6b4dfb4,
+	///  or in textual repr: contractAddress()
+	function contractAddress() public view returns (address) {
 		require(false, stub_error);
-		operator;
-		approved;
+		dummy;
+		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;
 	}
 
-	// @dev Not implemented
-	//
-	// Selector: getApproved(uint256) 081812fc
-	function getApproved(uint256 tokenId) public view returns (address) {
+	/// 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);
-		tokenId;
-		dummy;
-		return 0x0000000000000000000000000000000000000000;
+		admin;
+		dummy = 0;
 	}
 
-	// @dev Not implemented
-	//
-	// Selector: isApprovedForAll(address,address) e985e9c5
-	function isApprovedForAll(address owner, address operator)
+	/// Add collection admin.
+	/// @param newAdmin Address of the added administrator.
+	/// @dev EVM selector for this function is: 0x92e462c7,
+	///  or in textual repr: addCollectionAdmin(address)
+	function addCollectionAdmin(address newAdmin) public {
+		require(false, stub_error);
+		newAdmin;
+		dummy = 0;
+	}
+
+	/// Remove collection admin.
+	///
+	/// @param admin Address of the removed administrator.
+	/// @dev EVM selector for this function is: 0xfafd7b42,
+	///  or in textual repr: removeCollectionAdmin(address)
+	function removeCollectionAdmin(address admin) public {
+		require(false, stub_error);
+		admin;
+		dummy = 0;
+	}
+
+	/// Toggle accessibility of collection nesting.
+	///
+	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+	/// @dev EVM selector for this function is: 0x112d4586,
+	///  or in textual repr: setCollectionNesting(bool)
+	function setCollectionNesting(bool enable) public {
+		require(false, stub_error);
+		enable;
+		dummy = 0;
+	}
+
+	/// Toggle accessibility of collection nesting.
+	///
+	/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+	/// @param collections Addresses of collections that will be available for nesting.
+	/// @dev EVM selector for this function is: 0x64872396,
+	///  or in textual repr: setCollectionNesting(bool,address[])
+	function setCollectionNesting(bool enable, address[] memory collections)
 		public
-		view
-		returns (address)
 	{
 		require(false, stub_error);
-		owner;
-		operator;
+		enable;
+		collections;
+		dummy = 0;
+	}
+
+	/// Set the collection access method.
+	/// @param mode Access mode
+	/// 	0 for Normal
+	/// 	1 for AllowList
+	/// @dev EVM selector for this function is: 0x41835d4c,
+	///  or in textual repr: setCollectionAccess(uint8)
+	function setCollectionAccess(uint8 mode) public {
+		require(false, stub_error);
+		mode;
+		dummy = 0;
+	}
+
+	/// Add the user to the allowed list.
+	///
+	/// @param user Address of a trusted user.
+	/// @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;
+	}
+
+	/// Remove the user from the allowed list.
+	///
+	/// @param user Address of a removed user.
+	/// @dev EVM selector for this function is: 0x85c51acb,
+	///  or in textual repr: removeFromCollectionAllowList(address)
+	function removeFromCollectionAllowList(address user) public {
+		require(false, stub_error);
+		user;
+		dummy = 0;
+	}
+
+	/// Switch permission for minting.
+	///
+	/// @param mode Enable if "true".
+	/// @dev EVM selector for this function is: 0x00018e84,
+	///  or in textual repr: setCollectionMintMode(bool)
+	function setCollectionMintMode(bool mode) public {
+		require(false, stub_error);
+		mode;
+		dummy = 0;
+	}
+
+	/// Check that 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: 0x9811b0c7,
+	///  or in textual repr: isOwnerOrAdmin(address)
+	function isOwnerOrAdmin(address user) public view returns (bool) {
+		require(false, stub_error);
+		user;
 		dummy;
-		return 0x0000000000000000000000000000000000000000;
+		return false;
 	}
-}
 
-// Selector: 5b5e139f
-contract ERC721Metadata is Dummy, ERC165 {
-	// @notice A descriptive name for a collection of RFTs in this contract
-	//
-	// Selector: name() 06fdde03
-	function name() public view returns (string memory) {
+	/// 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 "";
+		return false;
 	}
 
-	// @notice An abbreviated name for RFTs in this contract
-	//
-	// Selector: symbol() 95d89b41
-	function symbol() public view returns (string memory) {
+	/// Returns collection type
+	///
+	/// @return `Fungible` or `NFT` or `ReFungible`
+	/// @dev EVM selector for this function is: 0xd34b55b8,
+	///  or in textual repr: uniqueCollectionType()
+	function uniqueCollectionType() public returns (string memory) {
 		require(false, stub_error);
-		dummy;
+		dummy = 0;
 		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
-	//
-	// Selector: tokenURI(uint256) c87b56dd
-	function tokenURI(uint256 tokenId) public view returns (string memory) {
+	/// Changes collection owner to another account
+	///
+	/// @dev Owner can be changed only by current owner
+	/// @param newOwner new owner account
+	/// @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;
+	}
+}
+
+/// @title ERC721 Token that can be irreversibly burned (destroyed).
+/// @dev the ERC-165 identifier for this interface is 0x42966c68
+contract ERC721Burnable is Dummy, ERC165 {
+	/// @notice Burns a specific ERC721 token.
+	/// @dev Throws unless `msg.sender` is the current RFT owner, or an authorized
+	///  operator of the current owner.
+	/// @param tokenId The RFT to approve
+	/// @dev EVM selector for this function is: 0x42966c68,
+	///  or in textual repr: burn(uint256)
+	function burn(uint256 tokenId) public {
+		require(false, stub_error);
 		tokenId;
-		dummy;
-		return "";
+		dummy = 0;
 	}
 }
 
-// Selector: 68ccfe89
+/// @dev inlined interface
+contract ERC721MintableEvents {
+	event MintingFinished();
+}
+
+/// @title ERC721 minting logic.
+/// @dev the ERC-165 identifier for this interface is 0x68ccfe89
 contract ERC721Mintable is Dummy, ERC165, ERC721MintableEvents {
-	// Selector: mintingFinished() 05d2035b
+	/// @dev EVM selector for this function is: 0x05d2035b,
+	///  or in textual repr: mintingFinished()
 	function mintingFinished() public view returns (bool) {
 		require(false, stub_error);
 		dummy;
 		return false;
 	}
 
-	// @notice Function to mint token.
-	// @dev `tokenId` should be obtained with `nextTokenId` method,
-	//  unlike standard, you can't specify it manually
-	// @param to The new owner
-	// @param tokenId ID of the minted RFT
-	//
-	// Selector: mint(address,uint256) 40c10f19
+	/// @notice Function to mint token.
+	/// @dev `tokenId` should be obtained with `nextTokenId` method,
+	///  unlike standard, you can't specify it manually
+	/// @param to The new owner
+	/// @param tokenId ID of the minted RFT
+	/// @dev EVM selector for this function is: 0x40c10f19,
+	///  or in textual repr: mint(address,uint256)
 	function mint(address to, uint256 tokenId) public returns (bool) {
 		require(false, stub_error);
 		to;
@@ -340,14 +434,14 @@
 		return false;
 	}
 
-	// @notice Function to mint token with the given tokenUri.
-	// @dev `tokenId` should be obtained with `nextTokenId` method,
-	//  unlike standard, you can't specify it manually
-	// @param to The new owner
-	// @param tokenId ID of the minted RFT
-	// @param tokenUri Token URI that would be stored in the RFT properties
-	//
-	// Selector: mintWithTokenURI(address,uint256,string) 50bb4e7f
+	/// @notice Function to mint token with the given tokenUri.
+	/// @dev `tokenId` should be obtained with `nextTokenId` method,
+	///  unlike standard, you can't specify it manually
+	/// @param to The new owner
+	/// @param tokenId ID of the minted RFT
+	/// @param tokenUri Token URI that would be stored in the RFT properties
+	/// @dev EVM selector for this function is: 0x50bb4e7f,
+	///  or in textual repr: mintWithTokenURI(address,uint256,string)
 	function mintWithTokenURI(
 		address to,
 		uint256 tokenId,
@@ -361,9 +455,9 @@
 		return false;
 	}
 
-	// @dev Not implemented
-	//
-	// Selector: finishMinting() 7d64bcb4
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x7d64bcb4,
+	///  or in textual repr: finishMinting()
 	function finishMinting() public returns (bool) {
 		require(false, stub_error);
 		dummy = 0;
@@ -371,59 +465,17 @@
 	}
 }
 
-// Selector: 780e9d63
-contract ERC721Enumerable is Dummy, ERC165 {
-	// @notice Enumerate valid RFTs
-	// @param index A counter less than `totalSupply()`
-	// @return The token identifier for the `index`th NFT,
-	//  (sort order not specified)
-	//
-	// Selector: tokenByIndex(uint256) 4f6ccce7
-	function tokenByIndex(uint256 index) public view returns (uint256) {
-		require(false, stub_error);
-		index;
-		dummy;
-		return 0;
-	}
-
-	// Not implemented
-	//
-	// Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
-	function tokenOfOwnerByIndex(address owner, uint256 index)
-		public
-		view
-		returns (uint256)
-	{
-		require(false, stub_error);
-		owner;
-		index;
-		dummy;
-		return 0;
-	}
-
-	// @notice Count RFTs tracked by this contract
-	// @return A count of valid RFTs tracked by this contract, where each one of
-	//  them has an assigned and queryable owner not equal to the zero address
-	//
-	// Selector: totalSupply() 18160ddd
-	function totalSupply() public view returns (uint256) {
-		require(false, stub_error);
-		dummy;
-		return 0;
-	}
-}
-
-// Selector: 7c3bef89
+/// @title Unique extensions for ERC721.
+/// @dev the ERC-165 identifier for this interface is 0x7c3bef89
 contract ERC721UniqueExtensions is Dummy, ERC165 {
-	// @notice Transfer ownership of an RFT
-	// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
-	//  is the zero address. Throws if `tokenId` is not a valid RFT.
-	//  Throws if RFT pieces have multiple owners.
-	// @param to The new owner
-	// @param tokenId The RFT to transfer
-	// @param _value Not used for an RFT
-	//
-	// Selector: transfer(address,uint256) a9059cbb
+	/// @notice Transfer ownership of an RFT
+	/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
+	///  is the zero address. Throws if `tokenId` is not a valid RFT.
+	///  Throws if RFT pieces have multiple owners.
+	/// @param to The new owner
+	/// @param tokenId The RFT to transfer
+	/// @dev EVM selector for this function is: 0xa9059cbb,
+	///  or in textual repr: transfer(address,uint256)
 	function transfer(address to, uint256 tokenId) public {
 		require(false, stub_error);
 		to;
@@ -431,16 +483,15 @@
 		dummy = 0;
 	}
 
-	// @notice Burns a specific ERC721 token.
-	// @dev Throws unless `msg.sender` is the current owner or an authorized
-	//  operator for this RFT. Throws if `from` is not the current owner. Throws
-	//  if `to` is the zero address. Throws if `tokenId` is not a valid RFT.
-	//  Throws if RFT pieces have multiple owners.
-	// @param from The current owner of the RFT
-	// @param tokenId The RFT to transfer
-	// @param _value Not used for an RFT
-	//
-	// Selector: burnFrom(address,uint256) 79cc6790
+	/// @notice Burns a specific ERC721 token.
+	/// @dev Throws unless `msg.sender` is the current owner or an authorized
+	///  operator for this RFT. Throws if `from` is not the current owner. Throws
+	///  if `to` is the zero address. Throws if `tokenId` is not a valid RFT.
+	///  Throws if RFT pieces have multiple owners.
+	/// @param from The current owner of the RFT
+	/// @param tokenId The RFT to transfer
+	/// @dev EVM selector for this function is: 0x79cc6790,
+	///  or in textual repr: burnFrom(address,uint256)
 	function burnFrom(address from, uint256 tokenId) public {
 		require(false, stub_error);
 		from;
@@ -448,22 +499,22 @@
 		dummy = 0;
 	}
 
-	// @notice Returns next free RFT ID.
-	//
-	// Selector: nextTokenId() 75794a3c
+	/// @notice Returns next free RFT ID.
+	/// @dev EVM selector for this function is: 0x75794a3c,
+	///  or in textual repr: nextTokenId()
 	function nextTokenId() public view returns (uint256) {
 		require(false, stub_error);
 		dummy;
 		return 0;
 	}
 
-	// @notice Function to mint multiple tokens.
-	// @dev `tokenIds` should be an array of consecutive numbers and first number
-	//  should be obtained with `nextTokenId` method
-	// @param to The new owner
-	// @param tokenIds IDs of the minted RFTs
-	//
-	// Selector: mintBulk(address,uint256[]) 44a9945e
+	/// @notice Function to mint multiple tokens.
+	/// @dev `tokenIds` should be an array of consecutive numbers and first number
+	///  should be obtained with `nextTokenId` method
+	/// @param to The new owner
+	/// @param tokenIds IDs of the minted RFTs
+	/// @dev EVM selector for this function is: 0x44a9945e,
+	///  or in textual repr: mintBulk(address,uint256[])
 	function mintBulk(address to, uint256[] memory tokenIds)
 		public
 		returns (bool)
@@ -475,14 +526,14 @@
 		return false;
 	}
 
-	// @notice Function to mint multiple tokens with the given tokenUris.
-	// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
-	//  numbers and first number should be obtained with `nextTokenId` method
-	// @param to The new owner
-	// @param tokens array of pairs of token ID and token URI for minted tokens
-	//
-	// Selector: mintBulkWithTokenURI(address,(uint256,string)[]) 36543006
-	function mintBulkWithTokenURI(address to, Tuple0[] memory tokens)
+	/// @notice Function to mint multiple tokens with the given tokenUris.
+	/// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
+	///  numbers and first number should be obtained with `nextTokenId` method
+	/// @param to The new owner
+	/// @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)
 	{
@@ -493,11 +544,11 @@
 		return false;
 	}
 
-	// Returns EVM address for refungible token
-	//
-	// @param token ID of the token
-	//
-	// Selector: tokenContractAddress(uint256) ab76fac6
+	/// Returns EVM address for refungible token
+	///
+	/// @param token ID of the token
+	/// @dev EVM selector for this function is: 0xab76fac6,
+	///  or in textual repr: tokenContractAddress(uint256)
 	function tokenContractAddress(uint256 token) public view returns (address) {
 		require(false, stub_error);
 		token;
@@ -506,291 +557,247 @@
 	}
 }
 
-// Selector: ffe4da23
-contract Collection is Dummy, ERC165 {
-	// Set collection property.
-	//
-	// @param key Property key.
-	// @param value Propery value.
-	//
-	// Selector: setCollectionProperty(string,bytes) 2f073f66
-	function setCollectionProperty(string memory key, bytes memory value)
-		public
-	{
-		require(false, stub_error);
-		key;
-		value;
-		dummy = 0;
-	}
+/// @dev anonymous struct
+struct Tuple8 {
+	uint256 field_0;
+	string field_1;
+}
 
-	// Delete collection property.
-	//
-	// @param key Property key.
-	//
-	// Selector: deleteCollectionProperty(string) 7b7debce
-	function deleteCollectionProperty(string memory key) public {
+/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
+/// @dev See https://eips.ethereum.org/EIPS/eip-721
+/// @dev the ERC-165 identifier for this interface is 0x780e9d63
+contract ERC721Enumerable is Dummy, ERC165 {
+	/// @notice Enumerate valid RFTs
+	/// @param index A counter less than `totalSupply()`
+	/// @return The token identifier for the `index`th NFT,
+	///  (sort order not specified)
+	/// @dev EVM selector for this function is: 0x4f6ccce7,
+	///  or in textual repr: tokenByIndex(uint256)
+	function tokenByIndex(uint256 index) public view returns (uint256) {
 		require(false, stub_error);
-		key;
-		dummy = 0;
+		index;
+		dummy;
+		return 0;
 	}
 
-	// Get collection property.
-	//
-	// @dev Throws error if key not found.
-	//
-	// @param key Property key.
-	// @return bytes The property corresponding to the key.
-	//
-	// Selector: collectionProperty(string) cf24fd6d
-	function collectionProperty(string memory key)
+	/// Not implemented
+	/// @dev EVM selector for this function is: 0x2f745c59,
+	///  or in textual repr: tokenOfOwnerByIndex(address,uint256)
+	function tokenOfOwnerByIndex(address owner, uint256 index)
 		public
 		view
-		returns (bytes memory)
+		returns (uint256)
 	{
 		require(false, stub_error);
-		key;
+		owner;
+		index;
 		dummy;
-		return hex"";
+		return 0;
 	}
 
-	// Set the sponsor of the collection.
-	//
-	// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
-	//
-	// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
-	//
-	// Selector: setCollectionSponsor(address) 7623402e
-	function setCollectionSponsor(address sponsor) public {
+	/// @notice Count RFTs tracked by this contract
+	/// @return A count of valid RFTs tracked by this contract, where each one of
+	///  them has an assigned and queryable owner not equal to the zero address
+	/// @dev EVM selector for this function is: 0x18160ddd,
+	///  or in textual repr: totalSupply()
+	function totalSupply() public view returns (uint256) {
 		require(false, stub_error);
-		sponsor;
-		dummy = 0;
+		dummy;
+		return 0;
 	}
+}
 
-	// Collection sponsorship confirmation.
-	//
-	// @dev After setting the sponsor for the collection, it must be confirmed with this function.
-	//
-	// Selector: confirmCollectionSponsorship() 3c50e97a
-	function confirmCollectionSponsorship() public {
+/// @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 = 0;
+		dummy;
+		return "";
 	}
 
-	// Set limits for the collection.
-	// @dev Throws error if limit not found.
-	// @param limit Name of the limit. Valid names:
-	// 	"accountTokenOwnershipLimit",
-	// 	"sponsoredDataSize",
-	// 	"sponsoredDataRateLimit",
-	// 	"tokenLimit",
-	// 	"sponsorTransferTimeout",
-	// 	"sponsorApproveTimeout"
-	// @param value Value of the limit.
-	//
-	// Selector: setCollectionLimit(string,uint32) 6a3841db
-	function setCollectionLimit(string memory limit, uint32 value) public {
+	/// @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);
-		limit;
-		value;
-		dummy = 0;
+		dummy;
+		return "";
 	}
 
-	// Set limits for the collection.
-	// @dev Throws error if limit not found.
-	// @param limit Name of the limit. Valid names:
-	// 	"ownerCanTransfer",
-	// 	"ownerCanDestroy",
-	// 	"transfersEnabled"
-	// @param value Value of the limit.
-	//
-	// Selector: setCollectionLimit(string,bool) 993b7fba
-	function setCollectionLimit(string memory limit, bool value) public {
+	/// @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);
-		limit;
-		value;
-		dummy = 0;
-	}
-
-	// Get contract address.
-	//
-	// Selector: contractAddress() f6b4dfb4
-	function contractAddress() public view returns (address) {
-		require(false, stub_error);
+		tokenId;
 		dummy;
-		return 0x0000000000000000000000000000000000000000;
+		return "";
 	}
+}
 
-	// Add collection admin by substrate address.
-	// @param new_admin Substrate administrator address.
-	//
-	// Selector: addCollectionAdminSubstrate(uint256) 5730062b
-	function addCollectionAdminSubstrate(uint256 newAdmin) public {
-		require(false, stub_error);
-		newAdmin;
-		dummy = 0;
-	}
+/// @dev inlined interface
+contract ERC721Events {
+	event Transfer(
+		address indexed from,
+		address indexed to,
+		uint256 indexed tokenId
+	);
+	event Approval(
+		address indexed owner,
+		address indexed approved,
+		uint256 indexed tokenId
+	);
+	event ApprovalForAll(
+		address indexed owner,
+		address indexed operator,
+		bool approved
+	);
+}
 
-	// Remove collection admin by substrate address.
-	// @param admin Substrate administrator address.
-	//
-	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
-	function removeCollectionAdminSubstrate(uint256 admin) public {
+/// @title ERC-721 Non-Fungible Token Standard
+/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
+/// @dev the ERC-165 identifier for this interface is 0x58800161
+contract ERC721 is Dummy, ERC165, ERC721Events {
+	/// @notice Count all RFTs assigned to an owner
+	/// @dev RFTs assigned to the zero address are considered invalid, and this
+	///  function throws for queries about the zero address.
+	/// @param owner An address for whom to query the balance
+	/// @return The number of RFTs owned by `owner`, possibly zero
+	/// @dev EVM selector for this function is: 0x70a08231,
+	///  or in textual repr: balanceOf(address)
+	function balanceOf(address owner) public view returns (uint256) {
 		require(false, stub_error);
-		admin;
-		dummy = 0;
+		owner;
+		dummy;
+		return 0;
 	}
 
-	// Add collection admin.
-	// @param new_admin Address of the added administrator.
-	//
-	// Selector: addCollectionAdmin(address) 92e462c7
-	function addCollectionAdmin(address newAdmin) public {
+	/// @notice Find the owner of an RFT
+	/// @dev RFTs assigned to zero address are considered invalid, and queries
+	///  about them do throw.
+	///  Returns special 0xffffffffffffffffffffffffffffffffffffffff address for
+	///  the tokens that are partially owned.
+	/// @param tokenId The identifier for an RFT
+	/// @return The address of the owner of the RFT
+	/// @dev EVM selector for this function is: 0x6352211e,
+	///  or in textual repr: ownerOf(uint256)
+	function ownerOf(uint256 tokenId) public view returns (address) {
 		require(false, stub_error);
-		newAdmin;
-		dummy = 0;
+		tokenId;
+		dummy;
+		return 0x0000000000000000000000000000000000000000;
 	}
 
-	// Remove collection admin.
-	//
-	// @param new_admin Address of the removed administrator.
-	//
-	// Selector: removeCollectionAdmin(address) fafd7b42
-	function removeCollectionAdmin(address admin) public {
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x60a11672,
+	///  or in textual repr: safeTransferFromWithData(address,address,uint256,bytes)
+	function safeTransferFromWithData(
+		address from,
+		address to,
+		uint256 tokenId,
+		bytes memory data
+	) public {
 		require(false, stub_error);
-		admin;
+		from;
+		to;
+		tokenId;
+		data;
 		dummy = 0;
 	}
 
-	// Toggle accessibility of collection nesting.
-	//
-	// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
-	//
-	// Selector: setCollectionNesting(bool) 112d4586
-	function setCollectionNesting(bool enable) public {
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x42842e0e,
+	///  or in textual repr: safeTransferFrom(address,address,uint256)
+	function safeTransferFrom(
+		address from,
+		address to,
+		uint256 tokenId
+	) public {
 		require(false, stub_error);
-		enable;
+		from;
+		to;
+		tokenId;
 		dummy = 0;
 	}
 
-	// Toggle accessibility of collection nesting.
-	//
-	// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
-	// @param collections Addresses of collections that will be available for nesting.
-	//
-	// Selector: setCollectionNesting(bool,address[]) 64872396
-	function setCollectionNesting(bool enable, address[] memory collections)
-		public
-	{
-		require(false, stub_error);
-		enable;
-		collections;
-		dummy = 0;
-	}
-
-	// Set the collection access method.
-	// @param mode Access mode
-	// 	0 for Normal
-	// 	1 for AllowList
-	//
-	// Selector: setCollectionAccess(uint8) 41835d4c
-	function setCollectionAccess(uint8 mode) public {
+	/// @notice Transfer ownership of an RFT -- THE CALLER IS RESPONSIBLE
+	///  TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE
+	///  THEY MAY BE PERMANENTLY LOST
+	/// @dev Throws unless `msg.sender` is the current owner or an authorized
+	///  operator for this RFT. Throws if `from` is not the current owner. Throws
+	///  if `to` is the zero address. Throws if `tokenId` is not a valid RFT.
+	///  Throws if RFT pieces have multiple owners.
+	/// @param from The current owner of the NFT
+	/// @param to The new owner
+	/// @param tokenId The NFT to transfer
+	/// @dev EVM selector for this function is: 0x23b872dd,
+	///  or in textual repr: transferFrom(address,address,uint256)
+	function transferFrom(
+		address from,
+		address to,
+		uint256 tokenId
+	) public {
 		require(false, stub_error);
-		mode;
-		dummy = 0;
-	}
-
-	// Add the user to the allowed list.
-	//
-	// @param user Address of a trusted user.
-	//
-	// Selector: addToCollectionAllowList(address) 67844fe6
-	function addToCollectionAllowList(address user) public {
-		require(false, stub_error);
-		user;
+		from;
+		to;
+		tokenId;
 		dummy = 0;
 	}
 
-	// Remove the user from the allowed list.
-	//
-	// @param user Address of a removed user.
-	//
-	// Selector: removeFromCollectionAllowList(address) 85c51acb
-	function removeFromCollectionAllowList(address user) public {
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x095ea7b3,
+	///  or in textual repr: approve(address,uint256)
+	function approve(address approved, uint256 tokenId) public {
 		require(false, stub_error);
-		user;
+		approved;
+		tokenId;
 		dummy = 0;
 	}
 
-	// Switch permission for minting.
-	//
-	// @param mode Enable if "true".
-	//
-	// Selector: setCollectionMintMode(bool) 00018e84
-	function setCollectionMintMode(bool mode) public {
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0xa22cb465,
+	///  or in textual repr: setApprovalForAll(address,bool)
+	function setApprovalForAll(address operator, bool approved) public {
 		require(false, stub_error);
-		mode;
+		operator;
+		approved;
 		dummy = 0;
 	}
 
-	// Check that account is the owner or admin of the collection
-	//
-	// @param user account to verify
-	// @return "true" if account is the owner or admin
-	//
-	// Selector: isOwnerOrAdmin(address) 9811b0c7
-	function isOwnerOrAdmin(address user) public view returns (bool) {
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x081812fc,
+	///  or in textual repr: getApproved(uint256)
+	function getApproved(uint256 tokenId) public view returns (address) {
 		require(false, stub_error);
-		user;
+		tokenId;
 		dummy;
-		return false;
+		return 0x0000000000000000000000000000000000000000;
 	}
 
-	// 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
-	//
-	// Selector: isOwnerOrAdminSubstrate(uint256) 68910e00
-	function isOwnerOrAdminSubstrate(uint256 user) public view returns (bool) {
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0xe985e9c5,
+	///  or in textual repr: isApprovedForAll(address,address)
+	function isApprovedForAll(address owner, address operator)
+		public
+		view
+		returns (address)
+	{
 		require(false, stub_error);
-		user;
+		owner;
+		operator;
 		dummy;
-		return false;
-	}
-
-	// Returns collection type
-	//
-	// @return `Fungible` or `NFT` or `ReFungible`
-	//
-	// Selector: uniqueCollectionType() d34b55b8
-	function uniqueCollectionType() public returns (string memory) {
-		require(false, stub_error);
-		dummy = 0;
-		return "";
-	}
-
-	// Changes collection owner to another account
-	//
-	// @dev Owner can be changed only by current owner
-	// @param newOwner new owner account
-	//
-	// Selector: setOwner(address) 13af4035
-	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
-	//
-	// Selector: setOwnerSubstrate(uint256) b212138f
-	function setOwnerSubstrate(uint256 newOwner) public {
-		require(false, stub_error);
-		newOwner;
-		dummy = 0;
+		return 0x0000000000000000000000000000000000000000;
 	}
 }
 
modifiedpallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungibleToken.soldiffbeforeafterboth
--- a/pallets/refungible/src/stubs/UniqueRefungibleToken.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungibleToken.sol
@@ -3,7 +3,7 @@
 
 pragma solidity >=0.8.0 <0.9.0;
 
-// Common stubs holder
+/// @dev common stubs holder
 contract Dummy {
 	uint8 dummy;
 	string stub_error = "this contract is implemented in native";
@@ -21,19 +21,10 @@
 	}
 }
 
-// Inline
-contract ERC20Events {
-	event Transfer(address indexed from, address indexed to, uint256 value);
-	event Approval(
-		address indexed owner,
-		address indexed spender,
-		uint256 value
-	);
-}
-
-// Selector: 042f1106
+/// @dev the ERC-165 identifier for this interface is 0x042f1106
 contract ERC1633UniqueExtensions is Dummy, ERC165 {
-	// Selector: setParentNFT(address,uint256) 042f1106
+	/// @dev EVM selector for this function is: 0x042f1106,
+	///  or in textual repr: setParentNFT(address,uint256)
 	function setParentNFT(address collection, uint256 nftId)
 		public
 		returns (bool)
@@ -46,16 +37,18 @@
 	}
 }
 
-// Selector: 5755c3f2
+/// @dev the ERC-165 identifier for this interface is 0x5755c3f2
 contract ERC1633 is Dummy, ERC165 {
-	// Selector: parentToken() 80a54001
+	/// @dev EVM selector for this function is: 0x80a54001,
+	///  or in textual repr: parentToken()
 	function parentToken() public view returns (address) {
 		require(false, stub_error);
 		dummy;
 		return 0x0000000000000000000000000000000000000000;
 	}
 
-	// Selector: parentTokenId() d7f083f3
+	/// @dev EVM selector for this function is: 0xd7f083f3,
+	///  or in textual repr: parentTokenId()
 	function parentTokenId() public view returns (uint256) {
 		require(false, stub_error);
 		dummy;
@@ -63,49 +56,92 @@
 	}
 }
 
-// Selector: 942e8b22
+/// @dev the ERC-165 identifier for this interface is 0xab8deb37
+contract ERC20UniqueExtensions is Dummy, ERC165 {
+	/// @dev Function that burns an amount of the token of a given account,
+	/// deducting from the sender's allowance for said account.
+	/// @param from The account whose tokens will be burnt.
+	/// @param amount The amount that will be burnt.
+	/// @dev EVM selector for this function is: 0x79cc6790,
+	///  or in textual repr: burnFrom(address,uint256)
+	function burnFrom(address from, uint256 amount) public returns (bool) {
+		require(false, stub_error);
+		from;
+		amount;
+		dummy = 0;
+		return false;
+	}
+
+	/// @dev Function that changes total amount of the tokens.
+	///  Throws if `msg.sender` doesn't owns all of the tokens.
+	/// @param amount New total amount of the tokens.
+	/// @dev EVM selector for this function is: 0xd2418ca7,
+	///  or in textual repr: repartition(uint256)
+	function repartition(uint256 amount) public returns (bool) {
+		require(false, stub_error);
+		amount;
+		dummy = 0;
+		return false;
+	}
+}
+
+/// @dev inlined interface
+contract ERC20Events {
+	event Transfer(address indexed from, address indexed to, uint256 value);
+	event Approval(
+		address indexed owner,
+		address indexed spender,
+		uint256 value
+	);
+}
+
+/// @title Standard ERC20 token
+///
+/// @dev Implementation of the basic standard token.
+/// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
+/// @dev the ERC-165 identifier for this interface is 0x942e8b22
 contract ERC20 is Dummy, ERC165, ERC20Events {
-	// @return the name of the token.
-	//
-	// Selector: name() 06fdde03
+	/// @return the name of the token.
+	/// @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 "";
 	}
 
-	// @return the symbol of the token.
-	//
-	// Selector: symbol() 95d89b41
+	/// @return the symbol of the token.
+	/// @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 "";
 	}
 
-	// @dev Total number of tokens in existence
-	//
-	// Selector: totalSupply() 18160ddd
+	/// @dev Total number of tokens in existence
+	/// @dev EVM selector for this function is: 0x18160ddd,
+	///  or in textual repr: totalSupply()
 	function totalSupply() public view returns (uint256) {
 		require(false, stub_error);
 		dummy;
 		return 0;
 	}
 
-	// @dev Not supported
-	//
-	// Selector: decimals() 313ce567
+	/// @dev Not supported
+	/// @dev EVM selector for this function is: 0x313ce567,
+	///  or in textual repr: decimals()
 	function decimals() public view returns (uint8) {
 		require(false, stub_error);
 		dummy;
 		return 0;
 	}
 
-	// @dev Gets the balance of the specified address.
-	// @param owner The address to query the balance of.
-	// @return An uint256 representing the amount owned by the passed address.
-	//
-	// Selector: balanceOf(address) 70a08231
+	/// @dev Gets the balance of the specified address.
+	/// @param owner The address to query the balance of.
+	/// @return An uint256 representing the amount owned by the passed address.
+	/// @dev EVM selector for this function is: 0x70a08231,
+	///  or in textual repr: balanceOf(address)
 	function balanceOf(address owner) public view returns (uint256) {
 		require(false, stub_error);
 		owner;
@@ -113,11 +149,11 @@
 		return 0;
 	}
 
-	// @dev Transfer token for a specified address
-	// @param to The address to transfer to.
-	// @param amount The amount to be transferred.
-	//
-	// Selector: transfer(address,uint256) a9059cbb
+	/// @dev Transfer token for a specified address
+	/// @param to The address to transfer to.
+	/// @param amount The amount to be transferred.
+	/// @dev EVM selector for this function is: 0xa9059cbb,
+	///  or in textual repr: transfer(address,uint256)
 	function transfer(address to, uint256 amount) public returns (bool) {
 		require(false, stub_error);
 		to;
@@ -126,12 +162,12 @@
 		return false;
 	}
 
-	// @dev Transfer tokens from one address to another
-	// @param from address The address which you want to send tokens from
-	// @param to address The address which you want to transfer to
-	// @param amount uint256 the amount of tokens to be transferred
-	//
-	// Selector: transferFrom(address,address,uint256) 23b872dd
+	/// @dev Transfer tokens from one address to another
+	/// @param from address The address which you want to send tokens from
+	/// @param to address The address which you want to transfer to
+	/// @param amount uint256 the amount of tokens to be transferred
+	/// @dev EVM selector for this function is: 0x23b872dd,
+	///  or in textual repr: transferFrom(address,address,uint256)
 	function transferFrom(
 		address from,
 		address to,
@@ -145,15 +181,15 @@
 		return false;
 	}
 
-	// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.
-	// Beware that changing an allowance with this method brings the risk that someone may use both the old
-	// and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
-	// race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
-	// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
-	// @param spender The address which will spend the funds.
-	// @param amount The amount of tokens to be spent.
-	//
-	// Selector: approve(address,uint256) 095ea7b3
+	/// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.
+	/// Beware that changing an allowance with this method brings the risk that someone may use both the old
+	/// and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
+	/// race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
+	/// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
+	/// @param spender The address which will spend the funds.
+	/// @param amount The amount of tokens to be spent.
+	/// @dev EVM selector for this function is: 0x095ea7b3,
+	///  or in textual repr: approve(address,uint256)
 	function approve(address spender, uint256 amount) public returns (bool) {
 		require(false, stub_error);
 		spender;
@@ -162,12 +198,12 @@
 		return false;
 	}
 
-	// @dev Function to check the amount of tokens that an owner allowed to a spender.
-	// @param owner address The address which owns the funds.
-	// @param spender address The address which will spend the funds.
-	// @return A uint256 specifying the amount of tokens still available for the spender.
-	//
-	// Selector: allowance(address,address) dd62ed3e
+	/// @dev Function to check the amount of tokens that an owner allowed to a spender.
+	/// @param owner address The address which owns the funds.
+	/// @param spender address The address which will spend the funds.
+	/// @return A uint256 specifying the amount of tokens still available for the spender.
+	/// @dev EVM selector for this function is: 0xdd62ed3e,
+	///  or in textual repr: allowance(address,address)
 	function allowance(address owner, address spender)
 		public
 		view
@@ -178,35 +214,6 @@
 		spender;
 		dummy;
 		return 0;
-	}
-}
-
-// Selector: ab8deb37
-contract ERC20UniqueExtensions is Dummy, ERC165 {
-	// @dev Function that burns an amount of the token of a given account,
-	// deducting from the sender's allowance for said account.
-	// @param from The account whose tokens will be burnt.
-	// @param amount The amount that will be burnt.
-	//
-	// Selector: burnFrom(address,uint256) 79cc6790
-	function burnFrom(address from, uint256 amount) public returns (bool) {
-		require(false, stub_error);
-		from;
-		amount;
-		dummy = 0;
-		return false;
-	}
-
-	// @dev Function that changes total amount of the tokens.
-	//  Throws if `msg.sender` doesn't owns all of the tokens.
-	// @param amount New total amount of the tokens.
-	//
-	// Selector: repartition(uint256) d2418ca7
-	function repartition(uint256 amount) public returns (bool) {
-		require(false, stub_error);
-		amount;
-		dummy = 0;
-		return false;
 	}
 }
 
modifiedpallets/unique/src/eth/mod.rsdiffbeforeafterboth
--- a/pallets/unique/src/eth/mod.rs
+++ b/pallets/unique/src/eth/mod.rs
@@ -203,7 +203,7 @@
 }
 
 /// @title Contract, which allows users to operate with collections
-#[solidity_interface(name = "CollectionHelpers", events(CollectionHelpersEvents))]
+#[solidity_interface(name = CollectionHelpers, events(CollectionHelpersEvents))]
 impl<T> EvmCollectionHelpers<T>
 where
 	T: Config + pallet_nonfungible::Config + pallet_refungible::Config,
@@ -211,7 +211,7 @@
 	/// Create an NFT collection
 	/// @param name Name of the collection
 	/// @param description Informative description of the collection
-	/// @param token_prefix Token prefix to represent the collection tokens in UI and user applications
+	/// @param tokenPrefix Token prefix to represent the collection tokens in UI and user applications
 	/// @return address Address of the newly created collection
 	#[weight(<SelfWeightOf<T>>::create_collection())]
 	fn create_nonfungible_collection(
@@ -304,7 +304,7 @@
 	}
 
 	/// Check if a collection exists
-	/// @param collection_address Address of the collection in question
+	/// @param collectionAddress Address of the collection in question
 	/// @return bool Does the collection exist?
 	fn is_collection_exist(&self, _caller: caller, collection_address: address) -> Result<bool> {
 		if let Some(id) = pallet_common::eth::map_eth_to_id(&collection_address) {
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
@@ -3,7 +3,7 @@
 
 pragma solidity >=0.8.0 <0.9.0;
 
-// Common stubs holder
+/// @dev common stubs holder
 contract Dummy {
 	uint8 dummy;
 	string stub_error = "this contract is implemented in native";
@@ -21,7 +21,7 @@
 	}
 }
 
-// Inline
+/// @dev inlined interface
 contract CollectionHelpersEvents {
 	event CollectionCreated(
 		address indexed owner,
@@ -29,15 +29,16 @@
 	);
 }
 
-// Selector: 675f3074
+/// @title Contract, which allows users to operate with collections
+/// @dev the ERC-165 identifier for this interface is 0x675f3074
 contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {
-	// Create an NFT collection
-	// @param name Name of the collection
-	// @param description Informative description of the collection
-	// @param token_prefix Token prefix to represent the collection tokens in UI and user applications
-	// @return address Address of the newly created collection
-	//
-	// Selector: createNonfungibleCollection(string,string,string) e34a6844
+	/// Create an NFT collection
+	/// @param name Name of the collection
+	/// @param description Informative description of the collection
+	/// @param tokenPrefix Token prefix to represent the collection tokens in UI and user applications
+	/// @return address Address of the newly created collection
+	/// @dev EVM selector for this function is: 0xe34a6844,
+	///  or in textual repr: createNonfungibleCollection(string,string,string)
 	function createNonfungibleCollection(
 		string memory name,
 		string memory description,
@@ -51,7 +52,8 @@
 		return 0x0000000000000000000000000000000000000000;
 	}
 
-	// Selector: createERC721MetadataCompatibleCollection(string,string,string,string) a634a5f9
+	/// @dev EVM selector for this function is: 0xa634a5f9,
+	///  or in textual repr: createERC721MetadataCompatibleCollection(string,string,string,string)
 	function createERC721MetadataCompatibleCollection(
 		string memory name,
 		string memory description,
@@ -67,7 +69,8 @@
 		return 0x0000000000000000000000000000000000000000;
 	}
 
-	// Selector: createRefungibleCollection(string,string,string) 44a68ad5
+	/// @dev EVM selector for this function is: 0x44a68ad5,
+	///  or in textual repr: createRefungibleCollection(string,string,string)
 	function createRefungibleCollection(
 		string memory name,
 		string memory description,
@@ -81,7 +84,8 @@
 		return 0x0000000000000000000000000000000000000000;
 	}
 
-	// Selector: createERC721MetadataCompatibleRFTCollection(string,string,string,string) a5596388
+	/// @dev EVM selector for this function is: 0xa5596388,
+	///  or in textual repr: createERC721MetadataCompatibleRFTCollection(string,string,string,string)
 	function createERC721MetadataCompatibleRFTCollection(
 		string memory name,
 		string memory description,
@@ -97,11 +101,11 @@
 		return 0x0000000000000000000000000000000000000000;
 	}
 
-	// Check if a collection exists
-	// @param collection_address Address of the collection in question
-	// @return bool Does the collection exist?
-	//
-	// Selector: isCollectionExist(address) c3de1494
+	/// Check if a collection exists
+	/// @param collectionAddress Address of the collection in question
+	/// @return bool Does the collection exist?
+	/// @dev EVM selector for this function is: 0xc3de1494,
+	///  or in textual repr: isCollectionExist(address)
 	function isCollectionExist(address collectionAddress)
 		public
 		view
modifiedtests/src/eth/api/CollectionHelpers.soldiffbeforeafterboth
--- a/tests/src/eth/api/CollectionHelpers.sol
+++ b/tests/src/eth/api/CollectionHelpers.sol
@@ -3,7 +3,7 @@
 
 pragma solidity >=0.8.0 <0.9.0;
 
-// Common stubs holder
+/// @dev common stubs holder
 interface Dummy {
 
 }
@@ -12,7 +12,7 @@
 	function supportsInterface(bytes4 interfaceID) external view returns (bool);
 }
 
-// Inline
+/// @dev inlined interface
 interface CollectionHelpersEvents {
 	event CollectionCreated(
 		address indexed owner,
@@ -20,22 +20,24 @@
 	);
 }
 
-// Selector: 675f3074
+/// @title Contract, which allows users to operate with collections
+/// @dev the ERC-165 identifier for this interface is 0x675f3074
 interface CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {
-	// Create an NFT collection
-	// @param name Name of the collection
-	// @param description Informative description of the collection
-	// @param token_prefix Token prefix to represent the collection tokens in UI and user applications
-	// @return address Address of the newly created collection
-	//
-	// Selector: createNonfungibleCollection(string,string,string) e34a6844
+	/// Create an NFT collection
+	/// @param name Name of the collection
+	/// @param description Informative description of the collection
+	/// @param tokenPrefix Token prefix to represent the collection tokens in UI and user applications
+	/// @return address Address of the newly created collection
+	/// @dev EVM selector for this function is: 0xe34a6844,
+	///  or in textual repr: createNonfungibleCollection(string,string,string)
 	function createNonfungibleCollection(
 		string memory name,
 		string memory description,
 		string memory tokenPrefix
 	) external returns (address);
 
-	// Selector: createERC721MetadataCompatibleCollection(string,string,string,string) a634a5f9
+	/// @dev EVM selector for this function is: 0xa634a5f9,
+	///  or in textual repr: createERC721MetadataCompatibleCollection(string,string,string,string)
 	function createERC721MetadataCompatibleCollection(
 		string memory name,
 		string memory description,
@@ -43,14 +45,16 @@
 		string memory baseUri
 	) external returns (address);
 
-	// Selector: createRefungibleCollection(string,string,string) 44a68ad5
+	/// @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
 	) external returns (address);
 
-	// Selector: createERC721MetadataCompatibleRFTCollection(string,string,string,string) a5596388
+	/// @dev EVM selector for this function is: 0xa5596388,
+	///  or in textual repr: createERC721MetadataCompatibleRFTCollection(string,string,string,string)
 	function createERC721MetadataCompatibleRFTCollection(
 		string memory name,
 		string memory description,
@@ -58,11 +62,11 @@
 		string memory baseUri
 	) external returns (address);
 
-	// Check if a collection exists
-	// @param collection_address Address of the collection in question
-	// @return bool Does the collection exist?
-	//
-	// Selector: isCollectionExist(address) c3de1494
+	/// Check if a collection exists
+	/// @param collectionAddress Address of the collection in question
+	/// @return bool Does the collection exist?
+	/// @dev EVM selector for this function is: 0xc3de1494,
+	///  or in textual repr: isCollectionExist(address)
 	function isCollectionExist(address collectionAddress)
 		external
 		view
modifiedtests/src/eth/api/ContractHelpers.soldiffbeforeafterboth
--- a/tests/src/eth/api/ContractHelpers.sol
+++ b/tests/src/eth/api/ContractHelpers.sol
@@ -3,13 +3,13 @@
 
 pragma solidity >=0.8.0 <0.9.0;
 
-// Anonymous struct
+/// @dev anonymous struct
 struct Tuple0 {
 	address field_0;
 	uint256 field_1;
 }
 
-// Common stubs holder
+/// @dev common stubs holder
 interface Dummy {
 
 }
@@ -18,124 +18,124 @@
 	function supportsInterface(bytes4 interfaceID) external view returns (bool);
 }
 
-// Selector: 6073d917
+/// @dev the ERC-165 identifier for this interface is 0x6073d917
 interface ContractHelpers is Dummy, ERC165 {
-	// Get contract ovner
-	//
-	// @param Contract_address contract for which the owner is being determined.
-	// @return Contract owner.
-	//
-	// Selector: contractOwner(address) 5152b14c
+	/// Get contract ovner
+	///
+	/// @param contractAddress contract for which the owner is being determined.
+	/// @return Contract owner.
+	///
+	/// Selector: contractOwner(address) 5152b14c
 	function contractOwner(address contractAddress)
 		external
 		view
 		returns (address);
 
-	// Set sponsor.
-	//
-	// @param contract_address Contract for which a sponsor is being established.
-	// @param sponsor User address who set as pending sponsor.
-	//
-	// Selector: setSponsor(address,address) f01fba93
+	/// Set sponsor.
+	///
+	/// @param contractAddress Contract for which a sponsor is being established.
+	/// @param sponsor User address who set as pending sponsor.
+	///
+	/// Selector: setSponsor(address,address) f01fba93
 	function setSponsor(address contractAddress, address sponsor) external;
 
-	// Set contract as self sponsored.
-	//
-	// @param contract_address Contract for which a self sponsoring is being enabled.
-	//
-	// Selector: selfSponsoredEnable(address) 89f7d9ae
+	/// Set contract as self sponsored.
+	///
+	/// @param contractAddress Contract for which a self sponsoring is being enabled.
+	///
+	/// Selector: selfSponsoredEnable(address) 89f7d9ae
 	function selfSponsoredEnable(address contractAddress) external;
 
-	// Remove sponsor.
-	//
-	// @param contract_address Contract for which a sponsorship is being removed.
-	//
-	// Selector: removeSponsor(address) ef784250
+	/// Remove sponsor.
+	///
+	/// @param contractAddress Contract for which a sponsorship is being removed.
+	///
+	/// Selector: removeSponsor(address) ef784250
 	function removeSponsor(address contractAddress) external;
 
-	// Confirm sponsorship.
-	//
-	// @dev Caller must be same that set via [`set_sponsor`].
-	//
-	// @param contract_address Сontract for which need to confirm sponsorship.
-	//
-	// Selector: confirmSponsorship(address) abc00001
+	/// Confirm sponsorship.
+	///
+	/// @dev Caller must be same that set via [`setSponsor`].
+	///
+	/// @param contractAddress Сontract for which need to confirm sponsorship.
+	///
+	/// Selector: confirmSponsorship(address) abc00001
 	function confirmSponsorship(address contractAddress) external;
 
-	// Get current sponsor.
-	//
-	// @param contract_address The contract for which a sponsor is requested.
-	// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
-	//
-	// Selector: getSponsor(address) 743fc745
+	/// Get current sponsor.
+	///
+	/// @param contractAddress The contract for which a sponsor is requested.
+	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
+	///
+	/// Selector: getSponsor(address) 743fc745
 	function getSponsor(address contractAddress)
 		external
 		view
 		returns (Tuple0 memory);
 
-	// Check tat contract has confirmed sponsor.
-	//
-	// @param contract_address The contract for which the presence of a confirmed sponsor is checked.
-	// @return **true** if contract has confirmed sponsor.
-	//
-	// Selector: hasSponsor(address) 97418603
+	/// Check tat contract has confirmed sponsor.
+	///
+	/// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.
+	/// @return **true** if contract has confirmed sponsor.
+	///
+	/// Selector: hasSponsor(address) 97418603
 	function hasSponsor(address contractAddress) external view returns (bool);
 
-	// Check tat contract has pending sponsor.
-	//
-	// @param contract_address The contract for which the presence of a pending sponsor is checked.
-	// @return **true** if contract has pending sponsor.
-	//
-	// Selector: hasPendingSponsor(address) 39b9b242
+	/// Check tat contract has pending sponsor.
+	///
+	/// @param contractAddress The contract for which the presence of a pending sponsor is checked.
+	/// @return **true** if contract has pending sponsor.
+	///
+	/// Selector: hasPendingSponsor(address) 39b9b242
 	function hasPendingSponsor(address contractAddress)
 		external
 		view
 		returns (bool);
 
-	// Selector: sponsoringEnabled(address) 6027dc61
+	/// Selector: sponsoringEnabled(address) 6027dc61
 	function sponsoringEnabled(address contractAddress)
 		external
 		view
 		returns (bool);
 
-	// Selector: setSponsoringMode(address,uint8) fde8a560
+	/// Selector: setSponsoringMode(address,uint8) fde8a560
 	function setSponsoringMode(address contractAddress, uint8 mode) external;
 
-	// Selector: sponsoringMode(address) b70c7267
+	/// Selector: sponsoringMode(address) b70c7267
 	function sponsoringMode(address contractAddress)
 		external
 		view
 		returns (uint8);
 
-	// Selector: setSponsoringRateLimit(address,uint32) 77b6c908
+	/// Selector: setSponsoringRateLimit(address,uint32) 77b6c908
 	function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)
 		external;
 
-	// Selector: getSponsoringRateLimit(address) 610cfabd
+	/// Selector: getSponsoringRateLimit(address) 610cfabd
 	function getSponsoringRateLimit(address contractAddress)
 		external
 		view
 		returns (uint32);
 
-	// Selector: allowed(address,address) 5c658165
+	/// Selector: allowed(address,address) 5c658165
 	function allowed(address contractAddress, address user)
 		external
 		view
 		returns (bool);
 
-	// Selector: allowlistEnabled(address) c772ef6c
+	/// Selector: allowlistEnabled(address) c772ef6c
 	function allowlistEnabled(address contractAddress)
 		external
 		view
 		returns (bool);
 
-	// Selector: toggleAllowlist(address,bool) 36de20f5
+	/// Selector: toggleAllowlist(address,bool) 36de20f5
 	function toggleAllowlist(address contractAddress, bool enabled) external;
 
-	// Selector: toggleAllowed(address,address,bool) 4706cc1c
+	/// Selector: toggleAllowed(address,address,bool) 4706cc1c
 	function toggleAllowed(
 		address contractAddress,
 		address user,
-		bool allowed
+		bool isAllowed
 	) external;
 }
modifiedtests/src/eth/api/UniqueFungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -3,7 +3,7 @@
 
 pragma solidity >=0.8.0 <0.9.0;
 
-// Common stubs holder
+/// @dev common stubs holder
 interface Dummy {
 
 }
@@ -12,246 +12,257 @@
 	function supportsInterface(bytes4 interfaceID) external view returns (bool);
 }
 
-// Inline
-interface ERC20Events {
-	event Transfer(address indexed from, address indexed to, uint256 value);
-	event Approval(
-		address indexed owner,
-		address indexed spender,
-		uint256 value
-	);
-}
-
-// Selector: 79cc6790
-interface ERC20UniqueExtensions is Dummy, ERC165 {
-	// Selector: burnFrom(address,uint256) 79cc6790
-	function burnFrom(address from, uint256 amount) external returns (bool);
-}
-
-// Selector: 942e8b22
-interface ERC20 is Dummy, ERC165, ERC20Events {
-	// Selector: name() 06fdde03
-	function name() external view returns (string memory);
-
-	// Selector: symbol() 95d89b41
-	function symbol() external view returns (string memory);
-
-	// Selector: totalSupply() 18160ddd
-	function totalSupply() external view returns (uint256);
-
-	// Selector: decimals() 313ce567
-	function decimals() external view returns (uint8);
-
-	// Selector: balanceOf(address) 70a08231
-	function balanceOf(address owner) external view returns (uint256);
-
-	// Selector: transfer(address,uint256) a9059cbb
-	function transfer(address to, uint256 amount) external returns (bool);
-
-	// Selector: transferFrom(address,address,uint256) 23b872dd
-	function transferFrom(
-		address from,
-		address to,
-		uint256 amount
-	) external returns (bool);
-
-	// Selector: approve(address,uint256) 095ea7b3
-	function approve(address spender, uint256 amount) external returns (bool);
-
-	// Selector: allowance(address,address) dd62ed3e
-	function allowance(address owner, address spender)
-		external
-		view
-		returns (uint256);
-}
-
-// Selector: ffe4da23
+/// @title A contract that allows you to work with collections.
+/// @dev the ERC-165 identifier for this interface is 0xffe4da23
 interface Collection is Dummy, ERC165 {
-	// Set collection property.
-	//
-	// @param key Property key.
-	// @param value Propery value.
-	//
-	// Selector: setCollectionProperty(string,bytes) 2f073f66
+	/// Set collection property.
+	///
+	/// @param key Property key.
+	/// @param value Propery value.
+	/// @dev EVM selector for this function is: 0x2f073f66,
+	///  or in textual repr: setCollectionProperty(string,bytes)
 	function setCollectionProperty(string memory key, bytes memory value)
 		external;
 
-	// Delete collection property.
-	//
-	// @param key Property key.
-	//
-	// Selector: deleteCollectionProperty(string) 7b7debce
+	/// Delete collection property.
+	///
+	/// @param key Property key.
+	/// @dev EVM selector for this function is: 0x7b7debce,
+	///  or in textual repr: deleteCollectionProperty(string)
 	function deleteCollectionProperty(string memory key) external;
 
-	// Get collection property.
-	//
-	// @dev Throws error if key not found.
-	//
-	// @param key Property key.
-	// @return bytes The property corresponding to the key.
-	//
-	// Selector: collectionProperty(string) cf24fd6d
+	/// Get collection property.
+	///
+	/// @dev Throws error if key not found.
+	///
+	/// @param key Property key.
+	/// @return bytes The property corresponding to the key.
+	/// @dev EVM selector for this function is: 0xcf24fd6d,
+	///  or in textual repr: collectionProperty(string)
 	function collectionProperty(string memory key)
 		external
 		view
 		returns (bytes memory);
 
-	// Set the sponsor of the collection.
-	//
-	// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
-	//
-	// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
-	//
-	// Selector: setCollectionSponsor(address) 7623402e
+	/// Set the sponsor of the collection.
+	///
+	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+	///
+	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+	/// @dev EVM selector for this function is: 0x7623402e,
+	///  or in textual repr: setCollectionSponsor(address)
 	function setCollectionSponsor(address sponsor) external;
 
-	// Collection sponsorship confirmation.
-	//
-	// @dev After setting the sponsor for the collection, it must be confirmed with this function.
-	//
-	// Selector: confirmCollectionSponsorship() 3c50e97a
+	/// Collection sponsorship confirmation.
+	///
+	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.
+	/// @dev EVM selector for this function is: 0x3c50e97a,
+	///  or in textual repr: confirmCollectionSponsorship()
 	function confirmCollectionSponsorship() external;
 
-	// Set limits for the collection.
-	// @dev Throws error if limit not found.
-	// @param limit Name of the limit. Valid names:
-	// 	"accountTokenOwnershipLimit",
-	// 	"sponsoredDataSize",
-	// 	"sponsoredDataRateLimit",
-	// 	"tokenLimit",
-	// 	"sponsorTransferTimeout",
-	// 	"sponsorApproveTimeout"
-	// @param value Value of the limit.
-	//
-	// Selector: setCollectionLimit(string,uint32) 6a3841db
+	/// Set limits for the collection.
+	/// @dev Throws error if limit not found.
+	/// @param limit Name of the limit. Valid names:
+	/// 	"accountTokenOwnershipLimit",
+	/// 	"sponsoredDataSize",
+	/// 	"sponsoredDataRateLimit",
+	/// 	"tokenLimit",
+	/// 	"sponsorTransferTimeout",
+	/// 	"sponsorApproveTimeout"
+	/// @param value Value of the limit.
+	/// @dev EVM selector for this function is: 0x6a3841db,
+	///  or in textual repr: setCollectionLimit(string,uint32)
 	function setCollectionLimit(string memory limit, uint32 value) external;
 
-	// Set limits for the collection.
-	// @dev Throws error if limit not found.
-	// @param limit Name of the limit. Valid names:
-	// 	"ownerCanTransfer",
-	// 	"ownerCanDestroy",
-	// 	"transfersEnabled"
-	// @param value Value of the limit.
-	//
-	// Selector: setCollectionLimit(string,bool) 993b7fba
+	/// Set limits for the collection.
+	/// @dev Throws error if limit not found.
+	/// @param limit Name of the limit. Valid names:
+	/// 	"ownerCanTransfer",
+	/// 	"ownerCanDestroy",
+	/// 	"transfersEnabled"
+	/// @param value Value of the limit.
+	/// @dev EVM selector for this function is: 0x993b7fba,
+	///  or in textual repr: setCollectionLimit(string,bool)
 	function setCollectionLimit(string memory limit, bool value) external;
 
-	// Get contract address.
-	//
-	// Selector: contractAddress() f6b4dfb4
+	/// Get contract address.
+	/// @dev EVM selector for this function is: 0xf6b4dfb4,
+	///  or in textual repr: contractAddress()
 	function contractAddress() external view returns (address);
 
-	// Add collection admin by substrate address.
-	// @param new_admin Substrate administrator address.
-	//
-	// Selector: addCollectionAdminSubstrate(uint256) 5730062b
+	/// 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.
-	//
-	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
+	/// 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 new_admin Address of the added administrator.
-	//
-	// Selector: addCollectionAdmin(address) 92e462c7
+	/// Add collection admin.
+	/// @param newAdmin Address of the added administrator.
+	/// @dev EVM selector for this function is: 0x92e462c7,
+	///  or in textual repr: addCollectionAdmin(address)
 	function addCollectionAdmin(address newAdmin) external;
 
-	// Remove collection admin.
-	//
-	// @param new_admin Address of the removed administrator.
-	//
-	// Selector: removeCollectionAdmin(address) fafd7b42
+	/// Remove collection admin.
+	///
+	/// @param admin Address of the removed administrator.
+	/// @dev EVM selector for this function is: 0xfafd7b42,
+	///  or in textual repr: removeCollectionAdmin(address)
 	function removeCollectionAdmin(address admin) external;
 
-	// Toggle accessibility of collection nesting.
-	//
-	// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
-	//
-	// Selector: setCollectionNesting(bool) 112d4586
+	/// Toggle accessibility of collection nesting.
+	///
+	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+	/// @dev EVM selector for this function is: 0x112d4586,
+	///  or in textual repr: setCollectionNesting(bool)
 	function setCollectionNesting(bool enable) external;
 
-	// Toggle accessibility of collection nesting.
-	//
-	// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
-	// @param collections Addresses of collections that will be available for nesting.
-	//
-	// Selector: setCollectionNesting(bool,address[]) 64872396
+	/// Toggle accessibility of collection nesting.
+	///
+	/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+	/// @param collections Addresses of collections that will be available for nesting.
+	/// @dev EVM selector for this function is: 0x64872396,
+	///  or in textual repr: setCollectionNesting(bool,address[])
 	function setCollectionNesting(bool enable, address[] memory collections)
 		external;
 
-	// Set the collection access method.
-	// @param mode Access mode
-	// 	0 for Normal
-	// 	1 for AllowList
-	//
-	// Selector: setCollectionAccess(uint8) 41835d4c
+	/// Set the collection access method.
+	/// @param mode Access mode
+	/// 	0 for Normal
+	/// 	1 for AllowList
+	/// @dev EVM selector for this function is: 0x41835d4c,
+	///  or in textual repr: setCollectionAccess(uint8)
 	function setCollectionAccess(uint8 mode) external;
 
-	// Add the user to the allowed list.
-	//
-	// @param user Address of a trusted user.
-	//
-	// Selector: addToCollectionAllowList(address) 67844fe6
+	/// Add the user to the allowed list.
+	///
+	/// @param user Address of a trusted user.
+	/// @dev EVM selector for this function is: 0x67844fe6,
+	///  or in textual repr: addToCollectionAllowList(address)
 	function addToCollectionAllowList(address user) external;
 
-	// Remove the user from the allowed list.
-	//
-	// @param user Address of a removed user.
-	//
-	// Selector: removeFromCollectionAllowList(address) 85c51acb
+	/// Remove the user from the allowed list.
+	///
+	/// @param user Address of a removed user.
+	/// @dev EVM selector for this function is: 0x85c51acb,
+	///  or in textual repr: removeFromCollectionAllowList(address)
 	function removeFromCollectionAllowList(address user) external;
 
-	// Switch permission for minting.
-	//
-	// @param mode Enable if "true".
-	//
-	// Selector: setCollectionMintMode(bool) 00018e84
+	/// Switch permission for minting.
+	///
+	/// @param mode Enable if "true".
+	/// @dev EVM selector for this function is: 0x00018e84,
+	///  or in textual repr: setCollectionMintMode(bool)
 	function setCollectionMintMode(bool mode) external;
 
-	// Check that account is the owner or admin of the collection
-	//
-	// @param user account to verify
-	// @return "true" if account is the owner or admin
-	//
-	// Selector: isOwnerOrAdmin(address) 9811b0c7
+	/// Check that 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: 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
-	//
-	// Selector: isOwnerOrAdminSubstrate(uint256) 68910e00
+	/// 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
-	//
-	// @return `Fungible` or `NFT` or `ReFungible`
-	//
-	// Selector: uniqueCollectionType() d34b55b8
+	/// Returns collection type
+	///
+	/// @return `Fungible` or `NFT` or `ReFungible`
+	/// @dev EVM selector for this function is: 0xd34b55b8,
+	///  or in textual repr: uniqueCollectionType()
 	function uniqueCollectionType() external returns (string memory);
 
-	// Changes collection owner to another account
-	//
-	// @dev Owner can be changed only by current owner
-	// @param newOwner new owner account
-	//
-	// Selector: setOwner(address) 13af4035
+	/// Changes collection owner to another account
+	///
+	/// @dev Owner can be changed only by current owner
+	/// @param newOwner new owner account
+	/// @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
-	//
-	// Selector: setOwnerSubstrate(uint256) b212138f
+	/// 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 0x79cc6790
+interface ERC20UniqueExtensions is Dummy, ERC165 {
+	/// @dev EVM selector for this function is: 0x79cc6790,
+	///  or in textual repr: burnFrom(address,uint256)
+	function burnFrom(address from, uint256 amount) external returns (bool);
+}
+
+/// @dev inlined interface
+interface ERC20Events {
+	event Transfer(address indexed from, address indexed to, uint256 value);
+	event Approval(
+		address indexed owner,
+		address indexed spender,
+		uint256 value
+	);
+}
+
+/// @dev the ERC-165 identifier for this interface is 0x942e8b22
+interface ERC20 is Dummy, ERC165, ERC20Events {
+	/// @dev EVM selector for this function is: 0x06fdde03,
+	///  or in textual repr: name()
+	function name() external view returns (string memory);
+
+	/// @dev EVM selector for this function is: 0x95d89b41,
+	///  or in textual repr: symbol()
+	function symbol() external view returns (string memory);
+
+	/// @dev EVM selector for this function is: 0x18160ddd,
+	///  or in textual repr: totalSupply()
+	function totalSupply() external view returns (uint256);
+
+	/// @dev EVM selector for this function is: 0x313ce567,
+	///  or in textual repr: decimals()
+	function decimals() external view returns (uint8);
+
+	/// @dev EVM selector for this function is: 0x70a08231,
+	///  or in textual repr: balanceOf(address)
+	function balanceOf(address owner) external view returns (uint256);
+
+	/// @dev EVM selector for this function is: 0xa9059cbb,
+	///  or in textual repr: transfer(address,uint256)
+	function transfer(address to, uint256 amount) external returns (bool);
+
+	/// @dev EVM selector for this function is: 0x23b872dd,
+	///  or in textual repr: transferFrom(address,address,uint256)
+	function transferFrom(
+		address from,
+		address to,
+		uint256 amount
+	) external returns (bool);
+
+	/// @dev EVM selector for this function is: 0x095ea7b3,
+	///  or in textual repr: approve(address,uint256)
+	function approve(address spender, uint256 amount) external returns (bool);
+
+	/// @dev EVM selector for this function is: 0xdd62ed3e,
+	///  or in textual repr: allowance(address,address)
+	function allowance(address owner, address spender)
+		external
+		view
+		returns (uint256);
+}
+
 interface UniqueFungible is
 	Dummy,
 	ERC165,
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -3,55 +3,26 @@
 
 pragma solidity >=0.8.0 <0.9.0;
 
-// Anonymous struct
-struct Tuple0 {
-	uint256 field_0;
-	string field_1;
-}
-
-// Common stubs holder
+/// @dev common stubs holder
 interface Dummy {
 
 }
 
 interface ERC165 is Dummy {
 	function supportsInterface(bytes4 interfaceID) external view returns (bool);
-}
-
-// Inline
-interface ERC721Events {
-	event Transfer(
-		address indexed from,
-		address indexed to,
-		uint256 indexed tokenId
-	);
-	event Approval(
-		address indexed owner,
-		address indexed approved,
-		uint256 indexed tokenId
-	);
-	event ApprovalForAll(
-		address indexed owner,
-		address indexed operator,
-		bool approved
-	);
 }
 
-// Inline
-interface ERC721MintableEvents {
-	event MintingFinished();
-}
-
-// Selector: 41369377
+/// @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 {
-	// @notice Set permissions for token property.
-	// @dev Throws error if `msg.sender` is not admin or owner of the collection.
-	// @param key Property key.
-	// @param is_mutable Permission to mutate property.
-	// @param collection_admin Permission to mutate property by collection admin if property is mutable.
-	// @param token_owner Permission to mutate property by token owner if property is mutable.
-	//
-	// Selector: setTokenPropertyPermission(string,bool,bool,bool) 222d97fa
+	/// @notice Set permissions for token property.
+	/// @dev Throws error if `msg.sender` is not admin or owner of the collection.
+	/// @param key Property key.
+	/// @param isMutable Permission to mutate property.
+	/// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.
+	/// @param tokenOwner Permission to mutate property by token owner if property is mutable.
+	/// @dev EVM selector for this function is: 0x222d97fa,
+	///  or in textual repr: setTokenPropertyPermission(string,bool,bool,bool)
 	function setTokenPropertyPermission(
 		string memory key,
 		bool isMutable,
@@ -59,459 +30,497 @@
 		bool tokenOwner
 	) external;
 
-	// @notice Set token property value.
-	// @dev Throws error if `msg.sender` has no permission to edit the property.
-	// @param tokenId ID of the token.
-	// @param key Property key.
-	// @param value Property value.
-	//
-	// Selector: setProperty(uint256,string,bytes) 1752d67b
+	/// @notice Set token property value.
+	/// @dev Throws error if `msg.sender` has no permission to edit the property.
+	/// @param tokenId ID of the token.
+	/// @param key Property key.
+	/// @param value Property value.
+	/// @dev EVM selector for this function is: 0x1752d67b,
+	///  or in textual repr: setProperty(uint256,string,bytes)
 	function setProperty(
 		uint256 tokenId,
 		string memory key,
 		bytes memory value
 	) external;
 
-	// @notice Delete token property value.
-	// @dev Throws error if `msg.sender` has no permission to edit the property.
-	// @param tokenId ID of the token.
-	// @param key Property key.
-	//
-	// Selector: deleteProperty(uint256,string) 066111d1
+	/// @notice Delete token property value.
+	/// @dev Throws error if `msg.sender` has no permission to edit the property.
+	/// @param tokenId ID of the token.
+	/// @param key Property key.
+	/// @dev EVM selector for this function is: 0x066111d1,
+	///  or in textual repr: deleteProperty(uint256,string)
 	function deleteProperty(uint256 tokenId, string memory key) external;
 
-	// @notice Get token property value.
-	// @dev Throws error if key not found
-	// @param tokenId ID of the token.
-	// @param key Property key.
-	// @return Property value bytes
-	//
-	// Selector: property(uint256,string) 7228c327
+	/// @notice Get token property value.
+	/// @dev Throws error if key not found
+	/// @param tokenId ID of the token.
+	/// @param key Property key.
+	/// @return Property value bytes
+	/// @dev EVM selector for this function is: 0x7228c327,
+	///  or in textual repr: property(uint256,string)
 	function property(uint256 tokenId, string memory key)
 		external
 		view
 		returns (bytes memory);
 }
 
-// Selector: 42966c68
-interface ERC721Burnable is Dummy, ERC165 {
-	// @notice Burns a specific ERC721 token.
-	// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized
-	//  operator of the current owner.
-	// @param tokenId The NFT to approve
-	//
-	// Selector: burn(uint256) 42966c68
-	function burn(uint256 tokenId) external;
-}
+/// @title A contract that allows you to work with collections.
+/// @dev the ERC-165 identifier for this interface is 0xffe4da23
+interface Collection is Dummy, ERC165 {
+	/// Set collection property.
+	///
+	/// @param key Property key.
+	/// @param value Propery value.
+	/// @dev EVM selector for this function is: 0x2f073f66,
+	///  or in textual repr: setCollectionProperty(string,bytes)
+	function setCollectionProperty(string memory key, bytes memory value)
+		external;
 
-// Selector: 58800161
-interface ERC721 is Dummy, ERC165, ERC721Events {
-	// @notice Count all NFTs assigned to an owner
-	// @dev NFTs assigned to the zero address are considered invalid, and this
-	//  function throws for queries about the zero address.
-	// @param owner An address for whom to query the balance
-	// @return The number of NFTs owned by `owner`, possibly zero
-	//
-	// Selector: balanceOf(address) 70a08231
-	function balanceOf(address owner) external view returns (uint256);
+	/// Delete collection property.
+	///
+	/// @param key Property key.
+	/// @dev EVM selector for this function is: 0x7b7debce,
+	///  or in textual repr: deleteCollectionProperty(string)
+	function deleteCollectionProperty(string memory key) external;
 
-	// @notice Find the owner of an NFT
-	// @dev NFTs assigned to zero address are considered invalid, and queries
-	//  about them do throw.
-	// @param tokenId The identifier for an NFT
-	// @return The address of the owner of the NFT
-	//
-	// Selector: ownerOf(uint256) 6352211e
-	function ownerOf(uint256 tokenId) external view returns (address);
+	/// Get collection property.
+	///
+	/// @dev Throws error if key not found.
+	///
+	/// @param key Property key.
+	/// @return bytes The property corresponding to the key.
+	/// @dev EVM selector for this function is: 0xcf24fd6d,
+	///  or in textual repr: collectionProperty(string)
+	function collectionProperty(string memory key)
+		external
+		view
+		returns (bytes memory);
 
-	// @dev Not implemented
-	//
-	// Selector: safeTransferFromWithData(address,address,uint256,bytes) 60a11672
-	function safeTransferFromWithData(
-		address from,
-		address to,
-		uint256 tokenId,
-		bytes memory data
-	) external;
+	/// Set the sponsor of the collection.
+	///
+	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+	///
+	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+	/// @dev EVM selector for this function is: 0x7623402e,
+	///  or in textual repr: setCollectionSponsor(address)
+	function setCollectionSponsor(address sponsor) external;
 
-	// @dev Not implemented
-	//
-	// Selector: safeTransferFrom(address,address,uint256) 42842e0e
-	function safeTransferFrom(
-		address from,
-		address to,
-		uint256 tokenId
-	) external;
+	/// Collection sponsorship confirmation.
+	///
+	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.
+	/// @dev EVM selector for this function is: 0x3c50e97a,
+	///  or in textual repr: confirmCollectionSponsorship()
+	function confirmCollectionSponsorship() external;
 
-	// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
-	//  TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE
-	//  THEY MAY BE PERMANENTLY LOST
-	// @dev Throws unless `msg.sender` is the current owner or an authorized
-	//  operator for this NFT. Throws if `from` is not the current owner. Throws
-	//  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.
-	// @param from The current owner of the NFT
-	// @param to The new owner
-	// @param tokenId The NFT to transfer
-	// @param _value Not used for an NFT
-	//
-	// Selector: transferFrom(address,address,uint256) 23b872dd
-	function transferFrom(
-		address from,
-		address to,
-		uint256 tokenId
-	) external;
+	/// Set limits for the collection.
+	/// @dev Throws error if limit not found.
+	/// @param limit Name of the limit. Valid names:
+	/// 	"accountTokenOwnershipLimit",
+	/// 	"sponsoredDataSize",
+	/// 	"sponsoredDataRateLimit",
+	/// 	"tokenLimit",
+	/// 	"sponsorTransferTimeout",
+	/// 	"sponsorApproveTimeout"
+	/// @param value Value of the limit.
+	/// @dev EVM selector for this function is: 0x6a3841db,
+	///  or in textual repr: setCollectionLimit(string,uint32)
+	function setCollectionLimit(string memory limit, uint32 value) external;
 
-	// @notice Set or reaffirm the approved address for an NFT
-	// @dev The zero address indicates there is no approved address.
-	// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized
-	//  operator of the current owner.
-	// @param approved The new approved NFT controller
-	// @param tokenId The NFT to approve
-	//
-	// Selector: approve(address,uint256) 095ea7b3
-	function approve(address approved, uint256 tokenId) external;
+	/// Set limits for the collection.
+	/// @dev Throws error if limit not found.
+	/// @param limit Name of the limit. Valid names:
+	/// 	"ownerCanTransfer",
+	/// 	"ownerCanDestroy",
+	/// 	"transfersEnabled"
+	/// @param value Value of the limit.
+	/// @dev EVM selector for this function is: 0x993b7fba,
+	///  or in textual repr: setCollectionLimit(string,bool)
+	function setCollectionLimit(string memory limit, bool value) external;
 
-	// @dev Not implemented
-	//
-	// Selector: setApprovalForAll(address,bool) a22cb465
-	function setApprovalForAll(address operator, bool approved) external;
+	/// Get contract address.
+	/// @dev EVM selector for this function is: 0xf6b4dfb4,
+	///  or in textual repr: contractAddress()
+	function contractAddress() external view returns (address);
 
-	// @dev Not implemented
-	//
-	// Selector: getApproved(uint256) 081812fc
-	function getApproved(uint256 tokenId) 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,
+	///  or in textual repr: addCollectionAdmin(address)
+	function addCollectionAdmin(address newAdmin) external;
 
-	// @dev Not implemented
-	//
-	// Selector: isApprovedForAll(address,address) e985e9c5
-	function isApprovedForAll(address owner, address operator)
-		external
-		view
-		returns (address);
-}
+	/// Remove collection admin.
+	///
+	/// @param admin Address of the removed administrator.
+	/// @dev EVM selector for this function is: 0xfafd7b42,
+	///  or in textual repr: removeCollectionAdmin(address)
+	function removeCollectionAdmin(address admin) external;
+
+	/// Toggle accessibility of collection nesting.
+	///
+	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+	/// @dev EVM selector for this function is: 0x112d4586,
+	///  or in textual repr: setCollectionNesting(bool)
+	function setCollectionNesting(bool enable) external;
 
-// Selector: 5b5e139f
-interface ERC721Metadata is Dummy, ERC165 {
-	// @notice A descriptive name for a collection of NFTs in this contract
-	//
-	// Selector: name() 06fdde03
-	function name() external view returns (string memory);
+	/// Toggle accessibility of collection nesting.
+	///
+	/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+	/// @param collections Addresses of collections that will be available for nesting.
+	/// @dev EVM selector for this function is: 0x64872396,
+	///  or in textual repr: setCollectionNesting(bool,address[])
+	function setCollectionNesting(bool enable, address[] memory collections)
+		external;
 
-	// @notice An abbreviated name for NFTs in this contract
-	//
-	// Selector: symbol() 95d89b41
-	function symbol() external view returns (string memory);
+	/// Set the collection access method.
+	/// @param mode Access mode
+	/// 	0 for Normal
+	/// 	1 for AllowList
+	/// @dev EVM selector for this function is: 0x41835d4c,
+	///  or in textual repr: setCollectionAccess(uint8)
+	function setCollectionAccess(uint8 mode) external;
 
-	// @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
-	//
-	// Selector: tokenURI(uint256) c87b56dd
-	function tokenURI(uint256 tokenId) external view returns (string memory);
+	/// Add the user to the allowed list.
+	///
+	/// @param user Address of a trusted user.
+	/// @dev EVM selector for this function is: 0x67844fe6,
+	///  or in textual repr: addToCollectionAllowList(address)
+	function addToCollectionAllowList(address user) external;
+
+	/// Remove the user from the allowed list.
+	///
+	/// @param user Address of a removed user.
+	/// @dev EVM selector for this function is: 0x85c51acb,
+	///  or in textual repr: removeFromCollectionAllowList(address)
+	function removeFromCollectionAllowList(address user) external;
+
+	/// Switch permission for minting.
+	///
+	/// @param mode Enable if "true".
+	/// @dev EVM selector for this function is: 0x00018e84,
+	///  or in textual repr: setCollectionMintMode(bool)
+	function setCollectionMintMode(bool mode) external;
+
+	/// Check that 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: 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
+	///
+	/// @return `Fungible` or `NFT` or `ReFungible`
+	/// @dev EVM selector for this function is: 0xd34b55b8,
+	///  or in textual repr: uniqueCollectionType()
+	function uniqueCollectionType() external returns (string memory);
+
+	/// Changes collection owner to another account
+	///
+	/// @dev Owner can be changed only by current owner
+	/// @param newOwner new owner account
+	/// @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;
+}
+
+/// @title ERC721 Token that can be irreversibly burned (destroyed).
+/// @dev the ERC-165 identifier for this interface is 0x42966c68
+interface ERC721Burnable is Dummy, ERC165 {
+	/// @notice Burns a specific ERC721 token.
+	/// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized
+	///  operator of the current owner.
+	/// @param tokenId The NFT to approve
+	/// @dev EVM selector for this function is: 0x42966c68,
+	///  or in textual repr: burn(uint256)
+	function burn(uint256 tokenId) external;
 }
 
-// Selector: 68ccfe89
+/// @dev inlined interface
+interface ERC721MintableEvents {
+	event MintingFinished();
+}
+
+/// @title ERC721 minting logic.
+/// @dev the ERC-165 identifier for this interface is 0x68ccfe89
 interface ERC721Mintable is Dummy, ERC165, ERC721MintableEvents {
-	// Selector: mintingFinished() 05d2035b
+	/// @dev EVM selector for this function is: 0x05d2035b,
+	///  or in textual repr: mintingFinished()
 	function mintingFinished() external view returns (bool);
 
-	// @notice Function to mint token.
-	// @dev `tokenId` should be obtained with `nextTokenId` method,
-	//  unlike standard, you can't specify it manually
-	// @param to The new owner
-	// @param tokenId ID of the minted NFT
-	//
-	// Selector: mint(address,uint256) 40c10f19
+	/// @notice Function to mint token.
+	/// @dev `tokenId` should be obtained with `nextTokenId` method,
+	///  unlike standard, you can't specify it manually
+	/// @param to The new owner
+	/// @param tokenId ID of the minted NFT
+	/// @dev EVM selector for this function is: 0x40c10f19,
+	///  or in textual repr: mint(address,uint256)
 	function mint(address to, uint256 tokenId) external returns (bool);
 
-	// @notice Function to mint token with the given tokenUri.
-	// @dev `tokenId` should be obtained with `nextTokenId` method,
-	//  unlike standard, you can't specify it manually
-	// @param to The new owner
-	// @param tokenId ID of the minted NFT
-	// @param tokenUri Token URI that would be stored in the NFT properties
-	//
-	// Selector: mintWithTokenURI(address,uint256,string) 50bb4e7f
+	/// @notice Function to mint token with the given tokenUri.
+	/// @dev `tokenId` should be obtained with `nextTokenId` method,
+	///  unlike standard, you can't specify it manually
+	/// @param to The new owner
+	/// @param tokenId ID of the minted NFT
+	/// @param tokenUri Token URI that would be stored in the NFT properties
+	/// @dev EVM selector for this function is: 0x50bb4e7f,
+	///  or in textual repr: mintWithTokenURI(address,uint256,string)
 	function mintWithTokenURI(
 		address to,
 		uint256 tokenId,
 		string memory tokenUri
 	) external returns (bool);
 
-	// @dev Not implemented
-	//
-	// Selector: finishMinting() 7d64bcb4
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x7d64bcb4,
+	///  or in textual repr: finishMinting()
 	function finishMinting() external returns (bool);
 }
 
-// Selector: 780e9d63
-interface ERC721Enumerable is Dummy, ERC165 {
-	// @notice Enumerate valid NFTs
-	// @param index A counter less than `totalSupply()`
-	// @return The token identifier for the `index`th NFT,
-	//  (sort order not specified)
-	//
-	// Selector: tokenByIndex(uint256) 4f6ccce7
-	function tokenByIndex(uint256 index) external view returns (uint256);
-
-	// @dev Not implemented
-	//
-	// Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
-	function tokenOfOwnerByIndex(address owner, uint256 index)
-		external
-		view
-		returns (uint256);
-
-	// @notice Count NFTs tracked by this contract
-	// @return A count of valid NFTs tracked by this contract, where each one of
-	//  them has an assigned and queryable owner not equal to the zero address
-	//
-	// Selector: totalSupply() 18160ddd
-	function totalSupply() external view returns (uint256);
-}
-
-// Selector: d74d154f
+/// @title Unique extensions for ERC721.
+/// @dev the ERC-165 identifier for this interface is 0xd74d154f
 interface ERC721UniqueExtensions is Dummy, ERC165 {
-	// @notice Transfer ownership of an NFT
-	// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
-	//  is the zero address. Throws if `tokenId` is not a valid NFT.
-	// @param to The new owner
-	// @param tokenId The NFT to transfer
-	// @param _value Not used for an NFT
-	//
-	// Selector: transfer(address,uint256) a9059cbb
+	/// @notice Transfer ownership of an NFT
+	/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
+	///  is the zero address. Throws if `tokenId` is not a valid NFT.
+	/// @param to The new owner
+	/// @param tokenId The NFT to transfer
+	/// @dev EVM selector for this function is: 0xa9059cbb,
+	///  or in textual repr: transfer(address,uint256)
 	function transfer(address to, uint256 tokenId) external;
 
-	// @notice Burns a specific ERC721 token.
-	// @dev Throws unless `msg.sender` is the current owner or an authorized
-	//  operator for this NFT. Throws if `from` is not the current owner. Throws
-	//  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.
-	// @param from The current owner of the NFT
-	// @param tokenId The NFT to transfer
-	// @param _value Not used for an NFT
-	//
-	// Selector: burnFrom(address,uint256) 79cc6790
+	/// @notice Burns a specific ERC721 token.
+	/// @dev Throws unless `msg.sender` is the current owner or an authorized
+	///  operator for this NFT. Throws if `from` is not the current owner. Throws
+	///  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.
+	/// @param from The current owner of the NFT
+	/// @param tokenId The NFT to transfer
+	/// @dev EVM selector for this function is: 0x79cc6790,
+	///  or in textual repr: burnFrom(address,uint256)
 	function burnFrom(address from, uint256 tokenId) external;
 
-	// @notice Returns next free NFT ID.
-	//
-	// Selector: nextTokenId() 75794a3c
+	/// @notice Returns next free NFT ID.
+	/// @dev EVM selector for this function is: 0x75794a3c,
+	///  or in textual repr: nextTokenId()
 	function nextTokenId() external view returns (uint256);
 
-	// @notice Function to mint multiple tokens.
-	// @dev `tokenIds` should be an array of consecutive numbers and first number
-	//  should be obtained with `nextTokenId` method
-	// @param to The new owner
-	// @param tokenIds IDs of the minted NFTs
-	//
-	// Selector: mintBulk(address,uint256[]) 44a9945e
+	/// @notice Function to mint multiple tokens.
+	/// @dev `tokenIds` should be an array of consecutive numbers and first number
+	///  should be obtained with `nextTokenId` method
+	/// @param to The new owner
+	/// @param tokenIds IDs of the minted NFTs
+	/// @dev EVM selector for this function is: 0x44a9945e,
+	///  or in textual repr: mintBulk(address,uint256[])
 	function mintBulk(address to, uint256[] memory tokenIds)
 		external
 		returns (bool);
 
-	// @notice Function to mint multiple tokens with the given tokenUris.
-	// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
-	//  numbers and first number should be obtained with `nextTokenId` method
-	// @param to The new owner
-	// @param tokens array of pairs of token ID and token URI for minted tokens
-	//
-	// Selector: mintBulkWithTokenURI(address,(uint256,string)[]) 36543006
-	function mintBulkWithTokenURI(address to, Tuple0[] memory tokens)
+	/// @notice Function to mint multiple tokens with the given tokenUris.
+	/// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
+	///  numbers and first number should be obtained with `nextTokenId` method
+	/// @param to The new owner
+	/// @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);
 }
 
-// Selector: ffe4da23
-interface Collection is Dummy, ERC165 {
-	// Set collection property.
-	//
-	// @param key Property key.
-	// @param value Propery value.
-	//
-	// Selector: setCollectionProperty(string,bytes) 2f073f66
-	function setCollectionProperty(string memory key, bytes memory value)
-		external;
+/// @dev anonymous struct
+struct Tuple8 {
+	uint256 field_0;
+	string field_1;
+}
 
-	// Delete collection property.
-	//
-	// @param key Property key.
-	//
-	// Selector: deleteCollectionProperty(string) 7b7debce
-	function deleteCollectionProperty(string memory key) external;
+/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
+/// @dev See https://eips.ethereum.org/EIPS/eip-721
+/// @dev the ERC-165 identifier for this interface is 0x780e9d63
+interface ERC721Enumerable is Dummy, ERC165 {
+	/// @notice Enumerate valid NFTs
+	/// @param index A counter less than `totalSupply()`
+	/// @return The token identifier for the `index`th NFT,
+	///  (sort order not specified)
+	/// @dev EVM selector for this function is: 0x4f6ccce7,
+	///  or in textual repr: tokenByIndex(uint256)
+	function tokenByIndex(uint256 index) external view returns (uint256);
 
-	// Get collection property.
-	//
-	// @dev Throws error if key not found.
-	//
-	// @param key Property key.
-	// @return bytes The property corresponding to the key.
-	//
-	// Selector: collectionProperty(string) cf24fd6d
-	function collectionProperty(string memory key)
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x2f745c59,
+	///  or in textual repr: tokenOfOwnerByIndex(address,uint256)
+	function tokenOfOwnerByIndex(address owner, uint256 index)
 		external
 		view
-		returns (bytes memory);
+		returns (uint256);
 
-	// Set the sponsor of the collection.
-	//
-	// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
-	//
-	// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
-	//
-	// Selector: setCollectionSponsor(address) 7623402e
-	function setCollectionSponsor(address sponsor) external;
+	/// @notice Count NFTs tracked by this contract
+	/// @return A count of valid NFTs tracked by this contract, where each one of
+	///  them has an assigned and queryable owner not equal to the zero address
+	/// @dev EVM selector for this function is: 0x18160ddd,
+	///  or in textual repr: totalSupply()
+	function totalSupply() external view returns (uint256);
+}
 
-	// Collection sponsorship confirmation.
-	//
-	// @dev After setting the sponsor for the collection, it must be confirmed with this function.
-	//
-	// Selector: confirmCollectionSponsorship() 3c50e97a
-	function confirmCollectionSponsorship() external;
+/// @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);
 
-	// Set limits for the collection.
-	// @dev Throws error if limit not found.
-	// @param limit Name of the limit. Valid names:
-	// 	"accountTokenOwnershipLimit",
-	// 	"sponsoredDataSize",
-	// 	"sponsoredDataRateLimit",
-	// 	"tokenLimit",
-	// 	"sponsorTransferTimeout",
-	// 	"sponsorApproveTimeout"
-	// @param value Value of the limit.
-	//
-	// Selector: setCollectionLimit(string,uint32) 6a3841db
-	function setCollectionLimit(string memory limit, uint32 value) external;
+	/// @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);
 
-	// Set limits for the collection.
-	// @dev Throws error if limit not found.
-	// @param limit Name of the limit. Valid names:
-	// 	"ownerCanTransfer",
-	// 	"ownerCanDestroy",
-	// 	"transfersEnabled"
-	// @param value Value of the limit.
-	//
-	// Selector: setCollectionLimit(string,bool) 993b7fba
-	function setCollectionLimit(string memory limit, bool value) external;
+	/// @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);
+}
 
-	// Get contract address.
-	//
-	// Selector: contractAddress() f6b4dfb4
-	function contractAddress() external view returns (address);
+/// @dev inlined interface
+interface ERC721Events {
+	event Transfer(
+		address indexed from,
+		address indexed to,
+		uint256 indexed tokenId
+	);
+	event Approval(
+		address indexed owner,
+		address indexed approved,
+		uint256 indexed tokenId
+	);
+	event ApprovalForAll(
+		address indexed owner,
+		address indexed operator,
+		bool approved
+	);
+}
 
-	// Add collection admin by substrate address.
-	// @param new_admin Substrate administrator address.
-	//
-	// Selector: addCollectionAdminSubstrate(uint256) 5730062b
-	function addCollectionAdminSubstrate(uint256 newAdmin) external;
+/// @title ERC-721 Non-Fungible Token Standard
+/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
+/// @dev the ERC-165 identifier for this interface is 0x80ac58cd
+interface ERC721 is Dummy, ERC165, ERC721Events {
+	/// @notice Count all NFTs assigned to an owner
+	/// @dev NFTs assigned to the zero address are considered invalid, and this
+	///  function throws for queries about the zero address.
+	/// @param owner An address for whom to query the balance
+	/// @return The number of NFTs owned by `owner`, possibly zero
+	/// @dev EVM selector for this function is: 0x70a08231,
+	///  or in textual repr: balanceOf(address)
+	function balanceOf(address owner) external view returns (uint256);
 
-	// Remove collection admin by substrate address.
-	// @param admin Substrate administrator address.
-	//
-	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
-	function removeCollectionAdminSubstrate(uint256 admin) external;
-
-	// Add collection admin.
-	// @param new_admin Address of the added administrator.
-	//
-	// Selector: addCollectionAdmin(address) 92e462c7
-	function addCollectionAdmin(address newAdmin) external;
-
-	// Remove collection admin.
-	//
-	// @param new_admin Address of the removed administrator.
-	//
-	// Selector: removeCollectionAdmin(address) fafd7b42
-	function removeCollectionAdmin(address admin) external;
-
-	// Toggle accessibility of collection nesting.
-	//
-	// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
-	//
-	// Selector: setCollectionNesting(bool) 112d4586
-	function setCollectionNesting(bool enable) external;
-
-	// Toggle accessibility of collection nesting.
-	//
-	// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
-	// @param collections Addresses of collections that will be available for nesting.
-	//
-	// Selector: setCollectionNesting(bool,address[]) 64872396
-	function setCollectionNesting(bool enable, address[] memory collections)
-		external;
-
-	// Set the collection access method.
-	// @param mode Access mode
-	// 	0 for Normal
-	// 	1 for AllowList
-	//
-	// Selector: setCollectionAccess(uint8) 41835d4c
-	function setCollectionAccess(uint8 mode) external;
-
-	// Add the user to the allowed list.
-	//
-	// @param user Address of a trusted user.
-	//
-	// Selector: addToCollectionAllowList(address) 67844fe6
-	function addToCollectionAllowList(address user) external;
+	/// @notice Find the owner of an NFT
+	/// @dev NFTs assigned to zero address are considered invalid, and queries
+	///  about them do throw.
+	/// @param tokenId The identifier for an NFT
+	/// @return The address of the owner of the NFT
+	/// @dev EVM selector for this function is: 0x6352211e,
+	///  or in textual repr: ownerOf(uint256)
+	function ownerOf(uint256 tokenId) external view returns (address);
 
-	// Remove the user from the allowed list.
-	//
-	// @param user Address of a removed user.
-	//
-	// Selector: removeFromCollectionAllowList(address) 85c51acb
-	function removeFromCollectionAllowList(address user) external;
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0xb88d4fde,
+	///  or in textual repr: safeTransferFrom(address,address,uint256,bytes)
+	function safeTransferFrom(
+		address from,
+		address to,
+		uint256 tokenId,
+		bytes memory data
+	) external;
 
-	// Switch permission for minting.
-	//
-	// @param mode Enable if "true".
-	//
-	// Selector: setCollectionMintMode(bool) 00018e84
-	function setCollectionMintMode(bool mode) external;
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x42842e0e,
+	///  or in textual repr: safeTransferFrom(address,address,uint256)
+	function safeTransferFrom(
+		address from,
+		address to,
+		uint256 tokenId
+	) external;
 
-	// Check that account is the owner or admin of the collection
-	//
-	// @param user account to verify
-	// @return "true" if account is the owner or admin
-	//
-	// Selector: isOwnerOrAdmin(address) 9811b0c7
-	function isOwnerOrAdmin(address user) external view returns (bool);
+	/// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
+	///  TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE
+	///  THEY MAY BE PERMANENTLY LOST
+	/// @dev Throws unless `msg.sender` is the current owner or an authorized
+	///  operator for this NFT. Throws if `from` is not the current owner. Throws
+	///  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.
+	/// @param from The current owner of the NFT
+	/// @param to The new owner
+	/// @param tokenId The NFT to transfer
+	/// @dev EVM selector for this function is: 0x23b872dd,
+	///  or in textual repr: transferFrom(address,address,uint256)
+	function transferFrom(
+		address from,
+		address to,
+		uint256 tokenId
+	) external;
 
-	// 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
-	//
-	// Selector: isOwnerOrAdminSubstrate(uint256) 68910e00
-	function isOwnerOrAdminSubstrate(uint256 user) external view returns (bool);
+	/// @notice Set or reaffirm the approved address for an NFT
+	/// @dev The zero address indicates there is no approved address.
+	/// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized
+	///  operator of the current owner.
+	/// @param approved The new approved NFT controller
+	/// @param tokenId The NFT to approve
+	/// @dev EVM selector for this function is: 0x095ea7b3,
+	///  or in textual repr: approve(address,uint256)
+	function approve(address approved, uint256 tokenId) external;
 
-	// Returns collection type
-	//
-	// @return `Fungible` or `NFT` or `ReFungible`
-	//
-	// Selector: uniqueCollectionType() d34b55b8
-	function uniqueCollectionType() external returns (string memory);
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0xa22cb465,
+	///  or in textual repr: setApprovalForAll(address,bool)
+	function setApprovalForAll(address operator, bool approved) external;
 
-	// Changes collection owner to another account
-	//
-	// @dev Owner can be changed only by current owner
-	// @param newOwner new owner account
-	//
-	// Selector: setOwner(address) 13af4035
-	function setOwner(address newOwner) external;
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x081812fc,
+	///  or in textual repr: getApproved(uint256)
+	function getApproved(uint256 tokenId) external view returns (address);
 
-	// Changes collection owner to another substrate account
-	//
-	// @dev Owner can be changed only by current owner
-	// @param newOwner new owner substrate account
-	//
-	// Selector: setOwnerSubstrate(uint256) b212138f
-	function setOwnerSubstrate(uint256 newOwner) external;
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0xe985e9c5,
+	///  or in textual repr: isApprovedForAll(address,address)
+	function isApprovedForAll(address owner, address operator)
+		external
+		view
+		returns (address);
 }
 
 interface UniqueNFT is
modifiedtests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -3,13 +3,7 @@
 
 pragma solidity >=0.8.0 <0.9.0;
 
-// Anonymous struct
-struct Tuple0 {
-	uint256 field_0;
-	string field_1;
-}
-
-// Common stubs holder
+/// @dev common stubs holder
 interface Dummy {
 
 }
@@ -18,40 +12,17 @@
 	function supportsInterface(bytes4 interfaceID) external view returns (bool);
 }
 
-// Inline
-interface ERC721Events {
-	event Transfer(
-		address indexed from,
-		address indexed to,
-		uint256 indexed tokenId
-	);
-	event Approval(
-		address indexed owner,
-		address indexed approved,
-		uint256 indexed tokenId
-	);
-	event ApprovalForAll(
-		address indexed owner,
-		address indexed operator,
-		bool approved
-	);
-}
-
-// Inline
-interface ERC721MintableEvents {
-	event MintingFinished();
-}
-
-// Selector: 41369377
+/// @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 {
-	// @notice Set permissions for token property.
-	// @dev Throws error if `msg.sender` is not admin or owner of the collection.
-	// @param key Property key.
-	// @param is_mutable Permission to mutate property.
-	// @param collection_admin Permission to mutate property by collection admin if property is mutable.
-	// @param token_owner Permission to mutate property by token owner if property is mutable.
-	//
-	// Selector: setTokenPropertyPermission(string,bool,bool,bool) 222d97fa
+	/// @notice Set permissions for token property.
+	/// @dev Throws error if `msg.sender` is not admin or owner of the collection.
+	/// @param key Property key.
+	/// @param isMutable Permission to mutate property.
+	/// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.
+	/// @param tokenOwner Permission to mutate property by token owner if property is mutable.
+	/// @dev EVM selector for this function is: 0x222d97fa,
+	///  or in textual repr: setTokenPropertyPermission(string,bool,bool,bool)
 	function setTokenPropertyPermission(
 		string memory key,
 		bool isMutable,
@@ -59,469 +30,505 @@
 		bool tokenOwner
 	) external;
 
-	// @notice Set token property value.
-	// @dev Throws error if `msg.sender` has no permission to edit the property.
-	// @param tokenId ID of the token.
-	// @param key Property key.
-	// @param value Property value.
-	//
-	// Selector: setProperty(uint256,string,bytes) 1752d67b
+	/// @notice Set token property value.
+	/// @dev Throws error if `msg.sender` has no permission to edit the property.
+	/// @param tokenId ID of the token.
+	/// @param key Property key.
+	/// @param value Property value.
+	/// @dev EVM selector for this function is: 0x1752d67b,
+	///  or in textual repr: setProperty(uint256,string,bytes)
 	function setProperty(
 		uint256 tokenId,
 		string memory key,
 		bytes memory value
 	) external;
 
-	// @notice Delete token property value.
-	// @dev Throws error if `msg.sender` has no permission to edit the property.
-	// @param tokenId ID of the token.
-	// @param key Property key.
-	//
-	// Selector: deleteProperty(uint256,string) 066111d1
+	/// @notice Delete token property value.
+	/// @dev Throws error if `msg.sender` has no permission to edit the property.
+	/// @param tokenId ID of the token.
+	/// @param key Property key.
+	/// @dev EVM selector for this function is: 0x066111d1,
+	///  or in textual repr: deleteProperty(uint256,string)
 	function deleteProperty(uint256 tokenId, string memory key) external;
 
-	// @notice Get token property value.
-	// @dev Throws error if key not found
-	// @param tokenId ID of the token.
-	// @param key Property key.
-	// @return Property value bytes
-	//
-	// Selector: property(uint256,string) 7228c327
+	/// @notice Get token property value.
+	/// @dev Throws error if key not found
+	/// @param tokenId ID of the token.
+	/// @param key Property key.
+	/// @return Property value bytes
+	/// @dev EVM selector for this function is: 0x7228c327,
+	///  or in textual repr: property(uint256,string)
 	function property(uint256 tokenId, string memory key)
 		external
 		view
 		returns (bytes memory);
 }
 
-// Selector: 42966c68
-interface ERC721Burnable is Dummy, ERC165 {
-	// @notice Burns a specific ERC721 token.
-	// @dev Throws unless `msg.sender` is the current RFT owner, or an authorized
-	//  operator of the current owner.
-	// @param tokenId The RFT to approve
-	//
-	// Selector: burn(uint256) 42966c68
-	function burn(uint256 tokenId) external;
-}
+/// @title A contract that allows you to work with collections.
+/// @dev the ERC-165 identifier for this interface is 0xffe4da23
+interface Collection is Dummy, ERC165 {
+	/// Set collection property.
+	///
+	/// @param key Property key.
+	/// @param value Propery value.
+	/// @dev EVM selector for this function is: 0x2f073f66,
+	///  or in textual repr: setCollectionProperty(string,bytes)
+	function setCollectionProperty(string memory key, bytes memory value)
+		external;
 
-// Selector: 58800161
-interface ERC721 is Dummy, ERC165, ERC721Events {
-	// @notice Count all RFTs assigned to an owner
-	// @dev RFTs assigned to the zero address are considered invalid, and this
-	//  function throws for queries about the zero address.
-	// @param owner An address for whom to query the balance
-	// @return The number of RFTs owned by `owner`, possibly zero
-	//
-	// Selector: balanceOf(address) 70a08231
-	function balanceOf(address owner) external view returns (uint256);
+	/// Delete collection property.
+	///
+	/// @param key Property key.
+	/// @dev EVM selector for this function is: 0x7b7debce,
+	///  or in textual repr: deleteCollectionProperty(string)
+	function deleteCollectionProperty(string memory key) external;
 
-	// @notice Find the owner of an RFT
-	// @dev RFTs assigned to zero address are considered invalid, and queries
-	//  about them do throw.
-	//  Returns special 0xffffffffffffffffffffffffffffffffffffffff address for
-	//  the tokens that are partially owned.
-	// @param tokenId The identifier for an RFT
-	// @return The address of the owner of the RFT
-	//
-	// Selector: ownerOf(uint256) 6352211e
-	function ownerOf(uint256 tokenId) external view returns (address);
+	/// Get collection property.
+	///
+	/// @dev Throws error if key not found.
+	///
+	/// @param key Property key.
+	/// @return bytes The property corresponding to the key.
+	/// @dev EVM selector for this function is: 0xcf24fd6d,
+	///  or in textual repr: collectionProperty(string)
+	function collectionProperty(string memory key)
+		external
+		view
+		returns (bytes memory);
 
-	// @dev Not implemented
-	//
-	// Selector: safeTransferFromWithData(address,address,uint256,bytes) 60a11672
-	function safeTransferFromWithData(
-		address from,
-		address to,
-		uint256 tokenId,
-		bytes memory data
-	) external;
+	/// Set the sponsor of the collection.
+	///
+	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+	///
+	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+	/// @dev EVM selector for this function is: 0x7623402e,
+	///  or in textual repr: setCollectionSponsor(address)
+	function setCollectionSponsor(address sponsor) external;
 
-	// @dev Not implemented
-	//
-	// Selector: safeTransferFrom(address,address,uint256) 42842e0e
-	function safeTransferFrom(
-		address from,
-		address to,
-		uint256 tokenId
-	) external;
+	/// Collection sponsorship confirmation.
+	///
+	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.
+	/// @dev EVM selector for this function is: 0x3c50e97a,
+	///  or in textual repr: confirmCollectionSponsorship()
+	function confirmCollectionSponsorship() external;
 
-	// @notice Transfer ownership of an RFT -- THE CALLER IS RESPONSIBLE
-	//  TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE
-	//  THEY MAY BE PERMANENTLY LOST
-	// @dev Throws unless `msg.sender` is the current owner or an authorized
-	//  operator for this RFT. Throws if `from` is not the current owner. Throws
-	//  if `to` is the zero address. Throws if `tokenId` is not a valid RFT.
-	//  Throws if RFT pieces have multiple owners.
-	// @param from The current owner of the NFT
-	// @param to The new owner
-	// @param tokenId The NFT to transfer
-	// @param _value Not used for an NFT
-	//
-	// Selector: transferFrom(address,address,uint256) 23b872dd
-	function transferFrom(
-		address from,
-		address to,
-		uint256 tokenId
-	) external;
+	/// Set limits for the collection.
+	/// @dev Throws error if limit not found.
+	/// @param limit Name of the limit. Valid names:
+	/// 	"accountTokenOwnershipLimit",
+	/// 	"sponsoredDataSize",
+	/// 	"sponsoredDataRateLimit",
+	/// 	"tokenLimit",
+	/// 	"sponsorTransferTimeout",
+	/// 	"sponsorApproveTimeout"
+	/// @param value Value of the limit.
+	/// @dev EVM selector for this function is: 0x6a3841db,
+	///  or in textual repr: setCollectionLimit(string,uint32)
+	function setCollectionLimit(string memory limit, uint32 value) external;
 
-	// @dev Not implemented
-	//
-	// Selector: approve(address,uint256) 095ea7b3
-	function approve(address approved, uint256 tokenId) external;
+	/// Set limits for the collection.
+	/// @dev Throws error if limit not found.
+	/// @param limit Name of the limit. Valid names:
+	/// 	"ownerCanTransfer",
+	/// 	"ownerCanDestroy",
+	/// 	"transfersEnabled"
+	/// @param value Value of the limit.
+	/// @dev EVM selector for this function is: 0x993b7fba,
+	///  or in textual repr: setCollectionLimit(string,bool)
+	function setCollectionLimit(string memory limit, bool value) external;
 
-	// @dev Not implemented
-	//
-	// Selector: setApprovalForAll(address,bool) a22cb465
-	function setApprovalForAll(address operator, bool approved) external;
+	/// Get contract address.
+	/// @dev EVM selector for this function is: 0xf6b4dfb4,
+	///  or in textual repr: contractAddress()
+	function contractAddress() external view returns (address);
 
-	// @dev Not implemented
-	//
-	// Selector: getApproved(uint256) 081812fc
-	function getApproved(uint256 tokenId) 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;
 
-	// @dev Not implemented
-	//
-	// Selector: isApprovedForAll(address,address) e985e9c5
-	function isApprovedForAll(address owner, address operator)
-		external
-		view
-		returns (address);
-}
+	/// 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;
 
-// Selector: 5b5e139f
-interface ERC721Metadata is Dummy, ERC165 {
-	// @notice A descriptive name for a collection of RFTs in this contract
-	//
-	// Selector: name() 06fdde03
-	function name() external view returns (string memory);
+	/// Add collection admin.
+	/// @param newAdmin Address of the added administrator.
+	/// @dev EVM selector for this function is: 0x92e462c7,
+	///  or in textual repr: addCollectionAdmin(address)
+	function addCollectionAdmin(address newAdmin) external;
 
-	// @notice An abbreviated name for RFTs in this contract
-	//
-	// Selector: symbol() 95d89b41
-	function symbol() external view returns (string memory);
+	/// Remove collection admin.
+	///
+	/// @param admin Address of the removed administrator.
+	/// @dev EVM selector for this function is: 0xfafd7b42,
+	///  or in textual repr: removeCollectionAdmin(address)
+	function removeCollectionAdmin(address admin) external;
 
-	// @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
-	//
-	// Selector: tokenURI(uint256) c87b56dd
-	function tokenURI(uint256 tokenId) external view returns (string memory);
+	/// Toggle accessibility of collection nesting.
+	///
+	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
+	/// @dev EVM selector for this function is: 0x112d4586,
+	///  or in textual repr: setCollectionNesting(bool)
+	function setCollectionNesting(bool enable) external;
+
+	/// Toggle accessibility of collection nesting.
+	///
+	/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
+	/// @param collections Addresses of collections that will be available for nesting.
+	/// @dev EVM selector for this function is: 0x64872396,
+	///  or in textual repr: setCollectionNesting(bool,address[])
+	function setCollectionNesting(bool enable, address[] memory collections)
+		external;
+
+	/// Set the collection access method.
+	/// @param mode Access mode
+	/// 	0 for Normal
+	/// 	1 for AllowList
+	/// @dev EVM selector for this function is: 0x41835d4c,
+	///  or in textual repr: setCollectionAccess(uint8)
+	function setCollectionAccess(uint8 mode) external;
+
+	/// Add the user to the allowed list.
+	///
+	/// @param user Address of a trusted user.
+	/// @dev EVM selector for this function is: 0x67844fe6,
+	///  or in textual repr: addToCollectionAllowList(address)
+	function addToCollectionAllowList(address user) external;
+
+	/// Remove the user from the allowed list.
+	///
+	/// @param user Address of a removed user.
+	/// @dev EVM selector for this function is: 0x85c51acb,
+	///  or in textual repr: removeFromCollectionAllowList(address)
+	function removeFromCollectionAllowList(address user) external;
+
+	/// Switch permission for minting.
+	///
+	/// @param mode Enable if "true".
+	/// @dev EVM selector for this function is: 0x00018e84,
+	///  or in textual repr: setCollectionMintMode(bool)
+	function setCollectionMintMode(bool mode) external;
+
+	/// Check that 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: 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
+	///
+	/// @return `Fungible` or `NFT` or `ReFungible`
+	/// @dev EVM selector for this function is: 0xd34b55b8,
+	///  or in textual repr: uniqueCollectionType()
+	function uniqueCollectionType() external returns (string memory);
+
+	/// Changes collection owner to another account
+	///
+	/// @dev Owner can be changed only by current owner
+	/// @param newOwner new owner account
+	/// @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;
+}
+
+/// @title ERC721 Token that can be irreversibly burned (destroyed).
+/// @dev the ERC-165 identifier for this interface is 0x42966c68
+interface ERC721Burnable is Dummy, ERC165 {
+	/// @notice Burns a specific ERC721 token.
+	/// @dev Throws unless `msg.sender` is the current RFT owner, or an authorized
+	///  operator of the current owner.
+	/// @param tokenId The RFT to approve
+	/// @dev EVM selector for this function is: 0x42966c68,
+	///  or in textual repr: burn(uint256)
+	function burn(uint256 tokenId) external;
 }
 
-// Selector: 68ccfe89
+/// @dev inlined interface
+interface ERC721MintableEvents {
+	event MintingFinished();
+}
+
+/// @title ERC721 minting logic.
+/// @dev the ERC-165 identifier for this interface is 0x68ccfe89
 interface ERC721Mintable is Dummy, ERC165, ERC721MintableEvents {
-	// Selector: mintingFinished() 05d2035b
+	/// @dev EVM selector for this function is: 0x05d2035b,
+	///  or in textual repr: mintingFinished()
 	function mintingFinished() external view returns (bool);
 
-	// @notice Function to mint token.
-	// @dev `tokenId` should be obtained with `nextTokenId` method,
-	//  unlike standard, you can't specify it manually
-	// @param to The new owner
-	// @param tokenId ID of the minted RFT
-	//
-	// Selector: mint(address,uint256) 40c10f19
+	/// @notice Function to mint token.
+	/// @dev `tokenId` should be obtained with `nextTokenId` method,
+	///  unlike standard, you can't specify it manually
+	/// @param to The new owner
+	/// @param tokenId ID of the minted RFT
+	/// @dev EVM selector for this function is: 0x40c10f19,
+	///  or in textual repr: mint(address,uint256)
 	function mint(address to, uint256 tokenId) external returns (bool);
 
-	// @notice Function to mint token with the given tokenUri.
-	// @dev `tokenId` should be obtained with `nextTokenId` method,
-	//  unlike standard, you can't specify it manually
-	// @param to The new owner
-	// @param tokenId ID of the minted RFT
-	// @param tokenUri Token URI that would be stored in the RFT properties
-	//
-	// Selector: mintWithTokenURI(address,uint256,string) 50bb4e7f
+	/// @notice Function to mint token with the given tokenUri.
+	/// @dev `tokenId` should be obtained with `nextTokenId` method,
+	///  unlike standard, you can't specify it manually
+	/// @param to The new owner
+	/// @param tokenId ID of the minted RFT
+	/// @param tokenUri Token URI that would be stored in the RFT properties
+	/// @dev EVM selector for this function is: 0x50bb4e7f,
+	///  or in textual repr: mintWithTokenURI(address,uint256,string)
 	function mintWithTokenURI(
 		address to,
 		uint256 tokenId,
 		string memory tokenUri
 	) external returns (bool);
 
-	// @dev Not implemented
-	//
-	// Selector: finishMinting() 7d64bcb4
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x7d64bcb4,
+	///  or in textual repr: finishMinting()
 	function finishMinting() external returns (bool);
 }
-
-// Selector: 780e9d63
-interface ERC721Enumerable is Dummy, ERC165 {
-	// @notice Enumerate valid RFTs
-	// @param index A counter less than `totalSupply()`
-	// @return The token identifier for the `index`th NFT,
-	//  (sort order not specified)
-	//
-	// Selector: tokenByIndex(uint256) 4f6ccce7
-	function tokenByIndex(uint256 index) external view returns (uint256);
 
-	// Not implemented
-	//
-	// Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
-	function tokenOfOwnerByIndex(address owner, uint256 index)
-		external
-		view
-		returns (uint256);
-
-	// @notice Count RFTs tracked by this contract
-	// @return A count of valid RFTs tracked by this contract, where each one of
-	//  them has an assigned and queryable owner not equal to the zero address
-	//
-	// Selector: totalSupply() 18160ddd
-	function totalSupply() external view returns (uint256);
-}
-
-// Selector: 7c3bef89
+/// @title Unique extensions for ERC721.
+/// @dev the ERC-165 identifier for this interface is 0x7c3bef89
 interface ERC721UniqueExtensions is Dummy, ERC165 {
-	// @notice Transfer ownership of an RFT
-	// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
-	//  is the zero address. Throws if `tokenId` is not a valid RFT.
-	//  Throws if RFT pieces have multiple owners.
-	// @param to The new owner
-	// @param tokenId The RFT to transfer
-	// @param _value Not used for an RFT
-	//
-	// Selector: transfer(address,uint256) a9059cbb
+	/// @notice Transfer ownership of an RFT
+	/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
+	///  is the zero address. Throws if `tokenId` is not a valid RFT.
+	///  Throws if RFT pieces have multiple owners.
+	/// @param to The new owner
+	/// @param tokenId The RFT to transfer
+	/// @dev EVM selector for this function is: 0xa9059cbb,
+	///  or in textual repr: transfer(address,uint256)
 	function transfer(address to, uint256 tokenId) external;
 
-	// @notice Burns a specific ERC721 token.
-	// @dev Throws unless `msg.sender` is the current owner or an authorized
-	//  operator for this RFT. Throws if `from` is not the current owner. Throws
-	//  if `to` is the zero address. Throws if `tokenId` is not a valid RFT.
-	//  Throws if RFT pieces have multiple owners.
-	// @param from The current owner of the RFT
-	// @param tokenId The RFT to transfer
-	// @param _value Not used for an RFT
-	//
-	// Selector: burnFrom(address,uint256) 79cc6790
+	/// @notice Burns a specific ERC721 token.
+	/// @dev Throws unless `msg.sender` is the current owner or an authorized
+	///  operator for this RFT. Throws if `from` is not the current owner. Throws
+	///  if `to` is the zero address. Throws if `tokenId` is not a valid RFT.
+	///  Throws if RFT pieces have multiple owners.
+	/// @param from The current owner of the RFT
+	/// @param tokenId The RFT to transfer
+	/// @dev EVM selector for this function is: 0x79cc6790,
+	///  or in textual repr: burnFrom(address,uint256)
 	function burnFrom(address from, uint256 tokenId) external;
 
-	// @notice Returns next free RFT ID.
-	//
-	// Selector: nextTokenId() 75794a3c
+	/// @notice Returns next free RFT ID.
+	/// @dev EVM selector for this function is: 0x75794a3c,
+	///  or in textual repr: nextTokenId()
 	function nextTokenId() external view returns (uint256);
 
-	// @notice Function to mint multiple tokens.
-	// @dev `tokenIds` should be an array of consecutive numbers and first number
-	//  should be obtained with `nextTokenId` method
-	// @param to The new owner
-	// @param tokenIds IDs of the minted RFTs
-	//
-	// Selector: mintBulk(address,uint256[]) 44a9945e
+	/// @notice Function to mint multiple tokens.
+	/// @dev `tokenIds` should be an array of consecutive numbers and first number
+	///  should be obtained with `nextTokenId` method
+	/// @param to The new owner
+	/// @param tokenIds IDs of the minted RFTs
+	/// @dev EVM selector for this function is: 0x44a9945e,
+	///  or in textual repr: mintBulk(address,uint256[])
 	function mintBulk(address to, uint256[] memory tokenIds)
 		external
 		returns (bool);
 
-	// @notice Function to mint multiple tokens with the given tokenUris.
-	// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
-	//  numbers and first number should be obtained with `nextTokenId` method
-	// @param to The new owner
-	// @param tokens array of pairs of token ID and token URI for minted tokens
-	//
-	// Selector: mintBulkWithTokenURI(address,(uint256,string)[]) 36543006
-	function mintBulkWithTokenURI(address to, Tuple0[] memory tokens)
+	/// @notice Function to mint multiple tokens with the given tokenUris.
+	/// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
+	///  numbers and first number should be obtained with `nextTokenId` method
+	/// @param to The new owner
+	/// @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);
 
-	// Returns EVM address for refungible token
-	//
-	// @param token ID of the token
-	//
-	// Selector: tokenContractAddress(uint256) ab76fac6
+	/// Returns EVM address for refungible token
+	///
+	/// @param token ID of the token
+	/// @dev EVM selector for this function is: 0xab76fac6,
+	///  or in textual repr: tokenContractAddress(uint256)
 	function tokenContractAddress(uint256 token)
 		external
 		view
 		returns (address);
 }
 
-// Selector: ffe4da23
-interface Collection is Dummy, ERC165 {
-	// Set collection property.
-	//
-	// @param key Property key.
-	// @param value Propery value.
-	//
-	// Selector: setCollectionProperty(string,bytes) 2f073f66
-	function setCollectionProperty(string memory key, bytes memory value)
-		external;
+/// @dev anonymous struct
+struct Tuple8 {
+	uint256 field_0;
+	string field_1;
+}
 
-	// Delete collection property.
-	//
-	// @param key Property key.
-	//
-	// Selector: deleteCollectionProperty(string) 7b7debce
-	function deleteCollectionProperty(string memory key) external;
+/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
+/// @dev See https://eips.ethereum.org/EIPS/eip-721
+/// @dev the ERC-165 identifier for this interface is 0x780e9d63
+interface ERC721Enumerable is Dummy, ERC165 {
+	/// @notice Enumerate valid RFTs
+	/// @param index A counter less than `totalSupply()`
+	/// @return The token identifier for the `index`th NFT,
+	///  (sort order not specified)
+	/// @dev EVM selector for this function is: 0x4f6ccce7,
+	///  or in textual repr: tokenByIndex(uint256)
+	function tokenByIndex(uint256 index) external view returns (uint256);
 
-	// Get collection property.
-	//
-	// @dev Throws error if key not found.
-	//
-	// @param key Property key.
-	// @return bytes The property corresponding to the key.
-	//
-	// Selector: collectionProperty(string) cf24fd6d
-	function collectionProperty(string memory key)
+	/// Not implemented
+	/// @dev EVM selector for this function is: 0x2f745c59,
+	///  or in textual repr: tokenOfOwnerByIndex(address,uint256)
+	function tokenOfOwnerByIndex(address owner, uint256 index)
 		external
 		view
-		returns (bytes memory);
+		returns (uint256);
 
-	// Set the sponsor of the collection.
-	//
-	// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
-	//
-	// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
-	//
-	// Selector: setCollectionSponsor(address) 7623402e
-	function setCollectionSponsor(address sponsor) external;
+	/// @notice Count RFTs tracked by this contract
+	/// @return A count of valid RFTs tracked by this contract, where each one of
+	///  them has an assigned and queryable owner not equal to the zero address
+	/// @dev EVM selector for this function is: 0x18160ddd,
+	///  or in textual repr: totalSupply()
+	function totalSupply() external view returns (uint256);
+}
 
-	// Collection sponsorship confirmation.
-	//
-	// @dev After setting the sponsor for the collection, it must be confirmed with this function.
-	//
-	// Selector: confirmCollectionSponsorship() 3c50e97a
-	function confirmCollectionSponsorship() external;
+/// @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);
 
-	// Set limits for the collection.
-	// @dev Throws error if limit not found.
-	// @param limit Name of the limit. Valid names:
-	// 	"accountTokenOwnershipLimit",
-	// 	"sponsoredDataSize",
-	// 	"sponsoredDataRateLimit",
-	// 	"tokenLimit",
-	// 	"sponsorTransferTimeout",
-	// 	"sponsorApproveTimeout"
-	// @param value Value of the limit.
-	//
-	// Selector: setCollectionLimit(string,uint32) 6a3841db
-	function setCollectionLimit(string memory limit, uint32 value) external;
+	/// @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);
 
-	// Set limits for the collection.
-	// @dev Throws error if limit not found.
-	// @param limit Name of the limit. Valid names:
-	// 	"ownerCanTransfer",
-	// 	"ownerCanDestroy",
-	// 	"transfersEnabled"
-	// @param value Value of the limit.
-	//
-	// Selector: setCollectionLimit(string,bool) 993b7fba
-	function setCollectionLimit(string memory limit, bool value) external;
-
-	// Get contract address.
-	//
-	// Selector: contractAddress() f6b4dfb4
-	function contractAddress() external view returns (address);
-
-	// Add collection admin by substrate address.
-	// @param new_admin Substrate administrator address.
-	//
-	// Selector: addCollectionAdminSubstrate(uint256) 5730062b
-	function addCollectionAdminSubstrate(uint256 newAdmin) external;
+	/// @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);
+}
 
-	// Remove collection admin by substrate address.
-	// @param admin Substrate administrator address.
-	//
-	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
-	function removeCollectionAdminSubstrate(uint256 admin) external;
-
-	// Add collection admin.
-	// @param new_admin Address of the added administrator.
-	//
-	// Selector: addCollectionAdmin(address) 92e462c7
-	function addCollectionAdmin(address newAdmin) external;
-
-	// Remove collection admin.
-	//
-	// @param new_admin Address of the removed administrator.
-	//
-	// Selector: removeCollectionAdmin(address) fafd7b42
-	function removeCollectionAdmin(address admin) external;
-
-	// Toggle accessibility of collection nesting.
-	//
-	// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'
-	//
-	// Selector: setCollectionNesting(bool) 112d4586
-	function setCollectionNesting(bool enable) external;
-
-	// Toggle accessibility of collection nesting.
-	//
-	// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'
-	// @param collections Addresses of collections that will be available for nesting.
-	//
-	// Selector: setCollectionNesting(bool,address[]) 64872396
-	function setCollectionNesting(bool enable, address[] memory collections)
-		external;
+/// @dev inlined interface
+interface ERC721Events {
+	event Transfer(
+		address indexed from,
+		address indexed to,
+		uint256 indexed tokenId
+	);
+	event Approval(
+		address indexed owner,
+		address indexed approved,
+		uint256 indexed tokenId
+	);
+	event ApprovalForAll(
+		address indexed owner,
+		address indexed operator,
+		bool approved
+	);
+}
 
-	// Set the collection access method.
-	// @param mode Access mode
-	// 	0 for Normal
-	// 	1 for AllowList
-	//
-	// Selector: setCollectionAccess(uint8) 41835d4c
-	function setCollectionAccess(uint8 mode) external;
+/// @title ERC-721 Non-Fungible Token Standard
+/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
+/// @dev the ERC-165 identifier for this interface is 0x58800161
+interface ERC721 is Dummy, ERC165, ERC721Events {
+	/// @notice Count all RFTs assigned to an owner
+	/// @dev RFTs assigned to the zero address are considered invalid, and this
+	///  function throws for queries about the zero address.
+	/// @param owner An address for whom to query the balance
+	/// @return The number of RFTs owned by `owner`, possibly zero
+	/// @dev EVM selector for this function is: 0x70a08231,
+	///  or in textual repr: balanceOf(address)
+	function balanceOf(address owner) external view returns (uint256);
 
-	// Add the user to the allowed list.
-	//
-	// @param user Address of a trusted user.
-	//
-	// Selector: addToCollectionAllowList(address) 67844fe6
-	function addToCollectionAllowList(address user) external;
+	/// @notice Find the owner of an RFT
+	/// @dev RFTs assigned to zero address are considered invalid, and queries
+	///  about them do throw.
+	///  Returns special 0xffffffffffffffffffffffffffffffffffffffff address for
+	///  the tokens that are partially owned.
+	/// @param tokenId The identifier for an RFT
+	/// @return The address of the owner of the RFT
+	/// @dev EVM selector for this function is: 0x6352211e,
+	///  or in textual repr: ownerOf(uint256)
+	function ownerOf(uint256 tokenId) external view returns (address);
 
-	// Remove the user from the allowed list.
-	//
-	// @param user Address of a removed user.
-	//
-	// Selector: removeFromCollectionAllowList(address) 85c51acb
-	function removeFromCollectionAllowList(address user) external;
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x60a11672,
+	///  or in textual repr: safeTransferFromWithData(address,address,uint256,bytes)
+	function safeTransferFromWithData(
+		address from,
+		address to,
+		uint256 tokenId,
+		bytes memory data
+	) external;
 
-	// Switch permission for minting.
-	//
-	// @param mode Enable if "true".
-	//
-	// Selector: setCollectionMintMode(bool) 00018e84
-	function setCollectionMintMode(bool mode) external;
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x42842e0e,
+	///  or in textual repr: safeTransferFrom(address,address,uint256)
+	function safeTransferFrom(
+		address from,
+		address to,
+		uint256 tokenId
+	) external;
 
-	// Check that account is the owner or admin of the collection
-	//
-	// @param user account to verify
-	// @return "true" if account is the owner or admin
-	//
-	// Selector: isOwnerOrAdmin(address) 9811b0c7
-	function isOwnerOrAdmin(address user) external view returns (bool);
+	/// @notice Transfer ownership of an RFT -- THE CALLER IS RESPONSIBLE
+	///  TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE
+	///  THEY MAY BE PERMANENTLY LOST
+	/// @dev Throws unless `msg.sender` is the current owner or an authorized
+	///  operator for this RFT. Throws if `from` is not the current owner. Throws
+	///  if `to` is the zero address. Throws if `tokenId` is not a valid RFT.
+	///  Throws if RFT pieces have multiple owners.
+	/// @param from The current owner of the NFT
+	/// @param to The new owner
+	/// @param tokenId The NFT to transfer
+	/// @dev EVM selector for this function is: 0x23b872dd,
+	///  or in textual repr: transferFrom(address,address,uint256)
+	function transferFrom(
+		address from,
+		address to,
+		uint256 tokenId
+	) external;
 
-	// 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
-	//
-	// Selector: isOwnerOrAdminSubstrate(uint256) 68910e00
-	function isOwnerOrAdminSubstrate(uint256 user) external view returns (bool);
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x095ea7b3,
+	///  or in textual repr: approve(address,uint256)
+	function approve(address approved, uint256 tokenId) external;
 
-	// Returns collection type
-	//
-	// @return `Fungible` or `NFT` or `ReFungible`
-	//
-	// Selector: uniqueCollectionType() d34b55b8
-	function uniqueCollectionType() external returns (string memory);
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0xa22cb465,
+	///  or in textual repr: setApprovalForAll(address,bool)
+	function setApprovalForAll(address operator, bool approved) external;
 
-	// Changes collection owner to another account
-	//
-	// @dev Owner can be changed only by current owner
-	// @param newOwner new owner account
-	//
-	// Selector: setOwner(address) 13af4035
-	function setOwner(address newOwner) external;
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0x081812fc,
+	///  or in textual repr: getApproved(uint256)
+	function getApproved(uint256 tokenId) external view returns (address);
 
-	// Changes collection owner to another substrate account
-	//
-	// @dev Owner can be changed only by current owner
-	// @param newOwner new owner substrate account
-	//
-	// Selector: setOwnerSubstrate(uint256) b212138f
-	function setOwnerSubstrate(uint256 newOwner) external;
+	/// @dev Not implemented
+	/// @dev EVM selector for this function is: 0xe985e9c5,
+	///  or in textual repr: isApprovedForAll(address,address)
+	function isApprovedForAll(address owner, address operator)
+		external
+		view
+		returns (address);
 }
 
 interface UniqueRefungible is
modifiedtests/src/eth/api/UniqueRefungibleToken.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueRefungibleToken.sol
+++ b/tests/src/eth/api/UniqueRefungibleToken.sol
@@ -3,7 +3,7 @@
 
 pragma solidity >=0.8.0 <0.9.0;
 
-// Common stubs holder
+/// @dev common stubs holder
 interface Dummy {
 
 }
@@ -12,120 +12,127 @@
 	function supportsInterface(bytes4 interfaceID) external view returns (bool);
 }
 
-// Inline
-interface ERC20Events {
-	event Transfer(address indexed from, address indexed to, uint256 value);
-	event Approval(
-		address indexed owner,
-		address indexed spender,
-		uint256 value
-	);
-}
-
-// Selector: 042f1106
+/// @dev the ERC-165 identifier for this interface is 0x042f1106
 interface ERC1633UniqueExtensions is Dummy, ERC165 {
-	// Selector: setParentNFT(address,uint256) 042f1106
+	/// @dev EVM selector for this function is: 0x042f1106,
+	///  or in textual repr: setParentNFT(address,uint256)
 	function setParentNFT(address collection, uint256 nftId)
 		external
 		returns (bool);
 }
 
-// Selector: 5755c3f2
+/// @dev the ERC-165 identifier for this interface is 0x5755c3f2
 interface ERC1633 is Dummy, ERC165 {
-	// Selector: parentToken() 80a54001
+	/// @dev EVM selector for this function is: 0x80a54001,
+	///  or in textual repr: parentToken()
 	function parentToken() external view returns (address);
 
-	// Selector: parentTokenId() d7f083f3
+	/// @dev EVM selector for this function is: 0xd7f083f3,
+	///  or in textual repr: parentTokenId()
 	function parentTokenId() external view returns (uint256);
 }
 
-// Selector: 942e8b22
+/// @dev the ERC-165 identifier for this interface is 0xab8deb37
+interface ERC20UniqueExtensions is Dummy, ERC165 {
+	/// @dev Function that burns an amount of the token of a given account,
+	/// deducting from the sender's allowance for said account.
+	/// @param from The account whose tokens will be burnt.
+	/// @param amount The amount that will be burnt.
+	/// @dev EVM selector for this function is: 0x79cc6790,
+	///  or in textual repr: burnFrom(address,uint256)
+	function burnFrom(address from, uint256 amount) external returns (bool);
+
+	/// @dev Function that changes total amount of the tokens.
+	///  Throws if `msg.sender` doesn't owns all of the tokens.
+	/// @param amount New total amount of the tokens.
+	/// @dev EVM selector for this function is: 0xd2418ca7,
+	///  or in textual repr: repartition(uint256)
+	function repartition(uint256 amount) external returns (bool);
+}
+
+/// @dev inlined interface
+interface ERC20Events {
+	event Transfer(address indexed from, address indexed to, uint256 value);
+	event Approval(
+		address indexed owner,
+		address indexed spender,
+		uint256 value
+	);
+}
+
+/// @title Standard ERC20 token
+///
+/// @dev Implementation of the basic standard token.
+/// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
+/// @dev the ERC-165 identifier for this interface is 0x942e8b22
 interface ERC20 is Dummy, ERC165, ERC20Events {
-	// @return the name of the token.
-	//
-	// Selector: name() 06fdde03
+	/// @return the name of the token.
+	/// @dev EVM selector for this function is: 0x06fdde03,
+	///  or in textual repr: name()
 	function name() external view returns (string memory);
 
-	// @return the symbol of the token.
-	//
-	// Selector: symbol() 95d89b41
+	/// @return the symbol of the token.
+	/// @dev EVM selector for this function is: 0x95d89b41,
+	///  or in textual repr: symbol()
 	function symbol() external view returns (string memory);
 
-	// @dev Total number of tokens in existence
-	//
-	// Selector: totalSupply() 18160ddd
+	/// @dev Total number of tokens in existence
+	/// @dev EVM selector for this function is: 0x18160ddd,
+	///  or in textual repr: totalSupply()
 	function totalSupply() external view returns (uint256);
 
-	// @dev Not supported
-	//
-	// Selector: decimals() 313ce567
+	/// @dev Not supported
+	/// @dev EVM selector for this function is: 0x313ce567,
+	///  or in textual repr: decimals()
 	function decimals() external view returns (uint8);
 
-	// @dev Gets the balance of the specified address.
-	// @param owner The address to query the balance of.
-	// @return An uint256 representing the amount owned by the passed address.
-	//
-	// Selector: balanceOf(address) 70a08231
+	/// @dev Gets the balance of the specified address.
+	/// @param owner The address to query the balance of.
+	/// @return An uint256 representing the amount owned by the passed address.
+	/// @dev EVM selector for this function is: 0x70a08231,
+	///  or in textual repr: balanceOf(address)
 	function balanceOf(address owner) external view returns (uint256);
 
-	// @dev Transfer token for a specified address
-	// @param to The address to transfer to.
-	// @param amount The amount to be transferred.
-	//
-	// Selector: transfer(address,uint256) a9059cbb
+	/// @dev Transfer token for a specified address
+	/// @param to The address to transfer to.
+	/// @param amount The amount to be transferred.
+	/// @dev EVM selector for this function is: 0xa9059cbb,
+	///  or in textual repr: transfer(address,uint256)
 	function transfer(address to, uint256 amount) external returns (bool);
 
-	// @dev Transfer tokens from one address to another
-	// @param from address The address which you want to send tokens from
-	// @param to address The address which you want to transfer to
-	// @param amount uint256 the amount of tokens to be transferred
-	//
-	// Selector: transferFrom(address,address,uint256) 23b872dd
+	/// @dev Transfer tokens from one address to another
+	/// @param from address The address which you want to send tokens from
+	/// @param to address The address which you want to transfer to
+	/// @param amount uint256 the amount of tokens to be transferred
+	/// @dev EVM selector for this function is: 0x23b872dd,
+	///  or in textual repr: transferFrom(address,address,uint256)
 	function transferFrom(
 		address from,
 		address to,
 		uint256 amount
 	) external returns (bool);
 
-	// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.
-	// Beware that changing an allowance with this method brings the risk that someone may use both the old
-	// and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
-	// race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
-	// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
-	// @param spender The address which will spend the funds.
-	// @param amount The amount of tokens to be spent.
-	//
-	// Selector: approve(address,uint256) 095ea7b3
+	/// @dev Approve the passed address to spend the specified amount of tokens on behalf of `msg.sender`.
+	/// Beware that changing an allowance with this method brings the risk that someone may use both the old
+	/// and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
+	/// race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
+	/// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
+	/// @param spender The address which will spend the funds.
+	/// @param amount The amount of tokens to be spent.
+	/// @dev EVM selector for this function is: 0x095ea7b3,
+	///  or in textual repr: approve(address,uint256)
 	function approve(address spender, uint256 amount) external returns (bool);
 
-	// @dev Function to check the amount of tokens that an owner allowed to a spender.
-	// @param owner address The address which owns the funds.
-	// @param spender address The address which will spend the funds.
-	// @return A uint256 specifying the amount of tokens still available for the spender.
-	//
-	// Selector: allowance(address,address) dd62ed3e
+	/// @dev Function to check the amount of tokens that an owner allowed to a spender.
+	/// @param owner address The address which owns the funds.
+	/// @param spender address The address which will spend the funds.
+	/// @return A uint256 specifying the amount of tokens still available for the spender.
+	/// @dev EVM selector for this function is: 0xdd62ed3e,
+	///  or in textual repr: allowance(address,address)
 	function allowance(address owner, address spender)
 		external
 		view
 		returns (uint256);
-}
-
-// Selector: ab8deb37
-interface ERC20UniqueExtensions is Dummy, ERC165 {
-	// @dev Function that burns an amount of the token of a given account,
-	// deducting from the sender's allowance for said account.
-	// @param from The account whose tokens will be burnt.
-	// @param amount The amount that will be burnt.
-	//
-	// Selector: burnFrom(address,uint256) 79cc6790
-	function burnFrom(address from, uint256 amount) external returns (bool);
-
-	// @dev Function that changes total amount of the tokens.
-	//  Throws if `msg.sender` doesn't owns all of the tokens.
-	// @param amount New total amount of the tokens.
-	//
-	// Selector: repartition(uint256) d2418ca7
-	function repartition(uint256 amount) external returns (bool);
 }
 
 interface UniqueRefungibleToken is
modifiedtests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/nonFungibleAbi.json
+++ b/tests/src/eth/nonFungibleAbi.json
@@ -255,7 +255,7 @@
           { "internalType": "uint256", "name": "field_0", "type": "uint256" },
           { "internalType": "string", "name": "field_1", "type": "string" }
         ],
-        "internalType": "struct Tuple0[]",
+        "internalType": "struct Tuple8[]",
         "name": "tokens",
         "type": "tuple[]"
       }
@@ -361,7 +361,7 @@
       { "internalType": "uint256", "name": "tokenId", "type": "uint256" },
       { "internalType": "bytes", "name": "data", "type": "bytes" }
     ],
-    "name": "safeTransferFromWithData",
+    "name": "safeTransferFrom",
     "outputs": [],
     "stateMutability": "nonpayable",
     "type": "function"
modifiedtests/src/eth/reFungibleAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/reFungibleAbi.json
+++ b/tests/src/eth/reFungibleAbi.json
@@ -255,7 +255,7 @@
           { "internalType": "uint256", "name": "field_0", "type": "uint256" },
           { "internalType": "string", "name": "field_1", "type": "string" }
         ],
-        "internalType": "struct Tuple0[]",
+        "internalType": "struct Tuple8[]",
         "name": "tokens",
         "type": "tuple[]"
       }
modifiedtests/src/eth/util/contractHelpersAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/util/contractHelpersAbi.json
+++ b/tests/src/eth/util/contractHelpersAbi.json
@@ -225,7 +225,7 @@
         "type": "address"
       },
       { "internalType": "address", "name": "user", "type": "address" },
-      { "internalType": "bool", "name": "allowed", "type": "bool" }
+      { "internalType": "bool", "name": "isAllowed", "type": "bool" }
     ],
     "name": "toggleAllowed",
     "outputs": [],