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

event Reward(address indexed user, uint256 amount)

Emits after the user claims some amount of BLUES.

Functions

updateState

function updateState() external

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

getLastAccumulatedReward

function getLastAccumulatedReward() external view returns (uint256)

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

getAccDeposit

function getAccDeposit() external view returns (uint256)

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

deposited

function deposited(address _user) external view returns (uint256)

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

pendingReward

function pendingReward(address _user, uint256 _timestamp) external view returns (uint256 earned, uint256 totalReward)

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

Parameters

Return values

getRewardAccounts

function getRewardAccounts(address _user) external view returns (uint256[] memory rewardAccounts)

Returns _user`s reward accounts.

deposit

function deposit(uint256 _amount) external

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

withdraw

function withdraw(uint256 _amount) external

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

getReward

function getReward() external

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

getToken

function getToken() external view returns (address)

Returns earnings`s token.

Last updated