Skip to content

partylikeits1983/simpleDAO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

simple proof of concept DAO smart contract

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages