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
--- a/pallets/unique/src/eth/stubs/CollectionHelpers.sol
+++ b/pallets/unique/src/eth/stubs/CollectionHelpers.sol
@@ -29,8 +29,14 @@
 	);
 }
 
-// Selector: c20653fc
+// Selector: 675f3074
 contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {
+	// Create an NFT collection
+	// @param name Name of the collection
+	// @param description Informative description of the collection
+	// @param token_prefix Token prefix to represent the collection tokens in UI and user applications
+	// @return address Address of the newly created collection
+	//
 	// Selector: createNonfungibleCollection(string,string,string) e34a6844
 	function createNonfungibleCollection(
 		string memory name,
@@ -75,6 +81,26 @@
 		return 0x0000000000000000000000000000000000000000;
 	}
 
+	// Selector: createERC721MetadataCompatibleRFTCollection(string,string,string,string) a5596388
+	function createERC721MetadataCompatibleRFTCollection(
+		string memory name,
+		string memory description,
+		string memory tokenPrefix,
+		string memory baseUri
+	) public returns (address) {
+		require(false, stub_error);
+		name;
+		description;
+		tokenPrefix;
+		baseUri;
+		dummy = 0;
+		return 0x0000000000000000000000000000000000000000;
+	}
+
+	// Check if a collection exists
+	// @param collection_address Address of the collection in question
+	// @return bool Does the collection exist?
+	//
 	// Selector: isCollectionExist(address) c3de1494
 	function isCollectionExist(address collectionAddress)
 		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
before · tests/src/eth/collectionHelpersAbi.json
1[2  {3    "anonymous": false,4    "inputs": [5      {6        "indexed": true,7        "internalType": "address",8        "name": "owner",9        "type": "address"10      },11      {12        "indexed": true,13        "internalType": "address",14        "name": "collectionId",15        "type": "address"16      }17    ],18    "name": "CollectionCreated",19    "type": "event"20  },21  {22    "inputs": [23      { "internalType": "string", "name": "name", "type": "string" },24      { "internalType": "string", "name": "description", "type": "string" },25      { "internalType": "string", "name": "tokenPrefix", "type": "string" },26      { "internalType": "string", "name": "baseUri", "type": "string" }27    ],28    "name": "createERC721MetadataCompatibleCollection",29    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],30    "stateMutability": "nonpayable",31    "type": "function"32  },33  {34    "inputs": [35      { "internalType": "string", "name": "name", "type": "string" },36      { "internalType": "string", "name": "description", "type": "string" },37      { "internalType": "string", "name": "tokenPrefix", "type": "string" }38    ],39    "name": "createNonfungibleCollection",40    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],41    "stateMutability": "nonpayable",42    "type": "function"43  },44  {45    "inputs": [46      { "internalType": "string", "name": "name", "type": "string" },47      { "internalType": "string", "name": "description", "type": "string" },48      { "internalType": "string", "name": "tokenPrefix", "type": "string" }49    ],50    "name": "createRefungibleCollection",51    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],52    "stateMutability": "view",53    "type": "function"54  },55  {56    "inputs": [57      {58        "internalType": "address",59        "name": "collectionAddress",60        "type": "address"61      }62    ],63    "name": "isCollectionExist",64    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],65    "stateMutability": "view",66    "type": "function"67  },68  {69    "inputs": [70      { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }71    ],72    "name": "supportsInterface",73    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],74    "stateMutability": "view",75    "type": "function"76  }77]
after · tests/src/eth/collectionHelpersAbi.json
1[2  {3    "anonymous": false,4    "inputs": [5      {6        "indexed": true,7        "internalType": "address",8        "name": "owner",9        "type": "address"10      },11      {12        "indexed": true,13        "internalType": "address",14        "name": "collectionId",15        "type": "address"16      }17    ],18    "name": "CollectionCreated",19    "type": "event"20  },21  {22    "inputs": [23      { "internalType": "string", "name": "name", "type": "string" },24      { "internalType": "string", "name": "description", "type": "string" },25      { "internalType": "string", "name": "tokenPrefix", "type": "string" },26      { "internalType": "string", "name": "baseUri", "type": "string" }27    ],28    "name": "createERC721MetadataCompatibleCollection",29    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],30    "stateMutability": "nonpayable",31    "type": "function"32  },33  {34    "inputs": [35      { "internalType": "string", "name": "name", "type": "string" },36      { "internalType": "string", "name": "description", "type": "string" },37      { "internalType": "string", "name": "tokenPrefix", "type": "string" },38      { "internalType": "string", "name": "baseUri", "type": "string" }39    ],40    "name": "createERC721MetadataCompatibleRFTCollection",41    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],42    "stateMutability": "nonpayable",43    "type": "function"44  },45  {46    "inputs": [47      { "internalType": "string", "name": "name", "type": "string" },48      { "internalType": "string", "name": "description", "type": "string" },49      { "internalType": "string", "name": "tokenPrefix", "type": "string" }50    ],51    "name": "createNonfungibleCollection",52    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],53    "stateMutability": "nonpayable",54    "type": "function"55  },56  {57    "inputs": [58      { "internalType": "string", "name": "name", "type": "string" },59      { "internalType": "string", "name": "description", "type": "string" },60      { "internalType": "string", "name": "tokenPrefix", "type": "string" }61    ],62    "name": "createRefungibleCollection",63    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],64    "stateMutability": "view",65    "type": "function"66  },67  {68    "inputs": [69      {70        "internalType": "address",71        "name": "collectionAddress",72        "type": "address"73      }74    ],75    "name": "isCollectionExist",76    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],77    "stateMutability": "view",78    "type": "function"79  },80  {81    "inputs": [82      { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }83    ],84    "name": "supportsInterface",85    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],86    "stateMutability": "view",87    "type": "function"88  }89]