{"id":25841403,"url":"https://github.com/selcuk05/election-erc20","last_synced_at":"2026-04-12T01:39:44.539Z","repository":{"id":195004241,"uuid":"456159021","full_name":"Selcuk05/election-erc20","owner":"Selcuk05","description":"Decentralized elections based on the ERC20 protocol","archived":false,"fork":false,"pushed_at":"2022-02-10T14:08:27.000Z","size":146,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-09-16T05:39:33.183Z","etag":null,"topics":["bootstrap5","brownie","dapp","dapps-development","decentralized","election","erc-20","erc20","ethereum","openzeppelin","python","solidity"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Selcuk05.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-02-06T13:29:55.000Z","updated_at":"2023-09-16T05:39:34.779Z","dependencies_parsed_at":"2023-09-16T05:39:34.367Z","dependency_job_id":"262c9ae0-33b3-43f9-9f7f-6d17897b7de5","html_url":"https://github.com/Selcuk05/election-erc20","commit_stats":null,"previous_names":["selcuk05/election-erc20"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Selcuk05%2Felection-erc20","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Selcuk05%2Felection-erc20/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Selcuk05%2Felection-erc20/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Selcuk05%2Felection-erc20/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Selcuk05","download_url":"https://codeload.github.com/Selcuk05/election-erc20/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241322681,"owners_count":19944073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap5","brownie","dapp","dapps-development","decentralized","election","erc-20","erc20","ethereum","openzeppelin","python","solidity"],"created_at":"2025-03-01T05:29:14.633Z","updated_at":"2026-04-12T01:39:39.501Z","avatar_url":"https://github.com/Selcuk05.png","language":"JavaScript","readme":"# election-erc20\nA decentralized application for elections using the ERC20 token protocol.\n\n## Table of contents\n  - [Preview](#preview)\n  - [Requirements](#requirements)\n  - [Testing the contracts](#testing-the-contracts)\n  - [Setup](#setup)\n  - [To-do](#to-do)\n  - [Credits](#credits)\n  - [Contribution](#contribution)\n\n## Preview\n![Preview](preview.png)\u003cbr\u003e\n**Note:** The front-end was designed by me using Bootstrap Studio. \nIf you think you can design a better, nicer front-end, feel free to open a pull request.\n\n## Requirements\n- Python 3.6 or greater\n- pip\n- NodeJS and npm\n- yarn\n    * `npm install yarn`\n- ganache-cli\n    * `npm install ganache-cli`\n- brownie\n    * `pip install eth-brownie`\n\n## Testing the contracts\n```python\nbrownie run scripts/deploy.py # Local deployment\nbrownie test -W ignore::DeprecationWarning # Unit testing\n```\n\n## Setup\nAt the frontend folder;\n```python\nyarn # Installs dependencies\nyarn build # Bundles the JavaScript\nyarn http-server # Runs the server\n```\nIf you changed any JS code in index.js and want to bundle it, you can run `yarn build` any time.\n\nSteps to set the front-end up (for now, locally)\n- Run **launch_and_deploy.bat** with your pre-saved [mnemonic](#ganachemetamask-tip) (for Windows)\n    * Or if you want to do it manually, follow these steps\n      + Launch Ganache: `ganache-cli`\n      + Deploy contracts (in base folder): `brownie run scripts/deploy.py`\n      + Start election (in base folder): `brownie run scripts/start_election.py`\n- [Import Ganache account into MetaMask](https://metamask.zendesk.com/hc/en-us/articles/360015489331-How-to-import-an-Account)\n    * You should get the private key from ganache-cli, choose one of the private keys after the second one (0 = admin, 1 and 2 = candidates)\n    * Make sure you are in the network 'Localhost 8545' in MetaMask\n- Launch local host (in folder: frontend): `yarn http-server`\n    * after 'Available on:', the second link is the right link\n- Connect your wallet from the front-end\n- Get a candidate's address from ganache-cli\n    * Choose either address 1 or address 2 because these are the candidates (0 = admin, others are voters)\n- Follow the inputs in the front-end and see the responses in the console\n\n#### Ganache/MetaMask tip:\nIf you do not want to import ganache keys into MetaMask every time you launch a new one,\u003cbr\u003e\nyou can launch a single consistent ganache instance using the mnemonic with this command: \n * `ganache-cli -d -m 'your_mnemonic'`\n\nIf you want to use this, make sure that you store your initial mnemonic somewhere.\u003cbr\u003e\n**Note that you will still have to deploy at every new launch!**\n\n## To-do\n- Front-end\n   * Homepage design ✔️\n   * Integration with brownie ✔️\n   * Info on homepage ✔️\n   * Post-election info on homepage ✔️\n- Implementing election start-end mechanism ✔️\n- Deployment onto Kovan testnet\n\n## Credits\nThanks to [@PatrickAlphaC](https://github.com/PatrickAlphaC) for providing with the [MetaMask connection codebase](https://github.com/PatrickAlphaC/html-js-ethers-connect/).\n\n## Contribution\nYou can open a pull request or issue at any point you think you can add a feature or you have found a mistake/error.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselcuk05%2Felection-erc20","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselcuk05%2Felection-erc20","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselcuk05%2Felection-erc20/lists"}