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

difftreelog

feat add eth methots for bulk properties

Trubnikov Sergey2022-10-24parent: #0321433.patch.diff
in: master

14 files changed

modifiedpallets/common/src/erc.rsdiffbeforeafterboth
--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -27,7 +27,7 @@
 use sp_std::vec::Vec;
 use up_data_structs::{
 	AccessMode, CollectionMode, CollectionPermissions, OwnerRestrictedSet, Property,
-	SponsoringRateLimit, SponsorshipState,
+	SponsoringRateLimit, SponsorshipState, PropertyKey,
 };
 use alloc::format;
 
@@ -97,6 +97,21 @@
 			.map_err(dispatch_to_evm::<T>)
 	}
 
+	/// Set collection properties.
+	///
+	/// @param properties Vector of properties key/value pair.
+	#[weight(<SelfWeightOf<T>>::set_collection_properties(properties.len() as u32))]
+	fn set_collection_properties(
+		&mut self,
+		caller: caller,
+		properties: Vec<(string, bytes)>,
+	) -> Result<void> {
+		for (key, value) in properties.into_iter() {
+			self.set_collection_property(caller, key, value)?;
+		}
+		Ok(())
+	}
+
 	/// Delete collection property.
 	///
 	/// @param key Property key.
@@ -123,12 +138,38 @@
 			.try_into()
 			.map_err(|_| "key too large")?;
 
-		let props = <CollectionProperties<T>>::get(self.id);
+		let props = CollectionProperties::<T>::get(self.id);
 		let prop = props.get(&key).ok_or("key not found")?;
 
 		Ok(bytes(prop.to_vec()))
 	}
 
+	/// Get collection properties.
+	///
+	/// @param keys Properties keys.
+	/// @return Vector of properties key/value pairs.
+	fn collection_properties(&self, keys: Vec<string>) -> Result<Vec<(string, bytes)>> {
+		let mut keys_ = Vec::<PropertyKey>::with_capacity(keys.len());
+		for key in keys {
+			keys_.push(
+				<Vec<u8>>::from(key)
+					.try_into()
+					.map_err(|_| Error::Revert("key too large".into()))?,
+			)
+		}
+		let properties = Pallet::<T>::filter_collection_properties(self.id, Some(keys_))
+			.map_err(dispatch_to_evm::<T>)?;
+
+		let mut properties_ = Vec::<(string, bytes)>::with_capacity(properties.len());
+		for p in properties {
+			let key =
+				string::from_utf8(p.key.into()).map_err(|e| Error::Revert(format!("{}", e)))?;
+			let value = bytes(p.value.to_vec());
+			properties_.push((key, value));
+		}
+		Ok(properties_)
+	}
+
 	/// Set the sponsor of the collection.
 	///
 	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
modifiedpallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth
--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -18,7 +18,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x25d897dc
+/// @dev the ERC-165 identifier for this interface is 0x5d354410
 contract Collection is Dummy, ERC165 {
 	/// Set collection property.
 	///
@@ -33,6 +33,17 @@
 		dummy = 0;
 	}
 
+	/// Set collection properties.
+	///
+	/// @param properties Vector of properties key/value pair.
+	/// @dev EVM selector for this function is: 0x50b26b2a,
+	///  or in textual repr: setCollectionProperties((string,bytes)[])
+	function setCollectionProperties(Tuple10[] memory properties) public {
+		require(false, stub_error);
+		properties;
+		dummy = 0;
+	}
+
 	/// Delete collection property.
 	///
 	/// @param key Property key.
@@ -59,6 +70,19 @@
 		return hex"";
 	}
 
+	/// Get collection properties.
+	///
+	/// @param keys Properties keys.
+	/// @return Vector of properties key/value pairs.
+	/// @dev EVM selector for this function is: 0x285fb8e6,
+	///  or in textual repr: collectionProperties(string[])
+	function collectionProperties(string[] memory keys) public view returns (Tuple10[] memory) {
+		require(false, stub_error);
+		keys;
+		dummy;
+		return new Tuple10[](0);
+	}
+
 	/// Set the sponsor of the collection.
 	///
 	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
@@ -397,6 +421,12 @@
 	}
 }
 
