Skip to content

Commit

Permalink
add fn for get claimed rewards (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur authored Sep 27, 2024
1 parent be89661 commit ed4b05c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions chainio/clients/elcontracts/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,18 @@ func (r *ChainReader) GetRootIndexFromHash(opts *bind.CallOpts, rootHash [32]byt
return r.rewardsCoordinator.GetRootIndexFromHash(opts, rootHash)
}

func (r *ChainReader) GetCumulativeClaimed(
opts *bind.CallOpts,
earner gethcommon.Address,
token gethcommon.Address,
) (*big.Int, error) {
if r.rewardsCoordinator == nil {
return nil, errors.New("RewardsCoordinator contract not provided")
}

return r.rewardsCoordinator.CumulativeClaimed(opts, earner, token)
}

func (r *ChainReader) CheckClaim(
opts *bind.CallOpts,
claim rewardscoordinator.IRewardsCoordinatorRewardsMerkleClaim,
Expand Down

0 comments on commit ed4b05c

Please sign in to comment.