https://github.com/pehovorka/dao-prototype
A prototype implementation of a Decentralized Autonomous Organization (DAO) on the Ethereum blockchain.
https://github.com/pehovorka/dao-prototype
dao dapp ethereum governance hardhat nextjs smart-contracts web3
Last synced: about 2 months ago
JSON representation
A prototype implementation of a Decentralized Autonomous Organization (DAO) on the Ethereum blockchain.
- Host: GitHub
- URL: https://github.com/pehovorka/dao-prototype
- Owner: pehovorka
- License: mit
- Created: 2023-02-17T21:57:28.000Z (over 2 years ago)
- Default Branch: development
- Last Pushed: 2023-06-28T10:38:27.000Z (almost 2 years ago)
- Last Synced: 2025-02-12T09:49:17.975Z (4 months ago)
- Topics: dao, dapp, ethereum, governance, hardhat, nextjs, smart-contracts, web3
- Language: TypeScript
- Homepage: https://dao-prototype.petrhovorka.com
- Size: 1.3 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A prototype implementation of a Decentralized Autonomous Organization (DAO) on the Ethereum blockchain.
This monorepo consists of two workspaces:
- `contracts` – smart contracts built on top of [OpenZeppelin governance](https://docs.openzeppelin.com/contracts/4.x/api/governance) in Hardhat development environment
- `web` – Next.js website interacting with deployed smart contractsThis project is part of the author's master's thesis. Deployed demo can be found [here](https://dao-prototype.petrhovorka.com/).
## Running the project locally
Before you start, please install all the dependencies by running `yarn` command.
First, you need to deploy the smart contracts to the blockchain. This project is set up to work with [Alechemy](https://www.alchemy.com/) out of the box. Please create `.env` file in the `contracts` directory and provide your Alchemy API key in the `ALCHEMY_API_KEY` variable. In the variable named `OWNER_ACCOUNT_PRIVATE_KEY`, please provide the private key of the account you want to use as the owner of the deployed contracts. You can use provided `.env.example` file for reference. Then, run the following command to deploy the contracts to the Sepolia testnet:
```
yarn workspace contracts hardhat run scripts/deploy.ts --network sepolia
```After successful deployment, the output of the script should contain the addresses of all the deployed contracts. Please insert these addresses in the `.env.local` file in the `web` directory. Please use the variable names provided in the `.env.local.example` file. Once done, you can start the development server of the web app by executing this command:
```
yarn start
```🎉 That's all! The web app connected to your freshly deployed smart contracts should be available at [http://localhost:3000](http://localhost:3000).