Realm

v1

gno.land/r/moul/x/daily/ratelimitdemo/v1

Render

Rate Limiter

Demo of the p/moul/x/daily/ratelimit library — an on-chain token-bucket limiter (port of golang.org/x/time/rate).

Config

ParameterValue
Rate (tokens/block)0.5
Burst (capacity)5
Clock height63542

Callers

No caller has hit the limiter yet.


Call Allow(cur) to consume a token; read Tokens(addr) for a caller's balance.

Source (qfile)

README.md
gnomod.toml
ratelimitdemo.gno