PathrockNetwork Gno Explorer
HomeBlocksTransactionsRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/moul/x/daily/orderedmapdemo/v0

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v0
Namespace
moul / x / daily / orderedmapdemo
Files
3 (README)(gnomod.toml)
Exported functions
1
Module
gno.land/r/moul/x/daily/orderedmapdemo/v0
gno
0.9

Files (3)

  • README.mdmarkdown
  • gnomod.tomltoml
  • orderedmapdemo.gnogno

Select a file to view its exact on-chain source. Sorted README → gnomod → sources → tests.

Functions

  • Render(path string) string

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

Rendered
RenderedRawgnoweb ↗
# Ordered Map

A map that remembers insertion order, demoing the [`p/moul/x/daily/orderedmap`](/p/moul/x/daily/orderedmap/v0) library.

## Inserted

`delta, alpha, charlie, bravo` → order kept as inserted, **not** sorted:

| # | key | value |
|---|---|---|
| 1 | `delta` | `4` |
| 2 | `alpha` | `1` |
| 3 | `charlie` | `3` |
| 4 | `bravo` | `2` |

## After `Set("alpha", "99")`

Updating keeps the original position — insertion order means *first* insertion:

| # | key | value |
|---|---|---|
| 1 | `delta` | `4` |
| 2 | `alpha` | `99` |
| 3 | `charlie` | `3` |
| 4 | `bravo` | `2` |

## After deleting and re-adding `charlie`

Re-inserting is a **new** insertion, so it goes last:

| # | key | value |
|---|---|---|
| 1 | `delta` | `4` |
| 2 | `alpha` | `99` |
| 3 | `bravo` | `2` |
| 4 | `charlie` | `new` |

> gno map iteration order is unspecified. A realm that ranges over a built-in map to build its page can emit a different page every call — a consensus bug, not a cosmetic one. This is the fix.

vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.