ross102 / Voting-Dapp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Voting-Dapp

This project demonstrates how voting works between two parties in government

It was built on the ethereum blockchain

Tools and stack Used

  • solidity
  • react
  • truffle
  • ganache
  • web3.js

Steps to run the project

  • Clone or download the repo
  • Cd into the repo
  • Run truffle compile. This should compile the code
  • In truffle-config.js file the port and network has already been set to the port of ganache
  • Run truffle migrate --compile-all --reset --network ganache . This should deploy your contract and show the details of thew deployed contract
  • Run truffle console --network ganache. This will open the ganache console. While in the console, run Voting.address . This should show the contract address
  • Configure metamask. Ensure that the network is ganache network. Use "http://127.0.0.1:7545" and 1337 as the chainId
  • Import a test account from ganache into metamask
  • Cd into the client folder and run npm install. After installation run npm start

Features

Recording the votes with Ethereum blockchain

Announcing the winner in a swift manner

Prevention of duplicate votes

Displaying of the total number of casted votes

Client side app to interact with the contract using web3

About

License:MIT License


Languages

Language:JavaScript 72.6%Language:Solidity 14.2%Language:HTML 10.2%Language:CSS 2.9%