Skip to content

Commit

Permalink
feat(group): add group event tally result (backport #16191) (#16306)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeancarlo Barrios <JeancarloBarrios@users.noreply.github.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
  • Loading branch information
4 people authored May 26, 2023
1 parent 265b8a6 commit 863ad92
Show file tree
Hide file tree
Showing 10 changed files with 404 additions and 35 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

* (baseapp) [#16290](https://github.com/cosmos/cosmos-sdk/pull/16290) Add circuit breaker setter in baseapp.
* [#16060](https://github.com/cosmos/cosmos-sdk/pull/16060) Support saving restoring snapshot locally.
* (x/group) [#16191](https://github.com/cosmos/cosmos-sdk/pull/16191) Add EventProposalPruned event to group module whenever a proposal is pruned.

### Improvements

Expand Down
13 changes: 13 additions & 0 deletions proto/cosmos/group/v1/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,16 @@ message EventLeaveGroup {
// address is the account address of the group member.
string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// EventProposalPruned is an event emitted when a proposal is pruned.
message EventProposalPruned {

// proposal_id is the unique ID of the proposal.
uint64 proposal_id = 1;

// status is the proposal status (UNSPECIFIED, SUBMITTED, ACCEPTED, REJECTED, ABORTED, WITHDRAWN).
ProposalStatus status = 2;

// tally_result is the proposal tally result (when applicable).
TallyResult tally_result = 3;
}
6 changes: 3 additions & 3 deletions proto/cosmos/group/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ service Query {
};

// Groups queries all groups in state.
//
//
// Since: cosmos-sdk 0.47.1
rpc Groups(QueryGroupsRequest) returns (QueryGroupsResponse) {
option (google.api.http).get = "/cosmos/group/v1/groups";
Expand Down Expand Up @@ -320,7 +320,7 @@ message QueryTallyResultResponse {
}

// QueryGroupsRequest is the Query/Groups request type.
//
//
// Since: cosmos-sdk 0.47.1
message QueryGroupsRequest {

Expand All @@ -329,7 +329,7 @@ message QueryGroupsRequest {
}

// QueryGroupsResponse is the Query/Groups response type.
//
//
// Since: cosmos-sdk 0.47.1
message QueryGroupsResponse {
// `groups` is all the groups present in state.
Expand Down
5 changes: 0 additions & 5 deletions proto/cosmos/group/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import "google/protobuf/any.proto";
// Member represents a group member with an account address,
// non-zero weight, metadata and added_at timestamp.
message Member {

// address is the member's account address.
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

Expand All @@ -32,7 +31,6 @@ message Member {
// Contrary to `Member`, it doesn't have any `added_at` field
// since this field cannot be set as part of requests.
message MemberRequest {

// address is the member's account address.
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

Expand Down Expand Up @@ -120,7 +118,6 @@ enum VoteOption {

// GroupInfo represents the high-level on-chain information for a group.
message GroupInfo {

// id is the unique ID of the group.
uint64 id = 1;

Expand All @@ -145,7 +142,6 @@ message GroupInfo {

// GroupMember represents the relationship between a group and a member.
message GroupMember {

// group_id is the unique ID of the group.
uint64 group_id = 1;

Expand Down Expand Up @@ -299,7 +295,6 @@ message TallyResult {

// Vote represents a vote for a proposal.
message Vote {

// proposal is the unique ID of the proposal.
uint64 proposal_id = 1;

Expand Down
Loading

0 comments on commit 863ad92

Please sign in to comment.