feat(bank): autocli query support (backport #16899) (#16902)

Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot]
2023-07-10 12:48:24 +00:00
committed by GitHub
co-authored by Julien Robert
parent 3fee9db359
commit c8a49b35cd
13 changed files with 243 additions and 1160 deletions
-8
View File
@@ -9,7 +9,6 @@ import (
"cosmossdk.io/core/address"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/testutil"
"github.com/cosmos/cosmos-sdk/x/bank/client/cli"
)
@@ -37,10 +36,3 @@ func MsgSendExec(clientCtx client.Context, from, to, amount fmt.Stringer, ac add
return ExecTestCLICmd(clientCtx, cli.NewSendTxCmd(ac), args)
}
func QueryBalancesExec(clientCtx client.Context, address fmt.Stringer, ac address.Codec, extraArgs ...string) (testutil.BufferWriter, error) {
args := []string{address.String(), fmt.Sprintf("--%s=json", flags.FlagOutput)}
args = append(args, extraArgs...)
return ExecTestCLICmd(clientCtx, cli.GetBalancesCmd(ac), args)
}