From 6529d0afbe969a5dc169e2f407d09c4345d3858d Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 8 Mar 2024 17:33:03 +0100 Subject: [PATCH] feat(x/distribution): add rewards-by-validator autocli config --- x/distribution/autocli.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/x/distribution/autocli.go b/x/distribution/autocli.go index fbfde063d93f..c53abc4eda4e 100644 --- a/x/distribution/autocli.go +++ b/x/distribution/autocli.go @@ -61,15 +61,24 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, { RpcMethod: "DelegationRewards", - Use: "rewards [delegator-addr] [validator-addr]", - Short: "Query all distribution delegator rewards or rewards from a particular validator", - Long: "Query all rewards earned by a delegator, optionally restrict to rewards from a single validator.", + Use: "rewards-by-validator [delegator-addr] [validator-addr]", + Short: "Query all distribution delegator from a particular validator", Example: fmt.Sprintf("$ %s query distribution rewards [delegator-address] [validator-address]", version.AppName), PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "delegator_address"}, {ProtoField: "validator_address"}, }, }, + { + RpcMethod: "DelegationTotalRewards", + Use: "rewards [delegator-addr]", + Short: "Query all distribution delegator rewards", + Long: "Query all rewards earned by a delegator", + Example: fmt.Sprintf("$ %s query distribution rewards [delegator-address]", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "delegator_address"}, + }, + }, { RpcMethod: "CommunityPool", Use: "community-pool",