From 4e61a1b0f9be654563bba257370be8fd81f0d063 Mon Sep 17 00:00:00 2001 From: Madhur Shrimal Date: Wed, 18 Sep 2024 12:55:44 -0700 Subject: [PATCH] feat: add checkclaim method (#341) --- chainio/clients/elcontracts/reader.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/chainio/clients/elcontracts/reader.go b/chainio/clients/elcontracts/reader.go index 3b39a683..6c4cb9d0 100644 --- a/chainio/clients/elcontracts/reader.go +++ b/chainio/clients/elcontracts/reader.go @@ -281,3 +281,14 @@ func (r *ChainReader) GetRootIndexFromHash(opts *bind.CallOpts, rootHash [32]byt return r.rewardsCoordinator.GetRootIndexFromHash(opts, rootHash) } + +func (r *ChainReader) CheckClaim( + opts *bind.CallOpts, + claim rewardscoordinator.IRewardsCoordinatorRewardsMerkleClaim, +) (bool, error) { + if r.rewardsCoordinator == nil { + return false, errors.New("RewardsCoordinator contract not provided") + } + + return r.rewardsCoordinator.CheckClaim(opts, claim) +}