ArrowVestingBase
Base implementation of vesting contract that will be cloned into individual vesting wallets pointing at specific beneficiary addresses.
Although the contract inherits an upgradeable interface, the contract itself is not intended to be upgradeable; rather, it is intended to be cloned by ArrowVestingFactory
.
Methods
beneficiary
function beneficiary() external view returns (address)
Getter for the beneficiary address.
Returns
Name | Type | Description |
---|
_0 | address | undefined |
cancel
function cancel(address token) external nonpayable
Cancels the vesting contract, releasing vested tokens to the beneficiary and unvested tokens back to the factory owner.
Parameters
Name | Type | Description |
---|
token | address | Address of the ERC20 token contract to be cancelled. Can only be called by the vesting factory owner. |
cancel
function cancel() external nonpayable
Cancels the vesting contract, releasing vested ETH to the beneficiary and unvested ETH back to the factory owner. Can only be called by the vesting factory owner.
duration
function duration() external view returns (uint256)
Getter for the vesting duration.
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
initialize
function initialize(address beneficiaryAddress, uint64 startTimestamp, uint64 durationSeconds) external nonpayable
Parameters
Name | Type | Description |
---|
beneficiaryAddress | address | undefined |
startTimestamp | uint64 | undefined |
durationSeconds | uint64 | undefined |
release
function release(address token) external nonpayable
Release the tokens that have already vested. Emits a {TokensReleased} event.
Parameters
Name | Type | Description |
---|
token | address | undefined |
release
function release() external nonpayable
Release the native token (ether) that have already vested. Emits a {TokensReleased} event.
released
function released() external view returns (uint256)
Amount of eth already released
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
released
function released(address token) external view returns (uint256)
Amount of token already released
Parameters
Name | Type | Description |
---|
token | address | undefined |
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
start
function start() external view returns (uint256)
Getter for the start timestamp.
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
updateFactory
function updateFactory(address newFactory) external nonpayable
Updates the factory contract owning the vesting contract to a new address. This should be called on all vesting contracts to transfer ownership of them to a new factory.
Parameters
Name | Type | Description |
---|
newFactory | address | Address of the new factory contract that will own the vesting contract. Can only be called by the vesting factory owner. |
vestedAmount
function vestedAmount(uint64 timestamp) external view returns (uint256)
Calculates the amount of ether that has already vested. Default implementation is a linear vesting curve.
Parameters
Name | Type | Description |
---|
timestamp | uint64 | undefined |
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
vestedAmount
function vestedAmount(address token, uint64 timestamp) external view returns (uint256)
Calculates the amount of tokens that has already vested. Default implementation is a linear vesting curve.
Parameters
Name | Type | Description |
---|
token | address | undefined |
timestamp | uint64 | undefined |
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
Events
ERC20Released
event ERC20Released(address indexed token, uint256 amount)
Parameters
Name | Type | Description |
---|
token indexed | address | undefined |
amount | uint256 | undefined |
EtherReleased
event EtherReleased(uint256 amount)
Parameters
Name | Type | Description |
---|
amount | uint256 | undefined |
Initialized
event Initialized(uint8 version)
Parameters
Name | Type | Description |
---|
version | uint8 | undefined |