diff --git a/circuits/scripts/build_circuits.sh b/circuits/scripts/build_circuits.sh index 4f05c5ab..64b37159 100755 --- a/circuits/scripts/build_circuits.sh +++ b/circuits/scripts/build_circuits.sh @@ -4,10 +4,11 @@ source "scripts/download_ptau.sh" build_circuit() { local CIRCUIT_NAME=$1 + local CIRCUIT_TYPE=$2 local START_TIME=$(date +%s) echo "compiling circuit: $CIRCUIT_NAME" - circom circuits/${CIRCUIT_NAME}.circom -l node_modules -l ./node_modules/@zk-kit/binary-merkle-root.circom/src -l ./node_modules/circomlib/circuits --r1cs --O1 --wasm -c --output build + circom circuits/${CIRCUIT_TYPE}/${CIRCUIT_NAME}.circom -l node_modules -l ./node_modules/@zk-kit/binary-merkle-root.circom/src -l ./node_modules/circomlib/circuits --r1cs --O1 --wasm -c --output build echo "building zkey" yarn snarkjs groth16 setup build/${CIRCUIT_NAME}.r1cs build/powersOfTau28_hez_final_20.ptau build/${CIRCUIT_NAME}.zkey @@ -27,11 +28,23 @@ build_circuit() { echo "Size of ${CIRCUIT_NAME}_final.zkey: $(wc -c