Skip to content

A decentralized ballot Dapp developed using Truffle. Uses modified version of Browser solidity Ballot contract

Notifications You must be signed in to change notification settings

hiteshjoshi1/truffle-ballot

Repository files navigation

Decentralized Ballot WebApp

  1. I have used the Ballot contract that comes with Browser Solidity
  2. Modified the Ballot contract to make it more user friendly. The Ballot Proposals are now Strings
  3. This repo is loosely based on Mahesh Murty tutorial on Medium. Link - https://medium.com/@mvmurthy/full-stack-hello-world-voting-ethereum-dapp-tutorial-part-2-30b3d335aa1f
  4. I have used a private Blockchain and my code takes care of fund transfer, unlocking the accounts etc.

Steps:-

  1. Before truffle migrate unlock your coinbase

truffle console web.personal.unlockAccount(web3.eth.coinbase,'password',15000);

Deploy the app using- truffle migrate

  1. Once the Ballot.json is generated. You can use npm run dev

to start the App

  1. Hit the App with http://localhost:8080

  2. Initially the vote count is zero

  3. Generate some accounts in geth/truffle console personal.newAccount(); password : test

  1. Use your coinbase address as your Ballot Chairman Address, Coinbase Pwd as chairman password and address generated in Step 5 as Voter address.Give Address the right to Voter

  2. Once the address has right to Vote in Blockchain, they can vote for one of the three proposals. Once they Vote and it becomes part of blockchain, Vote count is updated.

About

A decentralized ballot Dapp developed using Truffle. Uses modified version of Browser solidity Ballot contract

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published