Skip to content

ShortingRewards

Description

Source: contracts/ShortingRewards.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

userRewardPerTokenPaid

Source

Type: mapping(address => uint256)

Constructor

constructor

Source

Details

Signature

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

Visibility

public

State Mutability

undefined

Restricted Functions

enrol

Source

Details

Signature

enrol(address account, uint256 amount)

Visibility

external

State Mutability

undefined

Requires

Modifiers

Emits

getReward

Source

Details

Signature

getReward(address account)

Visibility

external

State Mutability

undefined

Modifiers

notifyRewardAmount

Source

Details

Signature

notifyRewardAmount(uint256 reward)

Visibility

external

State Mutability

undefined

Requires

Modifiers

Emits

setRewardsDuration

Source

Details

Signature

setRewardsDuration(uint256 _rewardsDuration)

Visibility

external

State Mutability

undefined

Requires

Modifiers

Emits

withdraw

Source

Details

Signature

withdraw(address account, uint256 amount)

Visibility

external

State Mutability

undefined

Requires

Modifiers

Emits

Internal Functions

_short

Source

Details

Signature

_short() view returns (contract ICollateralErc20)

Visibility

internal

State Mutability

undefined

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

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

resolverAddressesRequired

Source

Details

Signature

resolverAddressesRequired() view returns (bytes32[] addresses)

Visibility

public

State Mutability

undefined

rewardPerToken

Source

Details

Signature

rewardPerToken() view returns (uint256)

Visibility

public

State Mutability

undefined

totalSupply

Source

Details

Signature

totalSupply() view returns (uint256)

Visibility

external

State Mutability

undefined

Modifiers

onlyShortContract

Source

updateReward

Source

Signature: updateReward(address account)

Events

Enrol

Source

Signature: Enrol(address user, uint256 amount)

RewardAdded

Source

Signature: RewardAdded(uint256 reward)

RewardPaid

Source

Signature: RewardPaid(address user, uint256 reward)

RewardsDurationUpdated

Source

Signature: RewardsDurationUpdated(uint256 newDuration)

Withdrawn

Source

Signature: Withdrawn(address user, uint256 amount)