↗ Extends: VestingScheduleBase, FrequencyHelper
VestingSchedule
Vesting Schedule indicates when, how much, and how frequently founders, employees, and advisors can exercise their token allocations. Vesting is determined for each individual.
Constructs this contract
constructor(uint256 _minPeriod, uint256 _withdrawalCap, ERC20 _vestingCoin) public
Arguments
Name | Type | Description |
---|---|---|
_minPeriod | uint256 | The minimum vesting period. |
_withdrawalCap | uint256 | Maximum amount of tokens that can be withdrawn for the specified frequency. |
_vestingCoin | ERC20 | The ERC20 contract of the coin being vested. |
Signifies if the sender has enough balances to withdraw the desired amount of the vesting coin.
modifier canWithdraw(uint256 _amount) internal
Arguments
Name | Type | Description |
---|---|---|
_amount | uint256 | The amount desired to be withdrawn. |
- fund
- removeFunds
- createAllocation
- deleteAllocation
- increaseAllocation
- decreaseAllocation
- extendAllocation
- getDrawingPower
- withdraw
⤾ overrides VestingScheduleBase.fund
Enables this vesting schedule contract to receive the ERC20 (vesting coin). Before calling this function please approve your desired amount of the coin for this smart contract address. Please note that this action is restricted to administrators only.
function fund() external onlyAdmin
returns(bool)
Returns
Returns true if the funding was successful.
⤾ overrides VestingScheduleBase.removeFunds
Allows you to withdraw the surplus balance of the vesting coin from this contract. Please note that this action is restricted to administrators only and you may only withdraw amounts above the sum total allocation balances.
function removeFunds(uint256 _amount) external onlyAdmin
returns(bool)
Returns
Returns true if the withdrawal was successful.
Arguments
Name | Type | Description |
---|---|---|
_amount | uint256 | The amount desired to withdraw. |
⤾ overrides VestingScheduleBase.createAllocation
Creates a vesting schedule allocation for a new beneficiary. A beneficiary could mean founders, employees, or advisors. Please note that this action can only be performed by an administrator.
function createAllocation(address _address, string _memberName, uint256 _amount, uint256 _releaseOn) external onlyAdmin
returns(bool)
Returns
Returns true if the vesting schedule allocation was successfully created.
Arguments
Name | Type | Description |
---|---|---|
_address | address | The address which will receive the tokens in the future date. |
_memberName | string | The name of the candidate for which this vesting schedule allocation is being created for. |
_amount | uint256 | The total amount of tokens being vested over the period of vesting duration. |
_releaseOn | uint256 | The date on which the first vesting schedule becomes available for withdrawal. |
⤾ overrides VestingScheduleBase.deleteAllocation
Deletes the specified vesting schedule allocation. Please note that this action can only be performed by an administrator.
function deleteAllocation(address _address) external onlyAdmin
returns(bool)
Returns
Returns true if the vesting schedule allocation was successfully deleted.
Arguments
Name | Type | Description |
---|---|---|
_address | address | The address of the beneficiary whose allocation is being requested to be deleted. |
⤾ overrides VestingScheduleBase.increaseAllocation
Increases the total allocation of the specified vesting schedule. Please note that this action can only be performed by an administrator.
function increaseAllocation(address _address, uint256 _additionalAmount) external onlyAdmin
returns(bool)
Returns
Returns true if the vesting schedule allocation was successfully increased.
Arguments
Name | Type | Description |
---|---|---|
_address | address | The address of the beneficiary whose allocation is being requested to be increased. |
_additionalAmount | uint256 | The additional amount in vesting coin to be addeded to the existing allocation. |
⤾ overrides VestingScheduleBase.decreaseAllocation
Decreases the total allocation of the specified vesting schedule. Please note that this action can only be performed by an administrator.
function decreaseAllocation(address _address, uint256 _lessAmount) external onlyAdmin
returns(bool)
Returns
Returns true if the vesting schedule allocation was successfully decreased.
Arguments
Name | Type | Description |
---|---|---|
_address | address | The address of the beneficiary whose allocation is being requested to be decreased. |
_lessAmount | uint256 | The amount in vesting coin to be decreased from the existing allocation. |
⤾ overrides VestingScheduleBase.extendAllocation
Extends the release date of the specified vesting schedule allocation. Please note that this action can only be performed by an administrator.
function extendAllocation(address _address, uint256 _newReleaseDate) external onlyAdmin
returns(bool)
Returns
Returns true if the vesting schedule allocation was successfully extended.
Arguments
Name | Type | Description |
---|---|---|
_address | address | The address of the beneficiary who allocation is being requested to be extended. |
_newReleaseDate | uint256 | A new release date to extend the allocation to. |
Gets the drawing power of the beneficiary.
function getDrawingPower(address _address) public view
returns(uint256)
Returns
Returns the amount in vesting coin that can be withdrawn.
Arguments
Name | Type | Description |
---|---|---|
_address | address | The address to check the drawing power of. |
⤾ overrides VestingScheduleBase.withdraw
This action enables the beneficiaries to withdraw a desired amount from this contract.
function withdraw(uint256 _amount) external canWithdraw afterEarliestWithdrawalDate whenNotPaused
returns(bool)
Arguments
Name | Type | Description |
---|---|---|
_amount | uint256 | The amount in vesting coin desired to withdraw. |