Contract for:
- Onboarding new Governor and Vote token preset.
- Creating new governor (a set of 4 contracts: Governor, Vote token, Timelock, Treasury)
Contains all supported governor presets
Contains all vote token presets
- Write preset in Upgradeable form. Use Upgradeable to utilize Minimal Proxy will reduce lots of gas fee for calling
createGovernor
. - Deploy preset at an address then add it into
GovernorFactory
contract. - See example scripts in
scripts/deploy_hashgraph.ts
createGovernor
requires_governorInitializeData
and_voteTokenInitializeData
. These parameters use for initializing state for new governor and vote token contract. Each preset has its own set of initialize parameter, so we use this way for the flexibility.- See example in test file
tests/GovernorFactory.test.ts
ts-node scripts/deploy_hashgraph.ts