StakingEscrow¶
- details
v6.2.2
- notice
Contract holds and locks stakers tokens. Each staker that locks their tokens will receive some compensation
events¶
Deposited(address,uint256)¶
- notice
Signals that tokens were deposited
params¶
- staker
Staker address
- value
Amount deposited (in NuNits)
MergeRequested(address,address)¶
- notice
Signals that the staker requested merge with T staking contract
params¶
- staker
Staker address
- stakingProvider
Staking provider address
Slashed(address,uint256,address,uint256)¶
- notice
Signals that the staker was slashed
params¶
- investigator
Investigator address
- penalty
Slashing penalty
- reward
Value of reward provided to investigator (in NuNits)
- staker
Staker address
VestingSet(address,uint256,uint256)¶
- notice
Signals that vesting parameters were set for the staker
params¶
- releaseRate
Release rate
- releaseTimestamp
Release timestamp
- staker
Staker address
Withdrawn(address,uint256)¶
- notice
Signals that NU tokens were withdrawn to the staker
params¶
- staker
Staker address
- value
Amount withdraws (in NuNits)
methods¶
constructor¶
- notice
Constructor sets address of token contract and parameters for staking
params¶
- _tStaking
T token staking contract
- _token
NuCypher token contract
- _workLock
WorkLock contract. Zero address if there is no WorkLock
depositFromWorkLock(address,uint256,uint16)¶
- notice
Deposit tokens from WorkLock contract
params¶
- _staker
Staker address
- _unlockingDuration
Amount of periods during which tokens will be unlocked when wind down is enabled
- _value
Amount of tokens to deposit
finishUpgrade(address)¶
- details
Copy values from the new target to the current storage
params¶
- _target
New target contract address
getAllTokens(address)¶
- notice
Get all tokens belonging to the staker
getCompletedWork(address)¶
- notice
Get work that completed by the staker
getStakersLength()¶
- notice
Return the length of the array of stakers
getUnvestedTokens(address)¶
- notice
Returns amount of not released yet tokens for staker
isOwner()¶
returns¶
- _0
true if
msg.sender
is the owner of the contract.
owner()¶
returns¶
- _0
the address of the owner.
renounceOwnership()¶
- details
Allows the current owner to relinquish control of the contract.
- notice
Renouncing to ownership will leave the contract without an owner. It will not be possible to call the functions with the
onlyOwner
modifier anymore.
requestMerge(address,address)¶
- notice
Request migration to threshold network
params¶
- _staker
Staker address
- _stakingProvider
Staking provider address
returns¶
- _0
Amount of tokens
setWorkMeasurement(address,bool)¶
- notice
Stub for WorkLock
params¶
- _measureWork
Value for
measureWork
parameter- _staker
Staker
returns¶
- _0
Work that was previously done
setupVesting(address[],uint256[],uint256[])¶
- details
If release rate is 0 then all value will be locked before release timestamp
- notice
Setup vesting parameters
params¶
- _releaseRate
Array of release rates
- _releaseTimestamp
Array of timestamps when stake will be released
- _stakers
Array of stakers
slashStaker(address,uint256,address,uint256)¶
- notice
Slash the staker’s stake and reward the investigator
params¶
- _investigator
Investigator
- _penalty
Penalty
- _reward
Reward for the investigator
- _staker
Staker’s address
transferOwnership(address)¶
- details
Allows the current owner to transfer control of the contract to a newOwner.
params¶
- newOwner
The address to transfer ownership to.
verifyState(address)¶
- details
the
onlyWhileUpgrading
modifier works through a call to the parentverifyState
withdraw(uint256)¶
- notice
Withdraw available amount of NU tokens to staker
params¶
- _value
Amount of tokens to withdraw