From 804ddd898e9f17a3a561bfe2a8c3fb9fc3f33571 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Fri, 12 Aug 2022 03:34:54 +0200 Subject: [PATCH 1/3] docs(cli): improve --gas flag description --- client/flags/flags.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/flags/flags.go b/client/flags/flags.go index 9164ab599d6a..c72f3eeb8f07 100644 --- a/client/flags/flags.go +++ b/client/flags/flags.go @@ -129,7 +129,8 @@ func AddTxFlagsToCmd(cmd *cobra.Command) { cmd.Flags().String(FlagChainID, "", "The network chain ID") // --gas can accept integers and "auto" - cmd.Flags().String(FlagGas, "", fmt.Sprintf("gas limit to set per-transaction; set to %q to calculate sufficient gas automatically (default %d)", GasFlagAuto, DefaultGasLimit)) + cmd.Flags().String(FlagGas, "", fmt.Sprintf("gas limit to set per-transaction; set to %q to calculate sufficient gas automatically. Note: %q option doesn't necessary work. Can be used instead of %q. (default %d)", + GasFlagAuto, GasFlagAuto, FlagFees, DefaultGasLimit)) } // AddPaginationFlagsToCmd adds common pagination flags to cmd From 9d3b03805c46ea94bcd849d92f01b1fd374cd56f Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 18 Aug 2022 01:10:21 +0200 Subject: [PATCH 2/3] Update client/flags/flags.go Co-authored-by: Aleksandr Bezobchuk --- client/flags/flags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/flags/flags.go b/client/flags/flags.go index c72f3eeb8f07..8b38e3253231 100644 --- a/client/flags/flags.go +++ b/client/flags/flags.go @@ -129,7 +129,7 @@ func AddTxFlagsToCmd(cmd *cobra.Command) { cmd.Flags().String(FlagChainID, "", "The network chain ID") // --gas can accept integers and "auto" - cmd.Flags().String(FlagGas, "", fmt.Sprintf("gas limit to set per-transaction; set to %q to calculate sufficient gas automatically. Note: %q option doesn't necessary work. Can be used instead of %q. (default %d)", + cmd.Flags().String(FlagGas, "", fmt.Sprintf("gas limit to set per-transaction; set to %q to calculate sufficient gas automatically. Note: %q option doesn't always report accurate results. Use %q to adjust the result. Can be used instead of %q. (default %d)", GasFlagAuto, GasFlagAuto, FlagFees, DefaultGasLimit)) } From 9ba2d0813f1428c065e7d7b3d6668901d60557c9 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 18 Aug 2022 18:39:17 +0200 Subject: [PATCH 3/3] fix sprintf --- client/flags/flags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/flags/flags.go b/client/flags/flags.go index 8b38e3253231..d7761f05c019 100644 --- a/client/flags/flags.go +++ b/client/flags/flags.go @@ -129,7 +129,7 @@ func AddTxFlagsToCmd(cmd *cobra.Command) { cmd.Flags().String(FlagChainID, "", "The network chain ID") // --gas can accept integers and "auto" - cmd.Flags().String(FlagGas, "", fmt.Sprintf("gas limit to set per-transaction; set to %q to calculate sufficient gas automatically. Note: %q option doesn't always report accurate results. Use %q to adjust the result. Can be used instead of %q. (default %d)", + cmd.Flags().String(FlagGas, "", fmt.Sprintf("gas limit to set per-transaction; set to %q to calculate sufficient gas automatically. Note: %q option doesn't always report accurate results. Set a valid coin value to adjust the result. Can be used instead of %q. (default %d)", GasFlagAuto, GasFlagAuto, FlagFees, DefaultGasLimit)) }