Created
January 15, 2019 17:54
-
-
Save maxaleks/d4fb01c7a4280e3a1065278731c5c95b to your computer and use it in GitHub Desktop.
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
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 |
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 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