git.delta.rocks / unique-network / refs/commits / 5223dbed88c4

difftreelog

added `collectionNestingRestrictedCollectionIds()` function in `Collection` interface.

PraetorP2022-12-02parent: #46e50c0.patch.diff
in: master

14 files changed

modifiedpallets/common/src/erc.rsdiffbeforeafterboth
--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -493,6 +493,21 @@
 		<Pallet<T>>::update_permissions(&caller, self, permissions).map_err(dispatch_to_evm::<T>)
 	}
 
+	/// Returns nesting for a collection
+	#[solidity(rename_selector = "collectionNestingRestrictedCollectionIds")]
+	fn collection_nesting_restricted_ids(&self) -> Result<(bool, Vec<uint256>)> {
+		let nesting = self.collection.permissions.nesting();
+
+		Ok((
+			nesting.token_owner,
+			nesting
+				.restricted
+				.clone()
+				.map(|b| b.0.into_inner().iter().map(|id| id.0.into()).collect())
+				.unwrap_or_default(),
+		))
+	}
+
 	/// Set the collection access method.
 	/// @param mode Access mode
 	/// 	0 for Normal
modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth
--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -18,7 +18,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0xcc1d80ca
+/// @dev the ERC-165 identifier for this interface is 0xeecfdb34
 contract Collection is Dummy, ERC165 {
 	// /// Set collection property.
 	// ///
@@ -254,6 +254,15 @@
 		dummy = 0;
 	}
 
+	/// Returns nesting for a collection
+	/// @dev EVM selector for this function is: 0x22d25bfe,
+	///  or in textual repr: collectionNestingRestrictedCollectionIds()
+	function collectionNestingRestrictedCollectionIds() public view returns (Tuple21 memory) {
+		require(false, stub_error);
+		dummy;
+		return Tuple21(false, new uint256[](0));
+	}
+
 	/// Set the collection access method.
 	/// @param mode Access mode
 	/// 	0 for Normal
@@ -425,6 +434,12 @@
 	uint256 sub;
 }
 
+/// @dev anonymous struct
+struct Tuple21 {
+	bool field_0;
+	uint256[] field_1;
+}
+
 /// @dev Property struct
 struct Property {
 	string key;
modifiedpallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth
--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -119,7 +119,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0xcc1d80ca
+/// @dev the ERC-165 identifier for this interface is 0xeecfdb34
 contract Collection is Dummy, ERC165 {
 	// /// Set collection property.
 	// ///
@@ -355,6 +355,15 @@
 		dummy = 0;
 	}
 
+	/// Returns nesting for a collection
+	/// @dev EVM selector for this function is: 0x22d25bfe,
+	///  or in textual repr: collectionNestingRestrictedCollectionIds()
+	function collectionNestingRestrictedCollectionIds() public view returns (Tuple34 memory) {
+		require(false, stub_error);
+		dummy;
+		return Tuple34(false, new uint256[](0));
+	}
+
 	/// Set the collection access method.
 	/// @param mode Access mode
 	/// 	0 for Normal
@@ -527,6 +536,12 @@
 }
 
 /// @dev anonymous struct
+struct Tuple34 {
+	bool field_0;
+	uint256[] field_1;
+}
+
+/// @dev anonymous struct
 struct Tuple30 {
 	address field_0;
 	uint256 field_1;
modifiedpallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth
--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -119,7 +119,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0xcc1d80ca
+/// @dev the ERC-165 identifier for this interface is 0xeecfdb34
 contract Collection is Dummy, ERC165 {
 	// /// Set collection property.
 	// ///
@@ -355,6 +355,15 @@
 		dummy = 0;
 	}
 
+	/// Returns nesting for a collection
+	/// @dev EVM selector for this function is: 0x22d25bfe,
+	///  or in textual repr: collectionNestingRestrictedCollectionIds()
+	function collectionNestingRestrictedCollectionIds() public view returns (Tuple33 memory) {
+		require(false, stub_error);
+		dummy;
+		return Tuple33(false, new uint256[](0));
+	}
+
 	/// Set the collection access method.
 	/// @param mode Access mode
 	/// 	0 for Normal
@@ -527,6 +536,12 @@
 }
 
 /// @dev anonymous struct
