This repository contains the smart contracts for the HabitatDAO, planned to be deployed on Optimism. Contract structure is based on EIP2535.
The core of HabitatDAO is a management system contains 5 modules(Module manager, Governance, Treasury, SubDAO creation and Launchpad modules) and 2 decision systems(Voting Power ERC20 and Signers) to make onchain/offchain decisions around modules.
Contracts are still under development.
yarn
yarn build
As a focused chain to deploy is Optimism, Optimism fork is used for tests, what requires to provide Alchemy token (.env).
Deployment is divided on two parts: environment contracts (facets, init contracts, deployers and etc.) and dao contract.
To optimize development process environment contracts are deployed one time (happens after running tests as well), what is fixed into scripts/deployed.json.
In order to run tests multiple times, the redeploy flag in scripts/deployed.json file must be set to true.
yarn test
in first terminal:
yarn start:node
in second terminal:
yarn test:node
If node is rerun, the redeploy flag in the scripts/deployed.json file must be set to true.
File initParams.json contains a DAO initial configuration parameters.
Currently, the deployment is chain specific (Optimism) and as contracts are not production ready, the deployment is allowed only locally to optimism fork.
in separate terminal:
yarn start:node
then in main terminal:
yarn deployDAO
More info about Gemcutter https://0xhabitat.org/docs/Developers/Gemcutter/
yarn start:node
Currently, Gemcutter deployment is outdated.
yarn diamond:init