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

QuadtraticTimelockedSubdelegator

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

Functions

constructor

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

Delegatee constructor

clawback admin needs to be 0 because clawbacks can be bricked by beneficiary

Parameters

NameTypeDescription
_beneficiaryaddressdefault delegate, admin, and timelock beneficiary
_durationuint256duration of the token timelock window
_tribeaddressthe TRIBE token address
_cliffuint256the seconds before first claim is allowed
_startTimeuint256the initial time to use for timelock

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)