BinaryVoting

Simple Blockchain voting contract with agree/disagree functionality

BinaryVoting

Created At

ETHGlobal Taipei

Winner of

Celo - Celo L2 Pool Prize

Prize Pool

Project Description

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

How it's Made

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 data
  • mapping for efficient proposal storage and lookup
  • mapping for tracking votes to prevent double-voting
  • Events for tracking proposal creation and voting

Development Tools:

  • Truffle for smart contract development and testing
  • Ganache for local blockchain testing
  • Web3.js for contract interaction
  • Mocha and Chai for testing
  • Testing Infrastructure:
  • Comprehensive test suite covering:
  • Proposal creation
  • Voting functionality
  • Double-voting prevention
  • Event emission
  • Tests run on both local blockchain and testnet Deployment Process:
  • Deployed to Celo mainnet using Truffle
  • Contract verification through Celo Explorer
  • Scripts for deployment and verification
background image mobile

Join the mailing list

Get the latest news and updates