Skip to main content

Delegatee

Functions

constructor

function constructor(
address _delegatee,
address _tribe
) public

Delegatee constructor

Parameters

NameTypeDescription
_delegateeaddressthe address to delegate TRIBE to
_tribeaddressthe TRIBE token address

withdraw

function withdraw() public

send TRIBE back to timelock and selfdestruct

TimelockedDelegator

allows the timelocked TRIBE to be delegated by the beneficiary while locked

Functions

constructor

function constructor(
address _tribe,
address _beneficiary,
uint256 _duration
) public

Delegatee constructor

Parameters

NameTypeDescription
_tribeaddressthe TRIBE token address
_beneficiaryaddressdefault delegate, admin, and timelock beneficiary
_durationuint256duration of the token timelock window

delegate

function delegate(
address delegatee,
uint256 amount
) public

delegate locked TRIBE to a delegatee

Parameters

NameTypeDescription
delegateeaddressthe target address to delegate to
amountuint256the amount of TRIBE to delegate. Will increment existing delegated TRIBE

undelegate

function undelegate(
address delegatee
) public returns (uint256)

return delegated TRIBE to the timelock

Parameters

NameTypeDescription
delegateeaddressthe target address to undelegate from

Return Values

NameTypeDescription
[0]uint256the amount of TRIBE returned

totalToken

function totalToken() public returns (uint256)

calculate total TRIBE held plus delegated

used by LinearTokenTimelock to determine the released amount

acceptBeneficiary

function acceptBeneficiary() public

accept beneficiary role over timelocked TRIBE. Delegates all held (non-subdelegated) tribe to beneficiary

_tribeBalance

function _tribeBalance() internal returns (uint256)