StakerTest
StakerTest
#
#
Functionsconstructor(uint256 _emissionRate, uint256 _unstakeCoolDown, address _votingToken, address _timer) (public)
applySlashingToCumulativeStaked(address voter, int256 amount) (public)
stake(uint256 amount) (public)
requestUnstake(uint256 amount) (public)
executeUnstake() (public)
withdrawRewards() โ uint256 (public)
exit() (public)
_updateTrackers(address voterAddress) (internal)
_updateReward(address voterAddress) (internal)
outstandingRewards(address voterAddress) โ uint256 (public)
rewardPerToken() โ uint256 (public)
setEmissionRate(uint256 _emissionRate) (public)
setUnstakeCoolDown(uint256 _unstakeCoolDown) (public)
setCurrentTime(uint256 time) (external)
Sets the current time.
Will revert if not running in test mode.
#
Parameters:- time: timestamp to set current Testable time to.
getCurrentTime() โ uint256 (public)
Gets the current time. Will return the last time set in setCurrentTime
if running in test mode.
Otherwise, it will return the block timestamp.
owner() โ address (public)
Returns the address of the current owner.
renounceOwnership() (public)
Leaves the contract without owner. It will not be possible to call
onlyOwner
functions anymore. Can only be called by the current owner.
NOTE: Renouncing ownership will leave the contract without an owner,
thereby removing any functionality that is only available to the owner.
transferOwnership(address newOwner) (public)
Transfers ownership of the contract to a new account (newOwner
).
Can only be called by the current owner.
_transferOwnership(address newOwner) (internal)
Transfers ownership of the contract to a new account (newOwner
).
Internal function without access restriction.
_msgSender() โ address (internal)
_msgData() โ bytes (internal)
votingToken() โ contract VotingToken (external)
#
EventsOwnershipTransferred(address previousOwner, address newOwner)
#
ModifiersonlyIfTest()
Reverts if not running in test mode.
onlyOwner()
Throws if called by any account other than the owner.