difftreelog
chore regenerate evm-coder files
in: master
9 files changed
pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/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
pallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterbothbinary blob — no preview
pallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/unique/src/eth/stubs/CollectionHelpers.soldiffbeforeafterboth1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// 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)14 external15 view16 returns (bool)17 {18 require(false, stub_error);19 interfaceID;20 return true;21 }22}2324// Inline25contract CollectionHelpersEvents {26 event CollectionCreated(27 address indexed owner,28 address indexed collectionId29 );30}3132// Selector: c20653fc33contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {34 // Selector: createNonfungibleCollection(string,string,string) e34a684435 function createNonfungibleCollection(36 string memory name,37 string memory description,38 string memory tokenPrefix39 ) public returns (address) {40 require(false, stub_error);41 name;42 description;43 tokenPrefix;44 dummy = 0;45 return 0x0000000000000000000000000000000000000000;46 }4748 // Selector: createERC721MetadataCompatibleCollection(string,string,string,string) a634a5f949 function createERC721MetadataCompatibleCollection(50 string memory name,51 string memory description,52 string memory tokenPrefix,53 string memory baseUri54 ) public returns (address) {55 require(false, stub_error);56 name;57 description;58 tokenPrefix;59 baseUri;60 dummy = 0;61 return 0x0000000000000000000000000000000000000000;62 }6364 // Selector: createRefungibleCollection(string,string,string) 44a68ad565 function createRefungibleCollection(66 string memory name,67 string memory description,68 string memory tokenPrefix69 ) public view returns (address) {70 require(false, stub_error);71 name;72 description;73 tokenPrefix;74 dummy;75 return 0x0000000000000000000000000000000000000000;76 }7778 // Selector: isCollectionExist(address) c3de149479 function isCollectionExist(address collectionAddress)80 public81 view82 returns (bool)83 {84 require(false, stub_error);85 collectionAddress;86 dummy;87 return false;88 }89}1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// 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)14 external15 view16 returns (bool)17 {18 require(false, stub_error);19 interfaceID;20 return true;21 }22}2324// Inline25contract CollectionHelpersEvents {26 event CollectionCreated(27 address indexed owner,28 address indexed collectionId29 );30}3132// Selector: 675f307433contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {34 // Create an NFT collection35 // @param name Name of the collection36 // @param description Informative description of the collection37 // @param token_prefix Token prefix to represent the collection tokens in UI and user applications38 // @return address Address of the newly created collection39 //40 // Selector: createNonfungibleCollection(string,string,string) e34a684441 function createNonfungibleCollection(42 string memory name,43 string memory description,44 string memory tokenPrefix45 ) public returns (address) {46 require(false, stub_error);47 name;48 description;49 tokenPrefix;50 dummy = 0;51 return 0x0000000000000000000000000000000000000000;52 }5354 // Selector: createERC721MetadataCompatibleCollection(string,string,string,string) a634a5f955 function createERC721MetadataCompatibleCollection(56 string memory name,57 string memory description,58 string memory tokenPrefix,59 string memory baseUri60 ) public returns (address) {61 require(false, stub_error);62 name;63 description;64 tokenPrefix;65 baseUri;66 dummy = 0;67 return 0x0000000000000000000000000000000000000000;68 }6970 // Selector: createRefungibleCollection(string,string,string) 44a68ad571 function createRefungibleCollection(72 string memory name,73 string memory description,74 string memory tokenPrefix75 ) public view returns (address) {76 require(false, stub_error);77 name;78 description;79 tokenPrefix;80 dummy;81 return 0x0000000000000000000000000000000000000000;82 }8384 // Selector: createERC721MetadataCompatibleRFTCollection(string,string,string,string) a559638885 function createERC721MetadataCompatibleRFTCollection(86 string memory name,87 string memory description,88 string memory tokenPrefix,89 string memory baseUri90 ) public returns (address) {91 require(false, stub_error);92 name;93 description;94 tokenPrefix;95 baseUri;96 dummy = 0;97 return 0x0000000000000000000000000000000000000000;98 }99100 // Check if a collection exists101 // @param collection_address Address of the collection in question102 // @return bool Does the collection exist?103 //104 // Selector: isCollectionExist(address) c3de1494105 function isCollectionExist(address collectionAddress)106 public107 view108 returns (bool)109 {110 require(false, stub_error);111 collectionAddress;112 dummy;113 return false;114 }115}tests/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
tests/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
tests/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",