From c94200e6f718cff9bc6d5a04c16fd4c412f1fb14 Mon Sep 17 00:00:00 2001 From: Ken Goldfarb Date: Wed, 17 Nov 2021 10:48:01 -0500 Subject: [PATCH] feat: bulk check if tokens have been wrapped --- .diamond/4.json | 2 +- .../MeemBaseFacet.sol/MeemBaseFacet.json | 441 ---------------- .../MeemQueryFacet.sol/MeemQueryFacet.json | 481 +++++++++++++++++- .../MeemStandard.sol/IMeemBaseStandard.json | 75 --- .../MeemStandard.sol/IMeemQueryStandard.json | 161 ++++++ contracts/Meem/facets/MeemBaseFacet.sol | 39 -- contracts/Meem/facets/MeemQueryFacet.sol | 49 +- contracts/Meem/interfaces/MeemStandard.sol | 24 + contracts/Meem/libraries/LibERC721.sol | 76 +-- contracts/Meem/libraries/LibMeem.sol | 10 +- contracts/Meem/storage/LibAppStorage.sol | 4 +- scripts/createMeemABI.ts | 2 + tasks/deployDiamond.ts | 1 + test/mint.test.ts | 32 +- test/permissions.test.ts | 15 +- test/query.test.ts | 93 ++++ test/tokenOwnerPermissions.test.ts | 16 +- types/Meem.json | 2 +- 18 files changed, 863 insertions(+), 660 deletions(-) create mode 100644 abi/contracts/Meem/interfaces/MeemStandard.sol/IMeemQueryStandard.json create mode 100644 test/query.test.ts diff --git a/.diamond/4.json b/.diamond/4.json index d0670f6..37a9b24 100644 --- a/.diamond/4.json +++ b/.diamond/4.json @@ -1 +1 @@ -{"0xC0550ABfA2edb7eC659CD01f96d09e21f32ea189":{"AccessControlFacet":{"address":"0xa9010d1a6AEeA60fA70911d42B8D2a2bd8c58743","functionSelectors":["0xa217fddf","0xd5391393","0xe63ab1e9","0xf72c0d8b","0xab2742dc","0xac4ab3fb","0x208dd1ff"],"previousDeploys":[]},"InitDiamond":{"address":"0xF527B93351B2cE0796E4a8A66779A570e8Da7840","functionSelectors":["0xbc9ca6d4"],"previousDeploys":[]},"MeemBaseFacet":{"address":"0xE2CcAb62151eE55c325dD4748de21F592022e47F","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0x3324c326","0x3176de09","0xb65053aa","0xdcb114ec","0x9e59e598"],"previousDeploys":[]},"MeemPermissionsFacet":{"address":"0xB7aBD17ABD9e2d2993C39fE2FD1fa8AF8F3F4E50","functionSelectors":["0x41ab302b","0xc45b9dc5","0xdda50988","0x6475975b","0x4e57352a","0xc8d20f07","0xc5b13047"],"previousDeploys":[]},"MeemSplitsFacet":{"address":"0xC7e86DE36f4eF38C038ECD50dEC2AC3BEedB0E48","functionSelectors":["0x81d4180a","0xcad96cca","0x42b6c774","0x0651862a","0x3e189936","0x9f95c4f9"],"previousDeploys":[]},"ERC721Facet":{"address":"0x8BEF4e90230F3712572a92952D5610229B2C2655","functionSelectors":["0x095ea7b3","0x70a08231","0xd547cfb7","0xf6b4dfb4","0xe8a3d485","0x081812fc","0xe985e9c5","0x06fdde03","0x6352211e","0x42842e0e","0xb88d4fde","0xa22cb465","0x938e3d7b","0x95d89b41","0x4f6ccce7","0x2f745c59","0xc87b56dd","0x18160ddd","0x23b872dd"],"previousDeploys":[]}},"0x3599f2D8dFf9a528C9e840d9EE6EB59551D70379":{"AccessControlFacet":{"address":"0x6a8F5DF7Be540451B1cD87633287735A701Fb23b","functionSelectors":["0x75b238fc","0xd5391393","0xab2742dc","0xac4ab3fb","0x208dd1ff"],"previousDeploys":[]},"ERC721Facet":{"address":"0x6d0D0594046bB42AA50fa3fECe652804a3d508A0","functionSelectors":["0x095ea7b3","0x70a08231","0xd547cfb7","0x42966c68","0xf6b4dfb4","0xe8a3d485","0x081812fc","0xe985e9c5","0x06fdde03","0x6352211e","0x42842e0e","0xb88d4fde","0xa22cb465","0x95d89b41","0x4f6ccce7","0x2f745c59","0xc87b56dd","0x18160ddd","0x23b872dd"],"previousDeploys":[]},"InitDiamond":{"address":"0xD8a13E0F9BB3D88E36e5DFD9dd880F390798500d","functionSelectors":["0xbc9ca6d4"],"previousDeploys":[]},"MeemAdminFacet":{"address":"0xaf855F3530c48b2A2399aB99a1B87C02d35c1753","functionSelectors":["0xb65053aa","0x938e3d7b","0x3e189936","0xdcb114ec"],"previousDeploys":[]},"MeemBaseFacet":{"address":"0x61B031262eE52c3F6758ed836e1a338978f83255","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0x3324c326","0x3176de09","0x9e59e598"],"previousDeploys":[{"address":"0x07532f817b1999a879dA1f5DeDC1EB6c9e9A29fe","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xec3b4001","0x3324c326","0x3176de09","0x9e59e598"]},{"address":"0x0FCabE1042eD14E8c7CbB63624004cbe9301e8a8","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0x3324c326","0x3176de09","0x9e59e598","0xb77c2071"]},{"address":"0x3De148e60A9ee0256A1F0eb483A0DbD665Ea5E23","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0x3324c326","0x3176de09","0x9e59e598"]},{"address":"0x06D3540b30e23f33864DD74c6CE8d0d2f75EEEBc","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0x3324c326","0x3176de09","0x9e59e598"]}]},"MeemPermissionsFacet":{"address":"0x00363C03EdFE0a371c91De97a467Ec5B474DD187","functionSelectors":["0x41ab302b","0xc45b9dc5","0xdda50988","0x6475975b","0x4e57352a","0xc8d20f07","0xc5b13047"],"previousDeploys":[]},"MeemSplitsFacet":{"address":"0x27D2EB0f28Ec17b1d657BE88990D6295E95733D7","functionSelectors":["0x81d4180a","0xcad96cca","0x42b6c774","0x0651862a","0x9f95c4f9"],"previousDeploys":[]}},"0xBAbFc60D17EF8185Cdf3d4Fe4C62d9738745d542":{"AccessControlFacet":{"address":"0x26B18307d00c5109155436e6Bc4349a5aCc5089A","functionSelectors":["0x75b238fc","0xd5391393","0xab2742dc","0xac4ab3fb","0x208dd1ff"],"previousDeploys":[]},"ERC721Facet":{"address":"0xfD3a4C378d04f794b90418E8A15cef460B0CA836","functionSelectors":["0x095ea7b3","0x70a08231","0xd547cfb7","0x42966c68","0xf6b4dfb4","0xe8a3d485","0x081812fc","0xe985e9c5","0x06fdde03","0x6352211e","0x42842e0e","0xb88d4fde","0xa22cb465","0x95d89b41","0x4f6ccce7","0x2f745c59","0xc87b56dd","0x18160ddd","0x23b872dd"],"previousDeploys":[]},"InitDiamond":{"address":"0xFd77190F9206E189F1D9197C16f5A0fFE1470991","functionSelectors":["0xbc9ca6d4"],"previousDeploys":[]},"MeemAdminFacet":{"address":"0x18B405D62057e0C154695c937803780160E7cdA3","functionSelectors":["0xb65053aa","0x938e3d7b","0x3e189936","0xdcb114ec"],"previousDeploys":[]},"MeemBaseFacet":{"address":"0x1d44cFcE8eb7DA03eD507Ca785e8dd91Be6ddBAB","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0xcc16791f","0x3176de09","0x0d5a2050","0x9e59e598"],"previousDeploys":[{"address":"0x020b7cE1d862A9B8255F774AF8C5A3ce980d7477","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0xcc16791f","0x3176de09","0x0d5a2050","0x9e59e598"]},{"address":"0x3b0862f235eA14A8E6eeD87a9d127abf9146883D","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0xcc16791f","0x3176de09","0x0d5a2050","0x9e59e598"]}]},"MeemPermissionsFacet":{"address":"0x46AaEAbfb5f5982E43B93676Ca18327b1b688165","functionSelectors":["0x41ab302b","0xc45b9dc5","0xdda50988","0x6475975b","0x4e57352a","0xc8d20f07","0xc5b13047"],"previousDeploys":[]},"MeemSplitsFacet":{"address":"0xeF33EefC2c2609fB508f3035CD650Be91afBE752","functionSelectors":["0x81d4180a","0xcad96cca","0x42b6c774","0x0651862a","0x9f95c4f9"],"previousDeploys":[]}},"0x51bF95a128e46FeF32D128Bdf958C73583e7866c":{"AccessControlFacet":{"address":"0x9d54f03CedAab6010CE25FC9f91676Bbc89b7E66","functionSelectors":["0x75b238fc","0xd5391393","0xab2742dc","0xac4ab3fb","0x208dd1ff"],"previousDeploys":[]},"ERC721Facet":{"address":"0x364eF251Cc3189Dfd88AD370006d46E261E283D1","functionSelectors":["0x095ea7b3","0x70a08231","0xd547cfb7","0x42966c68","0xf6b4dfb4","0xe8a3d485","0x081812fc","0xe985e9c5","0x06fdde03","0x6352211e","0x42842e0e","0xb88d4fde","0xa22cb465","0x95d89b41","0x4f6ccce7","0x2f745c59","0xc87b56dd","0x18160ddd","0x23b872dd"],"previousDeploys":[]},"InitDiamond":{"address":"0x119EDa8c5d25a2C9e2a8e643E31f7d1740877b02","functionSelectors":["0xbc9ca6d4"],"previousDeploys":[]},"MeemAdminFacet":{"address":"0x886E0763D0F11B6B06B38C62f25eB93C3BCaa40F","functionSelectors":["0xb65053aa","0x938e3d7b","0x3e189936","0xdcb114ec"],"previousDeploys":[]},"MeemBaseFacet":{"address":"0x06c0AeCFb09a57D691d502B38EfFA5edb43131fd","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xcc16791f","0x3176de09","0x0d5a2050"],"previousDeploys":[]},"MeemPermissionsFacet":{"address":"0x4889BB78473Cf6dAE638aABB2fc5a722ceE9C083","functionSelectors":["0x41ab302b","0xc45b9dc5","0xdda50988","0x6475975b","0x4e57352a","0xc8d20f07","0xc5b13047"],"previousDeploys":[]},"MeemSplitsFacet":{"address":"0x484b06EdB61D44f6A5233204D530A7251f28b295","functionSelectors":["0x81d4180a","0xcad96cca","0x42b6c774","0x0651862a","0x9f95c4f9"],"previousDeploys":[]}}} +{"0xC0550ABfA2edb7eC659CD01f96d09e21f32ea189":{"AccessControlFacet":{"address":"0xa9010d1a6AEeA60fA70911d42B8D2a2bd8c58743","functionSelectors":["0xa217fddf","0xd5391393","0xe63ab1e9","0xf72c0d8b","0xab2742dc","0xac4ab3fb","0x208dd1ff"],"previousDeploys":[]},"InitDiamond":{"address":"0xF527B93351B2cE0796E4a8A66779A570e8Da7840","functionSelectors":["0xbc9ca6d4"],"previousDeploys":[]},"MeemBaseFacet":{"address":"0xE2CcAb62151eE55c325dD4748de21F592022e47F","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0x3324c326","0x3176de09","0xb65053aa","0xdcb114ec","0x9e59e598"],"previousDeploys":[]},"MeemPermissionsFacet":{"address":"0xB7aBD17ABD9e2d2993C39fE2FD1fa8AF8F3F4E50","functionSelectors":["0x41ab302b","0xc45b9dc5","0xdda50988","0x6475975b","0x4e57352a","0xc8d20f07","0xc5b13047"],"previousDeploys":[]},"MeemSplitsFacet":{"address":"0xC7e86DE36f4eF38C038ECD50dEC2AC3BEedB0E48","functionSelectors":["0x81d4180a","0xcad96cca","0x42b6c774","0x0651862a","0x3e189936","0x9f95c4f9"],"previousDeploys":[]},"ERC721Facet":{"address":"0x8BEF4e90230F3712572a92952D5610229B2C2655","functionSelectors":["0x095ea7b3","0x70a08231","0xd547cfb7","0xf6b4dfb4","0xe8a3d485","0x081812fc","0xe985e9c5","0x06fdde03","0x6352211e","0x42842e0e","0xb88d4fde","0xa22cb465","0x938e3d7b","0x95d89b41","0x4f6ccce7","0x2f745c59","0xc87b56dd","0x18160ddd","0x23b872dd"],"previousDeploys":[]}},"0x3599f2D8dFf9a528C9e840d9EE6EB59551D70379":{"AccessControlFacet":{"address":"0x6a8F5DF7Be540451B1cD87633287735A701Fb23b","functionSelectors":["0x75b238fc","0xd5391393","0xab2742dc","0xac4ab3fb","0x208dd1ff"],"previousDeploys":[]},"ERC721Facet":{"address":"0x6d0D0594046bB42AA50fa3fECe652804a3d508A0","functionSelectors":["0x095ea7b3","0x70a08231","0xd547cfb7","0x42966c68","0xf6b4dfb4","0xe8a3d485","0x081812fc","0xe985e9c5","0x06fdde03","0x6352211e","0x42842e0e","0xb88d4fde","0xa22cb465","0x95d89b41","0x4f6ccce7","0x2f745c59","0xc87b56dd","0x18160ddd","0x23b872dd"],"previousDeploys":[]},"InitDiamond":{"address":"0xD8a13E0F9BB3D88E36e5DFD9dd880F390798500d","functionSelectors":["0xbc9ca6d4"],"previousDeploys":[]},"MeemAdminFacet":{"address":"0xaf855F3530c48b2A2399aB99a1B87C02d35c1753","functionSelectors":["0xb65053aa","0x938e3d7b","0x3e189936","0xdcb114ec"],"previousDeploys":[]},"MeemBaseFacet":{"address":"0x61B031262eE52c3F6758ed836e1a338978f83255","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0x3324c326","0x3176de09","0x9e59e598"],"previousDeploys":[{"address":"0x07532f817b1999a879dA1f5DeDC1EB6c9e9A29fe","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xec3b4001","0x3324c326","0x3176de09","0x9e59e598"]},{"address":"0x0FCabE1042eD14E8c7CbB63624004cbe9301e8a8","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0x3324c326","0x3176de09","0x9e59e598","0xb77c2071"]},{"address":"0x3De148e60A9ee0256A1F0eb483A0DbD665Ea5E23","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0x3324c326","0x3176de09","0x9e59e598"]},{"address":"0x06D3540b30e23f33864DD74c6CE8d0d2f75EEEBc","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0x3324c326","0x3176de09","0x9e59e598"]}]},"MeemPermissionsFacet":{"address":"0x00363C03EdFE0a371c91De97a467Ec5B474DD187","functionSelectors":["0x41ab302b","0xc45b9dc5","0xdda50988","0x6475975b","0x4e57352a","0xc8d20f07","0xc5b13047"],"previousDeploys":[]},"MeemSplitsFacet":{"address":"0x27D2EB0f28Ec17b1d657BE88990D6295E95733D7","functionSelectors":["0x81d4180a","0xcad96cca","0x42b6c774","0x0651862a","0x9f95c4f9"],"previousDeploys":[]}},"0xBAbFc60D17EF8185Cdf3d4Fe4C62d9738745d542":{"AccessControlFacet":{"address":"0x26B18307d00c5109155436e6Bc4349a5aCc5089A","functionSelectors":["0x75b238fc","0xd5391393","0xab2742dc","0xac4ab3fb","0x208dd1ff"],"previousDeploys":[]},"ERC721Facet":{"address":"0xfD3a4C378d04f794b90418E8A15cef460B0CA836","functionSelectors":["0x095ea7b3","0x70a08231","0xd547cfb7","0x42966c68","0xf6b4dfb4","0xe8a3d485","0x081812fc","0xe985e9c5","0x06fdde03","0x6352211e","0x42842e0e","0xb88d4fde","0xa22cb465","0x95d89b41","0x4f6ccce7","0x2f745c59","0xc87b56dd","0x18160ddd","0x23b872dd"],"previousDeploys":[]},"InitDiamond":{"address":"0xFd77190F9206E189F1D9197C16f5A0fFE1470991","functionSelectors":["0xbc9ca6d4"],"previousDeploys":[]},"MeemAdminFacet":{"address":"0x18B405D62057e0C154695c937803780160E7cdA3","functionSelectors":["0xb65053aa","0x938e3d7b","0x3e189936","0xdcb114ec"],"previousDeploys":[]},"MeemBaseFacet":{"address":"0x1d44cFcE8eb7DA03eD507Ca785e8dd91Be6ddBAB","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0xcc16791f","0x3176de09","0x0d5a2050","0x9e59e598"],"previousDeploys":[{"address":"0x020b7cE1d862A9B8255F774AF8C5A3ce980d7477","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0xcc16791f","0x3176de09","0x0d5a2050","0x9e59e598"]},{"address":"0x3b0862f235eA14A8E6eeD87a9d127abf9146883D","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0xcc16791f","0x3176de09","0x0d5a2050","0x9e59e598"]}]},"MeemPermissionsFacet":{"address":"0x46AaEAbfb5f5982E43B93676Ca18327b1b688165","functionSelectors":["0x41ab302b","0xc45b9dc5","0xdda50988","0x6475975b","0x4e57352a","0xc8d20f07","0xc5b13047"],"previousDeploys":[]},"MeemSplitsFacet":{"address":"0xeF33EefC2c2609fB508f3035CD650Be91afBE752","functionSelectors":["0x81d4180a","0xcad96cca","0x42b6c774","0x0651862a","0x9f95c4f9"],"previousDeploys":[]}},"0x51bF95a128e46FeF32D128Bdf958C73583e7866c":{"AccessControlFacet":{"address":"0x9d54f03CedAab6010CE25FC9f91676Bbc89b7E66","functionSelectors":["0x75b238fc","0xd5391393","0xab2742dc","0xac4ab3fb","0x208dd1ff"],"previousDeploys":[]},"ERC721Facet":{"address":"0x364eF251Cc3189Dfd88AD370006d46E261E283D1","functionSelectors":["0x095ea7b3","0x70a08231","0xd547cfb7","0x42966c68","0xf6b4dfb4","0xe8a3d485","0x081812fc","0xe985e9c5","0x06fdde03","0x6352211e","0x42842e0e","0xb88d4fde","0xa22cb465","0x95d89b41","0x4f6ccce7","0x2f745c59","0xc87b56dd","0x18160ddd","0x23b872dd"],"previousDeploys":[]},"InitDiamond":{"address":"0x119EDa8c5d25a2C9e2a8e643E31f7d1740877b02","functionSelectors":["0xbc9ca6d4"],"previousDeploys":[]},"MeemAdminFacet":{"address":"0x886E0763D0F11B6B06B38C62f25eB93C3BCaa40F","functionSelectors":["0xb65053aa","0x938e3d7b","0x3e189936","0xdcb114ec"],"previousDeploys":[]},"MeemBaseFacet":{"address":"0x06c0AeCFb09a57D691d502B38EfFA5edb43131fd","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xcc16791f","0x3176de09","0x0d5a2050"],"previousDeploys":[]},"MeemPermissionsFacet":{"address":"0x4889BB78473Cf6dAE638aABB2fc5a722ceE9C083","functionSelectors":["0x41ab302b","0xc45b9dc5","0xdda50988","0x6475975b","0x4e57352a","0xc8d20f07","0xc5b13047"],"previousDeploys":[]},"MeemSplitsFacet":{"address":"0x484b06EdB61D44f6A5233204D530A7251f28b295","functionSelectors":["0x81d4180a","0xcad96cca","0x42b6c774","0x0651862a","0x9f95c4f9"],"previousDeploys":[]}},"0x0902fbcbF44Af1f34f46405E7c6c5120ECCD7812":{"AccessControlFacet":{"address":"0xb3fb6F70e7dFF401846E2D50fd131536Ef47Eae0","functionSelectors":["0x75b238fc","0xd5391393","0xab2742dc","0xac4ab3fb","0x208dd1ff"],"previousDeploys":[]},"ERC721Facet":{"address":"0xd4F5797F5DFA0501bCaa558EBd62c114A2eBc200","functionSelectors":["0x095ea7b3","0x70a08231","0xd547cfb7","0x42966c68","0xf6b4dfb4","0xe8a3d485","0x081812fc","0xe985e9c5","0x06fdde03","0x6352211e","0x42842e0e","0xb88d4fde","0xa22cb465","0x95d89b41","0x4f6ccce7","0x2f745c59","0xc87b56dd","0x18160ddd","0x23b872dd"],"previousDeploys":[]},"InitDiamond":{"address":"0xcd3cabb295F32c5425A044F920bBd60252F19fFF","functionSelectors":["0xbc9ca6d4"],"previousDeploys":[]},"MeemAdminFacet":{"address":"0x9cae1464a9dBFb3fDE577b2c79E0ebDf6424cdCd","functionSelectors":["0xb65053aa","0x938e3d7b","0x3e189936","0xdcb114ec"],"previousDeploys":[]},"MeemBaseFacet":{"address":"0x02cF4fc1c8595dA1f9D2cD665A2F46f5587ec89C","functionSelectors":["0xcc16791f"],"previousDeploys":[]},"MeemPermissionsFacet":{"address":"0x01C1cc3668e42E1De93d4fe5A9823cAa4E9c17e1","functionSelectors":["0x41ab302b","0xc45b9dc5","0xdda50988","0x6475975b","0x4e57352a","0xc8d20f07","0xc5b13047"],"previousDeploys":[]},"MeemQueryFacet":{"address":"0xb436595a5F4608BDb20f8f8935Cb99605501b2bb","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0x609a0178","0x3176de09","0x0d5a2050","0x9e59e598"],"previousDeploys":[]},"MeemSplitsFacet":{"address":"0xaCDDe9D0f6cb0353D0E90cF87D29378e8B4066d8","functionSelectors":["0x81d4180a","0xcad96cca","0x42b6c774","0x0651862a","0x9f95c4f9"],"previousDeploys":[]}},"0x87e5882fa0ea7e391b7e31E8b23a8a38F35C84Ac":{"AccessControlFacet":{"address":"0x1fE8d8A48181F99EeEAbF5b580e05D42699E517f","functionSelectors":["0x75b238fc","0xd5391393","0xab2742dc","0xac4ab3fb","0x208dd1ff"],"previousDeploys":[]},"ERC721Facet":{"address":"0x6fF4a58A037dB94B5F402A19C335C729461040b3","functionSelectors":["0x095ea7b3","0x70a08231","0xd547cfb7","0x42966c68","0xf6b4dfb4","0xe8a3d485","0x081812fc","0xe985e9c5","0x06fdde03","0x6352211e","0x42842e0e","0xb88d4fde","0xa22cb465","0x95d89b41","0x4f6ccce7","0x2f745c59","0xc87b56dd","0x18160ddd","0x23b872dd"],"previousDeploys":[]},"InitDiamond":{"address":"0x8268529c16727cf9a6eF2Ec3f5964A6246752d5f","functionSelectors":["0xbc9ca6d4"],"previousDeploys":[]},"MeemAdminFacet":{"address":"0x68183E5636564df820F1CF4Bd0050ffb6F22D763","functionSelectors":["0xb65053aa","0x938e3d7b","0x3e189936","0xdcb114ec"],"previousDeploys":[]},"MeemBaseFacet":{"address":"0xD73438CF2c2D3Fcb377ADAb6bA0d591e58565273","functionSelectors":["0xcc16791f"],"previousDeploys":[]},"MeemPermissionsFacet":{"address":"0x41C3ed7Afb404B664E04Da7510047c359dd39d0A","functionSelectors":["0x41ab302b","0xc45b9dc5","0xdda50988","0x6475975b","0x4e57352a","0xc8d20f07","0xc5b13047"],"previousDeploys":[]},"MeemQueryFacet":{"address":"0x16Abd7CbeC0967aAf2738c19b44Ef4500654478B","functionSelectors":["0x9aa1125b","0x6f19951c","0xd152a499","0xb77c2071","0x3176de09","0x0d5a2050","0x9e59e598","0x47a8f6f3"],"previousDeploys":[]},"MeemSplitsFacet":{"address":"0x9f8A5A4B5F7763fD8E0782aa0AE07a3F3D2fD315","functionSelectors":["0x81d4180a","0xcad96cca","0x42b6c774","0x0651862a","0x9f95c4f9"],"previousDeploys":[]}}} diff --git a/abi/contracts/Meem/facets/MeemBaseFacet.sol/MeemBaseFacet.json b/abi/contracts/Meem/facets/MeemBaseFacet.sol/MeemBaseFacet.json index 3357fcb..77b1f07 100644 --- a/abi/contracts/Meem/facets/MeemBaseFacet.sol/MeemBaseFacet.json +++ b/abi/contracts/Meem/facets/MeemBaseFacet.sol/MeemBaseFacet.json @@ -311,404 +311,6 @@ "name": "PropertiesSet", "type": "event" }, - { - "inputs": [], - "name": "childDepth", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "childrenOf", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getMeem", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "enum Chain", - "name": "parentChain", - "type": "uint8" - }, - { - "internalType": "address", - "name": "parent", - "type": "address" - }, - { - "internalType": "uint256", - "name": "parentTokenId", - "type": "uint256" - }, - { - "internalType": "enum Chain", - "name": "rootChain", - "type": "uint8" - }, - { - "internalType": "address", - "name": "root", - "type": "address" - }, - { - "internalType": "uint256", - "name": "rootTokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "generation", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "int256", - "name": "totalChildren", - "type": "int256" - }, - { - "internalType": "address", - "name": "totalChildrenLockedBy", - "type": "address" - }, - { - "internalType": "int256", - "name": "childrenPerWallet", - "type": "int256" - }, - { - "internalType": "address", - "name": "childrenPerWalletLockedBy", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum Permission", - "name": "permission", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "addresses", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "numTokens", - "type": "uint256" - }, - { - "internalType": "address", - "name": "lockedBy", - "type": "address" - } - ], - "internalType": "struct MeemPermission[]", - "name": "copyPermissions", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum Permission", - "name": "permission", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "addresses", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "numTokens", - "type": "uint256" - }, - { - "internalType": "address", - "name": "lockedBy", - "type": "address" - } - ], - "internalType": "struct MeemPermission[]", - "name": "remixPermissions", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum Permission", - "name": "permission", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "addresses", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "numTokens", - "type": "uint256" - }, - { - "internalType": "address", - "name": "lockedBy", - "type": "address" - } - ], - "internalType": "struct MeemPermission[]", - "name": "readPermissions", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "copyPermissionsLockedBy", - "type": "address" - }, - { - "internalType": "address", - "name": "remixPermissionsLockedBy", - "type": "address" - }, - { - "internalType": "address", - "name": "readPermissionsLockedBy", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "toAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "lockedBy", - "type": "address" - } - ], - "internalType": "struct Split[]", - "name": "splits", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "splitsLockedBy", - "type": "address" - } - ], - "internalType": "struct MeemProperties", - "name": "properties", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "int256", - "name": "totalChildren", - "type": "int256" - }, - { - "internalType": "address", - "name": "totalChildrenLockedBy", - "type": "address" - }, - { - "internalType": "int256", - "name": "childrenPerWallet", - "type": "int256" - }, - { - "internalType": "address", - "name": "childrenPerWalletLockedBy", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum Permission", - "name": "permission", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "addresses", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "numTokens", - "type": "uint256" - }, - { - "internalType": "address", - "name": "lockedBy", - "type": "address" - } - ], - "internalType": "struct MeemPermission[]", - "name": "copyPermissions", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum Permission", - "name": "permission", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "addresses", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "numTokens", - "type": "uint256" - }, - { - "internalType": "address", - "name": "lockedBy", - "type": "address" - } - ], - "internalType": "struct MeemPermission[]", - "name": "remixPermissions", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum Permission", - "name": "permission", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "addresses", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "numTokens", - "type": "uint256" - }, - { - "internalType": "address", - "name": "lockedBy", - "type": "address" - } - ], - "internalType": "struct MeemPermission[]", - "name": "readPermissions", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "copyPermissionsLockedBy", - "type": "address" - }, - { - "internalType": "address", - "name": "remixPermissionsLockedBy", - "type": "address" - }, - { - "internalType": "address", - "name": "readPermissionsLockedBy", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "toAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "lockedBy", - "type": "address" - } - ], - "internalType": "struct Split[]", - "name": "splits", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "splitsLockedBy", - "type": "address" - } - ], - "internalType": "struct MeemProperties", - "name": "childProperties", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "mintedAt", - "type": "uint256" - } - ], - "internalType": "struct Meem", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -1061,48 +663,5 @@ "outputs": [], "stateMutability": "nonpayable", "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "numChildrenOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "ownedChildrenOf", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" } ] diff --git a/abi/contracts/Meem/facets/MeemQueryFacet.sol/MeemQueryFacet.json b/abi/contracts/Meem/facets/MeemQueryFacet.sol/MeemQueryFacet.json index b1d95b9..f3cbde0 100644 --- a/abi/contracts/Meem/facets/MeemQueryFacet.sol/MeemQueryFacet.json +++ b/abi/contracts/Meem/facets/MeemQueryFacet.sol/MeemQueryFacet.json @@ -1,28 +1,31 @@ [ { - "inputs": [ - { - "internalType": "enum Chain", - "name": "chain", - "type": "uint8" - }, + "inputs": [], + "name": "childDepth", + "outputs": [ { - "internalType": "address", - "name": "contractAddress", - "type": "address" - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], - "name": "isNFTWrapped", + "name": "childrenOf", "outputs": [ { - "internalType": "bool", + "internalType": "uint256[]", "name": "", - "type": "bool" + "type": "uint256[]" } ], "stateMutability": "view", @@ -30,30 +33,432 @@ }, { "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getMeem", + "outputs": [ { "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, { "internalType": "enum Chain", - "name": "chain", + "name": "parentChain", "type": "uint8" }, { "internalType": "address", - "name": "contractAddress", + "name": "parent", "type": "address" }, { "internalType": "uint256", - "name": "tokenId", + "name": "parentTokenId", + "type": "uint256" + }, + { + "internalType": "enum Chain", + "name": "rootChain", + "type": "uint8" + }, + { + "internalType": "address", + "name": "root", + "type": "address" + }, + { + "internalType": "uint256", + "name": "rootTokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "generation", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "int256", + "name": "totalChildren", + "type": "int256" + }, + { + "internalType": "address", + "name": "totalChildrenLockedBy", + "type": "address" + }, + { + "internalType": "int256", + "name": "childrenPerWallet", + "type": "int256" + }, + { + "internalType": "address", + "name": "childrenPerWalletLockedBy", + "type": "address" + }, + { + "components": [ + { + "internalType": "enum Permission", + "name": "permission", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "addresses", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "numTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "lockedBy", + "type": "address" + } + ], + "internalType": "struct MeemPermission[]", + "name": "copyPermissions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "enum Permission", + "name": "permission", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "addresses", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "numTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "lockedBy", + "type": "address" + } + ], + "internalType": "struct MeemPermission[]", + "name": "remixPermissions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "enum Permission", + "name": "permission", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "addresses", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "numTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "lockedBy", + "type": "address" + } + ], + "internalType": "struct MeemPermission[]", + "name": "readPermissions", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "copyPermissionsLockedBy", + "type": "address" + }, + { + "internalType": "address", + "name": "remixPermissionsLockedBy", + "type": "address" + }, + { + "internalType": "address", + "name": "readPermissionsLockedBy", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "lockedBy", + "type": "address" + } + ], + "internalType": "struct Split[]", + "name": "splits", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "splitsLockedBy", + "type": "address" + } + ], + "internalType": "struct MeemProperties", + "name": "properties", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "int256", + "name": "totalChildren", + "type": "int256" + }, + { + "internalType": "address", + "name": "totalChildrenLockedBy", + "type": "address" + }, + { + "internalType": "int256", + "name": "childrenPerWallet", + "type": "int256" + }, + { + "internalType": "address", + "name": "childrenPerWalletLockedBy", + "type": "address" + }, + { + "components": [ + { + "internalType": "enum Permission", + "name": "permission", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "addresses", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "numTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "lockedBy", + "type": "address" + } + ], + "internalType": "struct MeemPermission[]", + "name": "copyPermissions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "enum Permission", + "name": "permission", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "addresses", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "numTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "lockedBy", + "type": "address" + } + ], + "internalType": "struct MeemPermission[]", + "name": "remixPermissions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "enum Permission", + "name": "permission", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "addresses", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "numTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "lockedBy", + "type": "address" + } + ], + "internalType": "struct MeemPermission[]", + "name": "readPermissions", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "copyPermissionsLockedBy", + "type": "address" + }, + { + "internalType": "address", + "name": "remixPermissionsLockedBy", + "type": "address" + }, + { + "internalType": "address", + "name": "readPermissionsLockedBy", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "lockedBy", + "type": "address" + } + ], + "internalType": "struct Split[]", + "name": "splits", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "splitsLockedBy", + "type": "address" + } + ], + "internalType": "struct MeemProperties", + "name": "childProperties", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "mintedAt", "type": "uint256" } ], - "internalType": "struct WrappedItem[]", - "name": "items", - "type": "tuple[]" + "internalType": "struct Meem", + "name": "", + "type": "tuple" } ], - "name": "isWrapped", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum Chain", + "name": "chain", + "type": "uint8" + }, + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "isNFTWrapped", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "numChildrenOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ownedChildrenOf", "outputs": [ { "internalType": "uint256[]", @@ -82,5 +487,41 @@ ], "stateMutability": "view", "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "enum Chain", + "name": "chain", + "type": "uint8" + }, + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "internalType": "struct WrappedItem[]", + "name": "items", + "type": "tuple[]" + } + ], + "name": "wrappedTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" } ] diff --git a/abi/contracts/Meem/interfaces/MeemStandard.sol/IMeemBaseStandard.json b/abi/contracts/Meem/interfaces/MeemStandard.sol/IMeemBaseStandard.json index 33dd3ea..0348291 100644 --- a/abi/contracts/Meem/interfaces/MeemStandard.sol/IMeemBaseStandard.json +++ b/abi/contracts/Meem/interfaces/MeemStandard.sol/IMeemBaseStandard.json @@ -169,38 +169,6 @@ "name": "PropertiesSet", "type": "event" }, - { - "inputs": [], - "name": "childDepth", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "childrenOf", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -553,48 +521,5 @@ "outputs": [], "stateMutability": "nonpayable", "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "numChildrenOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "ownedChildrenOf", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" } ] diff --git a/abi/contracts/Meem/interfaces/MeemStandard.sol/IMeemQueryStandard.json b/abi/contracts/Meem/interfaces/MeemStandard.sol/IMeemQueryStandard.json new file mode 100644 index 0000000..c200bd5 --- /dev/null +++ b/abi/contracts/Meem/interfaces/MeemStandard.sol/IMeemQueryStandard.json @@ -0,0 +1,161 @@ +[ + { + "inputs": [], + "name": "childDepth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "childrenOf", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum Chain", + "name": "chain", + "type": "uint8" + }, + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "isNFTWrapped", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "numChildrenOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ownedChildrenOf", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "tokenIdsOfOwner", + "outputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds_", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "enum Chain", + "name": "chain", + "type": "uint8" + }, + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "internalType": "struct WrappedItem[]", + "name": "items", + "type": "tuple[]" + } + ], + "name": "wrappedTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/contracts/Meem/facets/MeemBaseFacet.sol b/contracts/Meem/facets/MeemBaseFacet.sol index c427605..5d4c79d 100644 --- a/contracts/Meem/facets/MeemBaseFacet.sol +++ b/contracts/Meem/facets/MeemBaseFacet.sol @@ -39,43 +39,4 @@ contract MeemBaseFacet is IMeemBaseStandard { permissionType ); } - - function childrenOf(uint256 tokenId) - public - view - override - returns (uint256[] memory) - { - LibAppStorage.AppStorage storage s = LibAppStorage.diamondStorage(); - return s.children[tokenId]; - } - - function ownedChildrenOf(uint256 tokenId, address owner) - public - view - override - returns (uint256[] memory) - { - LibAppStorage.AppStorage storage s = LibAppStorage.diamondStorage(); - return s.childrenOwnerTokens[tokenId][owner]; - } - - function numChildrenOf(uint256 tokenId) - public - view - override - returns (uint256) - { - LibAppStorage.AppStorage storage s = LibAppStorage.diamondStorage(); - return s.children[tokenId].length; - } - - function getMeem(uint256 tokenId) public view returns (Meem memory) { - return LibMeem.getMeem(tokenId); - } - - function childDepth() public view override returns (uint256) { - LibAppStorage.AppStorage storage s = LibAppStorage.diamondStorage(); - return s.childDepth; - } } diff --git a/contracts/Meem/facets/MeemQueryFacet.sol b/contracts/Meem/facets/MeemQueryFacet.sol index 1ca303d..893d6cf 100644 --- a/contracts/Meem/facets/MeemQueryFacet.sol +++ b/contracts/Meem/facets/MeemQueryFacet.sol @@ -6,14 +6,54 @@ import {LibERC721} from '../libraries/LibERC721.sol'; import {LibAppStorage} from '../storage/LibAppStorage.sol'; import {LibMeem, WrappedItem} from '../libraries/LibMeem.sol'; import {LibAccessControl} from '../libraries/LibAccessControl.sol'; -import {Meem, Chain, MeemProperties, PropertyType, PermissionType, MeemPermission, Split, IMeemBaseStandard} from '../interfaces/MeemStandard.sol'; +import {Meem, Chain, MeemProperties, PropertyType, PermissionType, MeemPermission, Split, IMeemQueryStandard} from '../interfaces/MeemStandard.sol'; import {IRoyaltiesProvider} from '../../royalties/IRoyaltiesProvider.sol'; import {LibPart} from '../../royalties/LibPart.sol'; -contract MeemQueryFacet { +contract MeemQueryFacet is IMeemQueryStandard { + function childrenOf(uint256 tokenId) + public + view + override + returns (uint256[] memory) + { + LibAppStorage.AppStorage storage s = LibAppStorage.diamondStorage(); + return s.children[tokenId]; + } + + function ownedChildrenOf(uint256 tokenId, address owner) + public + view + override + returns (uint256[] memory) + { + LibAppStorage.AppStorage storage s = LibAppStorage.diamondStorage(); + return s.childrenOwnerTokens[tokenId][owner]; + } + + function numChildrenOf(uint256 tokenId) + public + view + override + returns (uint256) + { + LibAppStorage.AppStorage storage s = LibAppStorage.diamondStorage(); + return s.children[tokenId].length; + } + + function getMeem(uint256 tokenId) public view returns (Meem memory) { + return LibMeem.getMeem(tokenId); + } + + function childDepth() public view override returns (uint256) { + LibAppStorage.AppStorage storage s = LibAppStorage.diamondStorage(); + return s.childDepth; + } + function tokenIdsOfOwner(address _owner) public view + override returns (uint256[] memory tokenIds_) { LibAppStorage.AppStorage storage s = LibAppStorage.diamondStorage(); @@ -24,13 +64,14 @@ contract MeemQueryFacet { Chain chain, address contractAddress, uint256 tokenId - ) public view returns (bool) { + ) public view override returns (bool) { return LibMeem.isNFTWrapped(chain, contractAddress, tokenId); } - function isWrapped(WrappedItem[] memory items) + function wrappedTokens(WrappedItem[] memory items) public view + override returns (uint256[] memory) { return LibMeem.wrappedTokens(items); diff --git a/contracts/Meem/interfaces/MeemStandard.sol b/contracts/Meem/interfaces/MeemStandard.sol index f3f51e9..f2c1aad 100644 --- a/contracts/Meem/interfaces/MeemStandard.sol +++ b/contracts/Meem/interfaces/MeemStandard.sol @@ -80,6 +80,12 @@ struct Meem { uint256 mintedAt; } +struct WrappedItem { + Chain chain; + address contractAddress; + uint256 tokenId; +} + interface IMeemBaseStandard { event PropertiesSet( uint256 tokenId, @@ -110,7 +116,9 @@ interface IMeemBaseStandard { // MeemProperties memory properties, // MeemProperties memory childProperties // ) external; +} +interface IMeemQueryStandard { // Get children meems function childrenOf(uint256 tokenId) external @@ -125,6 +133,22 @@ interface IMeemBaseStandard { function numChildrenOf(uint256 tokenId) external view returns (uint256); function childDepth() external returns (uint256); + + function tokenIdsOfOwner(address _owner) + external + view + returns (uint256[] memory tokenIds_); + + function isNFTWrapped( + Chain chain, + address contractAddress, + uint256 tokenId + ) external view returns (bool); + + function wrappedTokens(WrappedItem[] memory items) + external + view + returns (uint256[] memory); } interface IMeemAdminStandard { diff --git a/contracts/Meem/libraries/LibERC721.sol b/contracts/Meem/libraries/LibERC721.sol index 918c091..5a830c1 100644 --- a/contracts/Meem/libraries/LibERC721.sol +++ b/contracts/Meem/libraries/LibERC721.sol @@ -47,7 +47,29 @@ library LibERC721 { function burn(uint256 tokenId) internal { requireOwnsToken(tokenId); - _burn(tokenId); + + LibAppStorage.AppStorage storage s = LibAppStorage.diamondStorage(); + address owner = ownerOf(tokenId); + + _beforeTokenTransfer(owner, address(0), tokenId); + + // Clear approvals + _approve(address(0), tokenId); + + // Make zero address new owner + uint256 index = s.ownerTokenIdIndexes[owner][tokenId]; + s.ownerTokenIds[owner] = LibArray.removeAt( + s.ownerTokenIds[owner], + index + ); + delete s.ownerTokenIdIndexes[owner][tokenId]; + + s.ownerTokenIds[address(0)].push(tokenId); + s.ownerTokenIdIndexes[address(0)][tokenId] = + s.ownerTokenIds[address(0)].length - + 1; + + emit Transfer(owner, address(0), tokenId); } ///@notice Query the universal totalSupply of all NFTs ever minted @@ -297,7 +319,7 @@ library LibERC721 { */ function _exists(uint256 tokenId) internal view returns (bool) { LibAppStorage.AppStorage storage s = LibAppStorage.diamondStorage(); - return s.meems[tokenId].owner != address(0); + return s.mintedTokens[tokenId]; } /** @@ -376,59 +398,15 @@ library LibERC721 { _beforeTokenTransfer(address(0), to, tokenId); - // s.balances[to] += 1; - // s.owners[tokenId] = to; + s.allTokens.push(tokenId); + s.allTokensIndex[tokenId] = s.allTokens.length; s.ownerTokenIds[to].push(tokenId); s.ownerTokenIdIndexes[to][tokenId] = s.ownerTokenIds[to].length - 1; - s.meems[tokenId].owner = to; + s.mintedTokens[tokenId] = true; emit Transfer(address(0), to, tokenId); } - /** - * @dev Destroys `tokenId`. - * The approval is cleared when the token is burned. - * - * Requirements: - * - * - `tokenId` must exist. - * - * Emits a {Transfer} event. - */ - function _burn(uint256 tokenId) internal { - LibAppStorage.AppStorage storage s = LibAppStorage.diamondStorage(); - address owner = ownerOf(tokenId); - - _beforeTokenTransfer(owner, address(0), tokenId); - - // Clear approvals - _approve(address(0), tokenId); - - uint256 index = s.ownerTokenIdIndexes[owner][tokenId]; - s.ownerTokenIds[owner] = LibArray.removeAt( - s.ownerTokenIds[owner], - index - ); - if (s.meems[tokenId].parent == address(this)) { - // Child meem - } else if (s.meems[tokenId].parent != address(this)) { - // Wrapped NFT - s.chainWrappedNFTs[s.meems[tokenId].parentChain][ - s.meems[tokenId].parent - ][s.meems[tokenId].parentTokenId] = 0; - } else if (s.meems[tokenId].parent == address(0)) { - // Original - delete s.originalMeemTokens[ - s.originalMeemTokensIndex[s.meems[tokenId].parentTokenId] - ]; - } - - delete s.ownerTokenIdIndexes[owner][tokenId]; - delete s.meems[tokenId]; - - emit Transfer(owner, address(0), tokenId); - } - /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. diff --git a/contracts/Meem/libraries/LibMeem.sol b/contracts/Meem/libraries/LibMeem.sol index 9d93f27..38d835b 100644 --- a/contracts/Meem/libraries/LibMeem.sol +++ b/contracts/Meem/libraries/LibMeem.sol @@ -9,12 +9,6 @@ import {LibAccessControl} from '../libraries/LibAccessControl.sol'; import {LibPart} from '../../royalties/LibPart.sol'; import {ERC721ReceiverNotImplemented, PropertyLocked, IndexOutOfRange, InvalidPropertyType, InvalidPermissionType, InvalidTotalChildren, NFTAlreadyWrapped, InvalidNonOwnerSplitAllocationAmount, TotalChildrenExceeded, ChildrenPerWalletExceeded, NoPermission, InvalidChildGeneration, InvalidParent, ChildDepthExceeded, TokenNotFound, MissingRequiredPermissions, MissingRequiredSplits} from '../libraries/Errors.sol'; -struct WrappedItem { - Chain chain; - address contractAddress; - uint256 tokenId; -} - library LibMeem { // Rarible royalties event event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties); @@ -91,8 +85,6 @@ library LibMeem { s.meems[tokenId].rootTokenId = rootTokenId; s.meems[tokenId].owner = to; s.meems[tokenId].mintedAt = block.timestamp; - s.allTokens.push(tokenId); - s.allTokensIndex[tokenId] = s.allTokens.length; // Set generation of Meem if (parent == address(this)) { @@ -703,7 +695,7 @@ library LibMeem { returns (uint256[] memory) { LibAppStorage.AppStorage storage s = LibAppStorage.diamondStorage(); - uint256[] memory result; + uint256[] memory result = new uint256[](items.length); for (uint256 i = 0; i < items.length; i++) { result[i] = s.chainWrappedNFTs[items[i].chain][ diff --git a/contracts/Meem/storage/LibAppStorage.sol b/contracts/Meem/storage/LibAppStorage.sol index ee65d3e..f154021 100644 --- a/contracts/Meem/storage/LibAppStorage.sol +++ b/contracts/Meem/storage/LibAppStorage.sol @@ -58,12 +58,12 @@ library LibAppStorage { mapping(uint256 => address) tokenApprovals; /** Mapping from owner to operator approvals */ mapping(address => mapping(address => bool)) operatorApprovals; - // Mapping of parent address => tokenId - mapping(address => mapping(uint256 => bool)) wrappedNFTs; // All tokenIds that have been minted and the corresponding index in allTokens uint256[] allTokens; // Index of tokenId => allTokens index mapping(uint256 => uint256) allTokensIndex; + // Keep track of whether a tokenId has been minted + mapping(uint256 => bool) mintedTokens; // Keep track of tokens that have already been wrapped mapping(Chain => mapping(address => mapping(uint256 => uint256))) chainWrappedNFTs; // Mapping of (parent) tokenId to owners and the child tokenIds they own diff --git a/scripts/createMeemABI.ts b/scripts/createMeemABI.ts index fac60ee..5270ecc 100644 --- a/scripts/createMeemABI.ts +++ b/scripts/createMeemABI.ts @@ -5,6 +5,7 @@ import erc721ABI from '../abi/contracts/Meem/facets/ERC721Facet.sol/ERC721Facet. import meemAdminABI from '../abi/contracts/Meem/facets/MeemAdminFacet.sol/MeemAdminFacet.json' import meemBaseABI from '../abi/contracts/Meem/facets/MeemBaseFacet.sol/MeemBaseFacet.json' import meemPermissionsABI from '../abi/contracts/Meem/facets/MeemPermissionsFacet.sol/MeemPermissionsFacet.json' +import meemQueryABI from '../abi/contracts/Meem/facets/MeemQueryFacet.sol/MeemQueryFacet.json' import meemSplitsABI from '../abi/contracts/Meem/facets/MeemSplitsFacet.sol/MeemSplitsFacet.json' import meemDiamondABI from '../abi/contracts/MeemDiamond.sol/MeemDiamond.json' @@ -14,6 +15,7 @@ const combinedABI = [ ...meemAdminABI, ...meemBaseABI, ...meemPermissionsABI, + ...meemQueryABI, ...meemSplitsABI, ...meemDiamondABI ] diff --git a/tasks/deployDiamond.ts b/tasks/deployDiamond.ts index c633c65..b0bd5b4 100644 --- a/tasks/deployDiamond.ts +++ b/tasks/deployDiamond.ts @@ -66,6 +66,7 @@ export async function deployDiamond(options: { MeemAdminFacet: null, MeemBaseFacet: null, MeemPermissionsFacet: null, + MeemQueryFacet: null, MeemSplitsFacet: null } diff --git a/test/mint.test.ts b/test/mint.test.ts index 67a9662..34cae3c 100644 --- a/test/mint.test.ts +++ b/test/mint.test.ts @@ -3,7 +3,7 @@ import chai, { assert } from 'chai' import chaiAsPromised from 'chai-as-promised' import { ethers } from 'hardhat' import { deployDiamond } from '../tasks' -import { Erc721Facet, MeemBaseFacet } from '../typechain' +import { Erc721Facet, MeemBaseFacet, MeemQueryFacet } from '../typechain' import { meemMintData } from './helpers/meemProperties' import { Chain, PermissionType } from './helpers/meemStandard' import { zeroAddress } from './helpers/utils' @@ -12,6 +12,7 @@ chai.use(chaiAsPromised) describe('Minting', function Test() { let meemFacet: MeemBaseFacet + let queryFacet: MeemQueryFacet let erc721Facet: Erc721Facet let signers: SignerWithAddress[] let contractAddress: string @@ -40,6 +41,10 @@ describe('Minting', function Test() { process.env.ERC_721_FACET_NAME ?? 'ERC721Facet', DiamondAddress )) as Erc721Facet + queryFacet = (await ethers.getContractAt( + 'MeemQueryFacet', + contractAddress + )) as MeemQueryFacet }) it('Can not mint as non-minter role', async () => { @@ -92,13 +97,13 @@ describe('Minting', function Test() { .balanceOf(signers[4].address) assert.equal(ownerBalance.toNumber(), 1) - const tokenIds = await meemFacet + const tokenIds = await queryFacet .connect(signers[0]) .tokenIdsOfOwner(signers[4].address) assert.equal(tokenIds[0].toNumber(), token0) - const m = await meemFacet.getMeem(token0) + const m = await queryFacet.getMeem(token0) console.log(m) }) @@ -132,13 +137,13 @@ describe('Minting', function Test() { .balanceOf(signers[2].address) assert.equal(ownerBalance.toNumber(), 1) - const tokenIds = await meemFacet + const tokenIds = await queryFacet .connect(signers[2]) .tokenIdsOfOwner(signers[2].address) assert.equal(tokenIds[0].toNumber(), token1) - const meem = await meemFacet.connect(signers[2]).getMeem(token1) + const meem = await queryFacet.connect(signers[2]).getMeem(token1) console.log({ meem, zero: meem[0] }) assert.equal(meem.owner, signers[2].address) @@ -159,7 +164,7 @@ describe('Minting', function Test() { }) it('Can create and transfer child meem', async () => { - const m = await meemFacet.getMeem(token0) + const m = await queryFacet.getMeem(token0) console.log(m) const { status } = await ( await meemFacet @@ -180,7 +185,7 @@ describe('Minting', function Test() { ).wait() assert.equal(status, 1) - let meem = await meemFacet.connect(signers[2]).getMeem(token2) + let meem = await queryFacet.connect(signers[2]).getMeem(token2) assert.equal(meem.generation.toNumber(), 1) console.log({ meem, contractAddress }) assert.equal(meem.owner, signers[2].address) @@ -197,7 +202,7 @@ describe('Minting', function Test() { ).wait() assert.equal(transferResult.status, 1) - meem = await meemFacet.connect(signers[2]).getMeem(token2) + meem = await queryFacet.connect(signers[2]).getMeem(token2) console.log({ meem, contractAddress }) assert.equal(meem.owner, owner) assert.equal(meem.parent, contractAddress) @@ -283,7 +288,7 @@ describe('Minting', function Test() { it('Can check if nft has been wrapped in a meem', async () => { const otherAddress = '0xb822D949E8bE99bb137e04e548CF2fDc88513543' - const isWrapped = await meemFacet + const isWrapped = await queryFacet .connect(signers[0]) .isNFTWrapped(Chain.Ethereum, otherAddress, 1) @@ -293,7 +298,7 @@ describe('Minting', function Test() { it('Can check if nft has not been wrapped in a meem', async () => { const otherAddress = '0xb822D949E8bE99bb137e04e548CF2fDc88513543' - const isWrapped = await meemFacet + const isWrapped = await queryFacet .connect(signers[0]) .isNFTWrapped(Chain.Ethereum, otherAddress, 2) @@ -345,10 +350,15 @@ describe('Minting', function Test() { it('Can burn token as owner', async () => { await erc721Facet.connect(signers[4]).burn(token0) - const tokenIds = await meemFacet + const tokenIds = await queryFacet .connect(signers[0]) .tokenIdsOfOwner(signers[4].address) assert.equal(tokenIds.length, 0) + + const burnedTokenIds = await queryFacet + .connect(signers[0]) + .tokenIdsOfOwner(zeroAddress) + assert.equal(burnedTokenIds[0].toNumber(), token0) }) }) diff --git a/test/permissions.test.ts b/test/permissions.test.ts index 9bcfd23..5b997a8 100644 --- a/test/permissions.test.ts +++ b/test/permissions.test.ts @@ -3,7 +3,7 @@ import chai, { assert } from 'chai' import chaiAsPromised from 'chai-as-promised' import { ethers } from 'hardhat' import { deployDiamond } from '../tasks' -import { MeemAdminFacet, MeemBaseFacet } from '../typechain' +import { MeemAdminFacet, MeemBaseFacet, MeemQueryFacet } from '../typechain' import { meemMintData } from './helpers/meemProperties' import { Chain, Permission, PermissionType } from './helpers/meemStandard' import { zeroAddress } from './helpers/utils' @@ -13,6 +13,7 @@ chai.use(chaiAsPromised) describe('Minting Permissions', function Test() { let meemFacet: MeemBaseFacet let meemAdminFacet: MeemAdminFacet + let queryFacet: MeemQueryFacet let signers: SignerWithAddress[] let contractAddress: string const owner = '0xde19C037a85A609ec33Fc747bE9Db8809175C3a5' @@ -32,13 +33,17 @@ describe('Minting Permissions', function Test() { meemFacet = (await ethers.getContractAt( 'MeemBaseFacet', - DiamondAddress + contractAddress )) as MeemBaseFacet meemAdminFacet = (await ethers.getContractAt( 'MeemAdminFacet', - DiamondAddress + contractAddress )) as MeemAdminFacet + queryFacet = (await ethers.getContractAt( + 'MeemQueryFacet', + contractAddress + )) as MeemQueryFacet }) async function mintZeroMeem() { @@ -84,7 +89,7 @@ describe('Minting Permissions', function Test() { ).wait() assert.equal(status, 1) - const m1 = await meemFacet.getMeem(token1) + const m1 = await queryFacet.getMeem(token1) assert.equal(m1.generation.toNumber(), 1) await assert.isRejected( @@ -148,7 +153,7 @@ describe('Minting Permissions', function Test() { ) ).wait() - const m2 = await meemFacet.getMeem(token2) + const m2 = await queryFacet.getMeem(token2) assert.equal(m2.generation.toNumber(), 2) await assert.isRejected( diff --git a/test/query.test.ts b/test/query.test.ts new file mode 100644 index 0000000..0adf9a5 --- /dev/null +++ b/test/query.test.ts @@ -0,0 +1,93 @@ +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' +import chai, { assert } from 'chai' +import chaiAsPromised from 'chai-as-promised' +import { ethers } from 'hardhat' +import { deployDiamond } from '../tasks' +import { MeemBaseFacet, MeemQueryFacet } from '../typechain' +import { meemMintData } from './helpers/meemProperties' +import { Chain, PermissionType } from './helpers/meemStandard' + +chai.use(chaiAsPromised) + +describe('Query Meems', function Test() { + let meemFacet: MeemBaseFacet + let queryFacet: MeemQueryFacet + let signers: SignerWithAddress[] + let contractAddress: string + // const owner = '0xde19C037a85A609ec33Fc747bE9Db8809175C3a5' + const parent = '0xc4A383d1Fd38EDe98F032759CE7Ed8f3F10c82B0' + const token0 = 100000 + // const token1 = 100001 + // const token2 = 100002 + // const token3 = 100003 + + before(async () => { + signers = await ethers.getSigners() + console.log({ signers }) + const { DiamondProxy: DiamondAddress } = await deployDiamond({ + ethers + }) + + contractAddress = DiamondAddress + + meemFacet = (await ethers.getContractAt( + 'MeemBaseFacet', + contractAddress + )) as MeemBaseFacet + queryFacet = (await ethers.getContractAt( + 'MeemQueryFacet', + contractAddress + )) as MeemQueryFacet + }) + + it('Can query wrapped', async () => { + const { status } = await ( + await meemFacet + .connect(signers[0]) + .mint( + signers[4].address, + 'https://raw.githubusercontent.com/meemproject/metadata/master/meem/1.json', + Chain.Polygon, + parent, + 50, + Chain.Polygon, + parent, + 50, + meemMintData, + meemMintData, + PermissionType.Copy + ) + ).wait() + assert.equal(status, 1) + + const shouldBeWrapped = await queryFacet.isNFTWrapped( + Chain.Polygon, + parent, + 50 + ) + const shouldNotBeWrapped = await queryFacet.isNFTWrapped( + Chain.Polygon, + parent, + 51 + ) + + assert.isTrue(shouldBeWrapped) + assert.isFalse(shouldNotBeWrapped) + + const result = await queryFacet.wrappedTokens([ + { + chain: Chain.Polygon, + contractAddress: parent, + tokenId: 50 + }, + { + chain: Chain.Polygon, + contractAddress: parent, + tokenId: 500 + } + ]) + + assert.equal(result[0].toNumber(), token0) + assert.equal(result[1].toNumber(), 0) + }) +}) diff --git a/test/tokenOwnerPermissions.test.ts b/test/tokenOwnerPermissions.test.ts index 1d1582d..afa8216 100644 --- a/test/tokenOwnerPermissions.test.ts +++ b/test/tokenOwnerPermissions.test.ts @@ -3,7 +3,11 @@ import chai, { assert } from 'chai' import chaiAsPromised from 'chai-as-promised' import { ethers } from 'hardhat' import { deployDiamond } from '../tasks' -import { MeemPermissionsFacet, MeemBaseFacet } from '../typechain' +import { + MeemPermissionsFacet, + MeemBaseFacet, + MeemQueryFacet +} from '../typechain' import { meemMintData } from './helpers/meemProperties' import { Chain, PermissionType } from './helpers/meemStandard' import { zeroAddress } from './helpers/utils' @@ -13,6 +17,7 @@ chai.use(chaiAsPromised) describe('Token Owner Permissions', function Test() { let meemPermissionsFacet: MeemPermissionsFacet let meemFacet: MeemBaseFacet + let queryFacet: MeemQueryFacet let signers: SignerWithAddress[] const token0 = 100000 @@ -34,6 +39,11 @@ describe('Token Owner Permissions', function Test() { DiamondAddress )) as MeemBaseFacet + queryFacet = (await ethers.getContractAt( + 'MeemQueryFacet', + DiamondAddress + )) as MeemQueryFacet + const { status } = await ( await meemFacet .connect(signers[0]) @@ -62,7 +72,7 @@ describe('Token Owner Permissions', function Test() { ).wait() assert.equal(status, 1) - const meem = await meemFacet.connect(signers[1]).getMeem(token0) + const meem = await queryFacet.connect(signers[1]).getMeem(token0) console.log({ meem }) assert.equal(meem.properties.totalChildren.toNumber(), 5000) }) @@ -92,7 +102,7 @@ describe('Token Owner Permissions', function Test() { ).wait() assert.equal(status, 1) - const meem = await meemFacet.connect(signers[1]).getMeem(token0) + const meem = await queryFacet.connect(signers[1]).getMeem(token0) console.log({ meem }) assert.equal(meem.properties.totalChildren.toNumber(), 5000) }) diff --git a/types/Meem.json b/types/Meem.json index f9aae45..5e151e6 100644 --- a/types/Meem.json +++ b/types/Meem.json @@ -1 +1 @@ -[{"inputs":[{"internalType":"bytes32","name":"requiredRole","type":"bytes32"}],"name":"MissingRequiredRole","type":"error"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ERC721ReceiverNotImplemented","type":"error"},{"inputs":[{"internalType":"uint256","name":"idx","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"IndexOutOfRange","type":"error"},{"inputs":[],"name":"InvalidZeroAddressQuery","type":"error"},{"inputs":[],"name":"NoApproveSelf","type":"error"},{"inputs":[{"internalType":"address","name":"parentAddress","type":"address"},{"internalType":"uint256","name":"parentTokenId","type":"uint256"}],"name":"NoTransferWrappedNFT","type":"error"},{"inputs":[],"name":"NotApproved","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NotTokenOwner","type":"error"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"ToAddressInvalid","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenNotFound","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"totalSupply_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"InvalidNonOwnerSplitAllocationAmount","type":"error"},{"inputs":[{"internalType":"bytes32","name":"requiredRole","type":"bytes32"}],"name":"MissingRequiredRole","type":"error"},{"inputs":[{"internalType":"uint256","name":"newChildDepth","type":"uint256"}],"name":"setChildDepth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newContractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setNonOwnerSplitAllocationAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenCounter","type":"uint256"}],"name":"setTokenCounter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ChildDepthExceeded","type":"error"},{"inputs":[],"name":"ChildrenPerWalletExceeded","type":"error"},{"inputs":[],"name":"ERC721ReceiverNotImplemented","type":"error"},{"inputs":[{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"InvalidNonOwnerSplitAllocationAmount","type":"error"},{"inputs":[],"name":"InvalidParent","type":"error"},{"inputs":[],"name":"InvalidPermissionType","type":"error"},{"inputs":[],"name":"InvalidPropertyType","type":"error"},{"inputs":[],"name":"MissingRequiredPermissions","type":"error"},{"inputs":[{"internalType":"bytes32","name":"requiredRole","type":"bytes32"}],"name":"MissingRequiredRole","type":"error"},{"inputs":[],"name":"MissingRequiredSplits","type":"error"},{"inputs":[{"internalType":"address","name":"parentAddress","type":"address"},{"internalType":"uint256","name":"parentTokenId","type":"uint256"}],"name":"NFTAlreadyWrapped","type":"error"},{"inputs":[],"name":"NoPermission","type":"error"},{"inputs":[{"internalType":"address","name":"parentAddress","type":"address"},{"internalType":"uint256","name":"parentTokenId","type":"uint256"}],"name":"NoTransferWrappedNFT","type":"error"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"ToAddressInvalid","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenAlreadyExists","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenNotFound","type":"error"},{"inputs":[],"name":"TotalChildrenExceeded","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"components":[{"internalType":"int256","name":"totalChildren","type":"int256"},{"internalType":"address","name":"totalChildrenLockedBy","type":"address"},{"internalType":"int256","name":"childrenPerWallet","type":"int256"},{"internalType":"address","name":"childrenPerWalletLockedBy","type":"address"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"copyPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"remixPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"readPermissions","type":"tuple[]"},{"internalType":"address","name":"copyPermissionsLockedBy","type":"address"},{"internalType":"address","name":"remixPermissionsLockedBy","type":"address"},{"internalType":"address","name":"readPermissionsLockedBy","type":"address"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split[]","name":"splits","type":"tuple[]"},{"internalType":"address","name":"splitsLockedBy","type":"address"}],"indexed":false,"internalType":"struct MeemProperties","name":"props","type":"tuple"}],"name":"PropertiesSet","type":"event"},{"inputs":[],"name":"childDepth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"childrenOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMeem","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"enum Chain","name":"parentChain","type":"uint8"},{"internalType":"address","name":"parent","type":"address"},{"internalType":"uint256","name":"parentTokenId","type":"uint256"},{"internalType":"enum Chain","name":"rootChain","type":"uint8"},{"internalType":"address","name":"root","type":"address"},{"internalType":"uint256","name":"rootTokenId","type":"uint256"},{"internalType":"uint256","name":"generation","type":"uint256"},{"components":[{"internalType":"int256","name":"totalChildren","type":"int256"},{"internalType":"address","name":"totalChildrenLockedBy","type":"address"},{"internalType":"int256","name":"childrenPerWallet","type":"int256"},{"internalType":"address","name":"childrenPerWalletLockedBy","type":"address"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"copyPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"remixPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"readPermissions","type":"tuple[]"},{"internalType":"address","name":"copyPermissionsLockedBy","type":"address"},{"internalType":"address","name":"remixPermissionsLockedBy","type":"address"},{"internalType":"address","name":"readPermissionsLockedBy","type":"address"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split[]","name":"splits","type":"tuple[]"},{"internalType":"address","name":"splitsLockedBy","type":"address"}],"internalType":"struct MeemProperties","name":"properties","type":"tuple"},{"components":[{"internalType":"int256","name":"totalChildren","type":"int256"},{"internalType":"address","name":"totalChildrenLockedBy","type":"address"},{"internalType":"int256","name":"childrenPerWallet","type":"int256"},{"internalType":"address","name":"childrenPerWalletLockedBy","type":"address"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"copyPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"remixPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"readPermissions","type":"tuple[]"},{"internalType":"address","name":"copyPermissionsLockedBy","type":"address"},{"internalType":"address","name":"remixPermissionsLockedBy","type":"address"},{"internalType":"address","name":"readPermissionsLockedBy","type":"address"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split[]","name":"splits","type":"tuple[]"},{"internalType":"address","name":"splitsLockedBy","type":"address"}],"internalType":"struct MeemProperties","name":"childProperties","type":"tuple"},{"internalType":"uint256","name":"mintedAt","type":"uint256"}],"internalType":"struct Meem","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"mTokenURI","type":"string"},{"internalType":"enum Chain","name":"parentChain","type":"uint8"},{"internalType":"address","name":"parent","type":"address"},{"internalType":"uint256","name":"parentTokenId","type":"uint256"},{"internalType":"enum Chain","name":"rootChain","type":"uint8"},{"internalType":"address","name":"root","type":"address"},{"internalType":"uint256","name":"rootTokenId","type":"uint256"},{"components":[{"internalType":"int256","name":"totalChildren","type":"int256"},{"internalType":"address","name":"totalChildrenLockedBy","type":"address"},{"internalType":"int256","name":"childrenPerWallet","type":"int256"},{"internalType":"address","name":"childrenPerWalletLockedBy","type":"address"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"copyPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"remixPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"readPermissions","type":"tuple[]"},{"internalType":"address","name":"copyPermissionsLockedBy","type":"address"},{"internalType":"address","name":"remixPermissionsLockedBy","type":"address"},{"internalType":"address","name":"readPermissionsLockedBy","type":"address"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split[]","name":"splits","type":"tuple[]"},{"internalType":"address","name":"splitsLockedBy","type":"address"}],"internalType":"struct MeemProperties","name":"mProperties","type":"tuple"},{"components":[{"internalType":"int256","name":"totalChildren","type":"int256"},{"internalType":"address","name":"totalChildrenLockedBy","type":"address"},{"internalType":"int256","name":"childrenPerWallet","type":"int256"},{"internalType":"address","name":"childrenPerWalletLockedBy","type":"address"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"copyPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"remixPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"readPermissions","type":"tuple[]"},{"internalType":"address","name":"copyPermissionsLockedBy","type":"address"},{"internalType":"address","name":"remixPermissionsLockedBy","type":"address"},{"internalType":"address","name":"readPermissionsLockedBy","type":"address"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split[]","name":"splits","type":"tuple[]"},{"internalType":"address","name":"splitsLockedBy","type":"address"}],"internalType":"struct MeemProperties","name":"mChildProperties","type":"tuple"},{"internalType":"enum PermissionType","name":"permissionType","type":"uint8"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"numChildrenOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ownedChildrenOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"idx","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"IndexOutOfRange","type":"error"},{"inputs":[],"name":"InvalidPermissionType","type":"error"},{"inputs":[],"name":"InvalidPropertyType","type":"error"},{"inputs":[{"internalType":"uint256","name":"currentTotalChildren","type":"uint256"}],"name":"InvalidTotalChildren","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NotTokenOwner","type":"error"},{"inputs":[{"internalType":"address","name":"lockedBy","type":"address"}],"name":"PropertyLocked","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenNotFound","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"lockedBy","type":"address"}],"name":"ChildrenPerWalletLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"int256","name":"newTotalChildren","type":"int256"}],"name":"ChildrenPerWalletSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"indexed":false,"internalType":"enum PermissionType","name":"permissionType","type":"uint8"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"indexed":false,"internalType":"struct MeemPermission[]","name":"permission","type":"tuple[]"}],"name":"PermissionsSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"lockedBy","type":"address"}],"name":"TotalChildrenLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"int256","name":"newTotalChildren","type":"int256"}],"name":"TotalChildrenSet","type":"event"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"internalType":"enum PermissionType","name":"permissionType","type":"uint8"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission","name":"permission","type":"tuple"}],"name":"addPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"lockChildrenPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"lockTotalChildren","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"internalType":"enum PermissionType","name":"permissionType","type":"uint8"},{"internalType":"uint256","name":"idx","type":"uint256"}],"name":"removePermissionAt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"int256","name":"newTotalChildren","type":"int256"}],"name":"setChildrenPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"int256","name":"newTotalChildren","type":"int256"}],"name":"setTotalChildren","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"internalType":"enum PermissionType","name":"permissionType","type":"uint8"},{"internalType":"uint256","name":"idx","type":"uint256"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission","name":"permission","type":"tuple"}],"name":"updatePermissionAt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"idx","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"IndexOutOfRange","type":"error"},{"inputs":[{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"InvalidNonOwnerSplitAllocationAmount","type":"error"},{"inputs":[],"name":"InvalidPropertyType","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NotTokenOwner","type":"error"},{"inputs":[{"internalType":"address","name":"lockedBy","type":"address"}],"name":"PropertyLocked","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenNotFound","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"indexed":false,"internalType":"struct LibPart.Part[]","name":"royalties","type":"tuple[]"}],"name":"RoyaltiesSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"indexed":false,"internalType":"struct Split[]","name":"splits","type":"tuple[]"}],"name":"SplitsSet","type":"event"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split","name":"split","type":"tuple"}],"name":"addSplit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRaribleV2Royalties","outputs":[{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"internalType":"struct LibPart.Part[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonOwnerSplitAllocationAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"internalType":"uint256","name":"idx","type":"uint256"}],"name":"removeSplitAt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"internalType":"uint256","name":"idx","type":"uint256"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split","name":"split","type":"tuple"}],"name":"updateSplitAt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"enum IDiamondCuttable.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct IDiamondCuttable.FacetCut[]","name":"facetCuts","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"DiamondCut","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"enum IDiamondCuttable.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"internalType":"struct IDiamondCuttable.FacetCut[]","name":"facetCuts","type":"tuple[]"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"diamondCut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"facetAddress","outputs":[{"internalType":"address","name":"facet","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facetAddresses","outputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"facet","type":"address"}],"name":"facetFunctionSelectors","outputs":[{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facets","outputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"internalType":"struct IDiamondLoupe.Facet[]","name":"diamondFacets","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFallbackAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nomineeOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"fallbackAddress","type":"address"}],"name":"setFallbackAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}] \ No newline at end of file +[{"inputs":[{"internalType":"bytes32","name":"requiredRole","type":"bytes32"}],"name":"MissingRequiredRole","type":"error"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ERC721ReceiverNotImplemented","type":"error"},{"inputs":[{"internalType":"uint256","name":"idx","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"IndexOutOfRange","type":"error"},{"inputs":[],"name":"InvalidZeroAddressQuery","type":"error"},{"inputs":[],"name":"NoApproveSelf","type":"error"},{"inputs":[{"internalType":"address","name":"parentAddress","type":"address"},{"internalType":"uint256","name":"parentTokenId","type":"uint256"}],"name":"NoTransferWrappedNFT","type":"error"},{"inputs":[],"name":"NotApproved","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NotTokenOwner","type":"error"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"ToAddressInvalid","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenNotFound","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"totalSupply_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"InvalidNonOwnerSplitAllocationAmount","type":"error"},{"inputs":[{"internalType":"bytes32","name":"requiredRole","type":"bytes32"}],"name":"MissingRequiredRole","type":"error"},{"inputs":[{"internalType":"uint256","name":"newChildDepth","type":"uint256"}],"name":"setChildDepth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newContractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setNonOwnerSplitAllocationAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenCounter","type":"uint256"}],"name":"setTokenCounter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ChildDepthExceeded","type":"error"},{"inputs":[],"name":"ChildrenPerWalletExceeded","type":"error"},{"inputs":[],"name":"ERC721ReceiverNotImplemented","type":"error"},{"inputs":[{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"InvalidNonOwnerSplitAllocationAmount","type":"error"},{"inputs":[],"name":"InvalidParent","type":"error"},{"inputs":[],"name":"InvalidPermissionType","type":"error"},{"inputs":[],"name":"InvalidPropertyType","type":"error"},{"inputs":[],"name":"MissingRequiredPermissions","type":"error"},{"inputs":[{"internalType":"bytes32","name":"requiredRole","type":"bytes32"}],"name":"MissingRequiredRole","type":"error"},{"inputs":[],"name":"MissingRequiredSplits","type":"error"},{"inputs":[{"internalType":"address","name":"parentAddress","type":"address"},{"internalType":"uint256","name":"parentTokenId","type":"uint256"}],"name":"NFTAlreadyWrapped","type":"error"},{"inputs":[],"name":"NoPermission","type":"error"},{"inputs":[{"internalType":"address","name":"parentAddress","type":"address"},{"internalType":"uint256","name":"parentTokenId","type":"uint256"}],"name":"NoTransferWrappedNFT","type":"error"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"ToAddressInvalid","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenAlreadyExists","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenNotFound","type":"error"},{"inputs":[],"name":"TotalChildrenExceeded","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"components":[{"internalType":"int256","name":"totalChildren","type":"int256"},{"internalType":"address","name":"totalChildrenLockedBy","type":"address"},{"internalType":"int256","name":"childrenPerWallet","type":"int256"},{"internalType":"address","name":"childrenPerWalletLockedBy","type":"address"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"copyPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"remixPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"readPermissions","type":"tuple[]"},{"internalType":"address","name":"copyPermissionsLockedBy","type":"address"},{"internalType":"address","name":"remixPermissionsLockedBy","type":"address"},{"internalType":"address","name":"readPermissionsLockedBy","type":"address"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split[]","name":"splits","type":"tuple[]"},{"internalType":"address","name":"splitsLockedBy","type":"address"}],"indexed":false,"internalType":"struct MeemProperties","name":"props","type":"tuple"}],"name":"PropertiesSet","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"mTokenURI","type":"string"},{"internalType":"enum Chain","name":"parentChain","type":"uint8"},{"internalType":"address","name":"parent","type":"address"},{"internalType":"uint256","name":"parentTokenId","type":"uint256"},{"internalType":"enum Chain","name":"rootChain","type":"uint8"},{"internalType":"address","name":"root","type":"address"},{"internalType":"uint256","name":"rootTokenId","type":"uint256"},{"components":[{"internalType":"int256","name":"totalChildren","type":"int256"},{"internalType":"address","name":"totalChildrenLockedBy","type":"address"},{"internalType":"int256","name":"childrenPerWallet","type":"int256"},{"internalType":"address","name":"childrenPerWalletLockedBy","type":"address"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"copyPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"remixPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"readPermissions","type":"tuple[]"},{"internalType":"address","name":"copyPermissionsLockedBy","type":"address"},{"internalType":"address","name":"remixPermissionsLockedBy","type":"address"},{"internalType":"address","name":"readPermissionsLockedBy","type":"address"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split[]","name":"splits","type":"tuple[]"},{"internalType":"address","name":"splitsLockedBy","type":"address"}],"internalType":"struct MeemProperties","name":"mProperties","type":"tuple"},{"components":[{"internalType":"int256","name":"totalChildren","type":"int256"},{"internalType":"address","name":"totalChildrenLockedBy","type":"address"},{"internalType":"int256","name":"childrenPerWallet","type":"int256"},{"internalType":"address","name":"childrenPerWalletLockedBy","type":"address"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"copyPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"remixPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"readPermissions","type":"tuple[]"},{"internalType":"address","name":"copyPermissionsLockedBy","type":"address"},{"internalType":"address","name":"remixPermissionsLockedBy","type":"address"},{"internalType":"address","name":"readPermissionsLockedBy","type":"address"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split[]","name":"splits","type":"tuple[]"},{"internalType":"address","name":"splitsLockedBy","type":"address"}],"internalType":"struct MeemProperties","name":"mChildProperties","type":"tuple"},{"internalType":"enum PermissionType","name":"permissionType","type":"uint8"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"idx","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"IndexOutOfRange","type":"error"},{"inputs":[],"name":"InvalidPermissionType","type":"error"},{"inputs":[],"name":"InvalidPropertyType","type":"error"},{"inputs":[{"internalType":"uint256","name":"currentTotalChildren","type":"uint256"}],"name":"InvalidTotalChildren","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NotTokenOwner","type":"error"},{"inputs":[{"internalType":"address","name":"lockedBy","type":"address"}],"name":"PropertyLocked","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenNotFound","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"lockedBy","type":"address"}],"name":"ChildrenPerWalletLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"int256","name":"newTotalChildren","type":"int256"}],"name":"ChildrenPerWalletSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"indexed":false,"internalType":"enum PermissionType","name":"permissionType","type":"uint8"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"indexed":false,"internalType":"struct MeemPermission[]","name":"permission","type":"tuple[]"}],"name":"PermissionsSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"lockedBy","type":"address"}],"name":"TotalChildrenLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"int256","name":"newTotalChildren","type":"int256"}],"name":"TotalChildrenSet","type":"event"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"internalType":"enum PermissionType","name":"permissionType","type":"uint8"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission","name":"permission","type":"tuple"}],"name":"addPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"lockChildrenPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"lockTotalChildren","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"internalType":"enum PermissionType","name":"permissionType","type":"uint8"},{"internalType":"uint256","name":"idx","type":"uint256"}],"name":"removePermissionAt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"int256","name":"newTotalChildren","type":"int256"}],"name":"setChildrenPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"int256","name":"newTotalChildren","type":"int256"}],"name":"setTotalChildren","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"internalType":"enum PermissionType","name":"permissionType","type":"uint8"},{"internalType":"uint256","name":"idx","type":"uint256"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission","name":"permission","type":"tuple"}],"name":"updatePermissionAt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"childDepth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"childrenOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMeem","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"enum Chain","name":"parentChain","type":"uint8"},{"internalType":"address","name":"parent","type":"address"},{"internalType":"uint256","name":"parentTokenId","type":"uint256"},{"internalType":"enum Chain","name":"rootChain","type":"uint8"},{"internalType":"address","name":"root","type":"address"},{"internalType":"uint256","name":"rootTokenId","type":"uint256"},{"internalType":"uint256","name":"generation","type":"uint256"},{"components":[{"internalType":"int256","name":"totalChildren","type":"int256"},{"internalType":"address","name":"totalChildrenLockedBy","type":"address"},{"internalType":"int256","name":"childrenPerWallet","type":"int256"},{"internalType":"address","name":"childrenPerWalletLockedBy","type":"address"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"copyPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"remixPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"readPermissions","type":"tuple[]"},{"internalType":"address","name":"copyPermissionsLockedBy","type":"address"},{"internalType":"address","name":"remixPermissionsLockedBy","type":"address"},{"internalType":"address","name":"readPermissionsLockedBy","type":"address"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split[]","name":"splits","type":"tuple[]"},{"internalType":"address","name":"splitsLockedBy","type":"address"}],"internalType":"struct MeemProperties","name":"properties","type":"tuple"},{"components":[{"internalType":"int256","name":"totalChildren","type":"int256"},{"internalType":"address","name":"totalChildrenLockedBy","type":"address"},{"internalType":"int256","name":"childrenPerWallet","type":"int256"},{"internalType":"address","name":"childrenPerWalletLockedBy","type":"address"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"copyPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"remixPermissions","type":"tuple[]"},{"components":[{"internalType":"enum Permission","name":"permission","type":"uint8"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct MeemPermission[]","name":"readPermissions","type":"tuple[]"},{"internalType":"address","name":"copyPermissionsLockedBy","type":"address"},{"internalType":"address","name":"remixPermissionsLockedBy","type":"address"},{"internalType":"address","name":"readPermissionsLockedBy","type":"address"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split[]","name":"splits","type":"tuple[]"},{"internalType":"address","name":"splitsLockedBy","type":"address"}],"internalType":"struct MeemProperties","name":"childProperties","type":"tuple"},{"internalType":"uint256","name":"mintedAt","type":"uint256"}],"internalType":"struct Meem","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum Chain","name":"chain","type":"uint8"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isNFTWrapped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"numChildrenOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ownedChildrenOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokenIdsOfOwner","outputs":[{"internalType":"uint256[]","name":"tokenIds_","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"enum Chain","name":"chain","type":"uint8"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct WrappedItem[]","name":"items","type":"tuple[]"}],"name":"wrappedTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"idx","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"IndexOutOfRange","type":"error"},{"inputs":[{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"InvalidNonOwnerSplitAllocationAmount","type":"error"},{"inputs":[],"name":"InvalidPropertyType","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NotTokenOwner","type":"error"},{"inputs":[{"internalType":"address","name":"lockedBy","type":"address"}],"name":"PropertyLocked","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenNotFound","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"indexed":false,"internalType":"struct LibPart.Part[]","name":"royalties","type":"tuple[]"}],"name":"RoyaltiesSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"indexed":false,"internalType":"struct Split[]","name":"splits","type":"tuple[]"}],"name":"SplitsSet","type":"event"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split","name":"split","type":"tuple"}],"name":"addSplit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRaribleV2Royalties","outputs":[{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"internalType":"struct LibPart.Part[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonOwnerSplitAllocationAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"internalType":"uint256","name":"idx","type":"uint256"}],"name":"removeSplitAt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum PropertyType","name":"propertyType","type":"uint8"},{"internalType":"uint256","name":"idx","type":"uint256"},{"components":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct Split","name":"split","type":"tuple"}],"name":"updateSplitAt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"enum IDiamondCuttable.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct IDiamondCuttable.FacetCut[]","name":"facetCuts","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"DiamondCut","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"enum IDiamondCuttable.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"internalType":"struct IDiamondCuttable.FacetCut[]","name":"facetCuts","type":"tuple[]"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"diamondCut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"facetAddress","outputs":[{"internalType":"address","name":"facet","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facetAddresses","outputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"facet","type":"address"}],"name":"facetFunctionSelectors","outputs":[{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facets","outputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"internalType":"struct IDiamondLoupe.Facet[]","name":"diamondFacets","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFallbackAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nomineeOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"fallbackAddress","type":"address"}],"name":"setFallbackAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}] \ No newline at end of file