-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add script to generate sol verifier
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
packages/twitter-verifier-circuits/scripts/7_gen_solidity_verifier.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |