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

This commit is contained in:
Julien Robert 2023-06-22 08:07:48 +02:00 committed by GitHub
parent 854978f382
commit e80407abe8
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.
}
}