Skip to content

Instantly share code, notes, and snippets.

@maxaleks
Created January 15, 2019 17:54
Show Gist options
  • Save maxaleks/d4fb01c7a4280e3a1065278731c5c95b to your computer and use it in GitHub Desktop.
Save maxaleks/d4fb01c7a4280e3a1065278731c5c95b to your computer and use it in GitHub Desktop.
import ListUtils BoolUtils
library First
let one_msg =
fun (msg : Message) =>
let nil_msg = Nil {Message} in
Cons {Message} msg nil_msg
contract First ()
transition callSecondSetHello (address : ByStr20, message : String)
accept;
msg = {_tag : "setHello"; _recipient : address; _amount : Uint128 0; message : message};
msgs = one_msg msg;
send msgs
end
contract Second ()
field welcome_msg : String = ""
transition setHello (message : String)
welcome_msg := message;
e = {_eventname : "Set hello"; message : message};
event e
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment