This GitHub repository contains smart contracts written in Solidity for a decentralized governance system. The repository includes the following contracts:
GovToken.sol: This contract represents an ERC20 token with additional features for voting and permit. It allows token holders to participate in governance processes and includes functions for minting and burning tokens.
Box.sol: This contract allows the owner to store and retrieve a single unsigned integer value. It provides a simple storage mechanism with an event emitted whenever the stored number is changed.
MyGovernor.sol: This contract extends the OpenZeppelin Governor contract and adds additional functionality for voting and timelock control. It implements various extensions and interfaces from OpenZeppelin to provide a comprehensive governance solution. It integrates voting, vote counting, vote quorum, timelock control, and proposal management functionalities.
TimeLock.sol: This contract extends the OpenZeppelin TimelockController contract and adds additional functionality for specifying proposers and executors. It allows for the execution of proposals with a minimum delay and provides control over who can propose and execute proposals.
These contracts are designed to facilitate decentralized governance in a secure and transparent manner, enabling token holders to participate in decision-making processes within a blockchain ecosystem.
- git
- You'll know you did it right if you can run
git --version
and you see a response likegit version x.x.x
- You'll know you did it right if you can run
- foundry
- You'll know you did it right if you can run
forge --version
and you see a response likeforge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)
- You'll know you did it right if you can run
git clone [https://github.com/Cyfrin/foundry-dao-f23](https://github.com/ThomasHeim11/Foundry-DAO-Governance.git)
forge install
forge build
If you can't or don't want to run and install locally, you can work with this repo in Gitpod. If you do this, you can skip the clone this repo
part.
forge test
I did not write deploy scripts for this project, you can if you'd like!
You can estimate how much gas things cost by running:
forge snapshot
And you'll see and output file called .gas-snapshot
To run code formatting:
forge fmt
If you appreciated this, feel free to follow !