From c11e8db167313f0dc06865cf0008bdb12dcfb676 Mon Sep 17 00:00:00 2001 From: Erhan Tezcan Date: Sun, 12 Mar 2023 23:50:42 +0300 Subject: [PATCH] types todo --- scripts/compile.sh | 2 +- scripts/{ptau-phase2.sh => ptau.sh} | 0 scripts/type.sh | 23 +++++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) rename scripts/{ptau-phase2.sh => ptau.sh} (100%) create mode 100755 scripts/type.sh diff --git a/scripts/compile.sh b/scripts/compile.sh index 4bf2d1f..1e36d5c 100755 --- a/scripts/compile.sh +++ b/scripts/compile.sh @@ -23,5 +23,5 @@ CIRCOM_LINK=./node_modules mkdir -p $CIRCOM_OUT # compile -circom $CIRCOM_IN -o $CIRCOM_OUT --r1cs --wasm -l $CIRCOM_LINK +circom $CIRCOM_IN -o $CIRCOM_OUT --r1cs --sym --wasm -l $CIRCOM_LINK echo "Compiled $CIRCOM_IN under $CIRCOM_OUT" diff --git a/scripts/ptau-phase2.sh b/scripts/ptau.sh similarity index 100% rename from scripts/ptau-phase2.sh rename to scripts/ptau.sh diff --git a/scripts/type.sh b/scripts/type.sh new file mode 100755 index 0000000..fbcc54d --- /dev/null +++ b/scripts/type.sh @@ -0,0 +1,23 @@ +#!/bin/bash +## Parse the .sym file and generate types + +# abort on error +set -e + +# get to the root directory of this project +cd "${0%/*}"/.. + +if [[ $# -ne 1 ]] ; then + echo "Usage:" + echo "$0 " + exit 1 +fi +CIRCUIT=$1 + +# variables +SYM=./build/$CIRCUIT/$CIRCUIT.sym + +# choose lines with 1 dot only +cat $SYM | grep -E '^[^.]*\.[^.]*$' + +# TODO