diff --git a/x/wasm/client/cli/genesis_msg.go b/x/wasm/client/cli/genesis_msg.go index 8aedae358a..b6b1321aee 100644 --- a/x/wasm/client/cli/genesis_msg.go +++ b/x/wasm/client/cli/genesis_msg.go @@ -68,6 +68,7 @@ func GenesisStoreCodeCmd(defaultNodeHome string, genesisMutator GenesisMutator) return nil }) }, + SilenceUsage: true, } cmd.Flags().String(flagRunAs, "", "The address that is stored as code creator") cmd.Flags().String(flagInstantiateByEverybody, "", "Everybody can instantiate a contract from the code, optional") @@ -136,6 +137,7 @@ func GenesisInstantiateContractCmd(defaultNodeHome string, genesisMutator Genesi return nil }) }, + SilenceUsage: true, } cmd.Flags().String(flagAmount, "", "Coins to send to the contract during instantiation") cmd.Flags().String(flagLabel, "", "A human-readable name for this contract in lists") @@ -189,6 +191,7 @@ func GenesisExecuteContractCmd(defaultNodeHome string, genesisMutator GenesisMut return nil }) }, + SilenceUsage: true, } cmd.Flags().String(flagAmount, "", "Coins to send to the contract along with command") cmd.Flags().String(flagRunAs, "", "The address that pays the funds.") @@ -217,6 +220,7 @@ func GenesisListCodesCmd(defaultNodeHome string, genReader GenesisReader) *cobra } return printJSONOutput(cmd, all) }, + SilenceUsage: true, } cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") flags.AddQueryFlagsToCmd(cmd) @@ -239,6 +243,7 @@ func GenesisListContractsCmd(defaultNodeHome string, genReader GenesisReader) *c all := GetAllContracts(state) return printJSONOutput(cmd, all) }, + SilenceUsage: true, } cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") flags.AddQueryFlagsToCmd(cmd) diff --git a/x/wasm/client/cli/gov_tx.go b/x/wasm/client/cli/gov_tx.go index ce3dd6e5ca..01f7aaf80e 100644 --- a/x/wasm/client/cli/gov_tx.go +++ b/x/wasm/client/cli/gov_tx.go @@ -80,6 +80,7 @@ func ProposalStoreCodeCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, + SilenceUsage: true, } cmd.Flags().String(flagRunAs, "", "The address that is stored as code creator") @@ -157,6 +158,7 @@ func ProposalInstantiateContractCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, + SilenceUsage: true, } cmd.Flags().String(flagAmount, "", "Coins to send to the contract during instantiation") cmd.Flags().String(flagLabel, "", "A human-readable name for this contract in lists") @@ -222,6 +224,7 @@ func ProposalMigrateContractCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, + SilenceUsage: true, } // proposal flags @@ -296,6 +299,7 @@ func ProposalExecuteContractCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, + SilenceUsage: true, } cmd.Flags().String(flagRunAs, "", "The address that is passed as sender to the contract on proposal execution") cmd.Flags().String(flagAmount, "", "Coins to send to the contract during instantiation") @@ -355,6 +359,7 @@ func ProposalSudoContractCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, + SilenceUsage: true, } // proposal flagsExecute @@ -414,6 +419,7 @@ func ProposalUpdateContractAdminCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, + SilenceUsage: true, } // proposal flags cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") @@ -466,6 +472,7 @@ func ProposalClearContractAdminCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, + SilenceUsage: true, } // proposal flags cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") @@ -522,6 +529,7 @@ func ProposalPinCodesCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, + SilenceUsage: true, } // proposal flags cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") @@ -590,6 +598,7 @@ func ProposalUnpinCodesCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, + SilenceUsage: true, } // proposal flags cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") @@ -705,6 +714,7 @@ $ %s tx gov submit-proposal update-instantiate-config 1:nobody 2:everybody 3:%s1 return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, + SilenceUsage: true, } // proposal flags cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") diff --git a/x/wasm/client/cli/new_tx.go b/x/wasm/client/cli/new_tx.go index e3b47792e6..2be19350ac 100644 --- a/x/wasm/client/cli/new_tx.go +++ b/x/wasm/client/cli/new_tx.go @@ -34,6 +34,7 @@ func MigrateContractCmd() *cobra.Command { } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, + SilenceUsage: true, } flags.AddTxFlagsToCmd(cmd) return cmd @@ -79,6 +80,7 @@ func UpdateContractAdminCmd() *cobra.Command { } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, + SilenceUsage: true, } flags.AddTxFlagsToCmd(cmd) return cmd @@ -115,6 +117,7 @@ func ClearContractAdminCmd() *cobra.Command { } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, + SilenceUsage: true, } flags.AddTxFlagsToCmd(cmd) return cmd diff --git a/x/wasm/client/cli/query.go b/x/wasm/client/cli/query.go index 8d13a1192a..a621ba0825 100644 --- a/x/wasm/client/cli/query.go +++ b/x/wasm/client/cli/query.go @@ -28,6 +28,7 @@ func GetQueryCmd() *cobra.Command { DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, + SilenceUsage: true, } queryCmd.AddCommand( GetCmdListCode(), @@ -137,6 +138,7 @@ func GetCmdListCode() *cobra.Command { } return clientCtx.PrintProto(res) }, + SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) flags.AddPaginationFlagsToCmd(cmd, "list codes") @@ -182,6 +184,7 @@ func GetCmdListContractByCode() *cobra.Command { } return clientCtx.PrintProto(res) }, + SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) flags.AddPaginationFlagsToCmd(cmd, "list contracts by code") @@ -224,6 +227,7 @@ func GetCmdQueryCode() *cobra.Command { fmt.Printf("Downloading wasm code to %s\n", args[1]) return os.WriteFile(args[1], res.Data, 0o600) }, + SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) return cmd @@ -263,6 +267,7 @@ func GetCmdQueryCodeInfo() *cobra.Command { return clientCtx.PrintProto(res.CodeInfoResponse) }, + SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) return cmd @@ -298,6 +303,7 @@ func GetCmdGetContractInfo() *cobra.Command { } return clientCtx.PrintProto(res) }, + SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) return cmd @@ -312,6 +318,7 @@ func GetCmdGetContractState() *cobra.Command { DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, + SilenceUsage: true, } cmd.AddCommand( GetCmdGetContractStateAll(), @@ -355,6 +362,7 @@ func GetCmdGetContractStateAll() *cobra.Command { } return clientCtx.PrintProto(res) }, + SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) flags.AddPaginationFlagsToCmd(cmd, "contract state") @@ -396,6 +404,7 @@ func GetCmdGetContractStateRaw() *cobra.Command { } return clientCtx.PrintProto(res) }, + SilenceUsage: true, } decoder.RegisterFlags(cmd.PersistentFlags(), "key argument") flags.AddQueryFlagsToCmd(cmd) @@ -444,6 +453,7 @@ func GetCmdGetContractStateSmart() *cobra.Command { } return clientCtx.PrintProto(res) }, + SilenceUsage: true, } decoder.RegisterFlags(cmd.PersistentFlags(), "query argument") flags.AddQueryFlagsToCmd(cmd) @@ -487,6 +497,7 @@ func GetCmdGetContractHistory() *cobra.Command { return clientCtx.PrintProto(res) }, + SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) @@ -499,7 +510,7 @@ func GetCmdListPinnedCode() *cobra.Command { cmd := &cobra.Command{ Use: "pinned", Short: "List all pinned code ids", - Long: "\t\tLong: List all pinned code ids,\n", + Long: "List all pinned code ids", Args: cobra.ExactArgs(0), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -523,6 +534,7 @@ func GetCmdListPinnedCode() *cobra.Command { } return clientCtx.PrintProto(res) }, + SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) flags.AddPaginationFlagsToCmd(cmd, "list codes") @@ -534,7 +546,7 @@ func GetCmdListContractsByCreator() *cobra.Command { cmd := &cobra.Command{ Use: "list-contracts-by-creator [creator]", Short: "List all contracts by creator", - Long: "\t\tLong: List all contracts by creator,\n", + Long: "List all contracts by creator", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -563,6 +575,7 @@ func GetCmdListContractsByCreator() *cobra.Command { } return clientCtx.PrintProto(res) }, + SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) return cmd @@ -650,6 +663,7 @@ func GetCmdQueryParams() *cobra.Command { return clientCtx.PrintProto(&res.Params) }, + SilenceUsage: true, } flags.AddQueryFlagsToCmd(cmd) diff --git a/x/wasm/client/cli/tx.go b/x/wasm/client/cli/tx.go index 9a2eebfda8..7e4c6e36f0 100644 --- a/x/wasm/client/cli/tx.go +++ b/x/wasm/client/cli/tx.go @@ -42,6 +42,7 @@ func GetTxCmd() *cobra.Command { DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, + SilenceUsage: true, } txCmd.AddCommand( StoreCodeCmd(), @@ -76,6 +77,7 @@ func StoreCodeCmd() *cobra.Command { } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, + SilenceUsage: true, } cmd.Flags().String(flagInstantiateByEverybody, "", "Everybody can instantiate a contract from the code, optional") @@ -202,6 +204,7 @@ $ %s tx wasm instantiate 1 '{"foo":"bar"}' --admin="$(%s keys show mykey -a)" \ } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, + SilenceUsage: true, } cmd.Flags().String(flagAmount, "", "Coins to send to the contract during instantiation") @@ -262,6 +265,7 @@ $ %s tx wasm instantiate2 1 '{"foo":"bar"}' $(echo -n "testing" | xxd -ps) --adm } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, + SilenceUsage: true, } cmd.Flags().String(flagAmount, "", "Coins to send to the contract during instantiation") @@ -347,6 +351,7 @@ func ExecuteContractCmd() *cobra.Command { } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) }, + SilenceUsage: true, } cmd.Flags().String(flagAmount, "", "Coins to send to the contract along with command")