Coder Social home page Coder Social logo

zkvotingsystem's Introduction

zktree-vote

Anonymous voting on Ethereum blockchain using zero knowledge proof

Usage

  • Install wget (by apt-get install wget on Ubuntu/Debian or brew install wget on MacOS)
  • Install the project dependencies and prepare by npm install in the project directory
  • Start a Hardhat node by npx hardhat node in the project directory
  • In another terminal deploy the smartcontract by npm run deploy
  • Start the app by npm start

If the front-end is not loaded correctly, try npm run build then npm start

The app uses MetaMask to connect the blockchain, so the MetaMask extension have to be installed, and connected to the Hardhat local node.

Connect Metamask wallet to local Hardhat network

The smart contract owner is the first Hardhat account, and the second account is set as a validator by the deployment script (Can set in deploy.ts).

If you encounter error "Nonce too high. Expected nonce to be 0 but got 4. Note that transactions can't be queued when automining.", open up your MetaMask window and click on the icon in the top right to display accounts. Go to Settings, then Advanced and hit "Clear activity tab data".

Solved! “Nonce too high” error with MetaMask and Hardhat

Run test script

Using npx hardhat test

zkvotingsystem's People

Contributors

p4stry avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.