From b40c0a2825eaa6f8715328956cca04304da552a8 Mon Sep 17 00:00:00 2001 From: Trubnikov Sergey Date: Tue, 19 Jul 2022 08:19:22 +0000 Subject: [PATCH] misc: generate apis --- --- a/pallets/unique/src/eth/stubs/CollectionHelpers.sol +++ b/pallets/unique/src/eth/stubs/CollectionHelpers.sol @@ -29,7 +29,7 @@ ); } -// Selector: 20947cd0 +// Selector: 86a0d929 contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents { // Selector: createNonfungibleCollection(string,string,string) e34a6844 function createNonfungibleCollection( @@ -45,6 +45,22 @@ return 0x0000000000000000000000000000000000000000; } + // Selector: createERC721MetadataCompatibleCollection(string,string,string,string) a634a5f9 + function createERC721MetadataCompatibleCollection( + 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; + } + // Selector: isCollectionExist(address) c3de1494 function isCollectionExist(address collectionAddress) public --- a/tests/src/eth/api/CollectionHelpers.sol +++ b/tests/src/eth/api/CollectionHelpers.sol @@ -20,7 +20,7 @@ ); } -// Selector: 20947cd0 +// Selector: 86a0d929 interface CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents { // Selector: createNonfungibleCollection(string,string,string) e34a6844 function createNonfungibleCollection( @@ -29,6 +29,14 @@ string memory tokenPrefix ) external returns (address); + // Selector: createERC721MetadataCompatibleCollection(string,string,string,string) a634a5f9 + function createERC721MetadataCompatibleCollection( + string memory name, + string memory description, + string memory tokenPrefix, + string memory baseUri + ) external returns (address); + // Selector: isCollectionExist(address) c3de1494 function isCollectionExist(address collectionAddress) external --- a/tests/src/eth/collectionHelpersAbi.json +++ b/tests/src/eth/collectionHelpersAbi.json @@ -22,6 +22,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": "createERC721MetadataCompatibleCollection", + "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", -- gitstuff