This project is a Hardhat DAO boilerplate inspired by PatrickAlphaC repo with some changes. It is based on the OpenZeppelin Governance model and utilise the hardhat-deploy plugin for smart contract deployment.
This template includes the following features:
- A basic DAO contract with the ability to create proposals, vote on proposals, and execute proposals.
- The DAO contract is based on the OpenZeppelin Governance model, which includes role-based access control with different roles such as proposer, voter, and executor.
- Hardhat-deploy plugin for easy deployment of smart contracts to various Ethereum networks.
- Example tests for the DAO contract using Hardhat's built-in testing framework.
- Clone this repository to your local machine:
git clone https://github.com/gabrielstoica/hardhat-dao-template- Change directory to the cloned project:
cd hardhat-dao-template- Install dependencies:
yarn install- Update the
hardhat.config.jsfile and.envwith your deployment configurations and network settings, such asPRIVATE_KEY,INFURA_API_KEYandPOLYGONSCAN_API_KEY. - Compile the contracts:
yarn hardhat compile- Deploy the DAO contract to a testnet or mainnet using the hardhat-deploy plugin:
yarn hardhat deployContributions to this DAO template are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request.
This project is open-source and available under the MIT License. Feel free to use, modify, and distribute this template for your own DAO projects.