Skip to content

Instantly share code, notes, and snippets.

@saibakatar
Created October 18, 2018 07:09
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/969321353d4b6116b5ccb04233e460c3 to your computer and use it in GitHub Desktop.
Save saibakatar/969321353d4b6116b5ccb04233e460c3 to your computer and use it in GitHub Desktop.
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
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment