IRewardClaim
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
| Name | Type | Description |
|---|---|---|
lifetimeRewards | uint256 | Total earned lifetime rewards for the user @param |
authData | bytes | inputs 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();