diff --git a/.github/workflows/contract-tests.yml b/.github/workflows/contract-tests.yml index 8cbbf3684..3bd19c671 100644 --- a/.github/workflows/contract-tests.yml +++ b/.github/workflows/contract-tests.yml @@ -35,10 +35,10 @@ jobs: REPORT_GAS: true HARDHAT_DAO_ENS_DOMAIN: 'dao.eth' HARDHAT_PLUGIN_ENS_DOMAIN: 'plugin.dao.eth' - MANAGINGDAO_SUBDOMAIN: 'management' - MANAGINGDAO_MULTISIG_LISTEDONLY: ${{ vars.MANAGINGDAO_MULTISIG_LISTEDONLY }} - MANAGINGDAO_MULTISIG_APPROVERS: ${{ vars.MANAGINGDAO_MULTISIG_APPROVERS }} - MANAGINGDAO_MULTISIG_MINAPPROVALS: ${{ vars.MANAGINGDAO_MULTISIG_MINAPPROVALS }} + MANAGEMENTDAO_SUBDOMAIN: 'management' + MANAGEMENTDAO_MULTISIG_LISTEDONLY: ${{ vars.MANAGEMENTDAO_MULTISIG_LISTEDONLY }} + MANAGEMENTDAO_MULTISIG_APPROVERS: ${{ vars.MANAGEMENTDAO_MULTISIG_APPROVERS }} + MANAGEMENTDAO_MULTISIG_MINAPPROVALS: ${{ vars.MANAGEMENTDAO_MULTISIG_MINAPPROVALS }} run: yarn run test - name: Run solidity-docgen run: yarn run docgen diff --git a/.gitignore b/.gitignore index fe2ae01c5..28f373b57 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ yarn-error.log* # deployments deployments deployed_contracts.json -managingDAOTX.json +managementDAOTX.json # generated generated diff --git a/DEPLOYMENT_CHECKLIST.md b/DEPLOYMENT_CHECKLIST.md index c66fcacf1..6ad176c59 100644 --- a/DEPLOYMENT_CHECKLIST.md +++ b/DEPLOYMENT_CHECKLIST.md @@ -27,9 +27,9 @@ This checklist is seen as a guide to deploy the stack to a new chain. - [ ] Set the right API key for the chains blockchain explorer in `.env` (e.g. for mainnet it is `ETHERSCAN_KEY`) - [ ] Set the chosen DAO ENS domain (in step 1) to `NETWORK_DAO_ENS_DOMAIN` in `.env` and replace `NETWORK` with the correct network name (e.g. for mainnet it is `MAINNET_DAO_ENS_DOMAIN`) - [ ] Set the chosen Plugin ENS domain (in step 2) to `NETWORK_PLUGIN_ENS_DOMAIN` in `.env` and replace `NETWORK` with the correct network name (e.g. for mainnet it is `MAINNET_PLUGIN_ENS_DOMAIN`) -- [ ] Set the subdomain to be used of the managing DAO to `MANAGINGDAO_SUBDOMAIN` in `.env`. If you want to use `management.dao.eth` put only `management` -- [ ] Set the multisig members of the managing DAO as a comma (`,`) separated list to `MANAGINGDAO_MULTISIG_APPROVERS` in `.env` -- [ ] Set the amount of minimum approvals the managing DAO needs to `MANAGINGDAO_MULTISIG_MINAPPROVALS` in `.env` +- [ ] Set the subdomain to be used of the management DAO to `MANAGEMENTDAO_SUBDOMAIN` in `.env`. If you want to use `management.dao.eth` put only `management` +- [ ] Set the multisig members of the management DAO as a comma (`,`) separated list to `MANAGEMENTDAO_MULTISIG_APPROVERS` in `.env` +- [ ] Set the amount of minimum approvals the management DAO needs to `MANAGEMENTDAO_MULTISIG_MINAPPROVALS` in `.env` - [ ] If new plugin builds are released - [ ] Double-check that the build- and release-metadata is published correctly by the deploy script and contracts @@ -42,9 +42,9 @@ To deploy run `yarn deploy --network NETWORK` in `packages/contracts` and replac ### Configuration updates - [ ] Take the addresses from this file `packages/contracts/deployed_contracts.json` -- [ ] Update `active_contracts.json` with the new deployed addresses +- [ ] Add the new deployment to the `@aragon/osx-commons-config` package found here: [https://github.com/aragon/osx-commons/tree/develop/configs](https://github.com/aragon/osx-commons/tree/develop/configs) - [ ] Update `packages/contracts/Releases.md` with the new deployed addresses -- [ ] Add the managing DAOs' multisig address to `packages/contracts/.env.example` in the format `{NETWORK}_MANAGINGDAO_MULTISIG` +- [ ] Add the management DAOs' multisig address to `packages/contracts/.env.example` in the format `{NETWORK}_MANAGEMENTDAO_MULTISIG` - [ ] Add a Github Release with the version number as tag and the defined content (check previous releases for reference) ### Verification @@ -61,12 +61,12 @@ To deploy run `yarn deploy --network NETWORK` in `packages/contracts` and replac ### Configurations -- [ ] Check that all managing DAO signers are members of the managing DAO multisig and no one else. -- [ ] Check if the managing DAO is set in the `DAO_ENSSubdomainRegistrar` -- [ ] Check if the managing DAO is set in the `Plugin_ENSSubdomainRegistrar` -- [ ] Check if the managing DAO is set in the `DAORegistry` +- [ ] Check that all management DAO signers are members of the management DAO multisig and no one else. +- [ ] Check if the management DAO is set in the `DAO_ENSSubdomainRegistrar` +- [ ] Check if the management DAO is set in the `Plugin_ENSSubdomainRegistrar` +- [ ] Check if the management DAO is set in the `DAORegistry` - [ ] Check if the `DAO_ENSSubdomainRegistrar` is set in the `DAORegistry` -- [ ] Check if the managing DAO set in the `PluginRepoRegistry` +- [ ] Check if the management DAO set in the `PluginRepoRegistry` - [ ] Check if the `Plugin_ENSSubdomainRegistrar` is set in the `PluginRepoRegistry` - [ ] Check if the `PluginRepoRegistry` is set in the `PluginRepoFactory` - [ ] Check if the `PluginRepoRegistry` is set in the `PluginSetupProcessor` @@ -76,9 +76,9 @@ To deploy run `yarn deploy --network NETWORK` in `packages/contracts` and replac ### Permissions -- [ ] Check that the deployer has not the ROOT permission on the managing DAO -- [ ] Check if `DAO_ENSSubdomainRegistrar` is approved for all for the DAO' ENS domain. Call `isApprovedForAll` on the ENS registry with the managing DAO as the owner and the `DAO_ENSSubdomainRegistrar` as the operator. -- [ ] Check if `Plugin_ENSSubdomainRegistrar` is approved for all for the plugin' ENS domain. Call `isApprovedForAll` on the ENS registry with the managing DAO as the owner and the `Plugin_ENSSubdomainRegistrar` as the operator. +- [ ] Check that the deployer has not the ROOT permission on the management DAO +- [ ] Check if `DAO_ENSSubdomainRegistrar` is approved for all for the DAO' ENS domain. Call `isApprovedForAll` on the ENS registry with the management DAO as the owner and the `DAO_ENSSubdomainRegistrar` as the operator. +- [ ] Check if `Plugin_ENSSubdomainRegistrar` is approved for all for the plugin' ENS domain. Call `isApprovedForAll` on the ENS registry with the management DAO as the owner and the `Plugin_ENSSubdomainRegistrar` as the operator. - [ ] Check if the `DAORegistry` has `REGISTER_ENS_SUBDOMAIN_PERMISSION` on `DAO_ENSSubdomainRegistrar` - [ ] Check if the `PluginRepoRegistry` has `REGISTER_ENS_SUBDOMAIN_PERMISSION` on `Plugin_ENSSubdomainRegistrar` - [ ] Check if the `DAOFactory` has `REGISTER_DAO_PERMISSION` on `DAORegistry` diff --git a/README.md b/README.md index 3d40b2250..084f3b318 100644 --- a/README.md +++ b/README.md @@ -192,34 +192,7 @@ You can find more details about [our deployment checklist here](https://github.c ## Publishing protocol upgrades -**Testnets** - -1. Merge `develop` into `main` -2. Deploy the new contracts version to the testnets -3. Update the `active_contracts.json` file on `main` -4. Create a **draft** prerelease (e.g. `1.3.0-rc0`) on GitHub -5. Wait for the managing DAO to approve on the testnets -6. Update the NPM package version - - Create a PR to `main` with the release labels -7. Unmark the Release as a draft and deploy the NPM packages - -**Fixes during Testing** - -1. Branch out from `main` -2. Fix in in merged out branch -3. Merge back into `main` -4. Merge `main` back to `develop` -5. Follow the `Testnets` release steps with `rc0` increment (e.g rc0 → rc1 or rc1 → rc2) - -**Mainnets** - -1. Deploy the new contracts version to both mainnets and testnets -2. Update the `active_contracts.json` file on `main` -3. Create a **draft** release (e.g. `1.3.0`) on GitHub -4. Wait for the managing DAO to approve on mainnets and testnets -5. Update the NPM package version (see [Releasing NPM packages](#releasing-npm-packages)) - - Create a PR to `main` with the release labels -6. Unmark the Release as a draft and deploy the NPM packages +Follow [our update checklist here](https://github.com/aragon/osx/blob/develop/UPDATE_CHECKLIST.md). ## Pull request commands diff --git a/UPDATE_CHECKLIST.md b/UPDATE_CHECKLIST.md index e7ff42ca8..16cdb25eb 100644 --- a/UPDATE_CHECKLIST.md +++ b/UPDATE_CHECKLIST.md @@ -25,11 +25,11 @@ This checklist is seen as a guide to update the existing deployment. - [ ] Run `yarn test` in `packages/contracts` to make sure the contract tests succeed - [ ] Set `ETH_KEY` in `.env` to the deployers private key. It doesn't have to be the previous deployer - [ ] Set the right API key for the chains blockchain explorer in `.env` (e.g. for mainnet it is `ETHERSCAN_KEY`) -- [ ] Copy the managing DAO multisig env variables from `packages/contracts/.env-example` into `packages/contracts/.env` +- [ ] Copy the management DAO multisig env variables from `packages/contracts/.env-example` into `packages/contracts/.env` - [ ] Follow the version specific tasks in the section `Version tasks` - [ ] If new plugin builds are released - [ ] Double-check that the build- and release-metadata is published and updated correctly by the deploy script and contracts - - [ ] If the plugin is used by the managing DAO and the new build includes security relevant changes it must be applied immediately + - [ ] If the plugin is used by the management DAO and the new build includes security relevant changes it must be applied immediately ## Update @@ -42,13 +42,13 @@ To update run `yarn deploy --network NETWORK` in `packages/contracts` and replac ### Configuration updates - [ ] Take the addresses from this file `packages/contracts/deployed_contracts.json` -- [ ] Update `active_contracts.json` with the new deployed addresses +- [ ] Update the deployment in the `@aragon/osx-commons-config` package found here: [https://github.com/aragon/osx-commons/tree/develop/configs](https://github.com/aragon/osx-commons/tree/develop/configs) - [ ] Update `packages/contracts/Releases.md` with the new deployed addresses - [ ] Add a Github Release with the version number as tag and the defined content (check previous releases for reference) -### ManagingDAO +### Management DAO Proposal -If the deployer **is not** allowed to create a new proposal in the managing DAOs' multisig the script creates a new file `packages/contracts/managingDAOTX.json` +If the deployer **is not** allowed to create a new proposal in the management DAOs' multisig the script creates a new file `packages/contracts/managementDAOTX.json` - [ ] Verify the transaction to include the necessary actions - [ ] Take this file and send it to a party that can create a proposal and let them create it @@ -71,13 +71,13 @@ If the deployer **is** allowed to create a proposal ### Configuration -- [ ] Check if all permissions (if) given to the deployer are revoked and transfered to the managing DAO -- [ ] Check if the `dao` parameter is set to the managing DAO where it can be set +- [ ] Check if all permissions (if) given to the deployer are revoked and transfered to the management DAO +- [ ] Check if the `dao` parameter is set to the management DAO where it can be set - [ ] Check that the permissions are set correctly for the framework to function ### Packages -Wait until the managing DAO has made the necessary changes and then: +Wait until the management DAO has made the necessary changes and then: - [ ] Publish a new version of `@aragon/osx-artifacts` (`./packages/contracts`) to NPM - [ ] Publish a new version of `@aragon/osx-ethers` (`./packages/contracts-ethers`) to NPM @@ -113,15 +113,15 @@ Nothing to do. #### After-Update -Wait until the managing DAO has made the necessary changes and then: +Wait until the management DAO has made the necessary changes and then: - [ ] Verify that the `DAO` base contract in the `DAOFactory` has been updated -- [ ] Verify that the managing DAO implementation has been updated to the new implementation -- [ ] Verify that the managing DAO is reinitialized to `_initialized = 2` +- [ ] Verify that the management DAO implementation has been updated to the new implementation +- [ ] Verify that the management DAO is reinitialized to `_initialized = 2` - [ ] Verify that the old `DAOFactory` has no permissions on the `DAORegistry` - [ ] Verify that the new `DAOFactory` has the `REGISTER_DAO_PERMISSION_ID` permission on the `DAORegistry` - [ ] Verify that the `PluginRepo` base contract in the `PluginRepoFactory` has been updated -- [ ] Verify that all `PluginRepo`s controlled by the managing DAO have been updated to the new implementation and are still initialized with `_initialized = 1` +- [ ] Verify that all `PluginRepo`s controlled by the management DAO have been updated to the new implementation and are still initialized with `_initialized = 1` - [ ] 'multisig-repo' - [ ] 'admin-repo' - [ ] 'token-voting-repo' diff --git a/active_contracts.json b/active_contracts.json deleted file mode 100644 index a6238a7f9..000000000 --- a/active_contracts.json +++ /dev/null @@ -1,415 +0,0 @@ -{ - "arbitrum": { - "managingDAO": "0xF3AaA3372EbBf01b923a4Cc98Cd847126b3D73cA", - "managingDAO_Implementation": "0x741061b01d3a95a7734b594f1884b6c30e0fda96", - "ENSRegistry": "0x9277acd65B5dc0F85867Dfd40f5488Be8d47AD18", - "PublicResolver": "0xc4ddBd0472C2688F5d278dAFC02E66EE176C8DE3", - "DAO_ENSSubdomainRegistrar_Implementation": "0xBe6eAC1bA0b2d20AEA9e7924EFEE8E72D6193246", - "DAO_ENSSubdomainRegistrar": "0x57bf333951967a0cC0afcD58FC7959Ca0Eae6905", - "Plugin_ENSSubdomainRegistrar_Implementation": "0x74b3B3504B5d6D1c6247009c9b1e3D8cFF7bd445", - "Plugin_ENSSubdomainRegistrar": "0x6115b7F05cCeF2D883AB64c88ba7e4BD1b877215", - "DAORegistry_Implementation": "0xf2d594F3C93C19D7B1a6F15B5489FFcE4B01f7dA", - "DAORegistry": "0xB5146Fd572C669ABC353902e43F47fda4609E38A", - "PluginRepoRegistry_Implementation": "0x95D563382BeD5AcB458759EE05b27DF2CB019Cc7", - "PluginRepoRegistry": "0xCe0B4124dea6105bfB85fB4461c4D39f360E9ef3", - "PluginRepoFactory": "0xE640Da5AD169630555A86D9b6b9C145B4961b1EB", - "PluginRepoBase": "0x78744A9664D6A4dDbcd7B73c120535667E739ee3", - "PluginSetupProcessor": "0x308a1DC5020c4B5d992F5543a7236c465997fecB", - "DAOFactory": "0x08633901DdF9cD8e2DC3a073594d0A7DaD6f3f57", - "DAOBase": "0xbf8b2c4062E1d1060c332bF3305EF03971C90859", - "AddresslistVotingSetup": "0x7a62da7B56fB3bfCdF70E900787010Bc4c9Ca42e", - "AddresslistVotingSetupImplementation": "0x2C9c5e8F559DBBEc962f7CCd295DBc4183cd2168", - "GovernanceERC20": "0xddCc39a2a0047Eb47EdF94180452cbaB14d426EF", - "GovernanceWrappedERC20": "0x5B3B36BdC9470963A2734D6a0d2F6a64C21C159f", - "TokenVotingSetup": "0x96E54098317631641703404C06A5afAD89da7373", - "TokenVotingSetupImplementation": "0x4f40F01b2944359A0E507b509a868C8DbFAd215B", - "AdminSetup": "0xE978942c691e43f65c1B7c7F8f1dc8cDF061B13f", - "AdminSetupImplementation": "0xe015E365572c1d778be7E3ACf16f6a0C06dE86f0", - "MultisigSetup": "0xA03C2182af8eC460D498108C92E8638a580b94d4", - "MultisigSetupImplementation": "0x60cD484f4A1B12a652f8ef71D2f55f6d76e64e4A", - "PlaceholderSetup": "0x6E924eA5864044D8642385683fFA5AD42FB687f2", - "PlaceholderSetupImplementation": "0x0000000000000000000000000000000000000000", - "address-list-voting-repo": "0xf415FF95166EF5D365fFB3bc6d1701f9e9ed7Df7", - "address-list-voting-repo_Implementation": "0x78744a9664d6a4ddbcd7b73c120535667e739ee3", - "token-voting-repo": "0x1AeD2BEb470aeFD65B43f905Bd5371b1E4749d18", - "token-voting-repo_Implementation": "0x78744a9664d6a4ddbcd7b73c120535667e739ee3", - "admin-repo": "0x326A2aee6A8eE78D79E7E956DE60C6E452f76a8e", - "admin-repo_Implementation": "0x78744a9664d6a4ddbcd7b73c120535667e739ee3", - "multisig-repo": "0x7553E6Fb020c5740768cF289e603770AA09b7aE2", - "multisig-repo_Implementation": "0x78744a9664d6a4ddbcd7b73c120535667e739ee3" - }, - "arbitrumGoerli": { - "managingDAO": "0xF3AaA3372EbBf01b923a4Cc98Cd847126b3D73cA", - "managingDAO_Implementation": "0x741061b01d3a95a7734b594f1884b6c30e0fda96", - "ENSRegistry": "0x9277acd65B5dc0F85867Dfd40f5488Be8d47AD18", - "PublicResolver": "0xc4ddBd0472C2688F5d278dAFC02E66EE176C8DE3", - "DAO_ENSSubdomainRegistrar_Implementation": "0xBe6eAC1bA0b2d20AEA9e7924EFEE8E72D6193246", - "DAO_ENSSubdomainRegistrar": "0x57bf333951967a0cC0afcD58FC7959Ca0Eae6905", - "Plugin_ENSSubdomainRegistrar_Implementation": "0x74b3B3504B5d6D1c6247009c9b1e3D8cFF7bd445", - "Plugin_ENSSubdomainRegistrar": "0x6115b7F05cCeF2D883AB64c88ba7e4BD1b877215", - "DAORegistry_Implementation": "0xf2d594F3C93C19D7B1a6F15B5489FFcE4B01f7dA", - "DAORegistry": "0xB5146Fd572C669ABC353902e43F47fda4609E38A", - "PluginRepoRegistry_Implementation": "0x95D563382BeD5AcB458759EE05b27DF2CB019Cc7", - "PluginRepoRegistry": "0xCe0B4124dea6105bfB85fB4461c4D39f360E9ef3", - "PluginRepoFactory": "0xE640Da5AD169630555A86D9b6b9C145B4961b1EB", - "PluginRepoBase": "0x78744a9664d6a4ddbcd7b73c120535667e739ee3", - "PluginSetupProcessor": "0x308a1DC5020c4B5d992F5543a7236c465997fecB", - "DAOFactory": "0x08633901DdF9cD8e2DC3a073594d0A7DaD6f3f57", - "DAOBase": "0xbf8b2c4062e1d1060c332bf3305ef03971c90859", - "AddresslistVotingSetup": "0x7a62da7B56fB3bfCdF70E900787010Bc4c9Ca42e", - "AddresslistVotingSetupImplementation": "0x2c9c5e8f559dbbec962f7ccd295dbc4183cd2168", - "GovernanceERC20": "0xddCc39a2a0047Eb47EdF94180452cbaB14d426EF", - "GovernanceWrappedERC20": "0x5B3B36BdC9470963A2734D6a0d2F6a64C21C159f", - "TokenVotingSetup": "0x96E54098317631641703404C06A5afAD89da7373", - "TokenVotingSetupImplementation": "0x4f40f01b2944359a0e507b509a868c8dbfad215b", - "AdminSetup": "0xE978942c691e43f65c1B7c7F8f1dc8cDF061B13f", - "AdminSetupImplementation": "0xe015e365572c1d778be7e3acf16f6a0c06de86f0", - "MultisigSetup": "0xA03C2182af8eC460D498108C92E8638a580b94d4", - "MultisigSetupImplementation": "0x60cd484f4a1b12a652f8ef71d2f55f6d76e64e4a", - "PlaceholderSetup": "0x6E924eA5864044D8642385683fFA5AD42FB687f2", - "PlaceholderSetupImplementation": "0x0000000000000000000000000000000000000000", - "address-list-voting-repo": "0xf415FF95166EF5D365fFB3bc6d1701f9e9ed7Df7", - "address-list-voting-repo_Implementation": "0x78744a9664d6a4ddbcd7b73c120535667e739ee3", - "token-voting-repo": "0x1AeD2BEb470aeFD65B43f905Bd5371b1E4749d18", - "token-voting-repo_Implementation": "0x78744a9664d6a4ddbcd7b73c120535667e739ee3", - "admin-repo": "0x326A2aee6A8eE78D79E7E956DE60C6E452f76a8e", - "admin-repo_Implementation": "0x78744a9664d6a4ddbcd7b73c120535667e739ee3", - "multisig-repo": "0x7553E6Fb020c5740768cF289e603770AA09b7aE2", - "multisig-repo_Implementation": "0x78744a9664d6a4ddbcd7b73c120535667e739ee3" - }, - "arbitrumSepolia": { - "managingDAO_Implementation": "0x9277acd65B5dc0F85867Dfd40f5488Be8d47AD18", - "managingDAO": "0xc4ddBd0472C2688F5d278dAFC02E66EE176C8DE3", - "ENSRegistry": "0x308fCC274A5dc405feED1e4d10c1dEf265219bCA", - "PublicResolver": "0x57e24f85ceAcDa3Ef4F0fd04005589B88dc01A19", - "DAO_ENSSubdomainRegistrar_Implementation": "0x005098056a837c2c4F99C7eCeE976F8D90bdFFF8", - "DAO_ENSSubdomainRegistrar": "0xf2d594F3C93C19D7B1a6F15B5489FFcE4B01f7dA", - "Plugin_ENSSubdomainRegistrar_Implementation": "0xB5146Fd572C669ABC353902e43F47fda4609E38A", - "Plugin_ENSSubdomainRegistrar": "0x95D563382BeD5AcB458759EE05b27DF2CB019Cc7", - "DAORegistry_Implementation": "0xE640Da5AD169630555A86D9b6b9C145B4961b1EB", - "DAORegistry": "0x308a1DC5020c4B5d992F5543a7236c465997fecB", - "PluginRepoRegistry_Implementation": "0x08633901DdF9cD8e2DC3a073594d0A7DaD6f3f57", - "PluginRepoRegistry": "0x35B62715459cB60bf6dC17fF8cfe138EA305E7Ee", - "PluginRepoFactory": "0x07f49c49Ce2A99CF7C28F66673d406386BDD8Ff4", - "PluginRepoBase": "0x917C2Ab96c40aDEfD08d240409485D8b606423E3", - "PluginSetupProcessor": "0xC24188a73dc09aA7C721f96Ad8857B469C01dC9f", - "DAOFactory": "0x7a62da7B56fB3bfCdF70E900787010Bc4c9Ca42e", - "DAOBase": "0x2C9c5e8F559DBBEc962f7CCd295DBc4183cd2168", - "AddresslistVotingSetup": "0xE978942c691e43f65c1B7c7F8f1dc8cDF061B13f", - "AddresslistVotingSetupImplementation": "0xe015E365572c1d778be7E3ACf16f6a0C06dE86f0", - "GovernanceERC20": "0xA03C2182af8eC460D498108C92E8638a580b94d4", - "GovernanceWrappedERC20": "0x6E924eA5864044D8642385683fFA5AD42FB687f2", - "TokenVotingSetup": "0xadAdd899F1096B77B6fE601748be1A7a9ADB714B", - "TokenVotingSetupImplementation": "0x0749047B49B472a7f80C1c8f0a4dbBcecBc54339", - "AdminSetup": "0xB2CCCB4d7ec56F992219BCF4abe2E7F02003443e", - "AdminSetupImplementation": "0xbD9C68950Ab6B7Ec9E3F493Ec701Dd587a056e2a", - "MultisigSetup": "0x360586dB62DA31327B2462BA27bEb3e48ebbf396", - "MultisigSetupImplementation": "0x3225bb58d6e483B0A2E91265c2b679005F578812", - "PlaceholderSetup": "0xB2A2b32b9d885C85d5b229C0509341c37CaE7483", - "PlaceholderSetupImplementation": "0x0000000000000000000000000000000000000000", - "address-list-voting-repo": "0xdfA1fBeC1Cad92597101A4f4A18e1340c5eA55C1", - "address-list-voting-repo_Implementation": "0x917c2ab96c40adefd08d240409485d8b606423e3", - "token-voting-repo": "0x424F4cA6FA9c24C03f2396DF0E96057eD11CF7dF", - "token-voting-repo_Implementation": "0x917c2ab96c40adefd08d240409485d8b606423e3", - "admin-repo": "0x152c9E28995E418870b85cbbc0AEE4e53020edb2", - "admin-repo_Implementation": "0x917c2ab96c40adefd08d240409485d8b606423e3", - "multisig-repo": "0x9e7956C8758470dE159481e5DD0d08F8B59217A2", - "multisig-repo_Implementation": "0x917c2ab96c40adefd08d240409485d8b606423e3" - }, - "sepolia": { - "managingDAO": "0xCa834B3F404c97273f34e108029eEd776144d324", - "managingDAO_Implementation": "0x57e24f85ceacda3ef4f0fd04005589b88dc01a19", - "ENSRegistry": "0x005098056a837c2c4F99C7eCeE976F8D90bdFFF8", - "DAO_ENSSubdomainRegistrar_Implementation": "0x005098056a837c2c4F99C7eCeE976F8D90bdFFF8", - "DAO_ENSSubdomainRegistrar": "0xf2d594F3C93C19D7B1a6F15B5489FFcE4B01f7dA", - "Plugin_ENSSubdomainRegistrar_Implementation": "0xB5146Fd572C669ABC353902e43F47fda4609E38A", - "Plugin_ENSSubdomainRegistrar": "0x95D563382BeD5AcB458759EE05b27DF2CB019Cc7", - "DAORegistry_Implementation": "0xE640Da5AD169630555A86D9b6b9C145B4961b1EB", - "DAORegistry": "0x308a1DC5020c4B5d992F5543a7236c465997fecB", - "PluginRepoRegistry_Implementation": "0x08633901DdF9cD8e2DC3a073594d0A7DaD6f3f57", - "PluginRepoRegistry": "0x35B62715459cB60bf6dC17fF8cfe138EA305E7Ee", - "PluginRepoFactory": "0x07f49c49Ce2A99CF7C28F66673d406386BDD8Ff4", - "PluginRepoBase": "0x917C2Ab96c40aDEfD08d240409485D8b606423E3", - "PluginSetupProcessor": "0xC24188a73dc09aA7C721f96Ad8857B469C01dC9f", - "DAOFactory": "0x7a62da7B56fB3bfCdF70E900787010Bc4c9Ca42e", - "DAOFactoryBase": "0x2C9c5e8F559DBBEc962f7CCd295DBc4183cd2168", - "AddresslistVotingSetup": "0xE978942c691e43f65c1B7c7F8f1dc8cDF061B13f", - "AddresslistVotingSetupImplementation": "0xe015E365572c1d778be7E3ACf16f6a0C06dE86f0", - "GovernanceERC20": "0xA03C2182af8eC460D498108C92E8638a580b94d4", - "GovernanceWrappedERC20": "0x6E924eA5864044D8642385683fFA5AD42FB687f2", - "TokenVotingSetup": "0xadAdd899F1096B77B6fE601748be1A7a9ADB714B", - "TokenVotingSetupImplementation": "0x0749047B49B472a7f80C1c8f0a4dbBcecBc54339", - "AdminSetup": "0xB2CCCB4d7ec56F992219BCF4abe2E7F02003443e", - "AdminSetupImplementation": "0xbD9C68950Ab6B7Ec9E3F493Ec701Dd587a056e2a", - "MultisigSetup": "0x360586dB62DA31327B2462BA27bEb3e48ebbf396", - "MultisigSetupImplementation": "0x3225bb58d6e483B0A2E91265c2b679005F578812", - "PlaceholderSetup": "0xB2A2b32b9d885C85d5b229C0509341c37CaE7483", - "PlaceholderSetupImplementation": "0x0000000000000000000000000000000000000000", - "address-list-voting-repo": "0xdfA1fBeC1Cad92597101A4f4A18e1340c5eA55C1", - "address-list-voting-repo_Implementation": "0x917c2ab96c40adefd08d240409485d8b606423e3", - "token-voting-repo": "0x424F4cA6FA9c24C03f2396DF0E96057eD11CF7dF", - "token-voting-repo_Implementation": "0x917c2ab96c40adefd08d240409485d8b606423e3", - "admin-repo": "0x152c9E28995E418870b85cbbc0AEE4e53020edb2", - "admin-repo_Implementation": "0x917c2ab96c40adefd08d240409485d8b606423e3", - "multisig-repo": "0x9e7956C8758470dE159481e5DD0d08F8B59217A2", - "multisig-repo_Implementation": "0x917c2ab96c40adefd08d240409485d8b606423e3" - }, - "goerli": { - "managingDAO": "0xB76F8d3512497040a96E77141c951a5374F24Eb9", - "managingDAO_Implementation": "0x53d483975773a2a9e5d9e84d9cd42cee85e90d97", - "DAO_ENSSubdomainRegistrar_Implementation": "0x394B49Cc32Dc81B8EaCdeb62A6Fa66F31D1D022c", - "DAO_ENSSubdomainRegistrar": "0xC62820f3E74cC82F89100032Ad7F04682F9EdaE0", - "Plugin_ENSSubdomainRegistrar_Implementation": "0xbcE9b6fE957464aF2B739337bd1a936EbFCB5B48", - "Plugin_ENSSubdomainRegistrar": "0xd5656b6d1bc0354073f62AAbc1430530C331979c", - "DAORegistry_Implementation": "0xa796AC80af77a52AdA92778d8fb6133792480B77", - "DAORegistry": "0xd51ac19130A73455F8B3b1c26aFea21D6bA88E54", - "PluginRepoRegistry_Implementation": "0x3861Ef32c1bFcdd53E9AaE4af1C9f47390c17fBf", - "PluginRepoRegistry": "0x970Eb7Dd57c9F0dc4c5a10c06653d1103946b508", - "PluginRepoFactory": "0x477EB3b39C92c38B43778266b09471285e0F7808", - "PluginRepoBase": "0xC8dc65fEb5922F30881f2942a059420fe0591a7b", - "PluginSetupProcessor": "0xE8B5d8D66a02CD1b9Bd32a4064D7ABa45F51305e", - "DAOFactory": "0x1E4350A3c9aFbDbd70FA30B9B2350B9E8182449a", - "DAOBase": "0x53d483975773A2a9E5D9e84d9CD42cee85e90D97", - "AddresslistVotingSetup": "0x0B295EDeDF122E5A57d0661E1993f617dE1bEDF4", - "AddresslistVotingSetupImplementation": "0x6C52B040A022bA8e04f2aC46CefE106069fea419", - "TokenVotingSetup": "0x23a21113719ADaf2F360408b82E5cF73c3aA8217", - "TokenVotingSetupImplementation": "0x9c378C58F35165b492EC2bC7806FE11FB62beBE3", - "AdminSetup": "0x633845bB511DE83EA31b8717614d88fa7b569694", - "AdminSetupImplementation": "0x6aD27533762C085c405B04bb1b58285D39E99f25", - "MultisigSetup": "0x27469edD65132751aAA4d313d79Ff1b2Fa286380", - "MultisigSetupImplementation": "0xB701FbCdC8c706CB15dA0c61e123e3B4ecBF0C8e", - "address-list-voting-repo": "0xbD293e27226EF2b85E84FADCF2d5135AbC52e50A", - "address-list-voting-repo_Implementation": "0xc8dc65feb5922f30881f2942a059420fe0591a7b", - "token-voting-repo": "0xFCc843C48BD44e5dA5976a2f2d85772D59C5959E", - "token-voting-repo_Implementation": "0xc8dc65feb5922f30881f2942a059420fe0591a7b", - "admin-repo": "0xF66348E9865bb0f29B889E7c0FE1BCf4acAb5f54", - "admin-repo_Implementation": "0xc8dc65feb5922f30881f2942a059420fe0591a7b", - "multisig-repo": "0x92C090cffC592B1bC321aCfAF735057B876375F8", - "multisig-repo_Implementation": "0xc8dc65feb5922f30881f2942a059420fe0591a7b", - "GovernanceERC20": "0x40d30f08d5F8F1D63FD87309f9e2a6b61EB3dd6D", - "GovernanceWrappedERC20": "0xb16d3b1efed5540c5B96DbEDa58860b327CB0D12" - }, - "mainnet": { - "managingDAO": "0xf2d594F3C93C19D7B1a6F15B5489FFcE4B01f7dA", - "managingDAO_Implementation": "0x52Af16664155608b845BE18aa29620EbF6eA2D3a", - "DAO_ENSSubdomainRegistrar_Implementation": "0xCe0B4124dea6105bfB85fB4461c4D39f360E9ef3", - "DAO_ENSSubdomainRegistrar": "0xE640Da5AD169630555A86D9b6b9C145B4961b1EB", - "Plugin_ENSSubdomainRegistrar_Implementation": "0x08633901DdF9cD8e2DC3a073594d0A7DaD6f3f57", - "Plugin_ENSSubdomainRegistrar": "0x35B62715459cB60bf6dC17fF8cfe138EA305E7Ee", - "DAORegistry_Implementation": "0xC24188a73dc09aA7C721f96Ad8857B469C01dC9f", - "DAORegistry": "0x7a62da7B56fB3bfCdF70E900787010Bc4c9Ca42e", - "PluginRepoRegistry_Implementation": "0xddCc39a2a0047Eb47EdF94180452cbaB14d426EF", - "PluginRepoRegistry": "0x5B3B36BdC9470963A2734D6a0d2F6a64C21C159f", - "PluginRepoFactory": "0xaac9E9cdb8C1eb42d881ADd59Ee9c53847a3a4f3", - "PluginRepoBase": "0x31f1CaF7Fa78A998Afa60BF1c7a951a98E6AE538", - "PluginSetupProcessor": "0xE978942c691e43f65c1B7c7F8f1dc8cDF061B13f", - "DAOFactory": "0xf96e6FD76BD0A15580604e1Ea5818D448b1041C0", - "DAOBase": "0x52Af16664155608b845BE18aa29620EbF6eA2D3a", - "AddresslistVotingSetup": "0x8f2088E83F007B1567E8E1187380DFfdC83079d4", - "AddresslistVotingSetupImplementation": "0x86fDCD5a93BC638eFcb888930EA8b00558eDa407", - "TokenVotingSetup": "0x644D3bA8A335F5b1a6afFe63e551306D0C933582", - "TokenVotingSetupImplementation": "0xd4bfb6C688b2982A3b432F2Fc6C35117532A2C27", - "AdminSetup": "0xBFD541bc4fcE14adf1Fb9258574D3cBF5f55a894", - "AdminSetupImplementation": "0x31EE445EF8404FF04D8f7BC3D94b2e4b61eE1186", - "MultisigSetup": "0x392f0FdfF3283b9f026CfFeC7f9c2De443af3E7C", - "MultisigSetupImplementation": "0xcEd33DF91AC49415c74BF1b5c218B83a2B8C2f3C", - "address-list-voting-repo": "0xC207767d8A7a28019AFFAEAe6698F84B5526EbD7", - "address-list-voting-repo_Implementation": "0x31f1caf7fa78a998afa60bf1c7a951a98e6ae538", - "token-voting-repo": "0xb7401cD221ceAFC54093168B814Cc3d42579287f", - "token-voting-repo_Implementation": "0x31f1caf7fa78a998afa60bf1c7a951a98e6ae538", - "admin-repo": "0xA4371a239D08bfBA6E8894eccf8466C6323A52C3", - "admin-repo_Implementation": "0x31f1caf7fa78a998afa60bf1c7a951a98e6ae538", - "multisig-repo": "0x8c278e37D0817210E18A7958524b7D0a1fAA6F7b", - "multisig-repo_Implementation": "0x31f1caf7fa78a998afa60bf1c7a951a98e6ae538" - }, - "mumbai": { - "managingDAO": "0xE1De373E219a0d19a0500e599adb903477bCA0f9", - "managingDAO_Implementation": "0x5c61dae07318c86c1798891193c70ec0e91c2ee3", - "ENSRegistry": "0xD24A78824dF3C29CA03661368e6437b767A5422D", - "PublicResolver": "0xdbFf6be618180E0FF0d74dd3B6BdC1b5de074273", - "DAO_ENSSubdomainRegistrar_Implementation": "0xD5baCA29C944A28f1f568F7e69B119030914c15D", - "DAO_ENSSubdomainRegistrar": "0xC528B8AA6a4D0f21455a06b6D7A41fd795619C31", - "Plugin_ENSSubdomainRegistrar_Implementation": "0x99965D7cFFE21C4AC94526AAFEd33E9EaA27f004", - "Plugin_ENSSubdomainRegistrar": "0x2EfcED958034c3BC455273153C3e604D34C78e46", - "DAORegistry_Implementation": "0xE5058D785C934279Af1EF7E90BB5D58048829256", - "DAORegistry": "0x6dD0C8b7F9406206ceAA01B5576D9d46e9298f0E", - "PluginRepoRegistry_Implementation": "0xab27e29F579C870F66F48F4825A4D294AE540818", - "PluginRepoRegistry": "0xc796bB1AfEBc56daDF6CAcD2aDa78055e5381971", - "PluginRepoFactory": "0x4E7c97ab08c046A8e43571f9839d768ae84492e4", - "PluginRepoBase": "0xAe1f68b9399cf01b0059F125F16B5e1E79C2479F", - "PluginSetupProcessor": "0x9227b311C5cecB416707F1C8B7Ca1b52649AabEc", - "DAOFactory": "0xc715336B5E7F10294F36CA09f19A0493070E2eFB", - "DAOBase": "0x5C61DAe07318c86C1798891193c70ec0e91c2Ee3", - "AddresslistVotingSetup": "0xfDB0E4AADEf463824F10D6a0455acdb50a81B746", - "AddresslistVotingSetupImplementation": "0xeA20dEb9bCEF0471b5EA894d10CC49715684f7FB", - "TokenVotingSetup": "0xA8c6C249f4739A4d4d0949550a61de7A4b8FDa16", - "TokenVotingSetupImplementation": "0xADb2E0cC261fDFBf99fDd74306c91042a425e666", - "AdminSetup": "0x40a3EF0f0780e044EbDDEdAa9AB225158f315afd", - "AdminSetupImplementation": "0x44be41dC6063a79031426240B09dfB2dc9f638F1", - "MultisigSetup": "0x008472798D9818F8BfC08e7966bd9c5d8378FF6f", - "MultisigSetupImplementation": "0x9cf40B38e4913733710d0B28f692f8136DDA8170", - "address-list-voting-repo": "0x71570268A86A80B5cCa3F5e430c2BAa3F4b26278", - "address-list-voting-repo_Implementation": "0xae1f68b9399cf01b0059f125f16b5e1e79c2479f", - "token-voting-repo": "0xaCa70D8c462940B839DE386BcDD4CACf745632cA", - "token-voting-repo_Implementation": "0xae1f68b9399cf01b0059f125f16b5e1e79c2479f", - "admin-repo": "0x0DF9b15550fF39149e491dDD154b28f587e0cD16", - "admin-repo_Implementation": "0xae1f68b9399cf01b0059f125f16b5e1e79c2479f", - "multisig-repo": "0x2c4690b8be39adAd4F15A69340d5035aC6E53eEF", - "multisig-repo_Implementation": "0xae1f68b9399cf01b0059f125f16b5e1e79c2479f", - "GovernanceERC20": "0x10482C2ba761283f516354c85c40450B52F03AAB", - "GovernanceWrappedERC20": "0x861f2138632a2f8aC2B4CeA8A5Ab176543f78f5d" - }, - "polygon": { - "AddresslistVotingSetup": "0xc096770a17b24CEFa725122E4c823F450aBEa7b4", - "AddresslistVotingSetupImplementation": "0x3bc989caBc27ECbaECaB10b387Ddb99bfd48F4bB", - "AdminSetup": "0x82aBAfBf46759358c705c7E323543A7Be47AbAf0", - "AdminSetupImplementation": "0x3Abc6Cb233af7d7A91FB8CE2A2793f06C20b35A9", - "managingDAO": "0x6d4FB6Ff01A172774f42789fcfcdd84E68c28494", - "managingDAO_Implementation": "0xcEd33DF91AC49415c74BF1b5c218B83a2B8C2f3C", - "DAOFactory": "0x392f0FdfF3283b9f026CfFeC7f9c2De443af3E7C", - "DAOBase": "0xcEd33DF91AC49415c74BF1b5c218B83a2B8C2f3C", - "DAORegistry": "0x96E54098317631641703404C06A5afAD89da7373", - "DAORegistry_Implementation": "0x5B3B36BdC9470963A2734D6a0d2F6a64C21C159f", - "DAO_ENSSubdomainRegistrar": "0x07f49c49Ce2A99CF7C28F66673d406386BDD8Ff4", - "DAO_ENSSubdomainRegistrar_Implementation": "0x35B62715459cB60bf6dC17fF8cfe138EA305E7Ee", - "ENSRegistry": "0x57bf333951967a0cC0afcD58FC7959Ca0Eae6905", - "PluginRepoFactory": "0x868581Ee5991C6C08D2467132698fa4AB6C9c272", - "PluginRepoBase": "0xe8Bdf8b7befFeC07269B1404ea34Def70D55ad68", - "PluginRepoRegistry": "0xA03C2182af8eC460D498108C92E8638a580b94d4", - "PluginRepoRegistry_Implementation": "0xE978942c691e43f65c1B7c7F8f1dc8cDF061B13f", - "PluginSetupProcessor": "0x879D9dfe3F36d7684BeC1a2bB4Aa8E8871A7245B", - "Plugin_ENSSubdomainRegistrar": "0x7a62da7B56fB3bfCdF70E900787010Bc4c9Ca42e", - "Plugin_ENSSubdomainRegistrar_Implementation": "0xC24188a73dc09aA7C721f96Ad8857B469C01dC9f", - "PublicResolver": "0x74b3B3504B5d6D1c6247009c9b1e3D8cFF7bd445", - "TokenVotingSetup": "0xf65268ed4501391b69540268f461a7e2351d9e4f", - "TokenVotingSetupImplementation": "0x8725b5f8247a0db0A5c6D86Db6Fb7A98F2Bd27f5", - "MultisigSetup": "0xCC925a32fA4fa41c42a7d5585D69C980b6Fa9342", - "MultisigSetupImplementation": "0x90eFFA56ecc3c9b947ee9C3c4c5fedf1c460B9a4", - "address-list-voting-repo": "0x641DdEdc2139d9948e8dcC936C1Ab2314D9181E6", - "address-list-voting-repo_Implementation": "0xe8Bdf8b7befFeC07269B1404ea34Def70D55ad68", - "token-voting-repo": "0xae67aea0B830ed4504B36670B5Fa70c5C386Bb58", - "token-voting-repo_Implementation": "0xe8Bdf8b7befFeC07269B1404ea34Def70D55ad68", - "admin-repo": "0x7fF570473d0876db16A59e8F04EE7F17Ab117309", - "admin-repo_Implementation": "0xe8Bdf8b7befFeC07269B1404ea34Def70D55ad68", - "multisig-repo": "0x5A5035E7E8aeff220540F383a9cf8c35929bcF31", - "multisig-repo_Implementation": "0xe8Bdf8b7befFeC07269B1404ea34Def70D55ad68" - }, - "baseSepolia": { - "managingDAO": "0xc4ddBd0472C2688F5d278dAFC02E66EE176C8DE3", - "managingDAO_Implementation": "0x9277acd65b5dc0f85867dfd40f5488be8d47ad18", - "DAORegistry": "0x308a1DC5020c4B5d992F5543a7236c465997fecB", - "DAORegistry_Implementation": "0xE640Da5AD169630555A86D9b6b9C145B4961b1EB", - "DAO_ENSSubdomainRegistrar": "0xf2d594F3C93C19D7B1a6F15B5489FFcE4B01f7dA", - "DAO_ENSSubdomainRegistrar_Implementation": "0x005098056a837c2c4F99C7eCeE976F8D90bdFFF8", - "managingDAOImplementation": "0x9277acd65B5dc0F85867Dfd40f5488Be8d47AD18", - "ENSRegistry": "0x308fCC274A5dc405feED1e4d10c1dEf265219bCA", - "PluginRepoFactory": "0x07f49c49Ce2A99CF7C28F66673d406386BDD8Ff4", - "PluginRepoRegistry": "0x35B62715459cB60bf6dC17fF8cfe138EA305E7Ee", - "PluginRepoRegistry_Implementation": "0x08633901DdF9cD8e2DC3a073594d0A7DaD6f3f57", - "PluginSetupProcessor": "0xC24188a73dc09aA7C721f96Ad8857B469C01dC9f", - "Plugin_ENSSubdomainRegistrar": "0x95D563382BeD5AcB458759EE05b27DF2CB019Cc7", - "Plugin_ENSSubdomainRegistrar_Implementation": "0xB5146Fd572C669ABC353902e43F47fda4609E38A", - "PublicResolver": "0x57e24f85ceAcDa3Ef4F0fd04005589B88dc01A19", - "DAOFactory": "0xddCc39a2a0047Eb47EdF94180452cbaB14d426EF", - "AddresslistVotingSetup": "0xA03C2182af8eC460D498108C92E8638a580b94d4", - "GovernanceERC20": "0x6E924eA5864044D8642385683fFA5AD42FB687f2", - "GovernanceWrappedERC20": "0xadAdd899F1096B77B6fE601748be1A7a9ADB714B", - "TokenVotingSetup": "0xB2CCCB4d7ec56F992219BCF4abe2E7F02003443e", - "AdminSetup": "0x360586dB62DA31327B2462BA27bEb3e48ebbf396", - "MultisigSetup": "0xB2A2b32b9d885C85d5b229C0509341c37CaE7483", - "PlaceholderSetup": "0xBFD541bc4fcE14adf1Fb9258574D3cBF5f55a894", - "address-list-voting-repo": "0xdfA1fBeC1Cad92597101A4f4A18e1340c5eA55C1", - "token-voting-repo": "0x424F4cA6FA9c24C03f2396DF0E96057eD11CF7dF", - "admin-repo": "0x152c9E28995E418870b85cbbc0AEE4e53020edb2", - "multisig-repo": "0x9e7956C8758470dE159481e5DD0d08F8B59217A2", - "PluginRepoBase": "0x917C2Ab96c40aDEfD08d240409485D8b606423E3", - "DAOBase": "0xb261e8B006f5220D1cADEBCE5e6B63BD6dff5c6f", - "AddresslistVotingSetupImplementation": "0x60cD484f4A1B12a652f8ef71D2f55f6d76e64e4A", - "TokenVotingSetupImplementation": "0xbD9C68950Ab6B7Ec9E3F493Ec701Dd587a056e2a", - "AdminSetupImplementation": "0x3225bb58d6e483B0A2E91265c2b679005F578812", - "MultisigSetupImplementation": "0xfD3c7c2B4E71fCcce7587a9e1C93C706759e689f", - "PlaceholderSetupImplementation": "0x0000000000000000000000000000000000000000", - "address-list-voting-repo_Implementation": "0x917c2ab96c40adefd08d240409485d8b606423e3", - "token-voting-repo_Implementation": "0x917c2ab96c40adefd08d240409485d8b606423e3", - "admin-repo_Implementation": "0x917c2ab96c40adefd08d240409485d8b606423e3", - "multisig-repo_Implementation": "0x917c2ab96c40adefd08d240409485d8b606423e3" - }, - "baseGoerli": { - "managingDAO": "0xD63A8Cfb0eec960C3e70F96a9e3F3091f3FD70b6", - "managingDAO_Implementation": "0x82abafbf46759358c705c7e323543a7be47abaf0", - "ENSRegistry": "0x9bD1EF0C495F6b078d9A82586A35F4d623384E97", - "PublicResolver": "0x818428f875943eE7c0366de1AAa174a1225dC4eA", - "DAO_ENSSubdomainRegistrar_Implementation": "0xD47f4ea555FFe3A16Bb997e90C2c4A51CC6d823A", - "DAO_ENSSubdomainRegistrar": "0xBB1F7ACf2068Ec3F669FDCB4d0Ad9a70E3E418d6", - "Plugin_ENSSubdomainRegistrar_Implementation": "0x78E839210aa3072ce638A2d6b08DA611ca361A0E", - "Plugin_ENSSubdomainRegistrar": "0x76d72457990e07dd889Bd8F19a02feB89d11A946", - "DAORegistry_Implementation": "0x21D9B7b3D7280e9DA46769f79FffEC4cdf64D1cc", - "DAORegistry": "0xB5eB5C011827C9F5787ceE3Abc72d247E36a5a0D", - "PluginRepoRegistry_Implementation": "0xE47C0B1Ea698F2914b6CC218cdC3A5Ca4FAcff18", - "PluginRepoRegistry": "0x91a851E9Ed7F2c6d41b15F76e4a88f5A37067cC9", - "PluginRepoFactory": "0x1B6632D1357D26055D6452E3b3BEBd1c1d982e86", - "PluginRepoBase": "0x6C5C467c94bcc594DeE61CFa0e8cCa24d835d894", - "PluginSetupProcessor": "0x6095b5004c59301f8Bb98768Bd395d0bc637C893", - "DAOFactory": "0x3E773BCb6a8C5ED2f23BF167284DF45D9A550fF6", - "DAOBase": "0x9d6db4c3DAfB0886A6B69F821EB69994a81Ab243", - "AddresslistVotingSetup": "0x7870837ffe670E62d4e601393D454f1b8649F7f9", - "AddresslistVotingSetupImplementation": "0x3b4D91ed7F1A8a2648Cc72E8dE31f0d35A4f9A65", - "GovernanceERC20": "0x58cd7d773389F68250338C13A1BB5662CFBd0C9A", - "GovernanceWrappedERC20": "0xB815791c233807D39b7430127975244B36C19C8e", - "TokenVotingSetup": "0x399Ce2a71ef78bE6890EB628384dD09D4382a7f0", - "TokenVotingSetupImplementation": "0xF48ba5bd1A0D89DdA002532c81B6Ed7d8b762C62", - "AdminSetup": "0xFcaBf5b75473447E4fde4043F8255B2DAdbF0782", - "AdminSetupImplementation": "0x37fd7E045e92Ab57484eE490671E2601952D2334", - "MultisigSetup": "0x9148970d7C54FEF15565c1b6C41195d92962CA23", - "MultisigSetupImplementation": "0x909a1e733B56D594036aCDbb33a90A76A28E3355", - "PlaceholderSetup": "0xb163e7606847E86A6ecd8c40432A3c75d27dBD80", - "PlaceholderSetupImplementation": "0x0000000000000000000000000000000000000000", - "address-list-voting-repo": "0x38177F525C4BC8427Fe5496fcEA567E7396f9Bba", - "address-list-voting-repo_Implementation": "0x6c5c467c94bcc594dee61cfa0e8cca24d835d894", - "token-voting-repo": "0x0bdd1C7dD81000777Efcba4BBCeAdBF75560e0b8", - "token-voting-repo_Implementation": "0x6c5c467c94bcc594dee61cfa0e8cca24d835d894", - "admin-repo": "0x64Ee23C65bFBfEC35d337Ae93fcf22137c2E9c13", - "admin-repo_Implementation": "0x6c5c467c94bcc594dee61cfa0e8cca24d835d894", - "multisig-repo": "0x3308fd88Db88e11c4d99EC805836d7E9F181CdE0", - "multisig-repo_Implementation": "0x6c5c467c94bcc594dee61cfa0e8cca24d835d894" - }, - "baseMainnet": { - "managingDAO": "0x264308C03feAfA071C97b73b09E911530CCCd216", - "managingDAO_Implementation": "0x03445b197271cb3be5e453745ed98a05793a4538", - "ENSRegistry": "0xE3625B9Ed80306f590Dcf8a0d50b193F28DB969E", - "PublicResolver": "0x09AF4b83A9a7EA682A2Eb61d1d0B9e89103b1A06", - "DAO_ENSSubdomainRegistrar_Implementation": "0x7DC8d6d35070A13192C754CF96CB046615f2a3E0", - "DAO_ENSSubdomainRegistrar": "0x91f190a6f6E38042e3398B3f78Eb7e0AF58Ac8c3", - "Plugin_ENSSubdomainRegistrar_Implementation": "0xD47f4ea555FFe3A16Bb997e90C2c4A51CC6d823A", - "Plugin_ENSSubdomainRegistrar": "0xBB1F7ACf2068Ec3F669FDCB4d0Ad9a70E3E418d6", - "DAORegistry_Implementation": "0x76d72457990e07dd889Bd8F19a02feB89d11A946", - "DAORegistry": "0xeB98a71d69a1e12B62c10368D9dA5364CE0f7178", - "PluginRepoRegistry_Implementation": "0x21D9B7b3D7280e9DA46769f79FffEC4cdf64D1cc", - "PluginRepoRegistry": "0xB5eB5C011827C9F5787ceE3Abc72d247E36a5a0D", - "PluginRepoFactory": "0xE47C0B1Ea698F2914b6CC218cdC3A5Ca4FAcff18", - "PluginRepoBase": "0x10a9F51c7e163ac2d061eE8EcD72557722126A81", - "PluginSetupProcessor": "0x91a851E9Ed7F2c6d41b15F76e4a88f5A37067cC9", - "DAOFactory": "0x1B6632D1357D26055D6452E3b3BEBd1c1d982e86", - "DAOBase": "0x6C5C467c94bcc594DeE61CFa0e8cCa24d835d894", - "AddresslistVotingSetup": "0xC8109e7B790346F662C6e4ef2bA863a9700cA8Eb", - "AddresslistVotingSetupImplementation": "0x72e10e8c61E4509cdF1E85175B6b4031526082C4", - "GovernanceERC20": "0xd8C229F3644576b200319cB3919B0E87716f47d8", - "GovernanceWrappedERC20": "0x7870837ffe670E62d4e601393D454f1b8649F7f9", - "TokenVotingSetup": "0x58cd7d773389F68250338C13A1BB5662CFBd0C9A", - "TokenVotingSetupImplementation": "0x908BB81ABeb86FfEa97f1b95b59c4AA8E71d84aA", - "AdminSetup": "0xB815791c233807D39b7430127975244B36C19C8e", - "AdminSetupImplementation": "0x824d4AAD1cbF2327c4C429E3c97F968Ee19344F8", - "MultisigSetup": "0x399Ce2a71ef78bE6890EB628384dD09D4382a7f0", - "MultisigSetupImplementation": "0xF48ba5bd1A0D89DdA002532c81B6Ed7d8b762C62", - "PlaceholderSetup": "0xFcaBf5b75473447E4fde4043F8255B2DAdbF0782", - "PlaceholderSetupImplementation": "0x0000000000000000000000000000000000000000", - "address-list-voting-repo": "0x0A5387021B2722E983842fA701D0BaD8B9279fE2", - "address-list-voting-repo_Implementation": "0x10a9f51c7e163ac2d061ee8ecd72557722126a81", - "token-voting-repo": "0x2532570DcFb749A7F976136CC05648ef2a0f60b0", - "token-voting-repo_Implementation": "0x10a9f51c7e163ac2d061ee8ecd72557722126a81", - "admin-repo": "0x212eF339C77B3390599caB4D46222D79fAabcb5c", - "admin-repo_Implementation": "0x10a9f51c7e163ac2d061ee8ecd72557722126a81", - "multisig-repo": "0xcDC4b0BC63AEfFf3a7826A19D101406C6322A585", - "multisig-repo_Implementation": "0x10a9f51c7e163ac2d061ee8ecd72557722126a81" - } -} diff --git a/packages/contracts-ethers/npm/index.ts b/packages/contracts-ethers/npm/index.ts index b65aa13b4..444c245f0 100644 --- a/packages/contracts-ethers/npm/index.ts +++ b/packages/contracts-ethers/npm/index.ts @@ -1,4 +1 @@ -import activeContracts from '../../../active_contracts.json'; - export * from '../types/'; -export const activeContractsList = activeContracts; diff --git a/packages/contracts/.env.example b/packages/contracts/.env.example index 6f92f80ed..1ac3e6ee3 100644 --- a/packages/contracts/.env.example +++ b/packages/contracts/.env.example @@ -30,24 +30,24 @@ ARBITRUMSEPOLIA_PLUGIN_ENS_DOMAIN= LOCALHOST_PLUGIN_ENS_DOMAIN= HARDHAT_PLUGIN_ENS_DOMAIN= -MANAGINGDAO_SUBDOMAIN= -MANAGINGDAO_MULTISIG_APPROVERS= -MANAGINGDAO_MULTISIG_MINAPPROVALS= -MANAGINGDAO_MULTISIG_LISTEDONLY= - -MAINNET_MANAGINGDAO_MULTISIG=0x0673c13d48023efa609c20e5e351763b99dd67de -GOERLI_MANAGINGDAO_MULTISIG=0x3263de63e70157c4b607982721026ffaa20e596c -SEPOLIA_MANAGINGDAO_MULTISIG=0xfcEAd61339e3e73090B587968FcE8b090e0600EF -POLYGON_MANAGINGDAO_MULTISIG=0x5db93850d843af581d8b87c350aa849a13a88e40 -MUMBAI_MANAGINGDAO_MULTISIG=0x944b067ccdbded94e64826747a5d72d4adcdf50a -BASESEPOLIA_MANAGINGDAO_MULTISIG=0xBFa3Ea5Bf7C6491b7f24f2a3658fF1d9eAE11c01 -BASEGOERLI_MANAGINGDAO_MULTISIG=0x0deE00170c57161e629f5975F3B51b73B3770C06 -BASEMAINNET_MANAGINGDAO_MULTISIG=0x549B739731dFDfe256f9A3014b30035C05b6D1a6 -ARBITRUM_MANAGINGDAO_MULTISIG=0x02bBc496BEBC9a06C239670Cea663C43ceAd899F -ARBITRUMGOERLI_MANAGINGDAO_MULTISIG=0x02bBc496BEBC9a06C239670Cea663C43ceAd899F -ARBITRUMSEPOLIA_MANAGINGDAO_MULTISIG=0xfcEAd61339e3e73090B587968FcE8b090e0600EF - -HARDHAT_MANAGINGDAO_MULTISIG=0xe3ADd897e69010709498738e5116C06B4D81e672 # Changes with each new version +MANAGEMENT_DAO_SUBDOMAIN= +MANAGEMENT_DAO_MULTISIG_APPROVERS= +MANAGEMENT_DAO_MULTISIG_MINAPPROVALS= +MANAGEMENT_DAO_MULTISIG_LISTEDONLY= + +MAINNET_MANAGEMENT_DAO_MULTISIG=0x0673c13d48023efa609c20e5e351763b99dd67de +GOERLI_MANAGEMENT_DAO_MULTISIG=0x3263de63e70157c4b607982721026ffaa20e596c +SEPOLIA_MANAGEMENT_DAO_MULTISIG=0xfcEAd61339e3e73090B587968FcE8b090e0600EF +POLYGON_MANAGEMENT_DAO_MULTISIG=0x5db93850d843af581d8b87c350aa849a13a88e40 +MUMBAI_MANAGEMENT_DAO_MULTISIG=0x944b067ccdbded94e64826747a5d72d4adcdf50a +BASESEPOLIA_MANAGEMENT_DAO_MULTISIG=0xBFa3Ea5Bf7C6491b7f24f2a3658fF1d9eAE11c01 +BASEGOERLI_MANAGEMENT_DAO_MULTISIG=0x0deE00170c57161e629f5975F3B51b73B3770C06 +BASEMAINNET_MANAGEMENT_DAO_MULTISIG=0x549B739731dFDfe256f9A3014b30035C05b6D1a6 +ARBITRUM_MANAGEMENT_DAO_MULTISIG=0x02bBc496BEBC9a06C239670Cea663C43ceAd899F +ARBITRUMGOERLI_MANAGEMENT_DAO_MULTISIG=0x02bBc496BEBC9a06C239670Cea663C43ceAd899F +ARBITRUMSEPOLIA_MANAGEMENT_DAO_MULTISIG=0xfcEAd61339e3e73090B587968FcE8b090e0600EF + +HARDHAT_MANAGEMENT_DAO_MULTISIG=0xe3ADd897e69010709498738e5116C06B4D81e672 # Changes with each new version # not using this variable will disable the feature. Anything else will enable it TEST_UPDATE_DEPLOY_SCRIPT= diff --git a/packages/contracts/CHANGELOG.md b/packages/contracts/CHANGELOG.md index 52ddc8c9c..e6faa1a4b 100644 --- a/packages/contracts/CHANGELOG.md +++ b/packages/contracts/CHANGELOG.md @@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Refactored the fallback in the `isGranted` function in `PermissionManager` to make conditions mutually exclusive: Specific conditions answering `false` do not fall back to generic caller conditions (`_who: ANY_ADDR`) or generic target conditions (`_where: ANY_ADDR`). - Renamed the `signatureValidator` variable in `DAO` to `__removed0`. - Use the DAOs permission manager functionality to validate signatures. +- Renamed `managingDAO` during deployment to `managmentDAO`. +- Aligned contract names during deployment with the names given in `@aragon/osx-commons-configs`. ### Removed @@ -37,7 +39,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Removed unused `MerkleMinter` and `MerkleDistributor` contracts. - Removed unused `TokenFactory` contract. - Removed the `SignatureValidatorSet` event from `IDAO`. -- Removed the `setSignatureValidator` function and `signatureValidator` variable in `DAO`. In places, where the function must remain to not alter the `IDAO` interface ID, it will revert and explanatory notes are put in place.. +- Removed the `setSignatureValidator` function and `signatureValidator` variable in `DAO`. In places, where the function must remain to not alter the `IDAO` interface ID, it will revert and explanatory notes are put in place. +- Removed `active_contracts.json` file and replaced it with `@aragon/osx-commons-configs` package. ## v1.3.0 diff --git a/packages/contracts/README.md b/packages/contracts/README.md index 53ec643d7..fb5334377 100644 --- a/packages/contracts/README.md +++ b/packages/contracts/README.md @@ -22,7 +22,7 @@ Copy `.env.example` into a file called `.env` or create a new one with these 3 k # keys used for running tests HARDHAT_DAO_ENS_DOMAIN=dao.eth HARDHAT_PLUGIN_ENS_DOMAIN=plugin.eth -MANAGINGDAO_SUBDOMAIN=management +MANAGEMENT_DAO_SUBDOMAIN=management ``` Run these commands on the project's root folder in your terminal: diff --git a/packages/contracts/deploy/helpers.ts b/packages/contracts/deploy/helpers.ts index 027a6f79d..653c9eea6 100644 --- a/packages/contracts/deploy/helpers.ts +++ b/packages/contracts/deploy/helpers.ts @@ -7,11 +7,13 @@ import { } from '../typechain'; import {VersionCreatedEvent} from '../typechain/PluginRepo'; import {PluginRepoRegisteredEvent} from '../typechain/PluginRepoRegistry'; -import {findEvent, findEventTopicLog} from '@aragon/osx-commons-sdk'; -import {Operation} from '@aragon/osx-commons-sdk'; +import { + getNetworkNameByAlias, + getLatestNetworkDeployment, +} from '@aragon/osx-commons-configs'; +import {findEvent, findEventTopicLog, Operation} from '@aragon/osx-commons-sdk'; import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; import {Contract} from 'ethers'; -import {promises as fs} from 'fs'; import {ethers} from 'hardhat'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; import IPFS from 'ipfs-http-client'; @@ -30,10 +32,10 @@ export const ENS_PUBLIC_RESOLVERS: {[key: string]: string} = { sepolia: '0x8FADE66B79cC9f707aB26799354482EB93a5B7dD', }; -export const MANAGING_DAO_METADATA = { - name: 'Aragon Managing DAO', +export const MANAGEMENT_DAO_METADATA = { + name: 'Aragon Management DAO', description: - 'Aragon OSx includes a group of global smart contracts that allow for a DAO ecosystem to be built on top. These contracts will require future improvements and general maintenance. The Managing DAO is intended to perform such maintenance tasks and holds the permissions to deliver any new capabilities that are added in the future.', + 'Aragon OSx includes a group of global smart contracts that allow for a DAO ecosystem to be built on top. These contracts will require future improvements and general maintenance. The Management DAO is intended to perform such maintenance tasks and holds the permissions to deliver any new capabilities that are added in the future.', avatar: 'https://ipfs.eth.aragon.network/ipfs/QmVyy3ci7F2zHG6JUJ1XbcwLKuxWrQ6hqNvSnjmDmdYJzP/', links: [ @@ -112,62 +114,32 @@ export async function getContractAddress( } } catch (e) {} - return getActiveContractAddressInNetwork(contractName, networkName); + return getLatestContractAddress(contractName, hre); } -export async function getActiveContractAddress( +export function getLatestContractAddress( contractName: string, hre: HardhatRuntimeEnvironment -): Promise { +): string { let networkName = hre.network.name; if (hre.testingFork.network) { networkName = hre.testingFork.network; } - return getActiveContractAddressInNetwork(contractName, networkName); -} - -export async function getActiveContractAddressInNetwork( - contractName: string, - networkName: string -): Promise { - const activeContracts = await getActiveContractsJSON(); - try { - return activeContracts[networkName][contractName]; - } catch (e) { - console.error(e); - return ''; + const osxNetworkName = getNetworkNameByAlias(networkName); + if (!osxNetworkName) { + if (networkName === 'hardhat') { + return ''; + } + throw new Error(`Failed to find network ${networkName}`); } -} - -export async function getActiveContractsJSON(): Promise<{ - [index: string]: {[index: string]: string}; -}> { - const repoPath = process.env.GITHUB_WORKSPACE || '../../'; - const activeContractsFile = await fs.readFile( - `${repoPath}/active_contracts.json` - ); - const activeContracts = JSON.parse(activeContractsFile.toString()); - return activeContracts; -} - -export async function updateActiveContractsJSON(payload: { - [index: string]: {[index: string]: string}; -}): Promise { - const repoPath = process.env.GITHUB_WORKSPACE || '../../'; - const activeContractsFile = await fs.readFile( - `${repoPath}/active_contracts.json` - ); - const activeContracts = JSON.parse(activeContractsFile.toString()); - Object.keys(payload).forEach(key => { - activeContracts[key] = {...activeContracts[key], ...payload[key]}; - }); - await fs.writeFile( - `${repoPath}/active_contracts.json`, - JSON.stringify(activeContracts, null, 2) - ); + const latestNetworkDeployment = getLatestNetworkDeployment(osxNetworkName); + if (latestNetworkDeployment && contractName in latestNetworkDeployment) { + return latestNetworkDeployment[contractName].address; + } + return ''; } export async function detemineDeployerNextAddress( @@ -185,7 +157,8 @@ export async function detemineDeployerNextAddress( export async function createPluginRepo( hre: HardhatRuntimeEnvironment, - pluginName: string + pluginName: string, + subdomain: string ): Promise { const {network} = hre; const signers = await ethers.getSigners(); @@ -194,14 +167,14 @@ export async function createPluginRepo( process.env[`${network.name.toUpperCase()}_PLUGIN_ENS_DOMAIN`] || ''; if ( await isENSDomainRegistered( - `${pluginName}.${pluginDomain}`, + `${subdomain}.${pluginDomain}`, await getENSAddress(hre), signers[0] ) ) { // not beeing able to register the plugin repo means that something is not right with the framework deployment used. // Either a frontrun happened or something else. Thus we abort here - throw new Error(`${pluginName} is already present! Aborting...`); + throw new Error(`${subdomain} is already present! Aborting...`); } const pluginRepoFactoryAddress = await getContractAddress( @@ -217,7 +190,7 @@ export async function createPluginRepo( const {deployer} = await hre.getNamedAccounts(); const tx = await pluginRepoFactoryContract.createPluginRepo( - pluginName, + subdomain, deployer ); console.log( @@ -347,7 +320,7 @@ export async function populatePluginRepo( } } -export async function checkSetManagingDao( +export async function checkSetManagementDao( contract: Contract, expectedDaoAddress: string ) { @@ -593,25 +566,22 @@ export async function transferSubnodeChain( } /** - * Returns the managing DAO' multisig address defined in the environment variables. Throws if not found + * Returns the management DAO' multisig address defined in the environment variables. Throws if not found * * @export * @param {HardhatRuntimeEnvironment} hre * @return {string} */ -export function getManagingDAOMultisigAddress( +export function getManagementDAOMultisigAddress( hre: HardhatRuntimeEnvironment ): string { const {network} = hre; const address = - process.env[`${network.name.toUpperCase()}_MANAGINGDAO_MULTISIG`]; + process.env[`${network.name.toUpperCase()}_MANAGEMENT_DAO_MULTISIG`]; if (!address) { throw new Error( - `Failed to find managing DAO multisig address in env variables for ${network.name}` + `Failed to find management DAO multisig address in env variables for ${network.name}` ); } return address; } - -// exports dummy function for hardhat-deploy. Otherwise we would have to move this file -export default function () {} diff --git a/packages/contracts/deploy/new/00_managing-dao/00_managing-dao.ts b/packages/contracts/deploy/new/00_management-dao/00_management-dao.ts similarity index 74% rename from packages/contracts/deploy/new/00_managing-dao/00_managing-dao.ts rename to packages/contracts/deploy/new/00_management-dao/00_management-dao.ts index eecc22fbc..3c3b12f03 100644 --- a/packages/contracts/deploy/new/00_managing-dao/00_managing-dao.ts +++ b/packages/contracts/deploy/new/00_management-dao/00_management-dao.ts @@ -3,19 +3,19 @@ import {ArtifactData, DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; /** NOTE: - * Create a (Managing DAO) with no Plugin, to be the owner DAO for the framework, temporarily. + * Create a (Management DAO) with no Plugin, to be the owner DAO for the framework, temporarily. */ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log(`\nDeploying ManagingDao.`); + console.log(`\nDeploying ManagementDAO.`); const {deployments, ethers} = hre; const {deploy} = deployments; const [deployer] = await ethers.getSigners(); console.log( - `ManagingDAO will be owned by the (Deployer: ${deployer.address}) temporarily, while the entire framework is getting deployed.` + - ` At the final step when Multisig is available, it will be installed on managingDAO and all roles for the Deployer will be revoked.` + `ManagementDAO will be owned by the (Deployer: ${deployer.address}) temporarily, while the entire framework is getting deployed.` + + ` At the final step when Multisig is available, it will be installed on managementDAO and all roles for the Deployer will be revoked.` ); const initializeParams = { @@ -27,7 +27,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const daoArtifactData = daoArtifactJson as ArtifactData; - await deploy('DAO', { + await deploy('ManagementDAOProxy', { contract: daoArtifactData, from: deployer.address, args: [], @@ -51,4 +51,4 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }); }; export default func; -func.tags = ['New', 'ManagingDao']; +func.tags = ['New', 'ManagementDao']; diff --git a/packages/contracts/deploy/new/00_managing-dao/01_managing-dao-permissions.ts b/packages/contracts/deploy/new/00_management-dao/01_management-dao-permissions.ts similarity index 63% rename from packages/contracts/deploy/new/00_managing-dao/01_managing-dao-permissions.ts rename to packages/contracts/deploy/new/00_management-dao/01_management-dao-permissions.ts index 8237187aa..dd878f125 100644 --- a/packages/contracts/deploy/new/00_managing-dao/01_managing-dao-permissions.ts +++ b/packages/contracts/deploy/new/00_management-dao/01_management-dao-permissions.ts @@ -10,23 +10,26 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Granting ${deployer.address} temp execute permissions`); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `managementDAO` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); // Get `DAO` contract. - const managingDaoContract = DAO__factory.connect( - managingDAOAddress, + const managementDaoContract = DAO__factory.connect( + managementDAOAddress, deployer ); - // grant the deployer execute permissions during deployment. This will be revoked in 40_finalize-managing-dao/40_revoke-permissions - await managePermissions(managingDaoContract, [ + // grant the deployer execute permissions during deployment. This will be revoked in 40_finalize-management-dao/40_revoke-permissions + await managePermissions(managementDaoContract, [ { operation: Operation.Grant, - where: {name: 'DAO', address: managingDAOAddress}, + where: {name: 'ManagementDAOProxy', address: managementDAOAddress}, who: {name: 'Deployer', address: deployer.address}, permission: 'EXECUTE_PERMISSION', }, ]); }; export default func; -func.tags = ['New', 'ManagingDaoPermissions']; +func.tags = ['New', 'ManagementDaoPermissions']; diff --git a/packages/contracts/deploy/new/00_management-dao/02_management-dao_conclude.ts b/packages/contracts/deploy/new/00_management-dao/02_management-dao_conclude.ts new file mode 100644 index 000000000..df3078ea7 --- /dev/null +++ b/packages/contracts/deploy/new/00_management-dao/02_management-dao_conclude.ts @@ -0,0 +1,16 @@ +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + console.log(`Concluding ManagementDao deployment.\n`); + + const {deployments} = hre; + + hre.aragonToVerifyContracts.push( + await deployments.get('ManagementDAOProxy_Implementation') + ); + hre.aragonToVerifyContracts.push(await deployments.get('ManagementDAOProxy')); +}; + +export default func; +func.tags = ['New', 'ManagementDao', 'ManagementDaoPermissions', 'Verify']; diff --git a/packages/contracts/deploy/new/00_managing-dao/20_set-dao-permission.ts b/packages/contracts/deploy/new/00_management-dao/20_set-dao-permission.ts similarity index 60% rename from packages/contracts/deploy/new/00_managing-dao/20_set-dao-permission.ts rename to packages/contracts/deploy/new/00_management-dao/20_set-dao-permission.ts index eacbcf222..586387df6 100644 --- a/packages/contracts/deploy/new/00_managing-dao/20_set-dao-permission.ts +++ b/packages/contracts/deploy/new/00_management-dao/20_set-dao-permission.ts @@ -9,16 +9,19 @@ import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log('\nSetting ManagingDao permissions.'); + console.log('\nSetting ManagementDao permissions.'); const {ethers} = hre; const [deployer] = await ethers.getSigners(); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `managementDAO` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); // Get `DAO` contract. - const managingDaoContract = DAO__factory.connect( - managingDAOAddress, + const managementDaoContract = DAO__factory.connect( + managementDAOAddress, deployer ); @@ -26,13 +29,13 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const permissions = DAO_PERMISSIONS.map(permission => { return { operation: Operation.Grant, - where: {name: 'managingDAO', address: managingDAOAddress}, - who: {name: 'managingDAO', address: managingDAOAddress}, + where: {name: 'managementDAO', address: managementDAOAddress}, + who: {name: 'managementDAO', address: managementDAOAddress}, permission: permission, }; }); - await managePermissions(managingDaoContract, permissions); + await managePermissions(managementDaoContract, permissions); }; export default func; -func.tags = ['New', 'SetManagingDaoPermissions']; +func.tags = ['New', 'SetManagementDaoPermissions']; diff --git a/packages/contracts/deploy/new/00_managing-dao/99_verify_step.ts b/packages/contracts/deploy/new/00_management-dao/99_verify_step.ts similarity index 56% rename from packages/contracts/deploy/new/00_managing-dao/99_verify_step.ts rename to packages/contracts/deploy/new/00_management-dao/99_verify_step.ts index 6108f5a82..5a12fb708 100644 --- a/packages/contracts/deploy/new/00_managing-dao/99_verify_step.ts +++ b/packages/contracts/deploy/new/00_management-dao/99_verify_step.ts @@ -9,23 +9,26 @@ import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log('\nVerifying managing DAO deployment.'); + console.log('\nVerifying management DAO deployment.'); - const {getNamedAccounts, ethers} = hre; + const {ethers} = hre; const [deployer] = await ethers.getSigners(); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `managementDAO` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); // Get `DAO` contract. - const managingDaoContract = DAO__factory.connect( - managingDAOAddress, + const managementDaoContract = DAO__factory.connect( + managementDAOAddress, deployer ); // Check that deployer has root permission. - await checkPermission(managingDaoContract, { + await checkPermission(managementDaoContract, { operation: Operation.Grant, - where: {name: 'ManagingDAO', address: managingDAOAddress}, + where: {name: 'ManagementDAOProxy', address: managementDAOAddress}, who: {name: 'Deployer', address: deployer.address}, permission: 'ROOT_PERMISSION', }); @@ -34,15 +37,15 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { for (let index = 0; index < DAO_PERMISSIONS.length; index++) { const permission = DAO_PERMISSIONS[index]; - await checkPermission(managingDaoContract, { + await checkPermission(managementDaoContract, { operation: Operation.Grant, - where: {name: 'ManagingDAO', address: managingDAOAddress}, - who: {name: 'ManagingDAO', address: managingDAOAddress}, + where: {name: 'ManagementDAOProxy', address: managementDAOAddress}, + who: {name: 'ManagementDAOProxy', address: managementDAOAddress}, permission: permission, }); } - console.log('Managing DAO deployment verified'); + console.log('Management DAO deployment verified'); }; export default func; -func.tags = ['New', 'ManagingDao', 'SetDAOPermissions']; +func.tags = ['New', 'ManagementDao', 'SetDAOPermissions']; diff --git a/packages/contracts/deploy/new/00_managing-dao/02_managing-dao_conclude.ts b/packages/contracts/deploy/new/00_managing-dao/02_managing-dao_conclude.ts deleted file mode 100644 index 913014cb1..000000000 --- a/packages/contracts/deploy/new/00_managing-dao/02_managing-dao_conclude.ts +++ /dev/null @@ -1,14 +0,0 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log(`Concluding ManagingDao deployment.\n`); - - const {deployments} = hre; - - hre.aragonToVerifyContracts.push(await deployments.get('DAO_Implementation')); - hre.aragonToVerifyContracts.push(await deployments.get('DAO_Proxy')); -}; - -export default func; -func.tags = ['New', 'ManagingDao', 'ManagingDaoPermissions', 'Verify']; diff --git a/packages/contracts/deploy/new/10_framework/01_ens_subdomains.ts b/packages/contracts/deploy/new/10_framework/01_ens_subdomains.ts index 9b8ddf4b5..e16dda9b6 100644 --- a/packages/contracts/deploy/new/10_framework/01_ens_subdomains.ts +++ b/packages/contracts/deploy/new/10_framework/01_ens_subdomains.ts @@ -29,7 +29,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { deployer ); - // Check if domains are owned by the managingDAO + // Check if domains are owned by the managementDAO const daoNode = ethers.utils.namehash(daoDomain); const pluginNode = ethers.utils.namehash(pluginDomain); @@ -66,17 +66,20 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ); } - // Registration is now complete. Lets move the ownership of all domains to the managing DAO - const managingDAOAddress = await getContractAddress('DAO', hre); + // Registration is now complete. Lets move the ownership of all domains to the management DAO + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); await transferSubnodeChain( daoDomain, - managingDAOAddress, + managementDAOAddress, deployer.address, await getENSAddress(hre) ); await transferSubnodeChain( pluginDomain, - managingDAOAddress, + managementDAOAddress, deployer.address, await getENSAddress(hre) ); diff --git a/packages/contracts/deploy/new/10_framework/02_ens_subdomain_registrars.ts b/packages/contracts/deploy/new/10_framework/02_ens_subdomain_registrars.ts index 767c72333..462f6f12a 100644 --- a/packages/contracts/deploy/new/10_framework/02_ens_subdomain_registrars.ts +++ b/packages/contracts/deploy/new/10_framework/02_ens_subdomain_registrars.ts @@ -10,9 +10,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [deployer] = await ethers.getSigners(); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); - const managingDAO = DAO__factory.connect(managingDAOAddress, deployer); + // Get `managementDAO` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); + const managementDAO = DAO__factory.connect(managementDAOAddress, deployer); const ensRegistryAddress = await getENSAddress(hre); @@ -27,7 +30,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { throw new Error('DAO or Plugin ENS domains have not been set in .env'); } - await deploy('DAO_ENSSubdomainRegistrar', { + await deploy('DAOENSSubdomainRegistrarProxy', { contract: ensSubdomainRegistrarArtifact, from: deployer.address, args: [], @@ -39,19 +42,19 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { execute: { init: { methodName: 'initialize', - args: [managingDAOAddress, ensRegistryAddress, daoNode], + args: [managementDAOAddress, ensRegistryAddress, daoNode], }, }, }, }); - // Get DAO's `ENSSubdomainRegistrar` contract. + // Get DAO's `DAOENSSubdomainRegistrarProxy` contract. const daoSubdomainRegistrarAddress = await getContractAddress( - 'DAO_ENSSubdomainRegistrar', + 'DAOENSSubdomainRegistrarProxy', hre ); - await deploy('Plugin_ENSSubdomainRegistrar', { + await deploy('PluginENSSubdomainRegistrarProxy', { contract: ensSubdomainRegistrarArtifact, from: deployer.address, args: [], @@ -63,15 +66,15 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { execute: { init: { methodName: 'initialize', - args: [managingDAOAddress, ensRegistryAddress, pluginNode], + args: [managementDAOAddress, ensRegistryAddress, pluginNode], }, }, }, }); - // Get PluginRepoRegistry's `ENSSubdomainRegistrar` contract. + // Get the `ENSSubdomainRegistrar` proxy contract of the PluginRepoRegistry. const pluginSubdomainRegistrarAddress = await getContractAddress( - 'Plugin_ENSSubdomainRegistrar', + 'PluginENSSubdomainRegistrarProxy', hre ); @@ -96,7 +99,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { true ); - const tx = await managingDAO.execute( + const tx = await managementDAO.execute( ethers.utils.hexlify(ethers.utils.formatBytes32String('ENS_Permissions')), [ { diff --git a/packages/contracts/deploy/new/10_framework/09_ens_conclude.ts b/packages/contracts/deploy/new/10_framework/09_ens_conclude.ts index 2a953b498..7c213a5ea 100644 --- a/packages/contracts/deploy/new/10_framework/09_ens_conclude.ts +++ b/packages/contracts/deploy/new/10_framework/09_ens_conclude.ts @@ -25,20 +25,22 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { } hre.aragonToVerifyContracts.push( - await deployments.get('DAO_ENSSubdomainRegistrar') + await deployments.get('DAOENSSubdomainRegistrarProxy') ); hre.aragonToVerifyContracts.push({ contract: 'src/framework/utils/ens/ENSSubdomainRegistrar.sol:ENSSubdomainRegistrar', - ...(await deployments.get('DAO_ENSSubdomainRegistrar_Implementation')), + ...(await deployments.get('DAOENSSubdomainRegistrarProxy_Implementation')), }); hre.aragonToVerifyContracts.push( - await deployments.get('Plugin_ENSSubdomainRegistrar') + await deployments.get('PluginENSSubdomainRegistrarProxy') ); hre.aragonToVerifyContracts.push({ contract: 'src/framework/utils/ens/ENSSubdomainRegistrar.sol:ENSSubdomainRegistrar', - ...(await deployments.get('Plugin_ENSSubdomainRegistrar_Implementation')), + ...(await deployments.get( + 'PluginENSSubdomainRegistrarProxy_Implementation' + )), }); }; diff --git a/packages/contracts/deploy/new/10_framework/10_dao-registry.ts b/packages/contracts/deploy/new/10_framework/10_dao-registry.ts index f6ffc89e6..01660a7d5 100644 --- a/packages/contracts/deploy/new/10_framework/10_dao-registry.ts +++ b/packages/contracts/deploy/new/10_framework/10_dao-registry.ts @@ -8,16 +8,19 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deploy} = deployments; const [deployer] = await ethers.getSigners(); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `managementDAO` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); // Get DAO's `ENSSubdomainRegistrar` contract. const ensSubdomainRegistrarAddress = await getContractAddress( - 'DAO_ENSSubdomainRegistrar', + 'DAOENSSubdomainRegistrarProxy', hre ); - await deploy('DAORegistry', { + await deploy('DAORegistryProxy', { contract: daoRegistryArtifact, from: deployer.address, args: [], @@ -29,7 +32,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { execute: { init: { methodName: 'initialize', - args: [managingDAOAddress, ensSubdomainRegistrarAddress], + args: [managementDAOAddress, ensSubdomainRegistrarAddress], }, }, }, diff --git a/packages/contracts/deploy/new/10_framework/11_dao-registry_conclude.ts b/packages/contracts/deploy/new/10_framework/11_dao-registry_conclude.ts index 1e1aa4c00..bb6eca059 100644 --- a/packages/contracts/deploy/new/10_framework/11_dao-registry_conclude.ts +++ b/packages/contracts/deploy/new/10_framework/11_dao-registry_conclude.ts @@ -6,10 +6,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments} = hre; - hre.aragonToVerifyContracts.push(await deployments.get('DAORegistry_Proxy')); + hre.aragonToVerifyContracts.push(await deployments.get('DAORegistryProxy')); hre.aragonToVerifyContracts.push({ contract: 'src/framework/dao/DAORegistry.sol:DAORegistry', - ...(await deployments.get('DAORegistry_Implementation')), + ...(await deployments.get('DAORegistryProxy_Implementation')), }); }; diff --git a/packages/contracts/deploy/new/10_framework/20_plugin-repo-registry.ts b/packages/contracts/deploy/new/10_framework/20_plugin-repo-registry.ts index d9def73b2..32f6b96ff 100644 --- a/packages/contracts/deploy/new/10_framework/20_plugin-repo-registry.ts +++ b/packages/contracts/deploy/new/10_framework/20_plugin-repo-registry.ts @@ -8,16 +8,19 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deploy} = deployments; const [deployer] = await ethers.getSigners(); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `managementDAO` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); // Get DAO's `ENSSubdomainRegistrar` address. const ensSubdomainRegistrarAddress = await getContractAddress( - 'Plugin_ENSSubdomainRegistrar', + 'PluginENSSubdomainRegistrarProxy', hre ); - await deploy('PluginRepoRegistry', { + await deploy('PluginRepoRegistryProxy', { contract: pluginRepoRegistryArtifact, from: deployer.address, args: [], @@ -29,7 +32,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { execute: { init: { methodName: 'initialize', - args: [managingDAOAddress, ensSubdomainRegistrarAddress], + args: [managementDAOAddress, ensSubdomainRegistrarAddress], }, }, }, diff --git a/packages/contracts/deploy/new/10_framework/21_plugin-repo-registry_conclude.ts b/packages/contracts/deploy/new/10_framework/21_plugin-repo-registry_conclude.ts index 01e6cbcca..9d0264c70 100644 --- a/packages/contracts/deploy/new/10_framework/21_plugin-repo-registry_conclude.ts +++ b/packages/contracts/deploy/new/10_framework/21_plugin-repo-registry_conclude.ts @@ -7,12 +7,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments} = hre; hre.aragonToVerifyContracts.push( - await deployments.get('PluginRepoRegistry_Proxy') + await deployments.get('PluginRepoRegistryProxy') ); hre.aragonToVerifyContracts.push({ contract: 'src/framework/plugin/repo/PluginRepoRegistry.sol:PluginRepoRegistry', - ...(await deployments.get('PluginRepoRegistry_Implementation')), + ...(await deployments.get('PluginRepoRegistryProxy_Implementation')), }); }; diff --git a/packages/contracts/deploy/new/10_framework/30_repo-factory.ts b/packages/contracts/deploy/new/10_framework/30_repo-factory.ts index 0e6dd1f93..b35771d38 100644 --- a/packages/contracts/deploy/new/10_framework/30_repo-factory.ts +++ b/packages/contracts/deploy/new/10_framework/30_repo-factory.ts @@ -10,7 +10,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // Get `PluginRepoRegistry` address. const pluginRepoRegistryAddress = await getContractAddress( - 'PluginRepoRegistry', + 'PluginRepoRegistryProxy', hre ); diff --git a/packages/contracts/deploy/new/10_framework/40_plugin_setup_processor.ts b/packages/contracts/deploy/new/10_framework/40_plugin_setup_processor.ts index 0d3b22236..32672f10f 100644 --- a/packages/contracts/deploy/new/10_framework/40_plugin_setup_processor.ts +++ b/packages/contracts/deploy/new/10_framework/40_plugin_setup_processor.ts @@ -10,7 +10,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // Get `PluginRepoRegistry` address. const pluginRepoRegistryAddress = await getContractAddress( - 'PluginRepoRegistry', + 'PluginRepoRegistryProxy', hre ); diff --git a/packages/contracts/deploy/new/10_framework/50_dao-factory.ts b/packages/contracts/deploy/new/10_framework/50_dao-factory.ts index 8bd54ee89..3281ff6a8 100644 --- a/packages/contracts/deploy/new/10_framework/50_dao-factory.ts +++ b/packages/contracts/deploy/new/10_framework/50_dao-factory.ts @@ -8,8 +8,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deploy} = deployments; const [deployer] = await ethers.getSigners(); - // Get `DAORegistry` address. - const daoRegistryAddress = await getContractAddress('DAORegistry', hre); + // Get `DAORegistryProxy` address. + const daoRegistryAddress = await getContractAddress('DAORegistryProxy', hre); // Get `PluginSetupProcessor` address. const pluginSetupProcessorAddress = await getContractAddress( diff --git a/packages/contracts/deploy/new/10_framework/99_verifiy_step.ts b/packages/contracts/deploy/new/10_framework/99_verifiy_step.ts index 28ed06f72..7a3b8b363 100644 --- a/packages/contracts/deploy/new/10_framework/99_verifiy_step.ts +++ b/packages/contracts/deploy/new/10_framework/99_verifiy_step.ts @@ -7,7 +7,7 @@ import { PluginRepoRegistry__factory, PluginSetupProcessor__factory, } from '../../../typechain'; -import {checkSetManagingDao, getContractAddress} from '../../helpers'; +import {checkSetManagementDao, getContractAddress} from '../../helpers'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; @@ -17,30 +17,33 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {ethers} = hre; const [deployer] = await ethers.getSigners(); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `managementDAO` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); // VERIFYING DAO ENS SUBDOMAIN REGISTRAR const DAOENSSubdomainRegistrarAddress = await getContractAddress( - 'DAO_ENSSubdomainRegistrar', + 'DAOENSSubdomainRegistrarProxy', hre ); const DAOENSSubdomainRegistrar = ENSSubdomainRegistrar__factory.connect( DAOENSSubdomainRegistrarAddress, deployer ); - await checkSetManagingDao(DAOENSSubdomainRegistrar, managingDAOAddress); + await checkSetManagementDao(DAOENSSubdomainRegistrar, managementDAOAddress); // scope to reuse same const again { const ensAddr = await DAOENSSubdomainRegistrar.ens(); const ensRegistryContract = ENSRegistry__factory.connect(ensAddr, deployer); const isApprovedForAll = await ensRegistryContract.isApprovedForAll( - managingDAOAddress, + managementDAOAddress, DAOENSSubdomainRegistrarAddress ); if (!isApprovedForAll) { throw new Error( - `DAOENSSubdomainRegistrar isn't approved for all. Expected ${managingDAOAddress} to have ${DAOENSSubdomainRegistrarAddress} approved for all` + `DAOENSSubdomainRegistrar isn't approved for all. Expected ${managementDAOAddress} to have ${DAOENSSubdomainRegistrarAddress} approved for all` ); } @@ -57,25 +60,28 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // VERIFYING PLUGIN ENS SUBDOMAIN REGISTRAR const PluginENSSubdomainRegistrarAddress = await getContractAddress( - 'Plugin_ENSSubdomainRegistrar', + 'PluginENSSubdomainRegistrarProxy', hre ); const PluginENSSubdomainRegistrar = ENSSubdomainRegistrar__factory.connect( PluginENSSubdomainRegistrarAddress, deployer ); - await checkSetManagingDao(PluginENSSubdomainRegistrar, managingDAOAddress); + await checkSetManagementDao( + PluginENSSubdomainRegistrar, + managementDAOAddress + ); // scope to reuse same const again { const ensAddr = await PluginENSSubdomainRegistrar.ens(); const ensRegistryContract = ENSRegistry__factory.connect(ensAddr, deployer); const isApprovedForAll = await ensRegistryContract.isApprovedForAll( - managingDAOAddress, + managementDAOAddress, PluginENSSubdomainRegistrarAddress ); if (!isApprovedForAll) { throw new Error( - `PluginENSSubdomainRegistrar isn't approved for all. Expected ${managingDAOAddress} to have ${PluginENSSubdomainRegistrarAddress} approved for all` + `PluginENSSubdomainRegistrar isn't approved for all. Expected ${managementDAOAddress} to have ${PluginENSSubdomainRegistrarAddress} approved for all` ); } @@ -91,12 +97,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { } // VERIFYING DAO REGISTRY - const DAORegistryAddress = await getContractAddress('DAORegistry', hre); + const DAORegistryAddress = await getContractAddress('DAORegistryProxy', hre); const DAORegistry = DAORegistry__factory.connect( DAORegistryAddress, deployer ); - await checkSetManagingDao(DAORegistry, managingDAOAddress); + await checkSetManagementDao(DAORegistry, managementDAOAddress); // scope to reuse same const again { const SubdomainRegistrarAddress = await DAORegistry.subdomainRegistrar(); @@ -109,14 +115,14 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // VERIFYING PLUGIN REPO REGISTRY const PluginRepoRegistryAddress = await getContractAddress( - 'PluginRepoRegistry', + 'PluginRepoRegistryProxy', hre ); const PluginRepoRegistry = PluginRepoRegistry__factory.connect( PluginRepoRegistryAddress, deployer ); - await checkSetManagingDao(PluginRepoRegistry, managingDAOAddress); + await checkSetManagementDao(PluginRepoRegistry, managementDAOAddress); // scope to reuse same const again { const SubdomainRegistrarAddress = diff --git a/packages/contracts/deploy/new/20_permissions/00_ens-permissions.ts b/packages/contracts/deploy/new/20_permissions/00_ens-permissions.ts index 17c32a457..d12954bf4 100644 --- a/packages/contracts/deploy/new/20_permissions/00_ens-permissions.ts +++ b/packages/contracts/deploy/new/20_permissions/00_ens-permissions.ts @@ -10,45 +10,48 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {ethers} = hre; const [deployer] = await ethers.getSigners(); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `managementDAO` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); // Get `DAO` contract. - const managingDaoContract = DAO__factory.connect( - managingDAOAddress, + const managementDaoContract = DAO__factory.connect( + managementDAOAddress, deployer ); // Get `DAORegistry` address. - const daoRegistryAddress = await getContractAddress('DAORegistry', hre); + const daoRegistryAddress = await getContractAddress('DAORegistryProxy', hre); // Get `PluginRepoRegistry` address. const pluginRepoRegistryAddress = await getContractAddress( - 'PluginRepoRegistry', + 'PluginRepoRegistryProxy', hre ); // Get DAO's `ENSSubdomainRegistrar` address. const daoEnsSubdomainRegistrarAddress = await getContractAddress( - 'DAO_ENSSubdomainRegistrar', + 'DAOENSSubdomainRegistrarProxy', hre ); // Get Plugin's `ENSSubdomainRegistrar` address. const pluginEnsSubdomainRegistrarAddress = await getContractAddress( - 'Plugin_ENSSubdomainRegistrar', + 'PluginENSSubdomainRegistrarProxy', hre ); - // Grant `REGISTER_ENS_SUBDOMAIN_PERMISSION` of `DAO_ENSSubdomainRegistrar` to `DAORegistry`. - // Grant `REGISTER_ENS_SUBDOMAIN_PERMISSION` of `Plugin_ENSSubdomainRegistrar` to `PluginRepoRegistry`. - // Grant `UPGRADE_REGISTRAR_PERMISSION` of `DAO_ENSSubdomainRegistrar` to `ManagingDAO`. - // Grant `UPGRADE_REGISTRAR_PERMISSION` of `Plugin_ENSSubdomainRegistrar` to `ManagingDAO`. + // Grant `REGISTER_ENS_SUBDOMAIN_PERMISSION` of `DAOENSSubdomainRegistrarProxy` to `DAORegistry`. + // Grant `REGISTER_ENS_SUBDOMAIN_PERMISSION` of `PluginENSSubdomainRegistrarProxy` to `PluginRepoRegistry`. + // Grant `UPGRADE_REGISTRAR_PERMISSION` of `DAOENSSubdomainRegistrarProxy` to `ManagementDAO`. + // Grant `UPGRADE_REGISTRAR_PERMISSION` of `PluginENSSubdomainRegistrarProxy` to `ManagementDAO`. const grantPermissions = [ { operation: Operation.Grant, where: { - name: 'DAO_ENSSubdomainRegistrar', + name: 'DAOENSSubdomainRegistrarProxy', address: daoEnsSubdomainRegistrarAddress, }, who: {name: 'DAORegistry', address: daoRegistryAddress}, @@ -57,7 +60,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { { operation: Operation.Grant, where: { - name: 'Plugin_ENSSubdomainRegistrar', + name: 'PluginENSSubdomainRegistrarProxy', address: pluginEnsSubdomainRegistrarAddress, }, who: {name: 'PluginRepoRegistry', address: pluginRepoRegistryAddress}, @@ -66,23 +69,23 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { { operation: Operation.Grant, where: { - name: 'DAO_ENSSubdomainRegistrar', + name: 'DAOENSSubdomainRegistrarProxy', address: daoEnsSubdomainRegistrarAddress, }, - who: {name: 'ManagingDAO', address: managingDAOAddress}, + who: {name: 'ManagementDAOProxy', address: managementDAOAddress}, permission: 'UPGRADE_REGISTRAR_PERMISSION', }, { operation: Operation.Grant, where: { - name: 'Plugin_ENSSubdomainRegistrar', + name: 'PluginENSSubdomainRegistrarProxy', address: pluginEnsSubdomainRegistrarAddress, }, - who: {name: 'ManagingDAO', address: managingDAOAddress}, + who: {name: 'ManagementDAOProxy', address: managementDAOAddress}, permission: 'UPGRADE_REGISTRAR_PERMISSION', }, ]; - await managePermissions(managingDaoContract, grantPermissions); + await managePermissions(managementDaoContract, grantPermissions); }; export default func; func.tags = ['New', 'ENS_Permissions']; diff --git a/packages/contracts/deploy/new/20_permissions/10_dao-registry-permissions.ts b/packages/contracts/deploy/new/20_permissions/10_dao-registry-permissions.ts index 7fea0662a..6d5ab1f76 100644 --- a/packages/contracts/deploy/new/20_permissions/10_dao-registry-permissions.ts +++ b/packages/contracts/deploy/new/20_permissions/10_dao-registry-permissions.ts @@ -8,38 +8,41 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {ethers} = hre; const [deployer] = await ethers.getSigners(); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `managementDAO` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); // Get `DAO` contract. - const managingDaoContract = DAO__factory.connect( - managingDAOAddress, + const managementDaoContract = DAO__factory.connect( + managementDAOAddress, deployer ); - // Get `DAORegistry` address. - const daoRegistryAddress = await getContractAddress('DAORegistry', hre); + // Get `DAORegistryProxy` address. + const daoRegistryAddress = await getContractAddress('DAORegistryProxy', hre); // Get `DAOFactory` address. const daoFactoryAddress = await getContractAddress('DAOFactory', hre); - // Grant `REGISTER_DAO_PERMISSION` of `DAORegistry` to `DAOFactory`. - // Grant `UPGRADE_REGISTRY_PERMISSION` of `DAORegistry` to `ManagingDAO`. + // Grant `REGISTER_DAO_PERMISSION` of `DAORegistryProxy` to `DAOFactory`. + // Grant `UPGRADE_REGISTRY_PERMISSION` of `DAORegistryProxy` to `ManagementDAOProxy`. const grantPermissions = [ { operation: Operation.Grant, - where: {name: 'DAORegistry', address: daoRegistryAddress}, + where: {name: 'DAORegistryProxy', address: daoRegistryAddress}, who: {name: 'DAOFactory', address: daoFactoryAddress}, permission: 'REGISTER_DAO_PERMISSION', }, { operation: Operation.Grant, - where: {name: 'DAORegistry', address: daoRegistryAddress}, - who: {name: 'ManagingDAO', address: managingDAOAddress}, + where: {name: 'DAORegistryProxy', address: daoRegistryAddress}, + who: {name: 'ManagementDAOProxy', address: managementDAOAddress}, permission: 'UPGRADE_REGISTRY_PERMISSION', }, ]; - await managePermissions(managingDaoContract, grantPermissions); + await managePermissions(managementDaoContract, grantPermissions); }; export default func; func.tags = ['New', 'DAO_Registry_Permissions']; diff --git a/packages/contracts/deploy/new/20_permissions/20_plugin-registrty-permissions.ts b/packages/contracts/deploy/new/20_permissions/20_plugin-registrty-permissions.ts index c2b91fe24..077af70fb 100644 --- a/packages/contracts/deploy/new/20_permissions/20_plugin-registrty-permissions.ts +++ b/packages/contracts/deploy/new/20_permissions/20_plugin-registrty-permissions.ts @@ -8,18 +8,21 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {ethers} = hre; const [deployer] = await ethers.getSigners(); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `managementDAO` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); // Get `DAO` contract. - const managingDaoContract = DAO__factory.connect( - managingDAOAddress, + const managementDaoContract = DAO__factory.connect( + managementDAOAddress, deployer ); - // Get `PluginRepoRegistry` address. + // Get `PluginRepoRegistryProxy` address. const pluginRepoRegistryAddress = await getContractAddress( - 'PluginRepoRegistry', + 'PluginRepoRegistryProxy', hre ); @@ -29,23 +32,29 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { hre ); - // Grant `REGISTER_PLUGIN_REPO_PERMISSION` of `PluginRepoRegistry` to `DAOFactory`. - // Grant `UPGRADE_REGISTRY_PERMISSION` of `PluginRepoRegistry` to `ManagingDAO`. + // Grant `REGISTER_PLUGIN_REPO_PERMISSION` of `PluginRepoRegistryProxy` to `DAOFactory`. + // Grant `UPGRADE_REGISTRY_PERMISSION` of `PluginRepoRegistryProxy` to `ManagementDAO`. const grantPermissions = [ { operation: Operation.Grant, - where: {name: 'PluginRepoRegistry', address: pluginRepoRegistryAddress}, + where: { + name: 'PluginRepoRegistryProxy', + address: pluginRepoRegistryAddress, + }, who: {name: 'PluginRepoFactory', address: pluginRepoFactoryAddress}, permission: 'REGISTER_PLUGIN_REPO_PERMISSION', }, { operation: Operation.Grant, - where: {name: 'PluginRepoRegistry', address: pluginRepoRegistryAddress}, - who: {name: 'ManagingDAO', address: managingDAOAddress}, + where: { + name: 'PluginRepoRegistryProxy', + address: pluginRepoRegistryAddress, + }, + who: {name: 'ManagementDAO', address: managementDAOAddress}, permission: 'UPGRADE_REGISTRY_PERMISSION', }, ]; - await managePermissions(managingDaoContract, grantPermissions); + await managePermissions(managementDaoContract, grantPermissions); }; export default func; func.tags = ['New', 'Plugin_Registry_Permissions']; diff --git a/packages/contracts/deploy/new/20_permissions/99_verify.ts b/packages/contracts/deploy/new/20_permissions/99_verify.ts index 4068038dd..c099fa6c1 100644 --- a/packages/contracts/deploy/new/20_permissions/99_verify.ts +++ b/packages/contracts/deploy/new/20_permissions/99_verify.ts @@ -11,33 +11,36 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [deployer] = await ethers.getSigners(); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `ManagementDAOProxy` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); - // Get `DAO` contract. - const managingDaoContract = DAO__factory.connect( - managingDAOAddress, + // Get `ManagementDAOProxy` contract. + const managementDaoContract = DAO__factory.connect( + managementDAOAddress, deployer ); - // Get `DAORegistry` address. - const daoRegistryAddress = await getContractAddress('DAORegistry', hre); + // Get `DAORegistryProxy` address. + const daoRegistryAddress = await getContractAddress('DAORegistryProxy', hre); - // Get `PluginRepoRegistry` address. + // Get `PluginRepoRegistryProxy` address. const pluginRepoRegistryAddress = await getContractAddress( - 'PluginRepoRegistry', + 'PluginRepoRegistryProxy', hre ); - // Get DAO's `ENSSubdomainRegistrar` address. + // Get DAO's `DAOENSSubdomainRegistrarProxy` address. const daoEnsSubdomainRegistrarAddress = await getContractAddress( - 'DAO_ENSSubdomainRegistrar', + 'DAOENSSubdomainRegistrarProxy', hre ); - // Get Plugin's `ENSSubdomainRegistrar` address. + // Get Plugin's `PluginENSSubdomainRegistrarProxy` address. const pluginEnsSubdomainRegistrarAddress = await getContractAddress( - 'Plugin_ENSSubdomainRegistrar', + 'PluginENSSubdomainRegistrarProxy', hre ); @@ -51,39 +54,42 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ); // ENS PERMISSIONS - await checkPermission(managingDaoContract, { + await checkPermission(managementDaoContract, { operation: Operation.Grant, where: { - name: 'DAOSubdomainRegistrar', + name: 'DAOENSSubdomainRegistrarProxy', address: daoEnsSubdomainRegistrarAddress, }, - who: {name: 'DAORegistry', address: daoRegistryAddress}, + who: {name: 'DAORegistryProxy', address: daoRegistryAddress}, permission: 'REGISTER_ENS_SUBDOMAIN_PERMISSION', }); - await checkPermission(managingDaoContract, { + await checkPermission(managementDaoContract, { operation: Operation.Grant, where: { - name: 'PluginSubdomainRegistrar', + name: 'PluginENSSubdomainRegistrarProxy', address: pluginEnsSubdomainRegistrarAddress, }, - who: {name: 'RepoRegistry', address: pluginRepoRegistryAddress}, + who: {name: 'PluginRepoRegistryProxy', address: pluginRepoRegistryAddress}, permission: 'REGISTER_ENS_SUBDOMAIN_PERMISSION', }); // DAO REGISTRY PERMISSIONS - await checkPermission(managingDaoContract, { + await checkPermission(managementDaoContract, { operation: Operation.Grant, - where: {name: 'DAORegistry', address: daoRegistryAddress}, + where: {name: 'DAORegistryProxy', address: daoRegistryAddress}, who: {name: 'DAOFactory', address: daoFactoryAddress}, permission: 'REGISTER_DAO_PERMISSION', }); // PLUGIN REPO REGISTRY PERMISSIONS - await checkPermission(managingDaoContract, { + await checkPermission(managementDaoContract, { operation: Operation.Grant, - where: {name: 'RepoRegistry', address: pluginRepoRegistryAddress}, - who: {name: 'RepoFactory', address: pluginRepoFactoryAddress}, + where: { + name: 'PluginRepoRegistryProxy', + address: pluginRepoRegistryAddress, + }, + who: {name: 'PluginRepoFactory', address: pluginRepoFactoryAddress}, permission: 'REGISTER_PLUGIN_REPO_PERMISSION', }); diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/00_create_address_list_voting_repo.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/00_create_address_list_voting_repo.ts index 493efa47a..8c5c2c6fa 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/00_create_address_list_voting_repo.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/00_create_address_list_voting_repo.ts @@ -33,8 +33,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { hre ); - await createPluginRepo(hre, 'address-list-voting'); - await populatePluginRepo(hre, 'address-list-voting', [ + await createPluginRepo( + hre, + 'AddresslistVotingRepoProxy', + 'address-list-voting' + ); + await populatePluginRepo(hre, 'AddresslistVotingRepoProxy', [ { versionTag: [1, 2], pluginSetupContract: addresslistVotingSetupContract, diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/01_create_address_list_voting_repo_conclude.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/01_create_address_list_voting_repo_conclude.ts index df2064add..670332912 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/01_create_address_list_voting_repo_conclude.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/01_create_address_list_voting_repo_conclude.ts @@ -27,7 +27,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const pluginRepoBase = await pluginRepoFactory.pluginRepoBase(); hre.aragonToVerifyContracts.push({ - address: hre.aragonPluginRepos['address-list-voting'], + address: hre.aragonPluginRepos.AddresslistVotingRepoProxy, args: [pluginRepoBase, initializeData], }); }; diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/10_create_token_voting_repo.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/10_create_token_voting_repo.ts index e03fd335f..fe398f4d9 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/10_create_token_voting_repo.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/10_create_token_voting_repo.ts @@ -33,8 +33,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { hre ); - await createPluginRepo(hre, 'token-voting'); - await populatePluginRepo(hre, 'token-voting', [ + await createPluginRepo(hre, 'TokenVotingRepoProxy', 'token-voting'); + await populatePluginRepo(hre, 'TokenVotingRepoProxy', [ { versionTag: [1, 2], pluginSetupContract: tokenVotingSetupContract, diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/11_create_token_voting_repo_conclude.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/11_create_token_voting_repo_conclude.ts index 3305674c0..7bd822367 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/11_create_token_voting_repo_conclude.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/11_create_token_voting_repo_conclude.ts @@ -27,7 +27,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const pluginRepoBase = await pluginRepoFactory.pluginRepoBase(); hre.aragonToVerifyContracts.push({ - address: hre.aragonPluginRepos['token-voting'], + address: hre.aragonPluginRepos.TokenVotingRepoProxy, args: [pluginRepoBase, initializeData], }); }; diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/20_create_admin_repo.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/20_create_admin_repo.ts index cbd6bb1ef..8de9ef01b 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/20_create_admin_repo.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/20_create_admin_repo.ts @@ -30,8 +30,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const adminSetupContract = await getContractAddress('AdminSetup', hre); - await createPluginRepo(hre, 'admin'); - await populatePluginRepo(hre, 'admin', [ + await createPluginRepo(hre, 'AdminRepoProxy', 'admin'); + await populatePluginRepo(hre, 'AdminRepoProxy', [ { versionTag: [1, 1], pluginSetupContract: adminSetupContract, diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/21_create_admin_repo_conclude.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/21_create_admin_repo_conclude.ts index 9926ada4f..bc92fb106 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/21_create_admin_repo_conclude.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/21_create_admin_repo_conclude.ts @@ -6,7 +6,7 @@ import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log(`Concluding TokenVotingSetup deployment.\n`); + console.log(`Concluding AdminSetup deployment.\n`); const [deployer] = await hre.ethers.getSigners(); const {deployments} = hre; @@ -27,7 +27,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const pluginRepoBase = await pluginRepoFactory.pluginRepoBase(); hre.aragonToVerifyContracts.push({ - address: hre.aragonPluginRepos['admin'], + address: hre.aragonPluginRepos.AdminRepoProxy, args: [pluginRepoBase, initializeData], }); }; diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/30_create_multisig_repo.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/30_create_multisig_repo.ts index 6cf82377b..f765b8e5c 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/30_create_multisig_repo.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/30_create_multisig_repo.ts @@ -30,8 +30,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const multisigSetupContract = await getContractAddress('MultisigSetup', hre); - await createPluginRepo(hre, 'multisig'); - await populatePluginRepo(hre, 'multisig', [ + await createPluginRepo(hre, 'MultisigRepoProxy', 'multisig'); + await populatePluginRepo(hre, 'MultisigRepoProxy', [ { versionTag: [1, 2], pluginSetupContract: multisigSetupContract, diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/31_create_multisig_repo_conclude.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/31_create_multisig_repo_conclude.ts index 6be0fa3e7..3d89ba8ef 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/31_create_multisig_repo_conclude.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/31_create_multisig_repo_conclude.ts @@ -6,7 +6,7 @@ import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log(`Concluding AddresslistVotingSetup deployment.\n`); + console.log(`Concluding MultisigSetup deployment.\n`); const [deployer] = await hre.ethers.getSigners(); const {deployments} = hre; @@ -27,7 +27,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const pluginRepoBase = await pluginRepoFactory.pluginRepoBase(); hre.aragonToVerifyContracts.push({ - address: hre.aragonPluginRepos['multisig'], + address: hre.aragonPluginRepos.MultisigRepoProxy, args: [pluginRepoBase, initializeData], }); }; diff --git a/packages/contracts/deploy/new/40_finalize-managing-dao/00_grant-permissions.ts b/packages/contracts/deploy/new/40_finalize-management-dao/00_grant-permissions.ts similarity index 70% rename from packages/contracts/deploy/new/40_finalize-managing-dao/00_grant-permissions.ts rename to packages/contracts/deploy/new/40_finalize-management-dao/00_grant-permissions.ts index 920bb2d29..0775624b7 100644 --- a/packages/contracts/deploy/new/40_finalize-managing-dao/00_grant-permissions.ts +++ b/packages/contracts/deploy/new/40_finalize-management-dao/00_grant-permissions.ts @@ -5,23 +5,26 @@ import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log(`\nFinalizing ManagingDao.`); + console.log(`\nFinalizing ManagementDao.`); const {ethers} = hre; const [deployer] = await ethers.getSigners(); - // Get `DAORegistry` address. - const daoRegistryAddress = await getContractAddress('DAORegistry', hre); + // Get `DAORegistryProxy` address. + const daoRegistryAddress = await getContractAddress('DAORegistryProxy', hre); // Get `PluginSetupProcessor` address. const pspAddress = await getContractAddress('PluginSetupProcessor', hre); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `ManagementDAOProxy` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); // Get `DAO` contract. - const managingDaoContract = DAO__factory.connect( - managingDAOAddress, + const managementDaoContract = DAO__factory.connect( + managementDAOAddress, deployer ); @@ -32,13 +35,13 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const grantPermissions = [ { operation: Operation.Grant, - where: {name: 'DAORegistry', address: daoRegistryAddress}, + where: {name: 'DAORegistryProxy', address: daoRegistryAddress}, who: {name: 'Deployer', address: deployer.address}, permission: 'REGISTER_DAO_PERMISSION', }, { operation: Operation.Grant, - where: {name: 'DAO', address: managingDAOAddress}, + where: {name: 'ManagementDAOProxy', address: managementDAOAddress}, who: {name: 'PluginSetupProcessor', address: pspAddress}, permission: 'ROOT_PERMISSION', }, @@ -50,45 +53,45 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }, { operation: Operation.Grant, - where: {name: 'DAO', address: managingDAOAddress}, + where: {name: 'ManagementDAOProxy', address: managementDAOAddress}, who: {name: 'Deployer', address: deployer.address}, permission: 'SET_METADATA_PERMISSION', }, ]; - await managePermissions(managingDaoContract, grantPermissions); + await managePermissions(managementDaoContract, grantPermissions); - // Grant `ROOT_PERMISSION`, `MAINTAINER_PERMISSION` and `UPGRADE_REPO_PERMISSION` to `managingDao` on the permission manager of each PluginRepo. + // Grant `ROOT_PERMISSION`, `MAINTAINER_PERMISSION` and `UPGRADE_REPO_PERMISSION` to `managementDao` on the permission manager of each PluginRepo. for (const repoName in hre.aragonPluginRepos) { const repoAddress = hre.aragonPluginRepos[repoName]; const grantPluginRepoPermissions: Permission[] = []; grantPluginRepoPermissions.push({ operation: Operation.Grant, where: { - name: repoName + ' PluginRepo', + name: repoName, address: repoAddress, }, - who: {name: 'ManagingDAO', address: managingDAOAddress}, + who: {name: 'ManagementDAOProxy', address: managementDAOAddress}, permission: 'ROOT_PERMISSION', }); grantPluginRepoPermissions.push({ operation: Operation.Grant, where: { - name: repoName + ' PluginRepo', + name: repoName, address: repoAddress, }, - who: {name: 'ManagingDAO', address: managingDAOAddress}, + who: {name: 'ManagementDAOProxy', address: managementDAOAddress}, permission: 'MAINTAINER_PERMISSION', }); grantPluginRepoPermissions.push({ operation: Operation.Grant, where: { - name: repoName + ' PluginRepo', + name: repoName, address: repoAddress, }, - who: {name: 'ManagingDAO', address: managingDAOAddress}, + who: {name: 'ManagementDAOProxy', address: managementDAOAddress}, permission: 'UPGRADE_REPO_PERMISSION', }); await managePermissions( @@ -98,4 +101,4 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { } }; export default func; -func.tags = ['New', 'RegisterManagingDAO']; +func.tags = ['New', 'RegisterManagementDAO']; diff --git a/packages/contracts/deploy/new/40_finalize-managing-dao/20_register-managing-dao-on-dao-registry.ts b/packages/contracts/deploy/new/40_finalize-management-dao/20_register-management-dao-on-dao-registry.ts similarity index 59% rename from packages/contracts/deploy/new/40_finalize-managing-dao/20_register-managing-dao-on-dao-registry.ts rename to packages/contracts/deploy/new/40_finalize-management-dao/20_register-management-dao-on-dao-registry.ts index 228712380..4e30a486e 100644 --- a/packages/contracts/deploy/new/40_finalize-managing-dao/20_register-managing-dao-on-dao-registry.ts +++ b/packages/contracts/deploy/new/40_finalize-management-dao/20_register-management-dao-on-dao-registry.ts @@ -3,7 +3,7 @@ import { getContractAddress, getENSAddress, isENSDomainRegistered, - MANAGING_DAO_METADATA, + MANAGEMENT_DAO_METADATA, uploadToIPFS, } from '../../helpers'; import {DeployFunction} from 'hardhat-deploy/types'; @@ -14,20 +14,23 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [deployer] = await ethers.getSigners(); // Get info from .env - const daoSubdomain = process.env.MANAGINGDAO_SUBDOMAIN || ''; + const daoSubdomain = process.env.MANAGEMENT_DAO_SUBDOMAIN || ''; const daoDomain = process.env[`${network.name.toUpperCase()}_DAO_ENS_DOMAIN`] || ''; if (!daoSubdomain) - throw new Error('ManagingDAO subdomain has not been set in .env'); + throw new Error('ManagementDAO subdomain has not been set in .env'); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `ManagementDAOProxy` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); - // Get `DAORegistry` address. - const daoRegistryAddress = await getContractAddress('DAORegistry', hre); + // Get `DAORegistryProxy` address. + const daoRegistryAddress = await getContractAddress('DAORegistryProxy', hre); - // Get `DAORegistry` contract. + // Get `DAORegistryProxy` contract. const daoRegistryContract = DAORegistry__factory.connect( daoRegistryAddress, deployer @@ -40,37 +43,37 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { deployer ) ) { - // not beeing able to register the managing DAO means that something is not right with the framework deployment used. + // not beeing able to register the management DAO means that something is not right with the framework deployment used. // Either a fruntrun happened or something else. Thus we abort here throw new Error( `A DAO with ${daoSubdomain}.${daoDomain} is already registered! Aborting...` ); } - // Register `managingDAO` on `DAORegistry`. + // Register `managementDAO` on `DAORegistry`. const registerTx = await daoRegistryContract.register( - managingDAOAddress, + managementDAOAddress, deployer.address, daoSubdomain ); await registerTx.wait(); console.log( - `Registered the (managingDAO: ${managingDAOAddress}) on (DAORegistry: ${daoRegistryAddress}), see (tx: ${registerTx.hash})` + `Registered the (ManagementDAOProxy: ${managementDAOAddress}) on (DAORegistry: ${daoRegistryAddress}), see (tx: ${registerTx.hash})` ); - // Set Metadata for the Managing DAO - const managingDaoContract = DAO__factory.connect( - managingDAOAddress, + // Set Metadata for the Management DAO + const managementDaoContract = DAO__factory.connect( + managementDAOAddress, deployer ); const metadataCIDPath = await uploadToIPFS( - JSON.stringify(MANAGING_DAO_METADATA), + JSON.stringify(MANAGEMENT_DAO_METADATA), network.name ); - const setMetadataTX = await managingDaoContract.setMetadata( + const setMetadataTX = await managementDaoContract.setMetadata( ethers.utils.hexlify(ethers.utils.toUtf8Bytes(`ipfs://${metadataCIDPath}`)) ); await setMetadataTX.wait(); }; export default func; -func.tags = ['New', 'RegisterManagingDAO']; +func.tags = ['New', 'RegisterManagementDAO']; diff --git a/packages/contracts/deploy/new/40_finalize-managing-dao/30_install-multisig-on-managing-dao.ts b/packages/contracts/deploy/new/40_finalize-management-dao/30_install-multisig-on-management-dao.ts similarity index 66% rename from packages/contracts/deploy/new/40_finalize-managing-dao/30_install-multisig-on-managing-dao.ts rename to packages/contracts/deploy/new/40_finalize-management-dao/30_install-multisig-on-management-dao.ts index 24eddd811..896f4a6d8 100644 --- a/packages/contracts/deploy/new/40_finalize-managing-dao/30_install-multisig-on-managing-dao.ts +++ b/packages/contracts/deploy/new/40_finalize-management-dao/30_install-multisig-on-management-dao.ts @@ -20,33 +20,36 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { if (network.name !== 'localhost' && network.name !== 'hardhat') { if ( - !('MANAGINGDAO_MULTISIG_LISTEDONLY' in process.env) || - !('MANAGINGDAO_MULTISIG_MINAPPROVALS' in process.env) || - !('MANAGINGDAO_MULTISIG_APPROVERS' in process.env) + !('MANAGEMENT_DAO_MULTISIG_LISTEDONLY' in process.env) || + !('MANAGEMENT_DAO_MULTISIG_MINAPPROVALS' in process.env) || + !('MANAGEMENT_DAO_MULTISIG_APPROVERS' in process.env) ) { - throw new Error('Managing DAO Multisig settings not set in .env'); + throw new Error('Management DAO Multisig settings not set in .env'); } } - const approvers = process.env.MANAGINGDAO_MULTISIG_APPROVERS?.split(',') || [ - deployer.address, - ]; + const approvers = process.env.MANAGEMENT_DAO_MULTISIG_APPROVERS?.split( + ',' + ) || [deployer.address]; const minApprovals = parseInt( - process.env.MANAGINGDAO_MULTISIG_MINAPPROVALS || '1' + process.env.MANAGEMENT_DAO_MULTISIG_MINAPPROVALS || '1' ); - // In case `MANAGINGDAO_MULTISIG_LISTEDONLY` not present in .env + // In case `MANAGEMENT_DAO_MULTISIG_LISTEDONLY` not present in .env // which applies only hardhat/localhost, use `true` setting for extra safety for tests. const listedOnly = - 'MANAGINGDAO_MULTISIG_LISTEDONLY' in process.env - ? process.env.MANAGINGDAO_MULTISIG_LISTEDONLY === 'true' + 'MANAGEMENT_DAO_MULTISIG_LISTEDONLY' in process.env + ? process.env.MANAGEMENT_DAO_MULTISIG_LISTEDONLY === 'true' : true; - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `ManagementDAOProxy` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); // Get `DAO` contract. - const managingDaoContract = DAO__factory.connect( - managingDAOAddress, + const managementDaoContract = DAO__factory.connect( + managementDAOAddress, deployer ); @@ -60,7 +63,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ); // Install multisig build 2 - const multisigRepoAddress = hre.aragonPluginRepos['multisig']; + const multisigRepoAddress = hre.aragonPluginRepos.MultisigRepoProxy; const versionTag = { release: 1, build: 2, @@ -70,17 +73,20 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { versionTag, }; - // Prepare multisig plugin for managingDAO + // Prepare multisig plugin for managementDAO const data = ethers.utils.defaultAbiCoder.encode( getNamedTypesFromMetadata( buildMetadataJson.pluginSetup.prepareInstallation.inputs ), [approvers, [listedOnly, minApprovals]] ); - const prepareTx = await pspContract.prepareInstallation(managingDAOAddress, { - data, - pluginSetupRef, - }); + const prepareTx = await pspContract.prepareInstallation( + managementDAOAddress, + { + data, + pluginSetupRef, + } + ); await prepareTx.wait(); // extract info from prepare event @@ -90,10 +96,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ); const installationPreparedEvent = event.args; - hre.managingDAOMultisigPluginAddress = installationPreparedEvent.plugin; + hre.managementDAOMultisigPluginAddress = installationPreparedEvent.plugin; console.log( - `Prepared (Multisig: ${installationPreparedEvent.plugin} version (release: ${versionTag.release} / build: ${versionTag.build}) to be applied on (ManagingDAO: ${managingDAOAddress}), see (tx: ${prepareTx.hash})` + `Prepared (Multisig: ${installationPreparedEvent.plugin} version (release: ${versionTag.release} / build: ${versionTag.build}) to be applied on (ManagementDAO: ${managementDAOAddress}), see (tx: ${prepareTx.hash})` ); // Adding plugin to verify array @@ -107,7 +113,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { args: [ await multisigSetup.implementation(), Multisig__factory.createInterface().encodeFunctionData('initialize', [ - managingDAOAddress, + managementDAOAddress, approvers, { onlyListed: listedOnly, @@ -117,8 +123,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ], }); - // Apply multisig plugin to the managingDAO - const applyTx = await pspContract.applyInstallation(managingDAOAddress, { + // Apply multisig plugin to the managementDAO + const applyTx = await pspContract.applyInstallation(managementDAOAddress, { helpersHash: hashHelpers( installationPreparedEvent.preparedSetupData.helpers ), @@ -128,16 +134,16 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }); await applyTx.wait(); - await checkPermission(managingDaoContract, { + await checkPermission(managementDaoContract, { operation: Operation.Grant, - where: {name: 'ManagingDAO', address: managingDAOAddress}, + where: {name: 'ManagementDAO', address: managementDAOAddress}, who: {name: 'Multisig plugin', address: installationPreparedEvent.plugin}, permission: 'EXECUTE_PERMISSION', }); console.log( - `Applied (Multisig: ${installationPreparedEvent.plugin}) on (ManagingDAO: ${managingDAOAddress}), see (tx: ${applyTx.hash})` + `Applied (Multisig: ${installationPreparedEvent.plugin}) on (ManagementDAO: ${managementDAOAddress}), see (tx: ${applyTx.hash})` ); }; export default func; -func.tags = ['New', 'InstallMultisigOnManagingDAO']; +func.tags = ['New', 'InstallMultisigOnManagementDAO']; diff --git a/packages/contracts/deploy/new/40_finalize-managing-dao/40_revoke-permissions.ts b/packages/contracts/deploy/new/40_finalize-management-dao/40_revoke-permissions.ts similarity index 73% rename from packages/contracts/deploy/new/40_finalize-managing-dao/40_revoke-permissions.ts rename to packages/contracts/deploy/new/40_finalize-management-dao/40_revoke-permissions.ts index 86851149f..3231b835e 100644 --- a/packages/contracts/deploy/new/40_finalize-managing-dao/40_revoke-permissions.ts +++ b/packages/contracts/deploy/new/40_finalize-management-dao/40_revoke-permissions.ts @@ -9,23 +9,26 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [deployer] = await ethers.getSigners(); // Get info from .env - const daoSubdomain = process.env.MANAGINGDAO_SUBDOMAIN || ''; + const daoSubdomain = process.env.MANAGEMENT_DAO_SUBDOMAIN || ''; if (!daoSubdomain) - throw new Error('ManagingDAO subdomain has not been set in .env'); + throw new Error('ManagementDAO subdomain has not been set in .env'); - // Get `DAORegistry` address. - const daoRegistryAddress = await getContractAddress('DAORegistry', hre); + // Get `DAORegistryProxy` address. + const daoRegistryAddress = await getContractAddress('DAORegistryProxy', hre); // Get `PluginSetupProcessor` address. const pspAddress = await getContractAddress('PluginSetupProcessor', hre); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `ManagementDAOProxy` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); - // Get `DAO` contract. - const managingDaoContract = DAO__factory.connect( - managingDAOAddress, + // Get `ManagementDAOProxy` contract. + const managementDaoContract = DAO__factory.connect( + managementDAOAddress, deployer ); @@ -36,13 +39,13 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const revokePermissions = [ { operation: Operation.Revoke, - where: {name: 'DAORegistry', address: daoRegistryAddress}, + where: {name: 'DAORegistryProxy', address: daoRegistryAddress}, who: {name: 'Deployer', address: deployer.address}, permission: 'REGISTER_DAO_PERMISSION', }, { operation: Operation.Revoke, - where: {name: 'DAO', address: managingDAOAddress}, + where: {name: 'ManagementDAOProxy', address: managementDAOAddress}, who: {name: 'PluginSetupProcessor', address: pspAddress}, permission: 'ROOT_PERMISSION', }, @@ -54,24 +57,24 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }, { operation: Operation.Revoke, - where: {name: 'managingDAO', address: managingDAOAddress}, + where: {name: 'ManagementDAOProxy', address: managementDAOAddress}, who: {name: 'Deployer', address: deployer.address}, permission: 'ROOT_PERMISSION', }, { operation: Operation.Revoke, - where: {name: 'DAO', address: managingDAOAddress}, + where: {name: 'ManagementDAOProxy', address: managementDAOAddress}, who: {name: 'Deployer', address: deployer.address}, permission: 'SET_METADATA_PERMISSION', }, { operation: Operation.Revoke, - where: {name: 'DAO', address: managingDAOAddress}, + where: {name: 'ManagementDAOProxy', address: managementDAOAddress}, who: {name: 'Deployer', address: deployer.address}, permission: 'EXECUTE_PERMISSION', }, ]; - await managePermissions(managingDaoContract, revokePermissions); + await managePermissions(managementDaoContract, revokePermissions); // Revoke `ROOT_PERMISSION`, `MAINTAINER_PERMISSION` and `UPGRADE_REPO_PERMISSION` from `Deployer` on the permission manager of each PluginRepo. for (const repoName in hre.aragonPluginRepos) { @@ -114,9 +117,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { } console.log( - `\nManagingDao is no longer owned by the (Deployer: ${deployer.address}),` + - ` and all future actions of the (managingDAO: ${managingDAOAddress}) will be handled by the newly installed (Multisig plugin).` + `\nManagementDao is no longer owned by the (Deployer: ${deployer.address}),` + + ` and all future actions of the (managementDAO: ${managementDAOAddress}) will be handled by the newly installed (Multisig plugin).` ); }; export default func; -func.tags = ['New', 'RevokeManagingPermissionsDAO']; +func.tags = ['New', 'RevokeManagementPermissionsDAO']; diff --git a/packages/contracts/deploy/new/40_finalize-managing-dao/99_verify_step.ts b/packages/contracts/deploy/new/40_finalize-management-dao/99_verify_step.ts similarity index 60% rename from packages/contracts/deploy/new/40_finalize-managing-dao/99_verify_step.ts rename to packages/contracts/deploy/new/40_finalize-management-dao/99_verify_step.ts index ab778d6f4..d8736d77b 100644 --- a/packages/contracts/deploy/new/40_finalize-managing-dao/99_verify_step.ts +++ b/packages/contracts/deploy/new/40_finalize-management-dao/99_verify_step.ts @@ -5,61 +5,64 @@ import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log('\nVerifying managing DAO deployment.'); + console.log('\nVerifying management DAO deployment.'); const {ethers} = hre; const [deployer] = await ethers.getSigners(); - // Get `managingDAO` address. - const managingDAOAddress = await getContractAddress('DAO', hre); + // Get `ManagementDAOProxy` address. + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); // Get `DAO` contract. - const managingDaoContract = DAO__factory.connect( - managingDAOAddress, + const managementDaoContract = DAO__factory.connect( + managementDAOAddress, (await ethers.getSigners())[0] ); - // Get `DAORegistry` address. - const daoRegistryAddress = await getContractAddress('DAORegistry', hre); + // Get `DAORegistryProxy` address. + const daoRegistryAddress = await getContractAddress('DAORegistryProxy', hre); // Get `PluginSetupProcessor` address. const pspAddress = await getContractAddress('PluginSetupProcessor', hre); // Check revoked permission. - await checkPermission(managingDaoContract, { + await checkPermission(managementDaoContract, { operation: Operation.Revoke, - where: {name: 'DAORegistry', address: daoRegistryAddress}, + where: {name: 'DAORegistryProxy', address: daoRegistryAddress}, who: {name: 'Deployer', address: deployer.address}, permission: 'REGISTER_DAO_PERMISSION', }); - await checkPermission(managingDaoContract, { + await checkPermission(managementDaoContract, { operation: Operation.Revoke, where: {name: 'PluginSetupProcessor', address: pspAddress}, who: {name: 'Deployer', address: deployer.address}, permission: 'APPLY_INSTALLATION_PERMISSION', }); - await checkPermission(managingDaoContract, { + await checkPermission(managementDaoContract, { operation: Operation.Revoke, - where: {name: 'ManagingDAO', address: managingDAOAddress}, + where: {name: 'ManagementDAOProxy', address: managementDAOAddress}, who: {name: 'PluginSetupProcessor', address: pspAddress}, permission: 'ROOT_PERMISSION', }); - await checkPermission(managingDaoContract, { + await checkPermission(managementDaoContract, { operation: Operation.Revoke, - where: {name: 'ManagingDAO', address: managingDAOAddress}, + where: {name: 'ManagementDAOProxy', address: managementDAOAddress}, who: {name: 'Deployer', address: deployer.address}, permission: 'ROOT_PERMISSION', }); - await checkPermission(managingDaoContract, { + await checkPermission(managementDaoContract, { operation: Operation.Revoke, - where: {name: 'ManagingDAO', address: managingDAOAddress}, + where: {name: 'ManagementDAOProxy', address: managementDAOAddress}, who: {name: 'Deployer', address: deployer.address}, permission: 'EXECUTE_PERMISSION', }); - console.log('Finalizing Managing DAO verified'); + console.log('Finalizing Management DAO verified'); }; export default func; -func.tags = ['New', 'RegisterManagingDAO', 'InstallMultisigOnManagingDAO']; +func.tags = ['New', 'RegisterManagementDAO', 'InstallMultisigOnManagementDAO']; diff --git a/packages/contracts/deploy/update/to_v1.3.0/10_DAOFactory.ts b/packages/contracts/deploy/update/to_v1.3.0/10_DAOFactory.ts index 7e65533b6..b2245abeb 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/10_DAOFactory.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/10_DAOFactory.ts @@ -1,6 +1,6 @@ import daoFactoryArtifact from '../../../artifacts/src/framework/dao/DAOFactory.sol/DAOFactory.json'; import {DAO__factory} from '../../../typechain'; -import {getActiveContractAddress} from '../../helpers'; +import {getLatestContractAddress} from '../../helpers'; import {Operation} from '@aragon/osx-commons-sdk'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; @@ -11,17 +11,17 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deploy} = deployments; const [deployer] = await ethers.getSigners(); - const managingDAOAddress = await getActiveContractAddress('managingDAO', hre); - const pluginSetupProcessorAddress = await getActiveContractAddress( - 'PluginSetupProcessor', + const managementDAOAddress = getLatestContractAddress( + 'ManagementDAOProxy', hre ); - const daoRegistryAddress = await getActiveContractAddress('DAORegistry', hre); - const previousDAOFactoryAddress = await getActiveContractAddress( - 'DAOFactory', + const pluginSetupProcessorAddress = getLatestContractAddress( + 'PluginSetupProcessor', hre ); - console.log(`Using managingDAO ${managingDAOAddress}`); + const daoRegistryAddress = getLatestContractAddress('DAORegistryProxy', hre); + const previousDAOFactoryAddress = getLatestContractAddress('DAOFactory', hre); + console.log(`Using managementDAO ${managementDAOAddress}`); console.log(`Using PluginSetupProcessor ${pluginSetupProcessorAddress}`); console.log(`Using DAORegistry ${daoRegistryAddress}`); console.log(`Using PreviousDAOFactory ${previousDAOFactoryAddress}`); @@ -56,8 +56,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ] ); // update permissions actions - hre.managingDAOActions.push({ - to: managingDAOAddress, + hre.managementDAOActions.push({ + to: managementDAOAddress, value: 0, data: calldata, description: `Moves the REGISTER_DAO_PERMISSION_ID permission on the DAORegistry (${daoRegistryAddress}) from the old DAOFactory (${previousDAOFactoryAddress}) to the new DAOFactory (${deployResult.address}).`, diff --git a/packages/contracts/deploy/update/to_v1.3.0/20_PluginRepoFactory.ts b/packages/contracts/deploy/update/to_v1.3.0/20_PluginRepoFactory.ts index d14cc793a..d88a153e0 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/20_PluginRepoFactory.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/20_PluginRepoFactory.ts @@ -1,6 +1,6 @@ import pluginRepoFactoryArtifact from '../../../artifacts/src/framework/plugin/repo/PluginRepoFactory.sol/PluginRepoFactory.json'; import {PluginRepo__factory} from '../../../typechain'; -import {getActiveContractAddress} from '../../helpers'; +import {getLatestContractAddress} from '../../helpers'; import {Operation} from '@aragon/osx-commons-sdk'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; @@ -11,16 +11,19 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deploy} = deployments; const [deployer] = await ethers.getSigners(); - const managingDAOAddress = await getActiveContractAddress('managingDAO', hre); - const pluginRepoRegistryAddress = await getActiveContractAddress( - 'PluginRepoRegistry', + const managementDAOAddress = getLatestContractAddress( + 'ManagementDAOProxy', hre ); - const previousPluginRepoFactoryAddress = await getActiveContractAddress( + const pluginRepoRegistryAddress = getLatestContractAddress( + 'PluginRepoRegistryProxy', + hre + ); + const previousPluginRepoFactoryAddress = getLatestContractAddress( 'PluginRepoFactory', hre ); - console.log(`Using managingDAO ${managingDAOAddress}`); + console.log(`Using managementDAO ${managementDAOAddress}`); console.log(`Using PluginRepoRegistry ${pluginRepoRegistryAddress}`); console.log( `Using PreviousPluginRepoFactory ${previousPluginRepoFactoryAddress}` @@ -56,8 +59,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ] ); // update permissions actions - hre.managingDAOActions.push({ - to: managingDAOAddress, + hre.managementDAOActions.push({ + to: managementDAOAddress, value: 0, data: calldata, description: `Moves the REGISTER_PLUGIN_REPO_PERMISSION permission on the PluginRepoRegistry (${pluginRepoRegistryAddress}) from the old PluginRepoFactory (${previousPluginRepoFactoryAddress}) to the new PluginRepoFactory (${deployResult.address}).`, diff --git a/packages/contracts/deploy/update/to_v1.3.0/30_Multisig_PluginRepo.ts b/packages/contracts/deploy/update/to_v1.3.0/30_Multisig_PluginRepo.ts index fc355004b..846d1b875 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/30_Multisig_PluginRepo.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/30_Multisig_PluginRepo.ts @@ -21,7 +21,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ).pluginRepoBase(); const multisigPluginRepoAddress = await getContractAddress( - 'multisig-repo', + 'MultisigRepoProxy', hre ); const multisigPluginRepo = PluginRepo__factory.connect( @@ -36,7 +36,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { throw new Error(`Failed to populate upgradeTo transaction`); } - hre.managingDAOActions.push({ + hre.managementDAOActions.push({ to: upgradeTX.to, data: upgradeTX.data, value: 0, diff --git a/packages/contracts/deploy/update/to_v1.3.0/31_Multisig_Plugin.ts b/packages/contracts/deploy/update/to_v1.3.0/31_Multisig_Plugin.ts index e701dcfed..9dbcaabd0 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/31_Multisig_Plugin.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/31_Multisig_Plugin.ts @@ -30,7 +30,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { network.name ); - const multisigRepoAddress = await getContractAddress('multisig-repo', hre); + const multisigRepoAddress = await getContractAddress( + 'MultisigRepoProxy', + hre + ); const multisigRepo = PluginRepo__factory.connect( multisigRepoAddress, ethers.provider @@ -73,9 +76,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { } console.log( - `Deployer has no permission to create a new version. Adding managingDAO action` + `Deployer has no permission to create a new version. Adding managementDAO action` ); - hre.managingDAOActions.push({ + hre.managementDAOActions.push({ to: tx.to, data: tx.data, value: 0, diff --git a/packages/contracts/deploy/update/to_v1.3.0/40_TokenVoting_PluginRepo.ts b/packages/contracts/deploy/update/to_v1.3.0/40_TokenVoting_PluginRepo.ts index 89c3814c4..28f8e5fd6 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/40_TokenVoting_PluginRepo.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/40_TokenVoting_PluginRepo.ts @@ -21,7 +21,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ).pluginRepoBase(); const tokenVotingPluginRepoAddress = await getContractAddress( - 'token-voting-repo', + 'TokenVotingRepoProxy', hre ); const tokenVotingPluginRepo = PluginRepo__factory.connect( @@ -36,7 +36,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { throw new Error(`Failed to populate upgradeTo transaction`); } - hre.managingDAOActions.push({ + hre.managementDAOActions.push({ to: upgradeTX.to, data: upgradeTX.data, value: 0, diff --git a/packages/contracts/deploy/update/to_v1.3.0/41_TokenVoting_Plugin.ts b/packages/contracts/deploy/update/to_v1.3.0/41_TokenVoting_Plugin.ts index da4b2392d..1976d1a3f 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/41_TokenVoting_Plugin.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/41_TokenVoting_Plugin.ts @@ -65,7 +65,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ); const tokenVotingRepoAddress = await getContractAddress( - 'token-voting-repo', + 'TokenVotingRepoProxy', hre ); const tokenVotingRepo = PluginRepo__factory.connect( @@ -110,9 +110,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { } console.log( - `Deployer has no permission to create a new version. Adding managingDAO action` + `Deployer has no permission to create a new version. Adding managementDAO action` ); - hre.managingDAOActions.push({ + hre.managementDAOActions.push({ to: tx.to, data: tx.data, value: 0, diff --git a/packages/contracts/deploy/update/to_v1.3.0/50_AddresslistVoting_PluginRepo.ts b/packages/contracts/deploy/update/to_v1.3.0/50_AddresslistVoting_PluginRepo.ts index 70aa7245e..7fffc3a1a 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/50_AddresslistVoting_PluginRepo.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/50_AddresslistVoting_PluginRepo.ts @@ -21,7 +21,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ).pluginRepoBase(); const addresslistVotingPluginRepoAddress = await getContractAddress( - 'address-list-voting-repo', + 'AddresslistVotingRepoProxy', hre ); const addresslistVotingPluginRepo = PluginRepo__factory.connect( @@ -37,7 +37,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { throw new Error(`Failed to populate upgradeTo transaction`); } - hre.managingDAOActions.push({ + hre.managementDAOActions.push({ to: upgradeTX.to, data: upgradeTX.data, value: 0, diff --git a/packages/contracts/deploy/update/to_v1.3.0/51_AddresslistVoting_Plugin.ts b/packages/contracts/deploy/update/to_v1.3.0/51_AddresslistVoting_Plugin.ts index 7db3b480a..438e55f32 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/51_AddresslistVoting_Plugin.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/51_AddresslistVoting_Plugin.ts @@ -31,7 +31,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ); const addresslistVotingRepoAddress = await getContractAddress( - 'address-list-voting-repo', + 'AddresslistVotingRepoProxy', hre ); const addresslistVotingRepo = PluginRepo__factory.connect( @@ -78,9 +78,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { } console.log( - `Deployer has no permission to create a new version. Adding managingDAO action` + `Deployer has no permission to create a new version. Adding managementDAO action` ); - hre.managingDAOActions.push({ + hre.managementDAOActions.push({ to: tx.to, data: tx.data, value: 0, diff --git a/packages/contracts/deploy/update/to_v1.3.0/60_Admin_PluginRepo.ts b/packages/contracts/deploy/update/to_v1.3.0/60_Admin_PluginRepo.ts index d3872b625..d2113fc6c 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/60_Admin_PluginRepo.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/60_Admin_PluginRepo.ts @@ -20,7 +20,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { hre.ethers.provider ).pluginRepoBase(); - const adminPluginRepoAddress = await getContractAddress('admin-repo', hre); + const adminPluginRepoAddress = await getContractAddress( + 'AdminRepoProxy', + hre + ); const adminPluginRepo = PluginRepo__factory.connect( adminPluginRepoAddress, hre.ethers.provider @@ -33,7 +36,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { throw new Error(`Failed to populate upgradeTo transaction`); } - hre.managingDAOActions.push({ + hre.managementDAOActions.push({ to: upgradeTX.to, data: upgradeTX.data, value: 0, diff --git a/packages/contracts/deploy/update/to_v1.3.0/90_ManagingDAO.ts b/packages/contracts/deploy/update/to_v1.3.0/90_ManagingDAO.ts index e5eeffc87..56495e732 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/90_ManagingDAO.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/90_ManagingDAO.ts @@ -5,7 +5,7 @@ import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log('\nUpgrade the managing DAO to new Implementation'); + console.log('\nUpgrade the management DAO to new Implementation'); const daoFactoryAddress = await getContractAddress('DAOFactory', hre); const newDaoImplementation = await DAOFactory__factory.connect( @@ -13,14 +13,17 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { hre.ethers.provider ).daoBase(); - const managingDAOAddress = await getContractAddress('managingDAO', hre); - const managingDAO = DAO__factory.connect( - managingDAOAddress, + const managementDAOAddress = await getContractAddress( + 'ManagementDAOProxy', + hre + ); + const managementDAO = DAO__factory.connect( + managementDAOAddress, hre.ethers.provider ); - const upgradeTX = await managingDAO.populateTransaction.upgradeToAndCall( + const upgradeTX = await managementDAO.populateTransaction.upgradeToAndCall( newDaoImplementation, - managingDAO.interface.encodeFunctionData('initializeFrom', [ + managementDAO.interface.encodeFunctionData('initializeFrom', [ IMPLICIT_INITIAL_PROTOCOL_VERSION, [], ]) @@ -29,12 +32,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { if (!upgradeTX.to || !upgradeTX.data) { throw new Error(`Failed to populate upgradeToAndCall transaction`); } - hre.managingDAOActions.push({ + hre.managementDAOActions.push({ to: upgradeTX.to, data: upgradeTX.data, value: 0, - description: `Upgrade the management DAO (${managingDAOAddress}) to the new implementation (${newDaoImplementation}).`, + description: `Upgrade the management DAO (${managementDAOAddress}) to the new implementation (${newDaoImplementation}).`, }); }; export default func; -func.tags = ['ManagingDAO', 'v1.3.0']; +func.tags = ['ManagementDAO', 'v1.3.0']; diff --git a/packages/contracts/deploy/verification/99_conclude/00_save-contract-addresses.ts b/packages/contracts/deploy/verification/99_conclude/00_save-contract-addresses.ts index f21adaaff..1922e4492 100644 --- a/packages/contracts/deploy/verification/99_conclude/00_save-contract-addresses.ts +++ b/packages/contracts/deploy/verification/99_conclude/00_save-contract-addresses.ts @@ -13,16 +13,18 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // skip proxies because they are included twice if (!deployment.endsWith('_Proxy')) { switch (deployment) { - case 'DAO': - deployedContractAddresses['managingDAO'] = + case 'ManagementDAOProxy': + deployedContractAddresses['ManagementDAOProxy'] = deployedContracts[deployment].address; - console.log(`Managing DAO: ${deployedContracts[deployment].address}`); + console.log( + `Management DAO: ${deployedContracts[deployment].address}` + ); break; - case 'DAO_Implementation': - deployedContractAddresses['managingDAOImplementation'] = + case 'ManagementDAOProxy_Implementation': + deployedContractAddresses['ManagementDAOProxyImplementation'] = deployedContracts[deployment].address; console.log( - `Managing DAO Implementation: ${deployedContracts[deployment].address}` + `Management DAO Implementation: ${deployedContracts[deployment].address}` ); break; default: @@ -36,9 +38,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { } for (const pluginRepo in aragonPluginRepos) { - deployedContractAddresses[`${pluginRepo}-repo`] = - aragonPluginRepos[pluginRepo]; - console.log(`${pluginRepo}-repo: ${aragonPluginRepos[pluginRepo]}`); + deployedContractAddresses[pluginRepo] = aragonPluginRepos[pluginRepo]; + console.log(`${pluginRepo}: ${aragonPluginRepos[pluginRepo]}`); } await fs.writeFile( diff --git a/packages/contracts/deploy/verification/99_conclude/01_managing_dao_proposal.ts b/packages/contracts/deploy/verification/99_conclude/01_management_dao_proposal.ts similarity index 50% rename from packages/contracts/deploy/verification/99_conclude/01_managing_dao_proposal.ts rename to packages/contracts/deploy/verification/99_conclude/01_management_dao_proposal.ts index 68955a758..50fd92b5f 100644 --- a/packages/contracts/deploy/verification/99_conclude/01_managing_dao_proposal.ts +++ b/packages/contracts/deploy/verification/99_conclude/01_management_dao_proposal.ts @@ -1,12 +1,12 @@ import {Multisig__factory} from '../../../typechain'; -import {getManagingDAOMultisigAddress, uploadToIPFS} from '../../helpers'; +import {getManagementDAOMultisigAddress, uploadToIPFS} from '../../helpers'; import {writeFile} from 'fs/promises'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log('\nCreating managing DAO Proposal'); - if (hre.managingDAOActions.length === 0) { + console.log('\nCreating management DAO Proposal'); + if (hre.managementDAOActions.length === 0) { console.log('No actions defined'); return; } @@ -14,15 +14,17 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {ethers, network} = hre; const [deployer] = await ethers.getSigners(); - const managingDAOMultisigAddress = await getManagingDAOMultisigAddress(hre); - const managingDAOMultisig = Multisig__factory.connect( - managingDAOMultisigAddress, + const managementDAOMultisigAddress = await getManagementDAOMultisigAddress( + hre + ); + const managementDAOMultisig = Multisig__factory.connect( + managementDAOMultisigAddress, ethers.provider ); - const managingDAOMultisigSettings = - await managingDAOMultisig.callStatic.multisigSettings(); + const managementDAOMultisigSettings = + await managementDAOMultisig.callStatic.multisigSettings(); - const proposalDescription = hre.managingDAOActions + const proposalDescription = hre.managementDAOActions .map(action => `
  • ${action.description}
  • `) .join(''); const cid = await uploadToIPFS( @@ -35,32 +37,32 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { network.name ); - if (managingDAOMultisigSettings.onlyListed) { - if (!(await managingDAOMultisig.callStatic.isMember(deployer.address))) { + if (managementDAOMultisigSettings.onlyListed) { + if (!(await managementDAOMultisig.callStatic.isMember(deployer.address))) { console.log( - `ManagingDAOMultisig (${managingDAOMultisigAddress}) doesn't allow deployer ${deployer.address} to create proposal.` + `ManagementDAOMultisig (${managementDAOMultisigAddress}) doesn't allow deployer ${deployer.address} to create proposal.` ); - const tx = await managingDAOMultisig.populateTransaction.createProposal( + const tx = await managementDAOMultisig.populateTransaction.createProposal( ethers.utils.toUtf8Bytes(`ipfs://${cid}`), - hre.managingDAOActions, + hre.managementDAOActions, 0, true, false, 0, Math.round(Date.now() / 1000) + 30 * 24 * 60 * 60 // Lets the proposal end in 30 days ); - await writeFile('./managingDAOTX.json', JSON.stringify(tx)); - console.log('Saved transaction to managingDAOTX.json'); + await writeFile('./managementDAOTX.json', JSON.stringify(tx)); + console.log('Saved transaction to managementDAOTX.json'); } return; } console.log( - `ManagingDAOMultisig (${managingDAOMultisigAddress}) does allow deployer ${deployer.address} to create proposal.` + `ManagementDAOMultisig (${managementDAOMultisigAddress}) does allow deployer ${deployer.address} to create proposal.` ); - const tx = await managingDAOMultisig.createProposal( + const tx = await managementDAOMultisig.createProposal( ethers.utils.toUtf8Bytes(`ipfs://${cid}`), - hre.managingDAOActions, + hre.managementDAOActions, 0, true, true, @@ -70,8 +72,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Creating proposal with tx ${tx.hash}`); await tx.wait(); console.log( - `Proposal created in managingDAO Multisig ${managingDAOMultisigAddress}` + `Proposal created in managementDAO Multisig ${managementDAOMultisigAddress}` ); }; export default func; -func.tags = ['New', 'ManagingDAOProposal']; +func.tags = ['New', 'ManagementDAOProposal']; diff --git a/packages/contracts/hardhat.config.ts b/packages/contracts/hardhat.config.ts index b2cdc5fb6..3036e57fc 100644 --- a/packages/contracts/hardhat.config.ts +++ b/packages/contracts/hardhat.config.ts @@ -31,10 +31,10 @@ for (const network of Object.keys(networks)) { // Extend HardhatRuntimeEnvironment extendEnvironment((hre: HardhatRuntimeEnvironment) => { const aragonPluginRepos: AragonPluginRepos = { - 'address-list-voting': '', - 'token-voting': '', - admin: '', - multisig: '', + AddresslistVotingRepoProxy: '', + TokenVotingRepoProxy: '', + AdminRepoProxy: '', + MultisigRepoProxy: '', }; const testingFork: TestingFork = { network: '', @@ -43,8 +43,8 @@ extendEnvironment((hre: HardhatRuntimeEnvironment) => { }; hre.aragonPluginRepos = aragonPluginRepos; hre.aragonToVerifyContracts = []; - hre.managingDAOMultisigPluginAddress = ''; - hre.managingDAOActions = []; + hre.managementDAOMultisigPluginAddress = ''; + hre.managementDAOActions = []; hre.testingFork = testingFork; }); diff --git a/packages/contracts/npm/index.ts b/packages/contracts/npm/index.ts index b91c402b0..cb6dc880f 100644 --- a/packages/contracts/npm/index.ts +++ b/packages/contracts/npm/index.ts @@ -1,4 +1,3 @@ -import activeContracts from '../../../active_contracts.json'; // JSON artifacts of the contracts // core //// dao @@ -37,8 +36,6 @@ import * as MultisigSetup from '../artifacts/src/plugins/governance/multisig/Mul import * as GovernanceERC20 from '../artifacts/src/token/ERC20/governance/GovernanceERC20.sol/GovernanceERC20.json'; import * as GovernanceWrappedERC20 from '../artifacts/src/token/ERC20/governance/GovernanceWrappedERC20.sol/GovernanceWrappedERC20.json'; -export const activeContractsList = activeContracts; - export default { DAO, PermissionManager, diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 2f220ae93..f1f1b4c47 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -44,7 +44,7 @@ "@openzeppelin/contracts-upgradeable": "4.9.5" }, "devDependencies": { - "@aragon/osx-commons-configs": "^0.0.2", + "@aragon/osx-commons-configs": "^0.1.0", "@aragon/osx-commons-sdk": "0.0.1-alpha.3", "@aragon/osx-ethers-v1.2.0": "npm:@aragon/osx-ethers@1.2.0", "@aragon/osx-v1.0.1": "npm:@aragon/osx@1.0.1", diff --git a/packages/contracts/src/README.md b/packages/contracts/src/README.md index 3b4a04265..cc433e9be 100644 --- a/packages/contracts/src/README.md +++ b/packages/contracts/src/README.md @@ -22,7 +22,7 @@ Copy `.env.example` into a file called `.env` or create a new one with these 3 k # keys used for running tests HARDHAT_DAO_ENS_DOMAIN=dao.eth HARDHAT_PLUGIN_ENS_DOMAIN=plugin.eth -MANAGINGDAO_SUBDOMAIN=management +MANAGEMENT_DAO_SUBDOMAIN=management ``` Run these commands on the project's root folder in your terminal: diff --git a/packages/contracts/test/deploy/managing-dao.ts b/packages/contracts/test/deploy/managing-dao.ts index c4d39b44b..11fc15c83 100644 --- a/packages/contracts/test/deploy/managing-dao.ts +++ b/packages/contracts/test/deploy/managing-dao.ts @@ -29,14 +29,14 @@ async function deployAll() { await initializeDeploymentFixture('New'); } -describe('Managing DAO', function () { +describe('Management DAO', function () { let deployer: SignerWithAddress; let approvers: SignerWithAddress[]; let minApprovals: number; let listedOnly: boolean; - let managingDaoDeployment: Deployment; - let managingDao: DAO; + let managementDaoDeployment: Deployment; + let managementDao: DAO; let multisig: Multisig; let daoRegistryDeployment: Deployment; let daoRegistry: DAORegistry; @@ -64,20 +64,20 @@ describe('Managing DAO', function () { await deployAll(); if ( - process.env.MANAGINGDAO_MULTISIG_APPROVERS === undefined || - process.env.MANAGINGDAO_MULTISIG_MINAPPROVALS === undefined || - process.env.MANAGINGDAO_MULTISIG_LISTEDONLY === undefined + process.env.MANAGEMENT_DAO_MULTISIG_APPROVERS === undefined || + process.env.MANAGEMENT_DAO_MULTISIG_MINAPPROVALS === undefined || + process.env.MANAGEMENT_DAO_MULTISIG_LISTEDONLY === undefined ) { - throw new Error('Managing DAO Multisig settings not set in .env'); + throw new Error('Management DAO Multisig settings not set in .env'); } - listedOnly = process.env.MANAGINGDAO_MULTISIG_LISTEDONLY === 'true'; + listedOnly = process.env.MANAGEMENT_DAO_MULTISIG_LISTEDONLY === 'true'; - minApprovals = parseInt(process.env.MANAGINGDAO_MULTISIG_MINAPPROVALS); + minApprovals = parseInt(process.env.MANAGEMENT_DAO_MULTISIG_MINAPPROVALS); // Get approver addresses const approverAddresses = - process.env.MANAGINGDAO_MULTISIG_APPROVERS.split(','); + process.env.MANAGEMENT_DAO_MULTISIG_APPROVERS.split(','); // Impersonate them as signers approvers = await Promise.all( @@ -96,9 +96,12 @@ describe('Managing DAO', function () { ) ); - // ManagingDAO - managingDaoDeployment = await deployments.get('DAO'); - managingDao = DAO__factory.connect(managingDaoDeployment.address, deployer); + // ManagementDAO + managementDaoDeployment = await deployments.get('DAO'); + managementDao = DAO__factory.connect( + managementDaoDeployment.address, + deployer + ); // DAORegistry daoRegistryDeployment = await deployments.get('DAORegistry'); @@ -128,25 +131,25 @@ describe('Managing DAO', function () { pluginsRepos = { tokenVoting: PluginRepo__factory.connect( - hre.aragonPluginRepos['token-voting'], + hre.aragonPluginRepos.TokenVotingRepoProxy, deployer ), addresslistVoting: PluginRepo__factory.connect( - hre.aragonPluginRepos['address-list-voting'], + hre.aragonPluginRepos.AddresslistVotingRepoProxy, deployer ), admin: PluginRepo__factory.connect( - hre.aragonPluginRepos['admin'], + hre.aragonPluginRepos.AdminRepoProxy, deployer ), multisig: PluginRepo__factory.connect( - hre.aragonPluginRepos['multisig'], + hre.aragonPluginRepos.MultisigRepoProxy, deployer ), }; multisig = Multisig__factory.connect( - hre.managingDAOMultisigPluginAddress, + hre.managementDAOMultisigPluginAddress, deployer ); }); @@ -157,9 +160,9 @@ describe('Managing DAO', function () { it('has the `ROOT_PERMISSION_ID` permission on itself', async function () { expect( - await managingDao.hasPermission( - managingDao.address, - managingDao.address, + await managementDao.hasPermission( + managementDao.address, + managementDao.address, DAO_PERMISSIONS.ROOT_PERMISSION_ID, [] ) @@ -169,8 +172,8 @@ describe('Managing DAO', function () { describe('Associated Multisig Plugin', function () { it('has the `EXECUTE_PERMISSION_ID` permission on the DAO', async function () { expect( - await managingDao.hasPermission( - managingDao.address, + await managementDao.hasPermission( + managementDao.address, multisig.address, DAO_PERMISSIONS.EXECUTE_PERMISSION_ID, [] @@ -197,9 +200,9 @@ describe('Managing DAO', function () { describe('permissions', function () { it('has permission to upgrade itself', async function () { expect( - await managingDao.hasPermission( - managingDao.address, - managingDao.address, + await managementDao.hasPermission( + managementDao.address, + managementDao.address, DAO_PERMISSIONS.UPGRADE_DAO_PERMISSION_ID, [] ) @@ -208,9 +211,9 @@ describe('Managing DAO', function () { it('has permission to upgrade DaoRegistry', async function () { expect( - await managingDao.hasPermission( + await managementDao.hasPermission( daoRegistry.address, - managingDao.address, + managementDao.address, DAO_REGISTRY_PERMISSIONS.UPGRADE_REGISTRY_PERMISSION_ID, [] ) @@ -219,9 +222,9 @@ describe('Managing DAO', function () { it('has permission to upgrade PluginRepoRegistry', async function () { expect( - await managingDao.hasPermission( + await managementDao.hasPermission( pluginRepoRegistry.address, - managingDao.address, + managementDao.address, PLUGIN_REGISTRY_PERMISSIONS.UPGRADE_REGISTRY_PERMISSION_ID, [] ) @@ -230,9 +233,9 @@ describe('Managing DAO', function () { it('has permission to upgrade DAO_ENSSubdomainRegistrar', async function () { expect( - await managingDao.hasPermission( + await managementDao.hasPermission( ensSubdomainRegistrars.daoRegistrar.address, - managingDao.address, + managementDao.address, ENS_REGISTRAR_PERMISSIONS.UPGRADE_REGISTRAR_PERMISSION_ID, [] ) @@ -240,9 +243,9 @@ describe('Managing DAO', function () { }); it('has permission to upgrade Plugin_ENSSubdomainRegistrar', async function () { expect( - await managingDao.hasPermission( + await managementDao.hasPermission( ensSubdomainRegistrars.pluginRegistrar.address, - managingDao.address, + managementDao.address, ENS_REGISTRAR_PERMISSIONS.UPGRADE_REGISTRAR_PERMISSION_ID, [] ) @@ -254,7 +257,7 @@ describe('Managing DAO', function () { expect( await pluginsRepos.tokenVoting.isGranted( pluginsRepos.tokenVoting.address, - managingDao.address, + managementDao.address, PLUGIN_REPO_PERMISSIONS.UPGRADE_REPO_PERMISSION_ID, [] ) @@ -265,7 +268,7 @@ describe('Managing DAO', function () { expect( await pluginsRepos.tokenVoting.isGranted( pluginsRepos.tokenVoting.address, - managingDao.address, + managementDao.address, PLUGIN_REPO_PERMISSIONS.MAINTAINER_PERMISSION_ID, [] ) @@ -278,7 +281,7 @@ describe('Managing DAO', function () { expect( await pluginsRepos.addresslistVoting.isGranted( pluginsRepos.addresslistVoting.address, - managingDao.address, + managementDao.address, PLUGIN_REPO_PERMISSIONS.UPGRADE_REPO_PERMISSION_ID, [] ) @@ -288,7 +291,7 @@ describe('Managing DAO', function () { expect( await pluginsRepos.addresslistVoting.isGranted( pluginsRepos.addresslistVoting.address, - managingDao.address, + managementDao.address, PLUGIN_REPO_PERMISSIONS.MAINTAINER_PERMISSION_ID, [] ) @@ -301,7 +304,7 @@ describe('Managing DAO', function () { expect( await pluginsRepos.admin.isGranted( pluginsRepos.admin.address, - managingDao.address, + managementDao.address, PLUGIN_REPO_PERMISSIONS.UPGRADE_REPO_PERMISSION_ID, [] ) @@ -311,7 +314,7 @@ describe('Managing DAO', function () { expect( await pluginsRepos.admin.isGranted( pluginsRepos.admin.address, - managingDao.address, + managementDao.address, PLUGIN_REPO_PERMISSIONS.MAINTAINER_PERMISSION_ID, [] ) @@ -324,7 +327,7 @@ describe('Managing DAO', function () { expect( await pluginsRepos.multisig.isGranted( pluginsRepos.multisig.address, - managingDao.address, + managementDao.address, PLUGIN_REPO_PERMISSIONS.UPGRADE_REPO_PERMISSION_ID, [] ) @@ -335,7 +338,7 @@ describe('Managing DAO', function () { expect( await pluginsRepos.multisig.isGranted( pluginsRepos.multisig.address, - managingDao.address, + managementDao.address, PLUGIN_REPO_PERMISSIONS.MAINTAINER_PERMISSION_ID, [] ) diff --git a/packages/contracts/types/hardhat.d.ts b/packages/contracts/types/hardhat.d.ts index 7a0d38d67..02f91797f 100644 --- a/packages/contracts/types/hardhat.d.ts +++ b/packages/contracts/types/hardhat.d.ts @@ -35,7 +35,7 @@ declare module 'hardhat/types' { aragonToVerifyContracts: AragonVerifyEntry[]; managingDAOMultisigPluginAddress: string; placeholderBuildCIDPath: string; - managingDAOActions: { + managementDAOActions: { to: string; value: BigNumberish; data: BytesLike; diff --git a/yarn.lock b/yarn.lock index 2c9aa5f23..83554ebf9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,13 @@ # yarn lockfile v1 -"@aragon/osx-commons-configs@^0.0.2": - version "0.0.2" - resolved "https://registry.yarnpkg.com/@aragon/osx-commons-configs/-/osx-commons-configs-0.0.2.tgz#8350da88c8fb93724de875589ba51eb7caa30936" - integrity sha512-RCTig39oTekBF+M5FVLY8vKlNb8CW/RPRMpZtp5llTW1AOsPwVHj8SzmVSIHDdUAcbY1f34kLYEgJJBn7AwQrQ== +"@aragon/osx-commons-configs@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@aragon/osx-commons-configs/-/osx-commons-configs-0.1.0.tgz#21bbc5a964eb144e30033a44cc352d35c62982f9" + integrity sha512-qTs/loihwqALBGmhZngORb+p7pjuQJY5UEd8TLNiEW/BGHEpAJPp4GeQu7GSnigRGEKWpPD5W96kfEsaPtLkuQ== + dependencies: + tslib "^2.6.2" + "@aragon/osx-commons-subgraph@^0.0.3": version "0.0.3" resolved "https://registry.yarnpkg.com/@aragon/osx-commons-subgraph/-/osx-commons-subgraph-0.0.3.tgz#27abe61e3cbae2c73faa8731edb43050ce229fe4" @@ -11087,7 +11090,7 @@ tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.3.1, tslib@^2.5.0, tslib@^2.6.1: +tslib@^2.0.0, tslib@^2.3.1, tslib@^2.5.0, tslib@^2.6.1, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==