Skip to content

artiito1/Voting_system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

VoteDao - Blockchain Voting System

πŸ“Œ Overview

VoteDao is a smart contract written in Solidity that enables the creation and management of voting polls in a decentralized and secure manner. Users can vote on existing polls with specified options, and all votes are stored transparently on the blockchain.

πŸš€ Features

  • Poll Creation: Only the admin (manager) can create new polls and set their duration.
  • Secure Voting: Users can vote only once per poll.
  • Voting Options: Yes, No, Not Interested.
  • View Poll Details: Users can view active and completed polls.
  • Transparency: All votes are recorded and viewable.
  • Flexible Management: Ability to check if a poll is still active.

πŸ› οΈ Technologies Used

  • Solidity - Smart contract development.
  • OpenZeppelin - For managing poll identities with the Counters library.
  • Web3.js - For interacting with the smart contract.
  • Ethereum Blockchain - For secure data storage and transparency.

πŸ“œ Smart Contract Structure

  • Admin: Only the admin can create polls.
  • Poll Struct: Contains the poll's title, description, duration, and vote information.
  • Vote Struct: Contains the user's address, chosen option, and vote time.
  • Functions:
    • createPoll(...) - Creates a new poll.
    • vote(...) - Allows the user to vote.
    • getPollDetails(...) - Returns the poll's details.
    • getVotes(...) - Retrieves all votes for a specific poll.
    • getAllPolls() - Retrieves active and completed polls.
    • pollExpirationStatus(...) - Checks if the poll's duration has expired.
    • getUserPollsAlreadyVoted() - Retrieves all polls the user has already voted on.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published