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.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
tests/src/eth/api/CollectionHelpers.soldiffbeforeafterboth1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// Common stubs holder7interface Dummy {89}1011interface ERC165 is Dummy {12 function supportsInterface(bytes4 interfaceID) external view returns (bool);13}1415// Inline16interface CollectionHelpersEvents {17 event CollectionCreated(18 address indexed owner,19 address indexed collectionId20 );21}2223// Selector: c20653fc24interface CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {25 // Selector: createNonfungibleCollection(string,string,string) e34a684426 function createNonfungibleCollection(27 string memory name,28 string memory description,29 string memory tokenPrefix30 ) external returns (address);3132 // Selector: createERC721MetadataCompatibleCollection(string,string,string,string) a634a5f933 function createERC721MetadataCompatibleCollection(34 string memory name,35 string memory description,36 string memory tokenPrefix,37 string memory baseUri38 ) external returns (address);3940 // Selector: createRefungibleCollection(string,string,string) 44a68ad541 function createRefungibleCollection(42 string memory name,43 string memory description,44 string memory tokenPrefix45 ) external view returns (address);4647 // Selector: isCollectionExist(address) c3de149448 function isCollectionExist(address collectionAddress)49 external50 view51 returns (bool);52}1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// Common stubs holder7interface Dummy {89}1011interface ERC165 is Dummy {12 function supportsInterface(bytes4 interfaceID) external view returns (bool);13}1415// Inline16interface CollectionHelpersEvents {17 event CollectionCreated(18 address indexed owner,19 address indexed collectionId20 );21}2223// Selector: 675f307424interface CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents {25 // Create an NFT collection26 // @param name Name of the collection27 // @param description Informative description of the collection28 // @param token_prefix Token prefix to represent the collection tokens in UI and user applications29 // @return address Address of the newly created collection30 //31 // Selector: createNonfungibleCollection(string,string,string) e34a684432 function createNonfungibleCollection(33 string memory name,34 string memory description,35 string memory tokenPrefix36 ) external returns (address);3738 // Selector: createERC721MetadataCompatibleCollection(string,string,string,string) a634a5f939 function createERC721MetadataCompatibleCollection(40 string memory name,41 string memory description,42 string memory tokenPrefix,43 string memory baseUri44 ) external returns (address);4546 // Selector: createRefungibleCollection(string,string,string) 44a68ad547 function createRefungibleCollection(48 string memory name,49 string memory description,50 string memory tokenPrefix51 ) external view returns (address);5253 // Selector: createERC721MetadataCompatibleRFTCollection(string,string,string,string) a559638854 function createERC721MetadataCompatibleRFTCollection(55 string memory name,56 string memory description,57 string memory tokenPrefix,58 string memory baseUri59 ) external returns (address);6061 // Check if a collection exists62 // @param collection_address Address of the collection in question63 // @return bool Does the collection exist?64 //65 // Selector: isCollectionExist(address) c3de149466 function isCollectionExist(address collectionAddress)67 external68 view69 returns (bool);70}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",