Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(contracts): replaces active_contracts.json with @aragon/osx-comons-configs #523

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/contract-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ yarn-error.log*
# deployments
deployments
deployed_contracts.json
managingDAOTX.json
managementDAOTX.json

# generated
generated
Expand Down
26 changes: 13 additions & 13 deletions DEPLOYMENT_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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`
Expand All @@ -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`
Expand Down
29 changes: 1 addition & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
24 changes: 12 additions & 12 deletions UPDATE_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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'
Expand Down
Loading
Loading