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

undefined

Restricted Functions

notifyRewardAmount

Source

Details

Signature

notifyRewardAmount(uint256 reward)

Visibility

external

State Mutability

undefined

Requires

Modifiers

Emits

recoverERC20

Source

Details

Signature

recoverERC20(address tokenAddress, uint256 tokenAmount)

Visibility

external

State Mutability

undefined

Requires

Modifiers

Emits

setRewardsDuration

Source

Details

Signature

setRewardsDuration(uint256 _rewardsDuration)

Visibility

external

State Mutability

undefined

Requires

Modifiers

Emits

updatePeriodFinish

Source

Details

Signature

updatePeriodFinish(uint256 timestamp)

Visibility

external

State Mutability

undefined

Modifiers

External Functions

balanceOf

Source

Details

Signature

balanceOf(address account) view returns (uint256)

Visibility

external

State Mutability

undefined

earned

Source

Details

Signature

earned(address account) view returns (uint256)

Visibility

public

State Mutability

undefined

exit

Source

Details

Signature

exit()

Visibility

external

State Mutability

undefined

getReward

Source

Details

Signature

getReward()

Visibility

public

State Mutability

undefined

Modifiers

getRewardForDuration

Source

Details

Signature

getRewardForDuration() view returns (uint256)

Visibility

external

State Mutability

undefined

lastTimeRewardApplicable

Source

Details

Signature

lastTimeRewardApplicable() view returns (uint256)

Visibility

public

State Mutability

undefined

rewardPerToken

Source

Details

Signature

rewardPerToken() view returns (uint256)

Visibility

public

State Mutability

undefined

stake

Source

Details

Signature

stake(uint256 amount)

Visibility

external

State Mutability

undefined

Requires

Modifiers

Emits

totalSupply

Source

Details

Signature

totalSupply() view returns (uint256)

Visibility

external

State Mutability

undefined

withdraw

Source

Details

Signature

withdraw(uint256 amount)

Visibility

public

State Mutability

undefined

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)