From 671b93d6032656dceeee1616b849535145b3e10d Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Wed, 11 Aug 2021 21:48:45 -0600 Subject: [PATCH] fix(cosmos): don't force the output format to JSON The new Cosmos-SDK 0.43.0 adds an `-ojson` flag to the `tx` subcommands, so we can both specify it when we need and don't have to force users to look at JSON when the default is clearer. --- golang/cosmos/daemon/cmd/root.go | 3 --- packages/agoric-cli/lib/start.js | 2 ++ packages/solo/src/chain-cosmos-sdk.js | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/golang/cosmos/daemon/cmd/root.go b/golang/cosmos/daemon/cmd/root.go index 5d890d1d28c..c39e672f17e 100644 --- a/golang/cosmos/daemon/cmd/root.go +++ b/golang/cosmos/daemon/cmd/root.go @@ -68,9 +68,6 @@ func NewRootCmd(sender Sender) (*cobra.Command, params.EncodingConfig) { return err } - // FIXME: Need this for compatibility with Agoric's use of the client - initClientCtx.OutputFormat = "json" - if err := client.SetCmdClientContextHandler(initClientCtx, cmd); err != nil { return err } diff --git a/packages/agoric-cli/lib/start.js b/packages/agoric-cli/lib/start.js index 099550496dc..dc4e72f793e 100644 --- a/packages/agoric-cli/lib/start.js +++ b/packages/agoric-cli/lib/start.js @@ -481,6 +481,7 @@ export default async function startMain(progname, rawArgs, powers, opts) { 'tx', 'swingset', 'provision-one', + '-ojson', '--keyring-backend=test', '--from=provision', '--gas=auto', @@ -498,6 +499,7 @@ export default async function startMain(progname, rawArgs, powers, opts) { 'tx', 'bank', 'send', + '-ojson', '--keyring-backend=test', '--gas=auto', '--gas-adjustment=1.2', diff --git a/packages/solo/src/chain-cosmos-sdk.js b/packages/solo/src/chain-cosmos-sdk.js index f7bae2fc173..bfc48b54000 100644 --- a/packages/solo/src/chain-cosmos-sdk.js +++ b/packages/solo/src/chain-cosmos-sdk.js @@ -418,6 +418,7 @@ ${chainID} chain does not yet know of address ${clientAddr}${adviseEgress( '--gas-adjustment=1.3', '--from=ag-solo', '--yes', + '-ojson', ); // Use the feeAccount for any fees.