From 81c7f32a95ccf899daf6ec4dec79aff6701d0e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8r=E2=88=82=C2=A1?= Date: Tue, 9 Apr 2024 19:09:14 +0200 Subject: [PATCH] Parameterization --- .env.example | 6 ++++++ README_DEPLOYMENT.md | 1 + .../deploy/03_managing_dao/10_install_mgmt_dao_plugins.ts | 6 ++++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 439b5af..8ffebed 100644 --- a/.env.example +++ b/.env.example @@ -15,6 +15,12 @@ PLUGIN_REPO_FACTORY_ADDRESS="0xA69347F49dD618cb4577670D0728684AfAa01197" PLUGIN_SETUP_PROCESSOR_ADDRESS="0xAc7e4fB4a2f58b7EA5516f47b6f804956Faf0134" MANAGING_DAO_ADDRESS="0x617e4fB3a2358b7EA5a16f47b6f1f4956Faf0162" +# Management DAO governance plugin settings +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 + ## API keys INFURA_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" diff --git a/README_DEPLOYMENT.md b/README_DEPLOYMENT.md index 32f8c98..1b0b17d 100644 --- a/README_DEPLOYMENT.md +++ b/README_DEPLOYMENT.md @@ -77,6 +77,7 @@ Back to this repository: - Edit the `packages/contracts/plugin-setup-params.ts` to define the details of the plugins to depoy - If you try to deploy the same plugin repo twice, you will encounter an ENS collision - In such case, either define a new unique ENS subdomain or consider rerunning the step 1 and trying again +- Review the Management DAO's plugin settings under `.env` ```sh cd packages/contracts diff --git a/packages/contracts/deploy/03_managing_dao/10_install_mgmt_dao_plugins.ts b/packages/contracts/deploy/03_managing_dao/10_install_mgmt_dao_plugins.ts index 1b02e7e..471a664 100644 --- a/packages/contracts/deploy/03_managing_dao/10_install_mgmt_dao_plugins.ts +++ b/packages/contracts/deploy/03_managing_dao/10_install_mgmt_dao_plugins.ts @@ -26,6 +26,9 @@ const MGMT_DAO_MIN_PROPOSAL_PARTICIPATION = const MGMT_DAO_PROPOSAL_SUPPORT_THRESHOLD = parseInt(process.env.MGMT_DAO_PROPOSAL_SUPPORT_THRESHOLD ?? '500000') || 500_000; // 50% +const MGMT_DAO_INITIAL_EDITORS = process.env.MGMT_DAO_INITIAL_EDITORS + ? process.env.MGMT_DAO_INITIAL_EDITORS.split(',') + : ([] as string[]); // Main function const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { @@ -48,12 +51,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { supportThreshold: MGMT_DAO_PROPOSAL_SUPPORT_THRESHOLD, votingMode: 1, // Early execution }; - const initialEditors = [] as string[]; const memberAccessProposalDuration = MGMT_DAO_PROPOSAL_DURATION * 3; // Time before expired const pluginUpgrader = '0x0000000000000000000000000000000000000000'; // Only the DAO const installData = await pluginSetup.encodeInstallationParams( settings, - initialEditors, + MGMT_DAO_INITIAL_EDITORS, memberAccessProposalDuration, pluginUpgrader );