Giter Club home page Giter Club logo

foundry-dao's Introduction

Foundry DAO Governance

This is a section of the Cyfrin Foundry Solidity Course.

⭐️ (6:05:45) | Lesson 14 | DAOs & Governance

This is a Solidity-based DAO implementation using OpenZeppelin.

Many tools and solutions exist to build a DAO (Tally, Snapshot, Aragon...). While it's possible to build a DAO from scratch, leveraging well-known solutions like OpenZeppelin can offer several advantages:

  • Security: Established solutions have been thoroughly tested and audited, reducing the risk of vulnerabilities.
  • Community Support: Using popular tools means access to a wider community for help, resources, and collaboration.
  • Time Efficiency: Building on top of existing frameworks can significantly reduce development time and effort.

In this repository, we delve into the creation of a Decentralized Autonomous Organization (DAO) by using OpenZeppelin's smart contract libraries. Through the implementation of a simple test using Foundry, we aim to demonstrate the seamless deployment and execution of a proposal, showcasing the practical application of decentralized governance principles.

Please note: ERC20 based voting is not always recommended, we should explore other forms of governance like reputation based or "skin-in-the-game" based. An article on money-based voting being bad.

Getting Started

Requirements

  • git
    • You'll know you did it right if you can run git --version and you see a response like git version x.x.x
  • foundry
    • You'll know you did it right if you can run forge --version and you see a response like forge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)

Quickstart

git clone https://github.com/ibourn/foundry-dao
cd foundry-dao
forge install
forge build

Usage

Test

forge test

Deploy

No deployment script for this project, we focus on the implementation of contracts and we have just a test to demonstrate the end-to-end use of the DAO with the life cycle of a proposal from submission to execution.

Estimate gas

You can estimate how much gas things cost by running:

forge snapshot

And you'll see and output file called .gas-snapshot

Formatting

To run code formatting:

forge fmt

foundry-dao's People

Contributors

ibourn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.