Blockchain can be used in developing many real life application that can solve the issue of trustability. Voting system is one of them. We all know a fair Voting System is an important part on a Democratic Country. Hence in this project we have tried to implement a simple voting solution using Blockchain technology.
- Npm and node should be installed
- truffle
- Metamask extension in the browser
- Clone the repo
- cd Voting-dapp/contract-folder
- Install dependencies:
npm install
- Run truffle in a terminal:
truffle develop
- Compile the code:
compile
- Migrate the code:
migrate --reset
- Copy and paste the json file generated after migrating the contract in the src directory.
- Install dependencies:
npm install
- Make sure truffle is running in a terminal. If not then run truffle with the command:
truffle develop
- Open metamask and create accounts for voters and candidates
- Run the react app:
npm start
Refer to this video for deploying smart contract on testnet: https://youtu.be/L1L050u7j2M
You can open and paste the code in Remix and test all the functions.