+/// @dev anonymous struct
+struct Tuple10 {
+	string field_0;
+	bytes field_1;
+}
+
 /// @dev the ERC-165 identifier for this interface is 0x032e5926
 contract ERC20UniqueExtensions is Dummy, ERC165 {
 	/// @dev EVM selector for this function is: 0x0ecd0ab0,
modifiedpallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth
before · pallets/nonfungible/src/stubs/UniqueNFT.sol
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56/// @dev common stubs holder7contract Dummy {8	uint8 dummy;9	string stub_error = "this contract is implemented in native";10}1112contract ERC165 is Dummy {13	function supportsInterface(bytes4 interfaceID) external view returns (bool) {14		require(false, stub_error);15		interfaceID;16		return true;17	}18}1920/// @title A contract that allows to set and delete token properties and change token property permissions.21/// @dev the ERC-165 identifier for this interface is 0x4136937722contract TokenProperties is Dummy, ERC165 {23	/// @notice Set permissions for token property.24	/// @dev Throws error if `msg.sender` is not admin or owner of the collection.25	/// @param key Property key.26	/// @param isMutable Permission to mutate property.27	/// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.28	/// @param tokenOwner Permission to mutate property by token owner if property is mutable.29	/// @dev EVM selector for this function is: 0x222d97fa,30	///  or in textual repr: setTokenPropertyPermission(string,bool,bool,bool)31	function setTokenPropertyPermission(32		string memory key,33		bool isMutable,34		bool collectionAdmin,35		bool tokenOwner36	) public {37		require(false, stub_error);38		key;39		isMutable;40		collectionAdmin;41		tokenOwner;42		dummy = 0;43	}4445	/// @notice Set token property value.46	/// @dev Throws error if `msg.sender` has no permission to edit the property.47	/// @param tokenId ID of the token.48	/// @param key Property key.49	/// @param value Property value.50	/// @dev EVM selector for this function is: 0x1752d67b,51	///  or in textual repr: setProperty(uint256,string,bytes)52	function setProperty(53		uint256 tokenId,54		string memory key,55		bytes memory value56	) public {57		require(false, stub_error);58		tokenId;59		key;60		value;61		dummy = 0;62	}6364	/// @notice Delete token property value.65	/// @dev Throws error if `msg.sender` has no permission to edit the property.66	/// @param tokenId ID of the token.67	/// @param key Property key.68	/// @dev EVM selector for this function is: 0x066111d1,69	///  or in textual repr: deleteProperty(uint256,string)70	function deleteProperty(uint256 tokenId, string memory key) public {71		require(false, stub_error);72		tokenId;73		key;74		dummy = 0;75	}7677	/// @notice Get token property value.78	/// @dev Throws error if key not found79	/// @param tokenId ID of the token.80	/// @param key Property key.81	/// @return Property value bytes82	/// @dev EVM selector for this function is: 0x7228c327,83	///  or in textual repr: property(uint256,string)84	function property(uint256 tokenId, string memory key) public view returns (bytes memory) {85		require(false, stub_error);86		tokenId;87		key;88		dummy;89		return hex"";90	}91}9293/// @title A contract that allows you to work with collections.94/// @dev the ERC-165 identifier for this interface is 0x25d897dc95contract Collection is Dummy, ERC165 {96	/// Set collection property.97	///98	/// @param key Property key.99	/// @param value Propery value.100	/// @dev EVM selector for this function is: 0x2f073f66,101	///  or in textual repr: setCollectionProperty(string,bytes)102	function setCollectionProperty(string memory key, bytes memory value) public {103		require(false, stub_error);104		key;105		value;106		dummy = 0;107	}108109	/// Delete collection property.110	///111	/// @param key Property key.112	/// @dev EVM selector for this function is: 0x7b7debce,113	///  or in textual repr: deleteCollectionProperty(string)114	function deleteCollectionProperty(string memory key) public {115		require(false, stub_error);116		key;117		dummy = 0;118	}119120	/// Get collection property.121	///122	/// @dev Throws error if key not found.123	///124	/// @param key Property key.125	/// @return bytes The property corresponding to the key.126	/// @dev EVM selector for this function is: 0xcf24fd6d,127	///  or in textual repr: collectionProperty(string)128	function collectionProperty(string memory key) public view returns (bytes memory) {129		require(false, stub_error);130		key;131		dummy;132		return hex"";133	}134135	/// Set the sponsor of the collection.136	///137	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.138	///139	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.140	/// @dev EVM selector for this function is: 0x7623402e,141	///  or in textual repr: setCollectionSponsor(address)142	function setCollectionSponsor(address sponsor) public {143		require(false, stub_error);144		sponsor;145		dummy = 0;146	}147148	/// Set the sponsor of the collection.149	///150	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.151	///152	/// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.153	/// @dev EVM selector for this function is: 0x84a1d5a8,154	///  or in textual repr: setCollectionSponsorCross((address,uint256))155	function setCollectionSponsorCross(Tuple6 memory sponsor) public {156		require(false, stub_error);157		sponsor;158		dummy = 0;159	}160161	/// Whether there is a pending sponsor.162	/// @dev EVM selector for this function is: 0x058ac185,163	///  or in textual repr: hasCollectionPendingSponsor()164	function hasCollectionPendingSponsor() public view returns (bool) {165		require(false, stub_error);166		dummy;167		return false;168	}169170	/// Collection sponsorship confirmation.171	///172	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.173	/// @dev EVM selector for this function is: 0x3c50e97a,174	///  or in textual repr: confirmCollectionSponsorship()175	function confirmCollectionSponsorship() public {176		require(false, stub_error);177		dummy = 0;178	}179180	/// Remove collection sponsor.181	/// @dev EVM selector for this function is: 0x6e0326a3,182	///  or in textual repr: removeCollectionSponsor()183	function removeCollectionSponsor() public {184		require(false, stub_error);185		dummy = 0;186	}187188	/// Get current sponsor.189	///190	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.191	/// @dev EVM selector for this function is: 0x6ec0a9f1,192	///  or in textual repr: collectionSponsor()193	function collectionSponsor() public view returns (Tuple6 memory) {194		require(false, stub_error);195		dummy;196		return Tuple6(0x0000000000000000000000000000000000000000, 0);197	}198199	/// Set limits for the collection.200	/// @dev Throws error if limit not found.201	/// @param limit Name of the limit. Valid names:202	/// 	"accountTokenOwnershipLimit",203	/// 	"sponsoredDataSize",204	/// 	"sponsoredDataRateLimit",205	/// 	"tokenLimit",206	/// 	"sponsorTransferTimeout",207	/// 	"sponsorApproveTimeout"208	/// @param value Value of the limit.209	/// @dev EVM selector for this function is: 0x6a3841db,210	///  or in textual repr: setCollectionLimit(string,uint32)211	function setCollectionLimit(string memory limit, uint32 value) public {212		require(false, stub_error);213		limit;214		value;215		dummy = 0;216	}217218	/// Set limits for the collection.219	/// @dev Throws error if limit not found.220	/// @param limit Name of the limit. Valid names:221	/// 	"ownerCanTransfer",222	/// 	"ownerCanDestroy",223	/// 	"transfersEnabled"224	/// @param value Value of the limit.225	/// @dev EVM selector for this function is: 0x993b7fba,226	///  or in textual repr: setCollectionLimit(string,bool)227	function setCollectionLimit(string memory limit, bool value) public {228		require(false, stub_error);229		limit;230		value;231		dummy = 0;232	}233234	/// Get contract address.235	/// @dev EVM selector for this function is: 0xf6b4dfb4,236	///  or in textual repr: contractAddress()237	function contractAddress() public view returns (address) {238		require(false, stub_error);239		dummy;240		return 0x0000000000000000000000000000000000000000;241	}242243	/// Add collection admin.244	/// @param newAdmin Cross account administrator address.245	/// @dev EVM selector for this function is: 0x859aa7d6,246	///  or in textual repr: addCollectionAdminCross((address,uint256))247	function addCollectionAdminCross(Tuple6 memory newAdmin) public {248		require(false, stub_error);249		newAdmin;250		dummy = 0;251	}252253	/// Remove collection admin.254	/// @param admin Cross account administrator address.255	/// @dev EVM selector for this function is: 0x6c0cd173,256	///  or in textual repr: removeCollectionAdminCross((address,uint256))257	function removeCollectionAdminCross(Tuple6 memory admin) public {258		require(false, stub_error);259		admin;260		dummy = 0;261	}262263	/// Add collection admin.264	/// @param newAdmin Address of the added administrator.265	/// @dev EVM selector for this function is: 0x92e462c7,266	///  or in textual repr: addCollectionAdmin(address)267	function addCollectionAdmin(address newAdmin) public {268		require(false, stub_error);269		newAdmin;270		dummy = 0;271	}272273	/// Remove collection admin.274	///275	/// @param admin Address of the removed administrator.276	/// @dev EVM selector for this function is: 0xfafd7b42,277	///  or in textual repr: removeCollectionAdmin(address)278	function removeCollectionAdmin(address admin) public {279		require(false, stub_error);280		admin;281		dummy = 0;282	}283284	/// Toggle accessibility of collection nesting.285	///286	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'287	/// @dev EVM selector for this function is: 0x112d4586,288	///  or in textual repr: setCollectionNesting(bool)289	function setCollectionNesting(bool enable) public {290		require(false, stub_error);291		enable;292		dummy = 0;293	}294295	/// Toggle accessibility of collection nesting.296	///297	/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'298	/// @param collections Addresses of collections that will be available for nesting.299	/// @dev EVM selector for this function is: 0x64872396,300	///  or in textual repr: setCollectionNesting(bool,address[])301	function setCollectionNesting(bool enable, address[] memory collections) public {302		require(false, stub_error);303		enable;304		collections;305		dummy = 0;306	}307308	/// Set the collection access method.309	/// @param mode Access mode310	/// 	0 for Normal311	/// 	1 for AllowList312	/// @dev EVM selector for this function is: 0x41835d4c,313	///  or in textual repr: setCollectionAccess(uint8)314	function setCollectionAccess(uint8 mode) public {315		require(false, stub_error);316		mode;317		dummy = 0;318	}319320	/// Checks that user allowed to operate with collection.321	///322	/// @param user User address to check.323	/// @dev EVM selector for this function is: 0xd63a8e11,324	///  or in textual repr: allowed(address)325	function allowed(address user) public view returns (bool) {326		require(false, stub_error);327		user;328		dummy;329		return false;330	}331332	/// Add the user to the allowed list.333	///334	/// @param user Address of a trusted user.335	/// @dev EVM selector for this function is: 0x67844fe6,336	///  or in textual repr: addToCollectionAllowList(address)337	function addToCollectionAllowList(address user) public {338		require(false, stub_error);339		user;340		dummy = 0;341	}342343	/// Add user to allowed list.344	///345	/// @param user User cross account address.346	/// @dev EVM selector for this function is: 0xa0184a3a,347	///  or in textual repr: addToCollectionAllowListCross((address,uint256))348	function addToCollectionAllowListCross(Tuple6 memory user) public {349		require(false, stub_error);350		user;351		dummy = 0;352	}353354	/// Remove the user from the allowed list.355	///356	/// @param user Address of a removed user.357	/// @dev EVM selector for this function is: 0x85c51acb,358	///  or in textual repr: removeFromCollectionAllowList(address)359	function removeFromCollectionAllowList(address user) public {360		require(false, stub_error);361		user;362		dummy = 0;363	}364365	/// Remove user from allowed list.366	///367	/// @param user User cross account address.368	/// @dev EVM selector for this function is: 0x09ba452a,369	///  or in textual repr: removeFromCollectionAllowListCross((address,uint256))370	function removeFromCollectionAllowListCross(Tuple6 memory user) public {371		require(false, stub_error);372		user;373		dummy = 0;374	}375376	/// Switch permission for minting.377	///378	/// @param mode Enable if "true".379	/// @dev EVM selector for this function is: 0x00018e84,380	///  or in textual repr: setCollectionMintMode(bool)381	function setCollectionMintMode(bool mode) public {382		require(false, stub_error);383		mode;384		dummy = 0;385	}386387	/// Check that account is the owner or admin of the collection388	///389	/// @param user account to verify390	/// @return "true" if account is the owner or admin391	/// @dev EVM selector for this function is: 0x9811b0c7,392	///  or in textual repr: isOwnerOrAdmin(address)393	function isOwnerOrAdmin(address user) public view returns (bool) {394		require(false, stub_error);395		user;396		dummy;397		return false;398	}399400	/// Check that account is the owner or admin of the collection401	///402	/// @param user User cross account to verify403	/// @return "true" if account is the owner or admin404	/// @dev EVM selector for this function is: 0x3e75a905,405	///  or in textual repr: isOwnerOrAdminCross((address,uint256))406	function isOwnerOrAdminCross(Tuple6 memory user) public view returns (bool) {407		require(false, stub_error);408		user;409		dummy;410		return false;411	}412413	/// Returns collection type414	///415	/// @return `Fungible` or `NFT` or `ReFungible`416	/// @dev EVM selector for this function is: 0xd34b55b8,417	///  or in textual repr: uniqueCollectionType()418	function uniqueCollectionType() public view returns (string memory) {419		require(false, stub_error);420		dummy;421		return "";422	}423424	/// Get collection owner.425	///426	/// @return Tuble with sponsor address and his substrate mirror.427	/// If address is canonical then substrate mirror is zero and vice versa.428	/// @dev EVM selector for this function is: 0xdf727d3b,429	///  or in textual repr: collectionOwner()430	function collectionOwner() public view returns (Tuple6 memory) {431		require(false, stub_error);432		dummy;433		return Tuple6(0x0000000000000000000000000000000000000000, 0);434	}435436	/// Changes collection owner to another account437	///438	/// @dev Owner can be changed only by current owner439	/// @param newOwner new owner account440	/// @dev EVM selector for this function is: 0x4f53e226,441	///  or in textual repr: changeCollectionOwner(address)442	function changeCollectionOwner(address newOwner) public {443		require(false, stub_error);444		newOwner;445		dummy = 0;446	}447448	/// Get collection administrators449	///450	/// @return Vector of tuples with admins address and his substrate mirror.451	/// If address is canonical then substrate mirror is zero and vice versa.452	/// @dev EVM selector for this function is: 0x5813216b,453	///  or in textual repr: collectionAdmins()454	function collectionAdmins() public view returns (Tuple6[] memory) {455		require(false, stub_error);456		dummy;457		return new Tuple6[](0);458	}459460	/// Changes collection owner to another account461	///462	/// @dev Owner can be changed only by current owner463	/// @param newOwner new owner cross account464	/// @dev EVM selector for this function is: 0xe5c9913f,465	///  or in textual repr: setOwnerCross((address,uint256))466	function setOwnerCross(Tuple6 memory newOwner) public {467		require(false, stub_error);468		newOwner;469		dummy = 0;470	}471}472473/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension474/// @dev See https://eips.ethereum.org/EIPS/eip-721475/// @dev the ERC-165 identifier for this interface is 0x5b5e139f476contract ERC721Metadata is Dummy, ERC165 {477	// /// @notice A descriptive name for a collection of NFTs in this contract478	// /// @dev real implementation of this function lies in `ERC721UniqueExtensions`479	// /// @dev EVM selector for this function is: 0x06fdde03,480	// ///  or in textual repr: name()481	// function name() public view returns (string memory) {482	// 	require(false, stub_error);483	// 	dummy;484	// 	return "";485	// }486487	// /// @notice An abbreviated name for NFTs in this contract488	// /// @dev real implementation of this function lies in `ERC721UniqueExtensions`489	// /// @dev EVM selector for this function is: 0x95d89b41,490	// ///  or in textual repr: symbol()491	// function symbol() public view returns (string memory) {492	// 	require(false, stub_error);493	// 	dummy;494	// 	return "";495	// }496497	/// @notice A distinct Uniform Resource Identifier (URI) for a given asset.498	///499	/// @dev If the token has a `url` property and it is not empty, it is returned.500	///  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`.501	///  If the collection property `baseURI` is empty or absent, return "" (empty string)502	///  otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix503	///  otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).504	///505	/// @return token's const_metadata506	/// @dev EVM selector for this function is: 0xc87b56dd,507	///  or in textual repr: tokenURI(uint256)508	function tokenURI(uint256 tokenId) public view returns (string memory) {509		require(false, stub_error);510		tokenId;511		dummy;512		return "";513	}514}515516/// @title ERC721 Token that can be irreversibly burned (destroyed).517/// @dev the ERC-165 identifier for this interface is 0x42966c68518contract ERC721Burnable is Dummy, ERC165 {519	/// @notice Burns a specific ERC721 token.520	/// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized521	///  operator of the current owner.522	/// @param tokenId The NFT to approve523	/// @dev EVM selector for this function is: 0x42966c68,524	///  or in textual repr: burn(uint256)525	function burn(uint256 tokenId) public {526		require(false, stub_error);527		tokenId;528		dummy = 0;529	}530}531532/// @dev inlined interface533contract ERC721UniqueMintableEvents {534	event MintingFinished();535}536537/// @title ERC721 minting logic.538/// @dev the ERC-165 identifier for this interface is 0x476ff149539contract ERC721UniqueMintable is Dummy, ERC165, ERC721UniqueMintableEvents {540	/// @dev EVM selector for this function is: 0x05d2035b,541	///  or in textual repr: mintingFinished()542	function mintingFinished() public view returns (bool) {543		require(false, stub_error);544		dummy;545		return false;546	}547548	/// @notice Function to mint token.549	/// @param to The new owner550	/// @return uint256 The id of the newly minted token551	/// @dev EVM selector for this function is: 0x6a627842,552	///  or in textual repr: mint(address)553	function mint(address to) public returns (uint256) {554		require(false, stub_error);555		to;556		dummy = 0;557		return 0;558	}559560	// /// @notice Function to mint token.561	// /// @dev `tokenId` should be obtained with `nextTokenId` method,562	// ///  unlike standard, you can't specify it manually563	// /// @param to The new owner564	// /// @param tokenId ID of the minted NFT565	// /// @dev EVM selector for this function is: 0x40c10f19,566	// ///  or in textual repr: mint(address,uint256)567	// function mint(address to, uint256 tokenId) public returns (bool) {568	// 	require(false, stub_error);569	// 	to;570	// 	tokenId;571	// 	dummy = 0;572	// 	return false;573	// }574575	/// @notice Function to mint token with the given tokenUri.576	/// @param to The new owner577	/// @param tokenUri Token URI that would be stored in the NFT properties578	/// @return uint256 The id of the newly minted token579	/// @dev EVM selector for this function is: 0x45c17782,580	///  or in textual repr: mintWithTokenURI(address,string)581	function mintWithTokenURI(address to, string memory tokenUri) public returns (uint256) {582		require(false, stub_error);583		to;584		tokenUri;585		dummy = 0;586		return 0;587	}588589	// /// @notice Function to mint token with the given tokenUri.590	// /// @dev `tokenId` should be obtained with `nextTokenId` method,591	// ///  unlike standard, you can't specify it manually592	// /// @param to The new owner593	// /// @param tokenId ID of the minted NFT594	// /// @param tokenUri Token URI that would be stored in the NFT properties595	// /// @dev EVM selector for this function is: 0x50bb4e7f,596	// ///  or in textual repr: mintWithTokenURI(address,uint256,string)597	// function mintWithTokenURI(address to, uint256 tokenId, string memory tokenUri) public returns (bool) {598	// 	require(false, stub_error);599	// 	to;600	// 	tokenId;601	// 	tokenUri;602	// 	dummy = 0;603	// 	return false;604	// }605606	/// @dev Not implemented607	/// @dev EVM selector for this function is: 0x7d64bcb4,608	///  or in textual repr: finishMinting()609	function finishMinting() public returns (bool) {610		require(false, stub_error);611		dummy = 0;612		return false;613	}614}615616/// @title Unique extensions for ERC721.617/// @dev the ERC-165 identifier for this interface is 0x244543ee618contract ERC721UniqueExtensions is Dummy, ERC165 {619	/// @notice A descriptive name for a collection of NFTs in this contract620	/// @dev EVM selector for this function is: 0x06fdde03,621	///  or in textual repr: name()622	function name() public view returns (string memory) {623		require(false, stub_error);624		dummy;625		return "";626	}627628	/// @notice An abbreviated name for NFTs in this contract629	/// @dev EVM selector for this function is: 0x95d89b41,630	///  or in textual repr: symbol()631	function symbol() public view returns (string memory) {632		require(false, stub_error);633		dummy;634		return "";635	}636637	/// @notice Set or reaffirm the approved address for an NFT638	/// @dev The zero address indicates there is no approved address.639	/// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized640	///  operator of the current owner.641	/// @param approved The new substrate address approved NFT controller642	/// @param tokenId The NFT to approve643	/// @dev EVM selector for this function is: 0x0ecd0ab0,644	///  or in textual repr: approveCross((address,uint256),uint256)645	function approveCross(Tuple6 memory approved, uint256 tokenId) public {646		require(false, stub_error);647		approved;648		tokenId;649		dummy = 0;650	}651652	/// @notice Transfer ownership of an NFT653	/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`654	///  is the zero address. Throws if `tokenId` is not a valid NFT.655	/// @param to The new owner656	/// @param tokenId The NFT to transfer657	/// @dev EVM selector for this function is: 0xa9059cbb,658	///  or in textual repr: transfer(address,uint256)659	function transfer(address to, uint256 tokenId) public {660		require(false, stub_error);661		to;662		tokenId;663		dummy = 0;664	}665666	/// @notice Transfer ownership of an NFT from cross account address to cross account address667	/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`668	///  is the zero address. Throws if `tokenId` is not a valid NFT.669	/// @param from Cross acccount address of current owner670	/// @param to Cross acccount address of new owner671	/// @param tokenId The NFT to transfer672	/// @dev EVM selector for this function is: 0xd5cf430b,673	///  or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)674	function transferFromCross(675		Tuple6 memory from,676		Tuple6 memory to,677		uint256 tokenId678	) public {679		require(false, stub_error);680		from;681		to;682		tokenId;683		dummy = 0;684	}685686	/// @notice Burns a specific ERC721 token.687	/// @dev Throws unless `msg.sender` is the current owner or an authorized688	///  operator for this NFT. Throws if `from` is not the current owner. Throws689	///  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.690	/// @param from The current owner of the NFT691	/// @param tokenId The NFT to transfer692	/// @dev EVM selector for this function is: 0x79cc6790,693	///  or in textual repr: burnFrom(address,uint256)694	function burnFrom(address from, uint256 tokenId) public {695		require(false, stub_error);696		from;697		tokenId;698		dummy = 0;699	}700701	/// @notice Burns a specific ERC721 token.702	/// @dev Throws unless `msg.sender` is the current owner or an authorized703	///  operator for this NFT. Throws if `from` is not the current owner. Throws704	///  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.705	/// @param from The current owner of the NFT706	/// @param tokenId The NFT to transfer707	/// @dev EVM selector for this function is: 0xbb2f5a58,708	///  or in textual repr: burnFromCross((address,uint256),uint256)709	function burnFromCross(Tuple6 memory from, uint256 tokenId) public {710		require(false, stub_error);711		from;712		tokenId;713		dummy = 0;714	}715716	/// @notice Returns next free NFT ID.717	/// @dev EVM selector for this function is: 0x75794a3c,718	///  or in textual repr: nextTokenId()719	function nextTokenId() public view returns (uint256) {720		require(false, stub_error);721		dummy;722		return 0;723	}724	// /// @notice Function to mint multiple tokens.725	// /// @dev `tokenIds` should be an array of consecutive numbers and first number726	// ///  should be obtained with `nextTokenId` method727	// /// @param to The new owner728	// /// @param tokenIds IDs of the minted NFTs729	// /// @dev EVM selector for this function is: 0x44a9945e,730	// ///  or in textual repr: mintBulk(address,uint256[])731	// function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {732	// 	require(false, stub_error);733	// 	to;734	// 	tokenIds;735	// 	dummy = 0;736	// 	return false;737	// }738739	// /// @notice Function to mint multiple tokens with the given tokenUris.740	// /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive741	// ///  numbers and first number should be obtained with `nextTokenId` method742	// /// @param to The new owner743	// /// @param tokens array of pairs of token ID and token URI for minted tokens744	// /// @dev EVM selector for this function is: 0x36543006,745	// ///  or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])746	// function mintBulkWithTokenURI(address to, Tuple8[] memory tokens) public returns (bool) {747	// 	require(false, stub_error);748	// 	to;749	// 	tokens;750	// 	dummy = 0;751	// 	return false;752	// }753754}755756/// @dev anonymous struct757struct Tuple8 {758	uint256 field_0;759	string field_1;760}761762/// @dev anonymous struct763struct Tuple6 {764	address field_0;765	uint256 field_1;766}767768/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension769/// @dev See https://eips.ethereum.org/EIPS/eip-721770/// @dev the ERC-165 identifier for this interface is 0x780e9d63771contract ERC721Enumerable is Dummy, ERC165 {772	/// @notice Enumerate valid NFTs773	/// @param index A counter less than `totalSupply()`774	/// @return The token identifier for the `index`th NFT,775	///  (sort order not specified)776	/// @dev EVM selector for this function is: 0x4f6ccce7,777	///  or in textual repr: tokenByIndex(uint256)778	function tokenByIndex(uint256 index) public view returns (uint256) {779		require(false, stub_error);780		index;781		dummy;782		return 0;783	}784785	/// @dev Not implemented786	/// @dev EVM selector for this function is: 0x2f745c59,787	///  or in textual repr: tokenOfOwnerByIndex(address,uint256)788	function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {789		require(false, stub_error);790		owner;791		index;792		dummy;793		return 0;794	}795796	/// @notice Count NFTs tracked by this contract797	/// @return A count of valid NFTs tracked by this contract, where each one of798	///  them has an assigned and queryable owner not equal to the zero address799	/// @dev EVM selector for this function is: 0x18160ddd,800	///  or in textual repr: totalSupply()801	function totalSupply() public view returns (uint256) {802		require(false, stub_error);803		dummy;804		return 0;805	}806}807808/// @dev inlined interface809contract ERC721Events {810	event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);811	event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);812	event ApprovalForAll(address indexed owner, address indexed operator, bool approved);813}814815/// @title ERC-721 Non-Fungible Token Standard816/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md817/// @dev the ERC-165 identifier for this interface is 0x80ac58cd818contract ERC721 is Dummy, ERC165, ERC721Events {819	/// @notice Count all NFTs assigned to an owner820	/// @dev NFTs assigned to the zero address are considered invalid, and this821	///  function throws for queries about the zero address.822	/// @param owner An address for whom to query the balance823	/// @return The number of NFTs owned by `owner`, possibly zero824	/// @dev EVM selector for this function is: 0x70a08231,825	///  or in textual repr: balanceOf(address)826	function balanceOf(address owner) public view returns (uint256) {827		require(false, stub_error);828		owner;829		dummy;830		return 0;831	}832833	/// @notice Find the owner of an NFT834	/// @dev NFTs assigned to zero address are considered invalid, and queries835	///  about them do throw.836	/// @param tokenId The identifier for an NFT837	/// @return The address of the owner of the NFT838	/// @dev EVM selector for this function is: 0x6352211e,839	///  or in textual repr: ownerOf(uint256)840	function ownerOf(uint256 tokenId) public view returns (address) {841		require(false, stub_error);842		tokenId;843		dummy;844		return 0x0000000000000000000000000000000000000000;845	}846847	/// @dev Not implemented848	/// @dev EVM selector for this function is: 0xb88d4fde,849	///  or in textual repr: safeTransferFrom(address,address,uint256,bytes)850	function safeTransferFrom(851		address from,852		address to,853		uint256 tokenId,854		bytes memory data855	) public {856		require(false, stub_error);857		from;858		to;859		tokenId;860		data;861		dummy = 0;862	}863864	/// @dev Not implemented865	/// @dev EVM selector for this function is: 0x42842e0e,866	///  or in textual repr: safeTransferFrom(address,address,uint256)867	function safeTransferFrom(868		address from,869		address to,870		uint256 tokenId871	) public {872		require(false, stub_error);873		from;874		to;875		tokenId;876		dummy = 0;877	}878879	/// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE880	///  TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE881	///  THEY MAY BE PERMANENTLY LOST882	/// @dev Throws unless `msg.sender` is the current owner or an authorized883	///  operator for this NFT. Throws if `from` is not the current owner. Throws884	///  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.885	/// @param from The current owner of the NFT886	/// @param to The new owner887	/// @param tokenId The NFT to transfer888	/// @dev EVM selector for this function is: 0x23b872dd,889	///  or in textual repr: transferFrom(address,address,uint256)890	function transferFrom(891		address from,892		address to,893		uint256 tokenId894	) public {895		require(false, stub_error);896		from;897		to;898		tokenId;899		dummy = 0;900	}901902	/// @notice Set or reaffirm the approved address for an NFT903	/// @dev The zero address indicates there is no approved address.904	/// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized905	///  operator of the current owner.906	/// @param approved The new approved NFT controller907	/// @param tokenId The NFT to approve908	/// @dev EVM selector for this function is: 0x095ea7b3,909	///  or in textual repr: approve(address,uint256)910	function approve(address approved, uint256 tokenId) public {911		require(false, stub_error);912		approved;913		tokenId;914		dummy = 0;915	}916917	/// @dev Not implemented918	/// @dev EVM selector for this function is: 0xa22cb465,919	///  or in textual repr: setApprovalForAll(address,bool)920	function setApprovalForAll(address operator, bool approved) public {921		require(false, stub_error);922		operator;923		approved;924		dummy = 0;925	}926927	/// @dev Not implemented928	/// @dev EVM selector for this function is: 0x081812fc,929	///  or in textual repr: getApproved(uint256)930	function getApproved(uint256 tokenId) public view returns (address) {931		require(false, stub_error);932		tokenId;933		dummy;934		return 0x0000000000000000000000000000000000000000;935	}936937	/// @dev Not implemented938	/// @dev EVM selector for this function is: 0xe985e9c5,939	///  or in textual repr: isApprovedForAll(address,address)940	function isApprovedForAll(address owner, address operator) public view returns (address) {941		require(false, stub_error);942		owner;943		operator;944		dummy;945		return 0x0000000000000000000000000000000000000000;946	}947}948949contract UniqueNFT is950	Dummy,951	ERC165,952	ERC721,953	ERC721Enumerable,954	ERC721UniqueExtensions,955	ERC721UniqueMintable,956	ERC721Burnable,957	ERC721Metadata,958	Collection,959	TokenProperties960{}
after · pallets/nonfungible/src/stubs/UniqueNFT.sol
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56/// @dev common stubs holder7contract Dummy {8	uint8 dummy;9	string stub_error = "this contract is implemented in native";10}1112contract ERC165 is Dummy {13	function supportsInterface(bytes4 interfaceID) external view returns (bool) {14		require(false, stub_error);15		interfaceID;16		return true;17	}18}1920/// @title A contract that allows to set and delete token properties and change token property permissions.21/// @dev the ERC-165 identifier for this interface is 0x4136937722contract TokenProperties is Dummy, ERC165 {23	/// @notice Set permissions for token property.24	/// @dev Throws error if `msg.sender` is not admin or owner of the collection.25	/// @param key Property key.26	/// @param isMutable Permission to mutate property.27	/// @param collectionAdmin Permission to mutate property by collection admin if property is mutable.28	/// @param tokenOwner Permission to mutate property by token owner if property is mutable.29	/// @dev EVM selector for this function is: 0x222d97fa,30	///  or in textual repr: setTokenPropertyPermission(string,bool,bool,bool)31	function setTokenPropertyPermission(32		string memory key,33		bool isMutable,34		bool collectionAdmin,35		bool tokenOwner36	) public {37		require(false, stub_error);38		key;39		isMutable;40		collectionAdmin;41		tokenOwner;42		dummy = 0;43	}4445	/// @notice Set token property value.46	/// @dev Throws error if `msg.sender` has no permission to edit the property.47	/// @param tokenId ID of the token.48	/// @param key Property key.49	/// @param value Property value.50	/// @dev EVM selector for this function is: 0x1752d67b,51	///  or in textual repr: setProperty(uint256,string,bytes)52	function setProperty(53		uint256 tokenId,54		string memory key,55		bytes memory value56	) public {57		require(false, stub_error);58		tokenId;59		key;60		value;61		dummy = 0;62	}6364	/// @notice Delete token property value.65	/// @dev Throws error if `msg.sender` has no permission to edit the property.66	/// @param tokenId ID of the token.67	/// @param key Property key.68	/// @dev EVM selector for this function is: 0x066111d1,69	///  or in textual repr: deleteProperty(uint256,string)70	function deleteProperty(uint256 tokenId, string memory key) public {71		require(false, stub_error);72		tokenId;73		key;74		dummy = 0;75	}7677	/// @notice Get token property value.78	/// @dev Throws error if key not found79	/// @param tokenId ID of the token.80	/// @param key Property key.81	/// @return Property value bytes82	/// @dev EVM selector for this function is: 0x7228c327,83	///  or in textual repr: property(uint256,string)84	function property(uint256 tokenId, string memory key) public view returns (bytes memory) {85		require(false, stub_error);86		tokenId;87		key;88		dummy;89		return hex"";90	}91}9293/// @title A contract that allows you to work with collections.94/// @dev the ERC-165 identifier for this interface is 0x5d35441095contract Collection is Dummy, ERC165 {96	/// Set collection property.97	///98	/// @param key Property key.99	/// @param value Propery value.100	/// @dev EVM selector for this function is: 0x2f073f66,101	///  or in textual repr: setCollectionProperty(string,bytes)102	function setCollectionProperty(string memory key, bytes memory value) public {103		require(false, stub_error);104		key;105		value;106		dummy = 0;107	}108109	/// Set collection properties.110	///111	/// @param properties Vector of properties key/value pair.112	/// @dev EVM selector for this function is: 0x50b26b2a,113	///  or in textual repr: setCollectionProperties((string,bytes)[])114	function setCollectionProperties(Tuple19[] memory properties) public {115		require(false, stub_error);116		properties;117		dummy = 0;118	}119120	/// Delete collection property.121	///122	/// @param key Property key.123	/// @dev EVM selector for this function is: 0x7b7debce,124	///  or in textual repr: deleteCollectionProperty(string)125	function deleteCollectionProperty(string memory key) public {126		require(false, stub_error);127		key;128		dummy = 0;129	}130131	/// Get collection property.132	///133	/// @dev Throws error if key not found.134	///135	/// @param key Property key.136	/// @return bytes The property corresponding to the key.137	/// @dev EVM selector for this function is: 0xcf24fd6d,138	///  or in textual repr: collectionProperty(string)139	function collectionProperty(string memory key) public view returns (bytes memory) {140		require(false, stub_error);141		key;142		dummy;143		return hex"";144	}145146	/// Get collection properties.147	///148	/// @param keys Properties keys.149	/// @return Vector of properties key/value pairs.150	/// @dev EVM selector for this function is: 0x285fb8e6,151	///  or in textual repr: collectionProperties(string[])152	function collectionProperties(string[] memory keys) public view returns (Tuple19[] memory) {153		require(false, stub_error);154		keys;155		dummy;156		return new Tuple19[](0);157	}158159	/// Set the sponsor of the collection.160	///161	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.162	///163	/// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.164	/// @dev EVM selector for this function is: 0x7623402e,165	///  or in textual repr: setCollectionSponsor(address)166	function setCollectionSponsor(address sponsor) public {167		require(false, stub_error);168		sponsor;169		dummy = 0;170	}171172	/// Set the sponsor of the collection.173	///174	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.175	///176	/// @param sponsor Cross account address of the sponsor from whose account funds will be debited for operations with the contract.177	/// @dev EVM selector for this function is: 0x84a1d5a8,178	///  or in textual repr: setCollectionSponsorCross((address,uint256))179	function setCollectionSponsorCross(Tuple6 memory sponsor) public {180		require(false, stub_error);181		sponsor;182		dummy = 0;183	}184185	/// Whether there is a pending sponsor.186	/// @dev EVM selector for this function is: 0x058ac185,187	///  or in textual repr: hasCollectionPendingSponsor()188	function hasCollectionPendingSponsor() public view returns (bool) {189		require(false, stub_error);190		dummy;191		return false;192	}193194	/// Collection sponsorship confirmation.195	///196	/// @dev After setting the sponsor for the collection, it must be confirmed with this function.197	/// @dev EVM selector for this function is: 0x3c50e97a,198	///  or in textual repr: confirmCollectionSponsorship()199	function confirmCollectionSponsorship() public {200		require(false, stub_error);201		dummy = 0;202	}203204	/// Remove collection sponsor.205	/// @dev EVM selector for this function is: 0x6e0326a3,206	///  or in textual repr: removeCollectionSponsor()207	function removeCollectionSponsor() public {208		require(false, stub_error);209		dummy = 0;210	}211212	/// Get current sponsor.213	///214	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.215	/// @dev EVM selector for this function is: 0x6ec0a9f1,216	///  or in textual repr: collectionSponsor()217	function collectionSponsor() public view returns (Tuple6 memory) {218		require(false, stub_error);219		dummy;220		return Tuple6(0x0000000000000000000000000000000000000000, 0);221	}222223	/// Set limits for the collection.224	/// @dev Throws error if limit not found.225	/// @param limit Name of the limit. Valid names:226	/// 	"accountTokenOwnershipLimit",227	/// 	"sponsoredDataSize",228	/// 	"sponsoredDataRateLimit",229	/// 	"tokenLimit",230	/// 	"sponsorTransferTimeout",231	/// 	"sponsorApproveTimeout"232	/// @param value Value of the limit.233	/// @dev EVM selector for this function is: 0x6a3841db,234	///  or in textual repr: setCollectionLimit(string,uint32)235	function setCollectionLimit(string memory limit, uint32 value) public {236		require(false, stub_error);237		limit;238		value;239		dummy = 0;240	}241242	/// Set limits for the collection.243	/// @dev Throws error if limit not found.244	/// @param limit Name of the limit. Valid names:245	/// 	"ownerCanTransfer",246	/// 	"ownerCanDestroy",247	/// 	"transfersEnabled"248	/// @param value Value of the limit.249	/// @dev EVM selector for this function is: 0x993b7fba,250	///  or in textual repr: setCollectionLimit(string,bool)251	function setCollectionLimit(string memory limit, bool value) public {252		require(false, stub_error);253		limit;254		value;255		dummy = 0;256	}257258	/// Get contract address.259	/// @dev EVM selector for this function is: 0xf6b4dfb4,260	///  or in textual repr: contractAddress()261	function contractAddress() public view returns (address) {262		require(false, stub_error);263		dummy;264		return 0x0000000000000000000000000000000000000000;265	}266267	/// Add collection admin.268	/// @param newAdmin Cross account administrator address.269	/// @dev EVM selector for this function is: 0x859aa7d6,270	///  or in textual repr: addCollectionAdminCross((address,uint256))271	function addCollectionAdminCross(Tuple6 memory newAdmin) public {272		require(false, stub_error);273		newAdmin;274		dummy = 0;275	}276277	/// Remove collection admin.278	/// @param admin Cross account administrator address.279	/// @dev EVM selector for this function is: 0x6c0cd173,280	///  or in textual repr: removeCollectionAdminCross((address,uint256))281	function removeCollectionAdminCross(Tuple6 memory admin) public {282		require(false, stub_error);283		admin;284		dummy = 0;285	}286287	/// Add collection admin.288	/// @param newAdmin Address of the added administrator.289	/// @dev EVM selector for this function is: 0x92e462c7,290	///  or in textual repr: addCollectionAdmin(address)291	function addCollectionAdmin(address newAdmin) public {292		require(false, stub_error);293		newAdmin;294		dummy = 0;295	}296297	/// Remove collection admin.298	///299	/// @param admin Address of the removed administrator.300	/// @dev EVM selector for this function is: 0xfafd7b42,301	///  or in textual repr: removeCollectionAdmin(address)302	function removeCollectionAdmin(address admin) public {303		require(false, stub_error);304		admin;305		dummy = 0;306	}307308	/// Toggle accessibility of collection nesting.309	///310	/// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'311	/// @dev EVM selector for this function is: 0x112d4586,312	///  or in textual repr: setCollectionNesting(bool)313	function setCollectionNesting(bool enable) public {314		require(false, stub_error);315		enable;316		dummy = 0;317	}318319	/// Toggle accessibility of collection nesting.320	///321	/// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'322	/// @param collections Addresses of collections that will be available for nesting.323	/// @dev EVM selector for this function is: 0x64872396,324	///  or in textual repr: setCollectionNesting(bool,address[])325	function setCollectionNesting(bool enable, address[] memory collections) public {326		require(false, stub_error);327		enable;328		collections;329		dummy = 0;330	}331332	/// Set the collection access method.333	/// @param mode Access mode334	/// 	0 for Normal335	/// 	1 for AllowList336	/// @dev EVM selector for this function is: 0x41835d4c,337	///  or in textual repr: setCollectionAccess(uint8)338	function setCollectionAccess(uint8 mode) public {339		require(false, stub_error);340		mode;341		dummy = 0;342	}343344	/// Checks that user allowed to operate with collection.345	///346	/// @param user User address to check.347	/// @dev EVM selector for this function is: 0xd63a8e11,348	///  or in textual repr: allowed(address)349	function allowed(address user) public view returns (bool) {350		require(false, stub_error);351		user;352		dummy;353		return false;354	}355356	/// Add the user to the allowed list.357	///358	/// @param user Address of a trusted user.359	/// @dev EVM selector for this function is: 0x67844fe6,360	///  or in textual repr: addToCollectionAllowList(address)361	function addToCollectionAllowList(address user) public {362		require(false, stub_error);363		user;364		dummy = 0;365	}366367	/// Add user to allowed list.368	///369	/// @param user User cross account address.370	/// @dev EVM selector for this function is: 0xa0184a3a,371	///  or in textual repr: addToCollectionAllowListCross((address,uint256))372	function addToCollectionAllowListCross(Tuple6 memory user) public {373		require(false, stub_error);374		user;375		dummy = 0;376	}377378	/// Remove the user from the allowed list.379	///380	/// @param user Address of a removed user.381	/// @dev EVM selector for this function is: 0x85c51acb,382	///  or in textual repr: removeFromCollectionAllowList(address)383	function removeFromCollectionAllowList(address user) public {384		require(false, stub_error);385		user;386		dummy = 0;387	}388389	/// Remove user from allowed list.390	///391	/// @param user User cross account address.392	/// @dev EVM selector for this function is: 0x09ba452a,393	///  or in textual repr: removeFromCollectionAllowListCross((address,uint256))394	function removeFromCollectionAllowListCross(Tuple6 memory user) public {395		require(false, stub_error);396		user;397		dummy = 0;398	}399400	/// Switch permission for minting.401	///402	/// @param mode Enable if "true".403	/// @dev EVM selector for this function is: 0x00018e84,404	///  or in textual repr: setCollectionMintMode(bool)405	function setCollectionMintMode(bool mode) public {406		require(false, stub_error);407		mode;408		dummy = 0;409	}410411	/// Check that account is the owner or admin of the collection412	///413	/// @param user account to verify414	/// @return "true" if account is the owner or admin415	/// @dev EVM selector for this function is: 0x9811b0c7,416	///  or in textual repr: isOwnerOrAdmin(address)417	function isOwnerOrAdmin(address user) public view returns (bool) {418		require(false, stub_error);419		user;420		dummy;421		return false;422	}423424	/// Check that account is the owner or admin of the collection425	///426	/// @param user User cross account to verify427	/// @return "true" if account is the owner or admin428	/// @dev EVM selector for this function is: 0x3e75a905,429	///  or in textual repr: isOwnerOrAdminCross((address,uint256))430	function isOwnerOrAdminCross(Tuple6 memory user) public view returns (bool) {431		require(false, stub_error);432		user;433		dummy;434		return false;435	}436437	/// Returns collection type438	///439	/// @return `Fungible` or `NFT` or `ReFungible`440	/// @dev EVM selector for this function is: 0xd34b55b8,441	///  or in textual repr: uniqueCollectionType()442	function uniqueCollectionType() public view returns (string memory) {443		require(false, stub_error);444		dummy;445		return "";446	}447448	/// Get collection owner.449	///450	/// @return Tuble with sponsor address and his substrate mirror.451	/// If address is canonical then substrate mirror is zero and vice versa.452	/// @dev EVM selector for this function is: 0xdf727d3b,453	///  or in textual repr: collectionOwner()454	function collectionOwner() public view returns (Tuple6 memory) {455		require(false, stub_error);456		dummy;457		return Tuple6(0x0000000000000000000000000000000000000000, 0);458	}459460	/// Changes collection owner to another account461	///462	/// @dev Owner can be changed only by current owner463	/// @param newOwner new owner account464	/// @dev EVM selector for this function is: 0x4f53e226,465	///  or in textual repr: changeCollectionOwner(address)466	function changeCollectionOwner(address newOwner) public {467		require(false, stub_error);468		newOwner;469		dummy = 0;470	}471472	/// Get collection administrators473	///474	/// @return Vector of tuples with admins address and his substrate mirror.475	/// If address is canonical then substrate mirror is zero and vice versa.476	/// @dev EVM selector for this function is: 0x5813216b,477	///  or in textual repr: collectionAdmins()478	function collectionAdmins() public view returns (Tuple6[] memory) {479		require(false, stub_error);480		dummy;481		return new Tuple6[](0);482	}483484	/// Changes collection owner to another account485	///486	/// @dev Owner can be changed only by current owner487	/// @param newOwner new owner cross account488	/// @dev EVM selector for this function is: 0xe5c9913f,489	///  or in textual repr: setOwnerCross((address,uint256))490	function setOwnerCross(Tuple6 memory newOwner) public {491		require(false, stub_error);492		newOwner;493		dummy = 0;494	}495}496497/// @dev anonymous struct498struct Tuple19 {499	string field_0;500	bytes field_1;501}502503/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension504/// @dev See https://eips.ethereum.org/EIPS/eip-721505/// @dev the ERC-165 identifier for this interface is 0x5b5e139f506contract ERC721Metadata is Dummy, ERC165 {507	// /// @notice A descriptive name for a collection of NFTs in this contract508	// /// @dev real implementation of this function lies in `ERC721UniqueExtensions`509	// /// @dev EVM selector for this function is: 0x06fdde03,510	// ///  or in textual repr: name()511	// function name() public view returns (string memory) {512	// 	require(false, stub_error);513	// 	dummy;514	// 	return "";515	// }516517	// /// @notice An abbreviated name for NFTs in this contract518	// /// @dev real implementation of this function lies in `ERC721UniqueExtensions`519	// /// @dev EVM selector for this function is: 0x95d89b41,520	// ///  or in textual repr: symbol()521	// function symbol() public view returns (string memory) {522	// 	require(false, stub_error);523	// 	dummy;524	// 	return "";525	// }526527	/// @notice A distinct Uniform Resource Identifier (URI) for a given asset.528	///529	/// @dev If the token has a `url` property and it is not empty, it is returned.530	///  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`.531	///  If the collection property `baseURI` is empty or absent, return "" (empty string)532	///  otherwise, if token property `suffix` present and is non-empty, return concatenation of baseURI and suffix533	///  otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).534	///535	/// @return token's const_metadata536	/// @dev EVM selector for this function is: 0xc87b56dd,537	///  or in textual repr: tokenURI(uint256)538	function tokenURI(uint256 tokenId) public view returns (string memory) {539		require(false, stub_error);540		tokenId;541		dummy;542		return "";543	}544}545546/// @title ERC721 Token that can be irreversibly burned (destroyed).547/// @dev the ERC-165 identifier for this interface is 0x42966c68548contract ERC721Burnable is Dummy, ERC165 {549	/// @notice Burns a specific ERC721 token.550	/// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized551	///  operator of the current owner.552	/// @param tokenId The NFT to approve553	/// @dev EVM selector for this function is: 0x42966c68,554	///  or in textual repr: burn(uint256)555	function burn(uint256 tokenId) public {556		require(false, stub_error);557		tokenId;558		dummy = 0;559	}560}561562/// @dev inlined interface563contract ERC721UniqueMintableEvents {564	event MintingFinished();565}566567/// @title ERC721 minting logic.568/// @dev the ERC-165 identifier for this interface is 0x476ff149569contract ERC721UniqueMintable is Dummy, ERC165, ERC721UniqueMintableEvents {570	/// @dev EVM selector for this function is: 0x05d2035b,571	///  or in textual repr: mintingFinished()572	function mintingFinished() public view returns (bool) {573		require(false, stub_error);574		dummy;575		return false;576	}577578	/// @notice Function to mint token.579	/// @param to The new owner580	/// @return uint256 The id of the newly minted token581	/// @dev EVM selector for this function is: 0x6a627842,582	///  or in textual repr: mint(address)583	function mint(address to) public returns (uint256) {584		require(false, stub_error);585		to;586		dummy = 0;587		return 0;588	}589590	// /// @notice Function to mint token.591	// /// @dev `tokenId` should be obtained with `nextTokenId` method,592	// ///  unlike standard, you can't specify it manually593	// /// @param to The new owner594	// /// @param tokenId ID of the minted NFT595	// /// @dev EVM selector for this function is: 0x40c10f19,596	// ///  or in textual repr: mint(address,uint256)597	// function mint(address to, uint256 tokenId) public returns (bool) {598	// 	require(false, stub_error);599	// 	to;600	// 	tokenId;601	// 	dummy = 0;602	// 	return false;603	// }604605	/// @notice Function to mint token with the given tokenUri.606	/// @param to The new owner607	/// @param tokenUri Token URI that would be stored in the NFT properties608	/// @return uint256 The id of the newly minted token609	/// @dev EVM selector for this function is: 0x45c17782,610	///  or in textual repr: mintWithTokenURI(address,string)611	function mintWithTokenURI(address to, string memory tokenUri) public returns (uint256) {612		require(false, stub_error);613		to;614		tokenUri;615		dummy = 0;616		return 0;617	}618619	// /// @notice Function to mint token with the given tokenUri.620	// /// @dev `tokenId` should be obtained with `nextTokenId` method,621	// ///  unlike standard, you can't specify it manually622	// /// @param to The new owner623	// /// @param tokenId ID of the minted NFT624	// /// @param tokenUri Token URI that would be stored in the NFT properties625	// /// @dev EVM selector for this function is: 0x50bb4e7f,626	// ///  or in textual repr: mintWithTokenURI(address,uint256,string)627	// function mintWithTokenURI(address to, uint256 tokenId, string memory tokenUri) public returns (bool) {628	// 	require(false, stub_error);629	// 	to;630	// 	tokenId;631	// 	tokenUri;632	// 	dummy = 0;633	// 	return false;634	// }635636	/// @dev Not implemented637	/// @dev EVM selector for this function is: 0x7d64bcb4,638	///  or in textual repr: finishMinting()639	function finishMinting() public returns (bool) {640		require(false, stub_error);641		dummy = 0;642		return false;643	}644}645646/// @title Unique extensions for ERC721.647/// @dev the ERC-165 identifier for this interface is 0x244543ee648contract ERC721UniqueExtensions is Dummy, ERC165 {649	/// @notice A descriptive name for a collection of NFTs in this contract650	/// @dev EVM selector for this function is: 0x06fdde03,651	///  or in textual repr: name()652	function name() public view returns (string memory) {653		require(false, stub_error);654		dummy;655		return "";656	}657658	/// @notice An abbreviated name for NFTs in this contract659	/// @dev EVM selector for this function is: 0x95d89b41,660	///  or in textual repr: symbol()661	function symbol() public view returns (string memory) {662		require(false, stub_error);663		dummy;664		return "";665	}666667	/// @notice Set or reaffirm the approved address for an NFT668	/// @dev The zero address indicates there is no approved address.669	/// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized670	///  operator of the current owner.671	/// @param approved The new substrate address approved NFT controller672	/// @param tokenId The NFT to approve673	/// @dev EVM selector for this function is: 0x0ecd0ab0,674	///  or in textual repr: approveCross((address,uint256),uint256)675	function approveCross(Tuple6 memory approved, uint256 tokenId) public {676		require(false, stub_error);677		approved;678		tokenId;679		dummy = 0;680	}681682	/// @notice Transfer ownership of an NFT683	/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`684	///  is the zero address. Throws if `tokenId` is not a valid NFT.685	/// @param to The new owner686	/// @param tokenId The NFT to transfer687	/// @dev EVM selector for this function is: 0xa9059cbb,688	///  or in textual repr: transfer(address,uint256)689	function transfer(address to, uint256 tokenId) public {690		require(false, stub_error);691		to;692		tokenId;693		dummy = 0;694	}695696	/// @notice Transfer ownership of an NFT from cross account address to cross account address697	/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`698	///  is the zero address. Throws if `tokenId` is not a valid NFT.699	/// @param from Cross acccount address of current owner700	/// @param to Cross acccount address of new owner701	/// @param tokenId The NFT to transfer702	/// @dev EVM selector for this function is: 0xd5cf430b,703	///  or in textual repr: transferFromCross((address,uint256),(address,uint256),uint256)704	function transferFromCross(705		Tuple6 memory from,706		Tuple6 memory to,707		uint256 tokenId708	) public {709		require(false, stub_error);710		from;711		to;712		tokenId;713		dummy = 0;714	}715716	/// @notice Burns a specific ERC721 token.717	/// @dev Throws unless `msg.sender` is the current owner or an authorized718	///  operator for this NFT. Throws if `from` is not the current owner. Throws719	///  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.720	/// @param from The current owner of the NFT721	/// @param tokenId The NFT to transfer722	/// @dev EVM selector for this function is: 0x79cc6790,723	///  or in textual repr: burnFrom(address,uint256)724	function burnFrom(address from, uint256 tokenId) public {725		require(false, stub_error);726		from;727		tokenId;728		dummy = 0;729	}730731	/// @notice Burns a specific ERC721 token.732	/// @dev Throws unless `msg.sender` is the current owner or an authorized733	///  operator for this NFT. Throws if `from` is not the current owner. Throws734	///  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.735	/// @param from The current owner of the NFT736	/// @param tokenId The NFT to transfer737	/// @dev EVM selector for this function is: 0xbb2f5a58,738	///  or in textual repr: burnFromCross((address,uint256),uint256)739	function burnFromCross(Tuple6 memory from, uint256 tokenId) public {740		require(false, stub_error);741		from;742		tokenId;743		dummy = 0;744	}745746	/// @notice Returns next free NFT ID.747	/// @dev EVM selector for this function is: 0x75794a3c,748	///  or in textual repr: nextTokenId()749	function nextTokenId() public view returns (uint256) {750		require(false, stub_error);751		dummy;752		return 0;753	}754	// /// @notice Function to mint multiple tokens.755	// /// @dev `tokenIds` should be an array of consecutive numbers and first number756	// ///  should be obtained with `nextTokenId` method757	// /// @param to The new owner758	// /// @param tokenIds IDs of the minted NFTs759	// /// @dev EVM selector for this function is: 0x44a9945e,760	// ///  or in textual repr: mintBulk(address,uint256[])761	// function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {762	// 	require(false, stub_error);763	// 	to;764	// 	tokenIds;765	// 	dummy = 0;766	// 	return false;767	// }768769	// /// @notice Function to mint multiple tokens with the given tokenUris.770	// /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive771	// ///  numbers and first number should be obtained with `nextTokenId` method772	// /// @param to The new owner773	// /// @param tokens array of pairs of token ID and token URI for minted tokens774	// /// @dev EVM selector for this function is: 0x36543006,775	// ///  or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])776	// function mintBulkWithTokenURI(address to, Tuple8[] memory tokens) public returns (bool) {777	// 	require(false, stub_error);778	// 	to;779	// 	tokens;780	// 	dummy = 0;781	// 	return false;782	// }783784}785786/// @dev anonymous struct787struct Tuple8 {788	uint256 field_0;789	string field_1;790}791792/// @dev anonymous struct793struct Tuple6 {794	address field_0;795	uint256 field_1;796}797798/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension799/// @dev See https://eips.ethereum.org/EIPS/eip-721800/// @dev the ERC-165 identifier for this interface is 0x780e9d63801contract ERC721Enumerable is Dummy, ERC165 {802	/// @notice Enumerate valid NFTs803	/// @param index A counter less than `totalSupply()`804	/// @return The token identifier for the `index`th NFT,805	///  (sort order not specified)806	/// @dev EVM selector for this function is: 0x4f6ccce7,807	///  or in textual repr: tokenByIndex(uint256)808	function tokenByIndex(uint256 index) public view returns (uint256) {809		require(false, stub_error);810		index;811		dummy;812		return 0;813	}814815	/// @dev Not implemented816	/// @dev EVM selector for this function is: 0x2f745c59,817	///  or in textual repr: tokenOfOwnerByIndex(address,uint256)818	function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {819		require(false, stub_error);820		owner;821		index;822		dummy;823		return 0;824	}825826	/// @notice Count NFTs tracked by this contract827	/// @return A count of valid NFTs tracked by this contract, where each one of828	///  them has an assigned and queryable owner not equal to the zero address829	/// @dev EVM selector for this function is: 0x18160ddd,830	///  or in textual repr: totalSupply()831	function totalSupply() public view returns (uint256) {832		require(false, stub_error);833		dummy;834		return 0;835	}836}837838/// @dev inlined interface839contract ERC721Events {840	event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);841	event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);842	event ApprovalForAll(address indexed owner, address indexed operator, bool approved);843}844845/// @title ERC-721 Non-Fungible Token Standard846/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md847/// @dev the ERC-165 identifier for this interface is 0x80ac58cd848contract ERC721 is Dummy, ERC165, ERC721Events {849	/// @notice Count all NFTs assigned to an owner850	/// @dev NFTs assigned to the zero address are considered invalid, and this851	///  function throws for queries about the zero address.852	/// @param owner An address for whom to query the balance853	/// @return The number of NFTs owned by `owner`, possibly zero854	/// @dev EVM selector for this function is: 0x70a08231,855	///  or in textual repr: balanceOf(address)856	function balanceOf(address owner) public view returns (uint256) {857		require(false, stub_error);858		owner;859		dummy;860		return 0;861	}862863	/// @notice Find the owner of an NFT864	/// @dev NFTs assigned to zero address are considered invalid, and queries865	///  about them do throw.866	/// @param tokenId The identifier for an NFT867	/// @return The address of the owner of the NFT868	/// @dev EVM selector for this function is: 0x6352211e,869	///  or in textual repr: ownerOf(uint256)870	function ownerOf(uint256 tokenId) public view returns (address) {871		require(false, stub_error);872		tokenId;873		dummy;874		return 0x0000000000000000000000000000000000000000;875	}876877	/// @dev Not implemented878	/// @dev EVM selector for this function is: 0xb88d4fde,879	///  or in textual repr: safeTransferFrom(address,address,uint256,bytes)880	function safeTransferFrom(881		address from,882		address to,883		uint256 tokenId,884		bytes memory data885	) public {886		require(false, stub_error);887		from;888		to;889		tokenId;890		data;891		dummy = 0;892	}893894	/// @dev Not implemented895	/// @dev EVM selector for this function is: 0x42842e0e,896	///  or in textual repr: safeTransferFrom(address,address,uint256)897	function safeTransferFrom(898		address from,899		address to,900		uint256 tokenId901	) public {902		require(false, stub_error);903		from;904		to;905		tokenId;906		dummy = 0;907	}908909	/// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE910	///  TO CONFIRM THAT `to` IS CAPABLE OF RECEIVING NFTS OR ELSE911	///  THEY MAY BE PERMANENTLY LOST912	/// @dev Throws unless `msg.sender` is the current owner or an authorized913	///  operator for this NFT. Throws if `from` is not the current owner. Throws914	///  if `to` is the zero address. Throws if `tokenId` is not a valid NFT.915	/// @param from The current owner of the NFT916	/// @param to The new owner917	/// @param tokenId The NFT to transfer918	/// @dev EVM selector for this function is: 0x23b872dd,919	///  or in textual repr: transferFrom(address,address,uint256)920	function transferFrom(921		address from,922		address to,923		uint256 tokenId924	) public {925		require(false, stub_error);926		from;927		to;928		tokenId;929		dummy = 0;930	}931932	/// @notice Set or reaffirm the approved address for an NFT933	/// @dev The zero address indicates there is no approved address.934	/// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized935	///  operator of the current owner.936	/// @param approved The new approved NFT controller937	/// @param tokenId The NFT to approve938	/// @dev EVM selector for this function is: 0x095ea7b3,939	///  or in textual repr: approve(address,uint256)940	function approve(address approved, uint256 tokenId) public {941		require(false, stub_error);942		approved;943		tokenId;944		dummy = 0;945	}946947	/// @dev Not implemented948	/// @dev EVM selector for this function is: 0xa22cb465,949	///  or in textual repr: setApprovalForAll(address,bool)950	function setApprovalForAll(address operator, bool approved) public {951		require(false, stub_error);952		operator;953		approved;954		dummy = 0;955	}956957	/// @dev Not implemented958	/// @dev EVM selector for this function is: 0x081812fc,959	///  or in textual repr: getApproved(uint256)960	function getApproved(uint256 tokenId) public view returns (address) {961		require(false, stub_error);962		tokenId;963		dummy;964		return 0x0000000000000000000000000000000000000000;965	}966967	/// @dev Not implemented968	/// @dev EVM selector for this function is: 0xe985e9c5,969	///  or in textual repr: isApprovedForAll(address,address)970	function isApprovedForAll(address owner, address operator) public view returns (address) {971		require(false, stub_error);972		owner;973		operator;974		dummy;975		return 0x0000000000000000000000000000000000000000;976	}977}978979contract UniqueNFT is980	Dummy,981	ERC165,982	ERC721,983	ERC721Enumerable,984	ERC721UniqueExtensions,985	ERC721UniqueMintable,986	ERC721Burnable,987	ERC721Metadata,988	Collection,989	TokenProperties990{}
modifiedpallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth
--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -91,7 +91,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x25d897dc
+/// @dev the ERC-165 identifier for this interface is 0x5d354410
 contract Collection is Dummy, ERC165 {
 	/// Set collection property.
 	///
@@ -106,6 +106,17 @@
 		dummy = 0;
 	}
 
+	/// Set collection properties.
+	///
+	/// @param properties Vector of properties key/value pair.
+	/// @dev EVM selector for this function is: 0x50b26b2a,
+	///  or in textual repr: setCollectionProperties((string,bytes)[])
+	function setCollectionProperties(Tuple19[] memory properties) public {
+		require(false, stub_error);
+		properties;
+		dummy = 0;
+	}
+
 	/// Delete collection property.
 	///
 	/// @param key Property key.
@@ -132,6 +143,19 @@
 		return hex"";
 	}
 
