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

Function GetCmdParams

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

Source from the content-addressed store, hash-verified

163}
164
165func GetCmdParams() *cobra.Command {
166 cmd := &cobra.Command{
167 Use: "params",
168 Short: "query margin params",
169 Args: cobra.ExactArgs(0),
170 RunE: func(cmd *cobra.Command, args []string) error {
171 clientCtx, err := client.GetClientQueryContext(cmd)
172 if err != nil {
173 return err
174 }
175
176 queryClient := types.NewQueryClient(clientCtx)
177 res, err := queryClient.GetParams(context.Background(), &types.ParamsRequest{})
178 if err != nil {
179 return err
180 }
181
182 return clientCtx.PrintProto(res)
183 },
184 }
185 flags.AddQueryFlagsToCmd(cmd)
186 return cmd
187}
188
189func GetCmdSQParams() *cobra.Command {
190 cmd := &cobra.Command{

Callers 1

GetQueryCmdFunction · 0.70

Calls 2

GetParamsMethod · 0.95
NewQueryClientFunction · 0.92

Tested by

no test coverage detected