Skip to content

Commit

Permalink
Independent Managing DAO config script
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpop committed Apr 10, 2024
1 parent 3963eba commit 3a62da6
Show file tree
Hide file tree
Showing 8 changed files with 432 additions and 258 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ PLUGIN_SETUP_PROCESSOR_ADDRESS="0xAc7e4fB4a2f58b7EA5516f47b6f804956Faf0134"
MANAGING_DAO_ADDRESS="0x617e4fB3a2358b7EA5a16f47b6f1f4956Faf0162"

# Management DAO governance plugin settings
GOVERNANCE_PLUGIN_REPO_ADDRESS="0xf956Fa58b7EB3a2347b6f1f4f0A5a16f162617e4"
MGMT_DAO_PROPOSAL_DURATION="604800" # 60 * 60 * 24 * 7 seconds
MGMT_DAO_MIN_PROPOSAL_PARTICIPATION="500000" # 50%
MGMT_DAO_PROPOSAL_SUPPORT_THRESHOLD="500000" # 50%
Expand Down

This file was deleted.

This file was deleted.

36 changes: 0 additions & 36 deletions packages/contracts/deploy/99_verification/20_mgmt_dao_plugin.ts

This file was deleted.

42 changes: 42 additions & 0 deletions packages/contracts/deploy/99_verification/20_summary.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import {GovernancePluginsSetupParams} from '../../plugin-setup-params';
import {isLocalChain} from '../../utils/hardhat';
import {getPluginRepoInfo} from '../../utils/plugin-repo-info';
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const pluginRepoInfo = getPluginRepoInfo(
GovernancePluginsSetupParams.PLUGIN_REPO_ENS_NAME,
hre.network.name
);
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(`GOVERNANCE_PLUGIN_REPO_ADDRESS="${pluginRepoInfo.address}"`);

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`
);

console.log('');
console.log('Done');
};

export default func;

func.tags = ['Verification'];
func.runAtTheEnd = true;
func.skip = (hre: HardhatRuntimeEnvironment) =>
Promise.resolve(isLocalChain(hre.network.name));
34 changes: 0 additions & 34 deletions packages/contracts/deploy/99_verification/21_mgmt_dao_root.ts

This file was deleted.

12 changes: 10 additions & 2 deletions packages/contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ for (const network in networks) {

// Extend HardhatRuntimeEnvironment
extendEnvironment((hre: HardhatRuntimeEnvironment) => {
hre.aragonToVerifyContracts = [];
hre.managingDao = {
(hre as any).aragonToVerifyContracts = [];
(hre as any).managingDao = {
address: '',
governancePlugin: '',
};
Expand All @@ -110,6 +110,14 @@ const config: HardhatUserConfig = {
browserURL: 'https://goerli.basescan.org',
},
},
{
network: 'custom',
chainId: networks.custom.chainId!,
urls: {
apiURL: apiUrls.custom,
browserURL: '',
},
},
],
},
mocha: {
Expand Down
Loading

0 comments on commit 3a62da6

Please sign in to comment.