Skip to content
Lattice

RateLimiterBucket

Git Source

Storage bucket for a single rate limit key.

struct RateLimiterBucket {
    uint256 capacity;
    uint256 refillRate; // tokens per second
    uint256 tokens;
    uint48 lastRefill;
}

Properties

NameTypeDescription
capacityuint256
refillRateuint256
tokensuint256
lastRefilluint48