use npm
to install, yarn
may faild.
npm install
setup and generate input.json
, public.json
, proof.json
, Verifier.sol
...
cd circuits
# chmod 777 ...
./0-cleanup.sh
./1-setup.sh
./2-add2Tree.sh
./3-proveInTree.sh
modify two Verifier contracts
- change pragma version from
^0.6.11
to^0.8.0
- change contract name, from
Verifier
toAdd2TreeVerifier
andProveInTreeVerifier
// contracts/Add2TreeVerifier.sol
// contracts/ProveInTreeVerifier.sol
...
pragma solidity ^0.8.0;
...
contract Add2TreeVerifier {...}
contract ProveInTreeVerifier {...}
test zk dapp
npm run test
- complete README
- add Front-End
- zk-prove-membership: https://github.com/scaffold-eth/scaffold-eth-examples/tree/zk-prove-membership
- zk-voting-example: https://github.com/scaffold-eth/scaffold-eth-examples/tree/zk-voting-example
- circomlib: https://github.com/iden3/circomlib
- circomlibjs: https://github.com/iden3/circomlibjs
- whats-a-sparse-merkle-tree: https://medium.com/@kelvinfichter/whats-a-sparse-merkle-tree-acda70aeb837