Skip to content

Instantly share code, notes, and snippets.

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