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

Function GetCmdSQParams

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

Source from the content-addressed store, hash-verified

187}
188
189func GetCmdSQParams() *cobra.Command {
190 cmd := &cobra.Command{
191 Use: "sq-params [pool]",
192 Short: "query margin sq-params for a pool",
193 Args: cobra.ExactArgs(1),
194 RunE: func(cmd *cobra.Command, args []string) error {
195 clientCtx, err := client.GetClientQueryContext(cmd)
196 if err != nil {
197 return err
198 }
199
200 queryClient := types.NewQueryClient(clientCtx)
201 res, err := queryClient.GetSQParams(context.Background(), &types.GetSQParamsRequest{
202 Pool: args[0],
203 })
204 if err != nil {
205 return err
206 }
207
208 return clientCtx.PrintProto(res)
209 },
210 }
211 flags.AddQueryFlagsToCmd(cmd)
212 return cmd
213}
214
215func GetCmdQueryWhitelist() *cobra.Command {
216 cmd := &cobra.Command{

Callers 1

GetQueryCmdFunction · 0.85

Calls 2

GetSQParamsMethod · 0.95
NewQueryClientFunction · 0.92

Tested by

no test coverage detected