IVestingWallet
Title: IVestingWallet
Author: Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/finance/VestingWallet.sol)
External interface of VestingWallet for ERC-165 detection and consumer ABI.
Functions
start
Returns the start timestamp of the vesting schedule.
function start() external view returns (uint256);Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 | The Unix timestamp at which vesting begins. |
duration
Returns the duration of the vesting schedule in seconds.
function duration() external view returns (uint256);Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 | The total duration of the vesting period. |
end
Returns the end timestamp of the vesting schedule.
function end() external view returns (uint256);Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 | The Unix timestamp at which vesting completes (start + duration). |
released
Returns the total amount of ETH already released.
function released() external view returns (uint256);Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 | The cumulative ETH released to the beneficiary. |
released
Returns the total amount of a specific ERC20 token already released.
function released(address token) external view returns (uint256);Parameters
| Name | Type | Description |
|---|---|---|
| token | address | The ERC20 token contract address. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 | The cumulative token amount released to the beneficiary. |
releasable
Returns the amount of ETH that can currently be released.
function releasable() external view returns (uint256);Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 | The releasable ETH amount (vested minus already released). |
releasable
Returns the amount of a specific ERC20 token that can currently be released.
function releasable(address token) external view returns (uint256);Parameters
| Name | Type | Description |
|---|---|---|
| token | address | The ERC20 token contract address. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 | The releasable token amount (vested minus already released). |
vestedAmount
Calculates the vested ETH amount at a given timestamp.
function vestedAmount(uint64 timestamp) external view returns (uint256);Parameters
| Name | Type | Description |
|---|---|---|
| timestamp | uint64 | The Unix timestamp to evaluate the vesting schedule at. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 | The total ETH that would be vested at the given timestamp. |
vestedAmount
Calculates the vested ERC20 token amount at a given timestamp.
function vestedAmount(address token, uint64 timestamp) external view returns (uint256);Parameters
| Name | Type | Description |
|---|---|---|
| token | address | The ERC20 token contract address. |
| timestamp | uint64 | The Unix timestamp to evaluate the vesting schedule at. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 | The total token amount that would be vested at the given timestamp. |
release
Releases all currently releasable ETH to the beneficiary.
Anyone may call this; funds always go to the beneficiary (owner). Emits an EtherReleased event.
function release() external;release
Releases all currently releasable tokens of a specific ERC20 to the beneficiary.
Anyone may call this; funds always go to the beneficiary (owner). Emits an ERC20Released event.
function release(address token) external;Parameters
| Name | Type | Description |
|---|---|---|
| token | address | The ERC20 token contract address to release. |
Events
EtherReleased
Emitted when ETH is released to the beneficiary.
event EtherReleased(uint256 amount);Parameters
| Name | Type | Description |
|---|---|---|
| amount | uint256 | The amount of ETH released (in wei). |
ERC20Released
Emitted when an ERC20 token is released to the beneficiary.
event ERC20Released(address indexed token, uint256 amount);Parameters
| Name | Type | Description |
|---|---|---|
| token | address | The address of the ERC20 token contract. |
| amount | uint256 | The amount of tokens released. |
Errors
VestingWalletTransferFailed
ERC20 transfer to the beneficiary failed.
error VestingWalletTransferFailed(address token);Parameters
| Name | Type | Description |
|---|---|---|
| token | address | The token whose transfer failed. |
VestingWalletEtherTransferFailed
ETH transfer to the beneficiary failed.
error VestingWalletEtherTransferFailed();