Skip to content

Commit

Permalink
add emergency group ugov cli query (#2245)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsk967 authored Sep 14, 2023
1 parent b96b879 commit 87159cb
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions x/ugov/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,35 @@ func GetQueryCmd() *cobra.Command {
QueryMinGasPrice(),
QueryInflationParams(),
QueryInflationCyleEnd(),
QueryEmergencyGroup(),
)

return cmd
}

// QueryEmergencyGroup creates the Msg/QueryEmergencyGroup CLI.
func QueryEmergencyGroup() *cobra.Command {
cmd := &cobra.Command{
Use: "emergency-group",
Args: cobra.NoArgs,
Short: "Query the emergency group address.",
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}

queryClient := ugov.NewQueryClient(clientCtx)
resp, err := queryClient.EmergencyGroup(cmd.Context(), &ugov.QueryEmergencyGroup{})
return cli.PrintOrErr(resp, err, clientCtx)
},
}

flags.AddQueryFlagsToCmd(cmd)

return cmd
}

// QueryMinGasPrice creates the Msg/QueryMinGasPrice CLI.
func QueryMinGasPrice() *cobra.Command {
cmd := &cobra.Command{
Expand Down

0 comments on commit 87159cb

Please sign in to comment.