Skip to content
This repository was archived by the owner on Nov 7, 2023. It is now read-only.

Latest commit

 

History

History
30 lines (26 loc) · 752 Bytes

File metadata and controls

30 lines (26 loc) · 752 Bytes

Competition protocol

This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.

Try running some of the following tasks:

npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.ts

Secret ballot

generate proof:

cd zokrates
# install zokrates
curl -LSfs get.zokrat.es | sh
# compile
zokrates compile -i proof.zok
# compute 3 is a member of array [1, 2, 3, 4] you can prove the index of an address in an addresses' array
zokrates compute-witness -a 1 2 3 4 3
# generate proof
zokrates generate-proof
# generate verifier contract
zokrates export-verifier
zokrates verify