Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IRewardClaim

Git Source

This interface contains the methods, events and errors for claiming Espresso staking rewards.

This interface does not include administrative functionality of the RewardClaim contract.

Functions

claimRewards

Claim staking rewards

Obtain authData from the Espresso query service API.

function claimRewards(uint256 lifetimeRewards, bytes calldata authData) external;

Parameters

NameTypeDescription
lifetimeRewardsuint256Total earned lifetime rewards for the user @param
authDatabytesinputs required for authentication of lifetime rewards amount.

claimedRewards

Check amount of rewards claimed by a user

function claimedRewards(address claimer) external view returns (uint256);

totalClaimed

Total amount claimed by all users

function totalClaimed() external view returns (uint256);

Events

RewardsClaimed

User claimed rewards

event RewardsClaimed(address indexed user, uint256 amount);

Errors

InvalidAuthRoot

Unable to authenticate rewards against Light Client contract

error InvalidAuthRoot();

AlreadyClaimed

All available rewards already claimed

error AlreadyClaimed();

InvalidRewardAmount

Reward amount must be greater than zero

error InvalidRewardAmount();

DailyLimitExceeded

A claim would exceed the remaining daily capacity

error DailyLimitExceeded();