Skip to content

Commit

Permalink
Fix conversion.sh && fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinBadi committed Apr 10, 2024
1 parent 2e4b1d4 commit d00b08d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,8 @@ And should output the following:
In order to make the circom files interoperable with the Plutus VM, it is necessary to serialize the proof and verification key generated by circom. To serialize the circom files you can run the following:

```bash
$ ./convert.sh
Folder of your circom files?
#It will ask to the folder of circom files, in our case is 3_fac.
$ 3_fac
#It will take as arg the folder of circom files, in our case is 3_fac.
$ ./convert.sh 3_fac
```

This will output the serialized proof and vk in its uncompressed form. It is important to point that the Plutus VM can operate uncompressed values, but will not let you store the uncompressed values as PlutusData. To store them as PlutusData you must do it in its compressed form, though the Aiken compiler can do the transformation under the hood for you.
Expand Down
12 changes: 3 additions & 9 deletions convert.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
#!/bin/bash

# Step 1: Echo "Path of your file?"
echo "Folder of your circom files?"

# Step 2: Take the relative path of the file from stdin and stored it in a variable called PROOF_PATH.
read CIRCOM_FILES_PATH

# Step 3: cd conversion.
cd $CIRCOM_FILES_PATH || exit 1
CIRCOM_FILES_PATH=$1

# Step 4: Inside conversion mkdir output.
#mkdir -p conv_outputs
cd $CIRCOM_FILES_PATH || exit 1

#node ../conversion/index.js "$CIRCOM_FILES_PATH" > conv_outputs/output.txt || exit 1
node ../conversion/index.js "$CIRCOM_FILES_PATH" || exit 1

echo "Conversion done!"
echo "Serialization done!"



0 comments on commit d00b08d

Please sign in to comment.