Robert/api clientctx (#8107)

* rename clientCtx.PrintOutput to PrintObject

* rename clientCtx.PrintOutputLegacy to PrintObjectLegacy

* Changelog update

* Rename PrintObject to PrintProto
This commit is contained in:
Robert Zaremba 2020-12-08 21:17:40 +01:00 committed by GitHub
parent e843878920
commit fe41718047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 91 additions and 90 deletions

View File

@ -52,18 +52,18 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (x/genutil) [\#8099](https://github.com/cosmos/cosmos-sdk/pull/8099) `init` now supports a `--recover` flag to recover the private validator key from a given mnemonic
### State Machine Breaking Changes
* (x/upgrade) [\#7979](https://github.com/cosmos/cosmos-sdk/pull/7979) keeper pubkey storage serialization migration from bech32 to protobuf.
### Bug Fixes
* (crypto) [\#7966](https://github.com/cosmos/cosmos-sdk/issues/7966) `Bip44Params` `String()` function now correctly returns the absolute HD path by adding the `m/` prefix.
### API Breaking
* [\#8080](https://github.com/cosmos/cosmos-sdk/pull/8080) Updated the `codec.Marshaler` interface
* Moved `MarshalAny` and `UnmarshalAny` helper functions to `codec.Marshaler` and renamed to `MarshalInterface` and `UnmarshalInterface` respectively. These functions must take interface as a parameter (not a concrete type nor `Any` object). Underneath they use `Any` wrapping for correct protobuf serialization.
* (client) [\#8107](https://github.com/cosmos/cosmos-sdk/pull/8107) Renamed `PrintOutput` and `PrintOutputLegacy` methods of the `context.Client` object to `PrintProto` and `PrintObjectLegacy`.
## [v0.40.0-rc3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0-rc3) - 2020-11-06

View File

@ -208,10 +208,10 @@ func (ctx Context) PrintString(str string) error {
return err
}
// PrintOutput outputs toPrint to the ctx.Output based on ctx.OutputFormat which is
// PrintProto outputs toPrint to the ctx.Output based on ctx.OutputFormat which is
// either text or json. If text, toPrint will be YAML encoded. Otherwise, toPrint
// will be JSON encoded using ctx.JSONMarshaler. An error is returned upon failure.
func (ctx Context) PrintOutput(toPrint proto.Message) error {
func (ctx Context) PrintProto(toPrint proto.Message) error {
// always serialize JSON initially because proto json can't be directly YAML encoded
out, err := ctx.JSONMarshaler.MarshalJSON(toPrint)
if err != nil {
@ -220,9 +220,10 @@ func (ctx Context) PrintOutput(toPrint proto.Message) error {
return ctx.printOutput(out)
}
// PrintOutputLegacy is a variant of PrintOutput that doesn't require a proto type
// and uses amino JSON encoding. It will be removed in the near future!
func (ctx Context) PrintOutputLegacy(toPrint interface{}) error {
// PrintObjectLegacy is a variant of PrintProto that doesn't require a proto.Message type
// and uses amino JSON encoding.
// Deprecated: It will be removed in the near future!
func (ctx Context) PrintObjectLegacy(toPrint interface{}) error {
out, err := ctx.LegacyAmino.MarshalJSON(toPrint)
if err != nil {
return err

View File

@ -23,7 +23,7 @@ func TestMain(m *testing.M) {
os.Exit(m.Run())
}
func TestContext_PrintOutput(t *testing.T) {
func TestContext_PrintObject(t *testing.T) {
ctx := client.Context{}
animal := &testdata.Dog{
@ -47,7 +47,7 @@ func TestContext_PrintOutput(t *testing.T) {
buf := &bytes.Buffer{}
ctx = ctx.WithOutput(buf)
ctx.OutputFormat = "json"
err = ctx.PrintOutput(hasAnimal)
err = ctx.PrintProto(hasAnimal)
require.NoError(t, err)
require.Equal(t,
`{"animal":{"@type":"/testdata.Dog","size":"big","name":"Spot"},"x":"10"}
@ -57,7 +57,7 @@ func TestContext_PrintOutput(t *testing.T) {
buf = &bytes.Buffer{}
ctx = ctx.WithOutput(buf)
ctx.OutputFormat = "text"
err = ctx.PrintOutput(hasAnimal)
err = ctx.PrintProto(hasAnimal)
require.NoError(t, err)
require.Equal(t,
`animal:
@ -77,7 +77,7 @@ x: "10"
buf = &bytes.Buffer{}
ctx = ctx.WithOutput(buf)
ctx.OutputFormat = "json"
err = ctx.PrintOutputLegacy(hasAnimal)
err = ctx.PrintObjectLegacy(hasAnimal)
require.NoError(t, err)
require.Equal(t,
`{"type":"testdata/HasAnimal","value":{"animal":{"type":"testdata/Dog","value":{"size":"big","name":"Spot"}},"x":"10"}}
@ -87,7 +87,7 @@ x: "10"
buf = &bytes.Buffer{}
ctx = ctx.WithOutput(buf)
ctx.OutputFormat = "text"
err = ctx.PrintOutputLegacy(hasAnimal)
err = ctx.PrintObjectLegacy(hasAnimal)
require.NoError(t, err)
require.Equal(t,
`type: testdata/HasAnimal

View File

@ -53,7 +53,7 @@ func ValidatorCommand() *cobra.Command {
return err
}
return clientCtx.PrintOutputLegacy(result)
return clientCtx.PrintObjectLegacy(result)
},
}

View File

@ -133,7 +133,7 @@ func BroadcastTx(clientCtx client.Context, txf Factory, msgs ...sdk.Msg) error {
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
}
// WriteGeneratedTxResponse writes a generated unsigned transaction to the

View File

@ -56,7 +56,7 @@ This query returns the account at a given address. The getter function does the
- The function should first initialize a new client [`Context`](../interfaces/query-lifecycle.md#context) as described in the [previous section](#transaction-commands)
- If applicable, the `Context` is used to retrieve any parameters (e.g. the query originator's address to be used in the query) and marshal them with the query parameter type, in preparation to be relayed to a node. There are no `Context` parameters in this case because the query does not involve any information about the user.
- A new `queryClient` should be initialized using `NewQueryClient(clientCtx)`, this method being generated from `query.proto`. Then it can be used to call the appropriate [query](./messages-and-queries.md#grpc-queries).
- The `clientCtx.PrintOutput` method is used to print the output back to the user.
- The `clientCtx.PrintProto` method is used to format a `proto.Message` object and print it back to the user.
- **Flags.** Add any [flags](#flags) to the command.
Finally, the module also needs a `GetQueryCmd`, which aggregates all of the query commands of the module. Application developers wishing to include the module's queries will call this function to add them as subcommands in their CLI. Its structure is identical to the `GetTxCmd` command shown above.

View File

@ -46,7 +46,7 @@ $ <appd> tx broadcast ./mytxn.json
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}

View File

@ -64,7 +64,7 @@ $ <appd> query auth params
return err
}
return clientCtx.PrintOutput(&res.Params)
return clientCtx.PrintProto(&res.Params)
},
}
@ -98,7 +98,7 @@ func GetAccountCmd() *cobra.Command {
return err
}
return clientCtx.PrintOutput(res.Account)
return clientCtx.PrintProto(res.Account)
},
}
@ -167,7 +167,7 @@ $ %s query txs --%s 'message.sender=cosmos1...&message.action=withdraw_delegator
return err
}
return clientCtx.PrintOutput(txs)
return clientCtx.PrintProto(txs)
},
}
@ -203,7 +203,7 @@ func QueryTxCmd() *cobra.Command {
return fmt.Errorf("no transaction found with hash %s", args[0])
}
return clientCtx.PrintOutput(output)
return clientCtx.PrintProto(output)
},
}

View File

@ -84,7 +84,7 @@ Example:
if err != nil {
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
}
params := types.NewQueryBalanceRequest(addr, denom)
@ -93,7 +93,7 @@ Example:
return err
}
return clientCtx.PrintOutput(res.Balance)
return clientCtx.PrintProto(res.Balance)
},
}
@ -140,7 +140,7 @@ To query for the total supply of a specific coin denomination use:
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
}
res, err := queryClient.SupplyOf(context.Background(), &types.QuerySupplyOfRequest{Denom: denom})
@ -148,7 +148,7 @@ To query for the total supply of a specific coin denomination use:
return err
}
return clientCtx.PrintOutput(&res.Amount)
return clientCtx.PrintProto(&res.Amount)
},
}

View File

@ -56,7 +56,7 @@ func GetCmdQueryParams() *cobra.Command {
return err
}
return clientCtx.PrintOutput(&res.Params)
return clientCtx.PrintProto(&res.Params)
},
}
@ -103,7 +103,7 @@ $ %s query distribution validator-outstanding-rewards %s1lwjmdnks33xwnmfayc64ycp
return err
}
return clientCtx.PrintOutput(&res.Rewards)
return clientCtx.PrintProto(&res.Rewards)
},
}
@ -149,7 +149,7 @@ $ %s query distribution commission %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
return err
}
return clientCtx.PrintOutput(&res.Commission)
return clientCtx.PrintProto(&res.Commission)
},
}
@ -215,7 +215,7 @@ $ %s query distribution slashes %svaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -271,7 +271,7 @@ $ %s query distribution rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1ggh
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
}
res, err := queryClient.DelegationTotalRewards(
@ -282,7 +282,7 @@ $ %s query distribution rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1ggh
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -318,7 +318,7 @@ $ %s query distribution community-pool
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}

