Burn module for burning tokens and keeping track of burnt amounts (ScheduledCheckpoint.sol)

View Source: contracts/modules/Experimental/Mixed/ScheduledCheckpoint.sol

↗ Extends: ICheckpoint, TransferManager

ScheduledCheckpoint

Enums

TimeUnit

enum TimeUnit {
 SECONDS,
 DAYS,
 WEEKS,
 MONTHS,
 YEARS
}

Structs

Schedule

struct Schedule {
 bytes32 name,
 uint256 startTime,
 uint256 nextTime,
 uint256 interval,
 enum ScheduledCheckpoint.TimeUnit timeUnit,
 uint256 index,
 uint256[] checkpointIds,
 uint256[] timestamps,
 uint256[] periods,
 uint256 totalPeriods
}

Contract Members

Constants & Variables

bytes32[] public names;
mapping(bytes32 => struct ScheduledCheckpoint.Schedule) public schedules;

Events

event AddSchedule(bytes32  _name, uint256  _startTime, uint256  _interval, enum ScheduledCheckpoint.TimeUnit  _timeUint);
event RemoveSchedule(bytes32  _name);

Functions

Constructor

function (address _securityToken, address _polyToken) public nonpayable Module

Arguments

Name

Type

Description

_securityToken

address

Address of the security token

_polyToken

address

getInitFunction

⤾ overrides IModule.getInitFunction

This function returns the signature of configure function

function getInitFunction() public pure
returns(bytes4)

Arguments

Name

Type

Description

addSchedule

adds a new schedule for checkpoints

function addSchedule(bytes32 _name, uint256 _startTime, uint256 _interval, enum ScheduledCheckpoint.TimeUnit _timeUnit) external nonpayable

Arguments

Name

Type

Description

_name

bytes32

name of the new schedule (must be unused)

_startTime

uint256

start time of the schedule (first checkpoint)

_interval

uint256

interval at which checkpoints should be created

_timeUnit

enum ScheduledCheckpoint.TimeUnit

unit of time at which checkpoints should be created

removeSchedule

removes a schedule for checkpoints

function removeSchedule(bytes32 _name) external nonpayable

Arguments

Name

Type

Description

_name

bytes32

name of the schedule to be removed

executeTransfer

⤾ overrides ITransferManager.executeTransfer

Used to create checkpoints that correctly reflect balances

function executeTransfer(address , address , uint256 , bytes ) external nonpayable onlySecurityToken 
returns(enum ITransferManager.Result)

Returns

always returns Result.NA

Arguments

Name

Type

Description

address

address

uint256

bytes

verifyTransfer

⤾ overrides ITransferManager.verifyTransfer

Used to create checkpoints that correctly reflect balances

function verifyTransfer(address , address , uint256 , bytes ) public view
returns(enum ITransferManager.Result, bytes32)

Returns

always returns Result.NA

Arguments

Name

Type

Description

address

address

uint256

bytes

getSchedule

gets schedule details

function getSchedule(bytes32 _name) external view
returns(bytes32, uint256, uint256, uint256, enum ScheduledCheckpoint.TimeUnit, uint256[], uint256[], uint256[], uint256)

Arguments

Name

Type

Description

_name

bytes32

name of the schedule

update

manually triggers update outside of transfer request for named schedule (can be used to reduce user gas costs)

function update(bytes32 _name) external nonpayable

Arguments

Name

Type

Description

_name

bytes32

name of the schedule

_update

function _update(bytes32 _name) internal nonpayable

Arguments

Name

Type

Description

_name

bytes32

updateAll

manually triggers update outside of transfer request for all schedules (can be used to reduce user gas costs)

function updateAll() external nonpayable

Arguments

Name

Type

Description

_updateAll

function _updateAll() internal nonpayable

Arguments

Name

Type

Description

getPermissions

⤾ overrides IModule.getPermissions

Return the permissions flag that are associated with CountTransferManager

function getPermissions() external view
returns(bytes32[])

Arguments

Name

Type

Description

Last updated