Transaction

ACAE1E2B6142D3…D30133208B6A

Block 26,075 · index 0 · indexed

Summary

Hash
ACAE1E2B6142D3162DB9BC6CDE508599B66B597F956FA68D9359D30133208B6A
Block
26,075
Size
3983 bytes
Gas used
8,345,740 / 10,014,948
Fee
1000000ugnot
Memo
gnopublish
Status
success

Messages

Arguments · 9

  1. #1humanizedemo
  2. #2README.md
  3. #3# Humanize > ⚠️ **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). --- Renders byte sizes, thousands separators, ordinals and block counts side by side. Demo of the [`p/moul/x/daily/humanize`](https://github.com/moul/gno-contracts/tree/main/p/moul/x/daily/humanize/v0) library — no formatting logic lives here. Stateless, so `Render` is deterministic. The ordinals row is chosen to show the teens (`11th`/`12th`/`13th`), which is where naive implementations produce `11st`. The block-count rows show the deliberate vagueness: block counts are not wall-clock durations. 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/humanizedemo/v0 dependency graph](https://raw.githubusercontent.com/moul/gno-contracts/main/_assets/gno.land/r/moul/x/daily/humanizedemo/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. #4gnomod.toml
  5. #5module = "gno.land/r/moul/x/daily/humanizedemo/v0" gno = "0.9"
  6. #6humanizedemo.gno
  7. #7// Package humanizedemo is a small gnoweb demo of the human-facing formatters // provided by the [p/moul/x/daily/humanize](/p/moul/x/daily/humanize/v0) // library: byte sizes, thousands separators, ordinals and block counts. // // It contains no formatting logic of its own. Stateless, so Render is // deterministic. package humanizedemo import ( "strconv" "strings" "gno.land/p/moul/x/daily/humanize/v0" ) var sizes = []int64{0, 999, 1024, 1536, 1048576, 1073741824} var counts = []int64{0, 1000, 1234567} var ordinals = []int64{1, 2, 3, 11, 12, 13, 21, 101} var blocks = []int64{0, 1, 15, 1234} // Render renders the demo for gnoweb. func Render(path string) string { var b strings.Builder b.WriteString("# Humanize\n\n") b.WriteString("Integer-only formatting for people, demoing the ") b.WriteString("[`p/moul/x/daily/humanize`](/p/moul/x/daily/humanize/v0) library.\n\n") b.WriteString("## Bytes\n\n| n | rendered |\n|---|---|\n") for _, n := range sizes { row(&b, strconv.FormatInt(n, 10), humanize.Bytes(n)) } b.WriteString("\n## Thousands\n\n| n | rendered |\n|---|---|\n") for _, n := range counts { row(&b, strconv.FormatInt(n, 10), humanize.Comma(n)) } b.WriteString("\n## Ordinals\n\n") parts := []string{} for _, n := range ordinals { parts = append(parts, humanize.Ordinal(n)) } b.WriteString("`" + strings.Join(parts, "` · `") + "`\n") b.WriteString("\n> 11th/12th/13th, not 11st/12nd/13rd — the teens are the trap.\n") b.WriteString("\n## Block counts\n\n| blocks | rendered |\n|---|---|\n") for _, n := range blocks { row(&b, strconv.FormatInt(n, 10), humanize.Blocks(n)) } b.WriteString("\n> Deliberately vague, and in **blocks**: there is no wall clock ") b.WriteString("on chain, so \"about 2 hours\" would be a lie dressed as precision.\n") return b.String() } func row(b *strings.Builder, a, c string) { b.WriteString("| `") b.WriteString(a) b.WriteString("` | ") b.WriteString(c) b.WriteString(" |\n") }
  8. #8/gno.MemPackageType
  9. #9 MPUserProd

Result log

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

← Back to block 26,075