Delegatee
Functions
constructor
function constructor(
address _delegatee,
address _tribe
) public
Delegatee constructor
Parameters
Name | Type | Description |
---|---|---|
_delegatee | address | the address to delegate TRIBE to |
_tribe | address | the 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
Name | Type | Description |
---|---|---|
_beneficiary | address | default delegate, admin, and timelock beneficiary |
_duration | uint256 | duration of the token timelock window |
_tribe | address | the TRIBE token address |
_cliff | uint256 | the seconds before first claim is allowed |
_startTime | uint256 | the initial time to use for timelock |
delegate
function delegate(
address delegatee,
uint256 amount
) public
delegate locked TRIBE to a delegatee
Parameters
Name | Type | Description |
---|---|---|
delegatee | address | the target address to delegate to |
amount | uint256 | the 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
Name | Type | Description |
---|---|---|
delegatee | address | the target address to undelegate from |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | the 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)