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 #16191

Merged
merged 23 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
657 changes: 636 additions & 21 deletions api/cosmos/group/v1/events.pulsar.go

Large diffs are not rendered by default.

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"];
}

// EventProposalTallyFinalized is an event emitted when a proposal tally is finalized.
JeancarloBarrios marked this conversation as resolved.
Show resolved Hide resolved
message EventProposalTallyFinalized {
JeancarloBarrios marked this conversation as resolved.
Show resolved Hide resolved

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

// result is the proposal tally result.
JeancarloBarrios marked this conversation as resolved.
Show resolved Hide resolved
ProposalStatus status = 2;

// tally_result is the proposal tally result.
JeancarloBarrios marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -85,7 +85,7 @@ service Query {
};

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

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

Expand All @@ -309,7 +309,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
10 changes: 10 additions & 0 deletions x/group/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ This module allows the creation and management of on-chain multisig accounts and
* [EventVote](#eventvote)
* [EventExec](#eventexec)
* [EventLeaveGroup](#eventleavegroup)
* [EventProposalTallyFinalized](#eventproposaltallyfinalized)
* [Client](#client)
* [CLI](#cli)
* [gRPC](#grpc)
Expand Down Expand Up @@ -578,6 +579,15 @@ The group module emits the following events:
| cosmos.group.v1.EventLeaveGroup | proposal_id | {proposalId} |
| cosmos.group.v1.EventLeaveGroup | address | {address} |

### EventProposalTallyFinalized

| Type | Attribute Key | Attribute Value |
|---------------------------------------------|---------------| ------------------------------- |
| message | action | /cosmos.group.v1.Msg/LeaveGroup |
| cosmos.group.v1.EventProposalTallyFinalized | proposal_id | {proposalId} |
| cosmos.group.v1.EventProposalTallyFinalized | status | {ProposalStatus} |
| cosmos.group.v1.EventProposalTallyFinalized | tally_result | {TallyResult} |


## Client

Expand Down
Loading