Skip to content

Instantly share code, notes, and snippets.

@saibakatar
Created October 18, 2018 07:07
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/2dd3a8f3d048fa9ee5a70204129f7a49 to your computer and use it in GitHub Desktop.
Save saibakatar/2dd3a8f3d048fa9ee5a70204129f7a49 to your computer and use it in GitHub Desktop.
Address declaration in Scilla
contract Address()
field a: Option ByStr20 = None {ByStr20} (*declaring variable a with no value*)
field b: ByStr20 = 0x1234567890123456789012345678901234567890
(*declaring variable b with some fixed value*)
transition update_value()
(*updating variable a*)
c = 0xabcd567890123456789012345678901234567890; (*declaring variable c with fixed value in the transition*)
tmp= Some {ByStr20} c;
a:= tmp;
(*updating variable b*)
d= 0xffff567890123456789012345678901234567890;
b:= d
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment