()
| 163 | } |
| 164 | |
| 165 | func 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 | |
| 189 | func GetCmdSQParams() *cobra.Command { |
| 190 | cmd := &cobra.Command{ |
no test coverage detected