Skip to content

Commit

Permalink
chore: add script to generate sol verifier
Browse files Browse the repository at this point in the history
  • Loading branch information
saleel committed Jul 8, 2023
1 parent a6176b7 commit 25391c6
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

source circuit.env


echo "****GENERATING SOLIDITY VERIFIER FOR ZKEY****"
start=$(date +%s)
set -x
NODE_OPTIONS='--max-old-space-size=644000' ../../../node_modules/.bin/snarkjs zkey export solidityverifier "$BUILD_DIR"/"$CIRCUIT_NAME".zkey ../contracts/verifier.sol
{ set +x; } 2>/dev/null
end=$(date +%s)
echo "DONE ($((end - start))s)"
echo

echo "Solidity calldata"
NODE_OPTIONS='--max-old-space-size=644000' ../../../node_modules/.bin/snarkjs zkey export soliditycalldata "$BUILD_DIR"/public.json "$BUILD_DIR"/proof.json

0 comments on commit 25391c6

Please sign in to comment.