RateLimited
Functions
constructor
Parameters
_maxRateLimitPerSecond
uint256
_rateLimitPerSecond
uint256
_bufferCap
uint256
_doPartialAction
bool
setRateLimitPerSecond
set the rate limit per second
Parameters
newRateLimitPerSecond
uint256
setBufferCap
set the buffer cap
Parameters
newBufferCap
uint256
buffer
the amount of action used before hitting limit
replenishes at rateLimitPerSecond per second up to bufferCap
_depleteBuffer
the method that enforces the rate limit. Decreases buffer by "amount". If buffer is <= amount either 1. Does a partial mint by the amount remaining in the buffer or 2. Reverts Depending on whether doPartialAction is true or false
Parameters
amount
uint256
_setRateLimitPerSecond
Parameters
newRateLimitPerSecond
uint256
_setBufferCap
Parameters
newBufferCap
uint256
_resetBuffer
_updateBufferStored
Events
BufferUsed
Parameters
amountUsed
uint256
bufferRemaining
uint256
### BufferCapUpdate
Parameters
oldBufferCap
uint256
newBufferCap
uint256
### RateLimitPerSecondUpdate
Parameters
oldRateLimitPerSecond
uint256
newRateLimitPerSecond
uint256
Last updated