Skip to main content

TokenTimelock

Functions

constructor

function constructor(
address _beneficiary,
uint256 _duration,
uint256 _cliffSeconds,
address _lockedToken,
address _clawbackAdmin
) internal

Parameters

NameTypeDescription
_beneficiaryaddress
_durationuint256
_cliffSecondsuint256
_lockedTokenaddress
_clawbackAdminaddress

release

function release(
address to,
uint256 amount
) external

releases amount unlocked tokens to address to

Parameters

NameTypeDescription
toaddress
amountuint256

releaseMax

function releaseMax(
address to
) external

releases maximum unlocked tokens to address to

Parameters

NameTypeDescription
toaddress

totalToken

function totalToken() public returns (uint256)

the total amount of tokens held by timelock

alreadyReleasedAmount

function alreadyReleasedAmount() public returns (uint256)

amount of tokens released to beneficiary

availableForRelease

function availableForRelease() public returns (uint256)

amount of held tokens unlocked and available for release

setPendingBeneficiary

function setPendingBeneficiary(
address _pendingBeneficiary
) public

current beneficiary can appoint new beneficiary, which must be accepted

Parameters

NameTypeDescription
_pendingBeneficiaryaddress

acceptBeneficiary

function acceptBeneficiary() public

pending beneficiary accepts new beneficiary

clawback

function clawback() public

passedCliff

function passedCliff() public returns (bool)

_proportionAvailable

function _proportionAvailable(
uint256 initialBalance,
uint256 elapsed,
uint256 duration
) internal returns (uint256)

Parameters

NameTypeDescription
initialBalanceuint256
elapseduint256
durationuint256

_setBeneficiary

function _setBeneficiary(
address newBeneficiary
) internal

Parameters

NameTypeDescription
newBeneficiaryaddress

_setLockedToken

function _setLockedToken(
address tokenAddress
) internal

Parameters

NameTypeDescription
tokenAddressaddress

_release

function _release(
address to,
uint256 amount
) internal

Parameters

NameTypeDescription
toaddress
amountuint256