Skip to content

JediFaust/JeDAO

Repository files navigation

JeDAO smart contract with votes

Language License


Solidity Smart contract for DAO voting


📝 Table of Contents

🚀 Link on EtherScan

JeDAO on Etherscan:
https://rinkeby.etherscan.io/address/0x4C978293CD41816CDD1C29EEA1912eFfcbDB2902#code

🚀 Installing

  • Set validator address on scripts/deploy.ts file
  • Deploy four contracts running on console:
node scripts/deploy.ts
  • Copy address of deployed contract and paste to .env file as CONTRACT_ADDRESS_DAO
  • Use deposit, add-proposal, vote and finish functions

⛓️ Contract Functions

  • addProposal()

Add new proposal
Only chairman can call

  • deposit()

Deposit tokens to vote

  • vote()

Actual voting with id of proposal and votes amount with for or against

  • finishProposal()

Finish proposal with current ID

  • withdraw()

Withdraw deposited tokens with given amount

🎈 Deploy & Test Scripts

node scripts/deploy.js
npx hardhat test  --network hardhat

💡 HardHat Tasks

npx hardhat deposit --amount
npx hardhat add-proposal --calldata --recipient --description 
npx hardhat vote --id --amount --for
npx hardhat finish --id

About

DAO Voting Smart Contract

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published