Skip to content

Commit

Permalink
feat: gate new rewards v2 commands to holesky
Browse files Browse the repository at this point in the history
  • Loading branch information
gpabst committed Dec 13, 2024
1 parent f2c8fdd commit 752049f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/operator/get_operator_split.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package operator

import (
"errors"
"sort"

"github.com/Layr-Labs/eigenlayer-cli/pkg/internal/common"
Expand Down Expand Up @@ -50,6 +51,10 @@ func GetOperatorSplit(cCtx *cli.Context, isProgrammaticIncentive bool) error {
logger := common.GetLogger(cCtx)

config, err := readAndValidateGetOperatorSplitConfig(cCtx, logger, isProgrammaticIncentive)
if config.Network != "holesky" {
return errors.New("getting operator split only supported on holesky with this version of CLI")
}

if err != nil {
return eigenSdkUtils.WrapError("failed to read and validate operator split config", err)
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/operator/set_operator_split.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package operator

import (
"errors"
"fmt"
"sort"

Expand Down Expand Up @@ -42,6 +43,10 @@ func SetOperatorSplit(cCtx *cli.Context, p utils.Prompter, isProgrammaticIncenti
return eigenSdkUtils.WrapError("failed to read and validate operator split config", err)
}

if config.Network != "holesky" {
return errors.New("setting operator split only supported on holesky with this version of CLI")
}

cCtx.App.Metadata["network"] = config.ChainID.String()

ethClient, err := ethclient.Dial(config.RPCUrl)
Expand Down
4 changes: 4 additions & 0 deletions pkg/rewards/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ func Claim(cCtx *cli.Context, p utils.Prompter) error {
return eigenSdkUtils.WrapError("failed to read and validate claim config", err)
}

if config.Network != "holesky" && config.BatchClaimFile != "" {
return errors.New("batch claim only supported on holesky with this version of CLI")
}

cCtx.App.Metadata["network"] = config.ChainID.String()

ethClient, err := ethclient.Dial(config.RPCUrl)
Expand Down

0 comments on commit 752049f

Please sign in to comment.