--- a/pallets/nonfungible/src/erc.rs +++ b/pallets/nonfungible/src/erc.rs @@ -524,11 +524,6 @@ Ok(>::allowance_for_all(self, &owner, &operator)) } - - /// @notice Returns collection helper contract address - fn collection_helper_address(&self) -> Result
{ - Ok(T::ContractAddress::get()) - } } /// @title ERC721 Token that can be irreversibly burned (destroyed). @@ -1058,6 +1053,11 @@ Ok(token_id.into()) } + + /// @notice Returns collection helper contract address + fn collection_helper_address(&self) -> Result
{ + Ok(T::ContractAddress::get()) + } } #[solidity_interface( --- a/pallets/nonfungible/src/stubs/UniqueNFT.sol +++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol @@ -785,7 +785,7 @@ } /// @title Unique extensions for ERC721. -/// @dev the ERC-165 identifier for this interface is 0x0e48fdb4 +/// @dev the ERC-165 identifier for this interface is 0x16de3152 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, @@ -986,6 +986,15 @@ dummy = 0; return 0; } + + /// @notice Returns collection helper contract address + /// @dev EVM selector for this function is: 0x1896cce6, + /// or in textual repr: collectionHelperAddress() + function collectionHelperAddress() public view returns (address) { + require(false, stub_error); + dummy; + return 0x0000000000000000000000000000000000000000; + } } /// @dev anonymous struct @@ -1043,7 +1052,7 @@ /// @title ERC-721 Non-Fungible Token Standard /// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md -/// @dev the ERC-165 identifier for this interface is 0x983a942b +/// @dev the ERC-165 identifier for this interface is 0x80ac58cd contract ERC721 is Dummy, ERC165, ERC721Events { /// @notice Count all NFTs assigned to an owner /// @dev NFTs assigned to the zero address are considered invalid, and this @@ -1175,15 +1184,6 @@ operator; dummy; return false; - } - - /// @notice Returns collection helper contract address - /// @dev EVM selector for this function is: 0x1896cce6, - /// or in textual repr: collectionHelperAddress() - function collectionHelperAddress() public view returns (address) { - require(false, stub_error); - dummy; - return 0x0000000000000000000000000000000000000000; } } --- a/tests/src/eth/abi/nonFungible.json +++ b/tests/src/eth/abi/nonFungible.json @@ -51,6 +51,12 @@ }, { "anonymous": false, + "inputs": [], + "name": "MintingFinished", + "type": "event" + }, + { + "anonymous": false, "inputs": [ { "indexed": true, @@ -417,6 +423,13 @@ "type": "function" }, { + "inputs": [], + "name": "finishMinting", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], @@ -504,6 +517,13 @@ }, { "inputs": [], + "name": "mintingFinished", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], "name": "name", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", --- a/tests/src/eth/abi/reFungible.json +++ b/tests/src/eth/abi/reFungible.json @@ -51,6 +51,12 @@ }, { "anonymous": false, + "inputs": [], + "name": "MintingFinished", + "type": "event" + }, + { + "anonymous": false, "inputs": [ { "indexed": true, @@ -399,6 +405,13 @@ "type": "function" }, { + "inputs": [], + "name": "finishMinting", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], @@ -486,6 +499,13 @@ }, { "inputs": [], + "name": "mintingFinished", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], "name": "name", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", --- a/tests/src/eth/abi/reFungibleToken.json +++ b/tests/src/eth/abi/reFungibleToken.json @@ -98,6 +98,16 @@ }, { "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "burnFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "components": [ { "internalType": "address", "name": "eth", "type": "address" }, --- a/tests/src/eth/api/UniqueNFT.sol +++ b/tests/src/eth/api/UniqueNFT.sol @@ -536,7 +536,7 @@ } /// @title Unique extensions for ERC721. -/// @dev the ERC-165 identifier for this interface is 0x0e48fdb4 +/// @dev the ERC-165 identifier for this interface is 0x16de3152 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, @@ -661,6 +661,11 @@ /// @dev EVM selector for this function is: 0xb904db03, /// or in textual repr: mintCross((address,uint256),(string,bytes)[]) function mintCross(CrossAddress memory to, Property[] memory properties) external returns (uint256); + + /// @notice Returns collection helper contract address + /// @dev EVM selector for this function is: 0x1896cce6, + /// or in textual repr: collectionHelperAddress() + function collectionHelperAddress() external view returns (address); } /// @dev anonymous struct @@ -703,7 +708,7 @@ /// @title ERC-721 Non-Fungible Token Standard /// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md -/// @dev the ERC-165 identifier for this interface is 0x983a942b +/// @dev the ERC-165 identifier for this interface is 0x80ac58cd interface ERC721 is Dummy, ERC165, ERC721Events { /// @notice Count all NFTs assigned to an owner /// @dev NFTs assigned to the zero address are considered invalid, and this @@ -786,11 +791,6 @@ /// @dev EVM selector for this function is: 0xe985e9c5, /// or in textual repr: isApprovedForAll(address,address) function isApprovedForAll(address owner, address operator) external view returns (bool); - - /// @notice Returns collection helper contract address - /// @dev EVM selector for this function is: 0x1896cce6, - /// or in textual repr: collectionHelperAddress() - function collectionHelperAddress() external view returns (address); } interface UniqueNFT is