difftreelog
added `collectionNestingRestrictedCollectionIds()` function in `Collection` interface.
in: master
14 files changed
pallets/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
pallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/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;
pallets/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;
pallets/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;
pallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterbothbinary blob — no preview
tests/src/eth/abi/fungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/fungible.json
+++ b/tests/src/eth/abi/fungible.json
@@ -208,6 +208,27 @@
},
{
"inputs": [],
+ "name": "collectionNestingRestrictedCollectionIds",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "bool", "name": "field_0", "type": "bool" },
+ {
+ "internalType": "uint256[]",
+ "name": "field_1",
+ "type": "uint256[]"
+ }
+ ],
+ "internalType": "struct Tuple21",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
"name": "collectionOwner",
"outputs": [
{
tests/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": [
{
tests/src/eth/abi/reFungible.jsondiffbeforeafterboth1[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": "approved",15 "type": "address"16 },17 {18 "indexed": true,19 "internalType": "uint256",20 "name": "tokenId",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": "owner",34 "type": "address"35 },36 {37 "indexed": true,38 "internalType": "address",39 "name": "operator",40 "type": "address"41 },42 {43 "indexed": false,44 "internalType": "bool",45 "name": "approved",46 "type": "bool"47 }48 ],49 "name": "ApprovalForAll",50 "type": "event"51 },52 {53 "anonymous": false,54 "inputs": [],55 "name": "MintingFinished",56 "type": "event"57 },58 {59 "anonymous": false,60 "inputs": [61 {62 "indexed": true,63 "internalType": "address",64 "name": "from",65 "type": "address"66 },67 {68 "indexed": true,69 "internalType": "address",70 "name": "to",71 "type": "address"72 },73 {74 "indexed": true,75 "internalType": "uint256",76 "name": "tokenId",77 "type": "uint256"78 }79 ],80 "name": "Transfer",81 "type": "event"82 },83 {84 "inputs": [85 {86 "components": [87 { "internalType": "address", "name": "eth", "type": "address" },88 { "internalType": "uint256", "name": "sub", "type": "uint256" }89 ],90 "internalType": "struct EthCrossAccount",91 "name": "newAdmin",92 "type": "tuple"93 }94 ],95 "name": "addCollectionAdminCross",96 "outputs": [],97 "stateMutability": "nonpayable",98 "type": "function"99 },100 {101 "inputs": [102 {103 "components": [104 { "internalType": "address", "name": "eth", "type": "address" },105 { "internalType": "uint256", "name": "sub", "type": "uint256" }106 ],107 "internalType": "struct EthCrossAccount",108 "name": "user",109 "type": "tuple"110 }111 ],112 "name": "addToCollectionAllowListCross",113 "outputs": [],114 "stateMutability": "nonpayable",115 "type": "function"116 },117 {118 "inputs": [119 {120 "components": [121 { "internalType": "address", "name": "eth", "type": "address" },122 { "internalType": "uint256", "name": "sub", "type": "uint256" }123 ],124 "internalType": "struct EthCrossAccount",125 "name": "user",126 "type": "tuple"127 }128 ],129 "name": "allowlistedCross",130 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],131 "stateMutability": "view",132 "type": "function"133 },134 {135 "inputs": [136 { "internalType": "address", "name": "approved", "type": "address" },137 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }138 ],139 "name": "approve",140 "outputs": [],141 "stateMutability": "nonpayable",142 "type": "function"143 },144 {145 "inputs": [146 { "internalType": "address", "name": "owner", "type": "address" }147 ],148 "name": "balanceOf",149 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],150 "stateMutability": "view",151 "type": "function"152 },153 {154 "inputs": [155 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }156 ],157 "name": "burn",158 "outputs": [],159 "stateMutability": "nonpayable",160 "type": "function"161 },162 {163 "inputs": [164 {165 "components": [166 { "internalType": "address", "name": "eth", "type": "address" },167 { "internalType": "uint256", "name": "sub", "type": "uint256" }168 ],169 "internalType": "struct EthCrossAccount",170 "name": "from",171 "type": "tuple"172 },173 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }174 ],175 "name": "burnFromCross",176 "outputs": [],177 "stateMutability": "nonpayable",178 "type": "function"179 },180 {181 "inputs": [182 {183 "components": [184 { "internalType": "address", "name": "eth", "type": "address" },185 { "internalType": "uint256", "name": "sub", "type": "uint256" }186 ],187 "internalType": "struct EthCrossAccount",188 "name": "newOwner",189 "type": "tuple"190 }191 ],192 "name": "changeCollectionOwnerCross",193 "outputs": [],194 "stateMutability": "nonpayable",195 "type": "function"196 },197 {198 "inputs": [],199 "name": "collectionAdmins",200 "outputs": [201 {202 "components": [203 { "internalType": "address", "name": "eth", "type": "address" },204 { "internalType": "uint256", "name": "sub", "type": "uint256" }205 ],206 "internalType": "struct EthCrossAccount[]",207 "name": "",208 "type": "tuple[]"209 }210 ],211 "stateMutability": "view",212 "type": "function"213 },214 {215 "inputs": [],216 "name": "collectionHelperAddress",217 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],218 "stateMutability": "view",219 "type": "function"220 },221 {222 "inputs": [],223 "name": "collectionOwner",224 "outputs": [225 {226 "components": [227 { "internalType": "address", "name": "eth", "type": "address" },228 { "internalType": "uint256", "name": "sub", "type": "uint256" }229 ],230 "internalType": "struct EthCrossAccount",231 "name": "",232 "type": "tuple"233 }234 ],235 "stateMutability": "view",236 "type": "function"237 },238 {239 "inputs": [240 { "internalType": "string[]", "name": "keys", "type": "string[]" }241 ],242 "name": "collectionProperties",243 "outputs": [244 {245 "components": [246 { "internalType": "string", "name": "key", "type": "string" },247 { "internalType": "bytes", "name": "value", "type": "bytes" }248 ],249 "internalType": "struct Property[]",250 "name": "",251 "type": "tuple[]"252 }253 ],254 "stateMutability": "view",255 "type": "function"256 },257 {258 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],259 "name": "collectionProperty",260 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],261 "stateMutability": "view",262 "type": "function"263 },264 {265 "inputs": [],266 "name": "collectionSponsor",267 "outputs": [268 {269 "components": [270 { "internalType": "address", "name": "field_0", "type": "address" },271 { "internalType": "uint256", "name": "field_1", "type": "uint256" }272 ],273 "internalType": "struct Tuple29",274 "name": "",275 "type": "tuple"276 }277 ],278 "stateMutability": "view",279 "type": "function"280 },281 {282 "inputs": [],283 "name": "confirmCollectionSponsorship",284 "outputs": [],285 "stateMutability": "nonpayable",286 "type": "function"287 },288 {289 "inputs": [],290 "name": "contractAddress",291 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],292 "stateMutability": "view",293 "type": "function"294 },295 {296 "inputs": [297 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }298 ],299 "name": "crossOwnerOf",300 "outputs": [301 {302 "components": [303 { "internalType": "address", "name": "eth", "type": "address" },304 { "internalType": "uint256", "name": "sub", "type": "uint256" }305 ],306 "internalType": "struct EthCrossAccount",307 "name": "",308 "type": "tuple"309 }310 ],311 "stateMutability": "view",312 "type": "function"313 },314 {315 "inputs": [316 { "internalType": "string[]", "name": "keys", "type": "string[]" }317 ],318 "name": "deleteCollectionProperties",319 "outputs": [],320 "stateMutability": "nonpayable",321 "type": "function"322 },323 {324 "inputs": [325 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },326 { "internalType": "string[]", "name": "keys", "type": "string[]" }327 ],328 "name": "deleteProperties",329 "outputs": [],330 "stateMutability": "nonpayable",331 "type": "function"332 },333 {334 "inputs": [],335 "name": "description",336 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],337 "stateMutability": "view",338 "type": "function"339 },340 {341 "inputs": [],342 "name": "finishMinting",343 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],344 "stateMutability": "nonpayable",345 "type": "function"346 },347 {348 "inputs": [349 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }350 ],351 "name": "getApproved",352 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],353 "stateMutability": "view",354 "type": "function"355 },356 {357 "inputs": [],358 "name": "hasCollectionPendingSponsor",359 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],360 "stateMutability": "view",361 "type": "function"362 },363 {364 "inputs": [365 { "internalType": "address", "name": "owner", "type": "address" },366 { "internalType": "address", "name": "operator", "type": "address" }367 ],368 "name": "isApprovedForAll",369 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],370 "stateMutability": "view",371 "type": "function"372 },373 {374 "inputs": [375 {376 "components": [377 { "internalType": "address", "name": "eth", "type": "address" },378 { "internalType": "uint256", "name": "sub", "type": "uint256" }379 ],380 "internalType": "struct EthCrossAccount",381 "name": "user",382 "type": "tuple"383 }384 ],385 "name": "isOwnerOrAdminCross",386 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],387 "stateMutability": "view",388 "type": "function"389 },390 {391 "inputs": [{ "internalType": "address", "name": "to", "type": "address" }],392 "name": "mint",393 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],394 "stateMutability": "nonpayable",395 "type": "function"396 },397 {398 "inputs": [399 { "internalType": "address", "name": "to", "type": "address" },400 { "internalType": "string", "name": "tokenUri", "type": "string" }401 ],402 "name": "mintWithTokenURI",403 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],404 "stateMutability": "nonpayable",405 "type": "function"406 },407 {408 "inputs": [],409 "name": "mintingFinished",410 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],411 "stateMutability": "view",412 "type": "function"413 },414 {415 "inputs": [],416 "name": "name",417 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],418 "stateMutability": "view",419 "type": "function"420 },421 {422 "inputs": [],423 "name": "nextTokenId",424 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],425 "stateMutability": "view",426 "type": "function"427 },428 {429 "inputs": [430 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }431 ],432 "name": "ownerOf",433 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],434 "stateMutability": "view",435 "type": "function"436 },437 {438 "inputs": [439 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },440 { "internalType": "string[]", "name": "keys", "type": "string[]" }441 ],442 "name": "properties",443 "outputs": [444 {445 "components": [446 { "internalType": "string", "name": "key", "type": "string" },447 { "internalType": "bytes", "name": "value", "type": "bytes" }448 ],449 "internalType": "struct Property[]",450 "name": "",451 "type": "tuple[]"452 }453 ],454 "stateMutability": "view",455 "type": "function"456 },457 {458 "inputs": [459 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },460 { "internalType": "string", "name": "key", "type": "string" }461 ],462 "name": "property",463 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],464 "stateMutability": "view",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": "admin",476 "type": "tuple"477 }478 ],479 "name": "removeCollectionAdminCross",480 "outputs": [],481 "stateMutability": "nonpayable",482 "type": "function"483 },484 {485 "inputs": [],486 "name": "removeCollectionSponsor",487 "outputs": [],488 "stateMutability": "nonpayable",489 "type": "function"490 },491 {492 "inputs": [493 {494 "components": [495 { "internalType": "address", "name": "eth", "type": "address" },496 { "internalType": "uint256", "name": "sub", "type": "uint256" }497 ],498 "internalType": "struct EthCrossAccount",499 "name": "user",500 "type": "tuple"501 }502 ],503 "name": "removeFromCollectionAllowListCross",504 "outputs": [],505 "stateMutability": "nonpayable",506 "type": "function"507 },508 {509 "inputs": [510 { "internalType": "address", "name": "from", "type": "address" },511 { "internalType": "address", "name": "to", "type": "address" },512 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }513 ],514 "name": "safeTransferFrom",515 "outputs": [],516 "stateMutability": "nonpayable",517 "type": "function"518 },519 {520 "inputs": [521 { "internalType": "address", "name": "from", "type": "address" },522 { "internalType": "address", "name": "to", "type": "address" },523 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },524 { "internalType": "bytes", "name": "data", "type": "bytes" }525 ],526 "name": "safeTransferFromWithData",527 "outputs": [],528 "stateMutability": "nonpayable",529 "type": "function"530 },531 {532 "inputs": [533 { "internalType": "address", "name": "operator", "type": "address" },534 { "internalType": "bool", "name": "approved", "type": "bool" }535 ],536 "name": "setApprovalForAll",537 "outputs": [],538 "stateMutability": "nonpayable",539 "type": "function"540 },541 {542 "inputs": [{ "internalType": "uint8", "name": "mode", "type": "uint8" }],543 "name": "setCollectionAccess",544 "outputs": [],545 "stateMutability": "nonpayable",546 "type": "function"547 },548 {549 "inputs": [550 { "internalType": "string", "name": "limit", "type": "string" },551 { "internalType": "uint256", "name": "value", "type": "uint256" }552 ],553 "name": "setCollectionLimit",554 "outputs": [],555 "stateMutability": "nonpayable",556 "type": "function"557 },558 {559 "inputs": [{ "internalType": "bool", "name": "mode", "type": "bool" }],560 "name": "setCollectionMintMode",561 "outputs": [],562 "stateMutability": "nonpayable",563 "type": "function"564 },565 {566 "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],567 "name": "setCollectionNesting",568 "outputs": [],569 "stateMutability": "nonpayable",570 "type": "function"571 },572 {573 "inputs": [574 { "internalType": "bool", "name": "enable", "type": "bool" },575 {576 "internalType": "address[]",577 "name": "collections",578 "type": "address[]"579 }580 ],581 "name": "setCollectionNesting",582 "outputs": [],583 "stateMutability": "nonpayable",584 "type": "function"585 },586 {587 "inputs": [588 {589 "components": [590 { "internalType": "string", "name": "key", "type": "string" },591 { "internalType": "bytes", "name": "value", "type": "bytes" }592 ],593 "internalType": "struct Property[]",594 "name": "properties",595 "type": "tuple[]"596 }597 ],598 "name": "setCollectionProperties",599 "outputs": [],600 "stateMutability": "nonpayable",601 "type": "function"602 },603 {604 "inputs": [605 {606 "components": [607 { "internalType": "address", "name": "eth", "type": "address" },608 { "internalType": "uint256", "name": "sub", "type": "uint256" }609 ],610 "internalType": "struct EthCrossAccount",611 "name": "sponsor",612 "type": "tuple"613 }614 ],615 "name": "setCollectionSponsorCross",616 "outputs": [],617 "stateMutability": "nonpayable",618 "type": "function"619 },620 {621 "inputs": [622 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },623 {624 "components": [625 { "internalType": "string", "name": "key", "type": "string" },626 { "internalType": "bytes", "name": "value", "type": "bytes" }627 ],628 "internalType": "struct Property[]",629 "name": "properties",630 "type": "tuple[]"631 }632 ],633 "name": "setProperties",634 "outputs": [],635 "stateMutability": "nonpayable",636 "type": "function"637 },638 {639 "inputs": [640 { "internalType": "string", "name": "key", "type": "string" },641 { "internalType": "bool", "name": "isMutable", "type": "bool" },642 { "internalType": "bool", "name": "collectionAdmin", "type": "bool" },643 { "internalType": "bool", "name": "tokenOwner", "type": "bool" }644 ],645 "name": "setTokenPropertyPermission",646 "outputs": [],647 "stateMutability": "nonpayable",648 "type": "function"649 },650 {651 "inputs": [652 { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }653 ],654 "name": "supportsInterface",655 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],656 "stateMutability": "view",657 "type": "function"658 },659 {660 "inputs": [],661 "name": "symbol",662 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],663 "stateMutability": "view",664 "type": "function"665 },666 {667 "inputs": [668 { "internalType": "uint256", "name": "index", "type": "uint256" }669 ],670 "name": "tokenByIndex",671 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],672 "stateMutability": "view",673 "type": "function"674 },675 {676 "inputs": [677 { "internalType": "uint256", "name": "token", "type": "uint256" }678 ],679 "name": "tokenContractAddress",680 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],681 "stateMutability": "view",682 "type": "function"683 },684 {685 "inputs": [686 { "internalType": "address", "name": "owner", "type": "address" },687 { "internalType": "uint256", "name": "index", "type": "uint256" }688 ],689 "name": "tokenOfOwnerByIndex",690 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],691 "stateMutability": "view",692 "type": "function"693 },694 {695 "inputs": [696 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }697 ],698 "name": "tokenURI",699 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],700 "stateMutability": "view",701 "type": "function"702 },703 {704 "inputs": [],705 "name": "totalSupply",706 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],707 "stateMutability": "view",708 "type": "function"709 },710 {711 "inputs": [712 { "internalType": "address", "name": "to", "type": "address" },713 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }714 ],715 "name": "transfer",716 "outputs": [],717 "stateMutability": "nonpayable",718 "type": "function"719 },720 {721 "inputs": [722 {723 "components": [724 { "internalType": "address", "name": "eth", "type": "address" },725 { "internalType": "uint256", "name": "sub", "type": "uint256" }726 ],727 "internalType": "struct EthCrossAccount",728 "name": "to",729 "type": "tuple"730 },731 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }732 ],733 "name": "transferCross",734 "outputs": [],735 "stateMutability": "nonpayable",736 "type": "function"737 },738 {739 "inputs": [740 { "internalType": "address", "name": "from", "type": "address" },741 { "internalType": "address", "name": "to", "type": "address" },742 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }743 ],744 "name": "transferFrom",745 "outputs": [],746 "stateMutability": "nonpayable",747 "type": "function"748 },749 {750 "inputs": [751 {752 "components": [753 { "internalType": "address", "name": "eth", "type": "address" },754 { "internalType": "uint256", "name": "sub", "type": "uint256" }755 ],756 "internalType": "struct EthCrossAccount",757 "name": "from",758 "type": "tuple"759 },760 {761 "components": [762 { "internalType": "address", "name": "eth", "type": "address" },763 { "internalType": "uint256", "name": "sub", "type": "uint256" }764 ],765 "internalType": "struct EthCrossAccount",766 "name": "to",767 "type": "tuple"768 },769 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }770 ],771 "name": "transferFromCross",772 "outputs": [],773 "stateMutability": "nonpayable",774 "type": "function"775 },776 {777 "inputs": [],778 "name": "uniqueCollectionType",779 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],780 "stateMutability": "view",781 "type": "function"782 }783]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": "approved",15 "type": "address"16 },17 {18 "indexed": true,19 "internalType": "uint256",20 "name": "tokenId",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": "owner",34 "type": "address"35 },36 {37 "indexed": true,38 "internalType": "address",39 "name": "operator",40 "type": "address"41 },42 {43 "indexed": false,44 "internalType": "bool",45 "name": "approved",46 "type": "bool"47 }48 ],49 "name": "ApprovalForAll",50 "type": "event"51 },52 {53 "anonymous": false,54 "inputs": [],55 "name": "MintingFinished",56 "type": "event"57 },58 {59 "anonymous": false,60 "inputs": [61 {62 "indexed": true,63 "internalType": "address",64 "name": "from",65 "type": "address"66 },67 {68 "indexed": true,69 "internalType": "address",70 "name": "to",71 "type": "address"72 },73 {74 "indexed": true,75 "internalType": "uint256",76 "name": "tokenId",77 "type": "uint256"78 }79 ],80 "name": "Transfer",81 "type": "event"82 },83 {84 "inputs": [85 {86 "components": [87 { "internalType": "address", "name": "eth", "type": "address" },88 { "internalType": "uint256", "name": "sub", "type": "uint256" }89 ],90 "internalType": "struct EthCrossAccount",91 "name": "newAdmin",92 "type": "tuple"93 }94 ],95 "name": "addCollectionAdminCross",96 "outputs": [],97 "stateMutability": "nonpayable",98 "type": "function"99 },100 {101 "inputs": [102 {103 "components": [104 { "internalType": "address", "name": "eth", "type": "address" },105 { "internalType": "uint256", "name": "sub", "type": "uint256" }106 ],107 "internalType": "struct EthCrossAccount",108 "name": "user",109 "type": "tuple"110 }111 ],112 "name": "addToCollectionAllowListCross",113 "outputs": [],114 "stateMutability": "nonpayable",115 "type": "function"116 },117 {118 "inputs": [119 {120 "components": [121 { "internalType": "address", "name": "eth", "type": "address" },122 { "internalType": "uint256", "name": "sub", "type": "uint256" }123 ],124 "internalType": "struct EthCrossAccount",125 "name": "user",126 "type": "tuple"127 }128 ],129 "name": "allowlistedCross",130 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],131 "stateMutability": "view",132 "type": "function"133 },134 {135 "inputs": [136 { "internalType": "address", "name": "approved", "type": "address" },137 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }138 ],139 "name": "approve",140 "outputs": [],141 "stateMutability": "nonpayable",142 "type": "function"143 },144 {145 "inputs": [146 { "internalType": "address", "name": "owner", "type": "address" }147 ],148 "name": "balanceOf",149 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],150 "stateMutability": "view",151 "type": "function"152 },153 {154 "inputs": [155 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }156 ],157 "name": "burn",158 "outputs": [],159 "stateMutability": "nonpayable",160 "type": "function"161 },162 {163 "inputs": [164 {165 "components": [166 { "internalType": "address", "name": "eth", "type": "address" },167 { "internalType": "uint256", "name": "sub", "type": "uint256" }168 ],169 "internalType": "struct EthCrossAccount",170 "name": "from",171 "type": "tuple"172 },173 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }174 ],175 "name": "burnFromCross",176 "outputs": [],177 "stateMutability": "nonpayable",178 "type": "function"179 },180 {181 "inputs": [182 {183 "components": [184 { "internalType": "address", "name": "eth", "type": "address" },185 { "internalType": "uint256", "name": "sub", "type": "uint256" }186 ],187 "internalType": "struct EthCrossAccount",188 "name": "newOwner",189 "type": "tuple"190 }191 ],192 "name": "changeCollectionOwnerCross",193 "outputs": [],194 "stateMutability": "nonpayable",195 "type": "function"196 },197 {198 "inputs": [],199 "name": "collectionAdmins",200 "outputs": [201 {202 "components": [203 { "internalType": "address", "name": "eth", "type": "address" },204 { "internalType": "uint256", "name": "sub", "type": "uint256" }205 ],206 "internalType": "struct EthCrossAccount[]",207 "name": "",208 "type": "tuple[]"209 }210 ],211 "stateMutability": "view",212 "type": "function"213 },214 {215 "inputs": [],216 "name": "collectionHelperAddress",217 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],218 "stateMutability": "view",219 "type": "function"220 },221 {222 "inputs": [],223 "name": "collectionNestingRestrictedCollectionIds",224 "outputs": [225 {226 "components": [227 { "internalType": "bool", "name": "field_0", "type": "bool" },228 {229 "internalType": "uint256[]",230 "name": "field_1",231 "type": "uint256[]"232 }233 ],234 "internalType": "struct Tuple33",235 "name": "",236 "type": "tuple"237 }238 ],239 "stateMutability": "view",240 "type": "function"241 },242 {243 "inputs": [],244 "name": "collectionOwner",245 "outputs": [246 {247 "components": [248 { "internalType": "address", "name": "eth", "type": "address" },249 { "internalType": "uint256", "name": "sub", "type": "uint256" }250 ],251 "internalType": "struct EthCrossAccount",252 "name": "",253 "type": "tuple"254 }255 ],256 "stateMutability": "view",257 "type": "function"258 },259 {260 "inputs": [261 { "internalType": "string[]", "name": "keys", "type": "string[]" }262 ],263 "name": "collectionProperties",264 "outputs": [265 {266 "components": [267 { "internalType": "string", "name": "key", "type": "string" },268 { "internalType": "bytes", "name": "value", "type": "bytes" }269 ],270 "internalType": "struct Property[]",271 "name": "",272 "type": "tuple[]"273 }274 ],275 "stateMutability": "view",276 "type": "function"277 },278 {279 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],280 "name": "collectionProperty",281 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],282 "stateMutability": "view",283 "type": "function"284 },285 {286 "inputs": [],287 "name": "collectionSponsor",288 "outputs": [289 {290 "components": [291 { "internalType": "address", "name": "field_0", "type": "address" },292 { "internalType": "uint256", "name": "field_1", "type": "uint256" }293 ],294 "internalType": "struct Tuple29",295 "name": "",296 "type": "tuple"297 }298 ],299 "stateMutability": "view",300 "type": "function"301 },302 {303 "inputs": [],304 "name": "confirmCollectionSponsorship",305 "outputs": [],306 "stateMutability": "nonpayable",307 "type": "function"308 },309 {310 "inputs": [],311 "name": "contractAddress",312 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],313 "stateMutability": "view",314 "type": "function"315 },316 {317 "inputs": [318 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }319 ],320 "name": "crossOwnerOf",321 "outputs": [322 {323 "components": [324 { "internalType": "address", "name": "eth", "type": "address" },325 { "internalType": "uint256", "name": "sub", "type": "uint256" }326 ],327 "internalType": "struct EthCrossAccount",328 "name": "",329 "type": "tuple"330 }331 ],332 "stateMutability": "view",333 "type": "function"334 },335 {336 "inputs": [337 { "internalType": "string[]", "name": "keys", "type": "string[]" }338 ],339 "name": "deleteCollectionProperties",340 "outputs": [],341 "stateMutability": "nonpayable",342 "type": "function"343 },344 {345 "inputs": [346 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },347 { "internalType": "string[]", "name": "keys", "type": "string[]" }348 ],349 "name": "deleteProperties",350 "outputs": [],351 "stateMutability": "nonpayable",352 "type": "function"353 },354 {355 "inputs": [],356 "name": "description",357 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],358 "stateMutability": "view",359 "type": "function"360 },361 {362 "inputs": [],363 "name": "finishMinting",364 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],365 "stateMutability": "nonpayable",366 "type": "function"367 },368 {369 "inputs": [370 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }371 ],372 "name": "getApproved",373 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],374 "stateMutability": "view",375 "type": "function"376 },377 {378 "inputs": [],379 "name": "hasCollectionPendingSponsor",380 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],381 "stateMutability": "view",382 "type": "function"383 },384 {385 "inputs": [386 { "internalType": "address", "name": "owner", "type": "address" },387 { "internalType": "address", "name": "operator", "type": "address" }388 ],389 "name": "isApprovedForAll",390 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],391 "stateMutability": "view",392 "type": "function"393 },394 {395 "inputs": [396 {397 "components": [398 { "internalType": "address", "name": "eth", "type": "address" },399 { "internalType": "uint256", "name": "sub", "type": "uint256" }400 ],401 "internalType": "struct EthCrossAccount",402 "name": "user",403 "type": "tuple"404 }405 ],406 "name": "isOwnerOrAdminCross",407 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],408 "stateMutability": "view",409 "type": "function"410 },411 {412 "inputs": [{ "internalType": "address", "name": "to", "type": "address" }],413 "name": "mint",414 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],415 "stateMutability": "nonpayable",416 "type": "function"417 },418 {419 "inputs": [420 { "internalType": "address", "name": "to", "type": "address" },421 { "internalType": "string", "name": "tokenUri", "type": "string" }422 ],423 "name": "mintWithTokenURI",424 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],425 "stateMutability": "nonpayable",426 "type": "function"427 },428 {429 "inputs": [],430 "name": "mintingFinished",431 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],432 "stateMutability": "view",433 "type": "function"434 },435 {436 "inputs": [],437 "name": "name",438 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],439 "stateMutability": "view",440 "type": "function"441 },442 {443 "inputs": [],444 "name": "nextTokenId",445 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],446 "stateMutability": "view",447 "type": "function"448 },449 {450 "inputs": [451 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }452 ],453 "name": "ownerOf",454 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],455 "stateMutability": "view",456 "type": "function"457 },458 {459 "inputs": [460 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },461 { "internalType": "string[]", "name": "keys", "type": "string[]" }462 ],463 "name": "properties",464 "outputs": [465 {466 "components": [467 { "internalType": "string", "name": "key", "type": "string" },468 { "internalType": "bytes", "name": "value", "type": "bytes" }469 ],470 "internalType": "struct Property[]",471 "name": "",472 "type": "tuple[]"473 }474 ],475 "stateMutability": "view",476 "type": "function"477 },478 {479 "inputs": [480 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },481 { "internalType": "string", "name": "key", "type": "string" }482 ],483 "name": "property",484 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],485 "stateMutability": "view",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": "admin",497 "type": "tuple"498 }499 ],500 "name": "removeCollectionAdminCross",501 "outputs": [],502 "stateMutability": "nonpayable",503 "type": "function"504 },505 {506 "inputs": [],507 "name": "removeCollectionSponsor",508 "outputs": [],509 "stateMutability": "nonpayable",510 "type": "function"511 },512 {513 "inputs": [514 {515 "components": [516 { "internalType": "address", "name": "eth", "type": "address" },517 { "internalType": "uint256", "name": "sub", "type": "uint256" }518 ],519 "internalType": "struct EthCrossAccount",520 "name": "user",521 "type": "tuple"522 }523 ],524 "name": "removeFromCollectionAllowListCross",525 "outputs": [],526 "stateMutability": "nonpayable",527 "type": "function"528 },529 {530 "inputs": [531 { "internalType": "address", "name": "from", "type": "address" },532 { "internalType": "address", "name": "to", "type": "address" },533 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }534 ],535 "name": "safeTransferFrom",536 "outputs": [],537 "stateMutability": "nonpayable",538 "type": "function"539 },540 {541 "inputs": [542 { "internalType": "address", "name": "from", "type": "address" },543 { "internalType": "address", "name": "to", "type": "address" },544 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },545 { "internalType": "bytes", "name": "data", "type": "bytes" }546 ],547 "name": "safeTransferFromWithData",548 "outputs": [],549 "stateMutability": "nonpayable",550 "type": "function"551 },552 {553 "inputs": [554 { "internalType": "address", "name": "operator", "type": "address" },555 { "internalType": "bool", "name": "approved", "type": "bool" }556 ],557 "name": "setApprovalForAll",558 "outputs": [],559 "stateMutability": "nonpayable",560 "type": "function"561 },562 {563 "inputs": [{ "internalType": "uint8", "name": "mode", "type": "uint8" }],564 "name": "setCollectionAccess",565 "outputs": [],566 "stateMutability": "nonpayable",567 "type": "function"568 },569 {570 "inputs": [571 { "internalType": "string", "name": "limit", "type": "string" },572 { "internalType": "uint256", "name": "value", "type": "uint256" }573 ],574 "name": "setCollectionLimit",575 "outputs": [],576 "stateMutability": "nonpayable",577 "type": "function"578 },579 {580 "inputs": [{ "internalType": "bool", "name": "mode", "type": "bool" }],581 "name": "setCollectionMintMode",582 "outputs": [],583 "stateMutability": "nonpayable",584 "type": "function"585 },586 {587 "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],588 "name": "setCollectionNesting",589 "outputs": [],590 "stateMutability": "nonpayable",591 "type": "function"592 },593 {594 "inputs": [595 { "internalType": "bool", "name": "enable", "type": "bool" },596 {597 "internalType": "address[]",598 "name": "collections",599 "type": "address[]"600 }601 ],602 "name": "setCollectionNesting",603 "outputs": [],604 "stateMutability": "nonpayable",605 "type": "function"606 },607 {608 "inputs": [609 {610 "components": [611 { "internalType": "string", "name": "key", "type": "string" },612 { "internalType": "bytes", "name": "value", "type": "bytes" }613 ],614 "internalType": "struct Property[]",615 "name": "properties",616 "type": "tuple[]"617 }618 ],619 "name": "setCollectionProperties",620 "outputs": [],621 "stateMutability": "nonpayable",622 "type": "function"623 },624 {625 "inputs": [626 {627 "components": [628 { "internalType": "address", "name": "eth", "type": "address" },629 { "internalType": "uint256", "name": "sub", "type": "uint256" }630 ],631 "internalType": "struct EthCrossAccount",632 "name": "sponsor",633 "type": "tuple"634 }635 ],636 "name": "setCollectionSponsorCross",637 "outputs": [],638 "stateMutability": "nonpayable",639 "type": "function"640 },641 {642 "inputs": [643 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },644 {645 "components": [646 { "internalType": "string", "name": "key", "type": "string" },647 { "internalType": "bytes", "name": "value", "type": "bytes" }648 ],649 "internalType": "struct Property[]",650 "name": "properties",651 "type": "tuple[]"652 }653 ],654 "name": "setProperties",655 "outputs": [],656 "stateMutability": "nonpayable",657 "type": "function"658 },659 {660 "inputs": [661 { "internalType": "string", "name": "key", "type": "string" },662 { "internalType": "bool", "name": "isMutable", "type": "bool" },663 { "internalType": "bool", "name": "collectionAdmin", "type": "bool" },664 { "internalType": "bool", "name": "tokenOwner", "type": "bool" }665 ],666 "name": "setTokenPropertyPermission",667 "outputs": [],668 "stateMutability": "nonpayable",669 "type": "function"670 },671 {672 "inputs": [673 { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }674 ],675 "name": "supportsInterface",676 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],677 "stateMutability": "view",678 "type": "function"679 },680 {681 "inputs": [],682 "name": "symbol",683 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],684 "stateMutability": "view",685 "type": "function"686 },687 {688 "inputs": [689 { "internalType": "uint256", "name": "index", "type": "uint256" }690 ],691 "name": "tokenByIndex",692 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],693 "stateMutability": "view",694 "type": "function"695 },696 {697 "inputs": [698 { "internalType": "uint256", "name": "token", "type": "uint256" }699 ],700 "name": "tokenContractAddress",701 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],702 "stateMutability": "view",703 "type": "function"704 },705 {706 "inputs": [707 { "internalType": "address", "name": "owner", "type": "address" },708 { "internalType": "uint256", "name": "index", "type": "uint256" }709 ],710 "name": "tokenOfOwnerByIndex",711 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],712 "stateMutability": "view",713 "type": "function"714 },715 {716 "inputs": [717 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }718 ],719 "name": "tokenURI",720 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],721 "stateMutability": "view",722 "type": "function"723 },724 {725 "inputs": [],726 "name": "totalSupply",727 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],728 "stateMutability": "view",729 "type": "function"730 },731 {732 "inputs": [733 { "internalType": "address", "name": "to", "type": "address" },734 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }735 ],736 "name": "transfer",737 "outputs": [],738 "stateMutability": "nonpayable",739 "type": "function"740 },741 {742 "inputs": [743 {744 "components": [745 { "internalType": "address", "name": "eth", "type": "address" },746 { "internalType": "uint256", "name": "sub", "type": "uint256" }747 ],748 "internalType": "struct EthCrossAccount",749 "name": "to",750 "type": "tuple"751 },752 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }753 ],754 "name": "transferCross",755 "outputs": [],756 "stateMutability": "nonpayable",757 "type": "function"758 },759 {760 "inputs": [761 { "internalType": "address", "name": "from", "type": "address" },762 { "internalType": "address", "name": "to", "type": "address" },763 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }764 ],765 "name": "transferFrom",766 "outputs": [],767 "stateMutability": "nonpayable",768 "type": "function"769 },770 {771 "inputs": [772 {773 "components": [774 { "internalType": "address", "name": "eth", "type": "address" },775 { "internalType": "uint256", "name": "sub", "type": "uint256" }776 ],777 "internalType": "struct EthCrossAccount",778 "name": "from",779 "type": "tuple"780 },781 {782 "components": [783 { "internalType": "address", "name": "eth", "type": "address" },784 { "internalType": "uint256", "name": "sub", "type": "uint256" }785 ],786 "internalType": "struct EthCrossAccount",787 "name": "to",788 "type": "tuple"789 },790 { "internalType": "uint256", "name": "tokenId", "type": "uint256" }791 ],792 "name": "transferFromCross",793 "outputs": [],794 "stateMutability": "nonpayable",795 "type": "function"796 },797 {798 "inputs": [],799 "name": "uniqueCollectionType",800 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],801 "stateMutability": "view",802 "type": "function"803 }804]tests/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;
tests/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;
tests/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;
tests/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);