git.delta.rocks / unique-network / refs/commits / 9cba02dd9f43

difftreelog

fix nonfungible erc721 selector

Yaroslav Bolyukin2023-01-12parent: #b81a3fd.patch.diff
in: master

7 files changed

modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -524,11 +524,6 @@
 
 		Ok(<Pallet<T>>::allowance_for_all(self, &owner, &operator))
 	}
-
-	/// @notice Returns collection helper contract address
-	fn collection_helper_address(&self) -> Result<address> {
-		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<address> {
+		Ok(T::ContractAddress::get())
+	}
 }
 
 #[solidity_interface(
modifiedpallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth
--- 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;
 	}
 }
 
modifiedtests/src/eth/abi/nonFungible.jsondiffbeforeafterboth
--- 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",
modifiedtests/src/eth/abi/reFungible.jsondiffbeforeafterboth
--- 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",
modifiedtests/src/eth/abi/reFungibleToken.jsondiffbeforeafterboth
--- 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" },
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
536}536}
537537
538/// @title Unique extensions for ERC721.538/// @title Unique extensions for ERC721.
539/// @dev the ERC-165 identifier for this interface is 0x0e48fdb4539/// @dev the ERC-165 identifier for this interface is 0x16de3152
540interface ERC721UniqueExtensions is Dummy, ERC165 {540interface ERC721UniqueExtensions is Dummy, ERC165 {
541 /// @notice A descriptive name for a collection of NFTs in this contract541 /// @notice A descriptive name for a collection of NFTs in this contract
542 /// @dev EVM selector for this function is: 0x06fdde03,542 /// @dev EVM selector for this function is: 0x06fdde03,
662 /// or in textual repr: mintCross((address,uint256),(string,bytes)[])662 /// or in textual repr: mintCross((address,uint256),(string,bytes)[])
663 function mintCross(CrossAddress memory to, Property[] memory properties) external returns (uint256);663 function mintCross(CrossAddress memory to, Property[] memory properties) external returns (uint256);
664
665 /// @notice Returns collection helper contract address
666 /// @dev EVM selector for this function is: 0x1896cce6,
667 /// or in textual repr: collectionHelperAddress()
668 function collectionHelperAddress() external view returns (address);
664}669}
665670
666/// @dev anonymous struct671/// @dev anonymous struct
703708
704/// @title ERC-721 Non-Fungible Token Standard709/// @title ERC-721 Non-Fungible Token Standard
705/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md710/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
706/// @dev the ERC-165 identifier for this interface is 0x983a942b711/// @dev the ERC-165 identifier for this interface is 0x80ac58cd
707interface ERC721 is Dummy, ERC165, ERC721Events {712interface ERC721 is Dummy, ERC165, ERC721Events {
708 /// @notice Count all NFTs assigned to an owner713 /// @notice Count all NFTs assigned to an owner
709 /// @dev NFTs assigned to the zero address are considered invalid, and this714 /// @dev NFTs assigned to the zero address are considered invalid, and this
787 /// or in textual repr: isApprovedForAll(address,address)792 /// or in textual repr: isApprovedForAll(address,address)
788 function isApprovedForAll(address owner, address operator) external view returns (bool);793 function isApprovedForAll(address owner, address operator) external view returns (bool);
789
790 /// @notice Returns collection helper contract address
791 /// @dev EVM selector for this function is: 0x1896cce6,
792 /// or in textual repr: collectionHelperAddress()
793 function collectionHelperAddress() external view returns (address);
794}794}
795795
796interface UniqueNFT is796interface UniqueNFT is