Blockchain

Voting on Blockchain Part #2 – with DApp

Voting on Blockchain Part #2 – with DApp

this tutorial will show you how to do simple voting using Blockchain with DApp (Distributed Application)

steps:
1. Watch previous video

Voting on Blockchain Part #1 – Simple Private Blockchain Environment with Ganache, Metamask & Remix

2. Open Ganache. Set Server – Host Name – 127.0.0.1. Set Server – Port Number – 8545
3. Open Metamask. Connect to Localhost 8545. Create 4 MetaMask accounts (by importing Private Key. Get the private keys from Ganache):
– Admin – manages the ballot
– Alice – voter
– Bob – voter
– Carol – voter
4. Copy and paste Ballot.sol ( to remix.ethereum.org. Don’t forget to switch to Admin Metamask. Compile. Set the environment to Injected Web3
5. Go to the Ballot Manager here: As Admin in MetaMask, fill in the Ballot Official Name and the Proposal. Click “Go”
6. As Admin, add the voters: Alice, Bob and Carol by adding their wallet address and name
7. As Admin, start the vote by pressing “Start Voting”
8. Let each voter votes from here (don’t forget to switch MetaMask Account for each voter). Enter the Ballot Address
9. Switch back to Ballot Manager as Admin and check the status of the voters
10. As Admin, end the vote and get the results

Now you can see that DApp gives a very user friendly interface for the voting 🙂 We’re going to do more voting and DApp on the next tutorial 🙂

References:

thanks for watching, don’t forget to subscribe, activate the notification bell, like this video and also share it to support this channel to be able to continuously creates useful tutorials 🙂

leave us some comments if there is any questions and let us know what you think 🙂

also visit our website:

and blog:

and follow us on Instagram:

Twitter:

Facebook:

Share via