@@ -5,12 +5,13 @@ import (
55 "fmt"
66 "strings"
77
8- "github.com/cosmos/ibc-go/v10/modules/apps/rate-limiting/types"
98 "github.com/spf13/cobra"
109
1110 "github.com/cosmos/cosmos-sdk/client"
1211 "github.com/cosmos/cosmos-sdk/client/flags"
1312 "github.com/cosmos/cosmos-sdk/version"
13+
14+ "github.com/cosmos/ibc-go/v10/modules/apps/rate-limiting/types"
1415)
1516
1617const (
@@ -31,9 +32,9 @@ func GetQueryCmd() *cobra.Command {
3132 cmd .AddCommand (
3233 GetCmdQueryRateLimit (),
3334 GetCmdQueryAllRateLimits (),
34- GetCmdQueryRateLimitsByChainId (),
35- GetCmdQueryAllBlacklistedDenoms (), // Add Blacklisted Denoms query
36- GetCmdQueryAllWhitelistedAddresses (), // Add Whitelisted Addresses query
35+ GetCmdQueryRateLimitsByChainID (),
36+ GetCmdQueryAllBlacklistedDenoms (),
37+ GetCmdQueryAllWhitelistedAddresses (),
3738 // TODO: Add GetCmdQueryParams if needed
3839 )
3940 return cmd
@@ -57,7 +58,7 @@ Example:
5758 ),
5859 Args : cobra .ExactArgs (1 ),
5960 RunE : func (cmd * cobra.Command , args []string ) error {
60- channelOrClientId := args [0 ]
61+ channelOrClientID := args [0 ]
6162 denom , err := cmd .Flags ().GetString (FlagDenom )
6263 if err != nil {
6364 return err
@@ -71,10 +72,10 @@ Example:
7172
7273 if denom == "" {
7374 // Query all rate limits for the channel/client ID if denom is not specified
74- req := & types.QueryRateLimitsByChannelOrClientIdRequest {
75- ChannelOrClientId : channelOrClientId ,
75+ req := & types.QueryRateLimitsByChannelOrClientIDRequest {
76+ ChannelOrClientId : channelOrClientID ,
7677 }
77- res , err := queryClient .RateLimitsByChannelOrClientId (context .Background (), req )
78+ res , err := queryClient .RateLimitsByChannelOrClientID (context .Background (), req )
7879 if err != nil {
7980 return err
8081 }
@@ -85,7 +86,7 @@ Example:
8586 // Query specific rate limit if denom is provided
8687 req := & types.QueryRateLimitRequest {
8788 Denom : denom ,
88- ChannelOrClientId : channelOrClientId ,
89+ ChannelOrClientId : channelOrClientID ,
8990 }
9091 res , err := queryClient .RateLimit (context .Background (), req )
9192 if err != nil {
@@ -130,26 +131,26 @@ func GetCmdQueryAllRateLimits() *cobra.Command {
130131 return cmd
131132}
132133
133- // GetCmdQueryRateLimitsByChainId return all rate limits that exist between this chain
134+ // GetCmdQueryRateLimitsByChainID return all rate limits that exist between this chain
134135// and the specified ChainId
135- func GetCmdQueryRateLimitsByChainId () * cobra.Command {
136+ func GetCmdQueryRateLimitsByChainID () * cobra.Command {
136137 cmd := & cobra.Command {
137138 Use : "rate-limits-by-chain [chain-id]" ,
138139 Short : "Query all rate limits associated with the channels/clients connecting to the given ChainID" ,
139140 Args : cobra .ExactArgs (1 ),
140141 RunE : func (cmd * cobra.Command , args []string ) error {
141- chainId := args [0 ]
142+ chainID := args [0 ]
142143
143144 clientCtx , err := client .GetClientQueryContext (cmd )
144145 if err != nil {
145146 return err
146147 }
147148 queryClient := types .NewQueryClient (clientCtx )
148149
149- req := & types.QueryRateLimitsByChainIdRequest {
150- ChainId : chainId ,
150+ req := & types.QueryRateLimitsByChainIDRequest {
151+ ChainId : chainID ,
151152 }
152- res , err := queryClient .RateLimitsByChainId (context .Background (), req )
153+ res , err := queryClient .RateLimitsByChainID (context .Background (), req )
153154 if err != nil {
154155 return err
155156 }
@@ -215,4 +216,4 @@ func GetCmdQueryAllWhitelistedAddresses() *cobra.Command {
215216
216217 flags .AddQueryFlagsToCmd (cmd )
217218 return cmd
218- }
219+ }
0 commit comments