From 211fb26376a4f4f040d73e4f2818c70117e71dc4 Mon Sep 17 00:00:00 2001 From: John Letey Date: Tue, 17 Sep 2024 16:50:00 -0400 Subject: [PATCH] chore: include authority query cmd --- x/florin/client/cli/query.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/x/florin/client/cli/query.go b/x/florin/client/cli/query.go index e2c6744f..ad8344b0 100644 --- a/x/florin/client/cli/query.go +++ b/x/florin/client/cli/query.go @@ -36,6 +36,7 @@ func GetQueryCmd() *cobra.Command { cmd.AddCommand(GetBlacklistQueryCmd()) + cmd.AddCommand(QueryAuthority()) cmd.AddCommand(QueryAllowedDenoms()) cmd.AddCommand(QueryOwners()) cmd.AddCommand(QuerySystems()) @@ -47,6 +48,29 @@ func GetQueryCmd() *cobra.Command { return cmd } +func QueryAuthority() *cobra.Command { + cmd := &cobra.Command{ + Use: "authority", + Short: "Query the authority address of this module", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.Authority(context.Background(), &types.QueryAuthority{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + func QueryAllowedDenoms() *cobra.Command { cmd := &cobra.Command{ Use: "allowed-denoms",