kshitijofficial / VoteApp-Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VotingProject

This is one of the many projects available on Codedamn to reinforce your learning by building. If you want to become a Blockchain Developer and learn by practicing, feel free to attempt this challenge. Feel free to check out the codedamn Web3 Learning Path to learn more about how to become an awesome Blockchain Developer.

Description

You have to create a voting smart contract.

In this we will have two entities -

  1. Chairperson - This will deploy the smart contract.
  2. Voters - These will have the right to vote.

Chairperson's responsibilities -

  1. During the deployment of the smart contract chairperson will send the list of the proposals who want to become election candidates.Initially, all the votes for the candidates will be zero.
  2. Give the right to vote - Chairperson will decide who will vote for the election or not.
  3. Will decide the start and end time of the voting.

Voter's responsibilities -

  1. To vote for the candidates.
  2. One voter will have one vote only.

After the voting time is up. Chairperson will calculate the number of votes and announce the winner.

Some functions that you should have in your smart contract -

  1. giveRightToVote() - This will be called by the chairperson to give the authority of voting.
  2. vote() - The voters will vote using this function.
  3. winner() - This will be called by the chairperson only when the voting will end to announce the winner of the election.

Project checklist

  • Start and End time of the voting.
  • Functionality for chairperson to give right to vote.
  • Functionality to vote.
  • One person one vote.
  • Functionality to calculte the winner.
  • Functionality to return the winner of the election.

Apart from the above functions, you are free to add your own functionality which can help make this smart contract more secure and better.

We love receiving feedback! We're always looking to improve our challenges and our platform. So if you have anything you'd like to mention, please visit codedamn feedback page #� �V�o�t�e�A�p�p�-�P�r�o�j�e�c�t� � �

About


Languages

Language:Solidity 85.2%Language:JavaScript 14.8%