chore!: Refactor x/bank CLI Tests (#12706)
This commit is contained in:
@@ -79,6 +79,7 @@ const (
|
||||
FlagReverse = "reverse"
|
||||
FlagTip = "tip"
|
||||
FlagAux = "aux"
|
||||
FlagOutput = tmcli.OutputFlag
|
||||
|
||||
// Tendermint logging flags
|
||||
FlagLogLevel = "log_level"
|
||||
@@ -93,7 +94,7 @@ var LineBreak = &cobra.Command{Run: func(*cobra.Command, []string) {}}
|
||||
func AddQueryFlagsToCmd(cmd *cobra.Command) {
|
||||
cmd.Flags().String(FlagNode, "tcp://localhost:26657", "<host>:<port> to Tendermint RPC interface for this chain")
|
||||
cmd.Flags().Int64(FlagHeight, 0, "Use a specific height to query state at (this can error if the node is pruning state)")
|
||||
cmd.Flags().StringP(tmcli.OutputFlag, "o", "text", "Output format (text|json)")
|
||||
cmd.Flags().StringP(FlagOutput, "o", "text", "Output format (text|json)")
|
||||
|
||||
// some base commands does not require chainID e.g `simd testnet` while subcommands do
|
||||
// hence the flag should not be required for those commands
|
||||
@@ -102,7 +103,7 @@ func AddQueryFlagsToCmd(cmd *cobra.Command) {
|
||||
|
||||
// AddTxFlagsToCmd adds common flags to a module tx command.
|
||||
func AddTxFlagsToCmd(cmd *cobra.Command) {
|
||||
cmd.Flags().StringP(tmcli.OutputFlag, "o", "json", "Output format (text|json)")
|
||||
cmd.Flags().StringP(FlagOutput, "o", "json", "Output format (text|json)")
|
||||
cmd.Flags().String(FlagKeyringDir, "", "The client Keyring directory; if omitted, the default 'home' directory will be used")
|
||||
cmd.Flags().String(FlagFrom, "", "Name or address of private key with which to sign")
|
||||
cmd.Flags().Uint64P(FlagAccountNumber, "a", 0, "The account number of the signing account (offline mode only)")
|
||||
@@ -125,6 +126,7 @@ func AddTxFlagsToCmd(cmd *cobra.Command) {
|
||||
cmd.Flags().String(FlagFeeGranter, "", "Fee granter grants fees for the transaction")
|
||||
cmd.Flags().String(FlagTip, "", "Tip is the amount that is going to be transferred to the fee payer on the target chain. This flag is only valid when used with --aux, and is ignored if the target chain didn't enable the TipDecorator")
|
||||
cmd.Flags().Bool(FlagAux, false, "Generate aux signer data instead of sending a tx")
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user