Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
Browse files Browse the repository at this point in the history
…ita/pool
  • Loading branch information
likhita-809 committed Sep 25, 2023
2 parents 843d1c6 + bb35cf1 commit b49f1f5
Show file tree
Hide file tree
Showing 21 changed files with 260 additions and 201 deletions.
42 changes: 25 additions & 17 deletions api/cosmos/tx/signing/v1beta1/signing.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/v2/autocli/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (appOptions AppOptions) EnhanceRootCommand(rootCmd *cobra.Command) error {
}

func (appOptions AppOptions) EnhanceRootCommandWithBuilder(rootCmd *cobra.Command, builder *Builder) error {
if err := builder.Validate(); err != nil {
if err := builder.ValidateAndComplete(); err != nil {
return err
}

Expand Down
6 changes: 5 additions & 1 deletion client/v2/autocli/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ type Builder struct {
AddTxConnFlags func(*cobra.Command)
}

func (b *Builder) Validate() error {
// ValidateAndComplete the builder fields.
// It returns an error if any of the required fields are missing.
// If the Logger is nil, it will be set to a nop logger.
// If the keyring is nil, it will be set to a no keyring.
func (b *Builder) ValidateAndComplete() error {
if b.Logger == nil {
b.Logger = log.NewNopLogger()
}
Expand Down
2 changes: 1 addition & 1 deletion client/v2/autocli/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func initFixture(t *testing.T) *fixture {
AddQueryConnFlags: flags.AddQueryFlagsToCmd,
AddTxConnFlags: flags.AddTxFlagsToCmd,
}
assert.NilError(t, b.Validate())
assert.NilError(t, b.ValidateAndComplete())

return &fixture{
conn: conn,
Expand Down
56 changes: 28 additions & 28 deletions client/v2/autocli/testdata/help-deprecated-msg.golden
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ Usage:
test deprecatedmsg send [flags]

Flags:
--a-bool
--a-coin cosmos.base.v1beta1.Coin
--a-message testpb.AMessage (json)
--a-validator-address account address or key name
--a-bool
--a-coin cosmos.base.v1beta1.Coin
--a-message testpb.AMessage (json)
--a-validator-address account address or key name
-a, --account-number uint The account number of the signing account (offline mode only)
--an-address account address or key name
--an-address account address or key name
--an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified)
--aux Generate aux signer data instead of sending a tx
--bools bools (default [])
-b, --broadcast-mode string Transaction broadcasting mode (sync|async) (default "sync")
--bz binary
--bz binary
--chain-id string The network chain ID
--deprecated-field string
--deprecated-field string
--dry-run ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it (when enabled, the local Keybase is not accessible)
--duration duration
--durations duration (repeated)
--enums Enum (unspecified | one | two | five | neg-three) (repeated)
--duration duration
--durations duration (repeated)
--enums Enum (unspecified | one | two | five | neg-three) (repeated)
--fee-granter string Fee granter grants fees for the transaction
--fee-payer string Fee payer pays fees for the transaction instead of deducting from the signer
--fees string Fees to pay along with transaction; eg: 10uatom
Expand All @@ -31,9 +31,9 @@ Flags:
--gas-prices string Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom)
--generate-only Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name)
-h, --help help for send
--hidden-bool
--i32 int32
--i64 int
--hidden-bool
--i32 int32
--i64 int
--keyring-backend string Select keyring's backend (os|file|kwallet|pass|test|memory) (default "os")
--keyring-dir string The client Keyring directory; if omitted, the default 'home' directory will be used
--ledger Use a connected Ledger device
Expand All @@ -42,24 +42,24 @@ Flags:
--note string Note to add a description to the transaction (previously --memo)
--offline Offline mode (does not allow any online functionality)
-o, --output string Output format (text|json) (default "json")
--page-count-total
--page-key binary
--page-limit uint
--page-offset uint
--page-reverse
--positional1 int32
--positional2 string
--positional3-varargs cosmos.base.v1beta1.Coin (repeated)
--page-count-total
--page-key binary
--page-limit uint
--page-offset uint
--page-reverse
--positional1 int32
--positional2 string
--positional3-varargs cosmos.base.v1beta1.Coin (repeated)
-s, --sequence uint The sequence number of the signing account (offline mode only)
--shorthand-deprecated-field string
--shorthand-deprecated-field string
--sign-mode string Choose sign mode (direct|amino-json|direct-aux), this is an advanced feature
--some-messages testpb.AMessage (json) (repeated)
--str string
--strings strings
--some-messages testpb.AMessage (json) (repeated)
--str string
--strings strings
--timeout-height uint Set a block timeout height to prevent the tx from being committed past a certain height
--timestamp timestamp (RFC 3339)
--timestamp timestamp (RFC 3339)
--tip string 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
--u32 uint32
--u64 uint
--u32 uint32
--u64 uint
--uints uints (default [])
-y, --yes Skip tx broadcasting prompt confirmation
62 changes: 31 additions & 31 deletions client/v2/autocli/testdata/help-deprecated.golden
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,45 @@ Usage:
test deprecatedecho echo [flags]

Flags:
--a-bool
--a-coin cosmos.base.v1beta1.Coin
--a-consensus-address account address or key name
--a-message testpb.AMessage (json)
--a-validator-address account address or key name
--an-address account address or key name
--a-bool
--a-coin cosmos.base.v1beta1.Coin
--a-consensus-address account address or key name
--a-message testpb.AMessage (json)
--a-validator-address account address or key name
--an-address account address or key name
--an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified)
--bools bools (default [])
--bz binary
--deprecated-field string
--duration duration
--durations duration (repeated)
--enums Enum (unspecified | one | two | five | neg-three) (repeated)
--bz binary
--deprecated-field string
--duration duration
--durations duration (repeated)
--enums Enum (unspecified | one | two | five | neg-three) (repeated)
--grpc-addr string the gRPC endpoint to use for this chain
--grpc-insecure allow gRPC over insecure channels, if not the server must use TLS
--height int Use a specific height to query state at (this can error if the node is pruning state)
-h, --help help for echo
--hidden-bool
--i32 int32
--i64 int
--map-string-coin map[string]cosmos.base.v1beta1.Coin
--hidden-bool
--i32 int32
--i64 int
--map-string-coin map[string]cosmos.base.v1beta1.Coin
--map-string-string stringToString (default [])
--map-string-uint32 stringToUint32
--map-string-uint32 stringToUint32
--no-indent Do not indent JSON output
--node string <host>:<port> to CometBFT RPC interface for this chain (default "tcp://localhost:26657")
-o, --output string Output format (text|json) (default "text")
--page-count-total
--page-key binary
--page-limit uint
--page-offset uint
--page-reverse
--positional1 int32
--positional2 string
--positional3-varargs cosmos.base.v1beta1.Coin (repeated)
--shorthand-deprecated-field string
--some-messages testpb.AMessage (json) (repeated)
--str string
--strings strings
--timestamp timestamp (RFC 3339)
--u32 uint32
--u64 uint
--page-count-total
--page-key binary
--page-limit uint
--page-offset uint
--page-reverse
--positional1 int32
--positional2 string
--positional3-varargs cosmos.base.v1beta1.Coin (repeated)
--shorthand-deprecated-field string
--some-messages testpb.AMessage (json) (repeated)
--str string
--strings strings
--timestamp timestamp (RFC 3339)
--u32 uint32
--u64 uint
--uints uints (default [])
Loading

0 comments on commit b49f1f5

Please sign in to comment.