+struct Tuple33 {
+	bool field_0;
+	uint256[] field_1;
+}
+
+/// @dev anonymous struct
 struct Tuple29 {
 	address field_0;
 	uint256 field_1;
modifiedpallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterboth

binary blob — no preview

modifiedtests/src/eth/abi/fungible.jsondiffbeforeafterboth
before · tests/src/eth/abi/fungible.json
1[2  {3    "anonymous": false,4    "inputs": [5      {6        "indexed": true,7        "internalType": "address",8        "name": "owner",9        "type": "address"10      },11      {12        "indexed": true,13        "internalType": "address",14        "name": "spender",15        "type": "address"16      },17      {18        "indexed": false,19        "internalType": "uint256",20        "name": "value",21        "type": "uint256"22      }23    ],24    "name": "Approval",25    "type": "event"26  },27  {28    "anonymous": false,29    "inputs": [30      {31        "indexed": true,32        "internalType": "address",33        "name": "from",34        "type": "address"35      },36      {37        "indexed": true,38        "internalType": "address",39        "name": "to",40        "type": "address"41      },42      {43        "indexed": false,44        "internalType": "uint256",45        "name": "value",46        "type": "uint256"47      }48    ],49    "name": "Transfer",50    "type": "event"51  },52  {53    "inputs": [54      {55        "components": [56          { "internalType": "address", "name": "eth", "type": "address" },57          { "internalType": "uint256", "name": "sub", "type": "uint256" }58        ],59        "internalType": "struct EthCrossAccount",60        "name": "newAdmin",61        "type": "tuple"62      }63    ],64    "name": "addCollectionAdminCross",65    "outputs": [],66    "stateMutability": "nonpayable",67    "type": "function"68  },69  {70    "inputs": [71      {72        "components": [73          { "internalType": "address", "name": "eth", "type": "address" },74          { "internalType": "uint256", "name": "sub", "type": "uint256" }75        ],76        "internalType": "struct EthCrossAccount",77        "name": "user",78        "type": "tuple"79      }80    ],81    "name": "addToCollectionAllowListCross",82    "outputs": [],83    "stateMutability": "nonpayable",84    "type": "function"85  },86  {87    "inputs": [88      { "internalType": "address", "name": "owner", "type": "address" },89      { "internalType": "address", "name": "spender", "type": "address" }90    ],91    "name": "allowance",92    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],93    "stateMutability": "view",94    "type": "function"95  },96  {97    "inputs": [98      {99        "components": [100          { "internalType": "address", "name": "eth", "type": "address" },101          { "internalType": "uint256", "name": "sub", "type": "uint256" }102        ],103        "internalType": "struct EthCrossAccount",104        "name": "user",105        "type": "tuple"106      }107    ],108    "name": "allowlistedCross",109    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],110    "stateMutability": "view",111    "type": "function"112  },113  {114    "inputs": [115      { "internalType": "address", "name": "spender", "type": "address" },116      { "internalType": "uint256", "name": "amount", "type": "uint256" }117    ],118    "name": "approve",119    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],120    "stateMutability": "nonpayable",121    "type": "function"122  },123  {124    "inputs": [125      {126        "components": [127          { "internalType": "address", "name": "eth", "type": "address" },128          { "internalType": "uint256", "name": "sub", "type": "uint256" }129        ],130        "internalType": "struct EthCrossAccount",131        "name": "spender",132        "type": "tuple"133      },134      { "internalType": "uint256", "name": "amount", "type": "uint256" }135    ],136    "name": "approveCross",137    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],138    "stateMutability": "nonpayable",139    "type": "function"140  },141  {142    "inputs": [143      { "internalType": "address", "name": "owner", "type": "address" }144    ],145    "name": "balanceOf",146    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],147    "stateMutability": "view",148    "type": "function"149  },150  {151    "inputs": [152      {153        "components": [154          { "internalType": "address", "name": "eth", "type": "address" },155          { "internalType": "uint256", "name": "sub", "type": "uint256" }156        ],157        "internalType": "struct EthCrossAccount",158        "name": "from",159        "type": "tuple"160      },161      { "internalType": "uint256", "name": "amount", "type": "uint256" }162    ],163    "name": "burnFromCross",164    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],165    "stateMutability": "nonpayable",166    "type": "function"167  },168  {169    "inputs": [170      {171        "components": [172          { "internalType": "address", "name": "eth", "type": "address" },173          { "internalType": "uint256", "name": "sub", "type": "uint256" }174        ],175        "internalType": "struct EthCrossAccount",176        "name": "newOwner",177        "type": "tuple"178      }179    ],180    "name": "changeCollectionOwnerCross",181    "outputs": [],182    "stateMutability": "nonpayable",183    "type": "function"184  },185  {186    "inputs": [],187    "name": "collectionAdmins",188    "outputs": [189      {190        "components": [191          { "internalType": "address", "name": "eth", "type": "address" },192          { "internalType": "uint256", "name": "sub", "type": "uint256" }193        ],194        "internalType": "struct EthCrossAccount[]",195        "name": "",196        "type": "tuple[]"197      }198    ],199    "stateMutability": "view",200    "type": "function"201  },202  {203    "inputs": [],204    "name": "collectionHelperAddress",205    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],206    "stateMutability": "view",207    "type": "function"208  },209  {210    "inputs": [],211    "name": "collectionOwner",212    "outputs": [213      {214        "components": [215          { "internalType": "address", "name": "eth", "type": "address" },216          { "internalType": "uint256", "name": "sub", "type": "uint256" }217        ],218        "internalType": "struct EthCrossAccount",219        "name": "",220        "type": "tuple"221      }222    ],223    "stateMutability": "view",224    "type": "function"225  },226  {227    "inputs": [228      { "internalType": "string[]", "name": "keys", "type": "string[]" }229    ],230    "name": "collectionProperties",231    "outputs": [232      {233        "components": [234          { "internalType": "string", "name": "key", "type": "string" },235          { "internalType": "bytes", "name": "value", "type": "bytes" }236        ],237        "internalType": "struct Property[]",238        "name": "",239        "type": "tuple[]"240      }241    ],242    "stateMutability": "view",243    "type": "function"244  },245  {246    "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],247    "name": "collectionProperty",248    "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],249    "stateMutability": "view",250    "type": "function"251  },252  {253    "inputs": [],254    "name": "collectionSponsor",255    "outputs": [256      {257        "components": [258          { "internalType": "address", "name": "field_0", "type": "address" },259          { "internalType": "uint256", "name": "field_1", "type": "uint256" }260        ],261        "internalType": "struct Tuple8",262        "name": "",263        "type": "tuple"264      }265    ],266    "stateMutability": "view",267    "type": "function"268  },269  {270    "inputs": [],271    "name": "confirmCollectionSponsorship",272    "outputs": [],273    "stateMutability": "nonpayable",274    "type": "function"275  },276  {277    "inputs": [],278    "name": "contractAddress",279    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],280    "stateMutability": "view",281    "type": "function"282  },283  {284    "inputs": [],285    "name": "decimals",286    "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }],287    "stateMutability": "view",288    "type": "function"289  },290  {291    "inputs": [292      { "internalType": "string[]", "name": "keys", "type": "string[]" }293    ],294    "name": "deleteCollectionProperties",295    "outputs": [],296    "stateMutability": "nonpayable",297    "type": "function"298  },299  {300    "inputs": [],301    "name": "description",302    "outputs": [{ "internalType": "string", "name": "", "type": "string" }],303    "stateMutability": "view",304    "type": "function"305  },306  {307    "inputs": [],308    "name": "hasCollectionPendingSponsor",309    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],310    "stateMutability": "view",311    "type": "function"312  },313  {314    "inputs": [315      {316        "components": [317          { "internalType": "address", "name": "eth", "type": "address" },318          { "internalType": "uint256", "name": "sub", "type": "uint256" }319        ],320        "internalType": "struct EthCrossAccount",321        "name": "user",322        "type": "tuple"323      }324    ],325    "name": "isOwnerOrAdminCross",326    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],327    "stateMutability": "view",328    "type": "function"329  },330  {331    "inputs": [332      { "internalType": "address", "name": "to", "type": "address" },333      { "internalType": "uint256", "name": "amount", "type": "uint256" }334    ],335    "name": "mint",336    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],337    "stateMutability": "nonpayable",338    "type": "function"339  },340  {341    "inputs": [342      {343        "components": [344          { "internalType": "address", "name": "field_0", "type": "address" },345          { "internalType": "uint256", "name": "field_1", "type": "uint256" }346        ],347        "internalType": "struct Tuple8[]",348        "name": "amounts",349        "type": "tuple[]"350      }351    ],352    "name": "mintBulk",353    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],354    "stateMutability": "nonpayable",355    "type": "function"356  },357  {358    "inputs": [],359    "name": "name",360    "outputs": [{ "internalType": "string", "name": "", "type": "string" }],361    "stateMutability": "view",362    "type": "function"363  },364  {365    "inputs": [366      {367        "components": [368          { "internalType": "address", "name": "eth", "type": "address" },369          { "internalType": "uint256", "name": "sub", "type": "uint256" }370        ],371        "internalType": "struct EthCrossAccount",372        "name": "admin",373        "type": "tuple"374      }375    ],376    "name": "removeCollectionAdminCross",377    "outputs": [],378    "stateMutability": "nonpayable",379    "type": "function"380  },381  {382    "inputs": [],383    "name": "removeCollectionSponsor",384    "outputs": [],385    "stateMutability": "nonpayable",386    "type": "function"387  },388  {389    "inputs": [390      {391        "components": [392          { "internalType": "address", "name": "eth", "type": "address" },393          { "internalType": "uint256", "name": "sub", "type": "uint256" }394        ],395        "internalType": "struct EthCrossAccount",396        "name": "user",397        "type": "tuple"398      }399    ],400    "name": "removeFromCollectionAllowListCross",401    "outputs": [],402    "stateMutability": "nonpayable",403    "type": "function"404  },405  {406    "inputs": [{ "internalType": "uint8", "name": "mode", "type": "uint8" }],407    "name": "setCollectionAccess",408    "outputs": [],409    "stateMutability": "nonpayable",410    "type": "function"411  },412  {413    "inputs": [414      { "internalType": "string", "name": "limit", "type": "string" },415      { "internalType": "uint256", "name": "value", "type": "uint256" }416    ],417    "name": "setCollectionLimit",418    "outputs": [],419    "stateMutability": "nonpayable",420    "type": "function"421  },422  {423    "inputs": [{ "internalType": "bool", "name": "mode", "type": "bool" }],424    "name": "setCollectionMintMode",425    "outputs": [],426    "stateMutability": "nonpayable",427    "type": "function"428  },429  {430    "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],431    "name": "setCollectionNesting",432    "outputs": [],433    "stateMutability": "nonpayable",434    "type": "function"435  },436  {437    "inputs": [438      { "internalType": "bool", "name": "enable", "type": "bool" },439      {440        "internalType": "address[]",441        "name": "collections",442        "type": "address[]"443      }444    ],445    "name": "setCollectionNesting",446    "outputs": [],447    "stateMutability": "nonpayable",448    "type": "function"449  },450  {451    "inputs": [452      {453        "components": [454          { "internalType": "string", "name": "key", "type": "string" },455          { "internalType": "bytes", "name": "value", "type": "bytes" }456        ],457        "internalType": "struct Property[]",458        "name": "properties",459        "type": "tuple[]"460      }461    ],462    "name": "setCollectionProperties",463    "outputs": [],464    "stateMutability": "nonpayable",465    "type": "function"466  },467  {468    "inputs": [469      {470        "components": [471          { "internalType": "address", "name": "eth", "type": "address" },472          { "internalType": "uint256", "name": "sub", "type": "uint256" }473        ],474        "internalType": "struct EthCrossAccount",475        "name": "sponsor",476        "type": "tuple"477      }478    ],479    "name": "setCollectionSponsorCross",480    "outputs": [],481    "stateMutability": "nonpayable",482    "type": "function"483  },484  {485    "inputs": [486      { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }487    ],488    "name": "supportsInterface",489    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],490    "stateMutability": "view",491    "type": "function"492  },493  {494    "inputs": [],495    "name": "symbol",496    "outputs": [{ "internalType": "string", "name": "", "type": "string" }],497    "stateMutability": "view",498    "type": "function"499  },500  {501    "inputs": [],502    "name": "totalSupply",503    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],504    "stateMutability": "view",505    "type": "function"506  },507  {508    "inputs": [509      { "internalType": "address", "name": "to", "type": "address" },510      { "internalType": "uint256", "name": "amount", "type": "uint256" }511    ],512    "name": "transfer",513    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],514    "stateMutability": "nonpayable",515    "type": "function"516  },517  {518    "inputs": [519      {520        "components": [521          { "internalType": "address", "name": "eth", "type": "address" },522          { "internalType": "uint256", "name": "sub", "type": "uint256" }523        ],524        "internalType": "struct EthCrossAccount",525        "name": "to",526        "type": "tuple"527      },528      { "internalType": "uint256", "name": "amount", "type": "uint256" }529    ],530    "name": "transferCross",531    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],532    "stateMutability": "nonpayable",533    "type": "function"534  },535  {536    "inputs": [537      { "internalType": "address", "name": "from", "type": "address" },538      { "internalType": "address", "name": "to", "type": "address" },539      { "internalType": "uint256", "name": "amount", "type": "uint256" }540    ],541    "name": "transferFrom",542    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],543    "stateMutability": "nonpayable",544    "type": "function"545  },546  {547    "inputs": [548      {549        "components": [550          { "internalType": "address", "name": "eth", "type": "address" },551          { "internalType": "uint256", "name": "sub", "type": "uint256" }552        ],553        "internalType": "struct EthCrossAccount",554        "name": "from",555        "type": "tuple"556      },557      {558        "components": [559          { "internalType": "address", "name": "eth", "type": "address" },560          { "internalType": "uint256", "name": "sub", "type": "uint256" }561        ],562        "internalType": "struct EthCrossAccount",563        "name": "to",564        "type": "tuple"565      },566      { "internalType": "uint256", "name": "amount", "type": "uint256" }567    ],568    "name": "transferFromCross",569    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],570    "stateMutability": "nonpayable",571    "type": "function"572  },573  {574    "inputs": [],575    "name": "uniqueCollectionType",576    "outputs": [{ "internalType": "string", "name": "", "type": "string" }],577    "stateMutability": "view",578    "type": "function"579  }580]
modifiedtests/src/eth/abi/nonFungible.jsondiffbeforeafterboth
--- a/tests/src/eth/abi/nonFungible.json
+++ b/tests/src/eth/abi/nonFungible.json
@@ -238,6 +238,27 @@
   },
   {
     "inputs": [],
+    "name": "collectionNestingRestrictedCollectionIds",
+    "outputs": [
+      {
+        "components": [
+          { "internalType": "bool", "name": "field_0", "type": "bool" },
+          {
+            "internalType": "uint256[]",
+            "name": "field_1",
+            "type": "uint256[]"
+          }
+        ],
+        "internalType": "struct Tuple34",
+        "name": "",
+        "type": "tuple"
+      }
+    ],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
+    "inputs": [],
     "name": "collectionOwner",
     "outputs": [
       {
modifiedtests/src/eth/abi/reFungible.jsondiffbeforeafterboth
--- a/tests/src/eth/abi/reFungible.json
+++ b/tests/src/eth/abi/reFungible.json
@@ -220,6 +220,27 @@
   },
   {
     "inputs": [],
+    "name": "collectionNestingRestrictedCollectionIds",
+    "outputs": [
+      {
+        "components": [
+          { "internalType": "bool", "name": "field_0", "type": "bool" },
+          {
+            "internalType": "uint256[]",
+            "name": "field_1",
+            "type": "uint256[]"
+          }
+        ],
+        "internalType": "struct Tuple33",
+        "name": "",
+        "type": "tuple"
+      }
+    ],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
+    "inputs": [],
     "name": "collectionOwner",
     "outputs": [
       {
modifiedtests/src/eth/api/UniqueFungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -13,7 +13,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0xcc1d80ca
+/// @dev the ERC-165 identifier for this interface is 0xeecfdb34
 interface Collection is Dummy, ERC165 {
 	// /// Set collection property.
 	// ///
@@ -166,6 +166,11 @@
 	///  or in textual repr: setCollectionNesting(bool,address[])
 	function setCollectionNesting(bool enable, address[] memory collections) external;
 
+	/// Returns nesting for a collection
+	/// @dev EVM selector for this function is: 0x22d25bfe,
+	///  or in textual repr: collectionNestingRestrictedCollectionIds()
+	function collectionNestingRestrictedCollectionIds() external view returns (Tuple20 memory);
+
 	/// Set the collection access method.
 	/// @param mode Access mode
 	/// 	0 for Normal
@@ -278,6 +283,12 @@
 	uint256 sub;
 }
 
+/// @dev anonymous struct
+struct Tuple20 {
+	bool field_0;
+	uint256[] field_1;
+}
+
 /// @dev Property struct
 struct Property {
 	string key;
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -80,7 +80,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0xcc1d80ca
+/// @dev the ERC-165 identifier for this interface is 0xeecfdb34
 interface Collection is Dummy, ERC165 {
 	// /// Set collection property.
 	// ///
@@ -233,6 +233,11 @@
 	///  or in textual repr: setCollectionNesting(bool,address[])
 	function setCollectionNesting(bool enable, address[] memory collections) external;
 
+	/// Returns nesting for a collection
+	/// @dev EVM selector for this function is: 0x22d25bfe,
+	///  or in textual repr: collectionNestingRestrictedCollectionIds()
+	function collectionNestingRestrictedCollectionIds() external view returns (Tuple31 memory);
+
 	/// Set the collection access method.
 	/// @param mode Access mode
 	/// 	0 for Normal
@@ -346,6 +351,12 @@
 }
 
 /// @dev anonymous struct
+struct Tuple31 {
+	bool field_0;
+	uint256[] field_1;
+}
+
+/// @dev anonymous struct
 struct Tuple27 {
 	address field_0;
 	uint256 field_1;
modifiedtests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -80,7 +80,7 @@
 }
 
 /// @title A contract that allows you to work with collections.
-/// @dev the ERC-165 identifier for this interface is 0xcc1d80ca
+/// @dev the ERC-165 identifier for this interface is 0xeecfdb34
 interface Collection is Dummy, ERC165 {
 	// /// Set collection property.
 	// ///
@@ -233,6 +233,11 @@
 	///  or in textual repr: setCollectionNesting(bool,address[])
 	function setCollectionNesting(bool enable, address[] memory collections) external;
 
+	/// Returns nesting for a collection
+	/// @dev EVM selector for this function is: 0x22d25bfe,
+	///  or in textual repr: collectionNestingRestrictedCollectionIds()
+	function collectionNestingRestrictedCollectionIds() external view returns (Tuple30 memory);
+
 	/// Set the collection access method.
 	/// @param mode Access mode
 	/// 	0 for Normal
@@ -346,6 +351,12 @@
 }
 
 /// @dev anonymous struct
+struct Tuple30 {
+	bool field_0;
+	uint256[] field_1;
+}
+
+/// @dev anonymous struct
 struct Tuple26 {
 	address field_0;
 	uint256 field_1;
modifiedtests/src/eth/nesting/nest.test.tsdiffbeforeafterboth
--- a/tests/src/eth/nesting/nest.test.ts
+++ b/tests/src/eth/nesting/nest.test.ts
@@ -51,7 +51,20 @@
       await contract.methods.transferFrom(targetNftTokenAddress, owner, secondTokenId).send({from: owner});
       expect(await contract.methods.ownerOf(secondTokenId).call()).to.be.equal(owner);
     });
-
+    
+    itEth('NFT: collectionNestingRestrictedCollectionIds()', async ({helper}) => {
+      const owner = await helper.eth.createAccountWithBalance(donor);
+      const {collectionId: unnestedCollsectionId, collectionAddress: unnsetedCollectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C');
+      const unnestedContract = helper.ethNativeContract.collection(unnsetedCollectionAddress, 'nft', owner);
+      expect(await unnestedContract.methods.collectionNestingRestrictedCollectionIds().call({from: owner})).to.be.like([false, []]);
+      
+      const {contract} = await createNestingCollection(helper, owner);
+      expect(await contract.methods.collectionNestingRestrictedCollectionIds().call({from: owner})).to.be.like([true, []]);
+      await contract.methods.setCollectionNesting(true, [unnsetedCollectionAddress]).send({from: owner});
+      expect(await contract.methods.collectionNestingRestrictedCollectionIds().call({from: owner})).to.be.like([true, [unnestedCollsectionId.toString()]]);
+      
+    });
+    
     itEth('NFT: allows an Owner to nest/unnest their token (Restricted nesting)', async ({helper}) => {
       const owner = await helper.eth.createAccountWithBalance(donor);