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

chore: enhance deposit command messages #2482

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions cli/commands/deposit/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ func NewCreateValidator(
) *cobra.Command {
cmd := &cobra.Command{
Use: "create-validator [withdrawal-address] [amount] ?[beacond/genesis.json]",
Short: "Creates a validator deposit",
Long: `Creates a validator deposit with the necessary credentials. The arguments are expected in the order of withdrawal address, deposit amount, and optionally the beacond genesis file. If the genesis validator root flag is NOT set, the beacond genesis file MUST be provided as the last argument. If the broadcast flag is set to true, a private key must be provided to sign the transaction.`,
Short: "Creates a validator deposit transaction",
Long: `Creates a validator deposit with the necessary credentials. The arguments are expected in the order of withdrawal address, deposit amount, and optionally the beacond genesis file. If the genesis validator root flag is NOT set, the beacond genesis file MUST be provided as the last argument.`,
Args: cobra.RangeArgs(minArgsCreateDeposit, maxArgsCreateDeposit),
RunE: createValidatorCmd(chainSpec),
}
Expand Down
9 changes: 8 additions & 1 deletion cli/commands/deposit/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
package deposit

import (
"fmt"
"github.com/berachain/beacon-kit/chain"
"github.com/berachain/beacon-kit/cli/utils/parser"
"github.com/berachain/beacon-kit/consensus-types/types"
Expand Down Expand Up @@ -101,7 +102,13 @@ func validateDepositMessage(chainSpec chain.Spec) func(
return err
}

return ValidateDeposit(chainSpec, pubkey, credentials, amount, genesisValidatorRoot, signature)
err = ValidateDeposit(chainSpec, pubkey, credentials, amount, genesisValidatorRoot, signature)
if err != nil {
return err
}

fmt.Println("Deposit message validated successfully")
return nil
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/beacond/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func run() error {
),
// Set the Description to the Default.
clibuilder.WithDescription[Node](
"A basic beacon node, usable most standard networks.",
"A basic beacon node, modular and PoL chain usable with most Ethereum execution clients.",
),
// Set the Runtime Components to the Default.
clibuilder.WithComponents[Node](
Expand Down