From 25391c63614687fa14a47a1994a4031e0df3965c Mon Sep 17 00:00:00 2001 From: Saleel Date: Sat, 8 Jul 2023 10:32:54 +0530 Subject: [PATCH] chore: add script to generate sol verifier --- .../scripts/7_gen_solidity_verifier.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 packages/twitter-verifier-circuits/scripts/7_gen_solidity_verifier.sh diff --git a/packages/twitter-verifier-circuits/scripts/7_gen_solidity_verifier.sh b/packages/twitter-verifier-circuits/scripts/7_gen_solidity_verifier.sh new file mode 100755 index 000000000..27db32dfe --- /dev/null +++ b/packages/twitter-verifier-circuits/scripts/7_gen_solidity_verifier.sh @@ -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