feat(consensus): wire autocli query (backport #16633) (#16646)

This commit is contained in:
mergify[bot] 2023-06-22 06:23:32 +00:00 committed by GitHub
parent e991124b07
commit 7539520d50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

23
x/consensus/autocli.go Normal file
View File

@ -0,0 +1,23 @@
package consensus
import (
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
consensusv1 "cosmossdk.io/api/cosmos/consensus/v1"
)
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
return &autocliv1.ModuleOptions{
Query: &autocliv1.ServiceCommandDescriptor{
Service: consensusv1.Query_ServiceDesc.ServiceName,
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "Params",
Use: "params",
Short: "Query the current consensus parameters",
},
},
},
// Tx is purposely left empty, as the only tx is MsgUpdateParams which is gov gated.
}
}