TimelockedDelegator
Delegatee
Functions
constructor
function constructor(
address _delegatee,
address _zen
) public
Delegatee constructor
Parameters
_delegatee
address
the address to delegate ZEN to
_zen
address
the ZEN token address
withdraw
function withdraw() public
send ZEN back to timelock and selfdestruct
TimelockedDelegator
allows the timelocked ZEN to be delegated by the beneficiary while locked
Functions
constructor
function constructor(
address _zen,
address _beneficiary,
uint256 _duration
) public
Delegatee constructor
Parameters
_zen
address
the ZEN token address
_beneficiary
address
default delegate, admin, and timelock beneficiary
_duration
uint256
duration of the token timelock window
delegate
function delegate(
address delegatee,
uint256 amount
) public
delegate locked ZEN to a delegatee
Parameters
delegatee
address
the target address to delegate to
amount
uint256
the amount of ZEN to delegate. Will increment existing delegated ZEN
undelegate
function undelegate(
address delegatee
) public returns (uint256)
return delegated ZEN to the timelock
Parameters
delegatee
address
the target address to undelegate from
Return Values
[0]
uint256
the amount of ZEN returned
totalToken
function totalToken() public returns (uint256)
calculate total ZEN held plus delegated
used by LinearTokenTimelock to determine the released amount
acceptBeneficiary
function acceptBeneficiary() public
accept beneficiary role over timelocked ZEN. Delegates all held (non-subdelegated) zen to beneficiary
_zenBalance
function _zenBalance() internal returns (uint256)
Last updated