Transaction
FCDD1B2E50C0EB…D7391D80ED3E
Block 26,010 · index 0 · indexed
Summary
- Hash
- FCDD1B2E50C0EB53A95B46D3EA0682E02BCF48DC1D6B95434721D7391D80ED3E
- Block
- 26,010
- Size
- 3979 bytes
- Gas used
- 8,306,882 / 9,968,318
- Fee
- 1000000ugnot
- Memo
- gnopublish
- Status
- success
Messages
Arguments · 9
- #1disjointsetdemo
- #2README.md
- #3# Union-Find > ⚠️ **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). --- Applies a fixed list of merges to `[0, 10)` and renders the resulting partition. Demo of the [`p/moul/x/daily/disjointset`](https://github.com/moul/gno-contracts/tree/main/p/moul/x/daily/disjointset/v0) library — every `Union`/`Find` comes from the package; this realm holds no union-find logic. Stateless, so `Render` is fully deterministic. The library's `Partition` is order-independent (groups sorted, ordered by smallest member), which is exactly why the output can be pinned in an example test at all. 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:**  > 🧪 **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 -->
- #4disjointsetdemo.gno
- #5// Package disjointsetdemo is a small gnoweb demo of the union-find structure // provided by the [p/moul/x/daily/disjointset](/p/moul/x/daily/disjointset/v0) // library: it merges a fixed list of pairs and shows the resulting partition. // // It contains no union-find logic of its own. Stateless, so Render is // deterministic — and the library's Partition is order-independent, which is // what makes the output safe to pin. package disjointsetdemo import ( "strconv" "strings" "gno.land/p/moul/x/daily/disjointset/v0" ) // n is the universe size; pairs are the merges applied, in order. const n = 10 var pairs = [][2]int{{0, 1}, {2, 3}, {1, 3}, {5, 6}, {7, 8}, {8, 9}} func build() *disjointset.DisjointSet { d := disjointset.New(n) for _, p := range pairs { d.Union(p[0], p[1]) } return d } // Render renders the demo for gnoweb. func Render(path string) string { d := build() var b strings.Builder b.WriteString("# Union-Find\n\n") b.WriteString("Disjoint-set forest with path compression and union by rank, demoing the ") b.WriteString("[`p/moul/x/daily/disjointset`](/p/moul/x/daily/disjointset/v0) library.\n\n") b.WriteString("## Merges applied\n\n") for _, p := range pairs { b.WriteString("- `Union(") b.WriteString(strconv.Itoa(p[0])) b.WriteString(", ") b.WriteString(strconv.Itoa(p[1])) b.WriteString(")`\n") } b.WriteString("\n## Partition of [0, ") b.WriteString(strconv.Itoa(n)) b.WriteString(")\n\n**") b.WriteString(strconv.Itoa(d.Groups())) b.WriteString("** groups:\n\n") for _, g := range d.Partition() { b.WriteString("- `{") nums := []string{} for _, x := range g { nums = append(nums, strconv.Itoa(x)) } b.WriteString(strings.Join(nums, ", ")) b.WriteString("}`\n") } b.WriteString("\n> Groups come out sorted, ordered by their smallest member, ") b.WriteString("so the partition is identical whatever order the merges arrive in.\n") return b.String() }
- #6gnomod.toml
- #7module = "gno.land/r/moul/x/daily/disjointsetdemo/v0" gno = "0.9"
- #8/gno.MemPackageType
- #9 MPUserProd
Result log
msg:0,success:true,log:,events:[]