VestingLib

Git Source

Provides utility functions for calculating vested and claimable token amounts

Functions

vestedAmount

Calculates the total amount of tokens vested for a given vesting schedule at the current time

function vestedAmount(IVesting.VestingInfo storage v) internal view returns (uint256);

Parameters

NameTypeDescription
vIVesting.VestingInfoThe vesting information struct

Returns

NameTypeDescription
<none>uint256The total amount of tokens vested

claimableAmount

Calculates the amount of tokens currently claimable by the beneficiary

function claimableAmount(IVesting.VestingInfo storage v) internal view returns (uint256);

Parameters

NameTypeDescription
vIVesting.VestingInfoThe vesting information struct

Returns

NameTypeDescription
<none>uint256The amount of tokens that can be claimed