solidity-governor
Generate a customizable Solidity governance contract for DAOs, including voting delay, period, quorum, and timelock options.
Instructions
Make a contract to implement governance, such as for a DAO.
Returns the source code of the generated contract, formatted in a Markdown code block. Does not write to disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the contract | |
| delay | Yes | The delay since proposal is created until voting starts, default is "1 day" | |
| period | Yes | The length of period during which people can cast their vote, default is "1 week" | |
| votes | No | The type of voting to use | |
| clockMode | No | The clock mode used by the voting token. For Governor, this must be chosen to match what the ERC20 or ERC721 voting token uses. | |
| timelock | No | The type of timelock to use | |
| blockTime | No | The block time of the chain in seconds, default is 12 | |
| decimals | No | The number of decimals to use for the contract, default is 18 for ERC20Votes and 0 for ERC721Votes (because it does not apply to ERC721Votes) | |
| proposalThreshold | No | Minimum number of votes an account must have to create a proposal, default is 0. | |
| quorumMode | No | The type of quorum mode to use | |
| quorumPercent | No | The percent required, in cases of quorumMode equals percent | |
| quorumAbsolute | No | The absolute quorum required, in cases of quorumMode equals absolute | |
| storage | No | Enable storage of proposal details and enumerability of proposals | |
| settings | No | Allow governance to update voting settings (delay, period, proposal threshold) | |
| upgradeable | No | Whether the smart contract is upgradeable. Transparent uses more complex proxy with higher overhead, requires less changes in your contract. Can also be used with beacons. UUPS uses simpler proxy with less overhead, requires including extra code in your contract. Allows flexibility for authorizing upgrades. | |
| info | No | Metadata about the contract and author |