A repository for voting systems using Choice Coin.

Related tags

Cryptography Voting
Overview

Voting

This is a repository for voting software built using Choice Coin on the Algorand Network. Our voting software is centered around Decentralized Decisions, an open-source voting software that allows organizations to make decisions in a distributed manner. The votes in Decentralized Decisions are recorded on the Algorand Blockchain and are tabulated using a stateless smart contract. Post-quantum cryptography ensures that voter information is kept secure throughout the entire process at all points of vulnerability. This repository is meant to facilitate open-development on the Choice Coin Platform and to serve as a starting point for developers looking to set up their own decentralized voting network. Development here can directly be used for Choice Coin's Developer Awards Program. Developers should follow the instructions below to get started. We are looking forward to seeing all the great innovations that will come out of our community!.

Dependencies

  • To run the code in the Choice_Coin_Voting Folder, you first must have Python installed. Please download the latest version of Python, and create a virtual environment specifically for this directory. Python Download: https://www.python.org/downloads/.
  • Also be sure to have the latest version of MySQL installed. MySQL Download: https://www.mysql.com/downloads/.
  • Second, your Python virtual environment must have all of the packages listed in the requirements.txt file, which is also found in the Choice_Coin_Voting folder.
  • Your MySQL Database must be set up similarly to the way it is described in the MySQL_Code.sql file under Choice_Coin_Voting.

Run Steps

  • To run the code found in the Choice_Coin_Voting folder, make sure to first download the dependencies as described above using pip.
  • First, make sure that you have an account with an adequate amount of Choice Coin. This will be used as the escrow account that contains the Choice Coin that is used for voting. It will also send this Choice Coin to the appropriate decision address as dictated by individual voters. Put the accounts' address and mnemonic under escrow_address and escrow_mnemonic in the vote.py file.
  • Furthermore, connect to the Algorand Network through a service such as the PureStake API or the Algorand Sandbox, the code was tested using the PureStake API, and assign your new address and token to algod_address and algod_token respectively in the vote.py file.
  • Configure the keys in index.py based on your own administrative key. Then, enter in the string that you want to be the main administrator key, which will be hashed by the SHA-512.
  • To do this manually through the SHA-512 hashing algorithm in the code, open a new python terminal in this directory with the virtual environment activated. Import hashing from vote, and simply run hashing with your secret key as the input. Assign this to the keys in index.py.
  • Edit the number of decisions based on your preference. To do this, make a new address for the decision, make sure that it is opted into the Choice Coin asset, and add it at each of the appropriate spots in the code files based on the instructions provided in the documentation. Be sure to adjust the code at every juncture necessary to get the best results.
  • Specifically, edit the vote.py file, the index.py, and the vote.html files according to the instructions in the files. The instructions are written as comments at the top of each respective file.
  • This protocol also supports corporate or organizational voting. To add additional decisions, follow the same steps as above, except editing the functions and files with corporate in the name.
  • Create a new MySQL database with the appropriate credentials as described in the SQL_Code.sql file. Be sure to enter in your MySQL credentials at the appropriate points at lines 15-20 in index.py. Specifically, create a new MySQL user with root privileges that can easily access and change the database.
  • Finally, to test as a web application, use the command python index.py in a regular terminal with the virtual environment configured. This will launch a web-application that you can interact with.
  • To learn more about the web application, watch the Demo Video here: https://youtu.be/DWXNGDYXnIM.
