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

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v0 source realm

Readme View source

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.

Functions 1

Dependencies

Imports 0

Imports nothing.

/r/g1magld5ptgzaktqcexxq0pgq5lmdf0kz6re8hlv/demo/args/v0

Imported by indexer

Source Files 4