Skip to content

Instantly share code, notes, and snippets.

@saibakatar
Created October 18, 2018 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saibakatar/3a3959eca79709762ff286d5f9c2913e to your computer and use it in GitHub Desktop.
Save saibakatar/3a3959eca79709762ff286d5f9c2913e to your computer and use it in GitHub Desktop.
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
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment