Skip to content

Commit 7a27234

Browse files
yushihangyushihang
andauthored
fix some example code issues in https://docs.circom.io/ (#324)
Co-authored-by: yushihang <shihang.yu@hsbc.com>
1 parent ddeb558 commit 7a27234

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

mkdocs/docs/circom-language/code-quality/inspect.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ When using --inspect option, the compiler searches for signals that may be under
99
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.
1010

1111
```
12-
template B(n) {
12+
template B() {
1313
signal input in;
14-
signal input out;
14+
signal output out;
1515
out <== in + 1;
1616
}
1717

mkdocs/docs/circom-language/templates-and-components.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ template B(N){
117117
else{
118118
a = A(0);
119119
}
120+
a.in <== 1;
121+
a.out ==> out;
120122
}
121123
122124
component main = B(1);
@@ -171,7 +173,7 @@ component comp = parallel NameTemplate(...){...}
171173
A real example of use case is the following piece of code from the rollup code:
172174
```
173175
component rollupTx[nTx];
174-
for (i = 0; i < nTx; i++) {
176+
for (var i = 0; i < nTx; i++) {
175177
rollupTx[i] = parallel RollupTx(nLevels, maxFeeTx);
176178
}
177179
```

0 commit comments

Comments
 (0)