git.delta.rocks / unique-network / refs/commits / 6fca5f33938a

difftreelog

chore regenerate evm-coder files

Yaroslav Bolyukin2022-08-03parent: #f732634.patch.diff
in: master

9 files changed

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
@@ -300,9 +300,13 @@
 	}
 
 	// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
-	// @dev Throws if `tokenId` is not a valid NFT. URIs are defined in RFC
-	//  3986. The URI may point to a JSON file that conforms to the "ERC721
-	//  Metadata JSON Schema".
+	//
+	// @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
modifiedpallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/unique/src/eth/stubs/CollectionHelpers.soldiffbeforeafterboth
29 );29 );
30}30}
3131
32// Selector: c20653fc32// Selector: 675f3074
33contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {33contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {
34 // Create an NFT collection
35 // @param name Name of the collection
36 // @param description Informative description of the collection
37 // @param token_prefix Token prefix to represent the collection tokens in UI and user applications
38 // @return address Address of the newly created collection
39 //
34 // Selector: createNonfungibleCollection(string,string,string) e34a684440 // Selector: createNonfungibleCollection(string,string,string) e34a6844
35 function createNonfungibleCollection(41 function createNonfungibleCollection(
36 string memory name,42 string memory name,
75 return 0x0000000000000000000000000000000000000000;81 return 0x0000000000000000000000000000000000000000;
76 }82 }
7783
84 // Selector: createERC721MetadataCompatibleRFTCollection(string,string,string,string) a5596388
85 function createERC721MetadataCompatibleRFTCollection(
86 string memory name,
87 string memory description,
88 string memory tokenPrefix,
89 string memory baseUri
90 ) public returns (address) {
91 require(false, stub_error);
92 name;
93 description;
94 tokenPrefix;
95 baseUri;
96 dummy = 0;
97 return 0x0000000000000000000000000000000000000000;
98 }
99
100 // Check if a collection exists
101 // @param collection_address Address of the collection in question
102 // @return bool Does the collection exist?
103 //
78 // Selector: isCollectionExist(address) c3de1494104 // Selector: isCollectionExist(address) c3de1494
79 function isCollectionExist(address collectionAddress)105 function isCollectionExist(address collectionAddress)
80 public106 public
modifiedtests/src/eth/api/CollectionHelpers.soldiffbeforeafterboth
--- a/tests/src/eth/api/CollectionHelpers.sol
+++ b/tests/src/eth/api/CollectionHelpers.sol
@@ -20,8 +20,14 @@
 	);
 }
 
-// Selector: c20653fc
+// Selector: 675f3074
 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
 	function createNonfungibleCollection(
 		string memory name,
@@ -44,6 +50,18 @@
 		string memory tokenPrefix
 	) external view returns (address);
 
+	// Selector: createERC721MetadataCompatibleRFTCollection(string,string,string,string) a5596388
+	function createERC721MetadataCompatibleRFTCollection(
+		string memory name,
+		string memory description,
+		string memory tokenPrefix,
+		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
 	function isCollectionExist(address collectionAddress)
 		external
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -203,9 +203,13 @@
 	function symbol() external view returns (string memory);
 
 	// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
-	// @dev Throws if `tokenId` is not a valid NFT. URIs are defined in RFC
-	//  3986. The URI may point to a JSON file that conforms to the "ERC721
-	//  Metadata JSON Schema".
+	//
+	// @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
modifiedtests/src/eth/collectionHelpersAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/collectionHelpersAbi.json
+++ b/tests/src/eth/collectionHelpersAbi.json
@@ -34,6 +34,18 @@
     "inputs": [
       { "internalType": "string", "name": "name", "type": "string" },
       { "internalType": "string", "name": "description", "type": "string" },
+      { "internalType": "string", "name": "tokenPrefix", "type": "string" },
+      { "internalType": "string", "name": "baseUri", "type": "string" }
+    ],
+    "name": "createERC721MetadataCompatibleRFTCollection",
+    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
+    "stateMutability": "nonpayable",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      { "internalType": "string", "name": "name", "type": "string" },
+      { "internalType": "string", "name": "description", "type": "string" },
       { "internalType": "string", "name": "tokenPrefix", "type": "string" }
     ],
     "name": "createNonfungibleCollection",