I'm trying to write and compile a ZoKrates program that verifies if a private number x satisfies x^2 == 16. The program in ZoKrates should look like this:
def main(private field x) -> field:
field y = x * x
assert y == 16
return y
However, when I try to compile the file using the command:
zokrates compile -i square.zok
I get the following error:
square.zok:
--> 1:30
|
1 | def main(private field x) -> field:
| ^---
|
= expected ty_array