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
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix conflicts
tac0turtle committed May 26, 2023

Unverified

This user has not yet uploaded their public signing key.
commit dec593bb1124945a70b5a31da97d94a67cb5f265
17 changes: 0 additions & 17 deletions proto/cosmos/group/v1/types.proto
Original file line number Diff line number Diff line change
@@ -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"];

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

@@ -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;

@@ -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;

@@ -167,13 +163,7 @@ message GroupPolicyInfo {
// admin is the account address of the group admin.
string admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];

<<<<<<< HEAD
// metadata is any arbitrary metadata to attached to the group policy.
=======
// metadata is any arbitrary metadata attached to the group policy.
// the recommended format of the metadata is to be found here:
// https://docs.cosmos.network/v0.47/modules/group#decision-policy-1
>>>>>>> be2003e58 (feat(group): add group event tally result (#16191))
string metadata = 4;

// version is used to track changes to a group's GroupPolicyInfo structure that
@@ -200,13 +190,7 @@ message Proposal {
// group_policy_address is the account address of group policy.
string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];

<<<<<<< HEAD
// metadata is any arbitrary metadata to attached to the proposal.
=======
// metadata is any arbitrary metadata attached to the proposal.
// the recommended format of the metadata is to be found here:
// https://docs.cosmos.network/v0.47/modules/group#proposal-4
>>>>>>> be2003e58 (feat(group): add group event tally result (#16191))
string metadata = 3;

// proposers are the account addresses of the proposers.
@@ -311,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;

4 changes: 2 additions & 2 deletions x/group/events.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions x/group/keeper/genesis.go
Original file line number Diff line number Diff line change
@@ -42,12 +42,8 @@ func (k Keeper) InitGenesis(ctx types.Context, cdc codec.JSONCodec, data json.Ra
return []abci.ValidatorUpdate{}
}

<<<<<<< HEAD
func (k Keeper) ExportGenesis(ctx types.Context, cdc codec.JSONCodec) *group.GenesisState {
=======
// ExportGenesis returns the group module's exported genesis.
func (k Keeper) ExportGenesis(ctx types.Context, _ codec.JSONCodec) *group.GenesisState {
>>>>>>> be2003e58 (feat(group): add group event tally result (#16191))
genesisState := group.NewGenesisState()

var groups []*group.GroupInfo
8 changes: 0 additions & 8 deletions x/group/keeper/keeper.go
Original file line number Diff line number Diff line change
@@ -4,15 +4,7 @@ import (
"fmt"
"time"

<<<<<<< HEAD
"github.com/tendermint/tendermint/libs/log"
=======
"cosmossdk.io/log"

storetypes "cosmossdk.io/store/types"

errorsmod "cosmossdk.io/errors"
>>>>>>> be2003e58 (feat(group): add group event tally result (#16191))

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
4 changes: 0 additions & 4 deletions x/group/keeper/msg_server.go
Original file line number Diff line number Diff line change
@@ -736,11 +736,7 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR
return nil, sdkerrors.Wrap(err, "load group")
}

<<<<<<< HEAD
if err := k.doTallyAndUpdate(ctx, &proposal, electorate, policyInfo); err != nil {
=======
if err = k.doTallyAndUpdate(ctx, &proposal, groupInfo, policyInfo); err != nil {
>>>>>>> be2003e58 (feat(group): add group event tally result (#16191))
return nil, err
}
}
12 changes: 0 additions & 12 deletions x/group/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.