Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hash declaration in Scilla
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