Transaction

7EC9A35572CF25…68E93CDB3303

Block 25,991 · index 0 · indexed

Summary

Hash
7EC9A35572CF251942C6F384BED9C8B4199BDC70938B018617DE68E93CDB3303
Block
25,991
Size
4849 bytes
Gas used
9,206,622 / 11,048,006
Fee
1000000ugnot
Memo
gnopublish
Status
success

Messages

Arguments · 9

  1. #1base32demo
  2. #2README.md
  3. #3# Base32 > ⚠️ **Experimental — generated with no human supervision** by the daily MCP pipeline to exercise gno tooling. Not audited. See [r/moul/x/daily](https://github.com/moul/gno-contracts/blob/main/r/moul/x/daily/README.md). --- Shows the RFC 4648 vectors beside Crockford, then the forgiving decodes that Crockford allows. ``` /r/moul/x/daily/base32demo/v0 → vectors + Crockford forgiveness /r/moul/x/daily/base32demo/v0:hello → encode your own text both ways ``` Demo of the [`p/moul/x/daily/base32`](https://github.com/moul/gno-contracts/tree/main/p/moul/x/daily/base32/v0) library — no codec logic lives here. Stateless, so `Render` is deterministic. The input column is the RFC 4648 §10 vector set at every partial-group length, so the pinned example output doubles as a conformance test. The second section is the actual argument for Crockford: the same identifier decodes whether it is lowercased or hyphenated. Built for gno 0.9. <!-- BEGIN GNOCONTRACTS FOOTER (generated by `make readmes`; do not edit below) --> --- Part of **[moul/gno-contracts](https://github.com/moul/gno-contracts)** — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage. **Dependency graph:** ![gno.land/r/moul/x/daily/base32demo/v0 dependency graph](https://raw.githubusercontent.com/moul/gno-contracts/main/_assets/gno.land/r/moul/x/daily/base32demo/v0/deps.png) > 🧪 **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](https://github.com/moul/gno-contracts/blob/main/DISCLAIMER.md). <!-- END GNOCONTRACTS FOOTER -->
  4. #4base32demo.gno
  5. #5// Package base32demo is a small gnoweb demo of the base32 codec provided by the // [p/moul/x/daily/base32](/p/moul/x/daily/base32/v0) library: it shows the RFC // 4648 vectors alongside Crockford, and the forgiving decodes Crockford allows. // // It contains no codec logic of its own. Stateless, so Render is deterministic. package base32demo import ( "strings" "gno.land/p/moul/x/daily/base32/v0" ) // The RFC 4648 §10 vectors — every partial-group length. var vectors = []string{"", "f", "fo", "foo", "foob", "fooba", "foobar"} // Render renders the demo for gnoweb. // // Render("") / Render("/") -> the vectors + Crockford forgiveness // Render("/<text>") -> encode that text both ways func Render(path string) string { var b strings.Builder b.WriteString("# Base32\n\n") b.WriteString("RFC 4648 and Crockford, demoing the ") b.WriteString("[`p/moul/x/daily/base32`](/p/moul/x/daily/base32/v0) library.\n\n") if in := parseArg(path); in != "" { std, _ := base32.Encode(in) ck, _ := base32.EncodeCrockford(in) b.WriteString("## `") b.WriteString(in) b.WriteString("`\n\n- RFC 4648: `") b.WriteString(std) b.WriteString("`\n- Crockford: `") b.WriteString(ck) b.WriteString("`\n") return b.String() } b.WriteString("| input | RFC 4648 | Crockford |\n|---|---|---|\n") for _, v := range vectors { std, _ := base32.Encode(v) ck, _ := base32.EncodeCrockford(v) b.WriteString("| ") if v == "" { b.WriteString("_(empty)_") } else { b.WriteString("`" + v + "`") } b.WriteString(" | `") b.WriteString(std) b.WriteString("` | `") b.WriteString(ck) b.WriteString("` |\n") } b.WriteString("\n## Crockford forgives\n\n") enc, _ := base32.EncodeCrockford("hello") b.WriteString("`hello` encodes to `") b.WriteString(enc) b.WriteString("`, and all of these decode back to it:\n\n") variants := []string{enc, strings.ToLower(enc), enc[:2] + "-" + enc[2:]} for _, v := range variants { dec, err := base32.DecodeCrockford(v) b.WriteString("- `") b.WriteString(v) b.WriteString("` → ") if err == nil && dec == "hello" { b.WriteString("`hello` ✅") } else { b.WriteString("❌") } b.WriteString("\n") } b.WriteString("\n> Crockford folds case, reads `I`/`L` as `1` and `O` as `0`, and ") b.WriteString("ignores hyphens — so an identifier survives being read aloud and typed back. ") b.WriteString("`U` is left out of the alphabet on purpose.\n") return b.String() } func parseArg(path string) string { s := strings.TrimSpace(path) s = strings.TrimPrefix(s, "/") if i := strings.IndexByte(s, '/'); i >= 0 { s = s[:i] } return s }
  6. #6gnomod.toml
  7. #7module = "gno.land/r/moul/x/daily/base32demo/v0" gno = "0.9"
  8. #8/gno.MemPackageType
  9. #9 MPUserProd

Result log

msg:0,success:true,log:,events:[]

← Back to block 25,991