Giter VIP home page Giter VIP logo

simpledao's Introduction

Simple DAO solidity smart contract

A smart contract that functions as a simple decentralized autonomous organization. This is in development (i.e. not extensively tested for deploying on the Ethereum mainnet). It has been tested using Remix.


Basic schema of what the DAO does.

Basic instructions to run:

  1. Open Remix and deploy the vending machine solidity contract first and then the simpleDAO contract. You can import this repo into the Remix IDE directly or simply copy and paste the code.

  2. Solidity is a statically typed programming language and you must compile the code before deploying the smart contract.

  1. Copy and paste the address of the vending machine into the simpleDAO constructor.

  2. Specify how long members will be allowed to vote (seconds)

  3. Add in name of proposals: ["buy_cupcakes", "no_cupcakes"]

  1. Only the chairperson can give the right to vote in the DAO to other addresses.

  2. If the majority of the DAO members who voted selected "buy_cupcakes", then the DAO will send 1 ether to the digital vending machine and in return the DAO will recieve one cupcake.


How to run tests:

npm i
npx hardhat test test/SimpleDAO.test.ts

This code is essentially a conglomeration of functions of a few solidity code examples from the documentation that I liked.

simpledao's People

Contributors

partylikeits1983 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.