IGlobalRateLimitedMinter
global contract to handle rate limited minting of VOLT on a global level allows whitelisted minters to call in and specify the address to mint VOLT to within the calling contract's limits
Methods
addAddress
function addAddress(address, uint112, uint112) external nonpayable
add an authorized contract, its per second replenishment and buffer
Parameters
Name | Type | Description |
---|
_0 | address | undefined |
_1 | uint112 | undefined |
_2 | uint112 | undefined |
addAddressAsMinter
function addAddressAsMinter(address) external nonpayable
add an authorized contract, its per second replenishment and buffer set to the non governor caps
Parameters
Name | Type | Description |
---|
_0 | address | undefined |
getBufferCap
function getBufferCap(address) external view returns (uint256)
the cap of the buffer that can be used at once
Parameters
Name | Type | Description |
---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
getLastBufferUsedTime
function getLastBufferUsedTime(address) external view returns (uint256)
the last time the buffer was used by each address
Parameters
Name | Type | Description |
---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
getRateLimitPerSecond
function getRateLimitPerSecond(address) external view returns (uint256)
the rate per second for each address
Parameters
Name | Type | Description |
---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
individualBuffer
function individualBuffer(address) external view returns (uint112)
the amount of action that can be used before hitting limit
replenishes at rateLimitPerSecond per second up to bufferCap
Parameters
Name | Type | Description |
---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|
_0 | uint112 | undefined |
mintMaxAllowableVolt
function mintMaxAllowableVolt(address to) external nonpayable
mint VOLT to the target address and deplete the whole rate limited minter's buffer, pausable and completely depletes the msg.sender's buffer
Parameters
Name | Type | Description |
---|
to | address | the recipient address of the minted VOLT mints all VOLT that msg.sender has in the buffer |
mintVolt
function mintVolt(address to, uint256 amount) external nonpayable
function that all VOLT minters call to mint VOLT pausable and depletes the msg.sender's buffer
Parameters
Name | Type | Description |
---|
to | address | the recipient address of the minted VOLT |
amount | uint256 | the amount of VOLT to mint |
removeAddress
function removeAddress(address) external nonpayable
remove an authorized contract
Parameters
Name | Type | Description |
---|
_0 | address | undefined |
updateAddress
function updateAddress(address, uint112, uint112) external nonpayable
update an authorized contract
Parameters
Name | Type | Description |
---|
_0 | address | undefined |
_1 | uint112 | undefined |
_2 | uint112 | undefined |
updateMaxBufferCap
function updateMaxBufferCap(uint256 newBufferCap) external nonpayable
update the non gov max buffer cap
Parameters
Name | Type | Description |
---|
newBufferCap | uint256 | undefined |
updateMaxRateLimitPerSecond
function updateMaxRateLimitPerSecond(uint256 newMaxRateLimitPerSecond) external nonpayable
update the non gov max rate limit per second
Parameters
Name | Type | Description |
---|
newMaxRateLimitPerSecond | uint256 | undefined |
Events
IndividualBufferUsed
event IndividualBufferUsed(address rateLimitedAddress, uint256 amountUsed, uint256 bufferRemaining)
emitted when a buffer is eaten into
Parameters
Name | Type | Description |
---|
rateLimitedAddress | address | undefined |
amountUsed | uint256 | undefined |
bufferRemaining | uint256 | undefined |
IndividualRateLimitPerSecondUpdate
event IndividualRateLimitPerSecondUpdate(address rateLimitedAddress, uint256 oldRateLimitPerSecond, uint256 newRateLimitPerSecond)
emitted when rate limit is updated
Parameters
Name | Type | Description |
---|
rateLimitedAddress | address | undefined |
oldRateLimitPerSecond | uint256 | undefined |
newRateLimitPerSecond | uint256 | undefined |
MultiBufferCapUpdate
event MultiBufferCapUpdate(uint256 oldBufferCap, uint256 newBufferCap)
emitted when the non gov buffer cap max is updated
Parameters
Name | Type | Description |
---|
oldBufferCap | uint256 | undefined |
newBufferCap | uint256 | undefined |
MultiMaxRateLimitPerSecondUpdate
event MultiMaxRateLimitPerSecondUpdate(uint256 oldMaxRateLimitPerSecond, uint256 newMaxRateLimitPerSecond)
emitted when the non gov buffer rate limit per second max is updated
Parameters
Name | Type | Description |
---|
oldMaxRateLimitPerSecond | uint256 | undefined |
newMaxRateLimitPerSecond | uint256 | undefined |