EeseeMining

EeseeMining

Claim

Claim: {rewardID} - RewardID the tokens are claimed for. {balance} - Amount of tokens to claim. {merkleProof} - Merkle proof to verify claim.

struct Claim {
  uint128 rewardID;
  uint128 balance;
  bytes32[] merkleProof;
}

ESE

contract IERC20 ESE

ESE token.

rewardID

uint128 rewardID

Current reward ID.

rewardRoot

mapping(uint128 => bytes32) rewardRoot

Maps {rewardID} to its merkle root.

isClaimed

mapping(address => mapping(uint128 => bool)) isClaimed

Has address claimed reward for {rewardID}.

MERKLE_ROOT_UPDATER_ROLE

bytes32 MERKLE_ROOT_UPDATER_ROLE

Merkle root updater role in {accessManager}.

RewardAdded

event RewardAdded(uint128 rewardID, bytes32 merkleRoot)

RewardClaimed

event RewardClaimed(uint128 rewardID, address claimer, uint128 amount)

InvalidMerkleProof

error InvalidMerkleProof()

AlreadyClaimed

error AlreadyClaimed()

InvalidESE

error InvalidESE()

MerkleRootNotExists

error MerkleRootNotExists()

claimRewards

function claimRewards(struct EeseeMining.Claim[] claims, address claimer) external returns (uint256 rewards)

Claims rewards for multiple {rewardID}s. Emits {RewardClaimed} event for each reward claimed.

Parameters

addReward

function addReward(bytes32 merkleRoot) external

Adds new merkle root and advances to the next {rewardID}. Emits {RewardAdded} event.

Parameters

getRewards

function getRewards(address claimer, struct EeseeMining.Claim[] claims) external view returns (uint128 rewards)

Verifies {claims} and returns rewards to be claimed from {claims}.

Parameters

Return Values

verifyClaim

function verifyClaim(address claimer, struct EeseeMining.Claim claim) public view returns (bool)

Verifies {claim} for {claimer}.

Parameters

Return Values

Inherited from EeseeRoleHandler

Inherited from ERC2771Context

isTrustedForwarder

function isTrustedForwarder(address forwarder) public view virtual returns (bool)

Last updated