最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

blockchain - Error while trying to compiler Zokrates file: square.zok - Stack Overflow

programmeradmin1浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论