howellsy / example-dao

A working example of how a contract could be 100% controlled by a DAO.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ExampleDAO

A working example of how a contract Box.sol could be 100% controlled by a DAO. In this example:

⚒️ Built with Foundry

This project is built with Foundry a portable and modular toolkit for Ethereum application development, which is required to build and deploy the project.

📂 Summary of contracts

Box.sol

  • A simple storage contract that holds a single unsigned integer.

  • This contract will be 100% controlled by the DAO.

GovToken.sol

  • An ERC20 token for voting in the DAO.

MyGovernor.sol

  • A governor contract that allows token holders to vote on proposals.

Timelock.sol

  • A timelock controller contract that allows certain actions to be delayed for a specific period of time.

🏗️ Getting started

Install project dependencies

make install

Build the project

make build

🧪 Running tests

The project includes a suite of unit tests to test various aspects of the contracts' functionality including:

➡️ updating the voting power

➡️ granting and revoking roles

➡️ updating the Box contract without governance

➡️ updating the Box contract with governance

To run the tests

make test

About

A working example of how a contract could be 100% controlled by a DAO.


Languages

Language:Solidity 97.9%Language:Makefile 2.1%