Comments
  • Voting Tutorial Optin Error

    Voting Tutorial Optin Error

    I am working on the JavaScript Voting Tutorial and I am getting a consistent error.

    An error occured

    Account '' must opt in to Asset ID 42771692

    The problem is the accounts have already opted into the Asset ID. It looks like the script is catching two errors. First in the voting process:

        .catch((error) => {
          if (error.isTtyError) {
            console.log("Cannot render prompt in this environmet");
          } else {
            console.log("An error occured");
          }
        });
    

    And once in the results:

    const checkResultsOne = async () => {
      const address = "";
      const accountInfo = await algodClient.accountInformation(address).do();
      const assets = await accountInfo["assets"];
      for (const asset in assets) {
        if (asset["asset-id"] === ASSET_ID) {
          const amount = asset["amount"];
          console.log(
            `Account ${address} has ${balanceFormatter(amount, ASSET_ID)}`
          );
          return;
        }
      }
      console.log(`Account ${address} must opt in to Asset ID ${ASSET_ID}`);
    };
    checkResultsOne();
    

    The goal is to trouble shoot these errors and fix the problem to run the program smoothly.

    opened by Bhaney44 11
  • fionnachan / Refinement Bash

    fionnachan / Refinement Bash

    View deployed site here

    Changes

    Refactoring

    • [x] remove package-lock.json because there is already yarn.lock and they should not exist together
    • [x] remove jquery and use useRef to control style changes for expansion / collapse of tabs in FAQ and Voting cards
    • [x] add styled-components for styling
    • [x] add typescript to help development & better code maintenance
      • move some .js to .tsx
      • use type and interface
    • [x] move ElecitonCard out of Election List as a separate component
    • [x] move FAQ question item out of FAQ as a separate component
    • [x] remove unused files
    • [x] use AlgoExplorer API for testnet instead of purestake with hardcoded token in the code base

    Features

    • [x] connect wallet button on header
    • [x] add Algorand wallet option
    • [x] show user's Choice coin balance
    • [x] show user's committed Choice coin
    • [x] allow user to input Choice coin amount for voting
    • [x] add icons to dark/light mode toggle

    Screenshot

    Connect Wallet button image Algorand Wallet option image Input for Choice coin vote amount & header commitment amount image

    For #984

    opened by fionnachan 5
  • BeautifulSoup Scraper

    BeautifulSoup Scraper

    This issue has a bounty of 75,000 Choice. The goal for this issue is to solve the problem outlined in this issue with BeautifulSoup.

    Here is the outline for the code. The code is currently producing the this error. The challenge is to grab the targets identified in the HTML. The targets should be grabbed for every row on the page and sent to a .csv file.

    opened by Bhaney44 3
  • Silver Reward Generator Bash

    Silver Reward Generator Bash

    Details

    Silver Badge: 82,000 Choice Bronze Badge: 39,000 Choice Deadline: Monday April 11th @ 2:30PM EST

    Task

    • Write a script that reads a csv file and sends Choice to each from address.
    • The amount of Choice sent to each address should be 1.1x the value in the amountcolumn.
    • The script should go through each row in the csv file, multiply the amount by 1.1 to generate a variable x, then send x to the from address in the row.
    • Preference will be given to submissions which provide a TestNet address with all transactions.

    Requirements

    1. All files must be in one folder.
    2. Only one file may be used to script the code.
    3. All folders must be named [user_name]_bash.
    4. All contributions must be made to the gen_rewards folder.
    5. You must use the Algorand Python-SDK.
    6. All PRs must be titled, Username_Bash.
    7. Make sure you merge upstream before making a PR.

    Winners

    All winners will be announced and rewards will be distributed by Tuesday April 10th @ 2:30PM EST.

    opened by Bhaney44 2
  • Gold Rewards Bash

    Gold Rewards Bash

    Details

    Deadline | April 3, 2022 @ 2:00PM EST

    First Prize | 100,000 Choice | Gold Badge Second Prize | 44,000 Choice | Silver Badge Bronze | 15,000 Choice | Bronze Badge

    Goal

    Write a web-scraper to scrape all from and amount variables from the following Algorand address: 25S2YKMG2E3L5RTFI67NTSWFJJQHBTDULAIN7TQVXWB3E4E5Y6BPG3O44I on AlgoExplorer or AlgoScan. The scraper should grab all from and amount variables on each page, then move to the next page iteratively until all data has been collected. You may use BeautifulSoup, or any other software packages you choose.

    Requirements

    1. All files must be in 1 folder, named [username]_rewards2.
    2. All files must be added to the rewards2 folder.
    3. All variables should be scraped and stored locally in a .csv file.
    4. No more than three separate files may be used to scrape.
    5. All submissions must include a Readme.md file.
    6. All code must be commented.

    Results

    Winners will be selected based on adherence to the requirements and goal. Additional criteria will consider simplicity, scalability, and ease of use. Advantage may be given to submissions with an explanatory YouTube video. All winners will be announced before April 5 @ 2:00PM EST.

    opened by Bhaney44 2
  • Silver entry

    Silver entry

    1. I changed the vote.py file to use Python Classes instead of Functions-
    2. I created a database for adding escrow address and decision addresses.
    3. A new route for adding address on the Frontend
    opened by Olu-wafemi 2
  • New project

    New project

    A project nobody should miss out on. We are still at the testnet stage, so you still have a lot of time to join up

    Verify Github on Galaxy. gid:drQWaqX9J7RpmxHWkFieQG

    opened by Adedapo62 0
  • OSS Account Creation/Importing and dashboard Bash 👨🏼‍🍳

    OSS Account Creation/Importing and dashboard Bash 👨🏼‍🍳

    Details

    First Prize: 50,000.00 Choice | Silver Badge Second Prize: 25,000.00 Choice | Bronze Badge Contributions: Fully Working Code 5,000 Choice| Bronze Badge

    Deadline: February 18th, 7:00PM PT

    The purpose of this bash is to :

    • Generate an account wallet
    • Import an existing wallet using mnemonic passphrase
    • Connect with either my algo wallet and algosigner
    • After generating a wallet/ importing a wallet/ connecting with algosigner or my algowallet then show a dashboard with account details showing both algo balance and $choice balance in a page

    The logic is similar to this:

    1 - Overview

    creating address + other options.

    image

    2 - Import

    Importing existing wallet address.

    image

    3 - Account Connection

    Connecting with my algo wallet to get wallet address.

    image

    4 - Account Connection

    Connecting with algosigner to get wallet address.

    image

    5 - Dashboard

    In this case algoland is the platform name, you can name yours anything. you can also add $choice balance instead of just algo balance

    image

    Requirements

    • The program must be submitted as a pull request in the Silver Bash folder, in the voting repository.

    • All files submitted must be aggregated in one folder with the title: [UserName]_OSS_account_Bash, such as samuel_OSS-account_Bash.

    • The PR should be titled [UserName]_OSS-acount_Bash.

    • The pull request for the program must be made before the task Deadline.

    • The program must be run on the Algorand TestNet.

    • Any TestNet Algo or Choice Asset ID may be used in the program.

    • The program should include a ReadMe file with the problem, solution, description, and run steps.(a video or hosted link would be good also)

    • As few scripts and files as possible should be used.

    Additional Information

    Winners will be selected based on clarity, simplicity, functionality, and design.

    For more questions or comments, please ask in Discord

    Resources

    opened by Samuellyworld 0
