Skip to main content

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

NameTypeDescription
_0addressundefined
_1uint112undefined
_2uint112undefined

addAddressAsMinter

function addAddressAsMinter(address) external nonpayable

add an authorized contract, its per second replenishment and buffer set to the non governor caps

Parameters

NameTypeDescription
_0addressundefined

getBufferCap

function getBufferCap(address) external view returns (uint256)

the cap of the buffer that can be used at once

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

getLastBufferUsedTime

function getLastBufferUsedTime(address) external view returns (uint256)

the last time the buffer was used by each address

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

getRateLimitPerSecond

function getRateLimitPerSecond(address) external view returns (uint256)

the rate per second for each address

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

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

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint112undefined

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

NameTypeDescription
toaddressthe 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

NameTypeDescription
toaddressthe recipient address of the minted VOLT
amountuint256the amount of VOLT to mint

removeAddress

function removeAddress(address) external nonpayable

remove an authorized contract

Parameters

NameTypeDescription
_0addressundefined

updateAddress

function updateAddress(address, uint112, uint112) external nonpayable

update an authorized contract

Parameters

NameTypeDescription
_0addressundefined
_1uint112undefined
_2uint112undefined

updateMaxBufferCap

function updateMaxBufferCap(uint256 newBufferCap) external nonpayable

update the non gov max buffer cap

Parameters

NameTypeDescription
newBufferCapuint256undefined

updateMaxRateLimitPerSecond

function updateMaxRateLimitPerSecond(uint256 newMaxRateLimitPerSecond) external nonpayable

update the non gov max rate limit per second

Parameters

NameTypeDescription
newMaxRateLimitPerSeconduint256undefined

Events

IndividualBufferUsed

event IndividualBufferUsed(address rateLimitedAddress, uint256 amountUsed, uint256 bufferRemaining)

emitted when a buffer is eaten into

Parameters

NameTypeDescription
rateLimitedAddressaddressundefined
amountUseduint256undefined
bufferRemaininguint256undefined

IndividualRateLimitPerSecondUpdate

event IndividualRateLimitPerSecondUpdate(address rateLimitedAddress, uint256 oldRateLimitPerSecond, uint256 newRateLimitPerSecond)

emitted when rate limit is updated

Parameters

NameTypeDescription
rateLimitedAddressaddressundefined
oldRateLimitPerSeconduint256undefined
newRateLimitPerSeconduint256undefined

MultiBufferCapUpdate

event MultiBufferCapUpdate(uint256 oldBufferCap, uint256 newBufferCap)

emitted when the non gov buffer cap max is updated

Parameters

NameTypeDescription
oldBufferCapuint256undefined
newBufferCapuint256undefined

MultiMaxRateLimitPerSecondUpdate

event MultiMaxRateLimitPerSecondUpdate(uint256 oldMaxRateLimitPerSecond, uint256 newMaxRateLimitPerSecond)

emitted when the non gov buffer rate limit per second max is updated

Parameters

NameTypeDescription
oldMaxRateLimitPerSeconduint256undefined
newMaxRateLimitPerSeconduint256undefined