+	/// Get collection properties.
+	///
+	/// @param keys Properties keys.
+	/// @return Vector of properties key/value pairs.
+	/// @dev EVM selector for this function is: 0x285fb8e6,
+	///  or in textual repr: collectionProperties(string[])
+	function collectionProperties(string[] memory keys) public view returns (Tuple19[] memory) {
+		require(false, stub_error);
+		keys;
+		dummy;
+		return new Tuple19[](0);
+	}
+
 	/// Set the sponsor of the collection.
 	///
 	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
@@ -470,6 +494,12 @@
 	}
 }
 
+/// @dev anonymous struct
+struct Tuple19 {
+	string field_0;
+	bytes field_1;
+}
+
 /// @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
modifiedtests/src/eth/api/UniqueFungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -13,7 +13,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x25d897dc
+/// @dev the ERC-165 identifier for this interface is 0x5d354410
 interface Collection is Dummy, ERC165 {
 	/// Set collection property.
 	///
@@ -23,6 +23,13 @@
 	///  or in textual repr: setCollectionProperty(string,bytes)
 	function setCollectionProperty(string memory key, bytes memory value) external;
 
+	/// Set collection properties.
+	///
+	/// @param properties Vector of properties key/value pair.
+	/// @dev EVM selector for this function is: 0x50b26b2a,
+	///  or in textual repr: setCollectionProperties((string,bytes)[])
+	function setCollectionProperties(Tuple10[] memory properties) external;
+
 	/// Delete collection property.
 	///
 	/// @param key Property key.
@@ -40,6 +47,14 @@
 	///  or in textual repr: collectionProperty(string)
 	function collectionProperty(string memory key) external view returns (bytes memory);
 
+	/// Get collection properties.
+	///
+	/// @param keys Properties keys.
+	/// @return Vector of properties key/value pairs.
+	/// @dev EVM selector for this function is: 0x285fb8e6,
+	///  or in textual repr: collectionProperties(string[])
+	function collectionProperties(string[] memory keys) external view returns (Tuple10[] memory);
+
 	/// Set the sponsor of the collection.
 	///
 	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
@@ -258,6 +273,12 @@
 	function setOwnerCross(Tuple6 memory newOwner) external;
 }
 