Releases(release)
Owner
Choice Coin
Official Github for Choice Coin, a utility token focusing on governance and democratic participation. Built on the Algorand Blockchain.
Choice Coin
Blockchain online Voting System

decentralized-voting-system A decentralized voting system where a user can walk into a government authorized center (Ex- banks, telecom companies etc.

Mahima Arora 1 Dec 28, 2021
A crypto wallet to send bnb and ether coin using web3.py and moralis speedy node

A crypto wallet to send bnb and ether coin using web3.py and moralis speedy node

Ciscoquan 3 Aug 16, 2022
Tracking (of choice) cryptocurrencies' daily prices and moving average.

Crypto-price-moving_average Tracking (of choice) cryptocurrencies' daily prices and moving average. About Alpha Vantage The Alpha Vantage library (htt

Thong Huynh 2 Jan 22, 2022
PytoPrice is an automation program to fetch the latest price of a cryptocurrency of your choice at a user-customizable update interval.

PyToPrice (Python Crypto Price) PytoPrice is an automation program to fetch the latest price of a cryptocurrency of your choice at a user-customizable

Peter 1 Jun 16, 2022
A community effort to bring back Duino-Coin

Duino-Coin-Revived A community effort to bring back Duino-Coin! Along with reviving the cryptocurrency, we will add many improvements to it, including

null 1 Dec 22, 2021
A repository for Algogenous Smart Contracts created on the Algorand Blockchain.

Smart Contacts Alogrand Smart Contracts using Choice Coin. Read Docs for how to implement Algogenous Smart Contracts for your own applications. Smart

Choice Coin 3 Dec 20, 2022
A repository for Algogenous Smart Contracts created on the Algorand Blockchain.

Smart Contacts This Repository is dedicated to code for Alogrand Smart Contracts using Choice Coin. Read Docs for how to implement Algogenous Smart Co

Choice Coin 3 Dec 20, 2022
In this repository there are two types of code files

encryption-decryption In this repository there are two types of code files Me Friend Code in the 'Me' file can use for encryption and Code in the 'Fri

Vicksura Dulhan Perera 1 Nov 22, 2021
A simple python program to sign text using either the RSA or ISRSAC algorithm with GUI built using tkinter library.

Digital Signatures using ISRSAC Algorithm A simple python program to sign text using either the RSA or ISRSAC algorithm with GUI built using tkinter l

Vasu Mandhanya 3 Nov 15, 2022
Hide secret texts inside an image, optionally encrypt them with a password using AES-256.

Hide secret texts/messages inside an image. You can optionally encrypt your texts with a password using AES-256 before encoding into the image.

Teja Swaroop 97 Dec 29, 2022
Learn Blockchains by Building One, A simple Blockchain in Python using Flask as a micro web framework.

Blockchain ✨ Learn Blockchains by Building One Yourself Installation Make sure Python 3.6+ is installed. Install Flask Web Framework. Clone this repos

Vaibhaw 46 Jan 5, 2023
This project aims to assist in the search for leaked passwords while maintaining a high level of privacy using the k-anonymity method.

To achieve this, the APIs of different services are used, sending only a part of the Hash of the password we want to check, for example, the first 5 characters.

Telefónica 36 Jul 6, 2022
Use this script to track the gains of cryptocurrencies using historical data and display it on a super-imposed chart in order to find the highest performing cryptocurrencies historically

crypto-performance-tracker Use this script to track the gains of cryptocurrencies using historical data and display it on a super-imposed chart in ord

Andrei 25 Aug 31, 2022
Ceres is a combine harvester designed to harvest plots for Chia blockchain and its forks using proof-of-space-and-time(PoST) consensus algorithm.

Ceres Combine-Harvester Ceres is a combine harvester designed to harvest plots for Chia blockchain and its forks using proof-of-space-and-time(PoST) c

null 38 Nov 14, 2022
theHasher Tool created for generate strong and unbreakable passwords by using Hash Functions.Generate Hashes and store them in txt files.Use the txt files as lists to execute Brute Force Attacks!

$theHasher theHasher is a Tool for generating hashes using some of the most Famous Hashes Functions ever created. You can save your hashes to correspo

SR18 6 Feb 2, 2022
This project is a proof of concept to create a dashboard using Dash to display information about various cryptocurrencies.

This project is a WIP as a way to display useful information about cryptocurrencies. It's currently being actively developed as a proof of concept, and a way to visualize more useful data about various cryptocurrencies.

null 7 Apr 21, 2022
Given a string or a text file with plain text , returns his encryption using SHA256 method

Encryption using SHA256 Given a string or a .txt file with plain text. Returns his encryption using SHA256 method Requirements : pip install pyperclip

yuno 3 Jan 24, 2022
Powerful Tool to encrypt and decrypt files using AES.

AEScryptor Tool Description Encrypt and Decrypt files with AES-128 (16bytes key). AES mode = CFB (cipher Feedback) security = super safe! Usage [1] Ch

null 5 Jan 12, 2022
Using with Jupyter making live crypto currency action

Make-Live-Crypto-Currency-With-Python Using with Jupyter making live crypto currency action 1.Note: ?? You must Create a Binance account and also clic

Mahmut Can Gönül 5 Dec 13, 2021