Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

/r/moul/demo/args/v0

Directory · 4 Files
README.md Open

gno.land/r/moul/demo/args

Step 2 of the r/moul/demo walkthrough: passing arguments to an exported function.

1func Hello(name string) string { return "Hello " + name + "!" }

Arguments arrive from the transaction as strings and are decoded into the declared parameter types. There is no state here: the realm reads its input and returns, so two identical calls return the same thing.

1gnokey maketx call -pkgpath gno.land/r/moul/demo/args \
2  -func Hello -args People -gas-fee 20000ugnot -gas-wanted 2000000 -broadcast moul

Previous: hello. Next: data adds state that survives the call.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

On mainnet: deployment status transactions unique callers deployed revision

⚠️ Disclaimer: provided as-is, without warranty; not security-audited. Full disclaimer: DISCLAIMER.