Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

README.md

2.41 Kb · 33 lines

gno.land/r/nym-moultest123/x/daily/ratelimitdemo/v0

Live demo of the p/moul/x/daily/ratelimit token-bucket rate limiter.

Holds one package-level ratelimit.Limiter (0.5 tokens/block, capacity 5) and wires it to the chain — the tick is runtime.ChainHeight(), each caller is keyed by unsafe.PreviousRealm().Address():

  • Allow(cur) bool — consume one token for the caller.
  • SetConfig(cur, rate, burst) — retune the shared bucket.
  • Tokens(addr) int — read-only balance.
  • Render("/") — config + a table of callers; Render("/addr/<address>") focuses one.

All refill/consume math lives in the library; this realm is just the wiring and the gnoweb view. Render it at /r/nym-moultest123/x/daily/ratelimitdemo/v0.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

On mainnet: deployment status transactions unique callers deployed revision

Dependency graph:

gno.land/r/nym-moultest123/x/daily/ratelimitdemo/v0 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.