Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): deposit cli args #2006

Merged
merged 6 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading