Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Nov 14, 2023
1 parent 59acfa5 commit f4504e9
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion client/prompt_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func ValidatePromptAddress(input string) error { // TODO(@julienrbrt) remove and
return fmt.Errorf("invalid address: %w", err)
}

// ValidatePromptYesNo validates that the input is valid sdk.COins
// ValidatePromptCoins validates that the input is a valid sdk.Coins
func ValidatePromptCoins(input string) error {
if _, err := sdk.ParseCoinsNormalized(input); err != nil {
return fmt.Errorf("invalid coins: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion client/v2/internal/prompt/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func ValidatePromptURL(input string) error {
return nil
}

// ValidatePromptYesNo validates that the input is valid sdk.COins
// ValidatePromptCoins validates that the input is a valid sdk.Coins
func ValidatePromptCoins(input string) error {
if _, err := sdk.ParseCoinsNormalized(input); err != nil {
return fmt.Errorf("invalid coins: %w", err)
Expand Down
4 changes: 2 additions & 2 deletions x/auth/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
{
RpcMethod: "UpdateParams",
Use: "update-params-proposal [params]",
Short: "Submit a proposal to update auth module params. Note: params are JSON encoded",
Example: fmt.Sprintf(`%s tx auth update-params-proposal '{ params }'`, version.AppName),
Short: "Submit a proposal to update auth module params. Note: the entire params must be provided.",
Example: fmt.Sprintf(`%s tx auth update-params-proposal '{ "max_memo_characters": 0, "tx_sig_limit": 0, "tx_size_cost_per_byte": 0, "sig_verify_cost_ed25519": 0, "sig_verify_cost_secp256k1": 0 }'`, version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "params"}},
GovProposal: true,
},
Expand Down
4 changes: 2 additions & 2 deletions x/bank/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ Note: multiple coins can be send by space separated.`,
{
RpcMethod: "UpdateParams",
Use: "update-params-proposal [params]",
Short: "Submit a proposal to update bank module params. Note: params are JSON encoded",
Example: fmt.Sprintf(`%s tx bank update-params-proposal '{ params }'`, version.AppName),
Short: "Submit a proposal to update bank module params. Note: the entire params must be provided.",
Example: fmt.Sprintf(`%s tx bank update-params-proposal '{ "default_send_enabled": true }'`, version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "params"}},
GovProposal: true,
},
Expand Down
2 changes: 1 addition & 1 deletion x/consensus/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
{
RpcMethod: "UpdateParams",
Use: "update-params-proposal [params]",
Short: "Submit a proposal to update consensus module params. Note: params are JSON encoded",
Short: "Submit a proposal to update consensus module params. Note: the entire params must be provided.",
Example: fmt.Sprintf(`%s tx consensus update-params-proposal '{ params }'`, version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "block"},
Expand Down
4 changes: 2 additions & 2 deletions x/crisis/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
{
RpcMethod: "UpdateParams",
Use: "update-params-proposal [params]",
Short: "Submit a proposal to update crisis module params. Note: params are JSON encoded",
Example: fmt.Sprintf(`%s tx crisis update-params-proposal '{ params }'`, version.AppName),
Short: "Submit a proposal to update crisis module params. Note: the entire params must be provided.",
Example: fmt.Sprintf(`%s tx crisis update-params-proposal '{ "constant_fee": {"denom": "stake", "amount": "1000"} }'`, version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "params"}},
GovProposal: true,
},
Expand Down
4 changes: 2 additions & 2 deletions x/distribution/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
{
RpcMethod: "UpdateParams",
Use: "update-params-proposal [params]",
Short: "Submit a proposal to update distribution module params. Note: params are JSON encoded",
Example: fmt.Sprintf(`%s tx distribution update-params-proposal '{ params }'`, version.AppName),
Short: "Submit a proposal to update distribution module params. Note: the entire params must be provided.",
Example: fmt.Sprintf(`%s tx distribution update-params-proposal '{ "community_tax": "20000", "base_proposer_reward": "0", "bonus_proposer_reward": "0", "withdraw_addr_enabled": true }'`, version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "params"}},
GovProposal: true,
},
Expand Down
3 changes: 2 additions & 1 deletion x/gov/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
{
RpcMethod: "UpdateParams",
Use: "update-params-proposal [params]",
Short: "Submit a proposal to update gov module params. Note: params are JSON encoded",
Short: "Submit a proposal to update gov module params. Note: the entire params must be provided.",
Long: fmt.Sprintf("Submit a proposal to update gov module params. Note: the entire params must be provided.\n See the fields to fill in by running `%s query gov params --output json`", version.AppName),
Example: fmt.Sprintf(`%s tx gov update-params-proposal '{ params }'`, version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "params"}},
GovProposal: true,
Expand Down
5 changes: 3 additions & 2 deletions x/mint/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
{
RpcMethod: "UpdateParams",
Use: "update-params-proposal [params]",
Short: "Submit a proposal to update mint module params. Note: params are JSON encoded",
Example: fmt.Sprintf(`%s tx mint update-params-proposal '{ params }'`, version.AppName),
Short: "Submit a proposal to update mint module params. Note: the entire params must be provided.",
Long: fmt.Sprintf("Submit a proposal to update gov module params. Note: the entire params must be provided.\n See the fields to fill in by running `%s query mint params --output json`", version.AppName),
Example: fmt.Sprintf(`%s tx mint update-params-proposal '{ "mint_denom": "stake", ... }'`, version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "params"}},
GovProposal: true,
},
Expand Down
5 changes: 3 additions & 2 deletions x/slashing/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
{
RpcMethod: "UpdateParams",
Use: "update-params-proposal [params]",
Short: "Submit a proposal to update slashing module params. Note: params are JSON encoded",
Example: fmt.Sprintf(`%s tx slashing update-params-proposal '{ params }'`, version.AppName),
Short: "Submit a proposal to update slashing module params. Note: the entire params must be provided.",
Long: fmt.Sprintf("Submit a proposal to update gov module params. Note: the entire params must be provided.\n See the fields to fill in by running `%s query slashing params --output json`", version.AppName),
Example: fmt.Sprintf(`%s tx slashing update-params-proposal '{ "signed_blocks_window": "100", ... }'`, version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "params"}},
GovProposal: true,
},
Expand Down
5 changes: 3 additions & 2 deletions x/staking/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,9 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
{
RpcMethod: "UpdateParams",
Use: "update-params-proposal [params]",
Short: "Submit a proposal to update staking module params. Note: params are JSON encoded",
Example: fmt.Sprintf(`%s tx staking update-params-proposal '{ params }'`, version.AppName),
Short: "Submit a proposal to update staking module params. Note: the entire params must be provided.",
Long: fmt.Sprintf("Submit a proposal to update gov module params. Note: the entire params must be provided.\n See the fields to fill in by running `%s query staking params --output json`", version.AppName),
Example: fmt.Sprintf(`%s tx staking update-params-proposal '{ "unbonding_time": "504h0m0s", ... }'`, version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "params"}},
GovProposal: true,
},
Expand Down

0 comments on commit f4504e9

Please sign in to comment.