Skip to content

Commit

Permalink
feat(slashing): autocli query config (backport #16659) (#17005)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jul 15, 2023
1 parent e1efdfe commit fbe45d6
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 294 deletions.
40 changes: 40 additions & 0 deletions x/slashing/autocli.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package slashing

import (
"fmt"

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
slashingv1beta "cosmossdk.io/api/cosmos/slashing/v1beta1"

"github.com/cosmos/cosmos-sdk/version"
)

func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
return &autocliv1.ModuleOptions{
Query: &autocliv1.ServiceCommandDescriptor{
Service: slashingv1beta.Query_ServiceDesc.ServiceName,
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "Params",
Use: "params",
Short: "Query the current slashing parameters",
},
{
RpcMethod: "SigningInfo",
Use: "signing-info [validator-conspub/address]",
Short: "Query a validator's signing information",
Long: "Query a validator's signing information, with a pubkey ('<appd> comet show-validator') or a validator consensus address",
Example: fmt.Sprintf(`%s query slashing signing-info '{"@type":"/cosmos.crypto.ed25519.PubKey","key":"OauFcTKbN5Lx3fJL689cikXBqe+hcp6Y+x0rYUdR9Jk="}'`, version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "cons_address"},
},
},
{
RpcMethod: "SigningInfos",
Use: "signing-infos",
Short: "Query signing information of all validators",
},
},
},
}
}
141 changes: 0 additions & 141 deletions x/slashing/client/cli/query.go

This file was deleted.

148 changes: 0 additions & 148 deletions x/slashing/client/cli/query_test.go

This file was deleted.

Loading

0 comments on commit fbe45d6

Please sign in to comment.