Preparing the scripts
In the repo, open the
hardhat.config.ts
file (located atmodule-integration-demo/hardhat.config.ts
) and make sure that the “pathToMigrations” points to the folder where your migration typescripts are or will be located. (migrate:{pathToMigrations: "./deploy/[yourModuleDirectoryName]",}
)Open the
constants.ts
file (located atmodule-integration-demo/deploy/[ yourModuleDirectoryName]/constants.ts
) If this file does not yet exist in the directory, copy it frommodule-integration-demo/deploy/moduleV2/constants.ts
Fill out the constants there to make your live easier:DAO_REGISTRY_ADDRESS - This is the address of your DAO which you got when creating it. It’s the address that’s displayed in the URL of your Dashboard, but you can also find it as “DAO_REGISTRY” in the DAO Contract Registry, when clicking on “Parameters” in the top right-hand corner of the DAO Dashboard.
MAIN_DAO_VOTING_ADDRESS - This is the address of the voting contract that will be used for adding the new module to the DAO Registry. You should use the “GENERAL_VOTING:DAO Token Holder” address from the DAO Registry in the Dashboard.
VOTING_CONTRACT_ADDRESS - This is the address of the voting contract used for managing the new module - It determines who can use the module.
If you want every DAO Member to use the Module, use the “GENERAL_VOTING:DAO Token Holder” address from the DAO Registry in the Dashboard.
If you only want a specific Expert Panel to control the module, use the “EXPERTS_VOTING: EP 1” address (with “EP1” to be exchanged with the name of your panel)
Attention! If you choose to manage the module through an Expert Panel, make sure that the address with which’s private key you run the script is a member of this expert panel. Otherwise, the script will fail.
MODULE_NAME - This is the Name that will be used for storing your Module in the DAO Registry. You can set any string like “YOUR_MODULE”.
MODULE_IMPLEMENTATION - This is the address of your deployed module. You will get this address after running the first migration script later in this flow.
ERC20_TOKEN - This is the address of the token the airdrop module shall airdrop. It is not needed if you do not build an airdrop module.