{"id":19498070,"url":"https://github.com/patrickalphac/hardhat-dao-fcc","last_synced_at":"2025-04-25T22:32:58.889Z","repository":{"id":37083143,"uuid":"466295566","full_name":"PatrickAlphaC/hardhat-dao-fcc","owner":"PatrickAlphaC","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-17T02:59:57.000Z","size":207,"stargazers_count":14,"open_issues_count":0,"forks_count":22,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-17T03:44:45.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PatrickAlphaC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-04T23:11:20.000Z","updated_at":"2024-05-17T03:00:01.000Z","dependencies_parsed_at":"2024-05-17T03:43:17.851Z","dependency_job_id":"7efead5c-6df5-4b98-a34d-ce8440668f22","html_url":"https://github.com/PatrickAlphaC/hardhat-dao-fcc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickAlphaC%2Fhardhat-dao-fcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickAlphaC%2Fhardhat-dao-fcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickAlphaC%2Fhardhat-dao-fcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickAlphaC%2Fhardhat-dao-fcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PatrickAlphaC","download_url":"https://codeload.github.com/PatrickAlphaC/hardhat-dao-fcc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224019638,"owners_count":17242176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T21:49:06.965Z","updated_at":"2024-11-10T21:49:07.753Z","avatar_url":"https://github.com/PatrickAlphaC.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DAO Template\n\n*This has been updated to work with Sepolia over Goerli*\n\n\u003e Need The Javascript Version? Grab it here -\u003e [Dao in Javascript Repo](https://github.com/RohitKS7/hardhat-dao-fcc)\n\n\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\n- [DAO Template](#dao-template)\n  - [About](#about)\n    - [How to DAO](#how-to-dao)\n    - [No Code Tools](#no-code-tools)\n- [Getting Started](#getting-started)\n  - [Requirements](#requirements)\n    - [Installation](#installation)\n    - [Optional Gitpod](#optional-gitpod)\n  - [Usage](#usage)\n    - [On-Chain Governance Example](#on-chain-governance-example)\n    - [Off-Chain governance Example](#off-chain-governance-example)\n  - [Roadmap](#roadmap)\n  - [Contributing](#contributing)\n  - [License](#license)\n  - [Contact](#contact)\n  - [Acknowledgments](#acknowledgments)\n\n[You can also see the python/brownie version of this here.](https://github.com/brownie-mix/dao-mix)\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About\n\n### How to DAO\n\nThis repo is meant to give you all the knowledge you need to start a DAO and do governance. Since what's the point of a DAO if you can't make any decisions! There are 2 main kinds of doing governance.\n\n| Feature    | On-Chain Governance | Hybrid Governance             |\n| ---------- | ------------------- | ----------------------------- |\n| Gas Costs  | More Expensive      | Cheaper                       |\n| Components | Just the blockchain | An oracle or trusted multisig |\n\nA typical on-chain governance structure might look like: \n- ERC20 based voting happens on a project like [Tally](https://www.withtally.com/), but could hypothetically be done by users manually calling the vote functions. \n- Anyone can execute a proposal once it has passed\n_Examples [Compound](https://compound.finance/governance)_\n\nOn-chain governance can be much more expensive, but involves fewer parts, and the tooling is still being developed. \n\nA typical hybrid governance with an oracle might look like:\n- ERC20 based voting happens on a project like [Snapshot](https://snapshot.org/#/)\n- An oracle like [Chainlink](https://chain.link/) is used to retreive and execute the answers in a decentralized manner. (hint hint, someone should build this. )\n\nA typical hybrid governance with a trusted multisig might looks like:\n- ERC20 based voting happens on a project like [Snapshot](https://snapshot.org/#/)\n- A trusted [gnosis multisig](https://gnosis-safe.io/) is used to exectue the results of snapshot.\n_Examples: [Snapsafe](https://blog.gnosis.pm/introducing-safesnap-the-first-in-a-decentralized-governance-tool-suite-for-the-gnosis-safe-ea67eb95c34f)_\n\nHybrid governance is much cheaper, just as secure, but the tooling is still being developed. \n\nTools:\n- [Snapshot](https://snapshot.org/#/)\n  - UI for off-chain voting / sentiment analysis\n- [Tally](https://www.withtally.com/)\n  - UI for on-chain voting\n- [Gnosis Safe](https://gnosis-safe.io/)\n  - Multi-sig\n- [Openzeppelin](https://docs.openzeppelin.com/contracts/4.x/api/governance)\n  - DAO code tools\n- [Zodiac](https://github.com/gnosis/zodiac)\n  - More DAO code tools\n- [Openzeppelin Defender](https://openzeppelin.com/defender/)\n  - A tool to propose governance and other contract functions. \n\n\n### No Code Tools\n\nThe following have tools to help you start a DAO without having to deploy contracts yourself.\n\n- [DAO Stack](https://alchemy.daostack.io/daos/create)\n- [Aragon](https://www.youtube.com/watch?v=VIyG-PYJv9E)\n  - lol, just kidding. [Here is the real link.](https://aragon.org/)\n- [Colony](https://colony.io/)\n- [DAOHaus](https://app.daohaus.club/summon)\n- [DAO Leaderboard](https://deepdao.io/#/deepdao/dashboard)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- GETTING STARTED --\u003e\n# Getting Started \n\nIt's recommended that you've gone through the [hardhat getting started documentation](https://hardhat.org/getting-started/) before proceeding here. \n\n## Requirements\n\n- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n  - You'll know you did it right if you can run `git --version` and you see a response like `git version x.x.x`\n- [Nodejs](https://nodejs.org/en/)\n  - You'll know you've installed nodejs right if you can run:\n    - `node --version`and get an ouput like: `vx.x.x`\n- [Yarn](https://classic.yarnpkg.com/lang/en/docs/install/) instead of `npm`\n  - You'll know you've installed yarn right if you can run:\n    - `yarn --version` And get an output like: `x.x.x`\n    - You might need to install it with npm\n\n### Installation\n\n1. Clone this repo:\n```\ngit clone https://github.com/PatrickAlphaC/dao-template\ncd dao-template\n```\n2. Install dependencies\n```sh\nyarn\n```\n\nor \n\n```\nnpm i \n```\n\n3. Run the test suite (which also has all the functionality)\n\n```\nyarn hardhat test\n```\nor\n```\nnpx hardhat test\n```\n\nIf you want to deploy to a testnet:\n4. Add a `.env` file with the same contents of `.env.example`, but replaced with your variables.\n![WARNING](https://via.placeholder.com/15/f03c15/000000?text=+) **WARNING** ![WARNING](https://via.placeholder.com/15/f03c15/000000?text=+)\n\u003e DO NOT PUSH YOUR PRIVATE_KEY TO GITHUB\n\n\n### Optional Gitpod\n\nIf 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.\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#github.com/PatrickAlphaC/hardhat-dao-fcc)\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n### On-Chain Governance Example\n\nHere is the rundown of what the test suite does. \n\n1. We will deploy an ERC20 token that we will use to govern our DAO.\n2. We will deploy a Timelock contract that we will use to give a buffer between executing proposals.\n   1. Note: **The timelock is the contract that will handle all the money, ownerships, etc**\n3. We will deploy our Governence contract \n   1. Note: **The Governance contract is in charge of proposals and such, but the Timelock executes!**\n4. We will deploy a simple Box contract, which will be owned by our governance process! (aka, our timelock contract).\n5. We will propose a new value to be added to our Box contract.\n6. We will then vote on that proposal.\n7. We will then queue the proposal to be executed.\n8. Then, we will execute it!\n\n\nAdditionally, you can do it all manually on your own local network like so:\n\n1. Setup local blockchain \n```\nyarn hardhat node\n```\n\n2. Propose a new value to be added to our Box contract\n\nIn a second terminal (leave your blockchain running)\n```\nyarn hardhat run scripts/propose.ts --network localhost\n```\n\n3. Vote on that proposal\n\n```\nyarn hardhat run scripts/vote.ts --network localhost\n```\n\n4. Queue \u0026 Execute proposal!\n\n```\nyarn hardhat run scripts/queue-and-execute.ts --network localhost\n```\n\n\nYou can also use the [Openzeppelin contract wizard](https://wizard.openzeppelin.com/#governor) to get other contracts to work with variations of this governance contract. \n\n### Off-Chain governance Example\n\n\u003e This sectoin is still being developed. \n\nDeploy your ERC20 and [make proposals in snapshot](https://docs.snapshot.org/proposals/create). \n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n\n- [] Add Upgradeability examples with the UUPS proxy pattern\n- [] Add Chainlink Oracle Integration with Snapsafe example\n\nSee the [open issues](https://github.com/PatrickAlphaC/dao-template/issues) for a full list of proposed features (and known issues).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nHardhat - [@HardhatHQ](https://twitter.com/HardhatHQ)\nPatrick Collins - [@patrickalphac](https://twitter.com/patrickalphac)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- ACKNOWLEDGMENTS --\u003e\n## Acknowledgments\n\n* [Openzeppelin Governance Walkthrough](https://docs.openzeppelin.com/contracts/4.x/governance)\n* [Openzeppelin Governance Github](https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/governance)\n* [Vitalik on DAOs](https://blog.ethereum.org/2014/05/06/daos-dacs-das-and-more-an-incomplete-terminology-guide/)\n* [Vitalik on On-Chain Governance](https://vitalik.ca/general/2021/08/16/voting3.html)\n* [Vitalik on Governance in General](https://vitalik.ca/general/2017/12/17/voting.html)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\nYou can check out the [openzeppelin javascript tests](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/e6f26b46fc8015f1b9b09bb85297464069302125/test/governance/extensions/GovernorTimelockControl.test) for a full suite of an example of what is possible. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickalphac%2Fhardhat-dao-fcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickalphac%2Fhardhat-dao-fcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickalphac%2Fhardhat-dao-fcc/lists"}