Skip to content

Commit

Permalink
fix(cli): deposit cli args (#2006)
Browse files Browse the repository at this point in the history
Co-authored-by: ocnc <anocpublic@gmail.com>
  • Loading branch information
itsdevbear and ocnc authored Sep 13, 2024
1 parent d43eb56 commit f4aebfa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mod/cli/pkg/commands/deposit/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ func NewCreateValidator[
Args: cobra.ExactArgs(4), //nolint:mnd // The number of arguments.
RunE: createValidatorCmd[ExecutionPayloadT](chainSpec),
}

cmd.Flags().String(privateKey, defaultPrivateKey, privateKeyMsg)
cmd.Flags().BoolP(
overrideNodeKey, overrideNodeKeyShorthand,
defaultOverrideNodeKey, overrideNodeKeyMsg,
Expand Down
11 changes: 10 additions & 1 deletion mod/cli/pkg/commands/deposit/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
package deposit

const (
// privateKey is the flag for the private key to sign the deposit message.
privateKey = "private-key"

// overrideNodeKey is the flag for overriding the node key.
overrideNodeKey = "override-node-key"

Expand All @@ -29,13 +32,15 @@ const (
)

const (

// overrideNodeKeyShorthand is the shorthand flag for the overrideNodeKey
// flag.
overrideNodeKeyShorthand = "o"
)

const (
// defaultPrivateKey is the default value for the privateKey flag.
defaultPrivateKey = ""

// defaultOverrideNodeKey is the default value for the overrideNodeKey flag.
defaultOverrideNodeKey = false

Expand All @@ -45,6 +50,10 @@ const (
)

const (
// privateKeyFlagMsg is the usage description for the privateKey flag.
privateKeyMsg = `private key to sign and pay for the deposit message.
This is required if the broadcast flag is set.`

// overrideNodeKeyFlagMsg is the usage description for the overrideNodeKey
// flag.
overrideNodeKeyMsg = "override the node private key"
Expand Down

0 comments on commit f4aebfa

Please sign in to comment.