Live Demo: https://eden-m16.github.io/voting-system/voting-app.html
- Overview
- New Features
- Features
- Smart Contract
- Quick Start
- Usage Guide
- Admin Guide
- Deployment
- License
VoteChain is an advanced decentralized voting application with weighted voting, voter registration, and full admin controls. Every vote is permanently recorded on the Ethereum blockchain.
What's New in v2.0:
- ✅ Weighted Voting - Different voters can have different vote weights
- ✅ Voter Registration - Only registered voters can participate
- ✅ Election Controls - Pause, unpause, extend, or end elections
- ✅ Candidate Descriptions - Add detailed info for each candidate
- ✅ Winner Announcement - Automatic winner calculation
| Feature | Description |
|---|---|
| Weighted Voting | Give different weights to voters (e.g., 1 vote, 2 votes, 5 votes) |
| Voter Registration | Admin registers voters before election starts |
| Pause Election | Temporarily stop voting in case of issues |
| Extend Election | Add more time to an active election |
| Candidate Descriptions | Each candidate can have a description/party/platform |
| Registration Check | Voters see if they're registered |
| Winner Display | Automatic winner calculation after election ends |
Contract Address: 0x230c92eAFf052d656f245d99C42B39D696AC84d2
Network: Sepolia Testnet
Compiler: v0.8.30
| Function | Who | Description |
|---|---|---|
createElection() |
Admin | Create election with candidates and descriptions |
registerVoters() |
Admin | Register voters with weights |
vote() |
Registered Voter | Cast vote (counts with weight) |
pauseElection() |
Admin | Temporarily pause voting |
unpauseElection() |
Admin | Resume voting |
extendElection() |
Admin | Add more time |
endElection() |
Admin | End election early |
getElectionWinner() |
Anyone | Get winner after election ends |
Download from metamask.io
Network: Sepolia Testnet RPC URL: https://rpc.sepolia.org Chain ID: 11155111
Visit Sepolia Faucet
https://eden-m16.github.io/voting-system/voting-app.html
- Connect wallet (must be registered by admin)
- Browse active elections
- Click "Vote" on your chosen candidate
- Confirm transaction
- View results in real-time
- Create Election - Add title, description, duration, candidates
- Register Voters - Add wallet addresses with weights (1-10)
- Control Election - Pause, extend, or end as needed
- View Results - Winner displayed automatically
Title: "Presidential Election 2026" Description: "Vote for the next president" Duration: 1440 minutes (24 hours) Candidates:
Alice Johnson | Progressive Party candidate
Bob Smith | Unity Party candidate
Election ID: 0 Voters:
0x123... | Weight: 1
0x456... | Weight: 2
0x789... | Weight: 5
| Action | When to Use |
|---|---|
| Pause | Issue detected, need to investigate |
| Unpause | Issue resolved, resume voting |
| Extend | More time needed for voting |
| End | Election completed early |
- Open Remix
- Create
voting.solwith the advanced contract - Compile with Solidity 0.8.30 (optimization on)
- Set Environment to "Injected Provider - MetaMask"
- Deploy on Sepolia
- Update
CONTRACT_ADDRESSin HTML - Push to GitHub Pages
MIT License - Free to use, modify, and distribute.
---**
Built with 🗳️ for transparent and fair elections