v0 source realm
Package semverdemo is a small on-chain demo of the semantic-versioning parser/comparator provided by the [p/moul/x/da...
View source
gno.land/r/moul/x/daily/semverdemo/v0
Live demo of the p/moul/x/daily/semver
Semantic Versioning library.
Holds the realm state the pure library deliberately does not — a "submitted
versions" board (an avl.Tree of version string → submitter address) — and
wires it to the chain, keying each submission by unsafe.PreviousRealm().Address():
Submit(cur, version)— validate withsemver.Parseand post a version on-chain.Render("/")— overview plus a table of worked examples.Render("/<a>/<b>")— parse both and show the comparison, e.g./1.2.3/1.2.10.Render("/sorted")— everyone's submissions, lowest → highest precedence.
All parsing and comparison math lives in the library; this realm is just the
board, the wiring, and the gnoweb view. Render it at
/r/moul/x/daily/semverdemo/v0.
Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
Dependency graph:

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.
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.
2
func Submit
crossing ActionSubmit 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.
7
- chain stdlib
- chain/runtime/unsafe stdlib
- gno.land/p/moul/x/daily/semver/v0 package
- gno.land/p/nt/avl/v0 package
- sort stdlib
- strconv stdlib
- strings stdlib