Transaction

1A0CD779C23D52…1CEB9CB241F2

Block 26,006 · index 0 · indexed

Summary

Hash
1A0CD779C23D5218D7783B8914111B6619650316D148B85E6D071CEB9CB241F2
Block
26,006
Size
2603 bytes
Gas used
6,965,980 / 8,359,236
Fee
1000000ugnot
Memo
gnopublish
Status
success

Messages

Arguments · 9

  1. #1cowsaydemo
  2. #2README.md
  3. #3# `gno.land/r/moul/x/daily/cowsaydemo/v0` Interactive gnoweb **demo of the [`p/moul/x/daily/cowsay`](https://github.com/moul/gno-contracts/tree/main/p/moul/x/daily/cowsay/v0) library** — it makes the classic ASCII cow say whatever you put in the path. It has no rendering logic of its own. Append a message to the path to make the cow say it, e.g. [`/r/moul/x/daily/cowsaydemo/v0:Hello, gno.land!`](https://gno.land/r/moul/x/daily/cowsaydemo/v0:Hello,%20gno.land!). <!-- 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/cowsaydemo/v0 dependency graph](https://raw.githubusercontent.com/moul/gno-contracts/main/_assets/gno.land/r/moul/x/daily/cowsaydemo/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. #4cowsaydemo.gno
  5. #5// Package cowsaydemo is a small gnoweb demo of the cowsay renderer provided by // the [p/moul/x/daily/cowsay](/p/moul/x/daily/cowsay/v0) library: it makes the // ASCII cow say whatever you put in the path. // // It contains no rendering logic of its own — the art comes entirely from // `cowsay.Say`. package cowsaydemo import ( "strings" "gno.land/p/moul/x/daily/cowsay/v0" ) // Render displays the cow for gnoweb. // // Render("") -> default message ("Moo!") // Render("/hello there") -> renders "hello there", word-wrapped func Render(path string) string { msg := strings.TrimLeft(path, "/") art := cowsay.Say(msg) var b strings.Builder b.WriteString("# cowsay\n\n") if strings.TrimSpace(msg) == "" { b.WriteString("_Tip: pass a message in the path, e.g._ `/Hello, gno.land!`\n\n") } b.WriteString("```\n") b.WriteString(art) b.WriteString("```\n") return b.String() }
  6. #6gnomod.toml
  7. #7module = "gno.land/r/moul/x/daily/cowsaydemo/v0" gno = "0.9"
  8. #8/gno.MemPackageType
  9. #9 MPUserProd

Result log

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

← Back to block 26,006