From e80407abe87ef6ebeb16426bd1c6f2a658e8847e Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Thu, 22 Jun 2023 08:07:48 +0200 Subject: [PATCH] feat(consensus): wire autocli query (#16633) --- x/consensus/autocli.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 x/consensus/autocli.go diff --git a/x/consensus/autocli.go b/x/consensus/autocli.go new file mode 100644 index 0000000000..54f3dfcf32 --- /dev/null +++ b/x/consensus/autocli.go @@ -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. + } +}