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

This commit is contained in:
Julien Robert
2023-07-10 12:20:45 +00:00
committed by GitHub
parent 81b70496c5
commit febeced2e1
13 changed files with 242 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)
}