Skip to content

Minor bug in documentation #6

Description

@nanaknihal

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";

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions