This is a repository for voting software built using Choice Coin on the Algorand Network.

Related tags

MiscellaneousVoting
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
Lags valorant servers by rapidly picking up and throwing shorties.

Lags valorant servers by rapidly picking up and throwing shorties.

Eric Still 9 Dec 30, 2021
A Python script made for the Python Discord Pixels event.

Python Discord Pixels A Python script made for the Python Discord Pixels event. Usage Create an image.png RGBA image with your pattern. Transparent pi

Stanisław Jelnicki 4 Mar 23, 2022
An alternative site to emplea.do due to inconsistent service of the app.

feline a agile and fast alternative to emplea.do License: MIT Settings Moved to settings. Basic Commands Setting Up Your Users To create a normal user

Codetiger 8 Nov 10, 2021
to learn how to do pull request and do contribution to other's repo

Hacktoberfest-2021 - open-source-contribution An Open Source repository to Teach people How to contribute to open sources. 💥 🔥 JOIN PVX PROGRAMMING

Shubham Rawat 82 Dec 26, 2022
sumCulator Это калькулятор, который умеет складывать 2 числа.

sumCulator Это калькулятор, который умеет складывать 2 числа. Но есть условия: Эти 2 числа не могут быть отрицательными (всё-таки это вычитание, а не

0 Jul 12, 2022
New multi tool im making adding features currently

Emera Multi Tool New multi tool im making adding features currently Current List of Planned Features - Linkvertise Bypasser - Discord Auto Bump - Gith

Lamp 3 Dec 03, 2021
Gba-free-fonts - Free font resources for GBA game development

gba-free-fonts Free font resources for GBA game development This repo contains m

28 Dec 30, 2022
This repo houses the qhub frontend moving forward.

This repo houses the qhub frontend moving forward. This effort will house a backend written in fastAPI, and a fronend in Vue, with additional components.

Quansight 1 Feb 10, 2021
A Python wrapper around Bacting

pybacting Python wrapper around bacting. Usage Based on the example from the bacting page, you can do: from pybacting import cdk print(cdk.fromSMILES

Charles Tapley Hoyt 5 Jan 03, 2022
Brython (Browser Python) is an implementation of Python 3 running in the browser

brython Brython (Browser Python) is an implementation of Python 3 running in the browser, with an interface to the DOM elements and events. Here is a

5.9k Jan 02, 2023
Sublime Text 2/3 style auto completion for ST4

Hippie Autocompletion Sublime Text 2/3 style auto completion for ST4: cycle through words, do not show popup. Simply hit Tab to insert completion, hit

Alexander Schepanovski 20 May 19, 2022
Syntax highlighting for yarn.lock and bun.lockb files

Yarn.lock Syntax Highlighting Syntax highlighting for yarn.lock and bun.lockb files Installation Plugin is not publushed yet on Package Control, to in

Alexander Kuznetsov 4 Jul 06, 2022
MeerKAT radio telescope simulation package. Built to simulate multibeam antenna data.

MeerKATgen MeerKAT radio telescope simulation package. Designed with performance in mind and utilizes Just in time compile (JIT) and XLA backed vectro

Peter Ma 6 Jan 23, 2022
A corona information module

A corona information module

Fayas Noushad 3 Nov 28, 2021
An ultra fast cross-platform multiple screenshots module in pure Python using ctypes.

Python MSS from mss import mss # The simplest use, save a screen shot of the 1st monitor with mss() as sct: sct.shot() An ultra fast cross-platfo

Mickaël Schoentgen 799 Dec 30, 2022
I³ Tracker for Essential Open Innovation Datasets

I³ Tracker for Essential Open Innovation Datasets This repository is set up to track, version, and contribute updates to the I³ Essential Open Innovat

1 Feb 08, 2022
A parser of Windows Defender's DetectionHistory forensic artifact, containing substantial info about quarantined files and executables.

A parser of Windows Defender's DetectionHistory forensic artifact, containing substantial info about quarantined files and executables.

Jordan Klepser 101 Oct 30, 2022
Beancount Importers for DKB (Deutsche Kredit Bank) CSV Exports

Beancount DKB Importer beancount-dkb provides an Importer for converting CSV exports of DKB (Deutsche Kreditbank) account summaries to the Beancount f

Siddhant Goel 24 Aug 06, 2022
Camera track the tip of a pen to use as a drawing tablet

cablet Camera track the tip of a pen to use as a drawing tablet Setup You will need: Writing utensil with a colored tip (preferably blue or green) Bac

14 Feb 20, 2022
Persian Kaldi profile for Rhasspy built from open speech data

Persian Kaldi Profile A Rhasspy profile for Persian (fa). Installation Get started by first installing Vosk: # Create virtual environment python3 -m v

Rhasspy 12 Aug 08, 2022