Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(group): add group event tally result (backport #16191) #16306

Merged
merged 4 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
## Features

* [#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