I am trying to work on Zokrates in Remix IDE
I am trying this code :
import "hashes/sha3/512bit" as sha256packed
def main(private field value, private field before, field valueHash, field beforeHash, field afterHash) -> (field):
priBefore = sha256packed([0, 0, 0, before])
priAfter = sha256packed([0, 0, 0, before-value])
field result = if(\
value <= before &&\
priBefore[0] == beforeHash &&\
priAfter[0] == afterHash \
) then 1 else 0 fi
return result
The code is from AwesomeHuang's Github repository
However, i am getting the following error in the Zokrates compiler :
Can anyone help me resolve this error ?
I am new to Zero Knowledge Proofs and to Zokrates itself, hence i am quite confused
I would be grateful for the help !