feat(x/gov): add autocli options for tx (#18036)

This commit is contained in:
Julien Robert
2023-10-12 11:57:41 +00:00
committed by GitHub
parent c3bc5c82eb
commit fe99b0c2f8
10 changed files with 70 additions and 576 deletions
+4 -2
View File
@@ -51,10 +51,11 @@ func NewTxCmd() *cobra.Command {
}
// NewCreateValidatorCmd returns a CLI command handler for creating a MsgCreateValidator transaction.
// TODO(@julienrbrt): remove this once AutoCLI can flatten nested structs.
func NewCreateValidatorCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "create-validator [path/to/validator.json]",
Short: "create new validator initialized with a self-delegation to it",
Short: "Create new validator initialized with a self-delegation to it",
Args: cobra.ExactArgs(1),
Long: `Create a new validator initialized with a self-delegation by submitting a JSON file with the new validator details.`,
Example: strings.TrimSpace(
@@ -114,10 +115,11 @@ where we can get the pubkey using "%s tendermint show-validator"
}
// NewEditValidatorCmd returns a CLI command handler for creating a MsgEditValidator transaction.
// TODO(@julienrbrt): remove this once AutoCLI can flatten nested structs.
func NewEditValidatorCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "edit-validator",
Short: "edit an existing validator account",
Short: "Edit an existing validator account",
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {