← Back to home

BinaryVoting

Simple Blockchain voting contract with agree/disagree functionality

Problem Statement

A smart contract for binary voting on the Celo blockchain. This contract allows users to create proposals and vote on them using a simple yes/no (agree/disagree) mechanism.✨ - Features šŸ“ - Create new proposals with descriptions āœ… - Vote on existing proposals (Agree/Disagree) šŸ‘€ - View proposal details including vote counts šŸ”’ - Prevent double voting šŸ“¢ - Event emission for proposal creation and voting

Solution

The Binary Voting project was built using several key technologies and follows a robust development process:Written in Solidity (v0.8.0)Uses OpenZeppelin's contracts for security and best practices Key components:Proposal struct to store proposal datamapping for efficient proposal storage and lookupmapping for tracking votes to prevent double-votingEvents for tracking proposal creation and votingDevelopment Tools:Truffle for smart contract development and testingGanache for local blockchain testingWeb3.js for contract interactionMocha and Chai for testingTesting Infrastructure:Comprehensive test suite covering:Proposal creationVoting functionalityDouble-voting preventionEvent emissionTests run on both local blockchain and testnet Deployment Process:Deployed to Celo mainnet using TruffleContract verification through Celo ExplorerScripts for deployment and verification

Hackathon

ETHGlobal Taipei

2025

Prizes

  • šŸ†

    Celo L2 Pool Prize

    Celo

Contributors