Skip to content

This is a decentralized voting system DApp built with Solidity, HTML, CSS, and JavaScript. It displays registered candidates, allows users to vote for their preferred candidate, and shows the leading candidate based on the votes received. (Frontend sucks, still working on it!)

License

Notifications You must be signed in to change notification settings

sidrahh12/Voting-System-DApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Voting System DApp

Description: This Solidity dApp enables users to participate in a decentralized voting system, ensuring transparency and immutability of the voting process. It allows users to register and vote for their preferred candidates in a secure and transparent manner. The system displays registered candidates and the leading candidate based on the votes received. It's built on the Ethereum blockchain. This project is a decentralized application built with Solidity, HTML, CSS, and JavaScript.

Smart Contract

Main Contract: VotingSystem.sol

Features:

  • Register new candidates.
  • Cast votes for a candidate.
  • Retrieve information about registered candidates.
  • Check the leading candidate.

Installation

Steps:

  1. Clone the repository to your local machine: git clone <https://github.com/sidrahh12/Voting-System-DApp>

  2. Navigate to the project directory: cd <project-directory>

  3. Install the required dependencies: npm install

  4. Compile the smart contract: npx hardhat compile

  5. Deploy the smart contract to your chosen Ethereum network. You'll need to set up a secrets.json file with your Ethereum wallet private key and network URL. npx hardhat run scripts/deploy.js --network <network-name> Replace with your desired Ethereum network (e.g., rinkeby, mainnet, or localhost for local development).

  6. Start the dApp locally: npm start

The dApp should be accessible at http://localhost:3000.

Usage

Steps:

  1. Connect your Ethereum wallet (e.g., MetaMask) to the dApp.
  2. Register a new candidate by providing the necessary details.
  3. Vote for a candidate by selecting them.
  4. View all registered candidates.
  5. Check the leading candidate.

License

This project is licensed under the MIT License.

About

This is a decentralized voting system DApp built with Solidity, HTML, CSS, and JavaScript. It displays registered candidates, allows users to vote for their preferred candidate, and shows the leading candidate based on the votes received. (Frontend sucks, still working on it!)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published