A repository for voting systems using Choice Coin.

Related tags

CryptographyVoting
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
Bit is Python's fastest Bitcoin library and was designed from the beginning to feel intuitive, be effortless to use, and have readable source code.

Bit is Python's fastest Bitcoin library and was designed from the beginning to feel intuitive, be effortless to use, and have readable source code.

Ofek Lev 1.1k Jan 02, 2023
A python tool to track prices of various cryptocurrencies and alert

CryptoPriceTracker This is a tool to track prices of various cryptocurrencies and alert the user once the user defined maximum & minimum target is rea

1 Oct 01, 2021
A simple Python tool to help anyone use Liquidity Pools on the BitShares blockchain.

ACCOUNT AND ACTIVE KEY ARE NOT PERSISTENT, YOU WILL NEED TO ENTER THEM EACH TIME YOU LAUNCH THE APP (but not every transaction. that's a win). If / wh

Brendan Jensen 17 Jun 15, 2022
obj-encrypt is an encryption library based on the AES-256 algorithm.

obj-encrypt is an encryption library based on the AES-256 algorithm. It uses Python objects as the basic unit, which can convert objects into binary ciphertext and support decryption. Objects encrypt

Cyberbolt 2 May 04, 2022
Django-based Crypto Portfolio Tracker – keep an eye on Shiba Inu and other Crypto

Crypto Tracker 🐍 📈 – Central Portfolio Tracking Easy asset tracking – at a glance 🚀 Dashboard to centrally monitor current crypto portfolio develop

65 Jan 08, 2023
Venax 116 Dec 21, 2022
A tool that can encrypt python2 or python3 code with the given password and can reuse with that password

A tool that can encrypt python2 or python3 code with the given password and can reuse with that password

Md Rasel Bhuyan 3 Feb 28, 2022
Gold(Gold) is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure

gold-blockchain (Gold) Gold(Gold) is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure. Here are some of

zcomputerwiz 3 Mar 09, 2022
Encrypt your code without a worry. Stark utilizes the base64, hashlib and Crypto lib to encrypt your code which cannot be decrypted with any online tools.

Stark Encrypt your code without a worry. Stark utilizes the base64, hashlib and Crypto lib to encrypt your code which cannot be decrypted with any onl

cliphd 3 Sep 10, 2021
Tink is a multi-language, cross-platform, open source library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.

Tink A multi-language, cross-platform library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse. Ubuntu

Google 12.9k Jan 05, 2023
Cryptocurrency trading bot with a graphical user interface with support for simulations, backtests, optimizations, and running live bots.

Cryptocurrency trading bot with a graphical user interface with support for simulations, backtests, optimizations, and running live bots.

Mihir Shrestha 834 Dec 30, 2022
Skepticoin is a peer-to-peer digital currency that enables you to send money online

What is Skepticoin? Skepticoin is a peer-to-peer digital currency that enables you to send money online. It's also the central community of people who

64 Aug 06, 2022
Taishang Credential With Interactive Badges

结合数字徽章的交互式区块链证书 DApp 1 项目简介 DID 与 VC 一直是区块链研究的重要领域,也是区块链落地的重要基础,从「传统证书」到基于DID的VC证书是证书体系范式转移的重要第一步。 但是,在迈出第一步之后我们可以进行更加丰富的尝试,例如尝试将不可转移的徽章与可转移的权益与证书相结合,

1 Nov 07, 2021
A Docker image for plotting and farming the Chia™ cryptocurrency on one computer or across many.

An easy-to-use WebUI for crypto plotting and farming. Offers Plotman, MadMax, Chiadog, Bladebit, Farmr, and Forktools in a Docker container. Supports Chia, Cactus, Chives, Flax, Flora, HDDCoin, Maize

Guy Davis 328 Jan 01, 2023
Accept Bitcoin donations on Twitch, and integrate them into your alerts!

The system in action Check out how seamlessly the project works! Support the project You can tip me with some sats here!

Fitti 27 Jan 08, 2023
Gridlock - Encryption and decryption python project

Gridlock Encryption Encryption and decryption of plain text messages inspired by

Matthew 2 Mar 23, 2022
Hide secret data within a digital image using good ol' terminal

pystego Hide secret data within a digital image using good ol' terminal Installation The recommended way for installing this package is using, python

Ayush Gupta 1 Jan 06, 2022
SVSHI - Secure and Verified Smart Home Infrastructure

The SVSHI (Secure and Verified Smart Home Infrastructure) (pronounced like "sushi") project is a platform/runtime/toolchain for developing and running formally verified smart infrastructures, such as

Dependable Systems Laboratory 3 Oct 28, 2022
A cairo port for Rari Capital Vaults

crypts • Architecture contracts ├─ CryptFactory — "Factory for deploying Crypt contracts for any ERC20 token." ├─ Crypt — "Flexible, minimalist, and g

alucard 9 Sep 02, 2022
keyring MITkeyring (🥉27 · ⭐ 630) - Store and access your passwords safely. MIT

The Python keyring library provides an easy way to access the system keyring service from python. It can be used in any application that needs safe pa

Jason R. Coombs 948 Dec 18, 2022