https://github.com/kaymen99/election-dapp
A Decentralized Blockchain Voting/Election Application
https://github.com/kaymen99/election-dapp
blockchain brownie decentralized-applications election ethereum smart-contracts solidity voting-application
Last synced: 4 months ago
JSON representation
A Decentralized Blockchain Voting/Election Application
- Host: GitHub
- URL: https://github.com/kaymen99/election-dapp
- Owner: kaymen99
- Created: 2022-03-09T22:43:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-08T02:11:55.000Z (about 3 years ago)
- Last Synced: 2025-04-15T11:36:21.737Z (6 months ago)
- Topics: blockchain, brownie, decentralized-applications, election, ethereum, smart-contracts, solidity, voting-application
- Language: Python
- Homepage:
- Size: 81.1 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Election-Dapp
## Overview:
A Decentralized Voting Application built for EVM compatible blockchains (ethereum, polygon, avalanche,...), it has the following features :
Administation functions:
- Adding new candidates
- Opening the voting for a giver duration
- Closing the election after the predermined voting period
Main functions:
- Allow user to vote only once for a choosen candidate
- Determine the winner based on highest votes count
- Give a complete list of all candidates with their data (id, name, votes count)
### Installation & Setup:
1. Installing Brownie: Brownie is a python framework for smart contracts development,testing and deployments. It's quit like [HardHat](https://hardhat.org) but it uses python for writing test and deployements scripts instead of javascript.
Here is a simple way to install brownie.
```sh
pip install --user pipx
pipx ensurepath
# restart your terminal
pipx install eth-brownie
```
Or if you can't get pipx to work, via pip (it's recommended to use pipx)
```sh
pip install eth-brownie
```
Install [ganache-cli](https://www.npmjs.com/package/ganache-cli):
```sh
npm install -g ganache-cli
```
2. Clone the repo:
```sh
git clone https://github.com/kaymen99/Election-Dapp.git
cd Election-Dapp
```
### How to deploy:
To deploy the Election contract on development network, run the command :
```sh
brownie run scripts/deploy_election.py
```
To deploy on real network/testnets, run the command :
```sh
brownie run scripts/deploy_election.py --network=
```
### Testing:
The tests for the Election smart contract can be found in the tests folder, you can run all the tests by :
```sh
brownie test
```
Or you can test each function individualy:
```sh
brownie test -k
```