OZGovernor is a comprehensive governance contract developed as an extension of OpenZeppelin by Tally developers. This contract adds advanced functionalities for voting, timelock control, and quorum implementation, providing a sophisticated governance solution for decentralized autonomous organizations (DAOs).
This repository contains tasks and scripts for the effortless deployment and testing of OZ Governance and its DAO smart contracts on Ethereum networks. Dive deeper into OZGovernor's functionalities with our extensive technical documentation, including its unique features and deployment instructions.
- Enhanced Voting Mechanics: Detailed explanation of the voting process, including token-based voting and proposal lifecycle.
- Timelock Management: Insights into the timelock mechanism and how it adds a layer of security and transparency.
- Quorum Requirements: Description of quorum functionalities, ensuring democratic and fair governance.
OZGovernor integrates various extensions from OpenZeppelin for robust governance features, including:
- OZGovernor: Main governance contract for proposal management.
- ERC20Token: Token used for voting, empowering token holders with governance rights.
- TimelockController: Implements a delay mechanism for operational security.
For comprehensive contract details, visit our documentation.
Interested in premium DAO solutions? Check out Tally's premium features.
- Set up the environment using the instructions in installation.
- Customize
deploy.config.ts
for your DAO. - Deploy contracts as detailed in deploy method.
- Validate your contract as per validation guidelines.
- Mint and distribute tokens to DAO members.
- Remove minting permissions post-distribution.
- Add your DAO to Tally using this link.
git clone https://github.com/withtally/gov-deployer.git
cd gov-deployer
pnpm install
cp .env.example .env
# Configure .env as needed (e.g., node RPCs)
# You can also set all the values
# npx hardhat vars set INFURA_API_KEY
pnpm clean
pnpm test
npx hardhat compile
- Node.js and PNPM
- Git
Configure deployment parameters in deploy.config.ts
.
# Define network from the names in hardhat.config.ts
pnpm deployc --network sepolia
# For local testing as a dry run, do not specify the network
pnpm deployc
Post-deployment, use the output commands for contract validation. Ensure Etherscan API KEY is in .env
.
Example output:
quorum numerator: 30
vote extension: 7200
deploying "OZGovernor" (tx: 0xc364cf1527fd3fb9d04cc2b53ec1099bd9f77dc745d6932060a06b4fdb2f98f9)...: deployed at 0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9 with 4800366 gas
OZ Governor contract: 0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9
npx hardhat verify --network hardhat 0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9 "EXAMPLE GROUP" 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 7200 50400 0 30 7200
Run the tests using:
pnpm test
Use of OZGovernor is at your own risk. Tally is not liable for any damages or losses. Intended for testing and reference only.
We welcome contributions! Refer to our contributing guidelines for details.
Stay updated with changes and improvements in our changelog.
Find answers to common questions in our FAQ section.
Explore governance workflows through diagrams in our visual guide.
The whole repo and it's contracts are released under MIT license.
For details, see LICENSE.