diff --git a/pkg/flags/flags.go b/pkg/flags/flags.go index 255a825..cde36f2 100644 --- a/pkg/flags/flags.go +++ b/pkg/flags/flags.go @@ -14,6 +14,13 @@ var ( Name: "avs-addresses", Usage: "Comma separated list of AVS addresses", Required: false, + Aliases: []string{"as"}, + } + + AvsAddressFlag = cli.StringSliceFlag{ + Name: "avs-address", + Usage: "an AVS address", + Required: true, Aliases: []string{"a"}, } @@ -21,14 +28,14 @@ var ( Name: "operator-sets", Usage: "Comma separated list of operator sets", Required: false, - Aliases: []string{"os"}, + Aliases: []string{"ops"}, } OperatorSetFlag = cli.StringFlag{ Name: "operator-set", Usage: "Operator set identifier", Required: true, - Aliases: []string{"o"}, + Aliases: []string{"op"}, } NumberOfDaysFlag = cli.IntFlag{ @@ -53,11 +60,11 @@ var ( Aliases: []string{"b"}, } - AllocationPercentageFlag = cli.StringFlag{ - Name: "allocation-percentage", + AllocationBipsFlag = cli.StringFlag{ + Name: "allocation-bips", Usage: "Allocation to update", Required: true, - Aliases: []string{"a"}, + Aliases: []string{"ap"}, } StakeSourceFlag = cli.StringFlag{ @@ -82,4 +89,18 @@ var ( Required: true, Aliases: []string{"r"}, } + + StrategyAddressFlag = cli.StringFlag{ + Name: "strategy-address", + Usage: "Address of the strategy contract", + Required: true, + Aliases: []string{"sa"}, + } + + OutputFilePathFlag = cli.StringFlag{ + Name: "output-file-path", + Usage: "Path to the output file. It will be in a CSV format", + Required: false, + Aliases: []string{"o"}, + } ) diff --git a/pkg/operator/keys/list.go b/pkg/operator/keys/list.go index eabde9f..c572980 100644 --- a/pkg/operator/keys/list.go +++ b/pkg/operator/keys/list.go @@ -113,7 +113,7 @@ func GetOperatorIdFromBLSPubKey(pubKey string) (string, error) { // ``` // // This code just parser this string: - // E([498211989701534593628498974128726712526336918939770789545660245177948853517,19434346619705907282579203143605058653932187676054178921788041096426532277474]) + // E([498211989701534593628498974128726712526336918939770789545660245177948853517,19434346619705907282579203143605058653932187676054178921788041096426532277474]) if pubKey == "O" { return "", fmt.Errorf("pubKey is Infinity") diff --git a/pkg/operator/rewards/show.go b/pkg/operator/rewards/show.go index 2166b7e..544dcaa 100644 --- a/pkg/operator/rewards/show.go +++ b/pkg/operator/rewards/show.go @@ -22,6 +22,7 @@ func ShowCmd(p utils.Prompter) *cli.Command { &flags.NumberOfDaysFlag, &flags.OperatorSetsFlag, &flags.AvsAddressesFlag, + &flags.OutputFilePathFlag, }, } } diff --git a/pkg/operator/stakeallocation/rebalance.go b/pkg/operator/stakeallocation/rebalance.go index 52c640f..56ea14a 100644 --- a/pkg/operator/stakeallocation/rebalance.go +++ b/pkg/operator/stakeallocation/rebalance.go @@ -17,19 +17,21 @@ func RebalanceCmd(p utils.Prompter) *cli.Command { Description: ` Rebalance the stake allocation for the operator for a particular strategy. This CSV file requires the following columns for only one stragegy: -operator_set,allocation percentage -Example -1,10 -2,15 +avs address,operator set,allocation bips +Example: +0xabcd,1,10 +0x1234,2,15 `, Action: rebalanceStakeAllocation, After: telemetry.AfterRunAction(), Flags: []cli.Flag{ &flags.ConfigurationFileFlag, - &flags.DryRunFlag, - &flags.BroadcastFlag, + &flags.StrategyAddressFlag, &flags.ShowMagnitudesFlag, &flags.RebalanceFilePathFlag, + &flags.DryRunFlag, + &flags.BroadcastFlag, + &flags.OutputFilePathFlag, }, } } diff --git a/pkg/operator/stakeallocation/show.go b/pkg/operator/stakeallocation/show.go index 499c65b..40286be 100644 --- a/pkg/operator/stakeallocation/show.go +++ b/pkg/operator/stakeallocation/show.go @@ -24,6 +24,7 @@ func ShowCmd(p utils.Prompter) *cli.Command { &flags.ConfigurationFileFlag, &flags.AvsAddressesFlag, &flags.OperatorSetsFlag, + &flags.OutputFilePathFlag, }, } } diff --git a/pkg/operator/stakeallocation/update.go b/pkg/operator/stakeallocation/update.go index 4cef9f3..9b5def4 100644 --- a/pkg/operator/stakeallocation/update.go +++ b/pkg/operator/stakeallocation/update.go @@ -23,12 +23,15 @@ func UpdateCmd(p utils.Prompter) *cli.Command { After: telemetry.AfterRunAction(), Flags: []cli.Flag{ &flags.ConfigurationFileFlag, + &flags.AvsAddressFlag, &flags.OperatorSetFlag, - &flags.DryRunFlag, - &flags.BroadcastFlag, - &flags.AllocationPercentageFlag, + &flags.StrategyAddressFlag, + &flags.AllocationBipsFlag, &flags.StakeSourceFlag, &flags.ShowMagnitudesFlag, + &flags.DryRunFlag, + &flags.BroadcastFlag, + &flags.OutputFilePathFlag, }, } }