Render
Command
gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/moul/x/daily/semverdemo/v0.Render()"
Result
Package semverdemo is a small on-chain demo of the semantic-versioning parser/comparator provided by the p/moul/x/daily/semver(/p/moul/x/daily/semver/v0) library.
It holds the realm state the pure library deliberately does not: a "submitted versions" board (an avl tree of version string -> submitter address) that anyone can post to with Submit, plus a gnoweb Render view that lists them in SemVer precedence order and compares arbitrary pairs. All parsing and comparison math lives in the library; this realm is just the on-chain wiring and the view.
gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/moul/x/daily/semverdemo/v0.Render()"
Submit stores a valid version on-chain, tagged with the caller's address, so Render("/sorted") can list everyone's submissions in precedence order. It validates the input with semver.Parse and panics on anything malformed.
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/moul/x/daily/semverdemo/v0" -func "Submit" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "http://127.0.0.1:26657" ADDRESSgnokey query -remote "http://127.0.0.1:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/x/daily/semverdemo/v0" -func "Submit" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "http://127.0.0.1:26657" call.tx