1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/zokrates_cli/examples/complex_call_in_constant.zok

14 lines
No EOL
267 B
Text

def constant() -> u32:
u32 res = 0
u32 x = 3
for u32 y in 0..x do
res = res + 1
endfor
return res
const u32 CONSTANT = 1 + constant()
const u32 OTHER_CONSTANT = 42
def main(field[CONSTANT] a) -> u32:
return CONSTANT + OTHER_CONSTANT