+/// @dev anonymous struct
+struct Tuple10 {
+	string field_0;
+	bytes field_1;
+}
+
 /// @dev the ERC-165 identifier for this interface is 0x032e5926
 interface ERC20UniqueExtensions is Dummy, ERC165 {
 	/// @dev EVM selector for this function is: 0x0ecd0ab0,
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -62,7 +62,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x25d897dc
+/// @dev the ERC-165 identifier for this interface is 0x5d354410
 interface Collection is Dummy, ERC165 {
 	/// Set collection property.
 	///
@@ -72,6 +72,13 @@
 	///  or in textual repr: setCollectionProperty(string,bytes)
 	function setCollectionProperty(string memory key, bytes memory value) external;
 
+	/// Set collection properties.
+	///
+	/// @param properties Vector of properties key/value pair.
+	/// @dev EVM selector for this function is: 0x50b26b2a,
+	///  or in textual repr: setCollectionProperties((string,bytes)[])
+	function setCollectionProperties(Tuple19[] memory properties) external;
+
 	/// Delete collection property.
 	///
 	/// @param key Property key.
@@ -89,6 +96,14 @@
 	///  or in textual repr: collectionProperty(string)
 	function collectionProperty(string memory key) external view returns (bytes memory);
 
+	/// Get collection properties.
+	///
+	/// @param keys Properties keys.
+	/// @return Vector of properties key/value pairs.
+	/// @dev EVM selector for this function is: 0x285fb8e6,
+	///  or in textual repr: collectionProperties(string[])
+	function collectionProperties(string[] memory keys) external view returns (Tuple19[] memory);
+
 	/// Set the sponsor of the collection.
 	///
 	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
@@ -307,6 +322,12 @@
 	function setOwnerCross(Tuple6 memory newOwner) external;
 }
 
+/// @dev anonymous struct
+struct Tuple19 {
+	string field_0;
+	bytes field_1;
+}
+
 /// @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
modifiedtests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -62,7 +62,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0x25d897dc
+/// @dev the ERC-165 identifier for this interface is 0x5d354410
 interface Collection is Dummy, ERC165 {
 	/// Set collection property.
 	///
@@ -72,6 +72,13 @@
 	///  or in textual repr: setCollectionProperty(string,bytes)
 	function setCollectionProperty(string memory key, bytes memory value) external;
 
+	/// Set collection properties.
+	///
+	/// @param properties Vector of properties key/value pair.
+	/// @dev EVM selector for this function is: 0x50b26b2a,
+	///  or in textual repr: setCollectionProperties((string,bytes)[])
+	function setCollectionProperties(Tuple19[] memory properties) external;
+
 	/// Delete collection property.
 	///
 	/// @param key Property key.
@@ -89,6 +96,14 @@
 	///  or in textual repr: collectionProperty(string)
 	function collectionProperty(string memory key) external view returns (bytes memory);
 
+	/// Get collection properties.
+	///
+	/// @param keys Properties keys.
+	/// @return Vector of properties key/value pairs.
+	/// @dev EVM selector for this function is: 0x285fb8e6,
+	///  or in textual repr: collectionProperties(string[])
+	function collectionProperties(string[] memory keys) external view returns (Tuple19[] memory);
+
 	/// Set the sponsor of the collection.
 	///
 	/// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
@@ -307,6 +322,12 @@
 	function setOwnerCross(Tuple6 memory newOwner) external;
 }
 
+/// @dev anonymous struct
+struct Tuple19 {
+	string field_0;
+	bytes field_1;
+}
+
 /// @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
modifiedtests/src/eth/collectionProperties.test.tsdiffbeforeafterboth
--- a/tests/src/eth/collectionProperties.test.ts
+++ b/tests/src/eth/collectionProperties.test.ts
@@ -161,3 +161,31 @@
     await checkERC721Metadata(helper, 'rft');
   });
 });
