Skip to content

Commit

Permalink
add emergency group ugov cli query
Browse files Browse the repository at this point in the history
  • Loading branch information
gsk967 committed Sep 14, 2023
1 parent b96b879 commit 997e7f0
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 997e7f0

Please sign in to comment.