A decentralized voting application built with Solidity & NextJS
- Voter registration
- Proposal submission by allowed voters
- Real-time voting status updates
- Vote tallying and winner determination
- Role-based access control (Owner/Voter)
- Registering Voters - Only owner can register voters
- Proposals Registration Started - Registered voters can submit proposals
- Proposals Registration Ended - No more proposals can be submitted
- Voting Session Started - Registered voters can vote for proposals
- Voting Session Ended - Voting period is closed
- Votes Tallied - Final results are calculated and winner is highlight in the proposal table
- Node.js >= 16
- npm or yarn
- MetaMask wallet
cd backend
npm install
#Run on a separate terminal
npx hardhat node
# Deploy contract locally
npx hardhat run ./scripts/deploy.ts --network localhostSee backend/hardhat.config.ts for available network
npx hardhat run ./scripts/deploy.ts --network sepolia
npx hardhat run ./scripts/deploy.ts --network holeskySepolia Address: 0x9fBAe69250C23283A3E72e161bbe68D1806CDd27
Holesky Address: 0x69A244ed5FEcFC6a9CBbcdBb64c02d5E09a1e207
cd frontend
npm install
npm run dev- Fix the problem with the number of proposals when tallied (Loop)
- Transaction error handling in the front