From 34f800d0fdabd5323fd901beb002212491ff9653 Mon Sep 17 00:00:00 2001 From: vrde Date: Fri, 10 Nov 2023 16:53:19 +0100 Subject: [PATCH] Deploy staging (#130) This PR is not only new addresses, I also changed the waiting time a bit. --- .openzeppelin/polygon-mumbai.json | 1548 +++++++++++++++++ deployments/80001.DAORoles.arguments.json | 1 + .../80001.DIAOracleV2Mock.arguments.json | 1 + .../80001.GovernanceToken.arguments.json | 1 + .../80001.InternalMarket.arguments.json | 1 + .../80001.NeokingdomToken.arguments.json | 1 + deployments/80001.ProxyAdmin.arguments.json | 1 + .../80001.RedemptionController.arguments.json | 1 + .../80001.ResolutionManager.arguments.json | 1 + .../80001.ShareholderRegistry.arguments.json | 1 + deployments/80001.TokenMock.arguments.json | 1 + deployments/80001.Voting.arguments.json | 1 + deployments/80001.network.json | 57 + deployments/80001.setup.nextstep | 1 + dev-wallets.json | 6 +- hardhat.config.ts | 5 +- lib/internal/core.ts | 28 +- lib/utils.ts | 7 +- tasks/deploy.ts | 22 +- 19 files changed, 1664 insertions(+), 21 deletions(-) create mode 100644 .openzeppelin/polygon-mumbai.json create mode 100644 deployments/80001.DAORoles.arguments.json create mode 100644 deployments/80001.DIAOracleV2Mock.arguments.json create mode 100644 deployments/80001.GovernanceToken.arguments.json create mode 100644 deployments/80001.InternalMarket.arguments.json create mode 100644 deployments/80001.NeokingdomToken.arguments.json create mode 100644 deployments/80001.ProxyAdmin.arguments.json create mode 100644 deployments/80001.RedemptionController.arguments.json create mode 100644 deployments/80001.ResolutionManager.arguments.json create mode 100644 deployments/80001.ShareholderRegistry.arguments.json create mode 100644 deployments/80001.TokenMock.arguments.json create mode 100644 deployments/80001.Voting.arguments.json create mode 100644 deployments/80001.network.json create mode 100644 deployments/80001.setup.nextstep diff --git a/.openzeppelin/polygon-mumbai.json b/.openzeppelin/polygon-mumbai.json new file mode 100644 index 0000000..88f2738 --- /dev/null +++ b/.openzeppelin/polygon-mumbai.json @@ -0,0 +1,1548 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x88A03e2871d7A0f26F6A593B83F79387529f617B", + "txHash": "0x45e6ff816e04902b1165213f4e6cc2a11ed8d648df8438e8b2cbe6e20b04146b" + }, + "proxies": [ + { + "address": "0x249A65809824CF26a180e3181ef971d64e8e4aEd", + "txHash": "0x3edcca89e1a97598f2764d1a1bc1dd5698cc6822d5d84028680e50d1fc8dd1ba", + "kind": "transparent" + }, + { + "address": "0x74FdD2b10cF71B9b7AEB402F90aDE1a67D9C2258", + "txHash": "0xcdcfb494c4246abc1cb4af03ad3c3d6092c10c972b17807a7732a1c6f31dffab", + "kind": "transparent" + }, + { + "address": "0xf4537D936a31abb933acdBF288a274eC732B15aF", + "txHash": "0x8842ae7e950fc1b4a390ffe185fb8646bedc4085eb63639d10b500675e7ca725", + "kind": "transparent" + }, + { + "address": "0xF610a6EB92023DCb716E218Bf8225d862F8e4A0e", + "txHash": "0x26046ca4f717e7b3d15ab1d1313dca77a95df2b4347bb3bb3e478fcf215aa8be", + "kind": "transparent" + }, + { + "address": "0xd345D53144E237C69F08B543553FAFc78d14Ab24", + "txHash": "0xdf8dabdea85b3d4ddbbf076cd9b422cf64c63f7bd70e6450137a48ff8bd4a5fc", + "kind": "transparent" + }, + { + "address": "0x5b8f86C4010e58347afCEB7820A1c410b845D5d1", + "txHash": "0xf015ddea65e50dbeddd94572a5ed97d177f688b79514b09b7284fbfc1f398c5f", + "kind": "transparent" + }, + { + "address": "0x62279b0624da9Ade912273C9F88287596c66e1F1", + "txHash": "0xa2ae4b09527cb7de9e7218dcec1058b22641956eca60021f01aa90fb3077a533", + "kind": "transparent" + } + ], + "impls": { + "d6ed452eda51e14381aef0b5e94488f5066c42924acd3acb1059c5491b121066": { + "address": "0xdc03221767bC9A5db9e847AB1a6b4c1a95B7B0Ac", + "txHash": "0x6f81efb18eb5b80516e67d1dceb6c4dadfa4ce0daacbf295bfe6589199b291e3", + "layout": { + "solcVersion": "0.8.16", + "storage": [ + { + "label": "_shareholderRegistry", + "offset": 0, + "slot": "0", + "type": "t_contract(IShareholderRegistry)11017", + "contract": "VotingBase", + "src": "contracts/Voting/VotingBase.sol:21" + }, + { + "label": "_token", + "offset": 0, + "slot": "1", + "type": "t_contract(IERC20Upgradeable)1267", + "contract": "VotingBase", + "src": "contracts/Voting/VotingBase.sol:22" + }, + { + "label": "_contributorRole", + "offset": 0, + "slot": "2", + "type": "t_bytes32", + "contract": "VotingBase", + "src": "contracts/Voting/VotingBase.sol:24" + }, + { + "label": "_delegates", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_address)", + "contract": "VotingBase", + "src": "contracts/Voting/VotingBase.sol:26" + }, + { + "label": "_votingPower", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_uint256)", + "contract": "VotingBase", + "src": "contracts/Voting/VotingBase.sol:27" + }, + { + "label": "_delegators", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_uint256)", + "contract": "VotingBase", + "src": "contracts/Voting/VotingBase.sol:28" + }, + { + "label": "_totalVotingPower", + "offset": 0, + "slot": "6", + "type": "t_uint256", + "contract": "VotingBase", + "src": "contracts/Voting/VotingBase.sol:30" + }, + { + "label": "_currentSnapshotId", + "offset": 0, + "slot": "7", + "type": "t_uint256", + "contract": "Snapshottable", + "src": "contracts/extensions/Snapshottable.sol:11" + }, + { + "label": "_delegationSnapshots", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_struct(SnapshotsDelegates)12842_storage)", + "contract": "VotingSnapshot", + "src": "contracts/Voting/VotingSnapshot.sol:21" + }, + { + "label": "_votingPowerSnapshots", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_address,t_struct(SnapshotsValues)12849_storage)", + "contract": "VotingSnapshot", + "src": "contracts/Voting/VotingSnapshot.sol:22" + }, + { + "label": "_totalVotingPowerSnapshots", + "offset": 0, + "slot": "10", + "type": "t_struct(SnapshotsValues)12849_storage", + "contract": "VotingSnapshot", + "src": "contracts/Voting/VotingSnapshot.sol:23" + }, + { + "label": "_initialized", + "offset": 0, + "slot": "12", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "12", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "13", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_roles", + "offset": 0, + "slot": "63", + "type": "t_contract(DAORoles)13166", + "contract": "HasRole", + "src": "contracts/extensions/HasRole.sol:11" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)50_storage": { + "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", + "numberOfBytes": "32" + }, + "t_contract(DAORoles)13166": { + "label": "contract DAORoles", + "numberOfBytes": "20" + }, + "t_contract(IERC20Upgradeable)1267": { + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(IShareholderRegistry)11017": { + "label": "contract IShareholderRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(SnapshotsDelegates)12842_storage)": { + "label": "mapping(address => struct VotingSnapshot.SnapshotsDelegates)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(SnapshotsValues)12849_storage)": { + "label": "mapping(address => struct VotingSnapshot.SnapshotsValues)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_struct(SnapshotsDelegates)12842_storage": { + "label": "struct VotingSnapshot.SnapshotsDelegates", + "members": [ + { + "label": "ids", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "delegates", + "type": "t_array(t_address)dyn_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(SnapshotsValues)12849_storage": { + "label": "struct VotingSnapshot.SnapshotsValues", + "members": [ + { + "label": "ids", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "values", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "bd049b61dfce306b06790b7faae1c150e51b760e71bad4b8d9485145412371d1": { + "address": "0x374eE19adA26E55bBA0aa43A402Aeb471fA4D364", + "txHash": "0x76ac6e35c267710af672fc2815f918c4b23222f3149615568e166ca066f545e5", + "layout": { + "solcVersion": "0.8.16", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_roles", + "offset": 0, + "slot": "51", + "type": "t_contract(DAORoles)13166", + "contract": "HasRole", + "src": "contracts/extensions/HasRole.sol:11" + }, + { + "label": "_balances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "53", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "54", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" + }, + { + "label": "_name", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "56", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "57", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:400" + }, + { + "label": "_voting", + "offset": 0, + "slot": "102", + "type": "t_contract(IVoting)12064", + "contract": "GovernanceTokenBase", + "src": "contracts/GovernanceToken/GovernanceTokenBase.sol:14" + }, + { + "label": "_redemptionController", + "offset": 0, + "slot": "103", + "type": "t_contract(IRedemptionController)8567", + "contract": "GovernanceTokenBase", + "src": "contracts/GovernanceToken/GovernanceTokenBase.sol:15" + }, + { + "label": "tokenExternal", + "offset": 0, + "slot": "104", + "type": "t_contract(INeokingdomToken)8480", + "contract": "GovernanceTokenBase", + "src": "contracts/GovernanceToken/GovernanceTokenBase.sol:16" + }, + { + "label": "_vestingBalance", + "offset": 0, + "slot": "105", + "type": "t_mapping(t_address,t_uint256)", + "contract": "GovernanceTokenBase", + "src": "contracts/GovernanceToken/GovernanceTokenBase.sol:27" + }, + { + "label": "_currentSnapshotId", + "offset": 0, + "slot": "106", + "type": "t_uint256", + "contract": "Snapshottable", + "src": "contracts/extensions/Snapshottable.sol:11" + }, + { + "label": "_accountBalanceSnapshots", + "offset": 0, + "slot": "107", + "type": "t_mapping(t_address,t_struct(Snapshots)7033_storage)", + "contract": "GovernanceTokenSnapshot", + "src": "contracts/GovernanceToken/GovernanceTokenSnapshot.sol:20" + }, + { + "label": "_totalSupplySnapshots", + "offset": 0, + "slot": "108", + "type": "t_struct(Snapshots)7033_storage", + "contract": "GovernanceTokenSnapshot", + "src": "contracts/GovernanceToken/GovernanceTokenSnapshot.sol:21" + }, + { + "label": "_shareholderRegistry", + "offset": 0, + "slot": "110", + "type": "t_contract(IShareholderRegistry)11017", + "contract": "GovernanceToken", + "src": "contracts/GovernanceToken/GovernanceToken.sol:20" + }, + { + "label": "depositedTokens", + "offset": 0, + "slot": "111", + "type": "t_mapping(t_address,t_array(t_struct(DepositedTokens)6201_storage)dyn_storage)", + "contract": "GovernanceToken", + "src": "contracts/GovernanceToken/GovernanceToken.sol:33" + }, + { + "label": "settlementPeriod", + "offset": 0, + "slot": "112", + "type": "t_uint256", + "contract": "GovernanceToken", + "src": "contracts/GovernanceToken/GovernanceToken.sol:35" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(DepositedTokens)6201_storage)dyn_storage": { + "label": "struct GovernanceToken.DepositedTokens[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(DAORoles)13166": { + "label": "contract DAORoles", + "numberOfBytes": "20" + }, + "t_contract(INeokingdomToken)8480": { + "label": "contract INeokingdomToken", + "numberOfBytes": "20" + }, + "t_contract(IRedemptionController)8567": { + "label": "contract IRedemptionController", + "numberOfBytes": "20" + }, + "t_contract(IShareholderRegistry)11017": { + "label": "contract IShareholderRegistry", + "numberOfBytes": "20" + }, + "t_contract(IVoting)12064": { + "label": "contract IVoting", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_array(t_struct(DepositedTokens)6201_storage)dyn_storage)": { + "label": "mapping(address => struct GovernanceToken.DepositedTokens[])", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Snapshots)7033_storage)": { + "label": "mapping(address => struct GovernanceTokenSnapshot.Snapshots)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(DepositedTokens)6201_storage": { + "label": "struct GovernanceToken.DepositedTokens", + "members": [ + { + "label": "amount", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "settlementTimestamp", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Snapshots)7033_storage": { + "label": "struct GovernanceTokenSnapshot.Snapshots", + "members": [ + { + "label": "ids", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "values", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "26fba1b3fe25e5207a24537c046d7658f273282c1ef0fbf18b48932a88074c7f": { + "address": "0x1fEADdf58A1B4DE345089d484aE63F5b37C060d2", + "txHash": "0x637833b535a36cfaa4d7be194d2270c35f6fd8b596eb442e05b6dcd95759802e", + "layout": { + "solcVersion": "0.8.16", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_roles", + "offset": 0, + "slot": "51", + "type": "t_contract(DAORoles)13166", + "contract": "HasRole", + "src": "contracts/extensions/HasRole.sol:11" + }, + { + "label": "redemptionStart", + "offset": 0, + "slot": "52", + "type": "t_uint256", + "contract": "RedemptionControllerBase", + "src": "contracts/RedemptionController/RedemptionControllerBase.sol:21" + }, + { + "label": "redemptionWindow", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "RedemptionControllerBase", + "src": "contracts/RedemptionController/RedemptionControllerBase.sol:22" + }, + { + "label": "maxDaysInThePast", + "offset": 0, + "slot": "54", + "type": "t_uint256", + "contract": "RedemptionControllerBase", + "src": "contracts/RedemptionController/RedemptionControllerBase.sol:24" + }, + { + "label": "activityWindow", + "offset": 0, + "slot": "55", + "type": "t_uint256", + "contract": "RedemptionControllerBase", + "src": "contracts/RedemptionController/RedemptionControllerBase.sol:25" + }, + { + "label": "_redeemables", + "offset": 0, + "slot": "56", + "type": "t_mapping(t_address,t_array(t_struct(Redeemable)8692_storage)dyn_storage)", + "contract": "RedemptionControllerBase", + "src": "contracts/RedemptionController/RedemptionControllerBase.sol:27" + }, + { + "label": "_redeemablesFirst", + "offset": 0, + "slot": "57", + "type": "t_mapping(t_address,t_uint256)", + "contract": "RedemptionControllerBase", + "src": "contracts/RedemptionController/RedemptionControllerBase.sol:28" + }, + { + "label": "_mintBudgets", + "offset": 0, + "slot": "58", + "type": "t_mapping(t_address,t_array(t_struct(MintBudget)8697_storage)dyn_storage)", + "contract": "RedemptionControllerBase", + "src": "contracts/RedemptionController/RedemptionControllerBase.sol:30" + }, + { + "label": "_mintBudgetsStartIndex", + "offset": 0, + "slot": "59", + "type": "t_mapping(t_address,t_uint256)", + "contract": "RedemptionControllerBase", + "src": "contracts/RedemptionController/RedemptionControllerBase.sol:31" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(MintBudget)8697_storage)dyn_storage": { + "label": "struct RedemptionControllerBase.MintBudget[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(Redeemable)8692_storage)dyn_storage": { + "label": "struct RedemptionControllerBase.Redeemable[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(DAORoles)13166": { + "label": "contract DAORoles", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_array(t_struct(MintBudget)8697_storage)dyn_storage)": { + "label": "mapping(address => struct RedemptionControllerBase.MintBudget[])", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_array(t_struct(Redeemable)8692_storage)dyn_storage)": { + "label": "mapping(address => struct RedemptionControllerBase.Redeemable[])", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_struct(MintBudget)8697_storage": { + "label": "struct RedemptionControllerBase.MintBudget", + "members": [ + { + "label": "timestamp", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "amount", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Redeemable)8692_storage": { + "label": "struct RedemptionControllerBase.Redeemable", + "members": [ + { + "label": "amount", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "mintTimestamp", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "start", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "end", + "type": "t_uint256", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "85d97c8c7d6d74e5b47c8f42b06b62cd8a45a7f88326613d008814cb3a009d81": { + "address": "0x67E168311A7e365F6BF57CF2404e9B4A51098cd8", + "txHash": "0x20cdd3839e9b25576e70410ecd709f85d22f192c4384f066724a2256803c59cb", + "layout": { + "solcVersion": "0.8.16", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_roles", + "offset": 0, + "slot": "51", + "type": "t_contract(DAORoles)13166", + "contract": "HasRole", + "src": "contracts/extensions/HasRole.sol:11" + }, + { + "label": "tokenInternal", + "offset": 0, + "slot": "52", + "type": "t_contract(IGovernanceToken)7320", + "contract": "InternalMarketBase", + "src": "contracts/InternalMarket/InternalMarketBase.sol:33" + }, + { + "label": "exchangeToken", + "offset": 0, + "slot": "53", + "type": "t_contract(ERC20)4378", + "contract": "InternalMarketBase", + "src": "contracts/InternalMarket/InternalMarketBase.sol:36" + }, + { + "label": "redemptionController", + "offset": 0, + "slot": "54", + "type": "t_contract(IRedemptionController)8567", + "contract": "InternalMarketBase", + "src": "contracts/InternalMarket/InternalMarketBase.sol:38" + }, + { + "label": "priceOracle", + "offset": 0, + "slot": "55", + "type": "t_contract(IDIAOracleV2)7346", + "contract": "InternalMarketBase", + "src": "contracts/InternalMarket/InternalMarketBase.sol:39" + }, + { + "label": "_shareholderRegistry", + "offset": 0, + "slot": "56", + "type": "t_contract(IShareholderRegistry)11017", + "contract": "InternalMarketBase", + "src": "contracts/InternalMarket/InternalMarketBase.sol:40" + }, + { + "label": "reserve", + "offset": 0, + "slot": "57", + "type": "t_address", + "contract": "InternalMarketBase", + "src": "contracts/InternalMarket/InternalMarketBase.sol:42" + }, + { + "label": "offerDuration", + "offset": 0, + "slot": "58", + "type": "t_uint256", + "contract": "InternalMarketBase", + "src": "contracts/InternalMarket/InternalMarketBase.sol:43" + }, + { + "label": "_offers", + "offset": 0, + "slot": "59", + "type": "t_mapping(t_address,t_struct(Offers)7703_storage)", + "contract": "InternalMarketBase", + "src": "contracts/InternalMarket/InternalMarketBase.sol:45" + }, + { + "label": "_vaultContributors", + "offset": 0, + "slot": "60", + "type": "t_mapping(t_address,t_uint256)", + "contract": "InternalMarketBase", + "src": "contracts/InternalMarket/InternalMarketBase.sol:47" + }, + { + "label": "_diaPriceOracle", + "offset": 0, + "slot": "61", + "type": "t_contract(IDIAOracleV2)7346", + "contract": "InternalMarket", + "src": "contracts/InternalMarket/InternalMarket.sol:20" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(DAORoles)13166": { + "label": "contract DAORoles", + "numberOfBytes": "20" + }, + "t_contract(ERC20)4378": { + "label": "contract ERC20", + "numberOfBytes": "20" + }, + "t_contract(IDIAOracleV2)7346": { + "label": "contract IDIAOracleV2", + "numberOfBytes": "20" + }, + "t_contract(IGovernanceToken)7320": { + "label": "contract IGovernanceToken", + "numberOfBytes": "20" + }, + "t_contract(IRedemptionController)8567": { + "label": "contract IRedemptionController", + "numberOfBytes": "20" + }, + "t_contract(IShareholderRegistry)11017": { + "label": "contract IShareholderRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(Offers)7703_storage)": { + "label": "mapping(address => struct InternalMarketBase.Offers)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint128,t_struct(Offer)7693_storage)": { + "label": "mapping(uint128 => struct InternalMarketBase.Offer)", + "numberOfBytes": "32" + }, + "t_struct(Offer)7693_storage": { + "label": "struct InternalMarketBase.Offer", + "members": [ + { + "label": "expiredAt", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "amount", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Offers)7703_storage": { + "label": "struct InternalMarketBase.Offers", + "members": [ + { + "label": "start", + "type": "t_uint128", + "offset": 0, + "slot": "0" + }, + { + "label": "end", + "type": "t_uint128", + "offset": 16, + "slot": "0" + }, + { + "label": "offer", + "type": "t_mapping(t_uint128,t_struct(Offer)7693_storage)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "470f1646ac663c891ce27799fe38f09bf2337c0262107e89c62107f68f507412": { + "address": "0xb162Cae8B130fc419E5200667bAE64d570484b0d", + "txHash": "0x4f4ecd09aa71dedcb5e1349895847891503e6ab940ae5d2e4c9422e9e62e4e7b", + "layout": { + "solcVersion": "0.8.16", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:400" + }, + { + "label": "SHAREHOLDER_STATUS", + "offset": 0, + "slot": "101", + "type": "t_bytes32", + "contract": "ShareholderRegistryBase", + "src": "contracts/ShareholderRegistry/ShareholderRegistryBase.sol:9" + }, + { + "label": "INVESTOR_STATUS", + "offset": 0, + "slot": "102", + "type": "t_bytes32", + "contract": "ShareholderRegistryBase", + "src": "contracts/ShareholderRegistry/ShareholderRegistryBase.sol:10" + }, + { + "label": "CONTRIBUTOR_STATUS", + "offset": 0, + "slot": "103", + "type": "t_bytes32", + "contract": "ShareholderRegistryBase", + "src": "contracts/ShareholderRegistry/ShareholderRegistryBase.sol:11" + }, + { + "label": "MANAGING_BOARD_STATUS", + "offset": 0, + "slot": "104", + "type": "t_bytes32", + "contract": "ShareholderRegistryBase", + "src": "contracts/ShareholderRegistry/ShareholderRegistryBase.sol:12" + }, + { + "label": "_voting", + "offset": 0, + "slot": "105", + "type": "t_contract(IVoting)12064", + "contract": "ShareholderRegistryBase", + "src": "contracts/ShareholderRegistry/ShareholderRegistryBase.sol:14" + }, + { + "label": "_statuses", + "offset": 0, + "slot": "106", + "type": "t_mapping(t_address,t_bytes32)", + "contract": "ShareholderRegistryBase", + "src": "contracts/ShareholderRegistry/ShareholderRegistryBase.sol:22" + }, + { + "label": "_currentSnapshotId", + "offset": 0, + "slot": "107", + "type": "t_uint256", + "contract": "Snapshottable", + "src": "contracts/extensions/Snapshottable.sol:11" + }, + { + "label": "_totalSupplySnapshots", + "offset": 0, + "slot": "108", + "type": "t_struct(TotalSupplySnapshots)11630_storage", + "contract": "ShareholderRegistrySnapshot", + "src": "contracts/ShareholderRegistry/ShareholderRegistrySnapshot.sol:16" + }, + { + "label": "_accountStatusAndBalanceSnapshots", + "offset": 0, + "slot": "110", + "type": "t_mapping(t_address,t_struct(StatusAndBalanceSnapshots)11646_storage)", + "contract": "ShareholderRegistrySnapshot", + "src": "contracts/ShareholderRegistry/ShareholderRegistrySnapshot.sol:28" + }, + { + "label": "_roles", + "offset": 0, + "slot": "111", + "type": "t_contract(DAORoles)13166", + "contract": "HasRole", + "src": "contracts/extensions/HasRole.sol:11" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(StatusAndBalance)11638_storage)dyn_storage": { + "label": "struct ShareholderRegistrySnapshot.StatusAndBalance[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)50_storage": { + "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", + "numberOfBytes": "32" + }, + "t_contract(DAORoles)13166": { + "label": "contract DAORoles", + "numberOfBytes": "20" + }, + "t_contract(IVoting)12064": { + "label": "contract IVoting", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bytes32)": { + "label": "mapping(address => bytes32)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(StatusAndBalanceSnapshots)11646_storage)": { + "label": "mapping(address => struct ShareholderRegistrySnapshot.StatusAndBalanceSnapshots)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(StatusAndBalance)11638_storage": { + "label": "struct ShareholderRegistrySnapshot.StatusAndBalance", + "members": [ + { + "label": "status", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "balance", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(StatusAndBalanceSnapshots)11646_storage": { + "label": "struct ShareholderRegistrySnapshot.StatusAndBalanceSnapshots", + "members": [ + { + "label": "ids", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "values", + "type": "t_array(t_struct(StatusAndBalance)11638_storage)dyn_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(TotalSupplySnapshots)11630_storage": { + "label": "struct ShareholderRegistrySnapshot.TotalSupplySnapshots", + "members": [ + { + "label": "ids", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "values", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "a370d65b4fa790173a9d3b944e65ad164be8956dc9ecbdb5b474d156fd26ff0f": { + "address": "0x4D9529698d112939AD540BC33cAf11809fD1d684", + "txHash": "0xf26319ca4147ed006414352e563a77a99dfd788b2e56dbf89c2e5f37e09b92a2", + "layout": { + "solcVersion": "0.8.16", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "_currentResolutionId", + "offset": 0, + "slot": "1", + "type": "t_uint256", + "contract": "ResolutionManagerBase", + "src": "contracts/ResolutionManager/ResolutionManagerBase.sol:72" + }, + { + "label": "_shareholderRegistry", + "offset": 0, + "slot": "2", + "type": "t_contract(IShareholderRegistry)11017", + "contract": "ResolutionManagerBase", + "src": "contracts/ResolutionManager/ResolutionManagerBase.sol:74" + }, + { + "label": "_governanceToken", + "offset": 0, + "slot": "3", + "type": "t_contract(IGovernanceToken)7320", + "contract": "ResolutionManagerBase", + "src": "contracts/ResolutionManager/ResolutionManagerBase.sol:75" + }, + { + "label": "_voting", + "offset": 0, + "slot": "4", + "type": "t_contract(IVoting)12064", + "contract": "ResolutionManagerBase", + "src": "contracts/ResolutionManager/ResolutionManagerBase.sol:76" + }, + { + "label": "resolutionTypes", + "offset": 0, + "slot": "5", + "type": "t_array(t_struct(ResolutionType)9710_storage)dyn_storage", + "contract": "ResolutionManagerBase", + "src": "contracts/ResolutionManager/ResolutionManagerBase.sol:78" + }, + { + "label": "resolutions", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint256,t_struct(Resolution)9747_storage)", + "contract": "ResolutionManagerBase", + "src": "contracts/ResolutionManager/ResolutionManagerBase.sol:80" + }, + { + "label": "__gap", + "offset": 0, + "slot": "7", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_roles", + "offset": 0, + "slot": "57", + "type": "t_contract(DAORoles)13166", + "contract": "HasRole", + "src": "contracts/extensions/HasRole.sol:11" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_bytes_storage)dyn_storage": { + "label": "bytes[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(ResolutionType)9710_storage)dyn_storage": { + "label": "struct ResolutionManagerBase.ResolutionType[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(DAORoles)13166": { + "label": "contract DAORoles", + "numberOfBytes": "20" + }, + "t_contract(IGovernanceToken)7320": { + "label": "contract IGovernanceToken", + "numberOfBytes": "20" + }, + "t_contract(IShareholderRegistry)11017": { + "label": "contract IShareholderRegistry", + "numberOfBytes": "20" + }, + "t_contract(IVoting)12064": { + "label": "contract IVoting", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Resolution)9747_storage)": { + "label": "mapping(uint256 => struct ResolutionManagerBase.Resolution)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Resolution)9747_storage": { + "label": "struct ResolutionManagerBase.Resolution", + "members": [ + { + "label": "dataURI", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "resolutionTypeId", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "approveTimestamp", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "snapshotId", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "yesVotesTotal", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "isNegative", + "type": "t_bool", + "offset": 0, + "slot": "5" + }, + { + "label": "rejectionTimestamp", + "type": "t_uint256", + "offset": 0, + "slot": "6" + }, + { + "label": "executionTo", + "type": "t_array(t_address)dyn_storage", + "offset": 0, + "slot": "7" + }, + { + "label": "executionData", + "type": "t_array(t_bytes_storage)dyn_storage", + "offset": 0, + "slot": "8" + }, + { + "label": "executionTimestamp", + "type": "t_uint256", + "offset": 0, + "slot": "9" + }, + { + "label": "addressedContributor", + "type": "t_address", + "offset": 0, + "slot": "10" + }, + { + "label": "hasVoted", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "11" + }, + { + "label": "hasVotedYes", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "12" + }, + { + "label": "lostVotingPower", + "type": "t_mapping(t_address,t_uint256)", + "offset": 0, + "slot": "13" + } + ], + "numberOfBytes": "448" + }, + "t_struct(ResolutionType)9710_storage": { + "label": "struct ResolutionManagerBase.ResolutionType", + "members": [ + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "quorum", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "noticePeriod", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "votingPeriod", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "canBeNegative", + "type": "t_bool", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + } + } +} diff --git a/deployments/80001.DAORoles.arguments.json b/deployments/80001.DAORoles.arguments.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/deployments/80001.DAORoles.arguments.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/deployments/80001.DIAOracleV2Mock.arguments.json b/deployments/80001.DIAOracleV2Mock.arguments.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/deployments/80001.DIAOracleV2Mock.arguments.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/deployments/80001.GovernanceToken.arguments.json b/deployments/80001.GovernanceToken.arguments.json new file mode 100644 index 0000000..a8153dc --- /dev/null +++ b/deployments/80001.GovernanceToken.arguments.json @@ -0,0 +1 @@ +["0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608","NEOKingdom DAO Governance","NEOKGOV"] \ No newline at end of file diff --git a/deployments/80001.InternalMarket.arguments.json b/deployments/80001.InternalMarket.arguments.json new file mode 100644 index 0000000..64c67d2 --- /dev/null +++ b/deployments/80001.InternalMarket.arguments.json @@ -0,0 +1 @@ +["0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608","0xf4537D936a31abb933acdBF288a274eC732B15aF"] \ No newline at end of file diff --git a/deployments/80001.NeokingdomToken.arguments.json b/deployments/80001.NeokingdomToken.arguments.json new file mode 100644 index 0000000..9b826ae --- /dev/null +++ b/deployments/80001.NeokingdomToken.arguments.json @@ -0,0 +1 @@ +["NEOKingdom DAO","NEOK"] \ No newline at end of file diff --git a/deployments/80001.ProxyAdmin.arguments.json b/deployments/80001.ProxyAdmin.arguments.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/deployments/80001.ProxyAdmin.arguments.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/deployments/80001.RedemptionController.arguments.json b/deployments/80001.RedemptionController.arguments.json new file mode 100644 index 0000000..0330cfc --- /dev/null +++ b/deployments/80001.RedemptionController.arguments.json @@ -0,0 +1 @@ +["0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608"] \ No newline at end of file diff --git a/deployments/80001.ResolutionManager.arguments.json b/deployments/80001.ResolutionManager.arguments.json new file mode 100644 index 0000000..3c249d1 --- /dev/null +++ b/deployments/80001.ResolutionManager.arguments.json @@ -0,0 +1 @@ +["0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608","0x5b8f86C4010e58347afCEB7820A1c410b845D5d1","0xf4537D936a31abb933acdBF288a274eC732B15aF","0x74FdD2b10cF71B9b7AEB402F90aDE1a67D9C2258"] \ No newline at end of file diff --git a/deployments/80001.ShareholderRegistry.arguments.json b/deployments/80001.ShareholderRegistry.arguments.json new file mode 100644 index 0000000..9de3a8c --- /dev/null +++ b/deployments/80001.ShareholderRegistry.arguments.json @@ -0,0 +1 @@ +["0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608","NeokingdomDAO Share","NEOKSHARE"] \ No newline at end of file diff --git a/deployments/80001.TokenMock.arguments.json b/deployments/80001.TokenMock.arguments.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/deployments/80001.TokenMock.arguments.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/deployments/80001.Voting.arguments.json b/deployments/80001.Voting.arguments.json new file mode 100644 index 0000000..0330cfc --- /dev/null +++ b/deployments/80001.Voting.arguments.json @@ -0,0 +1 @@ +["0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608"] \ No newline at end of file diff --git a/deployments/80001.network.json b/deployments/80001.network.json new file mode 100644 index 0000000..3e6083f --- /dev/null +++ b/deployments/80001.network.json @@ -0,0 +1,57 @@ +{ + "DAORoles": { + "address": "0x7c5303cD3375711ff47CDEe2CB2AD2cF2e415608", + "blockNumber": 41716417, + "blockHash": "0x22e4050701fc9b3f840bccc7ac4a435f91da91d8d313f7c17b0b3b2d26f51653" + }, + "TokenMock": { + "address": "0x32cac81e324F5eca265DfEcf0eDCcc277e1B4DE6", + "blockNumber": 41716430, + "blockHash": "0xafd5e2fd7f21556162a960c1cf61d919174d5eb59c17875c01168ccc7ae02c8d" + }, + "DIAOracleV2Mock": { + "address": "0x0F7755e7B1cf0f8015180E67C97271471808d150", + "blockNumber": 41716448, + "blockHash": "0xc689bf80159aac4f28568bb580b75924d138d4055be50129d316e0b62a733b93" + }, + "Voting": { + "address": "0x74FdD2b10cF71B9b7AEB402F90aDE1a67D9C2258", + "blockNumber": 41716462, + "blockHash": "0x6f251f3ad964601e4906d4966a98f9abfe85df3b530e764b6d05b2f71e4ba265" + }, + "GovernanceToken": { + "address": "0xf4537D936a31abb933acdBF288a274eC732B15aF", + "blockNumber": 41716500, + "blockHash": "0x03652b4a41e53f8d614e6af957b670b92df43a30404e33b9a38a1931467324ea" + }, + "NeokingdomToken": { + "address": "0xdC6dc5c5524A77633EF1b3eFb08fe0950A155E44", + "blockNumber": 41716528, + "blockHash": "0xbc5935a875c8b4283b9e1b7f2867cb9c65b9c5e0d76600cd2492b9006209b71f" + }, + "RedemptionController": { + "address": "0xF610a6EB92023DCb716E218Bf8225d862F8e4A0e", + "blockNumber": 41716550, + "blockHash": "0x44a5d8b3b4065446cebf4af1abb8ed05b2439939e4611cc5e6bcc4e01e5f54d2" + }, + "InternalMarket": { + "address": "0xd345D53144E237C69F08B543553FAFc78d14Ab24", + "blockNumber": 41716575, + "blockHash": "0x6e496da76dfde9f860abbf95aba5c51be0f779e3c7be5999a2a18bb0b66b4175" + }, + "ShareholderRegistry": { + "address": "0x5b8f86C4010e58347afCEB7820A1c410b845D5d1", + "blockNumber": 41716600, + "blockHash": "0x2e41d94bedaa5dce30d553e37837256f533c0eb258d5e6a59f2974a92fbc93c0" + }, + "ResolutionManager": { + "address": "0x62279b0624da9Ade912273C9F88287596c66e1F1", + "blockNumber": 41716626, + "blockHash": "0x098660d6b4fcc1faab2a517c78cf6b25e55c2c290b03ddf3ee1f6bbfe5d465a7" + }, + "ProxyAdmin": { + "address": "0x5928Ffd33a8a57D1e82d5D5fCa6D1C9c6fe3150d", + "blockNumber": 41716645, + "blockHash": "0x405695bff1ae47693a5ddc7b25ec2c0a1c0e5e55d511c2698ba067b6598ef965" + } +} \ No newline at end of file diff --git a/deployments/80001.setup.nextstep b/deployments/80001.setup.nextstep new file mode 100644 index 0000000..bf0d87a --- /dev/null +++ b/deployments/80001.setup.nextstep @@ -0,0 +1 @@ +4 \ No newline at end of file diff --git a/dev-wallets.json b/dev-wallets.json index c3e5ce7..58b2550 100644 --- a/dev-wallets.json +++ b/dev-wallets.json @@ -2,13 +2,13 @@ { "name": "albi", "address": "0x197970E48082CD46f277ABDb8afe492bCCd78300", - "status": "contributor", + "status": "board", "tokens": "20000000000000000000000" }, { "name": "gian", "address": "0x8e2e09eb2a0a8e6e1d8de3e5fb09ec1e05b0cdbf", - "status": "contributor", + "status": "board", "tokens": "12000000000000000000000" }, { @@ -20,7 +20,7 @@ { "name": "nicola", "address": "0x2e1aF63Cd595A6D715E5e2D92151801F0d406a6b", - "status": "contributor", + "status": "board", "tokens": "22000000000000000000000" } ] diff --git a/hardhat.config.ts b/hardhat.config.ts index 54f80dc..0b8a198 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -13,7 +13,7 @@ import("./tasks").catch((e) => console.log("Cannot load tasks", e.toString())); const BLAST_API_KEY = process.env.BLAST_API_KEY || ""; const MUMBAI_PRIVATE_KEY = - process.env.RINKEBY_PRIVATE_KEY! || + process.env.MUMBAI_PRIVATE_KEY! || "0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3"; // well known private key const POLYGON_PRIVATE_KEY = process.env.POLYGON_PRIVATE_KEY! || @@ -65,7 +65,8 @@ const config: HardhatUserConfig = { url: "http://127.0.0.1:8545", }, mumbai: { - url: `https://polygon-testnet.blastapi.io/${BLAST_API_KEY}`, + //url: `https://polygon-testnet.blastapi.io/${BLAST_API_KEY}`, + url: "https://polygon-mumbai-bor.publicnode.com", accounts: [MUMBAI_PRIVATE_KEY], }, polygon: { diff --git a/lib/internal/core.ts b/lib/internal/core.ts index 030d7c7..91d117f 100644 --- a/lib/internal/core.ts +++ b/lib/internal/core.ts @@ -44,17 +44,19 @@ export abstract class NeokingdomDAO { } as Config; } - public getNextStepFilename() { - return `./deployments/${this.config.chainId}.nextstep`; + public getNextStepFilename(sequenceName: string) { + return `./deployments/${this.config.chainId}.${sequenceName}.nextstep`; } - public async setNextStep(n: number) { - await writeFile(this.getNextStepFilename(), n.toString()); + public async setNextStep(n: number, sequenceName: string) { + await writeFile(this.getNextStepFilename(sequenceName), n.toString()); } - public async getNextStep() { + public async getNextStep(sequenceName: string) { try { - return parseInt(await readFile(this.getNextStepFilename(), "utf8")); + return parseInt( + await readFile(this.getNextStepFilename(sequenceName), "utf8") + ); } catch (e) { if ((e as any).code !== "ENOENT") { throw e; @@ -66,12 +68,13 @@ export abstract class NeokingdomDAO { async run( c: ContextGenerator, s: Sequence, + sequenceName: string, config: { force?: boolean; restart?: boolean } = {} ) { const { force, restart } = config; const sequence = await this._preprocessSequence(c, s); - const nextStep = restart ? 0 : await this.getNextStep(); - await this._executeSequence(c, sequence, nextStep, force); + const nextStep = restart ? 0 : await this.getNextStep(sequenceName); + await this._executeSequence(c, sequence, sequenceName, nextStep, force); } // There are situations where you don't have all contracts available, and a @@ -117,9 +120,16 @@ export abstract class NeokingdomDAO { private async _executeSequence( c: ContextGenerator, s: ProcessedSequence, + sequenceName: string, nextStep = 0, force = false ) { + if (nextStep >= s.length) { + throw new Error( + `Sequence already executed, to run it use the "--restart" flag or ` + + `remove the file ${this.getNextStepFilename(sequenceName)}.` + ); + } for (let i = nextStep; i < s.length; i++) { const context = await c(this); const step = s[i]; @@ -143,7 +153,7 @@ export abstract class NeokingdomDAO { if (tx) { await tx.wait(1); } - await this.setNextStep(i + 1); + await this.setNextStep(i + 1, sequenceName); } } } diff --git a/lib/utils.ts b/lib/utils.ts index f9dd898..e8bbedd 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -52,7 +52,7 @@ export function isContractName(name: string): name is ContractNames { } const WAIT_BLOCKS = process.env.WAIT_BLOCKS ? parseInt(process.env.WAIT_BLOCKS) - : 1; + : 5; function getConfigPath(chainId: number) { return `./deployments/${chainId}.network.json`; @@ -128,8 +128,8 @@ export async function _deployContract( ); if (verify) { - console.log("Wait 2 blocks"); - await contract.deployTransaction.wait(2); + console.log(`Wait ${WAIT_BLOCKS} blocks`); + await contract.deployTransaction.wait(WAIT_BLOCKS); console.log("Verify contract"); try { await hre.run("verify", { @@ -224,6 +224,7 @@ const CHAINID_TO_NAME = { 666666: "localhost", 9000: "tevmos", 9001: "evmos", + 80001: "mumbai", } as const; const CHAINIDS = Object.keys(CHAINID_TO_NAME).map((c) => parseInt(c)); diff --git a/tasks/deploy.ts b/tasks/deploy.ts index 6902bab..dbbbcde 100644 --- a/tasks/deploy.ts +++ b/tasks/deploy.ts @@ -25,7 +25,9 @@ task("deploy:dao", "Deploy DAO") verifyContracts: verify, verbose: true, }); - await neokingdom.run(generateDeployContext, DEPLOY_SEQUENCE, { restart }); + await neokingdom.run(generateDeployContext, DEPLOY_SEQUENCE, "deploy", { + restart, + }); } ); @@ -43,7 +45,11 @@ task("setup:dao", "Set up the DAO") const neokingdom = await NeokingdomDAOHardhat.initialize(hre, { verbose: true, }); - await neokingdom.run(generateSetupContext(contributors, hre), sequence); + await neokingdom.run( + generateSetupContext(contributors, hre), + sequence, + "setup" + ); }); task("setup:vigodarzere", "Set up the DAO").setAction(async (_, hre) => { @@ -52,7 +58,11 @@ task("setup:vigodarzere", "Set up the DAO").setAction(async (_, hre) => { const neokingdom = await NeokingdomDAOHardhat.initialize(hre, { verbose: true, }); - await neokingdom.run(generateSetupContext([], hre), sequence); + await neokingdom.run( + generateSetupContext([], hre), + sequence, + "setup-vigodarzere" + ); }); task("setup:acl", "Set up ACL") @@ -78,6 +88,10 @@ task("setup:acl", "Set up ACL") const neokingdom = await NeokingdomDAOHardhat.initialize(hre, { verbose: true, }); - await neokingdom.run(generateSetupContext([], hre), sequence); + await neokingdom.run( + generateSetupContext([], hre), + sequence, + "setup-acl" + ); } });