From 844cbb9a8dc2da0771d73130dbbb1d3d0dec5dc9 Mon Sep 17 00:00:00 2001 From: 0xbeny Date: Wed, 1 Nov 2023 13:21:37 +0400 Subject: [PATCH] adding quroum and pass rate --- packages/contracts-ethers/package.json | 2 +- .../contracts/.openzeppelin/unknown-51.json | 2033 +++++++++++------ .../contracts/dao-initial-data.json.example | 2 +- packages/contracts/package.json | 2 +- packages/contracts/plugin-info.json | 16 +- packages/contracts/plugin-settings.ts | 4 +- packages/contracts/src/DaofinPlugin.sol | 60 +- .../src/interfaces/IXdcValidator.sol | 2 + .../contracts/src/test/mock/XDCValidator.sol | 11 + .../contracts/test/unit-testing/daofin.ts | 286 ++- packages/js-client/package.json | 6 +- .../js-client/src/internal/client/methods.ts | 59 +- packages/js-client/src/internal/interfaces.ts | 17 +- packages/js-client/src/types.ts | 9 +- 14 files changed, 1811 insertions(+), 698 deletions(-) diff --git a/packages/contracts-ethers/package.json b/packages/contracts-ethers/package.json index c767ff8..e34cedd 100644 --- a/packages/contracts-ethers/package.json +++ b/packages/contracts-ethers/package.json @@ -1,6 +1,6 @@ { "name": "@xinfin/osx-daofin-contracts-ethers", - "version": "0.10.1", + "version": "0.10.4", "description": "The Aragon OSx contract definitions for ethers.js", "main": "dist/bundle-cjs.js", "module": "dist/bundle-esm.js", diff --git a/packages/contracts/.openzeppelin/unknown-51.json b/packages/contracts/.openzeppelin/unknown-51.json index 2e95f2c..6b80f41 100644 --- a/packages/contracts/.openzeppelin/unknown-51.json +++ b/packages/contracts/.openzeppelin/unknown-51.json @@ -111,31 +111,6 @@ "txHash": "0x6787d470b944ac8db98884cf69db54924042fdb44284917928ede67be4deddc1", "kind": "uups" }, - { - "address": "0xDac4F855CA99EEAd76A6C8A80401297BC7844944", - "txHash": "0x0d177735ec18fc1e436bb061fdda6f85d5ace2c65337b98ec5ac11f80c34475b", - "kind": "uups" - }, - { - "address": "0x18E611ae4B9625d6984399a8A27DC20167EB33B2", - "txHash": "0xe19a78a9255aff7c9cdd2973c4d439377a7d1886b554e99e2f2a5adeaa77f64b", - "kind": "uups" - }, - { - "address": "0x61D049630ec09098e7c633F4c925bcE210fdCbA5", - "txHash": "0x4916a636b8a04f294913fde7d3ba495997ce1955e4f109f39a735f64869803cf", - "kind": "uups" - }, - { - "address": "0x170923D18593459C95CB1bAD5dB3C660FFAEE03a", - "txHash": "0xa8b85b79cff7f2a65ec7e6f5dce157f8bdd0450ef692121f082c0edc661b334d", - "kind": "uups" - }, - { - "address": "0x4C021B45F2F88cd632B7F036A048fF86c0Ad697E", - "txHash": "0xa3a543d24b04acbc599c6b0689cf4e40e9fac6b3625f8162715f7bf782cd72e1", - "kind": "uups" - }, { "address": "0x7fFA05Cb509787bd30b3C82aA4AB10aAe136241e", "txHash": "0x6922a3045cb55b04e5f2bd7aca7909f41add07678d5a922d9291fc6017572011", @@ -146,41 +121,11 @@ "txHash": "0xe6686182177b6f62818991987ae8bf1c0a1769c76e2e691b5aa0cea7b5fb72b5", "kind": "uups" }, - { - "address": "0x0A7d474fF8Ed5DC3031b7e46231A8de164653F5F", - "txHash": "0x2679a49229b80664d848ae2c75d4850c8e89755d008a1b9444e2da4d74b87c21", - "kind": "uups" - }, - { - "address": "0xaccA73f4d05602DCaf1711979a857cdD79EC9ce9", - "txHash": "0x11c4fbb98f970dd7e39f583ec37ab05843dcfe4281735392c514c506c9c50907", - "kind": "uups" - }, { "address": "0x1510645A35cb834f13019Dd8Ee231D65EcE20515", "txHash": "0x497e1b92b5f0d9ee6ef9c2e6ee462222ebce88042bcbf215bc177b58a0dbc12f", "kind": "uups" }, - { - "address": "0x5A1F5749C59ffB61fE18dAe18c5cC6B7F4043F25", - "txHash": "0x028f6712c64b94f056e9364022791f6f479cdd3fd437daf4fa898b65d03e02d5", - "kind": "uups" - }, - { - "address": "0xAC2071B41eAB0C78C5D2f0989C6d9F89A5E6EbD5", - "txHash": "0x38c76d610cb7ec8220b77948f7b37f415936ca2dda98324d321ff4a4d0efb5fc", - "kind": "uups" - }, - { - "address": "0xFD746392f1e5c9B7709A26A5381bc4DD2034eB10", - "txHash": "0xe13252ebe1f01978170c852a7ef76fd3458a3ca74376d45c50d0ed4eff8b39f9", - "kind": "uups" - }, - { - "address": "0x567c4Fd40A0190AD3333e51Ec1E2b9d973Fb0027", - "txHash": "0x0e0f911e2aec656fc2ce85743961d01520aed6e341d8a7cadccda76242a13709", - "kind": "uups" - }, { "address": "0x66F2BcfD9fa1d5D48929A9D230405A47699eD92C", "txHash": "0xd1ac86c721fc0c5e49dc6758fc0cda1704269efa1158acb3496c98b532db7a10", @@ -236,91 +181,21 @@ "txHash": "0xf57a97085bb7ce6e62d96fdbb29570f46928bf24fe91517a0b5b71475f6b2413", "kind": "uups" }, - { - "address": "0x926CE1d889A29442b5bF755b6cAfA7F6F8A8f2A0", - "txHash": "0x0a5c17b0a96b7de309c7ca6cd3675b6b2c7242ddd2940637baa759694e461086", - "kind": "uups" - }, - { - "address": "0xf7d0DF647C87bb1B84AfEE7DB3ab6F24438557B1", - "txHash": "0x757548953efb6eaa59c87f95f7da7235ee55aac82af0088a64a0c0b80b651ea4", - "kind": "uups" - }, - { - "address": "0x69F55eAFE6c1E0E5a97D68Ec256935Aa8f6a5Cb9", - "txHash": "0xbed998c20aff1ae39a62f253a587e3b9208d4f6a05d9b7c778ba16e67ea28ca6", - "kind": "uups" - }, - { - "address": "0xFdA40035c5A55e7D8d4aD94a36f3105270f53f63", - "txHash": "0x69342d1977e365a52fa0b91710cdc8d67be188fdb631d42b3df1e5d0fdf9e008", - "kind": "uups" - }, - { - "address": "0xEF87ec6E55B03a010CFbce68981A698De307E7FF", - "txHash": "0x980799919653d616a0078a3bdd2c7ee934e7cff0df22474af3b8cf6abec2fc76", - "kind": "uups" - }, { "address": "0x73B486534eAcE815A5c97aF17b028af9Bf3Fe52c", "txHash": "0x8a4eb9a88ab6f9cefb591cf662dd47da0c0d3e201f52e6146627f07969412160", "kind": "uups" }, - { - "address": "0xfe0cBE9c18FA6a073bc005a946Bb0a78a7F2235F", - "txHash": "0xbe62a9649e62957bf40e413042e86302d5cfba2d5d21ce1957ab950a0b4518fe", - "kind": "uups" - }, - { - "address": "0x54b2174926c4D42Be9f5c0c0de98e25e372Bde8E", - "txHash": "0x47ee73d906cfcdec660ef4665803464a8c70357173b3a4f42a90f10fcbbd6de8", - "kind": "uups" - }, { "address": "0x1696436E4BF67dbe1f32D4Fd73e0a090f89DeBC5", "txHash": "0x270719339b1131a206704b4c23dd212c719587724c342c5d1e687996c90ab993", "kind": "uups" }, - { - "address": "0xe1BfD1a2313E1555E13Fa84937822eC390e10ce2", - "txHash": "0x671994b680a29f1488d4b4a2926856aa78ae19f45c32a0177ec69e3844e4a683", - "kind": "uups" - }, { "address": "0x4cee14C16b61AC3B815Ff7100B6AF30A8d75013B", "txHash": "0x1875b041abae434a5357cfaf5ca57dc3944a4227fd0e7cc4831ed2d9a64b4540", "kind": "uups" }, - { - "address": "0x09e10Bc2ce5D7eE6dc8F6F75eae186f68338dd28", - "txHash": "0xf9a6178024d9125acadda3c4f85ced194449692123c3ff4e6a17656dc02b12d9", - "kind": "uups" - }, - { - "address": "0xbe05f2F77542fB89F2728EFA0CC358FDb1F24203", - "txHash": "0xec46156116f58a4019a95b45c1d4a34088b2883ff05c67d1ff1beff46fe5a1ae", - "kind": "uups" - }, - { - "address": "0x22248cE9CA55C7Fc12584906d2Fb6bE8825B9A9c", - "txHash": "0xff29556fa596e660407f8dbdd1bee7af859d1d5fd317d5e672f1c61cb58e411c", - "kind": "uups" - }, - { - "address": "0x433ADDb98dD51aF3A8f1883df970feba3E579a20", - "txHash": "0xa7a5955e29e6d5801efa2cab475d5df64a56d82c1e4d768fb42a71abab4c24d4", - "kind": "uups" - }, - { - "address": "0xAC7D2bbFC15bb98b25165c1a5E437Da2342dE46f", - "txHash": "0xf6c20c939f7094032a0fab389a21eed52c4ca665d74f83ba535ed3426214145b", - "kind": "uups" - }, - { - "address": "0x2BffF5cb6318aA15396Fd9aA60ae4Eafb6685735", - "txHash": "0x315508887a3ee68959e73faa320e6798765fbc042b99c411696917414d694944", - "kind": "uups" - }, { "address": "0xA5A5F688eFEa2d039AD2299ad1A62423b2c8E03d", "txHash": "0x885dd3fcf5a8a65f8d34d910bf748c4c67c0a6ec9508cadfbe208b2ec41d9a34", @@ -341,11 +216,6 @@ "txHash": "0xd0bc4abe8dba5d70db767525304c130c8fb2a57dcdf3695a73f8d25095e29c2a", "kind": "uups" }, - { - "address": "0x328E17628CF63B06a41C511F4BC28421A812017E", - "txHash": "0x250fd54e5df728fb01a0925770dd7f0c6910e2f611cc5244f92054a8a880ee2f", - "kind": "uups" - }, { "address": "0x0b11b90B356F57a886158554b07DDeCd7bB64475", "txHash": "0xfada50e702a9dde27173e24da42e44b6e7b52b9f4407cb8813e8bb3d287ef642", @@ -356,16 +226,6 @@ "txHash": "0x2177e30223007a42be423629e6df3ef82a88b5a2cc80b50114af6569a936dc22", "kind": "uups" }, - { - "address": "0x56569553A9fF59aE82Dca1Fe2F454589496171BE", - "txHash": "0xcf3f525cc43f395331802b324d7a5ea1219adcc6b0bb5a4b5a7015cda2cdefe7", - "kind": "uups" - }, - { - "address": "0x57DaeF4A1FC42823f3F86240C100a32010292E70", - "txHash": "0x1e8f3c4344879c93aa52da53ad1eb9e0f43cfad3c88fe8c163fabca3572b30d0", - "kind": "uups" - }, { "address": "0x7Ff17051aD09AcE27bff47B518fb11C596d95eD2", "txHash": "0xc8bc9ddc5002dca5734f8d8122ae4b1419c5081e9463b81a351530afaecb0afc", @@ -406,96 +266,21 @@ "txHash": "0x6d29fc8d6024fa70447d96d394b17995cd99597ac371650b6042545898472a45", "kind": "uups" }, - { - "address": "0xCC655154677DD2A0B425cAe95E6A876457C130f3", - "txHash": "0xdec06670b83744141fcbaccdbe84d93740b98709ec0fc36a3eb33f1fa2b9c62f", - "kind": "uups" - }, - { - "address": "0x8F7e160d87BA5311E106E862BAbfC04E4f496088", - "txHash": "0x7e030efaa081eb2cd8b6c34c1beba083d113d64a82ea558e01bb07fa5e4ba962", - "kind": "uups" - }, - { - "address": "0xE92D669bF46a0387E1B2ba5F1b8AFBD3E156B14A", - "txHash": "0x5b77d2df9dc04b7984065fe43fdfefe1fc6efecffd8800ac21369f63124c9549", - "kind": "uups" - }, - { - "address": "0x4482de93c0A0fc52d1fcbD7Dc0Ad84bC21865Db1", - "txHash": "0x0b2192fe22cc8b37adfa2e86571b8b7194f3085c7dc1f0cac3c451b99dfa90f6", - "kind": "uups" - }, - { - "address": "0xFc70b6692d1Da0eD72BbACD662ad598eB068DEE6", - "txHash": "0xcb3a722c0d0696a9545fc5351477544c1ecd729cdc648b379171e4cd6c1fd855", - "kind": "uups" - }, - { - "address": "0x1c2b445594697a76B45E781975420641Ed7EE076", - "txHash": "0x3e0b016bb2603791f31ec9a6a19daca0e0edc8b1f7a457b626f67a5c95519d51", - "kind": "uups" - }, - { - "address": "0x173F4DF1F880F2f3243724c89B678c0d512E212F", - "txHash": "0x84f5941335e63b7eb14f866fe6e0e3183c26cbb79ef5ffe1a4ba7c7108b23753", - "kind": "uups" - }, - { - "address": "0xa54D45cCE8A3c2ea98d5b367e06565f62Df9A6Cd", - "txHash": "0xf2fcff90982d44acb994676373e424f327d011fed638e638e3055f496c828176", - "kind": "uups" - }, - { - "address": "0x5C0458E7Dc8Ab964e2c75751DAD5c396efB84731", - "txHash": "0x8318c4cadcb80a6f57486ecca8d860590e0f6abbd056f9006a95f4e3428ce963", - "kind": "uups" - }, { "address": "0xD4DE5341b99f57Cb987DfCC7AB4FEEeB2FEa67b9", "txHash": "0x44ea8e3c98a704421b9ac6f8ae8621ba710d30c2273a1909f7cce26ec6bd4a02", "kind": "uups" }, - { - "address": "0x3c8e0fb0c889EAa8946cF7557204d011032BfdA5", - "txHash": "0xf0c7236ac4bc8ff9d5680776b07ba293d14a6d55cbf97b10dcdc31b9ae7d0869", - "kind": "uups" - }, { "address": "0x7AA7a25BECBF3A5e67407e89B3E8F7288813c7D0", "txHash": "0xd249f4fdd7c02b11be483bba8837a2ee78a7aac6f9224311f1fd44ff5b83c385", "kind": "uups" }, - { - "address": "0xDa4978fb5adfF99D579EF220cF69284762E91a0f", - "txHash": "0x4e4db4ba28ec33d655966f3c81a1e7c1bab23d27f8611f40f91533051c3d8959", - "kind": "uups" - }, - { - "address": "0x808280D6171ff50F005f6E323f6a8aC92408704f", - "txHash": "0xce9a485f87e16b26b004945dc9ee99e389aed4f18f7e99423386e41938f7f3df", - "kind": "uups" - }, { "address": "0x93a1BEa26EE2e60CBC1642c44eFfAb8f6f7E39ba", "txHash": "0x7b24eb391c3eff6cb433d5e2f3393b4982821f0f05eea813294b8a57f635b5f4", "kind": "uups" }, - { - "address": "0x40389D60dD1CbFA9e83AE9DCA6CB68B0713b3981", - "txHash": "0xd354827e5d8ac2f8af392e36a47c6d09cf624b40f31cf4d18b9a9a27c215e40d", - "kind": "uups" - }, - { - "address": "0xd7736752fB7AEcbCeF5CEEf2da3c9520e8C09683", - "txHash": "0x1c6e09ec08102abfd3e66a2661e4d2c2f4a1861a608c8cfd0e1698f138deeb40", - "kind": "uups" - }, - { - "address": "0x31fdb02709BAFf39820cB373A9baE1E79D7c69c1", - "txHash": "0x0b6fbcae4f25f8194346068e903bf2f0666880222c4efc17180f3a3b8d50ea83", - "kind": "uups" - }, { "address": "0xCA2468e9b29fC0aa3d21b75c2E51d88713635ab9", "txHash": "0xef177d8f80ad9341427ccc2a8955ed19c40dcd6bdd4df69112bbc7640c7b5769", @@ -506,21 +291,6 @@ "txHash": "0x96803a7756939302400a2394399ca274b1b708719af682b57414884fdd5c8cb3", "kind": "uups" }, - { - "address": "0x3746f5C40A3736485d78506706155313aa1b20d1", - "txHash": "0x7a6fa3236424e514eaed7d977fd48ef07dd2e941e464fd76c030234c1118a00f", - "kind": "uups" - }, - { - "address": "0x42Da56FD2C439cF18e46Fb1E5f81B2cA6Cda19c2", - "txHash": "0x5e4b63a13c564bf529630a46b3e6560e4b8a01900beb7ab2c83c420edd111d28", - "kind": "uups" - }, - { - "address": "0xa78aB7dF346De90b7B796dfF1a186Be48454445E", - "txHash": "0x7404d7ff65c1baf2173b51f848b1b151afdcc129f2d20d6515b9b98a11bac70d", - "kind": "uups" - }, { "address": "0x2CF39E45D4133d3AC7913dd86caE9438CF9c0Dff", "txHash": "0x2e264eaee862fe565ed064d150fc4e355cdc08ccf838207cc3d4a766c3eeb571", @@ -541,16 +311,6 @@ "txHash": "0x7cfe45d97d73a41253864bd4a409402e190c1305850eff7578afbf707f62a9b9", "kind": "uups" }, - { - "address": "0x49b92DaD3619F82bE4bd9b7D1411703668726396", - "txHash": "0xcf293bdd60dd1b92de2a1fd7f777ebbd488227b7fd41f826b8abb15ee5fa0330", - "kind": "uups" - }, - { - "address": "0xd6b823C0EcC0Cec376911e1a8527eB85bD1bbc22", - "txHash": "0xeed9ca3a93e6e6c477e1cf0aefe492e971c65da1e839a97ea4aee97566da5da2", - "kind": "uups" - }, { "address": "0xe15C596E74A65EF92D01242f3Dd91eEA5E8F8510", "txHash": "0xd3396a97d050581534fa6af40d68d282f3dda1cb5c71486f870aa68f3bb3493e", @@ -1835,143 +1595,804 @@ "address": "0x975Ab64F4901Af5f0C96636deA0b9de3419D0c2F", "txHash": "0x20b99af7e0b9f2163462df02ddfc9a34f0ebe5db76442765f69d1d37d8e01ec1", "kind": "uups" - } - ], - "impls": { - "6c4d42df69f915d010979911b0b3b1b2a89cadb0e7c68fec28217668f3ba6af3": { - "address": "0x0ed64d01D0B4B655E410EF1441dD677B695639E7", - "txHash": "0x77b4ef766b20167e4142540b83ad7fcc15776dfe936ea4fdf0c9f77e89a72482", - "layout": { - "solcVersion": "0.8.17", - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC165Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" - }, - { - "label": "_supportedInterfaces", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes4,t_bool)", - "contract": "ERC165StorageUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol:24" - }, - { - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage", - "contract": "ERC165StorageUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol:54" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC1967UpgradeUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169" - }, - { - "label": "__gap", - "offset": 0, - "slot": "151", - "type": "t_array(t_uint256)50_storage", - "contract": "UUPSUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111" + }, + { + "address": "0xE92D669bF46a0387E1B2ba5F1b8AFBD3E156B14A", + "txHash": "0x0afefa90a8b9f9a0f5e61716d4ef452338eafe267c3b9e768e41f9d0901934e4", + "kind": "uups" + }, + { + "address": "0x926CE1d889A29442b5bF755b6cAfA7F6F8A8f2A0", + "txHash": "0xde8f0ec5a234929a91c5dfa45e84d22902c8dde1c2160ed44b7fcff4c4a98f3d", + "kind": "uups" + }, + { + "address": "0x18E611ae4B9625d6984399a8A27DC20167EB33B2", + "txHash": "0xb2eff52a7e2aa67a9559b595cf12d8d35590e5068ca6f6b54a7942410eca0e58", + "kind": "uups" + }, + { + "address": "0xFc70b6692d1Da0eD72BbACD662ad598eB068DEE6", + "txHash": "0x14779afa25f3e99daf1e0fbbc492cc0956232a927f435a6c6b64475bf9a80085", + "kind": "uups" + }, + { + "address": "0x69F55eAFE6c1E0E5a97D68Ec256935Aa8f6a5Cb9", + "txHash": "0x8745da703b0662d5b1b368eeb2b076d28d1d22bdf6c9dcc142ddbac35c3ac4a3", + "kind": "uups" + }, + { + "address": "0x170923D18593459C95CB1bAD5dB3C660FFAEE03a", + "txHash": "0x5301c04e9db53e8834a91a6c17a3e1e5d9b50331c741b29b70455f35cbcc3621", + "kind": "uups" + }, + { + "address": "0x173F4DF1F880F2f3243724c89B678c0d512E212F", + "txHash": "0x5be7b3f460cd0bb200bbdfb4e74281be9748a740ccbb56b4a52b5a9e938a3f1c", + "kind": "uups" + }, + { + "address": "0xEF87ec6E55B03a010CFbce68981A698De307E7FF", + "txHash": "0xa88a6b17570eb4bf3b8543e5621712a55022989aa2fcab10e513550eb11e26b4", + "kind": "uups" + }, + { + "address": "0x5C0458E7Dc8Ab964e2c75751DAD5c396efB84731", + "txHash": "0xac1f5976f7d41c75e72456a800baf398a7608e0718646b51dad80528cd6a11ff", + "kind": "uups" + }, + { + "address": "0x54b2174926c4D42Be9f5c0c0de98e25e372Bde8E", + "txHash": "0xc8426f251108a1f4747915f21bd8aa0c830ff0f1e6029609f2e527805aad1e75", + "kind": "uups" + }, + { + "address": "0xe1BfD1a2313E1555E13Fa84937822eC390e10ce2", + "txHash": "0x29aab862a733a24239dd3c6a97cd9bbd341be36aa40f8621591ec3315038d619", + "kind": "uups" + }, + { + "address": "0x808280D6171ff50F005f6E323f6a8aC92408704f", + "txHash": "0xa0372012d6073659f8e719172e0639a93b42ffb9494163a895d59a967b2d0304", + "kind": "uups" + }, + { + "address": "0xbe05f2F77542fB89F2728EFA0CC358FDb1F24203", + "txHash": "0x001c06489e49f4263d45907051f8f0424ebb2847c426b07d820d8b9d6c486fa6", + "kind": "uups" + }, + { + "address": "0x22248cE9CA55C7Fc12584906d2Fb6bE8825B9A9c", + "txHash": "0x110496dded2d59160367503333a430b8a6c8cced61323aa1875a34d4d8d7096b", + "kind": "uups" + }, + { + "address": "0x433ADDb98dD51aF3A8f1883df970feba3E579a20", + "txHash": "0xd84623f2039dc1aecb9490f67b26340f87975eab8fda4c10437f2ded3d8db04c", + "kind": "uups" + }, + { + "address": "0x0A7d474fF8Ed5DC3031b7e46231A8de164653F5F", + "txHash": "0xaad025d560b8d9780f4d03ba403d3c604d5c8c1ecfc5c3771462d06950798c59", + "kind": "uups" + }, + { + "address": "0xaccA73f4d05602DCaf1711979a857cdD79EC9ce9", + "txHash": "0xf886d30ad3e3ccb57cb94cade34c9ff2bd337fe002a1af9ab9d1685bcf9cf231", + "kind": "uups" + }, + { + "address": "0x3746f5C40A3736485d78506706155313aa1b20d1", + "txHash": "0x3de3dc339058324e96b74877b604f2f0343fd60560625ea6cb0ad4fd10736aab", + "kind": "uups" + }, + { + "address": "0x42Da56FD2C439cF18e46Fb1E5f81B2cA6Cda19c2", + "txHash": "0xda474dad4bf9d73b21d97e0fe3f9cd54639560472595863e8f33d1700a156551", + "kind": "uups" + }, + { + "address": "0xa78aB7dF346De90b7B796dfF1a186Be48454445E", + "txHash": "0x34ddb89aa1aac749d0832845be3e1d3e7328abd6c7cf342d5858ebec0c0c97ec", + "kind": "uups" + }, + { + "address": "0x567c4Fd40A0190AD3333e51Ec1E2b9d973Fb0027", + "txHash": "0xeb57110d2b65459b460d00dd37f7c63c54e06fe9d4b84d5bc88923b4695ae990", + "kind": "uups" + }, + { + "address": "0x56569553A9fF59aE82Dca1Fe2F454589496171BE", + "txHash": "0xacc7d4191ddd3d70a6496752dfae55b7bacee3ca431c359a17645ba00d046d2c", + "kind": "uups" + }, + { + "address": "0x57DaeF4A1FC42823f3F86240C100a32010292E70", + "txHash": "0x74f958bbd20278f5acf208ca929a4968ac8433b1cf936438bccb9fe6ee00a06f", + "kind": "uups" + }, + { + "address": "0x720D408045C46CD8c104DABbf2E27da84A5B7199", + "txHash": "0xaad99e6679aa37f99ab2dd664a5c9fe06e717685c8b9e2a8bdb0385964b576a1", + "kind": "uups" + }, + { + "address": "0x7d2b530061F1203dDeb2dA6950a5e8740dB1Cf1f", + "txHash": "0xcc8690de12f55f0c61bb0a300e7239be704dffb04aa17428e01616111a75846f", + "kind": "uups" + }, + { + "address": "0xedC5f40C4b42a6fC50aa4773032478CFC2FF5A9e", + "txHash": "0x241f6fab6d1a5b10f28b2656021e16b9893b9e497229925bcbdfe94def30c9da", + "kind": "uups" + }, + { + "address": "0x394849BDC5ac0e856758dd0b5403DA13aE51872B", + "txHash": "0xae32e501f4278c60ca3b12d6d45273254e74f15b72d435bb0ae47443686e4666", + "kind": "uups" + }, + { + "address": "0x41287C171a884Ce58619dBB18f5ba292e1dD5356", + "txHash": "0xebd28aa77d342a1acfecefedc391a9a07c67e4b965d4253261b3b4682197b28b", + "kind": "uups" + }, + { + "address": "0xCc1175a97cd658B242C4abD25bCc5cC82031a0e4", + "txHash": "0x989e983727806ab3ab9c0e089213666a4a9c7a3270e913a80968ab67159c3aa4", + "kind": "uups" + }, + { + "address": "0xb931814903598e19B2314ade394fD0dBe95444b2", + "txHash": "0xd77d781ea49fc313f52e692a59afeddeb43e31e983083a8b6cd4a66248331d54", + "kind": "uups" + }, + { + "address": "0xdbAE48c59f1067397345247c6BCf46e6E22BfE8a", + "txHash": "0x1146cde8e224876e2a8229991d1ba08ad4cc903e99f5c934e28f657964ec5b66", + "kind": "uups" + }, + { + "address": "0x82BC64F7Cb008F402E001E5FefEfc7266F6318a0", + "txHash": "0xbd16d7dc43ce02eb975204cc78d03212d51715aa90cd4458c2bfdd55262f0076", + "kind": "uups" + }, + { + "address": "0x3c9aB75322E64515bdd9AeAE267d9c321F3C410D", + "txHash": "0xfcf2132cdb0baacbee5c95b978855e96c0edded5ad047ca6ed0d820f933953c8", + "kind": "uups" + }, + { + "address": "0x7e654dABe0318970D85C729e6d19B986F7A4384a", + "txHash": "0x843e1a3ed4424ecb16acee6c53ca308f8891ea6b82925e90210639cd0ee62b30", + "kind": "uups" + }, + { + "address": "0xb561ED70F75c2e9d3E23cd424D7716c6530F2D5F", + "txHash": "0x0b29a7f19fcb6f7acfda0a95162e47a7700f70d543745db859a9147ae52e9c3e", + "kind": "uups" + }, + { + "address": "0xddD1D47eA9f486cDEf609374CCEFd184F647DF10", + "txHash": "0xc6f1a0879220e164112c0a122cb6bb4692da58a2db0e927428e1fe25b7590080", + "kind": "uups" + }, + { + "address": "0x11dD44F8A960f99F803CCbb21c5Fe5d79957B18d", + "txHash": "0x21ffb1821a73061c4e30da7c24ad1433a84a09f62cc379a018e27e8f9d69cbcc", + "kind": "uups" + }, + { + "address": "0x3865cE97A72fde49018DeC43b02fb7Ef335c3d68", + "txHash": "0xedaa9eaa144edbf17f4bfec8b88d959a2ca032d5b0df7b84bac87225bf180410", + "kind": "uups" + }, + { + "address": "0x651E879e0083b99A1151818e77E1779a81ac8631", + "txHash": "0x1368e35f20a39b45e64f514e9ad365cba88c616e223929c6e97c2b047710260c", + "kind": "uups" + }, + { + "address": "0xa182fD0146E71593e8FaDF85d681A06917f5446F", + "txHash": "0xeca282596b5eb9f4769dd60d706b79a1bea91bdd9694b0dfaa36299b2f3a83dc", + "kind": "uups" + }, + { + "address": "0xdc9C6e5522F0aEACEA86bA299Cc815Eb2C31c903", + "txHash": "0xf0e3680db50dfb105a81b205297ff02c12fe14ffcee354791b02aad8e8c30efa", + "kind": "uups" + }, + { + "address": "0xCC655154677DD2A0B425cAe95E6A876457C130f3", + "txHash": "0x1cd88f7831d26e061a1d31fb2a0ed57eba1feacbd84f98c87e428b61145cf186", + "kind": "uups" + }, + { + "address": "0x8F7e160d87BA5311E106E862BAbfC04E4f496088", + "txHash": "0x246ccaee2109a83b2bc716f490146ec4df19283bdb7877753c81cf181b6daa60", + "kind": "uups" + }, + { + "address": "0xDac4F855CA99EEAd76A6C8A80401297BC7844944", + "txHash": "0xb2c75818053e165d5c363172498df6eaf7c185345283bb7f98c4fba553a06df5", + "kind": "uups" + }, + { + "address": "0x4482de93c0A0fc52d1fcbD7Dc0Ad84bC21865Db1", + "txHash": "0xea58c93154d7cb15eb40748e125da8e353289b7c4e2c52a38c42b0dac5b4b332", + "kind": "uups" + }, + { + "address": "0xf7d0DF647C87bb1B84AfEE7DB3ab6F24438557B1", + "txHash": "0x4e0a5aff5212187536272d6742e78470c0337edace2b1e25fe5c5ed451f591f3", + "kind": "uups" + }, + { + "address": "0x61D049630ec09098e7c633F4c925bcE210fdCbA5", + "txHash": "0x447738012439056455a79e556c39152a43eb9d3d6b89a0e3af7dd3882256d23f", + "kind": "uups" + }, + { + "address": "0x1c2b445594697a76B45E781975420641Ed7EE076", + "txHash": "0x958b7166dec87f6752cdbe3c7a8e2f0a8140e24481b8b63d329dbee8c968618c", + "kind": "uups" + }, + { + "address": "0xFdA40035c5A55e7D8d4aD94a36f3105270f53f63", + "txHash": "0x09ae7c3f3f30ba6a0df9fb89854df8cc13db3ece5f1c4948aec168298e1d6dc5", + "kind": "uups" + }, + { + "address": "0x4C021B45F2F88cd632B7F036A048fF86c0Ad697E", + "txHash": "0x66b18ab26132716ad5653ad5e1ccf109fae18d3129fa8a50b897406d8dad2302", + "kind": "uups" + }, + { + "address": "0xa54D45cCE8A3c2ea98d5b367e06565f62Df9A6Cd", + "txHash": "0xe3342c484832a7688e665da35e940759fb70d9d15cf392d7fa867c8e1fdc885e", + "kind": "uups" + }, + { + "address": "0xfe0cBE9c18FA6a073bc005a946Bb0a78a7F2235F", + "txHash": "0x9c7bad2fc1e66a1bc6eea6e4b69365488efea4ff63b93eda8e915ae5fdbb8b74", + "kind": "uups" + }, + { + "address": "0x3c8e0fb0c889EAa8946cF7557204d011032BfdA5", + "txHash": "0x5513609a6d83a38ec97aeb868003cb13b27af4d47ee7855d4715be39086bc719", + "kind": "uups" + }, + { + "address": "0xDa4978fb5adfF99D579EF220cF69284762E91a0f", + "txHash": "0xdce6f98beaebbee81559b6be49a6660afa99dbafd2760b14d37f8f40183f96f1", + "kind": "uups" + }, + { + "address": "0x09e10Bc2ce5D7eE6dc8F6F75eae186f68338dd28", + "txHash": "0x99c5e5a111882b17f2764f04ad17c672fba20b26d36cd2ab64fa72a21fd9e00d", + "kind": "uups" + }, + { + "address": "0x40389D60dD1CbFA9e83AE9DCA6CB68B0713b3981", + "txHash": "0xca2a1630e441230047260fcbae9581ed812169ef176b1d63d8707a3fc93cd2df", + "kind": "uups" + }, + { + "address": "0xd7736752fB7AEcbCeF5CEEf2da3c9520e8C09683", + "txHash": "0xd2da1c8804bd0e67bbf8c909888de324d9706d89f91ada08178042ec53944fcf", + "kind": "uups" + }, + { + "address": "0x31fdb02709BAFf39820cB373A9baE1E79D7c69c1", + "txHash": "0x6f1c7bb4058dd761f88f9d5cfeff5163698a173424d8e7c999d7b3c49dbe698b", + "kind": "uups" + }, + { + "address": "0xAC7D2bbFC15bb98b25165c1a5E437Da2342dE46f", + "txHash": "0x684db77e9ff2535bbaa63214fa11173e717050293d62976fc3f35231f9bcfcb0", + "kind": "uups" + }, + { + "address": "0x2BffF5cb6318aA15396Fd9aA60ae4Eafb6685735", + "txHash": "0x4288f5e25e59853ea70c33aef970cb32cef90ce739fec7cc5b95cdbe5654d502", + "kind": "uups" + }, + { + "address": "0x5A1F5749C59ffB61fE18dAe18c5cC6B7F4043F25", + "txHash": "0x4acc8df2a98452fdae3d2c09035f6088468a2e65c61d5acb9226d76803ba5035", + "kind": "uups" + }, + { + "address": "0xAC2071B41eAB0C78C5D2f0989C6d9F89A5E6EbD5", + "txHash": "0x9d9f563d5fdbcde788e7f77551b10061230056cb8ec9a7b24f619e28894bac90", + "kind": "uups" + }, + { + "address": "0xFD746392f1e5c9B7709A26A5381bc4DD2034eB10", + "txHash": "0xe4c4dfe29f4cc7844f899674cb682aeaba76ee8662b946d2a66686790aa621a7", + "kind": "uups" + }, + { + "address": "0x328E17628CF63B06a41C511F4BC28421A812017E", + "txHash": "0x04963478d9a536fdd9c973e6b3fd31ed6708f8fe37ba19b08af62d52b48870dc", + "kind": "uups" + }, + { + "address": "0x49b92DaD3619F82bE4bd9b7D1411703668726396", + "txHash": "0xbcb78049ef40f5acb5adbbfb2ddafdd785fbc9d0fc16e1d2fd5018c708590c0a", + "kind": "uups" + }, + { + "address": "0xd6b823C0EcC0Cec376911e1a8527eB85bD1bbc22", + "txHash": "0x9b81cb768a7651de7ec323e5fcc63e9117e62e608f4ae4e3e51ee5e19de7e999", + "kind": "uups" + }, + { + "address": "0xC45E99dA73f2271cA4112d1bF0B03Ee2Acd394bA", + "txHash": "0xdd4c2d59d27f44730921f93a4dee985e1b7a42dda8e0523ac8f663de674740b7", + "kind": "uups" + }, + { + "address": "0xd0113F38B0158637A905d8af337c00F180afC322", + "txHash": "0x81e5eecb977c3f27f8ce34a9bf1d758bef5ebe80b5db1cbc6f1d98590382dfcf", + "kind": "uups" + }, + { + "address": "0x2C199383f2d030E9ad3a4692AaEecDEB754B00a6", + "txHash": "0x99ca962b2492a8b417f5daedfb31a5b387907cafb7ed56549433a3dda974fa86", + "kind": "uups" + }, + { + "address": "0x98dC8F5cE99A447193cA717B51368838D6862e8b", + "txHash": "0x5624fa2a25b2974f0ad1c5e062db1263fad2c92b7425728371dc94d2d4ac613c", + "kind": "uups" + }, + { + "address": "0xff5C7021Bc1b1f724224F2063b11B17c038AF77e", + "txHash": "0x88f1a13dae26e094cdf089832fd9e09c1059926e47e6e29909cda328d4eebada", + "kind": "uups" + }, + { + "address": "0xcBc17033af0133c8E02D13B236adAa95963e441C", + "txHash": "0xa57b5a450983346123c73b2b54cf2ccb09c4428673d8cfcca3c9584c42ebc905", + "kind": "uups" + }, + { + "address": "0x0206561d44Cd3618585c4A6492E5FfcAbe03c4Bf", + "txHash": "0x2f7f43999a9419b0ebf5a8ba14c35386779ec0d5fb7db8b3dd96313b6f3d3f2b", + "kind": "uups" + }, + { + "address": "0x2684594e352ADC87A0018469df34E030229B1819", + "txHash": "0x069f911d1d4cb8249b0b961d2ef24d2b077ad95a10780554ec315b86bd219b7e", + "kind": "uups" + }, + { + "address": "0xab5b61b429297cdcCF18C1EF07F1E87b7581B32a", + "txHash": "0x830ced00c2b4fa39e608f2bb12b4337b15867d00bd80dea795c8be2e8f0d75a6", + "kind": "uups" + }, + { + "address": "0x9F512Aabd9e086fb2436EFbCddCC3C23710899b6", + "txHash": "0xd7ca629bfe6e717d95dc38624c0efe0753bc19df0de8d5b82bcf0c5306b6b2f6", + "kind": "uups" + }, + { + "address": "0x743f8f8add723c7bDf610bE1d4eBA5a8F7921282", + "txHash": "0xbb2481118f0c4b3fa7b54e24fecd20d4d042e83bd881cbcf1b777f3a8d1ef935", + "kind": "uups" + }, + { + "address": "0xf0Fdc32A252e3733c370a8d6ab0bbb84F42184f6", + "txHash": "0xbbb2aed0eebfc2d55d67325750d2054b6e1fc7ea553b2cbc1f099bd87313f617", + "kind": "uups" + }, + { + "address": "0x07E57D22F0aD077b1e5F9FD75b858f8C508AC1bE", + "txHash": "0xab03db24177acb3c03e9c770bd40388467ee0883b63f3426aa15a597ec71a73d", + "kind": "uups" + }, + { + "address": "0xD52033cb20AEA6C50fA419091e882de0833CE024", + "txHash": "0xc2ff292b4e332c534a5a962ae361026e702105fd8d60f93130f125ccfba95541", + "kind": "uups" + }, + { + "address": "0xADf6D5F4F59818166BA87558e8a7EfE1Aa32eeaE", + "txHash": "0x716c441177ed5064eb50291b45b8ebad6ef5aef618b2e6a00cab79018b4b889b", + "kind": "uups" + }, + { + "address": "0x5C7bA1270F5E86d9a3465F94b04D108162770222", + "txHash": "0x30b8113fb65ff4c73e36e3c5823179843975682459f06a46874d4f69dce33a47", + "kind": "uups" + }, + { + "address": "0xB0C2a2413Bde6F294C04413E4439A153764ABa68", + "txHash": "0x5fe53e5b0682724c1339ef69db7c3293fbda1ba0b23daf1300b5a05f080a64fb", + "kind": "uups" + }, + { + "address": "0x4C1DA0d1Cf4a04Fcbd0d98F3F7875e3F7488Dd3f", + "txHash": "0xfefa0cc3abdb3de12d3e57908b01aeda9df9fb83d622cdcc199148a0c41f3708", + "kind": "uups" + }, + { + "address": "0xD99500A2d5f4B398937e6f0687a94310e45fC3a9", + "txHash": "0x797e29a497c5713c67a482b731664df5d721ab079abb8da53de47c8aafad76f6", + "kind": "uups" + } + ], + "impls": { + "6c4d42df69f915d010979911b0b3b1b2a89cadb0e7c68fec28217668f3ba6af3": { + "address": "0x914Ce88DbBfE0610f2aCa291d587d9c4F98eDec3", + "txHash": "0x841853f26cdc6a9ceb43505342fabcddc5ee69f7cbde3453388338f069712e9c", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_supportedInterfaces", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_bytes4,t_bool)", + "contract": "ERC165StorageUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "ERC165StorageUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol:54" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111" + }, + { + "label": "permissionsHashed", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes32,t_address)", + "contract": "PermissionManager", + "src": "@xinfin/osx/core/permission/PermissionManager.sol:31" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "PermissionManager", + "src": "@xinfin/osx/core/permission/PermissionManager.sol:402" + }, + { + "label": "callbackMagicNumbers", + "offset": 0, + "slot": "251", + "type": "t_mapping(t_bytes4,t_bytes4)", + "contract": "CallbackHandler", + "src": "@xinfin/osx/core/utils/CallbackHandler.sol:11" + }, + { + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage", + "contract": "CallbackHandler", + "src": "@xinfin/osx/core/utils/CallbackHandler.sol:54" + }, + { + "label": "signatureValidator", + "offset": 0, + "slot": "301", + "type": "t_contract(IERC1271)5985", + "contract": "DAO", + "src": "@xinfin/osx/core/dao/DAO.sol:74" + }, + { + "label": "trustedForwarder", + "offset": 0, + "slot": "302", + "type": "t_address", + "contract": "DAO", + "src": "@xinfin/osx/core/dao/DAO.sol:78" + }, + { + "label": "_daoURI", + "offset": 0, + "slot": "303", + "type": "t_string_storage", + "contract": "DAO", + "src": "@xinfin/osx/core/dao/DAO.sol:82" + }, + { + "label": "_reentrancyStatus", + "offset": 0, + "slot": "304", + "type": "t_uint256", + "contract": "DAO", + "src": "@xinfin/osx/core/dao/DAO.sol:86" + }, + { + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)46_storage", + "contract": "DAO", + "src": "@xinfin/osx/core/dao/DAO.sol:422" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)46_storage": { + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes4": { + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_contract(IERC1271)5985": { + "label": "contract IERC1271", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_address)": { + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes4,t_bool)": { + "label": "mapping(bytes4 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes4,t_bytes4)": { + "label": "mapping(bytes4 => bytes4)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "a0137fad191e23f7e912f57d9be664b41f3147ee5a91f411b30fb26bc4f9014f": { + "address": "0x66F2BcfD9fa1d5D48929A9D230405A47699eD92C", + "txHash": "0x3f0985361c59e3d4ffe247da86d3c235855e1557d4f7bcb4867752dd1ae0cb59", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111" }, { - "label": "permissionsHashed", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "dao_", "offset": 0, "slot": "201", - "type": "t_mapping(t_bytes32,t_address)", - "contract": "PermissionManager", - "src": "@xinfin/osx/core/permission/PermissionManager.sol:31" + "type": "t_contract(IDAO)8421", + "contract": "DaoAuthorizableUpgradeable", + "src": "@xinfin/osx/core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol:16" }, { "label": "__gap", "offset": 0, "slot": "202", "type": "t_array(t_uint256)49_storage", - "contract": "PermissionManager", - "src": "@xinfin/osx/core/permission/PermissionManager.sol:402" + "contract": "DaoAuthorizableUpgradeable", + "src": "@xinfin/osx/core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol:38" }, { - "label": "callbackMagicNumbers", + "label": "__gap", "offset": 0, "slot": "251", - "type": "t_mapping(t_bytes4,t_bytes4)", - "contract": "CallbackHandler", - "src": "@xinfin/osx/core/utils/CallbackHandler.sol:11" + "type": "t_array(t_uint256)50_storage", + "contract": "PluginUUPSUpgradeable", + "src": "@xinfin/osx/core/plugin/PluginUUPSUpgradeable.sol:66" + }, + { + "label": "proposalCounter", + "offset": 0, + "slot": "301", + "type": "t_struct(Counter)3259_storage", + "contract": "ProposalUpgradeable", + "src": "@xinfin/osx/core/plugin/proposal/ProposalUpgradeable.sol:17" }, { "label": "__gap", "offset": 0, - "slot": "252", + "slot": "302", "type": "t_array(t_uint256)49_storage", - "contract": "CallbackHandler", - "src": "@xinfin/osx/core/utils/CallbackHandler.sol:54" + "contract": "ProposalUpgradeable", + "src": "@xinfin/osx/core/plugin/proposal/ProposalUpgradeable.sol:83" }, { - "label": "signatureValidator", + "label": "lastProposalBlockNumber", "offset": 0, - "slot": "301", - "type": "t_contract(IERC1271)5985", - "contract": "DAO", - "src": "@xinfin/osx/core/dao/DAO.sol:74" + "slot": "351", + "type": "t_uint256", + "contract": "DaofinPlugin", + "src": "src/DaofinPlugin.sol:126" }, { - "label": "trustedForwarder", + "label": "_daofinGlobalSettings", "offset": 0, - "slot": "302", - "type": "t_address", - "contract": "DAO", - "src": "@xinfin/osx/core/dao/DAO.sol:78" + "slot": "352", + "type": "t_struct(DaofinGlobalSettings)18491_storage", + "contract": "DaofinPlugin", + "src": "src/DaofinPlugin.sol:128" }, { - "label": "_daoURI", + "label": "_proposals", "offset": 0, - "slot": "303", - "type": "t_string_storage", - "contract": "DAO", - "src": "@xinfin/osx/core/dao/DAO.sol:82" + "slot": "354", + "type": "t_mapping(t_uint256,t_struct(Proposal)18550_storage)", + "contract": "DaofinPlugin", + "src": "src/DaofinPlugin.sol:131" }, { - "label": "_reentrancyStatus", + "label": "_committeesToVotingSettings", "offset": 0, - "slot": "304", - "type": "t_uint256", - "contract": "DAO", - "src": "@xinfin/osx/core/dao/DAO.sol:86" + "slot": "355", + "type": "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18502_storage)", + "contract": "DaofinPlugin", + "src": "src/DaofinPlugin.sol:137" }, { - "label": "__gap", + "label": "_committeesToTallyDetails", "offset": 0, - "slot": "305", - "type": "t_array(t_uint256)46_storage", - "contract": "DAO", - "src": "@xinfin/osx/core/dao/DAO.sol:422" + "slot": "356", + "type": "t_mapping(t_bytes32,t_mapping(t_uint256,t_struct(TallyDatails)18528_storage))", + "contract": "DaofinPlugin", + "src": "src/DaofinPlugin.sol:143" + }, + { + "label": "_voterToLockedAmounts", + "offset": 0, + "slot": "357", + "type": "t_mapping(t_address,t_uint256)", + "contract": "DaofinPlugin", + "src": "src/DaofinPlugin.sol:149" + }, + { + "label": "_votersToPropsalIds", + "offset": 0, + "slot": "358", + "type": "t_mapping(t_address,t_array(t_uint256)dyn_storage)", + "contract": "DaofinPlugin", + "src": "src/DaofinPlugin.sol:152" + }, + { + "label": "_judiciaryCommittee", + "offset": 0, + "slot": "359", + "type": "t_mapping(t_address,t_bool)", + "contract": "DaofinPlugin", + "src": "src/DaofinPlugin.sol:157" + }, + { + "label": "_committeesList", + "offset": 0, + "slot": "360", + "type": "t_array(t_bytes32)dyn_storage", + "contract": "DaofinPlugin", + "src": "src/DaofinPlugin.sol:160" + }, + { + "label": "_electionPeriods", + "offset": 0, + "slot": "361", + "type": "t_array(t_struct(ElectionPeriod)18562_storage)dyn_storage", + "contract": "DaofinPlugin", + "src": "src/DaofinPlugin.sol:163" } ], "types": { @@ -1979,9 +2400,21 @@ "label": "address", "numberOfBytes": "20" }, - "t_array(t_uint256)46_storage": { - "label": "uint256[46]", - "numberOfBytes": "1472" + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(Action)8275_storage)dyn_storage": { + "label": "struct IDAO.Action[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(ElectionPeriod)18562_storage)dyn_storage": { + "label": "struct DaofinPlugin.ElectionPeriod[]", + "numberOfBytes": "32" }, "t_array(t_uint256)49_storage": { "label": "uint256[49]", @@ -1991,42 +2424,312 @@ "label": "uint256[50]", "numberOfBytes": "1600" }, + "t_array(t_uint256)dyn_storage": { + "label": "uint256[]", + "numberOfBytes": "32" + }, "t_bool": { "label": "bool", "numberOfBytes": "1" }, - "t_bytes32": { - "label": "bytes32", + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(IDAO)8421": { + "label": "contract IDAO", + "numberOfBytes": "20" + }, + "t_contract(IXDCValidator)20055": { + "label": "contract IXDCValidator", + "numberOfBytes": "20" + }, + "t_enum(VoteOption)18484": { + "label": "enum DaofinPlugin.VoteOption", + "members": [ + "None", + "Abstain", + "Yes", + "No" + ], + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_array(t_uint256)dyn_storage)": { + "label": "mapping(address => uint256[])", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(VoteInfo)18508_storage)": { + "label": "mapping(address => struct DaofinPlugin.VoteInfo)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_mapping(t_uint256,t_struct(TallyDatails)18528_storage))": { + "label": "mapping(bytes32 => mapping(uint256 => struct DaofinPlugin.TallyDatails))", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18502_storage)": { + "label": "mapping(bytes32 => struct DaofinPlugin.CommitteeVotingSettings)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Proposal)18550_storage)": { + "label": "mapping(uint256 => struct DaofinPlugin.Proposal)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(TallyDatails)18528_storage)": { + "label": "mapping(uint256 => struct DaofinPlugin.TallyDatails)", + "numberOfBytes": "32" + }, + "t_struct(Action)8275_storage": { + "label": "struct IDAO.Action", + "members": [ + { + "label": "to", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "value", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(CommitteeVotingSettings)18502_storage": { + "label": "struct DaofinPlugin.CommitteeVotingSettings", + "members": [ + { + "label": "name", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "supportThreshold", + "type": "t_uint32", + "offset": 0, + "slot": "1" + }, + { + "label": "minParticipation", + "type": "t_uint32", + "offset": 4, + "slot": "1" + }, + { + "label": "minDuration", + "type": "t_uint64", + "offset": 8, + "slot": "1" + }, + { + "label": "minVotingPower", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Counter)3259_storage": { + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], "numberOfBytes": "32" }, - "t_bytes4": { - "label": "bytes4", - "numberOfBytes": "4" - }, - "t_contract(IERC1271)5985": { - "label": "contract IERC1271", - "numberOfBytes": "20" + "t_struct(DaofinGlobalSettings)18491_storage": { + "label": "struct DaofinPlugin.DaofinGlobalSettings", + "members": [ + { + "label": "xdcValidator", + "type": "t_contract(IXDCValidator)20055", + "offset": 0, + "slot": "0" + }, + { + "label": "allowedAmounts", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" }, - "t_mapping(t_bytes32,t_address)": { - "label": "mapping(bytes32 => address)", + "t_struct(ElectionPeriod)18562_storage": { + "label": "struct DaofinPlugin.ElectionPeriod", + "members": [ + { + "label": "startDate", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "endDate", + "type": "t_uint64", + "offset": 8, + "slot": "0" + } + ], "numberOfBytes": "32" }, - "t_mapping(t_bytes4,t_bool)": { - "label": "mapping(bytes4 => bool)", - "numberOfBytes": "32" + "t_struct(Proposal)18550_storage": { + "label": "struct DaofinPlugin.Proposal", + "members": [ + { + "label": "executed", + "type": "t_bool", + "offset": 0, + "slot": "0" + }, + { + "label": "parameters", + "type": "t_struct(ProposalParameters)18557_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "proposer", + "type": "t_address", + "offset": 0, + "slot": "2" + }, + { + "label": "voterToInfo", + "type": "t_mapping(t_address,t_struct(VoteInfo)18508_storage)", + "offset": 0, + "slot": "3" + }, + { + "label": "voters", + "type": "t_array(t_address)dyn_storage", + "offset": 0, + "slot": "4" + }, + { + "label": "actions", + "type": "t_array(t_struct(Action)8275_storage)dyn_storage", + "offset": 0, + "slot": "5" + }, + { + "label": "allowFailureMap", + "type": "t_uint256", + "offset": 0, + "slot": "6" + } + ], + "numberOfBytes": "224" }, - "t_mapping(t_bytes4,t_bytes4)": { - "label": "mapping(bytes4 => bytes4)", + "t_struct(ProposalParameters)18557_storage": { + "label": "struct DaofinPlugin.ProposalParameters", + "members": [ + { + "label": "startDate", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "endDate", + "type": "t_uint64", + "offset": 8, + "slot": "0" + }, + { + "label": "snapshotBlock", + "type": "t_uint64", + "offset": 16, + "slot": "0" + } + ], "numberOfBytes": "32" }, - "t_string_storage": { - "label": "string", + "t_struct(TallyDatails)18528_storage": { + "label": "struct DaofinPlugin.TallyDatails", + "members": [ + { + "label": "name", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "abstain", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "yes", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "no", + "type": "t_uint256", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(VoteInfo)18508_storage": { + "label": "struct DaofinPlugin.VoteInfo", + "members": [ + { + "label": "voted", + "type": "t_bool", + "offset": 0, + "slot": "0" + }, + { + "label": "option", + "type": "t_enum(VoteOption)18484", + "offset": 1, + "slot": "0" + } + ], "numberOfBytes": "32" }, "t_uint256": { "label": "uint256", "numberOfBytes": "32" }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, "t_uint8": { "label": "uint8", "numberOfBytes": "1" @@ -2034,9 +2737,9 @@ } } }, - "a0137fad191e23f7e912f57d9be664b41f3147ee5a91f411b30fb26bc4f9014f": { - "address": "0x66F2BcfD9fa1d5D48929A9D230405A47699eD92C", - "txHash": "0x3f0985361c59e3d4ffe247da86d3c235855e1557d4f7bcb4867752dd1ae0cb59", + "ebc0d0b5a271079536bdc7806ac3e2b2a9a7877382a02f726cd332dfe6837baf": { + "address": "0xB377a2EeD7566Ac9fCb0BA673604F9BF875e2Bab", + "txHash": "0xfb26566a17b2d8f505b8c018f2be6cabab06ad9ac0f4967f76e99d357772de1a", "layout": { "solcVersion": "0.8.17", "storage": [ @@ -2135,39 +2838,39 @@ "slot": "351", "type": "t_uint256", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:126" + "src": "src/DaofinPlugin.sol:127" }, { "label": "_daofinGlobalSettings", "offset": 0, "slot": "352", - "type": "t_struct(DaofinGlobalSettings)18491_storage", + "type": "t_struct(DaofinGlobalSettings)18497_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:128" + "src": "src/DaofinPlugin.sol:129" }, { "label": "_proposals", "offset": 0, "slot": "354", - "type": "t_mapping(t_uint256,t_struct(Proposal)18550_storage)", + "type": "t_mapping(t_uint256,t_struct(Proposal)18556_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:131" + "src": "src/DaofinPlugin.sol:132" }, { "label": "_committeesToVotingSettings", "offset": 0, "slot": "355", - "type": "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18502_storage)", + "type": "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18508_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:137" + "src": "src/DaofinPlugin.sol:138" }, { "label": "_committeesToTallyDetails", "offset": 0, "slot": "356", - "type": "t_mapping(t_bytes32,t_mapping(t_uint256,t_struct(TallyDatails)18528_storage))", + "type": "t_mapping(t_bytes32,t_mapping(t_uint256,t_struct(TallyDatails)18534_storage))", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:143" + "src": "src/DaofinPlugin.sol:144" }, { "label": "_voterToLockedAmounts", @@ -2175,7 +2878,7 @@ "slot": "357", "type": "t_mapping(t_address,t_uint256)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:149" + "src": "src/DaofinPlugin.sol:150" }, { "label": "_votersToPropsalIds", @@ -2183,7 +2886,7 @@ "slot": "358", "type": "t_mapping(t_address,t_array(t_uint256)dyn_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:152" + "src": "src/DaofinPlugin.sol:153" }, { "label": "_judiciaryCommittee", @@ -2191,7 +2894,7 @@ "slot": "359", "type": "t_mapping(t_address,t_bool)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:157" + "src": "src/DaofinPlugin.sol:158" }, { "label": "_committeesList", @@ -2199,15 +2902,15 @@ "slot": "360", "type": "t_array(t_bytes32)dyn_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:160" + "src": "src/DaofinPlugin.sol:161" }, { "label": "_electionPeriods", "offset": 0, "slot": "361", - "type": "t_array(t_struct(ElectionPeriod)18562_storage)dyn_storage", + "type": "t_array(t_struct(ElectionPeriod)18568_storage)dyn_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:163" + "src": "src/DaofinPlugin.sol:164" } ], "types": { @@ -2227,7 +2930,7 @@ "label": "struct IDAO.Action[]", "numberOfBytes": "32" }, - "t_array(t_struct(ElectionPeriod)18562_storage)dyn_storage": { + "t_array(t_struct(ElectionPeriod)18568_storage)dyn_storage": { "label": "struct DaofinPlugin.ElectionPeriod[]", "numberOfBytes": "32" }, @@ -2259,11 +2962,11 @@ "label": "contract IDAO", "numberOfBytes": "20" }, - "t_contract(IXDCValidator)20055": { + "t_contract(IXDCValidator)20066": { "label": "contract IXDCValidator", "numberOfBytes": "20" }, - "t_enum(VoteOption)18484": { + "t_enum(VoteOption)18490": { "label": "enum DaofinPlugin.VoteOption", "members": [ "None", @@ -2281,7 +2984,7 @@ "label": "mapping(address => bool)", "numberOfBytes": "32" }, - "t_mapping(t_address,t_struct(VoteInfo)18508_storage)": { + "t_mapping(t_address,t_struct(VoteInfo)18514_storage)": { "label": "mapping(address => struct DaofinPlugin.VoteInfo)", "numberOfBytes": "32" }, @@ -2289,19 +2992,19 @@ "label": "mapping(address => uint256)", "numberOfBytes": "32" }, - "t_mapping(t_bytes32,t_mapping(t_uint256,t_struct(TallyDatails)18528_storage))": { + "t_mapping(t_bytes32,t_mapping(t_uint256,t_struct(TallyDatails)18534_storage))": { "label": "mapping(bytes32 => mapping(uint256 => struct DaofinPlugin.TallyDatails))", "numberOfBytes": "32" }, - "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18502_storage)": { + "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18508_storage)": { "label": "mapping(bytes32 => struct DaofinPlugin.CommitteeVotingSettings)", "numberOfBytes": "32" }, - "t_mapping(t_uint256,t_struct(Proposal)18550_storage)": { + "t_mapping(t_uint256,t_struct(Proposal)18556_storage)": { "label": "mapping(uint256 => struct DaofinPlugin.Proposal)", "numberOfBytes": "32" }, - "t_mapping(t_uint256,t_struct(TallyDatails)18528_storage)": { + "t_mapping(t_uint256,t_struct(TallyDatails)18534_storage)": { "label": "mapping(uint256 => struct DaofinPlugin.TallyDatails)", "numberOfBytes": "32" }, @@ -2329,7 +3032,7 @@ ], "numberOfBytes": "96" }, - "t_struct(CommitteeVotingSettings)18502_storage": { + "t_struct(CommitteeVotingSettings)18508_storage": { "label": "struct DaofinPlugin.CommitteeVotingSettings", "members": [ { @@ -2377,12 +3080,12 @@ ], "numberOfBytes": "32" }, - "t_struct(DaofinGlobalSettings)18491_storage": { + "t_struct(DaofinGlobalSettings)18497_storage": { "label": "struct DaofinPlugin.DaofinGlobalSettings", "members": [ { "label": "xdcValidator", - "type": "t_contract(IXDCValidator)20055", + "type": "t_contract(IXDCValidator)20066", "offset": 0, "slot": "0" }, @@ -2395,7 +3098,7 @@ ], "numberOfBytes": "64" }, - "t_struct(ElectionPeriod)18562_storage": { + "t_struct(ElectionPeriod)18568_storage": { "label": "struct DaofinPlugin.ElectionPeriod", "members": [ { @@ -2413,7 +3116,7 @@ ], "numberOfBytes": "32" }, - "t_struct(Proposal)18550_storage": { + "t_struct(Proposal)18556_storage": { "label": "struct DaofinPlugin.Proposal", "members": [ { @@ -2424,7 +3127,7 @@ }, { "label": "parameters", - "type": "t_struct(ProposalParameters)18557_storage", + "type": "t_struct(ProposalParameters)18563_storage", "offset": 0, "slot": "1" }, @@ -2436,7 +3139,7 @@ }, { "label": "voterToInfo", - "type": "t_mapping(t_address,t_struct(VoteInfo)18508_storage)", + "type": "t_mapping(t_address,t_struct(VoteInfo)18514_storage)", "offset": 0, "slot": "3" }, @@ -2461,7 +3164,7 @@ ], "numberOfBytes": "224" }, - "t_struct(ProposalParameters)18557_storage": { + "t_struct(ProposalParameters)18563_storage": { "label": "struct DaofinPlugin.ProposalParameters", "members": [ { @@ -2485,7 +3188,7 @@ ], "numberOfBytes": "32" }, - "t_struct(TallyDatails)18528_storage": { + "t_struct(TallyDatails)18534_storage": { "label": "struct DaofinPlugin.TallyDatails", "members": [ { @@ -2515,7 +3218,7 @@ ], "numberOfBytes": "128" }, - "t_struct(VoteInfo)18508_storage": { + "t_struct(VoteInfo)18514_storage": { "label": "struct DaofinPlugin.VoteInfo", "members": [ { @@ -2526,7 +3229,7 @@ }, { "label": "option", - "type": "t_enum(VoteOption)18484", + "type": "t_enum(VoteOption)18490", "offset": 1, "slot": "0" } @@ -2552,9 +3255,9 @@ } } }, - "ebc0d0b5a271079536bdc7806ac3e2b2a9a7877382a02f726cd332dfe6837baf": { - "address": "0xB377a2EeD7566Ac9fCb0BA673604F9BF875e2Bab", - "txHash": "0xfb26566a17b2d8f505b8c018f2be6cabab06ad9ac0f4967f76e99d357772de1a", + "5afc849f9992c96802be2ae12e673b03b6bcb59be5c137749f9a516d0b08d29d": { + "address": "0xab16A69A5a8c12C732e0DEFF4BE56A70bb64c926", + "txHash": "0x38b68891a7f7057a6717316b14cb7b27a67c1b05f9df6caa0dc32e3a7c70d4cb", "layout": { "solcVersion": "0.8.17", "storage": [ @@ -2777,7 +3480,7 @@ "label": "contract IDAO", "numberOfBytes": "20" }, - "t_contract(IXDCValidator)20066": { + "t_contract(IXDCValidator)20070": { "label": "contract IXDCValidator", "numberOfBytes": "20" }, @@ -2900,7 +3603,7 @@ "members": [ { "label": "xdcValidator", - "type": "t_contract(IXDCValidator)20066", + "type": "t_contract(IXDCValidator)20070", "offset": 0, "slot": "0" }, @@ -3070,9 +3773,9 @@ } } }, - "5afc849f9992c96802be2ae12e673b03b6bcb59be5c137749f9a516d0b08d29d": { - "address": "0xab16A69A5a8c12C732e0DEFF4BE56A70bb64c926", - "txHash": "0x38b68891a7f7057a6717316b14cb7b27a67c1b05f9df6caa0dc32e3a7c70d4cb", + "c222f77af1421c4e3bf0123ebb60c9e72fa9da4a95f5fa98f67fdea4f86ab9f5": { + "address": "0xAA292E8611aDF267e563f334Ee42320aC96D0463", + "txHash": "0x58ae91ffdc113adfb2e58ebaf814962ab67fc9ec25fc5a07284a0e5667f9da58", "layout": { "solcVersion": "0.8.17", "storage": [ @@ -3171,79 +3874,87 @@ "slot": "351", "type": "t_uint256", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:127" + "src": "src/DaofinPlugin.sol:142" }, { "label": "_daofinGlobalSettings", "offset": 0, "slot": "352", - "type": "t_struct(DaofinGlobalSettings)18497_storage", + "type": "t_struct(DaofinGlobalSettings)18443_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:129" + "src": "src/DaofinPlugin.sol:145" }, { "label": "_proposals", "offset": 0, - "slot": "354", - "type": "t_mapping(t_uint256,t_struct(Proposal)18556_storage)", + "slot": "355", + "type": "t_mapping(t_uint256,t_struct(Proposal)18512_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:132" + "src": "src/DaofinPlugin.sol:148" }, { "label": "_committeesToVotingSettings", "offset": 0, - "slot": "355", - "type": "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18508_storage)", + "slot": "356", + "type": "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18454_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:138" + "src": "src/DaofinPlugin.sol:154" }, { "label": "_committeesToTallyDetails", "offset": 0, - "slot": "356", - "type": "t_mapping(t_bytes32,t_mapping(t_uint256,t_struct(TallyDatails)18534_storage))", + "slot": "357", + "type": "t_mapping(t_bytes32,t_mapping(t_uint256,t_struct(TallyDatails)18480_storage))", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:144" + "src": "src/DaofinPlugin.sol:160" }, { "label": "_voterToLockedAmounts", "offset": 0, - "slot": "357", - "type": "t_mapping(t_address,t_uint256)", + "slot": "358", + "type": "t_mapping(t_address,t_struct(SnapshotAmount)18529_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:150" + "src": "src/DaofinPlugin.sol:166" }, { - "label": "_votersToPropsalIds", + "label": "_votersToProposalIds", "offset": 0, - "slot": "358", + "slot": "359", "type": "t_mapping(t_address,t_array(t_uint256)dyn_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:153" + "src": "src/DaofinPlugin.sol:172" }, { "label": "_judiciaryCommittee", "offset": 0, - "slot": "359", + "slot": "360", "type": "t_mapping(t_address,t_bool)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:158" + "src": "src/DaofinPlugin.sol:177" + }, + { + "label": "_masterNodeDelegatee", + "offset": 0, + "slot": "361", + "type": "t_struct(MasterNodeDelegateeMappings)18540_storage", + "contract": "DaofinPlugin", + "src": "src/DaofinPlugin.sol:182" }, { "label": "_committeesList", "offset": 0, - "slot": "360", + "slot": "364", "type": "t_array(t_bytes32)dyn_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:161" + "src": "src/DaofinPlugin.sol:185" }, { "label": "_electionPeriods", "offset": 0, - "slot": "361", - "type": "t_array(t_struct(ElectionPeriod)18568_storage)dyn_storage", + "slot": "365", + "type": "t_array(t_struct(ElectionPeriod)18524_storage)dyn_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:164" + "src": "src/DaofinPlugin.sol:188" } ], "types": { @@ -3263,7 +3974,7 @@ "label": "struct IDAO.Action[]", "numberOfBytes": "32" }, - "t_array(t_struct(ElectionPeriod)18568_storage)dyn_storage": { + "t_array(t_struct(ElectionPeriod)18524_storage)dyn_storage": { "label": "struct DaofinPlugin.ElectionPeriod[]", "numberOfBytes": "32" }, @@ -3295,11 +4006,11 @@ "label": "contract IDAO", "numberOfBytes": "20" }, - "t_contract(IXDCValidator)20070": { + "t_contract(IXDCValidator)20524": { "label": "contract IXDCValidator", "numberOfBytes": "20" }, - "t_enum(VoteOption)18490": { + "t_enum(VoteOption)18434": { "label": "enum DaofinPlugin.VoteOption", "members": [ "None", @@ -3309,6 +4020,10 @@ ], "numberOfBytes": "1" }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, "t_mapping(t_address,t_array(t_uint256)dyn_storage)": { "label": "mapping(address => uint256[])", "numberOfBytes": "32" @@ -3317,27 +4032,31 @@ "label": "mapping(address => bool)", "numberOfBytes": "32" }, - "t_mapping(t_address,t_struct(VoteInfo)18514_storage)": { - "label": "mapping(address => struct DaofinPlugin.VoteInfo)", + "t_mapping(t_address,t_struct(SnapshotAmount)18529_storage)": { + "label": "mapping(address => struct DaofinPlugin.SnapshotAmount)", "numberOfBytes": "32" }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", + "t_mapping(t_address,t_struct(VoteInfo)18460_storage)": { + "label": "mapping(address => struct DaofinPlugin.VoteInfo)", "numberOfBytes": "32" }, - "t_mapping(t_bytes32,t_mapping(t_uint256,t_struct(TallyDatails)18534_storage))": { + "t_mapping(t_bytes32,t_mapping(t_uint256,t_struct(TallyDatails)18480_storage))": { "label": "mapping(bytes32 => mapping(uint256 => struct DaofinPlugin.TallyDatails))", "numberOfBytes": "32" }, - "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18508_storage)": { + "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18454_storage)": { "label": "mapping(bytes32 => struct DaofinPlugin.CommitteeVotingSettings)", "numberOfBytes": "32" }, - "t_mapping(t_uint256,t_struct(Proposal)18556_storage)": { + "t_mapping(t_bytes32,t_struct(TallyDatails)18480_storage)": { + "label": "mapping(bytes32 => struct DaofinPlugin.TallyDatails)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Proposal)18512_storage)": { "label": "mapping(uint256 => struct DaofinPlugin.Proposal)", "numberOfBytes": "32" }, - "t_mapping(t_uint256,t_struct(TallyDatails)18534_storage)": { + "t_mapping(t_uint256,t_struct(TallyDatails)18480_storage)": { "label": "mapping(uint256 => struct DaofinPlugin.TallyDatails)", "numberOfBytes": "32" }, @@ -3365,7 +4084,7 @@ ], "numberOfBytes": "96" }, - "t_struct(CommitteeVotingSettings)18508_storage": { + "t_struct(CommitteeVotingSettings)18454_storage": { "label": "struct DaofinPlugin.CommitteeVotingSettings", "members": [ { @@ -3413,12 +4132,12 @@ ], "numberOfBytes": "32" }, - "t_struct(DaofinGlobalSettings)18497_storage": { + "t_struct(DaofinGlobalSettings)18443_storage": { "label": "struct DaofinPlugin.DaofinGlobalSettings", "members": [ { "label": "xdcValidator", - "type": "t_contract(IXDCValidator)20070", + "type": "t_contract(IXDCValidator)20524", "offset": 0, "slot": "0" }, @@ -3427,11 +4146,17 @@ "type": "t_array(t_uint256)dyn_storage", "offset": 0, "slot": "1" + }, + { + "label": "totalNumberOfMasterNodes", + "type": "t_uint256", + "offset": 0, + "slot": "2" } ], - "numberOfBytes": "64" + "numberOfBytes": "96" }, - "t_struct(ElectionPeriod)18568_storage": { + "t_struct(ElectionPeriod)18524_storage": { "label": "struct DaofinPlugin.ElectionPeriod", "members": [ { @@ -3449,7 +4174,31 @@ ], "numberOfBytes": "32" }, - "t_struct(Proposal)18556_storage": { + "t_struct(MasterNodeDelegateeMappings)18540_storage": { + "label": "struct DaofinPlugin.MasterNodeDelegateeMappings", + "members": [ + { + "label": "masterNodeToDelegatee", + "type": "t_mapping(t_address,t_address)", + "offset": 0, + "slot": "0" + }, + { + "label": "delegateeToMasterNode", + "type": "t_mapping(t_address,t_address)", + "offset": 0, + "slot": "1" + }, + { + "label": "lastModificationBlocknumber", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Proposal)18512_storage": { "label": "struct DaofinPlugin.Proposal", "members": [ { @@ -3459,45 +4208,57 @@ "slot": "0" }, { - "label": "parameters", - "type": "t_struct(ProposalParameters)18563_storage", + "label": "proposer", + "type": "t_address", + "offset": 1, + "slot": "0" + }, + { + "label": "voters", + "type": "t_array(t_address)dyn_storage", "offset": 0, "slot": "1" }, { - "label": "proposer", - "type": "t_address", + "label": "allowFailureMap", + "type": "t_uint256", "offset": 0, "slot": "2" }, { - "label": "voterToInfo", - "type": "t_mapping(t_address,t_struct(VoteInfo)18514_storage)", + "label": "parameters", + "type": "t_struct(ProposalParameters)18519_storage", "offset": 0, "slot": "3" }, { - "label": "voters", - "type": "t_array(t_address)dyn_storage", + "label": "actions", + "type": "t_array(t_struct(Action)8275_storage)dyn_storage", "offset": 0, "slot": "4" }, { - "label": "actions", - "type": "t_array(t_struct(Action)8275_storage)dyn_storage", + "label": "voterToInfo", + "type": "t_mapping(t_address,t_struct(VoteInfo)18460_storage)", "offset": 0, "slot": "5" }, { - "label": "allowFailureMap", - "type": "t_uint256", + "label": "committeeToVotingSettings", + "type": "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18454_storage)", "offset": 0, "slot": "6" + }, + { + "label": "committeeToTallyDatails", + "type": "t_mapping(t_bytes32,t_struct(TallyDatails)18480_storage)", + "offset": 0, + "slot": "7" } ], - "numberOfBytes": "224" + "numberOfBytes": "256" }, - "t_struct(ProposalParameters)18563_storage": { + "t_struct(ProposalParameters)18519_storage": { "label": "struct DaofinPlugin.ProposalParameters", "members": [ { @@ -3521,7 +4282,25 @@ ], "numberOfBytes": "32" }, - "t_struct(TallyDatails)18534_storage": { + "t_struct(SnapshotAmount)18529_storage": { + "label": "struct DaofinPlugin.SnapshotAmount", + "members": [ + { + "label": "amount", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "blockNumber", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(TallyDatails)18480_storage": { "label": "struct DaofinPlugin.TallyDatails", "members": [ { @@ -3551,7 +4330,7 @@ ], "numberOfBytes": "128" }, - "t_struct(VoteInfo)18514_storage": { + "t_struct(VoteInfo)18460_storage": { "label": "struct DaofinPlugin.VoteInfo", "members": [ { @@ -3562,7 +4341,7 @@ }, { "label": "option", - "type": "t_enum(VoteOption)18490", + "type": "t_enum(VoteOption)18434", "offset": 1, "slot": "0" } @@ -3588,9 +4367,9 @@ } } }, - "c222f77af1421c4e3bf0123ebb60c9e72fa9da4a95f5fa98f67fdea4f86ab9f5": { - "address": "0xAA292E8611aDF267e563f334Ee42320aC96D0463", - "txHash": "0x58ae91ffdc113adfb2e58ebaf814962ab67fc9ec25fc5a07284a0e5667f9da58", + "419c52952c7f4c8a08c8a5cfe4ba5f82284f757e236de7df61f551c3841f884f": { + "address": "0x3347B4d90ebe72BeFb30444C9966B2B990aE9FcB", + "txHash": "0x21d67632602092ba29691d5ca78eb19fb9bbae51b1103a062456f8860d2d6078", "layout": { "solcVersion": "0.8.17", "storage": [ @@ -3821,7 +4600,7 @@ "label": "contract IDAO", "numberOfBytes": "20" }, - "t_contract(IXDCValidator)20524": { + "t_contract(IXDCValidator)20535": { "label": "contract IXDCValidator", "numberOfBytes": "20" }, @@ -3952,7 +4731,7 @@ "members": [ { "label": "xdcValidator", - "type": "t_contract(IXDCValidator)20524", + "type": "t_contract(IXDCValidator)20535", "offset": 0, "slot": "0" }, @@ -4182,9 +4961,9 @@ } } }, - "419c52952c7f4c8a08c8a5cfe4ba5f82284f757e236de7df61f551c3841f884f": { - "address": "0x3347B4d90ebe72BeFb30444C9966B2B990aE9FcB", - "txHash": "0x21d67632602092ba29691d5ca78eb19fb9bbae51b1103a062456f8860d2d6078", + "8bd248abedc4f2642569bc85d515e739dceb76b9da16b2d8ebe535fe01997d09": { + "address": "0x32EEce76C2C2e8758584A83Ee2F522D4788feA0f", + "txHash": "0x1f160cdc7eb45291c9e8a5b7823e428b24c5293f145caa9825526f0e68841f6b", "layout": { "solcVersion": "0.8.17", "storage": [ @@ -4415,7 +5194,7 @@ "label": "contract IDAO", "numberOfBytes": "20" }, - "t_contract(IXDCValidator)20535": { + "t_contract(IXDCValidator)20533": { "label": "contract IXDCValidator", "numberOfBytes": "20" }, @@ -4546,7 +5325,7 @@ "members": [ { "label": "xdcValidator", - "type": "t_contract(IXDCValidator)20535", + "type": "t_contract(IXDCValidator)20533", "offset": 0, "slot": "0" }, @@ -4776,9 +5555,9 @@ } } }, - "8bd248abedc4f2642569bc85d515e739dceb76b9da16b2d8ebe535fe01997d09": { - "address": "0x32EEce76C2C2e8758584A83Ee2F522D4788feA0f", - "txHash": "0x1f160cdc7eb45291c9e8a5b7823e428b24c5293f145caa9825526f0e68841f6b", + "15253cd265af8a22cbf83fdbf14720113d6ad536a0a95a664cd37e35973924a3": { + "address": "0xefc1aB2475ACb7E60499Efb171D173be19928a05", + "txHash": "0x9a488e43adc411e4da46457190c49a32ec3adc599c9824214a03e67763b96c19", "layout": { "solcVersion": "0.8.17", "storage": [ @@ -4877,55 +5656,39 @@ "slot": "351", "type": "t_uint256", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:142" + "src": "src/DaofinPlugin.sol:147" }, { "label": "_daofinGlobalSettings", "offset": 0, "slot": "352", - "type": "t_struct(DaofinGlobalSettings)18443_storage", + "type": "t_struct(DaofinGlobalSettings)18510_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:145" + "src": "src/DaofinPlugin.sol:150" }, { "label": "_proposals", "offset": 0, - "slot": "355", - "type": "t_mapping(t_uint256,t_struct(Proposal)18512_storage)", - "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:148" - }, - { - "label": "_committeesToVotingSettings", - "offset": 0, - "slot": "356", - "type": "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18454_storage)", - "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:154" - }, - { - "label": "_committeesToTallyDetails", - "offset": 0, "slot": "357", - "type": "t_mapping(t_bytes32,t_mapping(t_uint256,t_struct(TallyDatails)18480_storage))", + "type": "t_mapping(t_uint256,t_struct(Proposal)18574_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:160" + "src": "src/DaofinPlugin.sol:153" }, { - "label": "_voterToLockedAmounts", + "label": "_committeesToVotingSettings", "offset": 0, "slot": "358", - "type": "t_mapping(t_address,t_struct(SnapshotAmount)18529_storage)", + "type": "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18521_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:166" + "src": "src/DaofinPlugin.sol:159" }, { - "label": "_votersToProposalIds", + "label": "_voterToLockedAmounts", "offset": 0, "slot": "359", - "type": "t_mapping(t_address,t_array(t_uint256)dyn_storage)", + "type": "t_mapping(t_address,t_struct(SnapshotAmount)18591_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:172" + "src": "src/DaofinPlugin.sol:165" }, { "label": "_judiciaryCommittee", @@ -4933,31 +5696,31 @@ "slot": "360", "type": "t_mapping(t_address,t_bool)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:177" + "src": "src/DaofinPlugin.sol:176" }, { "label": "_masterNodeDelegatee", "offset": 0, "slot": "361", - "type": "t_struct(MasterNodeDelegateeMappings)18540_storage", + "type": "t_struct(MasterNodeDelegateeMappings)18604_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:182" + "src": "src/DaofinPlugin.sol:180" }, { "label": "_committeesList", "offset": 0, - "slot": "364", + "slot": "365", "type": "t_array(t_bytes32)dyn_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:185" + "src": "src/DaofinPlugin.sol:183" }, { "label": "_electionPeriods", "offset": 0, - "slot": "365", - "type": "t_array(t_struct(ElectionPeriod)18524_storage)dyn_storage", + "slot": "366", + "type": "t_array(t_struct(ElectionPeriod)18586_storage)dyn_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:188" + "src": "src/DaofinPlugin.sol:186" } ], "types": { @@ -4977,7 +5740,7 @@ "label": "struct IDAO.Action[]", "numberOfBytes": "32" }, - "t_array(t_struct(ElectionPeriod)18524_storage)dyn_storage": { + "t_array(t_struct(ElectionPeriod)18586_storage)dyn_storage": { "label": "struct DaofinPlugin.ElectionPeriod[]", "numberOfBytes": "32" }, @@ -5009,11 +5772,11 @@ "label": "contract IDAO", "numberOfBytes": "20" }, - "t_contract(IXDCValidator)20533": { + "t_contract(IXDCValidator)20725": { "label": "contract IXDCValidator", "numberOfBytes": "20" }, - "t_enum(VoteOption)18434": { + "t_enum(VoteOption)18497": { "label": "enum DaofinPlugin.VoteOption", "members": [ "None", @@ -5027,42 +5790,30 @@ "label": "mapping(address => address)", "numberOfBytes": "32" }, - "t_mapping(t_address,t_array(t_uint256)dyn_storage)": { - "label": "mapping(address => uint256[])", - "numberOfBytes": "32" - }, "t_mapping(t_address,t_bool)": { "label": "mapping(address => bool)", "numberOfBytes": "32" }, - "t_mapping(t_address,t_struct(SnapshotAmount)18529_storage)": { + "t_mapping(t_address,t_struct(SnapshotAmount)18591_storage)": { "label": "mapping(address => struct DaofinPlugin.SnapshotAmount)", "numberOfBytes": "32" }, - "t_mapping(t_address,t_struct(VoteInfo)18460_storage)": { + "t_mapping(t_address,t_struct(VoteInfo)18527_storage)": { "label": "mapping(address => struct DaofinPlugin.VoteInfo)", "numberOfBytes": "32" }, - "t_mapping(t_bytes32,t_mapping(t_uint256,t_struct(TallyDatails)18480_storage))": { - "label": "mapping(bytes32 => mapping(uint256 => struct DaofinPlugin.TallyDatails))", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18454_storage)": { + "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18521_storage)": { "label": "mapping(bytes32 => struct DaofinPlugin.CommitteeVotingSettings)", "numberOfBytes": "32" }, - "t_mapping(t_bytes32,t_struct(TallyDatails)18480_storage)": { + "t_mapping(t_bytes32,t_struct(TallyDatails)18547_storage)": { "label": "mapping(bytes32 => struct DaofinPlugin.TallyDatails)", "numberOfBytes": "32" }, - "t_mapping(t_uint256,t_struct(Proposal)18512_storage)": { + "t_mapping(t_uint256,t_struct(Proposal)18574_storage)": { "label": "mapping(uint256 => struct DaofinPlugin.Proposal)", "numberOfBytes": "32" }, - "t_mapping(t_uint256,t_struct(TallyDatails)18480_storage)": { - "label": "mapping(uint256 => struct DaofinPlugin.TallyDatails)", - "numberOfBytes": "32" - }, "t_struct(Action)8275_storage": { "label": "struct IDAO.Action", "members": [ @@ -5087,7 +5838,7 @@ ], "numberOfBytes": "96" }, - "t_struct(CommitteeVotingSettings)18454_storage": { + "t_struct(CommitteeVotingSettings)18521_storage": { "label": "struct DaofinPlugin.CommitteeVotingSettings", "members": [ { @@ -5135,12 +5886,12 @@ ], "numberOfBytes": "32" }, - "t_struct(DaofinGlobalSettings)18443_storage": { + "t_struct(DaofinGlobalSettings)18510_storage": { "label": "struct DaofinPlugin.DaofinGlobalSettings", "members": [ { "label": "xdcValidator", - "type": "t_contract(IXDCValidator)20533", + "type": "t_contract(IXDCValidator)20725", "offset": 0, "slot": "0" }, @@ -5155,11 +5906,23 @@ "type": "t_uint256", "offset": 0, "slot": "2" + }, + { + "label": "totalNumberOfJudiciaries", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "totalNumberOfPeoplesHouse", + "type": "t_uint256", + "offset": 0, + "slot": "4" } ], - "numberOfBytes": "96" + "numberOfBytes": "160" }, - "t_struct(ElectionPeriod)18524_storage": { + "t_struct(ElectionPeriod)18586_storage": { "label": "struct DaofinPlugin.ElectionPeriod", "members": [ { @@ -5177,7 +5940,7 @@ ], "numberOfBytes": "32" }, - "t_struct(MasterNodeDelegateeMappings)18540_storage": { + "t_struct(MasterNodeDelegateeMappings)18604_storage": { "label": "struct DaofinPlugin.MasterNodeDelegateeMappings", "members": [ { @@ -5197,11 +5960,17 @@ "type": "t_uint256", "offset": 0, "slot": "2" + }, + { + "label": "numberOfJointMasterNodes", + "type": "t_uint256", + "offset": 0, + "slot": "3" } ], - "numberOfBytes": "96" + "numberOfBytes": "128" }, - "t_struct(Proposal)18512_storage": { + "t_struct(Proposal)18574_storage": { "label": "struct DaofinPlugin.Proposal", "members": [ { @@ -5230,7 +5999,7 @@ }, { "label": "parameters", - "type": "t_struct(ProposalParameters)18519_storage", + "type": "t_struct(ProposalParameters)18581_storage", "offset": 0, "slot": "3" }, @@ -5242,26 +6011,20 @@ }, { "label": "voterToInfo", - "type": "t_mapping(t_address,t_struct(VoteInfo)18460_storage)", + "type": "t_mapping(t_address,t_struct(VoteInfo)18527_storage)", "offset": 0, "slot": "5" }, - { - "label": "committeeToVotingSettings", - "type": "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18454_storage)", - "offset": 0, - "slot": "6" - }, { "label": "committeeToTallyDatails", - "type": "t_mapping(t_bytes32,t_struct(TallyDatails)18480_storage)", + "type": "t_mapping(t_bytes32,t_struct(TallyDatails)18547_storage)", "offset": 0, - "slot": "7" + "slot": "6" } ], - "numberOfBytes": "256" + "numberOfBytes": "224" }, - "t_struct(ProposalParameters)18519_storage": { + "t_struct(ProposalParameters)18581_storage": { "label": "struct DaofinPlugin.ProposalParameters", "members": [ { @@ -5285,7 +6048,7 @@ ], "numberOfBytes": "32" }, - "t_struct(SnapshotAmount)18529_storage": { + "t_struct(SnapshotAmount)18591_storage": { "label": "struct DaofinPlugin.SnapshotAmount", "members": [ { @@ -5303,7 +6066,7 @@ ], "numberOfBytes": "64" }, - "t_struct(TallyDatails)18480_storage": { + "t_struct(TallyDatails)18547_storage": { "label": "struct DaofinPlugin.TallyDatails", "members": [ { @@ -5333,7 +6096,7 @@ ], "numberOfBytes": "128" }, - "t_struct(VoteInfo)18460_storage": { + "t_struct(VoteInfo)18527_storage": { "label": "struct DaofinPlugin.VoteInfo", "members": [ { @@ -5344,7 +6107,7 @@ }, { "label": "option", - "type": "t_enum(VoteOption)18434", + "type": "t_enum(VoteOption)18497", "offset": 1, "slot": "0" } @@ -5370,9 +6133,9 @@ } } }, - "15253cd265af8a22cbf83fdbf14720113d6ad536a0a95a664cd37e35973924a3": { - "address": "0xefc1aB2475ACb7E60499Efb171D173be19928a05", - "txHash": "0x9a488e43adc411e4da46457190c49a32ec3adc599c9824214a03e67763b96c19", + "0fdf0b67b478784e3c58d1abe0b0f40e388a8f3fa71a066b5aa76d7fb161a49a": { + "address": "0x870526b7973b56163a6997bB7C886F5E4EA53638", + "txHash": "0x0b2fc05f8f0758157ffc1f5532081e59c8201db4271468cb371406122fcbe927", "layout": { "solcVersion": "0.8.17", "storage": [ @@ -5471,7 +6234,7 @@ "slot": "351", "type": "t_uint256", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:147" + "src": "src/DaofinPlugin.sol:152" }, { "label": "_daofinGlobalSettings", @@ -5479,7 +6242,7 @@ "slot": "352", "type": "t_struct(DaofinGlobalSettings)18510_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:150" + "src": "src/DaofinPlugin.sol:155" }, { "label": "_proposals", @@ -5487,7 +6250,7 @@ "slot": "357", "type": "t_mapping(t_uint256,t_struct(Proposal)18574_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:153" + "src": "src/DaofinPlugin.sol:158" }, { "label": "_committeesToVotingSettings", @@ -5495,7 +6258,7 @@ "slot": "358", "type": "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18521_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:159" + "src": "src/DaofinPlugin.sol:164" }, { "label": "_voterToLockedAmounts", @@ -5503,7 +6266,7 @@ "slot": "359", "type": "t_mapping(t_address,t_struct(SnapshotAmount)18591_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:165" + "src": "src/DaofinPlugin.sol:170" }, { "label": "_judiciaryCommittee", @@ -5511,7 +6274,7 @@ "slot": "360", "type": "t_mapping(t_address,t_bool)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:176" + "src": "src/DaofinPlugin.sol:181" }, { "label": "_masterNodeDelegatee", @@ -5519,7 +6282,7 @@ "slot": "361", "type": "t_struct(MasterNodeDelegateeMappings)18604_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:180" + "src": "src/DaofinPlugin.sol:185" }, { "label": "_committeesList", @@ -5527,7 +6290,7 @@ "slot": "365", "type": "t_array(t_bytes32)dyn_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:183" + "src": "src/DaofinPlugin.sol:188" }, { "label": "_electionPeriods", @@ -5535,7 +6298,7 @@ "slot": "366", "type": "t_array(t_struct(ElectionPeriod)18586_storage)dyn_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:186" + "src": "src/DaofinPlugin.sol:191" } ], "types": { @@ -5587,7 +6350,7 @@ "label": "contract IDAO", "numberOfBytes": "20" }, - "t_contract(IXDCValidator)20725": { + "t_contract(IXDCValidator)20728": { "label": "contract IXDCValidator", "numberOfBytes": "20" }, @@ -5706,7 +6469,7 @@ "members": [ { "label": "xdcValidator", - "type": "t_contract(IXDCValidator)20725", + "type": "t_contract(IXDCValidator)20728", "offset": 0, "slot": "0" }, @@ -5948,9 +6711,9 @@ } } }, - "0fdf0b67b478784e3c58d1abe0b0f40e388a8f3fa71a066b5aa76d7fb161a49a": { - "address": "0x870526b7973b56163a6997bB7C886F5E4EA53638", - "txHash": "0x0b2fc05f8f0758157ffc1f5532081e59c8201db4271468cb371406122fcbe927", + "9657f47c80c4e9231febe133f481dfe5a77d1cc5634e16325592476aecfada29": { + "address": "0xE92D669bF46a0387E1B2ba5F1b8AFBD3E156B14A", + "txHash": "0x75b4f1ec02c37da532c700361c5cf5c95eae95b360b1b62fcb24191dc8ae6a8e", "layout": { "solcVersion": "0.8.17", "storage": [ @@ -6049,71 +6812,79 @@ "slot": "351", "type": "t_uint256", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:152" + "src": "src/DaofinPlugin.sol:149" }, { "label": "_daofinGlobalSettings", "offset": 0, "slot": "352", - "type": "t_struct(DaofinGlobalSettings)18510_storage", + "type": "t_struct(DaofinGlobalSettings)18505_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:155" + "src": "src/DaofinPlugin.sol:152" }, { "label": "_proposals", "offset": 0, - "slot": "357", - "type": "t_mapping(t_uint256,t_struct(Proposal)18574_storage)", + "slot": "354", + "type": "t_mapping(t_uint256,t_struct(Proposal)18569_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:158" + "src": "src/DaofinPlugin.sol:155" }, { "label": "_committeesToVotingSettings", "offset": 0, - "slot": "358", - "type": "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18521_storage)", + "slot": "355", + "type": "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18516_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:164" + "src": "src/DaofinPlugin.sol:161" }, { "label": "_voterToLockedAmounts", "offset": 0, - "slot": "359", - "type": "t_mapping(t_address,t_struct(SnapshotAmount)18591_storage)", + "slot": "356", + "type": "t_mapping(t_address,t_struct(SnapshotAmount)18586_storage)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:170" + "src": "src/DaofinPlugin.sol:167" }, { "label": "_judiciaryCommittee", "offset": 0, - "slot": "360", + "slot": "357", "type": "t_mapping(t_address,t_bool)", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:181" + "src": "src/DaofinPlugin.sol:178" + }, + { + "label": "_judiciaryCommitteeCount", + "offset": 0, + "slot": "358", + "type": "t_uint256", + "contract": "DaofinPlugin", + "src": "src/DaofinPlugin.sol:179" }, { "label": "_masterNodeDelegatee", "offset": 0, - "slot": "361", - "type": "t_struct(MasterNodeDelegateeMappings)18604_storage", + "slot": "359", + "type": "t_struct(MasterNodeDelegateeMappings)18599_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:185" + "src": "src/DaofinPlugin.sol:183" }, { "label": "_committeesList", "offset": 0, - "slot": "365", + "slot": "363", "type": "t_array(t_bytes32)dyn_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:188" + "src": "src/DaofinPlugin.sol:186" }, { "label": "_electionPeriods", "offset": 0, - "slot": "366", - "type": "t_array(t_struct(ElectionPeriod)18586_storage)dyn_storage", + "slot": "364", + "type": "t_array(t_struct(ElectionPeriod)18581_storage)dyn_storage", "contract": "DaofinPlugin", - "src": "src/DaofinPlugin.sol:191" + "src": "src/DaofinPlugin.sol:189" } ], "types": { @@ -6133,7 +6904,7 @@ "label": "struct IDAO.Action[]", "numberOfBytes": "32" }, - "t_array(t_struct(ElectionPeriod)18586_storage)dyn_storage": { + "t_array(t_struct(ElectionPeriod)18581_storage)dyn_storage": { "label": "struct DaofinPlugin.ElectionPeriod[]", "numberOfBytes": "32" }, @@ -6165,11 +6936,11 @@ "label": "contract IDAO", "numberOfBytes": "20" }, - "t_contract(IXDCValidator)20728": { + "t_contract(IXDCValidator)20851": { "label": "contract IXDCValidator", "numberOfBytes": "20" }, - "t_enum(VoteOption)18497": { + "t_enum(VoteOption)18498": { "label": "enum DaofinPlugin.VoteOption", "members": [ "None", @@ -6187,23 +6958,23 @@ "label": "mapping(address => bool)", "numberOfBytes": "32" }, - "t_mapping(t_address,t_struct(SnapshotAmount)18591_storage)": { + "t_mapping(t_address,t_struct(SnapshotAmount)18586_storage)": { "label": "mapping(address => struct DaofinPlugin.SnapshotAmount)", "numberOfBytes": "32" }, - "t_mapping(t_address,t_struct(VoteInfo)18527_storage)": { + "t_mapping(t_address,t_struct(VoteInfo)18522_storage)": { "label": "mapping(address => struct DaofinPlugin.VoteInfo)", "numberOfBytes": "32" }, - "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18521_storage)": { + "t_mapping(t_bytes32,t_struct(CommitteeVotingSettings)18516_storage)": { "label": "mapping(bytes32 => struct DaofinPlugin.CommitteeVotingSettings)", "numberOfBytes": "32" }, - "t_mapping(t_bytes32,t_struct(TallyDatails)18547_storage)": { + "t_mapping(t_bytes32,t_struct(TallyDatails)18542_storage)": { "label": "mapping(bytes32 => struct DaofinPlugin.TallyDatails)", "numberOfBytes": "32" }, - "t_mapping(t_uint256,t_struct(Proposal)18574_storage)": { + "t_mapping(t_uint256,t_struct(Proposal)18569_storage)": { "label": "mapping(uint256 => struct DaofinPlugin.Proposal)", "numberOfBytes": "32" }, @@ -6231,7 +7002,7 @@ ], "numberOfBytes": "96" }, - "t_struct(CommitteeVotingSettings)18521_storage": { + "t_struct(CommitteeVotingSettings)18516_storage": { "label": "struct DaofinPlugin.CommitteeVotingSettings", "members": [ { @@ -6279,12 +7050,12 @@ ], "numberOfBytes": "32" }, - "t_struct(DaofinGlobalSettings)18510_storage": { + "t_struct(DaofinGlobalSettings)18505_storage": { "label": "struct DaofinPlugin.DaofinGlobalSettings", "members": [ { "label": "xdcValidator", - "type": "t_contract(IXDCValidator)20728", + "type": "t_contract(IXDCValidator)20851", "offset": 0, "slot": "0" }, @@ -6293,29 +7064,11 @@ "type": "t_array(t_uint256)dyn_storage", "offset": 0, "slot": "1" - }, - { - "label": "totalNumberOfMasterNodes", - "type": "t_uint256", - "offset": 0, - "slot": "2" - }, - { - "label": "totalNumberOfJudiciaries", - "type": "t_uint256", - "offset": 0, - "slot": "3" - }, - { - "label": "totalNumberOfPeoplesHouse", - "type": "t_uint256", - "offset": 0, - "slot": "4" } ], - "numberOfBytes": "160" + "numberOfBytes": "64" }, - "t_struct(ElectionPeriod)18586_storage": { + "t_struct(ElectionPeriod)18581_storage": { "label": "struct DaofinPlugin.ElectionPeriod", "members": [ { @@ -6333,7 +7086,7 @@ ], "numberOfBytes": "32" }, - "t_struct(MasterNodeDelegateeMappings)18604_storage": { + "t_struct(MasterNodeDelegateeMappings)18599_storage": { "label": "struct DaofinPlugin.MasterNodeDelegateeMappings", "members": [ { @@ -6363,7 +7116,7 @@ ], "numberOfBytes": "128" }, - "t_struct(Proposal)18574_storage": { + "t_struct(Proposal)18569_storage": { "label": "struct DaofinPlugin.Proposal", "members": [ { @@ -6392,7 +7145,7 @@ }, { "label": "parameters", - "type": "t_struct(ProposalParameters)18581_storage", + "type": "t_struct(ProposalParameters)18576_storage", "offset": 0, "slot": "3" }, @@ -6404,20 +7157,20 @@ }, { "label": "voterToInfo", - "type": "t_mapping(t_address,t_struct(VoteInfo)18527_storage)", + "type": "t_mapping(t_address,t_struct(VoteInfo)18522_storage)", "offset": 0, "slot": "5" }, { "label": "committeeToTallyDatails", - "type": "t_mapping(t_bytes32,t_struct(TallyDatails)18547_storage)", + "type": "t_mapping(t_bytes32,t_struct(TallyDatails)18542_storage)", "offset": 0, "slot": "6" } ], "numberOfBytes": "224" }, - "t_struct(ProposalParameters)18581_storage": { + "t_struct(ProposalParameters)18576_storage": { "label": "struct DaofinPlugin.ProposalParameters", "members": [ { @@ -6441,7 +7194,7 @@ ], "numberOfBytes": "32" }, - "t_struct(SnapshotAmount)18591_storage": { + "t_struct(SnapshotAmount)18586_storage": { "label": "struct DaofinPlugin.SnapshotAmount", "members": [ { @@ -6459,7 +7212,7 @@ ], "numberOfBytes": "64" }, - "t_struct(TallyDatails)18547_storage": { + "t_struct(TallyDatails)18542_storage": { "label": "struct DaofinPlugin.TallyDatails", "members": [ { @@ -6489,7 +7242,7 @@ ], "numberOfBytes": "128" }, - "t_struct(VoteInfo)18527_storage": { + "t_struct(VoteInfo)18522_storage": { "label": "struct DaofinPlugin.VoteInfo", "members": [ { @@ -6500,7 +7253,7 @@ }, { "label": "option", - "type": "t_enum(VoteOption)18497", + "type": "t_enum(VoteOption)18498", "offset": 1, "slot": "0" } diff --git a/packages/contracts/dao-initial-data.json.example b/packages/contracts/dao-initial-data.json.example index 0f95679..c5febbb 100644 --- a/packages/contracts/dao-initial-data.json.example +++ b/packages/contracts/dao-initial-data.json.example @@ -17,7 +17,7 @@ ] }, "amounts": ["1", "2"], - "xdcValidatorAddress": "0xB0658F0295bbBf918eec097F5730AE0AD6D8CF8a", + "xdcValidatorAddress": "0xE92D669bF46a0387E1B2ba5F1b8AFBD3E156B14A", "judiciaryList": [ "0x5bfC74606bdA5092cefdede1A89c14624F6bF198", "0x168c49bC0dcF7544318c4b094769E4d72a319944" diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 9002cc6..dbe5c53 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -2,7 +2,7 @@ "name": "@xinfin/osx-daofin-contracts", "license": "AGPL-3.0-or-later", "description": "", - "version": "0.10.1", + "version": "0.10.4", "author": { "name": "aragon", "url": "https://github.com/aragon" diff --git a/packages/contracts/plugin-info.json b/packages/contracts/plugin-info.json index b7b400a..a2123f6 100644 --- a/packages/contracts/plugin-info.json +++ b/packages/contracts/plugin-info.json @@ -1,28 +1,28 @@ { "apothem": { - "repo": "beny-plugin-repo-3001", - "address": "0x66d71AB1ee47D00Ca10845402dE57f876DEC7208", + "repo": "beny-plugin-repo-3012", + "address": "0xb53Ee6BeB9D64B8EA12556564c53d9DC5ce1531B", "args": [], - "blockNumberOfDeployment": 56001318, + "blockNumberOfDeployment": 56267634, "releases": { "1": { "builds": { "1": { "setup": { "name": "DaofinPluginSetup", - "address": "0x4bf010f1b9beDA5450a8dD702ED602A104ff65EE", + "address": "0xDa4978fb5adfF99D579EF220cF69284762E91a0f", "args": [], - "blockNumberOfDeployment": 55471690 + "blockNumberOfDeployment": 56267639 }, "implementation": { "name": "DaofinPlugin", - "address": "0x4E0C596bE5FE217cB80AeB4C47C72701DFF0F6BC", + "address": "0x0c439Fa171b5A34350E512dEA70a36D96e8Bc3D9", "args": [], - "blockNumberOfDeployment": 55471690 + "blockNumberOfDeployment": 56267639 }, "helpers": [], "buildMetadataURI": "ipfs://QmYkd6CnaDpeeHg2YnaHCFFRtdvBYw1p3R25skJKCgqZot", - "blockNumberOfPublication": 56001321 + "blockNumberOfPublication": 56267644 } }, "releaseMetadataURI": "ipfs://QmbJWAESqCsf4RFCqEY7jecCashj8usXiyDNfKtZCwwzGb" diff --git a/packages/contracts/plugin-settings.ts b/packages/contracts/plugin-settings.ts index a45dcd2..c3dffac 100644 --- a/packages/contracts/plugin-settings.ts +++ b/packages/contracts/plugin-settings.ts @@ -2,7 +2,7 @@ import daofinBuildMetadata from './src/build-metadata.json'; import daofinReleaseMetadata from './src/release-metadata.json'; export const DaofinPluginSetupParams: PluginSetupParams = { - PLUGIN_REPO_ENS_NAME: 'beny-plugin-repo-3001', + PLUGIN_REPO_ENS_NAME: 'beny-plugin-repo-3012', PLUGIN_CONTRACT_NAME: 'DaofinPlugin', PLUGIN_SETUP_CONTRACT_NAME: 'DaofinPluginSetup', VERSION: { @@ -13,7 +13,7 @@ export const DaofinPluginSetupParams: PluginSetupParams = { build: daofinBuildMetadata, release: daofinReleaseMetadata, }, - XDCMasterNodeTestingAddress: '0xB0658F0295bbBf918eec097F5730AE0AD6D8CF8a', + XDCMasterNodeTestingAddress: '0xE92D669bF46a0387E1B2ba5F1b8AFBD3E156B14A', }; // Types diff --git a/packages/contracts/src/DaofinPlugin.sol b/packages/contracts/src/DaofinPlugin.sol index 6816e66..f1acff5 100644 --- a/packages/contracts/src/DaofinPlugin.sol +++ b/packages/contracts/src/DaofinPlugin.sol @@ -13,7 +13,7 @@ import {IXDCValidator} from "./interfaces/IXdcValidator.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {TransferHelper} from "@uniswap/lib/contracts/libraries/TransferHelper.sol"; import {CheckpointsUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/CheckpointsUpgradeable.sol"; -import {_applyRatioCeiled} from "@xinfin/osx/plugins/utils/Ratio.sol"; +import {_applyRatioCeiled, RATIO_BASE} from "@xinfin/osx/plugins/utils/Ratio.sol"; import "hardhat/console.sol"; contract DaofinPlugin is @@ -39,9 +39,6 @@ contract DaofinPlugin is struct DaofinGlobalSettings { IXDCValidator xdcValidator; uint256[] allowedAmounts; - uint256 totalNumberOfMasterNodes; - uint256 totalNumberOfJudiciaries; - uint256 totalNumberOfPeoplesHouse; // ElectionPeriod[] _electionPeriods; } struct CommitteeVotingSettings { @@ -179,6 +176,7 @@ contract DaofinPlugin is NOTE: holds a whitelist mapping */ mapping(address => bool) public _judiciaryCommittee; + uint256 public _judiciaryCommitteeCount; /* NOTE: holds a master node delegatee whitelist mapping */ @@ -204,7 +202,7 @@ contract DaofinPlugin is if (isMasterNodeDelegatee(_voter)) revert("1"); if (isJudiciaryMember(_voter)) revert("2"); - if (getGlobalSettings().xdcValidator.isCandidate(_voter)) revert("3"); + if (getGlobalSettings().xdcValidator.isCandidate(_voter)) revert(); _voterToLockedAmounts[_voter].amount += _value; _voterToLockedAmounts[_voter].blockNumber = snapshotBlockNumber; @@ -524,6 +522,7 @@ contract DaofinPlugin is if (isJudiciaryMember(_member)) revert(); if (_member == address(0)) revert(); _judiciaryCommittee[_member] = true; + _judiciaryCommitteeCount++; emit JudiciaryChanged(_member, 0); } @@ -558,7 +557,7 @@ contract DaofinPlugin is if (masterNode == address(0)) revert(); if (delegatee_ == address(0)) revert(); - if (masterNode == delegatee_) revert("1"); + if (masterNode == delegatee_) revert(); if (!getGlobalSettings().xdcValidator.isCandidate(masterNode)) revert(); @@ -570,9 +569,15 @@ contract DaofinPlugin is } function _updateMasterNodeDelegatee(address masterNode_, address delegatee_) private { + address _delegatee = _masterNodeDelegatee.masterNodeToDelegatee[masterNode_]; + address _masterNode = _masterNodeDelegatee.masterNodeToDelegatee[masterNode_]; + + if (_delegatee == address(0) && _masterNode == address(0)) { + _masterNodeDelegatee.numberOfJointMasterNodes++; + } + _masterNodeDelegatee.masterNodeToDelegatee[masterNode_] = delegatee_; _masterNodeDelegatee.delegateeToMasterNode[delegatee_] = masterNode_; - _masterNodeDelegatee.numberOfJointMasterNodes++; } function isMasterNodeDelegatee(address delegatee_) public view returns (bool isValid) { @@ -638,8 +643,13 @@ contract DaofinPlugin is uint256 minParticipation = getCommitteesToVotingSettings(committee).minParticipation; - if (minParticipation == 0) return false; - isValid = totalVotes >= minParticipation; + if (minParticipation <= 0) return false; + if (totalVotes <= 0) return false; + + isValid = + totalVotes >= + _applyRatioCeiled(getTotalNumberOfMembersByCommittee(committee), minParticipation); + if (!isValid) return false; } return false; @@ -656,12 +666,40 @@ contract DaofinPlugin is uint256 supportThreshold = getCommitteesToVotingSettings(committee).supportThreshold; - if (yes == 0) return false; - isValid = yes >= supportThreshold; + if (yes <= 0) return false; + if (supportThreshold <= 0) return false; + isValid = + yes >= + _applyRatioCeiled(getTotalNumberOfMembersByCommittee(committee), supportThreshold); if (!isValid) return false; } return false; } + function getTotalNumberOfMN() public view returns (uint256, uint256) { + DaofinGlobalSettings memory _gs = getGlobalSettings(); + return (_gs.xdcValidator.candidateCount(), _masterNodeDelegatee.numberOfJointMasterNodes); + } + + function getXDCTotalSupply() public pure returns (uint256) { + return 37705012699 ether; + } + + function getTotalNumberOfJudiciary() public view returns (uint256) { + return _judiciaryCommitteeCount; + } + + function getTotalNumberOfMembersByCommittee(bytes32 committee_) public view returns (uint256) { + if (committee_ == MasterNodeCommittee) { + (uint256 xdcValidator, ) = getTotalNumberOfMN(); + return xdcValidator; + } else if (committee_ == JudiciaryCommittee) { + return getTotalNumberOfJudiciary(); + } else if (committee_ == PeoplesHouseCommittee) { + return getXDCTotalSupply(); + } + return 0; + } + receive() external payable {} } diff --git a/packages/contracts/src/interfaces/IXdcValidator.sol b/packages/contracts/src/interfaces/IXdcValidator.sol index 9cd9ae8..38a015a 100644 --- a/packages/contracts/src/interfaces/IXdcValidator.sol +++ b/packages/contracts/src/interfaces/IXdcValidator.sol @@ -5,4 +5,6 @@ interface IXDCValidator { function isCandidate(address _candidate) external view returns (bool); function getCandidates() external view returns (address[] memory); + + function candidateCount() external view returns (uint256); } diff --git a/packages/contracts/src/test/mock/XDCValidator.sol b/packages/contracts/src/test/mock/XDCValidator.sol index 813d446..95f2339 100644 --- a/packages/contracts/src/test/mock/XDCValidator.sol +++ b/packages/contracts/src/test/mock/XDCValidator.sol @@ -3,16 +3,27 @@ pragma solidity 0.8.17; contract XDCValidator { mapping(address => bool) validators; + uint256 public candidateCount; function addCandidate(address candidate) external { validators[candidate] = true; + candidateCount++; } function removeCandidate(address candidate) external { delete validators[candidate]; + candidateCount--; } function isCandidate(address _candidate) external view returns (bool) { return validators[_candidate]; } + + function getRealCandidates() external pure returns (uint256) { + return 420; + } + + function getCandidates() external view returns (uint256) { + return candidateCount; + } } diff --git a/packages/contracts/test/unit-testing/daofin.ts b/packages/contracts/test/unit-testing/daofin.ts index f522137..d89e86c 100644 --- a/packages/contracts/test/unit-testing/daofin.ts +++ b/packages/contracts/test/unit-testing/daofin.ts @@ -20,6 +20,7 @@ import { XdcValidator, } from './daofin-common'; import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {RatioTest, RatioTest__factory} from '@xinfin/osx-ethers'; import {ProposalCreationSteps} from '@xinfin/osx-sdk-client'; import {expect} from 'chai'; import {BigNumber} from 'ethers'; @@ -43,17 +44,24 @@ describe(PLUGIN_CONTRACT_NAME, function () { let Bob: SignerWithAddress; let Mike: SignerWithAddress; let John: SignerWithAddress; + let Beny: SignerWithAddress; let xdcValidatorMock: XDCValidator; + let ratio: RatioTest; before(async () => { signers = await ethers.getSigners(); Alice = signers[0]; Bob = signers[1]; Mike = signers[2]; John = signers[3]; + Beny = signers[4]; dao = await deployTestDao(Alice); DaofinPlugin = new DaofinPlugin__factory(Alice); + + const RatioTest = new RatioTest__factory(Alice); + ratio = await RatioTest.deploy(); + xdcValidatorMock = await deployXDCValidator(Alice); }); @@ -1037,32 +1045,6 @@ describe(PLUGIN_CONTRACT_NAME, function () { ); }); }); - // ...createPropsalParams - // ); - // await daofinPlugin.createProposal(...createPropsalParams); - // await daofinPlugin - // .connect(Bob) - // .deposit({value: parseEther('10').toString()}); - - // const committee = await daofinPlugin.findCommitteeName(Bob.address); - - // const tallyBefore = await daofinPlugin.getProposalTallyDetails( - // proposalId, - // committee - // ); - - // await daofinPlugin.connect(Bob).vote(proposalId, '2', false); - - // const tally = await daofinPlugin.getProposalTallyDetails( - // proposalId, - // committee - // ); - // expect(tally.yes.toString()).be.eq( - // tallyBefore.yes.add(tally.yes).toString() - // ); - // expect(tally.no.toNumber()).be.eq(0); - // expect(tally.abstain.toNumber()).be.eq(0); - // }); }); describe('canExecute', async () => { before(async () => { @@ -1155,4 +1137,256 @@ describe(PLUGIN_CONTRACT_NAME, function () { .to.reverted; }); }); + describe('MasterNode Minimum Participation', async () => { + beforeEach(async () => { + await daofinPlugin.initialize(...initializeParams); + }); + before(async () => { + initializeParams = [ + dao.address, + [parseEther('10'), parseEther('20'), parseEther('30')], + xdcValidatorMock.address, + [ + { + name: MasterNodeCommittee, + minDuration: 1, + minParticipation: '1000', + minVotingPower: 1, + supportThreshold: 1, + }, + { + name: JudiciaryCommittee, + minDuration: 1, + minParticipation: 1, + minVotingPower: 1, + supportThreshold: 1, + }, + { + name: PeoplesHouseCommittee, + minDuration: 1, + minParticipation: 1, + minVotingPower: 1, + supportThreshold: 1, + }, + ], + [Math.floor(Date.now() / 1000)], + [Bob.address], + ]; + }); + it('all votes must be greater or equal to minimum participations', async () => { + const proposalId = await daofinPlugin.callStatic.createProposal( + ...createPropsalParams + ); + await daofinPlugin.createProposal(...createPropsalParams); + + await xdcValidatorMock.addCandidate(Mike.address); + + await daofinPlugin + .connect(Mike) + .updateOrJoinMasterNodeDelegatee(John.address); + + await daofinPlugin.connect(Bob).addJudiciaryMember(Beny.address); + + // Vote as MN Senate + await daofinPlugin.connect(John).vote(proposalId, '2', false); + + // Vote as Judiciary + + await daofinPlugin.connect(Bob).vote(proposalId, '3', false); + + // Vote as Judiciary + await daofinPlugin.connect(Beny).vote(proposalId, '1', false); + + const mnTally = await daofinPlugin.getProposalTallyDetails( + proposalId, + MasterNodeCommittee + ); + + const sumOfMnVotes = mnTally.yes.add(mnTally.no).add(mnTally.abstain); + const totalMNs = await xdcValidatorMock.getRealCandidates(); + const masterNodeSettings = + await daofinPlugin.getCommitteesToVotingSettings(MasterNodeCommittee); + + const minParticipations = await ratio.applyRatioCeiled( + totalMNs, + masterNodeSettings.minParticipation + ); + + expect(minParticipations.toNumber()).to.lessThanOrEqual( + sumOfMnVotes.toNumber() + ); + }); + }); + describe('Judiciay Minimum Participation', async () => { + beforeEach(async () => { + await daofinPlugin.initialize(...initializeParams); + }); + before(async () => { + initializeParams = [ + dao.address, + [parseEther('10'), parseEther('20'), parseEther('30')], + xdcValidatorMock.address, + [ + { + name: MasterNodeCommittee, + minDuration: 1, + minParticipation: '1000', + minVotingPower: 1, + supportThreshold: 1, + }, + { + name: JudiciaryCommittee, + minDuration: 1, + minParticipation: '500000', + minVotingPower: 1, + supportThreshold: 1, + }, + { + name: PeoplesHouseCommittee, + minDuration: 1, + minParticipation: 1, + minVotingPower: 1, + supportThreshold: 1, + }, + ], + [Math.floor(Date.now() / 1000)], + [Bob.address], + ]; + }); + it('all votes must be greater or equal to minimum participations', async () => { + const proposalId = await daofinPlugin.callStatic.createProposal( + ...createPropsalParams + ); + await daofinPlugin.createProposal(...createPropsalParams); + + await xdcValidatorMock.addCandidate(Mike.address); + + await daofinPlugin + .connect(Mike) + .updateOrJoinMasterNodeDelegatee(John.address); + + await daofinPlugin.connect(Bob).addJudiciaryMember(Beny.address); + + // Vote as MN Senate + await daofinPlugin.connect(John).vote(proposalId, '2', false); + + // Vote as Judiciary + + await daofinPlugin.connect(Bob).vote(proposalId, '3', false); + + // Vote as Judiciary + await daofinPlugin.connect(Beny).vote(proposalId, '1', false); + + const judiciariesTally = await daofinPlugin.getProposalTallyDetails( + proposalId, + JudiciaryCommittee + ); + + const sumOfMnVotes = judiciariesTally.yes + .add(judiciariesTally.no) + .add(judiciariesTally.abstain); + const totalJudiciaries = await daofinPlugin.getTotalNumberOfJudiciary(); + const JudiciarySettings = + await daofinPlugin.getCommitteesToVotingSettings(JudiciaryCommittee); + + const minParticipations = await ratio.applyRatioCeiled( + totalJudiciaries, + JudiciarySettings.minParticipation + ); + + expect(minParticipations.toNumber()).to.lessThanOrEqual( + sumOfMnVotes.toNumber() + ); + }); + }); + describe('People Minimum Participation', async () => { + beforeEach(async () => { + await daofinPlugin.initialize(...initializeParams); + }); + before(async () => { + xdcValidatorMock = await deployXDCValidator(Alice); + initializeParams = [ + dao.address, + [parseEther('10'), parseEther('20'), parseEther('30')], + xdcValidatorMock.address, + [ + { + name: MasterNodeCommittee, + minDuration: 1, + minParticipation: '1000', + minVotingPower: 1, + supportThreshold: 1, + }, + { + name: JudiciaryCommittee, + minDuration: 1, + minParticipation: '500000', + minVotingPower: 1, + supportThreshold: 1, + }, + { + name: PeoplesHouseCommittee, + minDuration: 1, + minParticipation: '100', + minVotingPower: 1, + supportThreshold: 1, + }, + ], + [Math.floor(Date.now() / 1000)], + [Bob.address], + ]; + }); + it('all votes must be greater or equal to minimum participations', async () => { + const proposalId = await daofinPlugin.callStatic.createProposal( + ...createPropsalParams + ); + await daofinPlugin.createProposal(...createPropsalParams); + + await daofinPlugin.connect(Beny).deposit({ + value: parseEther('10').toString(), + }); + + await daofinPlugin.connect(Mike).deposit({ + value: parseEther('10').toString(), + }); + + await daofinPlugin.connect(John).deposit({ + value: parseEther('10').toString(), + }); + + // Vote as People + await daofinPlugin.connect(John).vote(proposalId, '2', false); + + // Vote as People + await daofinPlugin.connect(Mike).vote(proposalId, '2', false); + + // Vote as Judiciary + await daofinPlugin.connect(Bob).vote(proposalId, '3', false); + + // Vote as People + await daofinPlugin.connect(Beny).vote(proposalId, '1', false); + + const peopleTally = await daofinPlugin.getProposalTallyDetails( + proposalId, + PeoplesHouseCommittee + ); + + const sumOfVotes = peopleTally.yes + .add(peopleTally.no) + .add(peopleTally.abstain); + + const totalSupply = await daofinPlugin.getXDCTotalSupply(); + + const peopleSettings = await daofinPlugin.getCommitteesToVotingSettings( + PeoplesHouseCommittee + ); + + const minParticipations = await ratio.applyRatioCeiled( + totalSupply, + peopleSettings.minParticipation + ); + const isGte = sumOfVotes.gte(minParticipations); + expect(isGte).to.be.true; + }); + }); }); diff --git a/packages/js-client/package.json b/packages/js-client/package.json index 39f578f..553a09f 100644 --- a/packages/js-client/package.json +++ b/packages/js-client/package.json @@ -1,7 +1,7 @@ { "name": "@xinfin/osx-daofin-sdk-client", "author": "Aragon Association", - "version": "1.0.54", + "version": "1.0.59", "license": "MIT", "main": "dist/index.js", "module": "dist/osx-daofin-sdk-client.esm.js", @@ -73,8 +73,8 @@ "@ethersproject/wallet": "^5.7.0", "@ethersproject/abi": "^5.7.0", "@ethersproject/keccak256": "^5.7.0", - "@xinfin/osx-daofin-contracts": "0.10.1", - "@xinfin/osx-daofin-contracts-ethers": "0.10.1", + "@xinfin/osx-daofin-contracts": "0.10.4", + "@xinfin/osx-daofin-contracts-ethers": "0.10.4", "@xinfin/osx-sdk-client": "^1.10.1", "graphql": "^16.6.0", "graphql-request": "4.3.0" diff --git a/packages/js-client/src/internal/client/methods.ts b/packages/js-client/src/internal/client/methods.ts index c54479b..7b63b60 100644 --- a/packages/js-client/src/internal/client/methods.ts +++ b/packages/js-client/src/internal/client/methods.ts @@ -3,6 +3,7 @@ import { DaofinPluginCore } from '../../core'; import { AddJudiciaryStepValue, AddJudiciarySteps, + CommitteeVotingSettings, CreateProposalParams, DaofinDetails, DepositStepValue, @@ -31,6 +32,7 @@ import { ProposalCreationStepValue, ProposalCreationSteps, VoteValues, + VotingSettings, } from '@xinfin/osx-sdk-client'; import { FailedDepositError } from '@xinfin/osx-sdk-common'; import { resolveIpfsCid } from '@xinfin/osx-sdk-common'; @@ -67,9 +69,6 @@ export class DaofinClientMethods return { allowedAmounts: settings.allowedAmounts, xdcValidator: settings.xdcValidator, - totalNumberOfMasterNodes: 0, - totalNumberOfJudiciaries: settings.totalNumberOfJudiciaries, - totalNumberOfPeoplesHouse: settings.totalNumberOfPeoplesHouse, }; } getDaofin(): Promise { @@ -352,4 +351,58 @@ export class DaofinClientMethods key: VoteSteps.DONE, }; } + async getProposalTallyDetails( + proposalId: string, + committee: string + ): Promise { + const daofin = DaofinPlugin__factory.connect( + this.pluginAddress, + this.web3.getProvider() + ); + + return await daofin.getProposalTallyDetails(proposalId, committee); + } + async getCommitteesToVotingSettings( + proposalId: string, + committee: string + ): Promise { + const daofin = DaofinPlugin__factory.connect( + this.pluginAddress, + this.web3.getProvider() + ); + + return await daofin.getCommitteesToVotingSettings(committee); + } + async getTotalNumberOfMembersByCommittee( + committee: string + ): Promise { + const daofin = DaofinPlugin__factory.connect( + this.pluginAddress, + this.web3.getProvider() + ); + + return await daofin.getTotalNumberOfMembersByCommittee(committee); + } + async getTotalNumberOfJudiciary(): Promise { + const daofin = DaofinPlugin__factory.connect( + this.pluginAddress, + this.web3.getProvider() + ); + + return await daofin.getTotalNumberOfJudiciary(); + } + async getTotalNumberOfMN(): Promise<[BigNumberish, BigNumberish]> { + const daofin = DaofinPlugin__factory.connect( + this.pluginAddress, + this.web3.getProvider() + ); + return await daofin.getTotalNumberOfMN(); + } + async getXDCTotalSupply(): Promise { + const daofin = DaofinPlugin__factory.connect( + this.pluginAddress, + this.web3.getProvider() + ); + return await daofin.getXDCTotalSupply(); + } } diff --git a/packages/js-client/src/internal/interfaces.ts b/packages/js-client/src/internal/interfaces.ts index 08d8a74..df8a9dd 100644 --- a/packages/js-client/src/internal/interfaces.ts +++ b/packages/js-client/src/internal/interfaces.ts @@ -1,13 +1,15 @@ import { AddJudiciaryStepValue, + CommitteeVotingSettings, CreateProposalParams, DepositStepValue, GlobalSettings, + TallyDetails, UpdateOrJoinMasterNodeDelegateeStepValue, VoteOption, VoteStepValues, } from '../types'; -import { BigNumberish } from '@ethersproject/bignumber'; +import { BigNumber, BigNumberish } from '@ethersproject/bignumber'; import { InterfaceParams } from '@xinfin/osx-client-common'; import { ProposalMetadata } from '@xinfin/osx-client-common'; import { GasFeeEstimation } from '@xinfin/osx-client-common'; @@ -17,6 +19,7 @@ import { DaoDetails, ProposalCreationStepValue, ProposalQueryParams, + VotingSettings, } from '@xinfin/osx-sdk-client'; export interface IDaofinClientMethods { @@ -50,6 +53,18 @@ export interface IDaofinClientMethods { voteOption: VoteOption, earlyExecution: boolean ) => AsyncGenerator; + getProposalTallyDetails( + proposalId: string, + committee: string + ): Promise; + getCommitteesToVotingSettings( + proposalId: string, + committee: string + ): Promise; + getTotalNumberOfMembersByCommittee(committee: string): Promise; + getXDCTotalSupply(): Promise; + getTotalNumberOfJudiciary(): Promise; + getTotalNumberOfMN(): Promise<[BigNumberish, BigNumberish]>; } export interface IDaofinClientEncoding {} export interface IDaofinClientDecoding { diff --git a/packages/js-client/src/types.ts b/packages/js-client/src/types.ts index 3591984..2b07cff 100644 --- a/packages/js-client/src/types.ts +++ b/packages/js-client/src/types.ts @@ -1,7 +1,10 @@ import { BigNumberish } from '@ethersproject/bignumber'; import { DaoAction } from '@xinfin/osx-client-common'; import { ContextState, OverriddenState } from '@xinfin/osx-client-common'; -import { DaofinPlugin } from '@xinfin/osx-daofin-contracts-ethers'; +import { + DaofinPlugin, + DaofinPlugin__factory, +} from '@xinfin/osx-daofin-contracts-ethers'; import { Context, ContextParams, DaoDetails } from '@xinfin/osx-sdk-client'; export type DaofinContextState = { @@ -100,3 +103,7 @@ export enum VoteOption { YES, NO, } + +export type TallyDetails = DaofinPlugin.TallyDatailsStruct; +export type CommitteeVotingSettings = + DaofinPlugin.CommitteeVotingSettingsStruct;