IEarningV2

Events
Functions

Events

Deposit

event Deposit(address indexed user, uint256 amount)

Emits after the user deposits some amount of token.

Withdraw

event Withdraw(address indexed user, uint256 amount)

Emits after the user withdraws some amount of token.

Reward

Emits after the user claims some amount of BLUES.

Functions

updateState

Updates earning`s state according to current block`s number.

getLastAccumulatedReward

Returns earning`s BLUES reward at block when IEarningV2.updateState() was called.

getAccDeposit

Returns a summarized amount of tokens that all the users have deposited to earning.

deposited

Returns an amount of tokens that the _user has deposited to earning.

pendingReward

Returns the amount of BLUES that the user has earned since the last deposit/withdrawal/claim operation.

Parameters

Name

Type

Description

_user

address

Address of user

_timestamp

uint256

Timestamp to get info for

Return values

Name

Type

Description

earned

uint256

Amount of BLUES that _user can claim

totalReward

uint256

Summarized amounts of BLUES that _user can claim and locked reward

getRewardAccounts

Returns _user`s reward accounts.

deposit

Performs some _amount of earning`s token deposit from msg.sender.

withdraw

Performs some _amount of earning`s token withdrawal to msg.sender.

getReward

Claims msg.sender`s pending reward and sends BLUES to his address.

getToken

Returns earnings`s token.

Last updated

Was this helpful?