Skip to content

Instantly share code, notes, and snippets.

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