Comment on page
The Reserve contract provides historical lookups of a token balance increase during a target time range. As the Reserve contract transfers OUT tokens, the withdrawal accumulator is increased. When tokens are transferred IN new checkpoint can be created if
checkpoint()is called after transferring tokens. By using the reserve and withdrawal accumulators to create a new checkpoint, any contract or account can look up the balance increase of the reserve for a target time range. By calculating the total held tokens in a specific time range, contracts that require knowledge of captured interest during a draw period, can easily call into the Reserve and deterministically determine the newly acquired tokens for that time range.
Allows to initialize the contract during the deployment. Constructs Reserve with passed parameters.
Create observation checkpoint in ring buffer. Calculates total deposited tokens since last checkpoint and creates a new accumulator checkpoint.
Transfer Reserve token balance to recipient address. Creates checkpoint before token transfer. Increments
pendingOwneraddress to claim the owner role. This function is only callable by the
Leaves the contract without owner. It will not be possible to call the owner's functions anymore. Can only be called by the current owner. The method does not take any parameters. Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
Transfers ownership of the contract to a
_pendingOwner. Can only be called by the current owner.
Allows the owner to give the manager role to an address. The manager role has access to the functions with the modified
Calculate token accumulation between timestamp range. Search the ring buffer for two checkpoint observations and diffs accumulator amount.
Read global token value. It is the token that the reserve will accept.
Total withdrawal amount from reserve.
An account that is the owner of the contract. It has access to the functions that use the modified
Address that can claim the owner role. It is used to transfer the owner.
Manager role that can be granted exclusive access to specific functions with the modifier