ehsomma / mydao

This project implements a basic voting DAO smart contract for research purposes to understand its inner workings. This is by no means a complete implementation. It also includes an ERC-20 contract to be used as a DAO governance token.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MyDAO

.github/workflows/ci.yml Coverage Status Solhint Slither GitHub Issues License

This project implements a basic voting DAO smart contract for research purposes to understand its inner workings. This is by no means a complete implementation. It also includes an ERC-20 contract to be used as a DAO governance token.

Technical features and used tools

  • Solidity
  • Truffle
  • Ganache-cli
  • Unit/Integration tests
  • Chai (expect)
  • truffle-assertions (revert assertions)
  • openzeppelin/test-helpers (time and block manipulation)
  • eth-gas-reporter
  • solidity-coverage (code coverage)
  • coveralls (code coverage report)
  • solhint (linter for Solidity)
  • slither (vulnerability analyzer)
  • Full contract documentation (NatSpec Format)
  • Solidity coding conventions

Main functions of the DAO

  • Deposit governance tokens to be able to create a proposal.
  • Create a proposal.
  • Vote a proposal (only one time an in a time period).
  • Withdraw the tokens.

NOTE: For more information see code comments in MyDAO.sol.

Reports

Solhint

solhint 'contracts/**/*.sol' -f table

Tests

truffle test

Code coverage

truffle run coverage

Gas

truffle test --reporter eth-gas-reporter

Slither

slither --exclude-dependencies .

About

This project implements a basic voting DAO smart contract for research purposes to understand its inner workings. This is by no means a complete implementation. It also includes an ERC-20 contract to be used as a DAO governance token.

License:MIT License


Languages

Language:Solidity 100.0%