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]
after · 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": "collectionNestingRestrictedCollectionIds",212    "outputs": [213      {214        "components": [215          { "internalType": "bool", "name": "field_0", "type": "bool" },216          {217            "internalType": "uint256[]",218            "name": "field_1",219            "type": "uint256[]"220          }221        ],222        "internalType": "struct Tuple21",223        "name": "",224        "type": "tuple"225      }226    ],227    "stateMutability": "view",228    "type": "function"229  },230  {231    "inputs": [],232    "name": "collectionOwner",233    "outputs": [234      {235        "components": [236          { "internalType": "address", "name": "eth", "type": "address" },237          { "internalType": "uint256", "name": "sub", "type": "uint256" }238        ],239        "internalType": "struct EthCrossAccount",240        "name": "",241        "type": "tuple"242      }243    ],244    "stateMutability": "view",245    "type": "function"246  },247  {248    "inputs": [249      { "internalType": "string[]", "name": "keys", "type": "string[]" }250    ],251    "name": "collectionProperties",252    "outputs": [253      {254        "components": [255          { "internalType": "string", "name": "key", "type": "string" },256          { "internalType": "bytes", "name": "value", "type": "bytes" }257        ],258        "internalType": "struct Property[]",259        "name": "",260        "type": "tuple[]"261      }262    ],263    "stateMutability": "view",264    "type": "function"265  },266  {267    "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],268    "name": "collectionProperty",269    "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],270    "stateMutability": "view",271    "type": "function"272  },273  {274    "inputs": [],275    "name": "collectionSponsor",276    "outputs": [277      {278        "components": [279          { "internalType": "address", "name": "field_0", "type": "address" },280          { "internalType": "uint256", "name": "field_1", "type": "uint256" }281        ],282        "internalType": "struct Tuple8",283        "name": "",284        "type": "tuple"285      }286    ],287    "stateMutability": "view",288    "type": "function"289  },290  {291    "inputs": [],292    "name": "confirmCollectionSponsorship",293    "outputs": [],294    "stateMutability": "nonpayable",295    "type": "function"296  },297  {298    "inputs": [],299    "name": "contractAddress",300    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],301    "stateMutability": "view",302    "type": "function"303  },304  {305    "inputs": [],306    "name": "decimals",307    "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }],308    "stateMutability": "view",309    "type": "function"310  },311  {312    "inputs": [313      { "internalType": "string[]", "name": "keys", "type": "string[]" }314    ],315    "name": "deleteCollectionProperties",316    "outputs": [],317    "stateMutability": "nonpayable",318    "type": "function"319  },320  {321    "inputs": [],322    "name": "description",323    "outputs": [{ "internalType": "string", "name": "", "type": "string" }],324    "stateMutability": "view",325    "type": "function"326  },327  {328    "inputs": [],329    "name": "hasCollectionPendingSponsor",330    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],331    "stateMutability": "view",332    "type": "function"333  },334  {335    "inputs": [336      {337        "components": [338          { "internalType": "address", "name": "eth", "type": "address" },339          { "internalType": "uint256", "name": "sub", "type": "uint256" }340        ],341        "internalType": "struct EthCrossAccount",342        "name": "user",343        "type": "tuple"344      }345    ],346    "name": "isOwnerOrAdminCross",347    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],348    "stateMutability": "view",349    "type": "function"350  },351  {352    "inputs": [353      { "internalType": "address", "name": "to", "type": "address" },354      { "internalType": "uint256", "name": "amount", "type": "uint256" }355    ],356    "name": "mint",357    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],358    "stateMutability": "nonpayable",359    "type": "function"360  },361  {362    "inputs": [363      {364        "components": [365          { "internalType": "address", "name": "field_0", "type": "address" },366          { "internalType": "uint256", "name": "field_1", "type": "uint256" }367        ],368        "internalType": "struct Tuple8[]",369        "name": "amounts",370        "type": "tuple[]"371      }372    ],373    "name": "mintBulk",374    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],375    "stateMutability": "nonpayable",376    "type": "function"377  },378  {379    "inputs": [],380    "name": "name",381    "outputs": [{ "internalType": "string", "name": "", "type": "string" }],382    "stateMutability": "view",383    "type": "function"384  },385  {386    "inputs": [387      {388        "components": [389          { "internalType": "address", "name": "eth", "type": "address" },390          { "internalType": "uint256", "name": "sub", "type": "uint256" }391        ],392        "internalType": "struct EthCrossAccount",393        "name": "admin",394        "type": "tuple"395      }396    ],397    "name": "removeCollectionAdminCross",398    "outputs": [],399    "stateMutability": "nonpayable",400    "type": "function"401  },402  {403    "inputs": [],404    "name": "removeCollectionSponsor",405    "outputs": [],406    "stateMutability": "nonpayable",407    "type": "function"408  },409  {410    "inputs": [411      {412        "components": [413          { "internalType": "address", "name": "eth", "type": "address" },414          { "internalType": "uint256", "name": "sub", "type": "uint256" }415        ],416        "internalType": "struct EthCrossAccount",417        "name": "user",418        "type": "tuple"419      }420    ],421    "name": "removeFromCollectionAllowListCross",422    "outputs": [],423    "stateMutability": "nonpayable",424    "type": "function"425  },426  {427    "inputs": [{ "internalType": "uint8", "name": "mode", "type": "uint8" }],428    "name": "setCollectionAccess",429    "outputs": [],430    "stateMutability": "nonpayable",431    "type": "function"432  },433  {434    "inputs": [435      { "internalType": "string", "name": "limit", "type": "string" },436      { "internalType": "uint256", "name": "value", "type": "uint256" }437    ],438    "name": "setCollectionLimit",439    "outputs": [],440    "stateMutability": "nonpayable",441    "type": "function"442  },443  {444    "inputs": [{ "internalType": "bool", "name": "mode", "type": "bool" }],445    "name": "setCollectionMintMode",446    "outputs": [],447    "stateMutability": "nonpayable",448    "type": "function"449  },450  {451    "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],452    "name": "setCollectionNesting",453    "outputs": [],454    "stateMutability": "nonpayable",455    "type": "function"456  },457  {458    "inputs": [459      { "internalType": "bool", "name": "enable", "type": "bool" },460      {461        "internalType": "address[]",462        "name": "collections",463        "type": "address[]"464      }465    ],466    "name": "setCollectionNesting",467    "outputs": [],468    "stateMutability": "nonpayable",469    "type": "function"470  },471  {472    "inputs": [473      {474        "components": [475          { "internalType": "string", "name": "key", "type": "string" },476          { "internalType": "bytes", "name": "value", "type": "bytes" }477        ],478        "internalType": "struct Property[]",479        "name": "properties",480        "type": "tuple[]"481      }482    ],483    "name": "setCollectionProperties",484    "outputs": [],485    "stateMutability": "nonpayable",486    "type": "function"487  },488  {489    "inputs": [490      {491        "components": [492          { "internalType": "address", "name": "eth", "type": "address" },493          { "internalType": "uint256", "name": "sub", "type": "uint256" }494        ],495        "internalType": "struct EthCrossAccount",496        "name": "sponsor",497        "type": "tuple"498      }499    ],500    "name": "setCollectionSponsorCross",501    "outputs": [],502    "stateMutability": "nonpayable",503    "type": "function"504  },505  {506    "inputs": [507      { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }508    ],509    "name": "supportsInterface",510    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],511    "stateMutability": "view",512    "type": "function"513  },514  {515    "inputs": [],516    "name": "symbol",517    "outputs": [{ "internalType": "string", "name": "", "type": "string" }],518    "stateMutability": "view",519    "type": "function"520  },521  {522    "inputs": [],523    "name": "totalSupply",524    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],525    "stateMutability": "view",526    "type": "function"527  },528  {529    "inputs": [530      { "internalType": "address", "name": "to", "type": "address" },531      { "internalType": "uint256", "name": "amount", "type": "uint256" }532    ],533    "name": "transfer",534    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],535    "stateMutability": "nonpayable",536    "type": "function"537  },538  {539    "inputs": [540      {541        "components": [542          { "internalType": "address", "name": "eth", "type": "address" },543          { "internalType": "uint256", "name": "sub", "type": "uint256" }544        ],545        "internalType": "struct EthCrossAccount",546        "name": "to",547        "type": "tuple"548      },549      { "internalType": "uint256", "name": "amount", "type": "uint256" }550    ],551    "name": "transferCross",552    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],553    "stateMutability": "nonpayable",554    "type": "function"555  },556  {557    "inputs": [558      { "internalType": "address", "name": "from", "type": "address" },559      { "internalType": "address", "name": "to", "type": "address" },560      { "internalType": "uint256", "name": "amount", "type": "uint256" }561    ],562    "name": "transferFrom",563    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],564    "stateMutability": "nonpayable",565    "type": "function"566  },567  {568    "inputs": [569      {570        "components": [571          { "internalType": "address", "name": "eth", "type": "address" },572          { "internalType": "uint256", "name": "sub", "type": "uint256" }573        ],574        "internalType": "struct EthCrossAccount",575        "name": "from",576        "type": "tuple"577      },578      {579        "components": [580          { "internalType": "address", "name": "eth", "type": "address" },581          { "internalType": "uint256", "name": "sub", "type": "uint256" }582        ],583        "internalType": "struct EthCrossAccount",584        "name": "to",585        "type": "tuple"586      },587      { "internalType": "uint256", "name": "amount", "type": "uint256" }588    ],589    "name": "transferFromCross",590    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],591    "stateMutability": "nonpayable",592    "type": "function"593  },594  {595    "inputs": [],596    "name": "uniqueCollectionType",597    "outputs": [{ "internalType": "string", "name": "", "type": "string" }],598    "stateMutability": "view",599    "type": "function"600  }601]
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);