Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor bug in documentation #6

Open
nanaknihal opened this issue Jul 7, 2022 · 0 comments
Open

Minor bug in documentation #6

nanaknihal opened this issue Jul 7, 2022 · 0 comments

Comments

@nanaknihal
Copy link

In https://zokrates.github.io/toolbox/zokrates_js.html, const artifacts = zokratesProvider.compile(source) gave me the following error

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "main.zok:
         --> 1:30
  |
1 | def main(private field a) -> field { return a * a; }
  |                              ^---
  |
  = expected ty_array".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

This was fixed by changing const source = "def main(private field a) -> field { return a * a; }"; to const source = "def main(private field a) -> field: return a * a";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant