Skip to content

Commit

Permalink
Parameterization
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpop committed Apr 9, 2024
1 parent 50913e7 commit 81c7f32
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 1 addition & 0 deletions README_DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
);
Expand Down

0 comments on commit 81c7f32

Please sign in to comment.