Skip to content

Latest commit

 

History

History
84 lines (73 loc) · 2.17 KB

README.md

File metadata and controls

84 lines (73 loc) · 2.17 KB

funny, right?

Decentralised Voting System

Some Background

We're currently participating in Junction Hackathon 2022, in the Year 2222 challenge and in the Society 2.0 challenge. During this hackathon we created this solution and we're excited to be able to share it with you all.

Project Setup

Prerequisites

*: not mandadory

Installation

  1. Clone the repo
    git clone https://github.com/mrBymax/junction2022.git
  2. Install NPM packages
     yarn install
    or
     npm install
  3. Start Ganache trough GUI/CLI
  4. Compile and migrate the smart contracts
    truffle migrate
  5. Start the client
     yarn start
    or
     npm start
  6. Run the tests
    truffle test
  7. Deploy the smart contracts to the blockchain
     truffle migrate --network <network>
    where <network> is one of the networks specified in truffle-config.js.
  8. Build the application for production
     yarn build
    or
     npm run build
  9. Run the application in production mode
  10. Deploy the application to IPFS (not mandadory)
    ipfs add -r build

Usage

Login

Login

Taking part in a Poll

  1. Connect your Metamask wallet to the application
  2. Click on VOTE button to express your preference

Vote

Add Candidates

For now, only governors can add candidates to a poll. To do so, you need to edit the addCandidate function in src/contracts/Election.sol and then deploy the contract again.