CheckPointable
#
Check-Pointable ERC20 Behavior.
ERC20 behavior that adds balance check-point features.
Events#
Functions#
balanceHistoryCleanup
#
function balanceHistoryCleanup(
address _owner,
uint256 _count
) external returns (
uint256);
Delete balance checkpoints that expired (i.e. are before cleanupBlockNumber
).
Method can only be called from the cleanerContract
(which may be a proxy to external cleaners).
Parameters | Type | Description |
---|---|---|
_owner |
address |
balance owner account address |
_count |
uint256 |
maximum number of checkpoints to delete |
Returns | Type | Description |
---|---|---|
[0] | uint256 |
the number of checkpoints deleted |
totalSupplyCacheCleanup
#
function totalSupplyCacheCleanup(
uint256 _blockNumber
) external returns (
uint256);
Delete total supply cache entry that expired (i.e. is before cleanupBlockNumber
).
Method can only be called from the cleanerContract
(which may be a proxy to external cleaners).
Parameters | Type | Description |
---|---|---|
_blockNumber |
uint256 |
the block number for which total supply value was cached |
Returns | Type | Description |
---|---|---|
[0] | uint256 |
the number of cache entries deleted (always 0 or 1) |
totalSupplyHistoryCleanup
#
function totalSupplyHistoryCleanup(
uint256 _count
) external returns (
uint256);
Delete total supply checkpoints that expired (i.e. are before cleanupBlockNumber
).
Method can only be called from the cleanerContract
(which may be a proxy to external cleaners).
Parameters | Type | Description |
---|---|---|
_count |
uint256 |
maximum number of checkpoints to delete |
Returns | Type | Description |
---|---|---|
[0] | uint256 |
the number of checkpoints deleted |
Modifiers#
notBeforeCleanupBlock
#
modifier notBeforeCleanupBlock( uint256 _blockNumber)
This method cannot be called for _blockNumber
lower than the current cleanup block number.
onlyCleaner
#
modifier onlyCleaner()
Only the cleanerContract
can call this method.