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
A simple way to read and write LAPS passwords from linux.

A simple way to read and write LAPS passwords from linux. This script is a python setter/getter for property ms-Mcs-AdmPwd used by LAPS inspired by @s

Podalirius 36 Dec 09, 2022
Compress .dds file in ggpk to boost fps. This is a python rewrite of PoeTexureResizer.

PoeBooster Compress .dds file in ggpk to boost fps. This is a python rewrite of PoeTexureResizer. Setup Install ImageMagick-7.1.0. Download and unzip

3 Sep 30, 2022
A bunch of codes for procedurally modeling and texturing futuristic cities.

Procedural Futuristic City This is our final project for CPSC 479. We created a procedural futuristic city complete with Worley noise procedural textu

1 Dec 22, 2021
Web interface for browsing, search and filtering recent arxiv submissions

Web interface for browsing, search and filtering recent arxiv submissions

Andrej 4.8k Jan 08, 2023
A wrapper script to make working with ADB (Android Debug Bridge) easier

Python-ADB-Wrapper A wrapper script to make working with ADB (Android Debug Bridge) easier This project was just a simple test to see if I could wrap

18iteration 1 Nov 25, 2021
An example project that shows how to check if a certain macro is active in a file.

PlatformIO Check Compiler Flags Example Description Demonstrates the usage of an extra script and a special compilter invocation to get the active mac

Maximilian Gerhardt 1 Oct 28, 2021
A project to find out all the words in a crossword.

A project to find out all the words in a crossword.

Kalpesh Dhoundiyal 1 Feb 06, 2022
Files relating to polymtl university

This is a tool I developed quickly, which allows users to visualize class availability by day of the week for a given program at polymtl. The schedule

PN 3 Mar 15, 2022
A maubot plugin to invite users to Matrix rooms according to LDAP groups

LDAP Inviter Bot This is a maubot plugin that invites users to Matrix rooms according to their membership in LDAP groups.

David Mehren 14 Dec 09, 2022
A basic tic tac toe game on python!

A basic tic tac toe game on python!

Shubham Kumar Chandrabansi 1 Nov 18, 2021
The fetch of the delegator list and the input of the epoch nonce need to be done independently

raffle The fetch of the delegator list and the input of the epoch nonce need to be done independently. Get the list of delegators at the epoch change.

1 Dec 15, 2021
This repository contains each day of Advent of Code 2021 that I've done.

Advent of Code - 2021 I will use this repository as my Advent of Code1 (AoC) repo for the 2021 challenge. I'm changing how I am tackling the problems

Brett Chapin 2 Jan 12, 2022
An end-to-end encrypted chat

An end-to-end encrypted chat, that allows users to anonymously talk without ip logs, personal info, or need for registration.

Privalise 1 Nov 27, 2021
A small Blender addon for changing an object's local orientation while in edit mode

A small Blender addon for changing an object's local orientation while in edit mode.

Jonathan Lampel 50 Jan 06, 2023
A few of my adventures with Devito.

Devito-playbox A few of my adventures with Devito. This repository contains a few notebooks and scripts that will lead me in the road of learning this

Átila Saraiva Quintela Soares 1 Feb 08, 2022
Data Applications Project

DBMS project- Hotel Franchise Data and application project By TEAM Kurukunda Bhargavi Pamulapati Pallavi Greeshma Amaraneni What is this project about

Greeshma 1 Nov 28, 2021
Double Pendulum implementation in Python, now with added pendulums and trails :D

Double Pendulum Using Curses in Python. A nice relaxing double pendulum simulation using ASCII, able to simulate multiple pendulums at once, and provi

Nekurone 62 Dec 14, 2022
36 key ergo split keyboard, designed around the Seeeduino Xiao platform

Slice36 Minimalist Split Keyboard 36 key ergo split keyboard, designed around the Seeeduino Xiao platform. Inspired by the Corne, Ferris, Ben Vallack'

54 Dec 21, 2022
Stop python warnings, no matter what!

SHUTUP - Stop python warnings, no matter what! Sometimes you just can't mute python warnings. Use this library to solve this. Installation pip install

80 Jan 04, 2023
Free and open source qualitative research tool

Taguette A spin on the phrase "tag it!", Taguette is a free and open source qualitative research tool that allows users to: Import PDFs, Word Docs (.d

Remi Rampin 48 Jan 02, 2023