Skip to content

Commit

Permalink
fix some example code issues in https://docs.circom.io/ (#324)
Browse files Browse the repository at this point in the history
Co-authored-by: yushihang <shihang.yu@hsbc.com>
  • Loading branch information
yushihang and yushihang authored Jan 7, 2025
1 parent ddeb558 commit 7a27234
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mkdocs/docs/circom-language/code-quality/inspect.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ When using --inspect option, the compiler searches for signals that may be under
1) The compiler throws a warning if a signal defined in a template does not appear in any constraint of such template for the given instantiation.

```
template B(n) {
template B() {
signal input in;
signal input out;
signal output out;
out <== in + 1;
}
Expand Down
4 changes: 3 additions & 1 deletion mkdocs/docs/circom-language/templates-and-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ template B(N){
else{
a = A(0);
}
a.in <== 1;
a.out ==> out;
}
component main = B(1);
Expand Down Expand Up @@ -171,7 +173,7 @@ component comp = parallel NameTemplate(...){...}
A real example of use case is the following piece of code from the rollup code:
```
component rollupTx[nTx];
for (i = 0; i < nTx; i++) {
for (var i = 0; i < nTx; i++) {
rollupTx[i] = parallel RollupTx(nLevels, maxFeeTx);
}
```
Expand Down

0 comments on commit 7a27234

Please sign in to comment.