From 1a4ae6bc7a6de50e04120786e0cdd0ddd9b3e428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8r=E2=88=82=C2=A1?= Date: Wed, 10 Apr 2024 19:50:01 +0200 Subject: [PATCH] Updating the Deployment Readme --- README_DEPLOYMENT.md | 34 +++++++++++++------ .../deploy/99_verification/20_summary.ts | 30 +++++++--------- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/README_DEPLOYMENT.md b/README_DEPLOYMENT.md index 1b0b17d..faa5deb 100644 --- a/README_DEPLOYMENT.md +++ b/README_DEPLOYMENT.md @@ -8,7 +8,7 @@ If the current contracts are meant to be deployed on a blockchain like Mainnet, ```sh cd packages/contracts -npx hardhat deploy --network +npx hardhat deploy --network ``` ### On a custom blockchain @@ -82,11 +82,9 @@ Back to this repository: ```sh cd packages/contracts yarn build -npx hardhat deploy --network +npx hardhat deploy --network ``` -In addition to deploying the plugins, the script will internally perform two more things: - #### 3) Install a governance plugin to the Managing DAO The Managing DAO is the contract that has the role of managing certain protocol modules, like the Plugin Registry, the DAO registry, etc. In case a new OSx version is available, only that DAO is be able to push upgrades and perform certain management tasks, which makes it a key component. @@ -98,12 +96,28 @@ The Managing DAO will be created with the following permissions: Among the plugins deployed [in the step above](#2-deploy-your-plugins), one of them should be installed to the Managing DAO. -The script takes care of: +When the script from step 2 finishes, you will be prompted with a message like this: + +``` +If you wish to configure the Managing DAO: + +1) Update the .env file with this value: -1. Use the same deployment wallet as before -2. Call `prepareInstallation()` on the Plugin Setup Processor deployed during the [Deploy OSX](#1-deploy-osx) step -3. Ask the Managing DAO to `execute()` an action that calls `applyInstallation()` of the new plugin +GOVERNANCE_PLUGIN_REPO_ADDRESS="0xeC91F7Fa3BcFB208c679d2d7de18E7bd9d7cC40B" + +2) Define the following values: +MGMT_DAO_PROPOSAL_DURATION="604800" # 60 * 60 * 24 * 7 (seconds) +MGMT_DAO_MIN_PROPOSAL_PARTICIPATION="500000" # 50% +MGMT_DAO_PROPOSAL_SUPPORT_THRESHOLD="500000" # 50% +MGMT_DAO_INITIAL_EDITORS="0x1234,0x2345,0x3456,0x4567..." # Comma separated addresses + +3) Run the following command: +$ npx ts-node scripts/managing-dao-setup.ts +``` -#### 4) Revoke the EXECUTE permission granted to the deployer wallet +By running the `managing-dao-setup.ts` script, you will be: -The script calls `execute()` on the Managing DAO, with an action that calls `revoke(dao, deploymentWalletAddr, ROOT_PERMISSION_ID)` on the DAO itself +1. Asking the [PSP from OSx](#1-deploy-osx) to run `prepareInstallation()` and deploy a new Governance plugin instance +2. Ask the Managing DAO to `execute()` an action that calls `applyInstallation()` of the deployed plugin +3. Calling `execute()` on the Managing DAO so that the deployment wallet can no longer execute actions on the DAO +4. Checking that the Managing DAO's permissions are correctly configured diff --git a/packages/contracts/deploy/99_verification/20_summary.ts b/packages/contracts/deploy/99_verification/20_summary.ts index b135f38..c17950e 100644 --- a/packages/contracts/deploy/99_verification/20_summary.ts +++ b/packages/contracts/deploy/99_verification/20_summary.ts @@ -12,26 +12,22 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { if (!pluginRepoInfo) throw new Error('Could not read the address of the deployed contract'); - console.log('\nSummary'); - console.log( - 'If you wish to configure the Managing DAO, update the .env file:' - ); + console.log(` +If you wish to configure the Managing DAO: - console.log(`GOVERNANCE_PLUGIN_REPO_ADDRESS="${pluginRepoInfo.address}"`); +1) Update the .env file with this value: - console.log(''); - console.log('Also, make sure to define the following values:'); - console.log( - `MGMT_DAO_PROPOSAL_DURATION="604800" # 60 * 60 * 24 * 7 (seconds)` - ); - console.log(`MGMT_DAO_MIN_PROPOSAL_PARTICIPATION="500000" # 50%`); - console.log(`MGMT_DAO_PROPOSAL_SUPPORT_THRESHOLD="500000" # 50%`); - console.log( - `MGMT_DAO_INITIAL_EDITORS="0x1234,0x2345,0x3456,0x4567..." # Comma separated addresses` - ); +GOVERNANCE_PLUGIN_REPO_ADDRESS="${pluginRepoInfo.address}" + +2) Define the following values: +MGMT_DAO_PROPOSAL_DURATION="604800" # 60 * 60 * 24 * 7 (seconds) +MGMT_DAO_MIN_PROPOSAL_PARTICIPATION="500000" # 50% +MGMT_DAO_PROPOSAL_SUPPORT_THRESHOLD="500000" # 50% +MGMT_DAO_INITIAL_EDITORS="0x1234,0x2345,0x3456,0x4567..." # Comma separated addresses - console.log(''); - console.log('Done'); +3) Run the following command: +$ npx ts-node scripts/managing-dao-setup.ts +`); }; export default func;