Skip to content

Latest commit

 

History

History
73 lines (59 loc) · 1.16 KB

File metadata and controls

73 lines (59 loc) · 1.16 KB

Decentralized Voting Contract

Try it out

Step 1.

git clone https://github.com/adityabhattad2021/Decentralized-Voting.git
cd Decentralized-Voting
yarn

Step 2. Create a .env folder and configure the required keys

Step 3.

  • To run tests:
hh test
  • To check coverage
hh coverage
  • Mock entire voting process (single round)
hh node
hh run scripts/mockVoting.js --network localhost

Interact with the smart contract using scripts.

Step 1.

hh node
hh run scripts/mockVoting.js --network localhost

Step 2.

  • Start new round
hh node
hh run scripts/StartNewRound.js --network localhost
  • Add Candidates
hh node
hh run scripts/addCandidates.js --network localhost
  • Add Voters
hh node
hh run scripts/addVoters.js --network localhost
  • Cast vote
hh node
hh run scripts/castVote.js --network localhost
  • Mock chainlink keepers
hh node
hh run scripts/mockOffChain.js --network localhost

goerli testnet address: 0x1E24dFa8956A4deb6CbABDe49cf7f1F4822b3902
Frontend