From 5c36133bb18fc16f8d7519f92c09697caabe6162 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Thu, 13 Oct 2022 16:27:59 +0000 Subject: [PATCH] chore: regenerate stubs --- --- a/pallets/nonfungible/src/stubs/UniqueNFT.sol +++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol @@ -17,49 +17,6 @@ } } -/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension -/// @dev See https://eips.ethereum.org/EIPS/eip-721 -/// @dev the ERC-165 identifier for this interface is 0x5b5e139f -contract ERC721Metadata is Dummy, ERC165 { - // /// @notice A descriptive name for a collection of NFTs in this contract - // /// @dev real implementation of this function lies in `ERC721UniqueExtensions` - // /// @dev EVM selector for this function is: 0x06fdde03, - // /// or in textual repr: name() - // function name() public view returns (string memory) { - // require(false, stub_error); - // dummy; - // return ""; - // } - - // /// @notice An abbreviated name for NFTs in this contract - // /// @dev real implementation of this function lies in `ERC721UniqueExtensions` - // /// @dev EVM selector for this function is: 0x95d89b41, - // /// or in textual repr: symbol() - // function symbol() public view returns (string memory) { - // require(false, stub_error); - // dummy; - // return ""; - // } - - /// @notice A distinct Uniform Resource Identifier (URI) for a given asset. - /// - /// @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 - /// @dev EVM selector for this function is: 0xc87b56dd, - /// or in textual repr: tokenURI(uint256) - function tokenURI(uint256 tokenId) public view returns (string memory) { - require(false, stub_error); - tokenId; - dummy; - return ""; - } -} - /// @title A contract that allows to set and delete token properties and change token property permissions. /// @dev the ERC-165 identifier for this interface is 0x41369377 contract TokenProperties is Dummy, ERC165 { @@ -220,10 +177,10 @@ /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw. /// @dev EVM selector for this function is: 0x6ec0a9f1, /// or in textual repr: collectionSponsor() - function collectionSponsor() public view returns (Tuple15 memory) { + function collectionSponsor() public view returns (Tuple17 memory) { require(false, stub_error); dummy; - return Tuple15(0x0000000000000000000000000000000000000000, 0); + return Tuple17(0x0000000000000000000000000000000000000000, 0); } /// Set limits for the collection. @@ -402,10 +359,10 @@ /// If address is canonical then substrate mirror is zero and vice versa. /// @dev EVM selector for this function is: 0xdf727d3b, /// or in textual repr: collectionOwner() - function collectionOwner() public view returns (Tuple15 memory) { + function collectionOwner() public view returns (Tuple17 memory) { require(false, stub_error); dummy; - return Tuple15(0x0000000000000000000000000000000000000000, 0); + return Tuple17(0x0000000000000000000000000000000000000000, 0); } /// Changes collection owner to another account @@ -422,11 +379,54 @@ } /// @dev anonymous struct -struct Tuple15 { +struct Tuple17 { address field_0; uint256 field_1; } +/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension +/// @dev See https://eips.ethereum.org/EIPS/eip-721 +/// @dev the ERC-165 identifier for this interface is 0x5b5e139f +contract ERC721Metadata is Dummy, ERC165 { + // /// @notice A descriptive name for a collection of NFTs in this contract + // /// @dev real implementation of this function lies in `ERC721UniqueExtensions` + // /// @dev EVM selector for this function is: 0x06fdde03, + // /// or in textual repr: name() + // function name() public view returns (string memory) { + // require(false, stub_error); + // dummy; + // return ""; + // } + + // /// @notice An abbreviated name for NFTs in this contract + // /// @dev real implementation of this function lies in `ERC721UniqueExtensions` + // /// @dev EVM selector for this function is: 0x95d89b41, + // /// or in textual repr: symbol() + // function symbol() public view returns (string memory) { + // require(false, stub_error); + // dummy; + // return ""; + // } + + /// @notice A distinct Uniform Resource Identifier (URI) for a given asset. + /// + /// @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 + /// @dev EVM selector for this function is: 0xc87b56dd, + /// or in textual repr: tokenURI(uint256) + function tokenURI(uint256 tokenId) public view returns (string memory) { + require(false, stub_error); + tokenId; + dummy; + return ""; + } +} + /// @title ERC721 Token that can be irreversibly burned (destroyed). /// @dev the ERC-165 identifier for this interface is 0x42966c68 contract ERC721Burnable is Dummy, ERC165 { @@ -790,7 +790,7 @@ ERC721UniqueExtensions, ERC721Mintable, ERC721Burnable, + ERC721Metadata, Collection, - TokenProperties, - ERC721Metadata + TokenProperties {} --- a/pallets/refungible/src/stubs/UniqueRefungible.sol +++ b/pallets/refungible/src/stubs/UniqueRefungible.sol @@ -17,45 +17,6 @@ } } -/// @dev the ERC-165 identifier for this interface is 0x5b5e139f -contract ERC721Metadata is Dummy, ERC165 { - /// @notice A descriptive name for a collection of RFTs in this contract - /// @dev EVM selector for this function is: 0x06fdde03, - /// or in textual repr: name() - function name() public view returns (string memory) { - require(false, stub_error); - dummy; - return ""; - } - - /// @notice An abbreviated name for RFTs in this contract - /// @dev EVM selector for this function is: 0x95d89b41, - /// or in textual repr: symbol() - function symbol() public view returns (string memory) { - require(false, stub_error); - dummy; - return ""; - } - - /// @notice A distinct Uniform Resource Identifier (URI) for a given asset. - /// - /// @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 - /// @dev EVM selector for this function is: 0xc87b56dd, - /// or in textual repr: tokenURI(uint256) - function tokenURI(uint256 tokenId) public view returns (string memory) { - require(false, stub_error); - tokenId; - dummy; - return ""; - } -} - /// @title A contract that allows to set and delete token properties and change token property permissions. /// @dev the ERC-165 identifier for this interface is 0x41369377 contract TokenProperties is Dummy, ERC165 { @@ -216,10 +177,10 @@ /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw. /// @dev EVM selector for this function is: 0x6ec0a9f1, /// or in textual repr: collectionSponsor() - function collectionSponsor() public view returns (Tuple15 memory) { + function collectionSponsor() public view returns (Tuple17 memory) { require(false, stub_error); dummy; - return Tuple15(0x0000000000000000000000000000000000000000, 0); + return Tuple17(0x0000000000000000000000000000000000000000, 0); } /// Set limits for the collection. @@ -398,10 +359,10 @@ /// If address is canonical then substrate mirror is zero and vice versa. /// @dev EVM selector for this function is: 0xdf727d3b, /// or in textual repr: collectionOwner() - function collectionOwner() public view returns (Tuple15 memory) { + function collectionOwner() public view returns (Tuple17 memory) { require(false, stub_error); dummy; - return Tuple15(0x0000000000000000000000000000000000000000, 0); + return Tuple17(0x0000000000000000000000000000000000000000, 0); } /// Changes collection owner to another account @@ -418,11 +379,52 @@ } /// @dev anonymous struct -struct Tuple15 { +struct Tuple17 { address field_0; uint256 field_1; } +/// @dev the ERC-165 identifier for this interface is 0x5b5e139f +contract ERC721Metadata is Dummy, ERC165 { + // /// @notice A descriptive name for a collection of NFTs in this contract + // /// @dev real implementation of this function lies in `ERC721UniqueExtensions` + // /// @dev EVM selector for this function is: 0x06fdde03, + // /// or in textual repr: name() + // function name() public view returns (string memory) { + // require(false, stub_error); + // dummy; + // return ""; + // } + + // /// @notice An abbreviated name for NFTs in this contract + // /// @dev real implementation of this function lies in `ERC721UniqueExtensions` + // /// @dev EVM selector for this function is: 0x95d89b41, + // /// or in textual repr: symbol() + // function symbol() public view returns (string memory) { + // require(false, stub_error); + // dummy; + // return ""; + // } + + /// @notice A distinct Uniform Resource Identifier (URI) for a given asset. + /// + /// @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 + /// @dev EVM selector for this function is: 0xc87b56dd, + /// or in textual repr: tokenURI(uint256) + function tokenURI(uint256 tokenId) public view returns (string memory) { + require(false, stub_error); + tokenId; + dummy; + return ""; + } +} + /// @title ERC721 Token that can be irreversibly burned (destroyed). /// @dev the ERC-165 identifier for this interface is 0x42966c68 contract ERC721Burnable is Dummy, ERC165 { @@ -502,8 +504,26 @@ } /// @title Unique extensions for ERC721. -/// @dev the ERC-165 identifier for this interface is 0x7c3bef89 +/// @dev the ERC-165 identifier for this interface is 0xef1eaacb contract ERC721UniqueExtensions is Dummy, ERC165 { + /// @notice A descriptive name for a collection of NFTs in this contract + /// @dev EVM selector for this function is: 0x06fdde03, + /// or in textual repr: name() + function name() public view returns (string memory) { + require(false, stub_error); + dummy; + return ""; + } + + /// @notice An abbreviated name for NFTs in this contract + /// @dev EVM selector for this function is: 0x95d89b41, + /// or in textual repr: symbol() + function symbol() public view returns (string memory) { + require(false, stub_error); + dummy; + return ""; + } + /// @notice Transfer ownership of an RFT /// @dev Throws unless `msg.sender` is the current owner. Throws if `to` /// is the zero address. Throws if `tokenId` is not a valid RFT. @@ -780,7 +800,7 @@ ERC721UniqueExtensions, ERC721Mintable, ERC721Burnable, + ERC721Metadata, Collection, - TokenProperties, - ERC721Metadata + TokenProperties {} --- a/tests/src/eth/api/UniqueNFT.sol +++ b/tests/src/eth/api/UniqueNFT.sol @@ -12,36 +12,6 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); } -/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension -/// @dev See https://eips.ethereum.org/EIPS/eip-721 -/// @dev the ERC-165 identifier for this interface is 0x5b5e139f -interface ERC721Metadata is Dummy, ERC165 { - // /// @notice A descriptive name for a collection of NFTs in this contract - // /// @dev real implementation of this function lies in `ERC721UniqueExtensions` - // /// @dev EVM selector for this function is: 0x06fdde03, - // /// or in textual repr: name() - // function name() external view returns (string memory); - - // /// @notice An abbreviated name for NFTs in this contract - // /// @dev real implementation of this function lies in `ERC721UniqueExtensions` - // /// @dev EVM selector for this function is: 0x95d89b41, - // /// or in textual repr: symbol() - // function symbol() external view returns (string memory); - - /// @notice A distinct Uniform Resource Identifier (URI) for a given asset. - /// - /// @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 - /// @dev EVM selector for this function is: 0xc87b56dd, - /// or in textual repr: tokenURI(uint256) - function tokenURI(uint256 tokenId) external view returns (string memory); -} - /// @title A contract that allows to set and delete token properties and change token property permissions. /// @dev the ERC-165 identifier for this interface is 0x41369377 interface TokenProperties is Dummy, ERC165 { @@ -150,7 +120,7 @@ /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw. /// @dev EVM selector for this function is: 0x6ec0a9f1, /// or in textual repr: collectionSponsor() - function collectionSponsor() external view returns (Tuple15 memory); + function collectionSponsor() external view returns (Tuple17 memory); /// Set limits for the collection. /// @dev Throws error if limit not found. @@ -267,7 +237,7 @@ /// If address is canonical then substrate mirror is zero and vice versa. /// @dev EVM selector for this function is: 0xdf727d3b, /// or in textual repr: collectionOwner() - function collectionOwner() external view returns (Tuple15 memory); + function collectionOwner() external view returns (Tuple17 memory); /// Changes collection owner to another account /// @@ -279,11 +249,41 @@ } /// @dev anonymous struct -struct Tuple15 { +struct Tuple17 { address field_0; uint256 field_1; } +/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension +/// @dev See https://eips.ethereum.org/EIPS/eip-721 +/// @dev the ERC-165 identifier for this interface is 0x5b5e139f +interface ERC721Metadata is Dummy, ERC165 { + // /// @notice A descriptive name for a collection of NFTs in this contract + // /// @dev real implementation of this function lies in `ERC721UniqueExtensions` + // /// @dev EVM selector for this function is: 0x06fdde03, + // /// or in textual repr: name() + // function name() external view returns (string memory); + + // /// @notice An abbreviated name for NFTs in this contract + // /// @dev real implementation of this function lies in `ERC721UniqueExtensions` + // /// @dev EVM selector for this function is: 0x95d89b41, + // /// or in textual repr: symbol() + // function symbol() external view returns (string memory); + + /// @notice A distinct Uniform Resource Identifier (URI) for a given asset. + /// + /// @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 + /// @dev EVM selector for this function is: 0xc87b56dd, + /// or in textual repr: tokenURI(uint256) + function tokenURI(uint256 tokenId) external view returns (string memory); +} + /// @title ERC721 Token that can be irreversibly burned (destroyed). /// @dev the ERC-165 identifier for this interface is 0x42966c68 interface ERC721Burnable is Dummy, ERC165 { @@ -523,7 +523,7 @@ ERC721UniqueExtensions, ERC721Mintable, ERC721Burnable, + ERC721Metadata, Collection, - TokenProperties, - ERC721Metadata + TokenProperties {} --- a/tests/src/eth/api/UniqueRefungible.sol +++ b/tests/src/eth/api/UniqueRefungible.sol @@ -12,32 +12,6 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); } -/// @dev the ERC-165 identifier for this interface is 0x5b5e139f -interface ERC721Metadata is Dummy, ERC165 { - /// @notice A descriptive name for a collection of RFTs in this contract - /// @dev EVM selector for this function is: 0x06fdde03, - /// or in textual repr: name() - function name() external view returns (string memory); - - /// @notice An abbreviated name for RFTs in this contract - /// @dev EVM selector for this function is: 0x95d89b41, - /// or in textual repr: symbol() - function symbol() external view returns (string memory); - - /// @notice A distinct Uniform Resource Identifier (URI) for a given asset. - /// - /// @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 - /// @dev EVM selector for this function is: 0xc87b56dd, - /// or in textual repr: tokenURI(uint256) - function tokenURI(uint256 tokenId) external view returns (string memory); -} - /// @title A contract that allows to set and delete token properties and change token property permissions. /// @dev the ERC-165 identifier for this interface is 0x41369377 interface TokenProperties is Dummy, ERC165 { @@ -146,7 +120,7 @@ /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw. /// @dev EVM selector for this function is: 0x6ec0a9f1, /// or in textual repr: collectionSponsor() - function collectionSponsor() external view returns (Tuple15 memory); + function collectionSponsor() external view returns (Tuple17 memory); /// Set limits for the collection. /// @dev Throws error if limit not found. @@ -263,7 +237,7 @@ /// If address is canonical then substrate mirror is zero and vice versa. /// @dev EVM selector for this function is: 0xdf727d3b, /// or in textual repr: collectionOwner() - function collectionOwner() external view returns (Tuple15 memory); + function collectionOwner() external view returns (Tuple17 memory); /// Changes collection owner to another account /// @@ -275,11 +249,39 @@ } /// @dev anonymous struct -struct Tuple15 { +struct Tuple17 { address field_0; uint256 field_1; } +/// @dev the ERC-165 identifier for this interface is 0x5b5e139f +interface ERC721Metadata is Dummy, ERC165 { + // /// @notice A descriptive name for a collection of NFTs in this contract + // /// @dev real implementation of this function lies in `ERC721UniqueExtensions` + // /// @dev EVM selector for this function is: 0x06fdde03, + // /// or in textual repr: name() + // function name() external view returns (string memory); + + // /// @notice An abbreviated name for NFTs in this contract + // /// @dev real implementation of this function lies in `ERC721UniqueExtensions` + // /// @dev EVM selector for this function is: 0x95d89b41, + // /// or in textual repr: symbol() + // function symbol() external view returns (string memory); + + /// @notice A distinct Uniform Resource Identifier (URI) for a given asset. + /// + /// @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 + /// @dev EVM selector for this function is: 0xc87b56dd, + /// or in textual repr: tokenURI(uint256) + function tokenURI(uint256 tokenId) external view returns (string memory); +} + /// @title ERC721 Token that can be irreversibly burned (destroyed). /// @dev the ERC-165 identifier for this interface is 0x42966c68 interface ERC721Burnable is Dummy, ERC165 { @@ -334,8 +336,18 @@ } /// @title Unique extensions for ERC721. -/// @dev the ERC-165 identifier for this interface is 0x7c3bef89 +/// @dev the ERC-165 identifier for this interface is 0xef1eaacb interface ERC721UniqueExtensions is Dummy, ERC165 { + /// @notice A descriptive name for a collection of NFTs in this contract + /// @dev EVM selector for this function is: 0x06fdde03, + /// or in textual repr: name() + function name() external view returns (string memory); + + /// @notice An abbreviated name for NFTs in this contract + /// @dev EVM selector for this function is: 0x95d89b41, + /// or in textual repr: symbol() + function symbol() external view returns (string memory); + /// @notice Transfer ownership of an RFT /// @dev Throws unless `msg.sender` is the current owner. Throws if `to` /// is the zero address. Throws if `tokenId` is not a valid RFT. @@ -516,7 +528,7 @@ ERC721UniqueExtensions, ERC721Mintable, ERC721Burnable, + ERC721Metadata, Collection, - TokenProperties, - ERC721Metadata + TokenProperties {} --- a/tests/src/eth/nonFungibleAbi.json +++ b/tests/src/eth/nonFungibleAbi.json @@ -154,7 +154,7 @@ { "internalType": "address", "name": "field_0", "type": "address" }, { "internalType": "uint256", "name": "field_1", "type": "uint256" } ], - "internalType": "struct Tuple15", + "internalType": "struct Tuple17", "name": "", "type": "tuple" } @@ -178,7 +178,7 @@ { "internalType": "address", "name": "field_0", "type": "address" }, { "internalType": "uint256", "name": "field_1", "type": "uint256" } ], - "internalType": "struct Tuple15", + "internalType": "struct Tuple17", "name": "", "type": "tuple" } --- a/tests/src/eth/reFungibleAbi.json +++ b/tests/src/eth/reFungibleAbi.json @@ -154,7 +154,7 @@ { "internalType": "address", "name": "field_0", "type": "address" }, { "internalType": "uint256", "name": "field_1", "type": "uint256" } ], - "internalType": "struct Tuple15", + "internalType": "struct Tuple17", "name": "", "type": "tuple" } @@ -178,7 +178,7 @@ { "internalType": "address", "name": "field_0", "type": "address" }, { "internalType": "uint256", "name": "field_1", "type": "uint256" } ], - "internalType": "struct Tuple15", + "internalType": "struct Tuple17", "name": "", "type": "tuple" } -- gitstuff