package cli import ( "strconv" "cosmos-test/x/cosmostest/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" ) var _ = strconv.Itoa(0) func CmdAuctionBids() *cobra.Command { cmd := &cobra.Command{ Use: "auction-bids [index]", Short: "Query auctionBids", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { reqIndex := args[0] clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } queryClient := types.NewQueryClient(clientCtx) params := &types.QueryAuctionBidsRequest{ Index: reqIndex, } res, err := queryClient.AuctionBids(cmd.Context(), params) if err != nil { return err } return clientCtx.PrintProto(res) }, } flags.AddQueryFlagsToCmd(cmd) return cmd }