Skip to content

Commit ee958cb

Browse files
feat: add claim check after generation (#213)
1 parent 11fe204 commit ee958cb

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/Layr-Labs/eigenlayer-contracts v0.3.2-mainnet-rewards
88
github.com/Layr-Labs/eigenlayer-rewards-proofs v0.2.10
99
github.com/Layr-Labs/eigenpod-proofs-generation v0.0.14-stable.0.20240730152248-5c11a259293e
10-
github.com/Layr-Labs/eigensdk-go v0.1.10
10+
github.com/Layr-Labs/eigensdk-go v0.1.11
1111
github.com/blang/semver/v4 v4.0.0
1212
github.com/consensys/gnark-crypto v0.12.1
1313
github.com/ethereum/go-ethereum v1.14.5

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ github.com/Layr-Labs/eigenpod-proofs-generation v0.0.14-stable.0.20240730152248-
1414
github.com/Layr-Labs/eigenpod-proofs-generation v0.0.14-stable.0.20240730152248-5c11a259293e/go.mod h1:T7tYN8bTdca2pkMnz9G2+ZwXYWw5gWqQUIu4KLgC/vM=
1515
github.com/Layr-Labs/eigensdk-go v0.1.10 h1:VWXSoJ0Vm2ZEfSPgftOgmek3xwXKRmeKrNFXfMJJlko=
1616
github.com/Layr-Labs/eigensdk-go v0.1.10/go.mod h1:XcLVDtlB1vOPj63D236b451+SC75B8gwgkpNhYHSxNs=
17+
github.com/Layr-Labs/eigensdk-go v0.1.11 h1:ZTOPKGoOyzKfi7DbYI2azMECcjmK2sRtHoPpjCq1MBc=
18+
github.com/Layr-Labs/eigensdk-go v0.1.11/go.mod h1:XcLVDtlB1vOPj63D236b451+SC75B8gwgkpNhYHSxNs=
1719
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
1820
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
1921
github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8=

pkg/rewards/claim.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,16 @@ func Claim(cCtx *cli.Context, p utils.Prompter) error {
144144
TokenLeaves: convertClaimTokenLeaves(claim.TokenLeaves),
145145
}
146146

147+
logger.Info("Validating claim proof...")
148+
ok, err := elReader.CheckClaim(&bind.CallOpts{Context: ctx}, elClaim)
149+
if err != nil {
150+
return err
151+
}
152+
if !ok {
153+
return errors.New("failed to validate claim")
154+
}
155+
logger.Info("Claim proof validated successfully")
156+
147157
if config.Broadcast {
148158
eLWriter, err := common.GetELWriter(
149159
config.ClaimerAddress,

0 commit comments

Comments
 (0)