Skip to Content

Hello entry

Focus: one callable hello entry that builds and returns a greeting.

Open in Playground 

hello.slx
entry hello(name: string) -> string { let message: string = "Hello, " + name // Debug print: by default, nodes do not show println output. println(message) return message }

How it works

  • entry hello(name: string) -> string is the single public function in this example.
  • let message: string = "Hello, " + name builds the returned value.
  • println(message) is useful while debugging locally, but default node configuration does not display its output.
  • return message produces a typed exit value. On-chain, it is stored in the contract logs.
Last updated on