-
Notifications
You must be signed in to change notification settings - Fork 2
/
query_nonce.go
46 lines (34 loc) · 1.04 KB
/
query_nonce.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package cli
// import (
// "github.com/spf13/cobra"
// "strconv"
// "github.com/Electronic-Signatures-Industries/ancon-protocol/x/anconprotocol/types"
// "github.com/cosmos/cosmos-sdk/client"
// "github.com/cosmos/cosmos-sdk/client/flags"
// )
// var _ = strconv.Itoa(0)
// func CmdNonce() *cobra.Command {
// cmd := &cobra.Command{
// Use: "nonce [delegates]",
// Short: "Query nonce",
// Args: cobra.ExactArgs(1),
// RunE: func(cmd *cobra.Command, args []string) error {
// reqDelegates := string(args[0])
// clientCtx, err := client.GetClientTxContext(cmd)
// if err != nil {
// return err
// }
// queryClient := types.NewQueryClient(clientCtx)
// params := &types.QueryNonceRequest{
// Delegates: string(reqDelegates),
// }
// res, err := queryClient.Nonce(cmd.Context(), params)
// if err != nil {
// return err
// }
// return clientCtx.PrintProto(res)
// },
// }
// flags.AddQueryFlagsToCmd(cmd)
// return cmd
// }