-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(slashing): autocli query config (#16659)
Co-authored-by: Julien Robert <[email protected]>
- Loading branch information
1 parent
88c7ba0
commit f7a4add
Showing
5 changed files
with
102 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
}, | ||
}, | ||
}, | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.