Created
October 18, 2018 07:04
-
-
Save saibakatar/436c75df6da75c694245e70a23d4785b to your computer and use it in GitHub Desktop.
Hash declaration in Scilla
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Hash() | |
field a: Option ByStr32 = None {ByStr32} (*declaring variable a with no value*) | |
field b: ByStr32 = 0x123456789012345678901234567890123456789012345678901234567890abff | |
(*declaring variable b with some fixed value*) | |
transition update_value() | |
(*updating variable a*) | |
c = 0xabff567890123456789012345678901234567890123456789012345678901234; (*declaring variable c with fixed value in the transition*) | |
tmp= Some {ByStr32} c; | |
a:= tmp; | |
(*updating variable b*) | |
d= 0xffff567890123456789012345678901234567890123456789012345678901234; | |
b:= d | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment