MCPcopy Create free account
hub / github.com/Sifchain/sifnode / GetCmdQueryStatus

Function GetCmdQueryStatus

x/margin/client/cli/query.go:141–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

139}
140
141func GetCmdQueryStatus() *cobra.Command {
142 cmd := &cobra.Command{
143 Use: "status",
144 Short: "query status properties",
145 Args: cobra.ExactArgs(0),
146 RunE: func(cmd *cobra.Command, args []string) error {
147 clientCtx, err := client.GetClientQueryContext(cmd)
148 if err != nil {
149 return err
150 }
151
152 queryClient := types.NewQueryClient(clientCtx)
153 res, err := queryClient.GetStatus(context.Background(), &types.StatusRequest{})
154 if err != nil {
155 return err
156 }
157
158 return clientCtx.PrintProto(res)
159 },
160 }
161 flags.AddQueryFlagsToCmd(cmd)
162 return cmd
163}
164
165func GetCmdParams() *cobra.Command {
166 cmd := &cobra.Command{

Callers 1

GetQueryCmdFunction · 0.85

Calls 2

GetStatusMethod · 0.95
NewQueryClientFunction · 0.92

Tested by

no test coverage detected