Skip to main content

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

NameTypeDescription
_0addressundefined

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

NameTypeDescription
tokenaddressAddress 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

NameTypeDescription
_0uint256undefined

initialize

function initialize(address beneficiaryAddress, uint64 startTimestamp, uint64 durationSeconds) external nonpayable

Parameters

NameTypeDescription
beneficiaryAddressaddressundefined
startTimestampuint64undefined
durationSecondsuint64undefined

release

function release(address token) external nonpayable

Release the tokens that have already vested. Emits a {TokensReleased} event.

Parameters

NameTypeDescription
tokenaddressundefined

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

NameTypeDescription
_0uint256undefined

released

function released(address token) external view returns (uint256)

Amount of token already released

Parameters

NameTypeDescription
tokenaddressundefined

Returns

NameTypeDescription
_0uint256undefined

start

function start() external view returns (uint256)

Getter for the start timestamp.

Returns

NameTypeDescription
_0uint256undefined

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

NameTypeDescription
newFactoryaddressAddress 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

NameTypeDescription
timestampuint64undefined

Returns

NameTypeDescription
_0uint256undefined

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

NameTypeDescription
tokenaddressundefined
timestampuint64undefined

Returns

NameTypeDescription
_0uint256undefined

Events

ERC20Released

event ERC20Released(address indexed token, uint256 amount)

Parameters

NameTypeDescription
token indexedaddressundefined
amountuint256undefined

EtherReleased

event EtherReleased(uint256 amount)

Parameters

NameTypeDescription
amountuint256undefined

Initialized

event Initialized(uint8 version)

Parameters

NameTypeDescription
versionuint8undefined