View File

@ -23,7 +23,7 @@ func GetQueryCmd() *cobra.Command {
Short: "Query for evidence by hash or for all (paginated) submitted evidence",
Long: strings.TrimSpace(
fmt.Sprintf(`Query for specific submitted evidence by hash or query for all (paginated) evidence:
Example:
$ %s query %s DF0C23E8634E480F84B9D5674A7CDC9816466DEC28A3358F73260F68D28D7660
$ %s query %s --page=2 --limit=50
@ -81,7 +81,7 @@ func queryEvidence(clientCtx client.Context, hash string) error {
return err
}
return clientCtx.PrintOutput(res.Evidence)
return clientCtx.PrintProto(res.Evidence)
}
func queryAllEvidence(clientCtx client.Context, pageReq *query.PageRequest) error {
@ -96,5 +96,5 @@ func queryAllEvidence(clientCtx client.Context, pageReq *query.PageRequest) erro
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
}

View File

@ -82,7 +82,7 @@ $ %s query gov proposal 1
return err
}
return clientCtx.PrintOutput(&res.Proposal)
return clientCtx.PrintProto(&res.Proposal)
},
}
@ -167,7 +167,7 @@ $ %s query gov proposals --page=2 --limit=100
return fmt.Errorf("no proposals found")
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -246,7 +246,7 @@ $ %s query gov vote 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk
}
}
return clientCtx.PrintOutput(&res.Vote)
return clientCtx.PrintProto(&res.Vote)
},
}
@ -309,7 +309,7 @@ $ %[1]s query gov votes 1 --page=2 --limit=100
// TODO migrate to use JSONMarshaler (implement MarshalJSONArray
// or wrap lists of proto.Message in some other message)
clientCtx.LegacyAmino.MustUnmarshalJSON(resByTxQuery, &votes)
return clientCtx.PrintOutputLegacy(votes)
return clientCtx.PrintObjectLegacy(votes)
}
@ -327,7 +327,7 @@ $ %[1]s query gov votes 1 --page=2 --limit=100
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -400,7 +400,7 @@ $ %s query gov deposit 1 cosmos1skjwj5whet0lpe65qaq4rpq03hjxlwd9nf39lk
clientCtx.JSONMarshaler.MustUnmarshalJSON(resByTxQuery, &deposit)
}
return clientCtx.PrintOutput(&deposit)
return clientCtx.PrintProto(&deposit)
},
}
@ -461,7 +461,7 @@ $ %s query gov deposits 1
// or wrap lists of proto.Message in some other message)
clientCtx.LegacyAmino.MustUnmarshalJSON(resByTxQuery, &dep)
return clientCtx.PrintOutputLegacy(dep)
return clientCtx.PrintObjectLegacy(dep)
}
pageReq, err := client.ReadPageRequest(cmd.Flags())
@ -478,7 +478,7 @@ $ %s query gov deposits 1
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -536,7 +536,7 @@ $ %s query gov tally 1
return err
}
return clientCtx.PrintOutput(&res.Tally)
return clientCtx.PrintProto(&res.Tally)
},
}
@ -599,7 +599,7 @@ $ %s query gov params
depositRes.GetDepositParams(),
)
return clientCtx.PrintOutputLegacy(params)
return clientCtx.PrintObjectLegacy(params)
},
}
@ -654,7 +654,7 @@ $ %s query gov param deposit
return fmt.Errorf("argument must be one of (voting|tallying|deposit), was %s", args[0])
}
return clientCtx.PrintOutputLegacy(out)
return clientCtx.PrintObjectLegacy(out)
},
}
@ -696,7 +696,7 @@ $ %s query gov proposer 1
return err
}
return clientCtx.PrintOutputLegacy(prop)
return clientCtx.PrintObjectLegacy(prop)
},
}

View File

@ -37,7 +37,7 @@ func GetCmdQueryDenomTrace() *cobra.Command {
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -77,7 +77,7 @@ func GetCmdQueryDenomTraces() *cobra.Command {
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
flags.AddQueryFlagsToCmd(cmd)
@ -104,7 +104,7 @@ func GetCmdParams() *cobra.Command {
queryClient := types.NewQueryClient(clientCtx)
res, _ := queryClient.Params(context.Background(), &types.QueryParamsRequest{})
return clientCtx.PrintOutput(res.Params)
return clientCtx.PrintProto(res.Params)
},
}

View File

@ -51,7 +51,7 @@ func GetCmdQueryClientStates() *cobra.Command {
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
flags.AddQueryFlagsToCmd(cmd)
@ -84,7 +84,7 @@ func GetCmdQueryClientState() *cobra.Command {
return err
}
return clientCtx.PrintOutput(clientStateRes)
return clientCtx.PrintProto(clientStateRes)
},
}
@ -129,7 +129,7 @@ func GetCmdQueryConsensusStates() *cobra.Command {
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
flags.AddQueryFlagsToCmd(cmd)
@ -179,7 +179,7 @@ If the '--latest' flag is included, the query returns the latest consensus state
return err
}
return clientCtx.PrintOutput(csRes)
return clientCtx.PrintProto(csRes)
},
}
@ -211,7 +211,7 @@ func GetCmdQueryHeader() *cobra.Command {
}
clientCtx = clientCtx.WithHeight(height)
return clientCtx.PrintOutput(&header)
return clientCtx.PrintProto(&header)
},
}
@ -242,7 +242,7 @@ func GetCmdNodeConsensusState() *cobra.Command {
}
clientCtx = clientCtx.WithHeight(height)
return clientCtx.PrintOutput(state)
return clientCtx.PrintProto(state)
},
}
@ -269,7 +269,7 @@ func GetCmdParams() *cobra.Command {
queryClient := types.NewQueryClient(clientCtx)
res, _ := queryClient.ClientParams(context.Background(), &types.QueryClientParamsRequest{})
return clientCtx.PrintOutput(res.Params)
return clientCtx.PrintProto(res.Params)
},
}

View File

@ -46,7 +46,7 @@ func GetCmdQueryConnections() *cobra.Command {
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -80,7 +80,7 @@ func GetCmdQueryConnection() *cobra.Command {
}
clientCtx = clientCtx.WithHeight(int64(connRes.ProofHeight.RevisionHeight))
return clientCtx.PrintOutput(connRes)
return clientCtx.PrintProto(connRes)
},
}
@ -114,7 +114,7 @@ func GetCmdQueryClientConnections() *cobra.Command {
}
clientCtx = clientCtx.WithHeight(int64(connPathsRes.ProofHeight.RevisionHeight))
return clientCtx.PrintOutput(connPathsRes)
return clientCtx.PrintProto(connPathsRes)
},
}

View File

@ -50,7 +50,7 @@ func GetCmdQueryChannels() *cobra.Command {
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -86,7 +86,7 @@ func GetCmdQueryChannel() *cobra.Command {
return err
}
return clientCtx.PrintOutput(channelRes)
return clientCtx.PrintProto(channelRes)
},
}
@ -127,7 +127,7 @@ func GetCmdQueryConnectionChannels() *cobra.Command {
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -160,7 +160,7 @@ func GetCmdQueryChannelClientState() *cobra.Command {
return err
}
return clientCtx.PrintOutput(res.IdentifiedClientState)
return clientCtx.PrintProto(res.IdentifiedClientState)
},
}
@ -201,7 +201,7 @@ func GetCmdQueryPacketCommitments() *cobra.Command {
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -242,7 +242,7 @@ func GetCmdQueryPacketCommitment() *cobra.Command {
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -283,7 +283,7 @@ func GetCmdQueryPacketReceipt() *cobra.Command {
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -324,7 +324,7 @@ func GetCmdQueryPacketAcknowledgement() *cobra.Command {
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -376,7 +376,7 @@ The return value represents:
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -427,7 +427,7 @@ The return value represents:
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -464,7 +464,7 @@ func GetCmdQueryNextSequenceReceive() *cobra.Command {
}
clientCtx = clientCtx.WithHeight(int64(sequenceRes.ProofHeight.RevisionHeight))
return clientCtx.PrintOutput(sequenceRes)
return clientCtx.PrintProto(sequenceRes)
},
}

View File

@ -53,7 +53,7 @@ func GetCmdQueryParams() *cobra.Command {
return err
}
return clientCtx.PrintOutput(&res.Params)
return clientCtx.PrintProto(&res.Params)
},
}

View File

@ -47,7 +47,7 @@ func NewQuerySubspaceParamsCmd() *cobra.Command {
return err
}
return clientCtx.PrintOutput(&res.Param)
return clientCtx.PrintProto(&res.Param)
},
}

View File

@ -65,7 +65,7 @@ $ <appd> query slashing signing-info cosmosvalconspub1zcjduepqfhvwcmt7p06fvdgexx
return err
}
return clientCtx.PrintOutput(&res.ValSigningInfo)
return clientCtx.PrintProto(&res.ValSigningInfo)
},
}
@ -104,7 +104,7 @@ $ <appd> query slashing signing-infos
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -139,7 +139,7 @@ $ <appd> query slashing params
return err
}
return clientCtx.PrintOutput(&res.Params)
return clientCtx.PrintProto(&res.Params)
},
}

View File

@ -82,7 +82,7 @@ $ %s query staking validator %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
return err
}
return clientCtx.PrintOutput(&res.Validator)
return clientCtx.PrintProto(&res.Validator)
},
}
@ -127,7 +127,7 @@ $ %s query staking validators
return err
}
return clientCtx.PrintOutput(result)
return clientCtx.PrintProto(result)
},
}
@ -182,7 +182,7 @@ $ %s query staking unbonding-delegations-from %s1gghjut3ccd8ay0zduzj64hwre2fxs9l
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -239,7 +239,7 @@ $ %s query staking redelegations-from %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -296,7 +296,7 @@ $ %s query staking delegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1gghju
return err
}
return clientCtx.PrintOutput(res.DelegationResponse)
return clientCtx.PrintProto(res.DelegationResponse)
},
}
@ -352,7 +352,7 @@ $ %s query staking delegations %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -409,7 +409,7 @@ $ %s query staking delegations-to %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -467,7 +467,7 @@ $ %s query staking unbonding-delegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9
return err
}
return clientCtx.PrintOutput(&res.Unbond)
return clientCtx.PrintProto(&res.Unbond)
},
}
@ -523,7 +523,7 @@ $ %s query staking unbonding-delegations %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -587,7 +587,7 @@ $ %s query staking redelegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1l2r
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -643,7 +643,7 @@ $ %s query staking redelegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
return err
}
return clientCtx.PrintOutput(res)
return clientCtx.PrintProto(res)
},
}
@ -689,7 +689,7 @@ $ %s query staking historical-info 5
return err
}
return clientCtx.PrintOutput(res.Hist)
return clientCtx.PrintProto(res.Hist)
},
}
@ -727,7 +727,7 @@ $ %s query staking pool
return err
}
return clientCtx.PrintOutput(&res.Pool)
return clientCtx.PrintProto(&res.Pool)
},
}
@ -765,7 +765,7 @@ $ %s query staking params
return err
}
return clientCtx.PrintOutput(&res.Params)
return clientCtx.PrintProto(&res.Params)
},
}

View File

@ -51,7 +51,7 @@ func GetCurrentPlanCmd() *cobra.Command {
return fmt.Errorf("no upgrade scheduled")
}
return clientCtx.PrintOutput(res.GetPlan())
return clientCtx.PrintProto(res.GetPlan())
},
}