+
+describe('EVM collection property', () => {
+  itEth('Set/read properties', async ({helper, privateKey}) => {
+    const alice = await privateKey('//Alice');
+    const collection = await helper.nft.mintCollection(alice, {name: 'A', description: 'B', tokenPrefix: 'C'});
+
+    const sender = await helper.eth.createAccountWithBalance(alice, 100n);
+    await collection.addAdmin(alice, {Ethereum: sender});
+
+    const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
+    const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', sender);
+
+    const key1 = 'key1';
+    const value1 = Buffer.from('value1');
+    
+    const key2 = 'key2';
+    const value2 = Buffer.from('value2');
+
+    const writeProperties = [
+      [key1, '0x'+value1.toString('hex')],
+      [key2, '0x'+value2.toString('hex')],
+    ];
+
+    await contract.methods.setCollectionProperties(writeProperties).send();
+    const readProperties = await contract.methods.collectionProperties([key1, key2]).call();
+    expect(readProperties).to.be.like(writeProperties);
+  });
+});
modifiedtests/src/eth/fungibleAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/fungibleAbi.json
+++ b/tests/src/eth/fungibleAbi.json
@@ -229,6 +229,25 @@
     "type": "function"
   },
   {
+    "inputs": [
+      { "internalType": "string[]", "name": "keys", "type": "string[]" }
+    ],
+    "name": "collectionProperties",
+    "outputs": [
+      {
+        "components": [
+          { "internalType": "string", "name": "field_0", "type": "string" },
+          { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+        ],
+        "internalType": "struct Tuple10[]",
+        "name": "",
+        "type": "tuple[]"
+      }
+    ],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
     "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],
     "name": "collectionProperty",
     "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
@@ -463,6 +482,23 @@
   },
   {
     "inputs": [
+      {
+        "components": [
+          { "internalType": "string", "name": "field_0", "type": "string" },
+          { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+        ],
+        "internalType": "struct Tuple10[]",
+        "name": "properties",
+        "type": "tuple[]"
+      }
+    ],
+    "name": "setCollectionProperties",
+    "outputs": [],
+    "stateMutability": "nonpayable",
+    "type": "function"
+  },
+  {
+    "inputs": [
       { "internalType": "string", "name": "key", "type": "string" },
       { "internalType": "bytes", "name": "value", "type": "bytes" }
     ],
modifiedtests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/nonFungibleAbi.json
+++ b/tests/src/eth/nonFungibleAbi.json
@@ -259,6 +259,25 @@
     "type": "function"
   },
   {
+    "inputs": [
+      { "internalType": "string[]", "name": "keys", "type": "string[]" }
+    ],
+    "name": "collectionProperties",
+    "outputs": [
+      {
+        "components": [
+          { "internalType": "string", "name": "field_0", "type": "string" },
+          { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+        ],
+        "internalType": "struct Tuple19[]",
+        "name": "",
+        "type": "tuple[]"
+      }
+    ],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
     "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],
     "name": "collectionProperty",
     "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
@@ -578,6 +597,23 @@
   },
   {
     "inputs": [
+      {
+        "components": [
+          { "internalType": "string", "name": "field_0", "type": "string" },
+          { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+        ],
+        "internalType": "struct Tuple19[]",
+        "name": "properties",
+        "type": "tuple[]"
+      }
+    ],
+    "name": "setCollectionProperties",
+    "outputs": [],
+    "stateMutability": "nonpayable",
+    "type": "function"
+  },
+  {
+    "inputs": [
       { "internalType": "string", "name": "key", "type": "string" },
       { "internalType": "bytes", "name": "value", "type": "bytes" }
     ],
modifiedtests/src/eth/reFungibleAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/reFungibleAbi.json
+++ b/tests/src/eth/reFungibleAbi.json
@@ -241,6 +241,25 @@
     "type": "function"
   },
   {
+    "inputs": [
+      { "internalType": "string[]", "name": "keys", "type": "string[]" }
+    ],
+    "name": "collectionProperties",
+    "outputs": [
+      {
+        "components": [
+          { "internalType": "string", "name": "field_0", "type": "string" },
+          { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+        ],
+        "internalType": "struct Tuple19[]",
+        "name": "",
+        "type": "tuple[]"
+      }
+    ],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
     "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],
     "name": "collectionProperty",
     "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
@@ -560,6 +579,23 @@
   },
   {
     "inputs": [
+      {
+        "components": [
+          { "internalType": "string", "name": "field_0", "type": "string" },
+          { "internalType": "bytes", "name": "field_1", "type": "bytes" }
+        ],
+        "internalType": "struct Tuple19[]",
+        "name": "properties",
+        "type": "tuple[]"
+      }
+    ],
+    "name": "setCollectionProperties",
+    "outputs": [],
+    "stateMutability": "nonpayable",
+    "type": "function"
+  },
+  {
+    "inputs": [
       { "internalType": "string", "name": "key", "type": "string" },
       { "internalType": "bytes", "name": "value", "type": "bytes" }
     ],