Select a file to view its exact on-chain source. Sorted README → gnomod → sources → tests.
Allow(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}) bool
Render
SetConfig(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, rate float64, burst float64)
Tokens(addr string) int
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
# Rate Limiter
Demo of the [`p/moul/x/daily/ratelimit`](/p/moul/x/daily/ratelimit/v0) library — an on-chain token-bucket limiter (port of `golang.org/x/time/rate`).
## Config
| Parameter | Value |
|---|---|
| Rate (tokens/block) | 0.5 |
| Burst (capacity) | 5 |
| Clock height | 193844 |
## Callers
_No caller has hit the limiter yet._
---
Call `Allow(cur)` to consume a token; read `Tokens(addr)` for a caller's balance.
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.