Add network communication for hello-world example

This commit is contained in:
Pavel Murygin
2021-09-11 16:00:50 +03:00
parent a9a97e7e84
commit a9ab67b6fe
5 changed files with 102 additions and 3 deletions

View File

@ -1,5 +1,12 @@
import Peer from "@fluencelabs/aqua-lib/builtin.aqua"
service HelloWorld("hello-world"):
hello(str: string)
func sayHello():
HelloWorld.hello("Hello, world!")
HelloWorld.hello("Hello, world!")
func getRelayTime() -> u64:
on HOST_PEER_ID:
ts <- Peer.timestamp_ms()
<- ts