Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Block Number declaration in Scilla
contract Block()
field a: Option BNum = None {BNum} (*declaring variable a with no value*)
field b : BNum = BNum 5 (*declaring variable b with some fixed value*)
transition update_value()
(*updating variable a*)
c = BNum 6; (*declaring variable c with fixed value in the transition*)
tmp = Some {BNum} c;
a:= tmp;
(*updating variable b*)
d= BNum 7; (*declaring variable d in the transition*)
b:= d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment