Realm
gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/ratelimit
Rendered output
Rate Limiter
Token-bucket limiter (port of golang.org/x/time/rate), on-chain.
Config
| Parameter | Value |
|---|---|
| Rate (tokens/block) | 0.5 |
| Burst (capacity) | 5 |
| Clock height | 605906 |
Callers
No caller has hit the limiter yet.
Call Allow(cur) to consume a token; read Tokens(addr) for a caller's balance.
Query (read-only)
non-crossing functions · no tx, no wallet neededTokens(addr string) → int
Call functions (state-changing)
signs a tx via AdenaAllow()
SetConfig(newRate float64, newBurst float64)
All exported functions (4)
show raw signatures
| Name | Params | Returns |
|---|---|---|
| Allow | [{"Name": "cur", "Type": "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}", "Value": ""}] | [{"Name": ".res.0", "Type": "bool", "Value": ""}] |
| SetConfig | [{"Name": "cur", "Type": "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}", "Value": ""}, {"Name": "newRate", "Type": "float64", "Value": ""}, {"Name": "newBurst", "Type": "float64", "Value": ""}] | — |
| Tokens | [{"Name": "addr", "Type": "string", "Value": ""}] | [{"Name": ".res.0", "Type": "int", "Value": ""}] |
| Render | [{"Name": "path", "Type": "string", "Value": ""}] | [{"Name": ".res.0", "Type": "string", "Value": ""}] |
Files
Storage
{
"raw": "storage: 11451, deposit: 1145100"
}