Skip to content

StakingRewards

Description

Source: contracts/StakingRewards.sol

Variables

lastUpdateTime

Source

Type: uint256

periodFinish

Source

Type: uint256

rewardPerTokenStored

Source

Type: uint256

rewardRate

Source

Type: uint256

rewards

Source

Type: mapping(address => uint256)

rewardsDuration

Source

Type: uint256

rewardsToken

Source

Type: contract IERC20

stakingToken

Source

Type: contract IERC20

userRewardPerTokenPaid

Source

Type: mapping(address => uint256)

Constructor

constructor

Source

Details

Signature

constructor(address _owner, address _rewardsDistribution, address _rewardsToken, address _stakingToken)

Visibility

public

State Mutability

``

Views

balanceOf

Source

Details

Signature

balanceOf(address account) view returns (uint256)

Visibility

external

State Mutability

view

earned

Source

Details

Signature

earned(address account) view returns (uint256)

Visibility

public

State Mutability

view

getRewardForDuration

Source

Details

Signature

getRewardForDuration() view returns (uint256)

Visibility

external

State Mutability

view

lastTimeRewardApplicable

Source

Details

Signature

lastTimeRewardApplicable() view returns (uint256)

Visibility

public

State Mutability

view

rewardPerToken

Source

Details

Signature

rewardPerToken() view returns (uint256)

Visibility

public

State Mutability

view

totalSupply

Source

Details

Signature

totalSupply() view returns (uint256)

Visibility

external

State Mutability

view

Restricted Functions

notifyRewardAmount

Source

Details

Signature

notifyRewardAmount(uint256 reward)

Visibility

external

State Mutability

``

Requires

Modifiers

Emits

recoverERC20

Source

Details

Signature

recoverERC20(address tokenAddress, uint256 tokenAmount)

Visibility

external

State Mutability

``

Requires

Modifiers

Emits

setRewardsDuration

Source

Details

Signature

setRewardsDuration(uint256 _rewardsDuration)

Visibility

external

State Mutability

``

Requires

Modifiers

Emits

External Functions

exit

Source

Details

Signature

exit()

Visibility

external

State Mutability

``

getReward

Source

Details

Signature

getReward()

Visibility

public

State Mutability

``

Modifiers

stake

Source

Details

Signature

stake(uint256 amount)

Visibility

external

State Mutability

``

Requires

Modifiers

Emits

withdraw

Source

Details

Signature

withdraw(uint256 amount)

Visibility

public

State Mutability

``

Requires

Modifiers

Emits

Modifiers

updateReward

Source

Signature: updateReward(address account)

Events

Recovered

Source

Signature: Recovered(address token, uint256 amount)

RewardAdded

Source

Signature: RewardAdded(uint256 reward)

RewardPaid

Source

Signature: RewardPaid(address user, uint256 reward)

RewardsDurationUpdated

Source

Signature: RewardsDurationUpdated(uint256 newDuration)

Staked

Source

Signature: Staked(address user, uint256 amount)

Withdrawn

Source

Signature: Withdrawn(address user, uint256 amount)