Skip to content

Commit

Permalink
satisfying!
Browse files Browse the repository at this point in the history
  • Loading branch information
Autoparallel committed Aug 14, 2024
1 parent 17f1105 commit 7294dd5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
16 changes: 16 additions & 0 deletions circuits.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@
3
]
},
"value_array_nested": {
"file": "extract",
"template": "Extract",
"params": [
24,
5
]
},
"value_array_object": {
"file": "extract",
"template": "Extract",
"params": [
25,
5
]
},
"value_object": {
"file": "extract",
"template": "Extract",
Expand Down
4 changes: 2 additions & 2 deletions circuits/parser.circom
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ template RewriteStack(n) {
isArray.in[0] <== topOfStack.out[0];
isArray.in[1] <== 2;

log("isArray: ", isArray.out);
// log("isArray: ", isArray.out);

component readComma = IsEqual();
readComma.in[0] <== 4;
readComma.in[1] <== stack_val;

log("readComma: ", readComma.out);
// log("readComma: ", readComma.out);

signal READ_COMMA_AND_IN_ARRAY <== (1 - readComma.out) + (1 - isArray.out); // POORLY NAMED. THIS IS MORE LIKE XNOR or something.
component isReadCommaAndInArray = IsZero();
Expand Down
1 change: 1 addition & 0 deletions json_examples/test/value_array_nested.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "a": [[1,0],[0,1,3]] }
1 change: 1 addition & 0 deletions json_examples/test/value_array_object.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"a":[{"b":5},{"c":"b"}]}

0 comments on commit 7294dd5

Please sign in to comment.