From d2477064b8bbd9a9432bdd9ff3df74b31d64ba95 Mon Sep 17 00:00:00 2001 From: Marie Gauthier Date: Fri, 9 Jul 2021 09:36:16 +0200 Subject: [PATCH] feat: Add group module proto definitions and basic types (#9631) ## Description ref: https://github.com/cosmos/cosmos-sdk/issues/7633 Following up on https://github.com/cosmos/cosmos-sdk/pull/9089, this PR is the first step towards the migration of [x/group](https://github.com/regen-network/regen-ledger/tree/master/x/group) into the SDK. It introduces the group module proto definitions (types, tx, query) and other types. The rest of the code (module, server, client, genesis...) is dependent on various other discussions (https://github.com/cosmos/cosmos-sdk/issues/9238, https://github.com/cosmos/cosmos-sdk/discussions/9182, https://github.com/cosmos/cosmos-sdk/issues/9237, https://github.com/cosmos/cosmos-sdk/issues/7773) and will be added in follow-up PRs incrementally. --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [x] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [x] included comments for [documenting Go code](https://blog.golang.org/godoc) - [x] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [x] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) --- docs/core/proto-docs.md | 1060 +++++ proto/cosmos/group/v1beta1/query.proto | 244 ++ proto/cosmos/group/v1beta1/tx.proto | 281 ++ proto/cosmos/group/v1beta1/types.proto | 272 ++ types/tx/msgs.go | 47 + types/tx/types.go | 20 +- x/auth/tx/builder.go | 11 +- x/group/errors.go | 16 + x/group/keys.go | 9 + x/group/proposal.go | 29 + x/group/query.pb.go | 5366 ++++++++++++++++++++++++ x/group/tx.pb.go | 5239 +++++++++++++++++++++++ x/group/types.go | 96 + x/group/types.pb.go | 3379 +++++++++++++++ 14 files changed, 16045 insertions(+), 24 deletions(-) create mode 100644 proto/cosmos/group/v1beta1/query.proto create mode 100644 proto/cosmos/group/v1beta1/tx.proto create mode 100644 proto/cosmos/group/v1beta1/types.proto create mode 100644 types/tx/msgs.go create mode 100644 x/group/errors.go create mode 100644 x/group/keys.go create mode 100644 x/group/proposal.go create mode 100644 x/group/query.pb.go create mode 100644 x/group/tx.pb.go create mode 100644 x/group/types.go create mode 100644 x/group/types.pb.go diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index f5b666b593..11aee775ff 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -387,6 +387,76 @@ - [Msg](#cosmos.gov.v1beta1.Msg) +- [cosmos/group/v1beta1/types.proto](#cosmos/group/v1beta1/types.proto) + - [GroupAccountInfo](#cosmos.group.v1beta1.GroupAccountInfo) + - [GroupInfo](#cosmos.group.v1beta1.GroupInfo) + - [GroupMember](#cosmos.group.v1beta1.GroupMember) + - [Member](#cosmos.group.v1beta1.Member) + - [Members](#cosmos.group.v1beta1.Members) + - [Proposal](#cosmos.group.v1beta1.Proposal) + - [Tally](#cosmos.group.v1beta1.Tally) + - [ThresholdDecisionPolicy](#cosmos.group.v1beta1.ThresholdDecisionPolicy) + - [Vote](#cosmos.group.v1beta1.Vote) + + - [Choice](#cosmos.group.v1beta1.Choice) + - [Proposal.ExecutorResult](#cosmos.group.v1beta1.Proposal.ExecutorResult) + - [Proposal.Result](#cosmos.group.v1beta1.Proposal.Result) + - [Proposal.Status](#cosmos.group.v1beta1.Proposal.Status) + +- [cosmos/group/v1beta1/query.proto](#cosmos/group/v1beta1/query.proto) + - [QueryGroupAccountInfoRequest](#cosmos.group.v1beta1.QueryGroupAccountInfoRequest) + - [QueryGroupAccountInfoResponse](#cosmos.group.v1beta1.QueryGroupAccountInfoResponse) + - [QueryGroupAccountsByAdminRequest](#cosmos.group.v1beta1.QueryGroupAccountsByAdminRequest) + - [QueryGroupAccountsByAdminResponse](#cosmos.group.v1beta1.QueryGroupAccountsByAdminResponse) + - [QueryGroupAccountsByGroupRequest](#cosmos.group.v1beta1.QueryGroupAccountsByGroupRequest) + - [QueryGroupAccountsByGroupResponse](#cosmos.group.v1beta1.QueryGroupAccountsByGroupResponse) + - [QueryGroupInfoRequest](#cosmos.group.v1beta1.QueryGroupInfoRequest) + - [QueryGroupInfoResponse](#cosmos.group.v1beta1.QueryGroupInfoResponse) + - [QueryGroupMembersRequest](#cosmos.group.v1beta1.QueryGroupMembersRequest) + - [QueryGroupMembersResponse](#cosmos.group.v1beta1.QueryGroupMembersResponse) + - [QueryGroupsByAdminRequest](#cosmos.group.v1beta1.QueryGroupsByAdminRequest) + - [QueryGroupsByAdminResponse](#cosmos.group.v1beta1.QueryGroupsByAdminResponse) + - [QueryProposalRequest](#cosmos.group.v1beta1.QueryProposalRequest) + - [QueryProposalResponse](#cosmos.group.v1beta1.QueryProposalResponse) + - [QueryProposalsByGroupAccountRequest](#cosmos.group.v1beta1.QueryProposalsByGroupAccountRequest) + - [QueryProposalsByGroupAccountResponse](#cosmos.group.v1beta1.QueryProposalsByGroupAccountResponse) + - [QueryVoteByProposalVoterRequest](#cosmos.group.v1beta1.QueryVoteByProposalVoterRequest) + - [QueryVoteByProposalVoterResponse](#cosmos.group.v1beta1.QueryVoteByProposalVoterResponse) + - [QueryVotesByProposalRequest](#cosmos.group.v1beta1.QueryVotesByProposalRequest) + - [QueryVotesByProposalResponse](#cosmos.group.v1beta1.QueryVotesByProposalResponse) + - [QueryVotesByVoterRequest](#cosmos.group.v1beta1.QueryVotesByVoterRequest) + - [QueryVotesByVoterResponse](#cosmos.group.v1beta1.QueryVotesByVoterResponse) + + - [Query](#cosmos.group.v1beta1.Query) + +- [cosmos/group/v1beta1/tx.proto](#cosmos/group/v1beta1/tx.proto) + - [MsgCreateGroupAccountRequest](#cosmos.group.v1beta1.MsgCreateGroupAccountRequest) + - [MsgCreateGroupAccountResponse](#cosmos.group.v1beta1.MsgCreateGroupAccountResponse) + - [MsgCreateGroupRequest](#cosmos.group.v1beta1.MsgCreateGroupRequest) + - [MsgCreateGroupResponse](#cosmos.group.v1beta1.MsgCreateGroupResponse) + - [MsgCreateProposalRequest](#cosmos.group.v1beta1.MsgCreateProposalRequest) + - [MsgCreateProposalResponse](#cosmos.group.v1beta1.MsgCreateProposalResponse) + - [MsgExecRequest](#cosmos.group.v1beta1.MsgExecRequest) + - [MsgExecResponse](#cosmos.group.v1beta1.MsgExecResponse) + - [MsgUpdateGroupAccountAdminRequest](#cosmos.group.v1beta1.MsgUpdateGroupAccountAdminRequest) + - [MsgUpdateGroupAccountAdminResponse](#cosmos.group.v1beta1.MsgUpdateGroupAccountAdminResponse) + - [MsgUpdateGroupAccountDecisionPolicyRequest](#cosmos.group.v1beta1.MsgUpdateGroupAccountDecisionPolicyRequest) + - [MsgUpdateGroupAccountDecisionPolicyResponse](#cosmos.group.v1beta1.MsgUpdateGroupAccountDecisionPolicyResponse) + - [MsgUpdateGroupAccountMetadataRequest](#cosmos.group.v1beta1.MsgUpdateGroupAccountMetadataRequest) + - [MsgUpdateGroupAccountMetadataResponse](#cosmos.group.v1beta1.MsgUpdateGroupAccountMetadataResponse) + - [MsgUpdateGroupAdminRequest](#cosmos.group.v1beta1.MsgUpdateGroupAdminRequest) + - [MsgUpdateGroupAdminResponse](#cosmos.group.v1beta1.MsgUpdateGroupAdminResponse) + - [MsgUpdateGroupMembersRequest](#cosmos.group.v1beta1.MsgUpdateGroupMembersRequest) + - [MsgUpdateGroupMembersResponse](#cosmos.group.v1beta1.MsgUpdateGroupMembersResponse) + - [MsgUpdateGroupMetadataRequest](#cosmos.group.v1beta1.MsgUpdateGroupMetadataRequest) + - [MsgUpdateGroupMetadataResponse](#cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse) + - [MsgVoteRequest](#cosmos.group.v1beta1.MsgVoteRequest) + - [MsgVoteResponse](#cosmos.group.v1beta1.MsgVoteResponse) + + - [Exec](#cosmos.group.v1beta1.Exec) + + - [Msg](#cosmos.group.v1beta1.Msg) + - [cosmos/mint/v1beta1/mint.proto](#cosmos/mint/v1beta1/mint.proto) - [Minter](#cosmos.mint.v1beta1.Minter) - [Params](#cosmos.mint.v1beta1.Params) @@ -5615,6 +5685,996 @@ Since: cosmos-sdk 0.43 | | + +

Top

+ +## cosmos/group/v1beta1/types.proto + + + + + +### GroupAccountInfo +GroupAccountInfo represents the high-level on-chain information for a group account. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the group account address. | +| `group_id` | [uint64](#uint64) | | group_id is the unique ID of the group. | +| `admin` | [string](#string) | | admin is the account address of the group admin. | +| `metadata` | [bytes](#bytes) | | metadata is any arbitrary metadata to attached to the group account. | +| `version` | [uint64](#uint64) | | version is used to track changes to a group's GroupAccountInfo structure that would create a different result on a running proposal. | +| `decision_policy` | [google.protobuf.Any](#google.protobuf.Any) | | decision_policy specifies the group account's decision policy. | +| `derivation_key` | [bytes](#bytes) | | derivation_key is the "derivation" key of the group account, which is needed to derive the group root module key and execute proposals. | + + + + + + + + +### GroupInfo +GroupInfo represents the high-level on-chain information for a group. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `group_id` | [uint64](#uint64) | | group_id is the unique ID of the group. | +| `admin` | [string](#string) | | admin is the account address of the group's admin. | +| `metadata` | [bytes](#bytes) | | metadata is any arbitrary metadata to attached to the group. | +| `version` | [uint64](#uint64) | | version is used to track changes to a group's membership structure that would break existing proposals. Whenever any members weight is changed, or any member is added or removed this version is incremented and will cause proposals based on older versions of this group to fail | +| `total_weight` | [string](#string) | | total_weight is the sum of the group members' weights. | + + + + + + + + +### GroupMember +GroupMember represents the relationship between a group and a member. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `group_id` | [uint64](#uint64) | | group_id is the unique ID of the group. | +| `member` | [Member](#cosmos.group.v1beta1.Member) | | member is the member data. | + + + + + + + + +### Member +Member represents a group member with an account address, +non-zero weight and metadata. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the member's account address. | +| `weight` | [string](#string) | | weight is the member's voting weight that should be greater than 0. | +| `metadata` | [bytes](#bytes) | | metadata is any arbitrary metadata to attached to the member. | + + + + + + + + +### Members +Members defines a repeated slice of Member objects. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `members` | [Member](#cosmos.group.v1beta1.Member) | repeated | members is the list of members. | + + + + + + + + +### Proposal +Proposal defines a group proposal. Any member of a group can submit a proposal +for a group account to decide upon. +A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal +passes as well as some optional metadata associated with the proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | proposal_id is the unique id of the proposal. | +| `address` | [string](#string) | | address is the group account address. | +| `metadata` | [bytes](#bytes) | | metadata is any arbitrary metadata to attached to the proposal. | +| `proposers` | [string](#string) | repeated | proposers are the account addresses of the proposers. | +| `submitted_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | submitted_at is a timestamp specifying when a proposal was submitted. | +| `group_version` | [uint64](#uint64) | | group_version tracks the version of the group that this proposal corresponds to. When group membership is changed, existing proposals from previous group versions will become invalid. | +| `group_account_version` | [uint64](#uint64) | | group_account_version tracks the version of the group account that this proposal corresponds to. When a decision policy is changed, existing proposals from previous policy versions will become invalid. | +| `status` | [Proposal.Status](#cosmos.group.v1beta1.Proposal.Status) | | Status represents the high level position in the life cycle of the proposal. Initial value is Submitted. | +| `result` | [Proposal.Result](#cosmos.group.v1beta1.Proposal.Result) | | result is the final result based on the votes and election rule. Initial value is unfinalized. The result is persisted so that clients can always rely on this state and not have to replicate the logic. | +| `vote_state` | [Tally](#cosmos.group.v1beta1.Tally) | | vote_state contains the sums of all weighted votes for this proposal. | +| `timeout` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | timeout is the timestamp of the block where the proposal execution times out. Header times of the votes and execution messages must be before this end time to be included in the election. After the timeout timestamp the proposal can not be executed anymore and should be considered pending delete. | +| `executor_result` | [Proposal.ExecutorResult](#cosmos.group.v1beta1.Proposal.ExecutorResult) | | executor_result is the final result based on the votes and election rule. Initial value is NotRun. | +| `msgs` | [google.protobuf.Any](#google.protobuf.Any) | repeated | msgs is a list of Msgs that will be executed if the proposal passes. | + + + + + + + + +### Tally +Tally represents the sum of weighted votes. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `yes_count` | [string](#string) | | yes_count is the weighted sum of yes votes. | +| `no_count` | [string](#string) | | no_count is the weighted sum of no votes. | +| `abstain_count` | [string](#string) | | abstain_count is the weighted sum of abstainers | +| `veto_count` | [string](#string) | | veto_count is the weighted sum of vetoes. | + + + + + + + + +### ThresholdDecisionPolicy +ThresholdDecisionPolicy implements the DecisionPolicy interface + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `threshold` | [string](#string) | | threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed. | +| `timeout` | [google.protobuf.Duration](#google.protobuf.Duration) | | timeout is the duration from submission of a proposal to the end of voting period Within this times votes and exec messages can be submitted. | + + + + + + + + +### Vote +Vote represents a vote for a proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | proposal is the unique ID of the proposal. | +| `voter` | [string](#string) | | voter is the account address of the voter. | +| `choice` | [Choice](#cosmos.group.v1beta1.Choice) | | choice is the voter's choice on the proposal. | +| `metadata` | [bytes](#bytes) | | metadata is any arbitrary metadata to attached to the vote. | +| `submitted_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | submitted_at is the timestamp when the vote was submitted. | + + + + + + + + + + +### Choice +Choice defines available types of choices for voting. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| CHOICE_UNSPECIFIED | 0 | CHOICE_UNSPECIFIED defines a no-op voting choice. | +| CHOICE_NO | 1 | CHOICE_NO defines a no voting choice. | +| CHOICE_YES | 2 | CHOICE_YES defines a yes voting choice. | +| CHOICE_ABSTAIN | 3 | CHOICE_ABSTAIN defines an abstaining voting choice. | +| CHOICE_VETO | 4 | CHOICE_VETO defines a voting choice with veto. | + + + + + +### Proposal.ExecutorResult +ExecutorResult defines types of proposal executor results. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| EXECUTOR_RESULT_UNSPECIFIED | 0 | An empty value is not allowed. | +| EXECUTOR_RESULT_NOT_RUN | 1 | We have not yet run the executor. | +| EXECUTOR_RESULT_SUCCESS | 2 | The executor was successful and proposed action updated state. | +| EXECUTOR_RESULT_FAILURE | 3 | The executor returned an error and proposed action didn't update state. | + + + + + +### Proposal.Result +Result defines types of proposal results. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| RESULT_UNSPECIFIED | 0 | An empty value is invalid and not allowed | +| RESULT_UNFINALIZED | 1 | Until a final tally has happened the status is unfinalized | +| RESULT_ACCEPTED | 2 | Final result of the tally | +| RESULT_REJECTED | 3 | Final result of the tally | + + + + + +### Proposal.Status +Status defines proposal statuses. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| STATUS_UNSPECIFIED | 0 | An empty value is invalid and not allowed. | +| STATUS_SUBMITTED | 1 | Initial status of a proposal when persisted. | +| STATUS_CLOSED | 2 | Final status of a proposal when the final tally was executed. | +| STATUS_ABORTED | 3 | Final status of a proposal when the group was modified before the final tally. | + + + + + + + + + + + +

Top

+ +## cosmos/group/v1beta1/query.proto + + + + + +### QueryGroupAccountInfoRequest +QueryGroupAccountInfoRequest is the Query/GroupAccountInfo request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the account address of the group account. | + + + + + + + + +### QueryGroupAccountInfoResponse +QueryGroupAccountInfoResponse is the Query/GroupAccountInfo response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `info` | [GroupAccountInfo](#cosmos.group.v1beta1.GroupAccountInfo) | | info is the GroupAccountInfo for the group account. | + + + + + + + + +### QueryGroupAccountsByAdminRequest +QueryGroupAccountsByAdminRequest is the Query/GroupAccountsByAdmin request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `admin` | [string](#string) | | admin is the admin address of the group account. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryGroupAccountsByAdminResponse +QueryGroupAccountsByAdminResponse is the Query/GroupAccountsByAdmin response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `group_accounts` | [GroupAccountInfo](#cosmos.group.v1beta1.GroupAccountInfo) | repeated | group_accounts are the group accounts info with provided admin. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + + + +### QueryGroupAccountsByGroupRequest +QueryGroupAccountsByGroupRequest is the Query/GroupAccountsByGroup request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `group_id` | [uint64](#uint64) | | group_id is the unique ID of the group account's group. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryGroupAccountsByGroupResponse +QueryGroupAccountsByGroupResponse is the Query/GroupAccountsByGroup response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `group_accounts` | [GroupAccountInfo](#cosmos.group.v1beta1.GroupAccountInfo) | repeated | group_accounts are the group accounts info associated with the provided group. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + + + +### QueryGroupInfoRequest +QueryGroupInfoRequest is the Query/GroupInfo request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `group_id` | [uint64](#uint64) | | group_id is the unique ID of the group. | + + + + + + + + +### QueryGroupInfoResponse +QueryGroupInfoResponse is the Query/GroupInfo response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `info` | [GroupInfo](#cosmos.group.v1beta1.GroupInfo) | | info is the GroupInfo for the group. | + + + + + + + + +### QueryGroupMembersRequest +QueryGroupMembersRequest is the Query/GroupMembersRequest request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `group_id` | [uint64](#uint64) | | group_id is the unique ID of the group. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryGroupMembersResponse +QueryGroupMembersResponse is the Query/GroupMembersResponse response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `members` | [GroupMember](#cosmos.group.v1beta1.GroupMember) | repeated | members are the members of the group with given group_id. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + + + +### QueryGroupsByAdminRequest +QueryGroupsByAdminRequest is the Query/GroupsByAdminRequest request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `admin` | [string](#string) | | admin is the account address of a group's admin. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryGroupsByAdminResponse +QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `groups` | [GroupInfo](#cosmos.group.v1beta1.GroupInfo) | repeated | groups are the groups info with the provided admin. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + + + +### QueryProposalRequest +QueryProposalRequest is the Query/Proposal request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | proposal_id is the unique ID of a proposal. | + + + + + + + + +### QueryProposalResponse +QueryProposalResponse is the Query/Proposal response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal` | [Proposal](#cosmos.group.v1beta1.Proposal) | | proposal is the proposal info. | + + + + + + + + +### QueryProposalsByGroupAccountRequest +QueryProposalsByGroupAccountRequest is the Query/ProposalByGroupAccount request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the group account address related to proposals. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryProposalsByGroupAccountResponse +QueryProposalsByGroupAccountResponse is the Query/ProposalByGroupAccount response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposals` | [Proposal](#cosmos.group.v1beta1.Proposal) | repeated | proposals are the proposals with given group account. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + + + +### QueryVoteByProposalVoterRequest +QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | proposal_id is the unique ID of a proposal. | +| `voter` | [string](#string) | | voter is a proposal voter account address. | + + + + + + + + +### QueryVoteByProposalVoterResponse +QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `vote` | [Vote](#cosmos.group.v1beta1.Vote) | | vote is the vote with given proposal_id and voter. | + + + + + + + + +### QueryVotesByProposalRequest +QueryVotesByProposalResponse is the Query/VotesByProposal request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | proposal_id is the unique ID of a proposal. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryVotesByProposalResponse +QueryVotesByProposalResponse is the Query/VotesByProposal response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `votes` | [Vote](#cosmos.group.v1beta1.Vote) | repeated | votes are the list of votes for given proposal_id. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + + + +### QueryVotesByVoterRequest +QueryVotesByVoterResponse is the Query/VotesByVoter request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `voter` | [string](#string) | | voter is a proposal voter account address. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryVotesByVoterResponse +QueryVotesByVoterResponse is the Query/VotesByVoter response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `votes` | [Vote](#cosmos.group.v1beta1.Vote) | repeated | votes are the list of votes by given voter. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + + + + + + + + + +### Query +Query is the cosmos.group.v1beta1 Query service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `GroupInfo` | [QueryGroupInfoRequest](#cosmos.group.v1beta1.QueryGroupInfoRequest) | [QueryGroupInfoResponse](#cosmos.group.v1beta1.QueryGroupInfoResponse) | GroupInfo queries group info based on group id. | | +| `GroupAccountInfo` | [QueryGroupAccountInfoRequest](#cosmos.group.v1beta1.QueryGroupAccountInfoRequest) | [QueryGroupAccountInfoResponse](#cosmos.group.v1beta1.QueryGroupAccountInfoResponse) | GroupAccountInfo queries group account info based on group account address. | | +| `GroupMembers` | [QueryGroupMembersRequest](#cosmos.group.v1beta1.QueryGroupMembersRequest) | [QueryGroupMembersResponse](#cosmos.group.v1beta1.QueryGroupMembersResponse) | GroupMembers queries members of a group | | +| `GroupsByAdmin` | [QueryGroupsByAdminRequest](#cosmos.group.v1beta1.QueryGroupsByAdminRequest) | [QueryGroupsByAdminResponse](#cosmos.group.v1beta1.QueryGroupsByAdminResponse) | GroupsByAdmin queries groups by admin address. | | +| `GroupAccountsByGroup` | [QueryGroupAccountsByGroupRequest](#cosmos.group.v1beta1.QueryGroupAccountsByGroupRequest) | [QueryGroupAccountsByGroupResponse](#cosmos.group.v1beta1.QueryGroupAccountsByGroupResponse) | GroupAccountsByGroup queries group accounts by group id. | | +| `GroupAccountsByAdmin` | [QueryGroupAccountsByAdminRequest](#cosmos.group.v1beta1.QueryGroupAccountsByAdminRequest) | [QueryGroupAccountsByAdminResponse](#cosmos.group.v1beta1.QueryGroupAccountsByAdminResponse) | GroupsByAdmin queries group accounts by admin address. | | +| `Proposal` | [QueryProposalRequest](#cosmos.group.v1beta1.QueryProposalRequest) | [QueryProposalResponse](#cosmos.group.v1beta1.QueryProposalResponse) | Proposal queries a proposal based on proposal id. | | +| `ProposalsByGroupAccount` | [QueryProposalsByGroupAccountRequest](#cosmos.group.v1beta1.QueryProposalsByGroupAccountRequest) | [QueryProposalsByGroupAccountResponse](#cosmos.group.v1beta1.QueryProposalsByGroupAccountResponse) | ProposalsByGroupAccount queries proposals based on group account address. | | +| `VoteByProposalVoter` | [QueryVoteByProposalVoterRequest](#cosmos.group.v1beta1.QueryVoteByProposalVoterRequest) | [QueryVoteByProposalVoterResponse](#cosmos.group.v1beta1.QueryVoteByProposalVoterResponse) | VoteByProposalVoter queries a vote by proposal id and voter. | | +| `VotesByProposal` | [QueryVotesByProposalRequest](#cosmos.group.v1beta1.QueryVotesByProposalRequest) | [QueryVotesByProposalResponse](#cosmos.group.v1beta1.QueryVotesByProposalResponse) | VotesByProposal queries a vote by proposal. | | +| `VotesByVoter` | [QueryVotesByVoterRequest](#cosmos.group.v1beta1.QueryVotesByVoterRequest) | [QueryVotesByVoterResponse](#cosmos.group.v1beta1.QueryVotesByVoterResponse) | VotesByVoter queries a vote by voter. | | + + + + + + +

Top

+ +## cosmos/group/v1beta1/tx.proto + + + + + +### MsgCreateGroupAccountRequest +MsgCreateGroupAccountRequest is the Msg/CreateGroupAccount request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `admin` | [string](#string) | | admin is the account address of the group admin. | +| `group_id` | [uint64](#uint64) | | group_id is the unique ID of the group. | +| `metadata` | [bytes](#bytes) | | metadata is any arbitrary metadata to attached to the group account. | +| `decision_policy` | [google.protobuf.Any](#google.protobuf.Any) | | decision_policy specifies the group account's decision policy. | + + + + + + + + +### MsgCreateGroupAccountResponse +MsgCreateGroupAccountResponse is the Msg/CreateGroupAccount response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the account address of the newly created group account. | + + + + + + + + +### MsgCreateGroupRequest +MsgCreateGroupRequest is the Msg/CreateGroup request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `admin` | [string](#string) | | admin is the account address of the group admin. | +| `members` | [Member](#cosmos.group.v1beta1.Member) | repeated | members defines the group members. | +| `metadata` | [bytes](#bytes) | | metadata is any arbitrary metadata to attached to the group. | + + + + + + + + +### MsgCreateGroupResponse +MsgCreateGroupResponse is the Msg/CreateGroup response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `group_id` | [uint64](#uint64) | | group_id is the unique ID of the newly created group. | + + + + + + + + +### MsgCreateProposalRequest +MsgCreateProposalRequest is the Msg/CreateProposal request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the group account address. | +| `proposers` | [string](#string) | repeated | proposers are the account addresses of the proposers. Proposers signatures will be counted as yes votes. | +| `metadata` | [bytes](#bytes) | | metadata is any arbitrary metadata to attached to the proposal. | +| `msgs` | [google.protobuf.Any](#google.protobuf.Any) | repeated | msgs is a list of Msgs that will be executed if the proposal passes. | +| `exec` | [Exec](#cosmos.group.v1beta1.Exec) | | exec defines the mode of execution of the proposal, whether it should be executed immediately on creation or not. If so, proposers signatures are considered as Yes votes. | + + + + + + + + +### MsgCreateProposalResponse +MsgCreateProposalResponse is the Msg/CreateProposal response type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | proposal is the unique ID of the proposal. | + + + + + + + + +### MsgExecRequest +MsgExecRequest is the Msg/Exec request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | proposal is the unique ID of the proposal. | +| `signer` | [string](#string) | | signer is the account address used to execute the proposal. | + + + + + + + + +### MsgExecResponse +MsgExecResponse is the Msg/Exec request type. + + + + + + + + +### MsgUpdateGroupAccountAdminRequest +MsgUpdateGroupAccountAdminRequest is the Msg/UpdateGroupAccountAdmin request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `admin` | [string](#string) | | admin is the account address of the group admin. | +| `address` | [string](#string) | | address is the group account address. | +| `new_admin` | [string](#string) | | new_admin is the new group account admin. | + + + + + + + + +### MsgUpdateGroupAccountAdminResponse +MsgUpdateGroupAccountAdminResponse is the Msg/UpdateGroupAccountAdmin response type. + + + + + + + + +### MsgUpdateGroupAccountDecisionPolicyRequest +MsgUpdateGroupAccountDecisionPolicyRequest is the Msg/UpdateGroupAccountDecisionPolicy request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `admin` | [string](#string) | | admin is the account address of the group admin. | +| `address` | [string](#string) | | address is the group account address. | +| `decision_policy` | [google.protobuf.Any](#google.protobuf.Any) | | decision_policy is the updated group account decision policy. | + + + + + + + + +### MsgUpdateGroupAccountDecisionPolicyResponse +MsgUpdateGroupAccountDecisionPolicyResponse is the Msg/UpdateGroupAccountDecisionPolicy response type. + + + + + + + + +### MsgUpdateGroupAccountMetadataRequest +MsgUpdateGroupAccountMetadataRequest is the Msg/UpdateGroupAccountMetadata request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `admin` | [string](#string) | | admin is the account address of the group admin. | +| `address` | [string](#string) | | address is the group account address. | +| `metadata` | [bytes](#bytes) | | metadata is the updated group account metadata. | + + + + + + + + +### MsgUpdateGroupAccountMetadataResponse +MsgUpdateGroupAccountMetadataResponse is the Msg/UpdateGroupAccountMetadata response type. + + + + + + + + +### MsgUpdateGroupAdminRequest +MsgUpdateGroupAdminRequest is the Msg/UpdateGroupAdmin request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `admin` | [string](#string) | | admin is the current account address of the group admin. | +| `group_id` | [uint64](#uint64) | | group_id is the unique ID of the group. | +| `new_admin` | [string](#string) | | new_admin is the group new admin account address. | + + + + + + + + +### MsgUpdateGroupAdminResponse +MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. + + + + + + + + +### MsgUpdateGroupMembersRequest +MsgUpdateGroupMembersRequest is the Msg/UpdateGroupMembers request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `admin` | [string](#string) | | admin is the account address of the group admin. | +| `group_id` | [uint64](#uint64) | | group_id is the unique ID of the group. | +| `member_updates` | [Member](#cosmos.group.v1beta1.Member) | repeated | member_updates is the list of members to update, set weight to 0 to remove a member. | + + + + + + + + +### MsgUpdateGroupMembersResponse +MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. + + + + + + + + +### MsgUpdateGroupMetadataRequest +MsgUpdateGroupMetadataRequest is the Msg/UpdateGroupMetadata request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `admin` | [string](#string) | | admin is the account address of the group admin. | +| `group_id` | [uint64](#uint64) | | group_id is the unique ID of the group. | +| `metadata` | [bytes](#bytes) | | metadata is the updated group's metadata. | + + + + + + + + +### MsgUpdateGroupMetadataResponse +MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. + + + + + + + + +### MsgVoteRequest +MsgVoteRequest is the Msg/Vote request type. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | proposal is the unique ID of the proposal. | +| `voter` | [string](#string) | | voter is the voter account address. | +| `choice` | [Choice](#cosmos.group.v1beta1.Choice) | | choice is the voter's choice on the proposal. | +| `metadata` | [bytes](#bytes) | | metadata is any arbitrary metadata to attached to the vote. | +| `exec` | [Exec](#cosmos.group.v1beta1.Exec) | | exec defines whether the proposal should be executed immediately after voting or not. | + + + + + + + + +### MsgVoteResponse +MsgVoteResponse is the Msg/Vote response type. + + + + + + + + + + +### Exec +Exec defines modes of execution of a proposal on creation or on new vote. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| EXEC_UNSPECIFIED | 0 | An empty value means that there should be a separate MsgExec request for the proposal to execute. | +| EXEC_TRY | 1 | Try to execute the proposal immediately. If the proposal is not allowed per the DecisionPolicy, the proposal will still be open and could be executed at a later point. | + + + + + + + + + +### Msg +Msg is the cosmos.group.v1beta1 Msg service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `CreateGroup` | [MsgCreateGroupRequest](#cosmos.group.v1beta1.MsgCreateGroupRequest) | [MsgCreateGroupResponse](#cosmos.group.v1beta1.MsgCreateGroupResponse) | CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. | | +| `UpdateGroupMembers` | [MsgUpdateGroupMembersRequest](#cosmos.group.v1beta1.MsgUpdateGroupMembersRequest) | [MsgUpdateGroupMembersResponse](#cosmos.group.v1beta1.MsgUpdateGroupMembersResponse) | UpdateGroupMembers updates the group members with given group id and admin address. | | +| `UpdateGroupAdmin` | [MsgUpdateGroupAdminRequest](#cosmos.group.v1beta1.MsgUpdateGroupAdminRequest) | [MsgUpdateGroupAdminResponse](#cosmos.group.v1beta1.MsgUpdateGroupAdminResponse) | UpdateGroupAdmin updates the group admin with given group id and previous admin address. | | +| `UpdateGroupMetadata` | [MsgUpdateGroupMetadataRequest](#cosmos.group.v1beta1.MsgUpdateGroupMetadataRequest) | [MsgUpdateGroupMetadataResponse](#cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse) | UpdateGroupMetadata updates the group metadata with given group id and admin address. | | +| `CreateGroupAccount` | [MsgCreateGroupAccountRequest](#cosmos.group.v1beta1.MsgCreateGroupAccountRequest) | [MsgCreateGroupAccountResponse](#cosmos.group.v1beta1.MsgCreateGroupAccountResponse) | CreateGroupAccount creates a new group account using given DecisionPolicy. | | +| `UpdateGroupAccountAdmin` | [MsgUpdateGroupAccountAdminRequest](#cosmos.group.v1beta1.MsgUpdateGroupAccountAdminRequest) | [MsgUpdateGroupAccountAdminResponse](#cosmos.group.v1beta1.MsgUpdateGroupAccountAdminResponse) | UpdateGroupAccountAdmin updates a group account admin. | | +| `UpdateGroupAccountDecisionPolicy` | [MsgUpdateGroupAccountDecisionPolicyRequest](#cosmos.group.v1beta1.MsgUpdateGroupAccountDecisionPolicyRequest) | [MsgUpdateGroupAccountDecisionPolicyResponse](#cosmos.group.v1beta1.MsgUpdateGroupAccountDecisionPolicyResponse) | UpdateGroupAccountDecisionPolicy allows a group account decision policy to be updated. | | +| `UpdateGroupAccountMetadata` | [MsgUpdateGroupAccountMetadataRequest](#cosmos.group.v1beta1.MsgUpdateGroupAccountMetadataRequest) | [MsgUpdateGroupAccountMetadataResponse](#cosmos.group.v1beta1.MsgUpdateGroupAccountMetadataResponse) | UpdateGroupAccountMetadata updates a group account metadata. | | +| `CreateProposal` | [MsgCreateProposalRequest](#cosmos.group.v1beta1.MsgCreateProposalRequest) | [MsgCreateProposalResponse](#cosmos.group.v1beta1.MsgCreateProposalResponse) | CreateProposal submits a new proposal. | | +| `Vote` | [MsgVoteRequest](#cosmos.group.v1beta1.MsgVoteRequest) | [MsgVoteResponse](#cosmos.group.v1beta1.MsgVoteResponse) | Vote allows a voter to vote on a proposal. | | +| `Exec` | [MsgExecRequest](#cosmos.group.v1beta1.MsgExecRequest) | [MsgExecResponse](#cosmos.group.v1beta1.MsgExecResponse) | Exec executes a proposal. | | + + + + +

Top

diff --git a/proto/cosmos/group/v1beta1/query.proto b/proto/cosmos/group/v1beta1/query.proto new file mode 100644 index 0000000000..379afc90e9 --- /dev/null +++ b/proto/cosmos/group/v1beta1/query.proto @@ -0,0 +1,244 @@ +syntax = "proto3"; + +package cosmos.group.v1beta1; + +import "cosmos/group/v1beta1/types.proto"; +import "gogoproto/gogo.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/group"; + +// Query is the cosmos.group.v1beta1 Query service. +service Query { + + // GroupInfo queries group info based on group id. + rpc GroupInfo(QueryGroupInfoRequest) returns (QueryGroupInfoResponse); + + // GroupAccountInfo queries group account info based on group account address. + rpc GroupAccountInfo(QueryGroupAccountInfoRequest) returns (QueryGroupAccountInfoResponse); + + // GroupMembers queries members of a group + rpc GroupMembers(QueryGroupMembersRequest) returns (QueryGroupMembersResponse); + + // GroupsByAdmin queries groups by admin address. + rpc GroupsByAdmin(QueryGroupsByAdminRequest) returns (QueryGroupsByAdminResponse); + + // GroupAccountsByGroup queries group accounts by group id. + rpc GroupAccountsByGroup(QueryGroupAccountsByGroupRequest) returns (QueryGroupAccountsByGroupResponse); + + // GroupsByAdmin queries group accounts by admin address. + rpc GroupAccountsByAdmin(QueryGroupAccountsByAdminRequest) returns (QueryGroupAccountsByAdminResponse); + + // Proposal queries a proposal based on proposal id. + rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse); + + // ProposalsByGroupAccount queries proposals based on group account address. + rpc ProposalsByGroupAccount(QueryProposalsByGroupAccountRequest) returns (QueryProposalsByGroupAccountResponse); + + // VoteByProposalVoter queries a vote by proposal id and voter. + rpc VoteByProposalVoter(QueryVoteByProposalVoterRequest) returns (QueryVoteByProposalVoterResponse); + + // VotesByProposal queries a vote by proposal. + rpc VotesByProposal(QueryVotesByProposalRequest) returns (QueryVotesByProposalResponse); + + // VotesByVoter queries a vote by voter. + rpc VotesByVoter(QueryVotesByVoterRequest) returns (QueryVotesByVoterResponse); +} + +// QueryGroupInfoRequest is the Query/GroupInfo request type. +message QueryGroupInfoRequest { + + // group_id is the unique ID of the group. + uint64 group_id = 1; +} + +// QueryGroupInfoResponse is the Query/GroupInfo response type. +message QueryGroupInfoResponse { + + // info is the GroupInfo for the group. + GroupInfo info = 1; +} + +// QueryGroupAccountInfoRequest is the Query/GroupAccountInfo request type. +message QueryGroupAccountInfoRequest { + + // address is the account address of the group account. + string address = 1; +} + +// QueryGroupAccountInfoResponse is the Query/GroupAccountInfo response type. +message QueryGroupAccountInfoResponse { + + // info is the GroupAccountInfo for the group account. + GroupAccountInfo info = 1; +} + +// QueryGroupMembersRequest is the Query/GroupMembersRequest request type. +message QueryGroupMembersRequest { + + // group_id is the unique ID of the group. + uint64 group_id = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryGroupMembersResponse is the Query/GroupMembersResponse response type. +message QueryGroupMembersResponse { + + // members are the members of the group with given group_id. + repeated GroupMember members = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryGroupsByAdminRequest is the Query/GroupsByAdminRequest request type. +message QueryGroupsByAdminRequest { + + // admin is the account address of a group's admin. + string admin = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. +message QueryGroupsByAdminResponse { + + // groups are the groups info with the provided admin. + repeated GroupInfo groups = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryGroupAccountsByGroupRequest is the Query/GroupAccountsByGroup request type. +message QueryGroupAccountsByGroupRequest { + + // group_id is the unique ID of the group account's group. + uint64 group_id = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryGroupAccountsByGroupResponse is the Query/GroupAccountsByGroup response type. +message QueryGroupAccountsByGroupResponse { + + // group_accounts are the group accounts info associated with the provided group. + repeated GroupAccountInfo group_accounts = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryGroupAccountsByAdminRequest is the Query/GroupAccountsByAdmin request type. +message QueryGroupAccountsByAdminRequest { + + // admin is the admin address of the group account. + string admin = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryGroupAccountsByAdminResponse is the Query/GroupAccountsByAdmin response type. +message QueryGroupAccountsByAdminResponse { + + // group_accounts are the group accounts info with provided admin. + repeated GroupAccountInfo group_accounts = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryProposalRequest is the Query/Proposal request type. +message QueryProposalRequest { + + // proposal_id is the unique ID of a proposal. + uint64 proposal_id = 1; +} + +// QueryProposalResponse is the Query/Proposal response type. +message QueryProposalResponse { + + // proposal is the proposal info. + Proposal proposal = 1; +} + +// QueryProposalsByGroupAccountRequest is the Query/ProposalByGroupAccount request type. +message QueryProposalsByGroupAccountRequest { + + // address is the group account address related to proposals. + string address = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryProposalsByGroupAccountResponse is the Query/ProposalByGroupAccount response type. +message QueryProposalsByGroupAccountResponse { + + // proposals are the proposals with given group account. + repeated Proposal proposals = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter request type. +message QueryVoteByProposalVoterRequest { + + // proposal_id is the unique ID of a proposal. + uint64 proposal_id = 1; + + // voter is a proposal voter account address. + string voter = 2; +} + +// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. +message QueryVoteByProposalVoterResponse { + + // vote is the vote with given proposal_id and voter. + Vote vote = 1; +} + +// QueryVotesByProposalResponse is the Query/VotesByProposal request type. +message QueryVotesByProposalRequest { + + // proposal_id is the unique ID of a proposal. + uint64 proposal_id = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryVotesByProposalResponse is the Query/VotesByProposal response type. +message QueryVotesByProposalResponse { + + // votes are the list of votes for given proposal_id. + repeated Vote votes = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryVotesByVoterResponse is the Query/VotesByVoter request type. +message QueryVotesByVoterRequest { + // voter is a proposal voter account address. + string voter = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryVotesByVoterResponse is the Query/VotesByVoter response type. +message QueryVotesByVoterResponse { + + // votes are the list of votes by given voter. + repeated Vote votes = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/cosmos/group/v1beta1/tx.proto b/proto/cosmos/group/v1beta1/tx.proto new file mode 100644 index 0000000000..1e637e2d12 --- /dev/null +++ b/proto/cosmos/group/v1beta1/tx.proto @@ -0,0 +1,281 @@ +syntax = "proto3"; + +package cosmos.group.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/group"; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "google/protobuf/any.proto"; +import "cosmos/group/v1beta1/types.proto"; + +// Msg is the cosmos.group.v1beta1 Msg service. +service Msg { + + // CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. + rpc CreateGroup(MsgCreateGroupRequest) returns (MsgCreateGroupResponse); + + // UpdateGroupMembers updates the group members with given group id and admin address. + rpc UpdateGroupMembers(MsgUpdateGroupMembersRequest) returns (MsgUpdateGroupMembersResponse); + + // UpdateGroupAdmin updates the group admin with given group id and previous admin address. + rpc UpdateGroupAdmin(MsgUpdateGroupAdminRequest) returns (MsgUpdateGroupAdminResponse); + + // UpdateGroupMetadata updates the group metadata with given group id and admin address. + rpc UpdateGroupMetadata(MsgUpdateGroupMetadataRequest) returns (MsgUpdateGroupMetadataResponse); + + // CreateGroupAccount creates a new group account using given DecisionPolicy. + rpc CreateGroupAccount(MsgCreateGroupAccountRequest) returns (MsgCreateGroupAccountResponse); + + // UpdateGroupAccountAdmin updates a group account admin. + rpc UpdateGroupAccountAdmin(MsgUpdateGroupAccountAdminRequest) returns (MsgUpdateGroupAccountAdminResponse); + + // UpdateGroupAccountDecisionPolicy allows a group account decision policy to be updated. + rpc UpdateGroupAccountDecisionPolicy(MsgUpdateGroupAccountDecisionPolicyRequest) returns (MsgUpdateGroupAccountDecisionPolicyResponse); + + // UpdateGroupAccountMetadata updates a group account metadata. + rpc UpdateGroupAccountMetadata(MsgUpdateGroupAccountMetadataRequest) returns (MsgUpdateGroupAccountMetadataResponse); + + // CreateProposal submits a new proposal. + rpc CreateProposal(MsgCreateProposalRequest) returns (MsgCreateProposalResponse); + + // Vote allows a voter to vote on a proposal. + rpc Vote(MsgVoteRequest) returns (MsgVoteResponse); + + // Exec executes a proposal. + rpc Exec(MsgExecRequest) returns (MsgExecResponse); +} + +// +// Groups +// + +// MsgCreateGroupRequest is the Msg/CreateGroup request type. +message MsgCreateGroupRequest { + + // admin is the account address of the group admin. + string admin = 1; + + // members defines the group members. + repeated Member members = 2 [(gogoproto.nullable) = false]; + + // metadata is any arbitrary metadata to attached to the group. + bytes metadata = 3; +} + +// MsgCreateGroupResponse is the Msg/CreateGroup response type. +message MsgCreateGroupResponse { + + // group_id is the unique ID of the newly created group. + uint64 group_id = 1; +} + +// MsgUpdateGroupMembersRequest is the Msg/UpdateGroupMembers request type. +message MsgUpdateGroupMembersRequest { + + // admin is the account address of the group admin. + string admin = 1; + + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // member_updates is the list of members to update, + // set weight to 0 to remove a member. + repeated Member member_updates = 3 [(gogoproto.nullable) = false]; +} + +// MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. +message MsgUpdateGroupMembersResponse { } + +// MsgUpdateGroupAdminRequest is the Msg/UpdateGroupAdmin request type. +message MsgUpdateGroupAdminRequest { + + // admin is the current account address of the group admin. + string admin = 1; + + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // new_admin is the group new admin account address. + string new_admin = 3; +} + +// MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. +message MsgUpdateGroupAdminResponse { } + +// MsgUpdateGroupMetadataRequest is the Msg/UpdateGroupMetadata request type. +message MsgUpdateGroupMetadataRequest { + + // admin is the account address of the group admin. + string admin = 1; + + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // metadata is the updated group's metadata. + bytes metadata = 3; +} + +// MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. +message MsgUpdateGroupMetadataResponse { } + +// +// Group Accounts +// + +// MsgCreateGroupAccountRequest is the Msg/CreateGroupAccount request type. +message MsgCreateGroupAccountRequest { + option (gogoproto.goproto_getters) = false; + + // admin is the account address of the group admin. + string admin = 1; + + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // metadata is any arbitrary metadata to attached to the group account. + bytes metadata = 3; + + // decision_policy specifies the group account's decision policy. + google.protobuf.Any decision_policy = 4 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; +} + +// MsgCreateGroupAccountResponse is the Msg/CreateGroupAccount response type. +message MsgCreateGroupAccountResponse { + + // address is the account address of the newly created group account. + string address = 1; +} + +// MsgUpdateGroupAccountAdminRequest is the Msg/UpdateGroupAccountAdmin request type. +message MsgUpdateGroupAccountAdminRequest { + + // admin is the account address of the group admin. + string admin = 1; + + // address is the group account address. + string address = 2; + + // new_admin is the new group account admin. + string new_admin = 3; +} + +// MsgUpdateGroupAccountAdminResponse is the Msg/UpdateGroupAccountAdmin response type. +message MsgUpdateGroupAccountAdminResponse { } + +// MsgUpdateGroupAccountDecisionPolicyRequest is the Msg/UpdateGroupAccountDecisionPolicy request type. +message MsgUpdateGroupAccountDecisionPolicyRequest { + option (gogoproto.goproto_getters) = false; + + // admin is the account address of the group admin. + string admin = 1; + + // address is the group account address. + string address = 2; + + // decision_policy is the updated group account decision policy. + google.protobuf.Any decision_policy = 3 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; +} + +// MsgUpdateGroupAccountDecisionPolicyResponse is the Msg/UpdateGroupAccountDecisionPolicy response type. +message MsgUpdateGroupAccountDecisionPolicyResponse { } + +// MsgUpdateGroupAccountMetadataRequest is the Msg/UpdateGroupAccountMetadata request type. +message MsgUpdateGroupAccountMetadataRequest { + + // admin is the account address of the group admin. + string admin = 1; + + // address is the group account address. + string address = 2; + + // metadata is the updated group account metadata. + bytes metadata = 3; +} + +// MsgUpdateGroupAccountMetadataResponse is the Msg/UpdateGroupAccountMetadata response type. +message MsgUpdateGroupAccountMetadataResponse { } + +// +// Proposals and Voting +// + +// Exec defines modes of execution of a proposal on creation or on new vote. +enum Exec { + + // An empty value means that there should be a separate + // MsgExec request for the proposal to execute. + EXEC_UNSPECIFIED = 0; + + // Try to execute the proposal immediately. + // If the proposal is not allowed per the DecisionPolicy, + // the proposal will still be open and could + // be executed at a later point. + EXEC_TRY = 1; +} + +// MsgCreateProposalRequest is the Msg/CreateProposal request type. +message MsgCreateProposalRequest { + option (gogoproto.goproto_getters) = false; + + // address is the group account address. + string address = 1; + + // proposers are the account addresses of the proposers. + // Proposers signatures will be counted as yes votes. + repeated string proposers = 2; + + // metadata is any arbitrary metadata to attached to the proposal. + bytes metadata = 3; + + // msgs is a list of Msgs that will be executed if the proposal passes. + repeated google.protobuf.Any msgs = 4; + + // exec defines the mode of execution of the proposal, + // whether it should be executed immediately on creation or not. + // If so, proposers signatures are considered as Yes votes. + Exec exec = 5; +} + +// MsgCreateProposalResponse is the Msg/CreateProposal response type. +message MsgCreateProposalResponse { + + // proposal is the unique ID of the proposal. + uint64 proposal_id = 1; +} + +// MsgVoteRequest is the Msg/Vote request type. +message MsgVoteRequest { + + // proposal is the unique ID of the proposal. + uint64 proposal_id = 1; + + // voter is the voter account address. + string voter = 2; + + // choice is the voter's choice on the proposal. + Choice choice = 3; + + // metadata is any arbitrary metadata to attached to the vote. + bytes metadata = 4; + + // exec defines whether the proposal should be executed + // immediately after voting or not. + Exec exec = 5; +} + +// MsgVoteResponse is the Msg/Vote response type. +message MsgVoteResponse { } + +// MsgExecRequest is the Msg/Exec request type. +message MsgExecRequest { + + // proposal is the unique ID of the proposal. + uint64 proposal_id = 1; + + // signer is the account address used to execute the proposal. + string signer = 2; +} + +// MsgExecResponse is the Msg/Exec request type. +message MsgExecResponse { } diff --git a/proto/cosmos/group/v1beta1/types.proto b/proto/cosmos/group/v1beta1/types.proto new file mode 100644 index 0000000000..9116442469 --- /dev/null +++ b/proto/cosmos/group/v1beta1/types.proto @@ -0,0 +1,272 @@ +syntax = "proto3"; + +package cosmos.group.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/group"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "cosmos_proto/cosmos.proto"; +import "google/protobuf/any.proto"; + +// Member represents a group member with an account address, +// non-zero weight and metadata. +message Member { + + // address is the member's account address. + string address = 1; + + // weight is the member's voting weight that should be greater than 0. + string weight = 2; + + // metadata is any arbitrary metadata to attached to the member. + bytes metadata = 3; +} + +// Members defines a repeated slice of Member objects. +message Members { + + // members is the list of members. + repeated Member members = 1 [(gogoproto.nullable) = false]; +} + +// ThresholdDecisionPolicy implements the DecisionPolicy interface +message ThresholdDecisionPolicy { + option (cosmos_proto.implements_interface) = "DecisionPolicy"; + + // threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed. + string threshold = 1; + + // timeout is the duration from submission of a proposal to the end of voting period + // Within this times votes and exec messages can be submitted. + google.protobuf.Duration timeout = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +// Choice defines available types of choices for voting. +enum Choice { + + // CHOICE_UNSPECIFIED defines a no-op voting choice. + CHOICE_UNSPECIFIED = 0; + + // CHOICE_NO defines a no voting choice. + CHOICE_NO = 1; + + // CHOICE_YES defines a yes voting choice. + CHOICE_YES = 2; + + // CHOICE_ABSTAIN defines an abstaining voting choice. + CHOICE_ABSTAIN = 3; + + // CHOICE_VETO defines a voting choice with veto. + CHOICE_VETO = 4; +} + +// +// State +// + +// GroupInfo represents the high-level on-chain information for a group. +message GroupInfo { + + // group_id is the unique ID of the group. + uint64 group_id = 1; + + // admin is the account address of the group's admin. + string admin = 2; + + // metadata is any arbitrary metadata to attached to the group. + bytes metadata = 3; + + // version is used to track changes to a group's membership structure that + // would break existing proposals. Whenever any members weight is changed, + // or any member is added or removed this version is incremented and will + // cause proposals based on older versions of this group to fail + uint64 version = 4; + + // total_weight is the sum of the group members' weights. + string total_weight = 5; +} + +// 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; + + // member is the member data. + Member member = 2; +} + +// GroupAccountInfo represents the high-level on-chain information for a group account. +message GroupAccountInfo { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + + // address is the group account address. + string address = 1; + + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // admin is the account address of the group admin. + string admin = 3; + + // metadata is any arbitrary metadata to attached to the group account. + bytes metadata = 4; + + // version is used to track changes to a group's GroupAccountInfo structure that + // would create a different result on a running proposal. + uint64 version = 5; + + // decision_policy specifies the group account's decision policy. + google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; + + // derivation_key is the "derivation" key of the group account, + // which is needed to derive the group root module key and execute proposals. + bytes derivation_key = 7; +} + +// Proposal defines a group proposal. Any member of a group can submit a proposal +// for a group account to decide upon. +// A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal +// passes as well as some optional metadata associated with the proposal. +message Proposal { + option (gogoproto.goproto_getters) = false; + + // proposal_id is the unique id of the proposal. + uint64 proposal_id = 1; + + // address is the group account address. + string address = 2; + + // metadata is any arbitrary metadata to attached to the proposal. + bytes metadata = 3; + + // proposers are the account addresses of the proposers. + repeated string proposers = 4; + + // submitted_at is a timestamp specifying when a proposal was submitted. + google.protobuf.Timestamp submitted_at = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + + // group_version tracks the version of the group that this proposal corresponds to. + // When group membership is changed, existing proposals from previous group versions will become invalid. + uint64 group_version = 6; + + // group_account_version tracks the version of the group account that this proposal corresponds to. + // When a decision policy is changed, existing proposals from previous policy versions will become invalid. + uint64 group_account_version = 7; + + // Status defines proposal statuses. + enum Status { + option (gogoproto.goproto_enum_prefix) = false; + + // An empty value is invalid and not allowed. + STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "ProposalStatusInvalid"]; + + // Initial status of a proposal when persisted. + STATUS_SUBMITTED = 1 [(gogoproto.enumvalue_customname) = "ProposalStatusSubmitted"]; + + // Final status of a proposal when the final tally was executed. + STATUS_CLOSED = 2 [(gogoproto.enumvalue_customname) = "ProposalStatusClosed"]; + + // Final status of a proposal when the group was modified before the final tally. + STATUS_ABORTED = 3 [(gogoproto.enumvalue_customname) = "ProposalStatusAborted"]; + + // TODO: do we want to support a withdrawn operation? + // A proposal can be deleted before the voting start time by the owner. When this happens the final status + // is Withdrawn. + // STATUS_WITHDRAWN = 4 [(gogoproto.enumvalue_customname) = "Withdrawn"]; + } + + // Status represents the high level position in the life cycle of the proposal. Initial value is Submitted. + Status status = 8; + + // Result defines types of proposal results. + enum Result { + option (gogoproto.goproto_enum_prefix) = false; + + // An empty value is invalid and not allowed + RESULT_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "ProposalResultInvalid"]; + + // Until a final tally has happened the status is unfinalized + RESULT_UNFINALIZED = 1 [(gogoproto.enumvalue_customname) = "ProposalResultUnfinalized"]; + + // Final result of the tally + RESULT_ACCEPTED = 2 [(gogoproto.enumvalue_customname) = "ProposalResultAccepted"]; + + // Final result of the tally + RESULT_REJECTED = 3 [(gogoproto.enumvalue_customname) = "ProposalResultRejected"]; + } + + // result is the final result based on the votes and election rule. Initial value is unfinalized. + // The result is persisted so that clients can always rely on this state and not have to replicate the logic. + Result result = 9; + + // vote_state contains the sums of all weighted votes for this proposal. + Tally vote_state = 10 [(gogoproto.nullable) = false]; + + // timeout is the timestamp of the block where the proposal execution times out. Header times of the votes and execution messages + // must be before this end time to be included in the election. After the timeout timestamp the proposal can not be + // executed anymore and should be considered pending delete. + google.protobuf.Timestamp timeout = 11 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + + // ExecutorResult defines types of proposal executor results. + enum ExecutorResult { + option (gogoproto.goproto_enum_prefix) = false; + + // An empty value is not allowed. + EXECUTOR_RESULT_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "ProposalExecutorResultInvalid"]; + + // We have not yet run the executor. + EXECUTOR_RESULT_NOT_RUN = 1 [(gogoproto.enumvalue_customname) = "ProposalExecutorResultNotRun"]; + + // The executor was successful and proposed action updated state. + EXECUTOR_RESULT_SUCCESS = 2 [(gogoproto.enumvalue_customname) = "ProposalExecutorResultSuccess"]; + + // The executor returned an error and proposed action didn't update state. + EXECUTOR_RESULT_FAILURE = 3 [(gogoproto.enumvalue_customname) = "ProposalExecutorResultFailure"]; + } + + // executor_result is the final result based on the votes and election rule. Initial value is NotRun. + ExecutorResult executor_result = 12; + + // msgs is a list of Msgs that will be executed if the proposal passes. + repeated google.protobuf.Any msgs = 13; +} + +// Tally represents the sum of weighted votes. +message Tally { + option (gogoproto.goproto_getters) = false; + + // yes_count is the weighted sum of yes votes. + string yes_count = 1; + + // no_count is the weighted sum of no votes. + string no_count = 2; + + // abstain_count is the weighted sum of abstainers + string abstain_count = 3; + + // veto_count is the weighted sum of vetoes. + string veto_count = 4; +} + +// Vote represents a vote for a proposal. +message Vote { + + // proposal is the unique ID of the proposal. + uint64 proposal_id = 1; + + // voter is the account address of the voter. + string voter = 2; + + // choice is the voter's choice on the proposal. + Choice choice = 3; + + // metadata is any arbitrary metadata to attached to the vote. + bytes metadata = 4; + + // submitted_at is the timestamp when the vote was submitted. + google.protobuf.Timestamp submitted_at = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} diff --git a/types/tx/msgs.go b/types/tx/msgs.go new file mode 100644 index 0000000000..4c4ad9dcd0 --- /dev/null +++ b/types/tx/msgs.go @@ -0,0 +1,47 @@ +package tx + +import ( + fmt "fmt" + + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// SetMsgs takes a slice of sdk.Msg's and turn them into Any's. +func SetMsgs(msgs []sdk.Msg) ([]*types.Any, error) { + anys := make([]*types.Any, len(msgs)) + for i, msg := range msgs { + var err error + anys[i], err = types.NewAnyWithValue(msg) + if err != nil { + return nil, err + } + } + return anys, nil +} + +// GetMsgs takes a slice of Any's and turn them into sdk.Msg's. +func GetMsgs(anys []*types.Any, name string) ([]sdk.Msg, error) { + msgs := make([]sdk.Msg, len(anys)) + for i, any := range anys { + cached := any.GetCachedValue() + if cached == nil { + return nil, fmt.Errorf("any cached value is nil, %s messages must be correctly packed any values", name) + } + msgs[i] = cached.(sdk.Msg) + } + return msgs, nil +} + +// UnpackInterfaces unpacks Any's to sdk.Msg's. +func UnpackInterfaces(unpacker types.AnyUnpacker, anys []*types.Any) error { + for _, any := range anys { + var msg sdk.Msg + err := unpacker.UnpackAny(any, &msg) + if err != nil { + return err + } + } + + return nil +} diff --git a/types/tx/types.go b/types/tx/types.go index d50848906d..b96e523aef 100644 --- a/types/tx/types.go +++ b/types/tx/types.go @@ -23,13 +23,9 @@ func (t *Tx) GetMsgs() []sdk.Msg { } anys := t.Body.Messages - res := make([]sdk.Msg, len(anys)) - for i, any := range anys { - cached := any.GetCachedValue() - if cached == nil { - panic("Any cached value is nil. Transaction messages must be correctly packed Any values.") - } - res[i] = cached.(sdk.Msg) + res, err := GetMsgs(anys, "transaction") + if err != nil { + panic(err) } return res } @@ -182,15 +178,7 @@ func (t *Tx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { // UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method func (m *TxBody) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - for _, any := range m.Messages { - var msg sdk.Msg - err := unpacker.UnpackAny(any, &msg) - if err != nil { - return err - } - } - - return nil + return UnpackInterfaces(unpacker, m.Messages) } // UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method diff --git a/x/auth/tx/builder.go b/x/auth/tx/builder.go index 32eacd0137..359c646087 100644 --- a/x/auth/tx/builder.go +++ b/x/auth/tx/builder.go @@ -200,14 +200,9 @@ func (w *wrapper) GetSignaturesV2() ([]signing.SignatureV2, error) { } func (w *wrapper) SetMsgs(msgs ...sdk.Msg) error { - anys := make([]*codectypes.Any, len(msgs)) - - for i, msg := range msgs { - var err error - anys[i], err = codectypes.NewAnyWithValue(msg) - if err != nil { - return err - } + anys, err := tx.SetMsgs(msgs) + if err != nil { + return err } w.tx.Body.Messages = anys diff --git a/x/group/errors.go b/x/group/errors.go new file mode 100644 index 0000000000..fee486c496 --- /dev/null +++ b/x/group/errors.go @@ -0,0 +1,16 @@ +package group + +import ( + "github.com/cosmos/cosmos-sdk/types/errors" +) + +var ( + ErrEmpty = errors.Register(ModuleName, 2, "value is empty") + ErrDuplicate = errors.Register(ModuleName, 3, "duplicate value") + ErrMaxLimit = errors.Register(ModuleName, 4, "limit exceeded") + ErrType = errors.Register(ModuleName, 5, "invalid type") + ErrInvalid = errors.Register(ModuleName, 6, "invalid value") + ErrUnauthorized = errors.Register(ModuleName, 7, "unauthorized") + ErrModified = errors.Register(ModuleName, 8, "modified") + ErrExpired = errors.Register(ModuleName, 9, "expired") +) diff --git a/x/group/keys.go b/x/group/keys.go new file mode 100644 index 0000000000..72d5dec095 --- /dev/null +++ b/x/group/keys.go @@ -0,0 +1,9 @@ +package group + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "group" + + // StoreKey defines the primary module store key + StoreKey = ModuleName +) diff --git a/x/group/proposal.go b/x/group/proposal.go new file mode 100644 index 0000000000..0c1326a8bd --- /dev/null +++ b/x/group/proposal.go @@ -0,0 +1,29 @@ +package group + +import ( + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" +) + +func (p *Proposal) GetMsgs() []sdk.Msg { + msgs, err := tx.GetMsgs(p.Msgs, "proposal") + if err != nil { + panic(err) + } + return msgs +} + +func (p *Proposal) SetMsgs(msgs []sdk.Msg) error { + anys, err := tx.SetMsgs(msgs) + if err != nil { + return err + } + p.Msgs = anys + return nil +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (p Proposal) UnpackInterfaces(unpacker types.AnyUnpacker) error { + return tx.UnpackInterfaces(unpacker, p.Msgs) +} diff --git a/x/group/query.pb.go b/x/group/query.pb.go new file mode 100644 index 0000000000..5df4b2cab9 --- /dev/null +++ b/x/group/query.pb.go @@ -0,0 +1,5366 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/group/v1beta1/query.proto + +package group + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryGroupInfoRequest is the Query/GroupInfo request type. +type QueryGroupInfoRequest struct { + // group_id is the unique ID of the group. + GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` +} + +func (m *QueryGroupInfoRequest) Reset() { *m = QueryGroupInfoRequest{} } +func (m *QueryGroupInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGroupInfoRequest) ProtoMessage() {} +func (*QueryGroupInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{0} +} +func (m *QueryGroupInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupInfoRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGroupInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupInfoRequest.Merge(m, src) +} +func (m *QueryGroupInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupInfoRequest proto.InternalMessageInfo + +func (m *QueryGroupInfoRequest) GetGroupId() uint64 { + if m != nil { + return m.GroupId + } + return 0 +} + +// QueryGroupInfoResponse is the Query/GroupInfo response type. +type QueryGroupInfoResponse struct { + // info is the GroupInfo for the group. + Info *GroupInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` +} + +func (m *QueryGroupInfoResponse) Reset() { *m = QueryGroupInfoResponse{} } +func (m *QueryGroupInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGroupInfoResponse) ProtoMessage() {} +func (*QueryGroupInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{1} +} +func (m *QueryGroupInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGroupInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupInfoResponse.Merge(m, src) +} +func (m *QueryGroupInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupInfoResponse proto.InternalMessageInfo + +func (m *QueryGroupInfoResponse) GetInfo() *GroupInfo { + if m != nil { + return m.Info + } + return nil +} + +// QueryGroupAccountInfoRequest is the Query/GroupAccountInfo request type. +type QueryGroupAccountInfoRequest struct { + // address is the account address of the group account. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryGroupAccountInfoRequest) Reset() { *m = QueryGroupAccountInfoRequest{} } +func (m *QueryGroupAccountInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGroupAccountInfoRequest) ProtoMessage() {} +func (*QueryGroupAccountInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{2} +} +func (m *QueryGroupAccountInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupAccountInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupAccountInfoRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGroupAccountInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupAccountInfoRequest.Merge(m, src) +} +func (m *QueryGroupAccountInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupAccountInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupAccountInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupAccountInfoRequest proto.InternalMessageInfo + +func (m *QueryGroupAccountInfoRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +// QueryGroupAccountInfoResponse is the Query/GroupAccountInfo response type. +type QueryGroupAccountInfoResponse struct { + // info is the GroupAccountInfo for the group account. + Info *GroupAccountInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` +} + +func (m *QueryGroupAccountInfoResponse) Reset() { *m = QueryGroupAccountInfoResponse{} } +func (m *QueryGroupAccountInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGroupAccountInfoResponse) ProtoMessage() {} +func (*QueryGroupAccountInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{3} +} +func (m *QueryGroupAccountInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupAccountInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupAccountInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGroupAccountInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupAccountInfoResponse.Merge(m, src) +} +func (m *QueryGroupAccountInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupAccountInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupAccountInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupAccountInfoResponse proto.InternalMessageInfo + +func (m *QueryGroupAccountInfoResponse) GetInfo() *GroupAccountInfo { + if m != nil { + return m.Info + } + return nil +} + +// QueryGroupMembersRequest is the Query/GroupMembersRequest request type. +type QueryGroupMembersRequest struct { + // group_id is the unique ID of the group. + GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGroupMembersRequest) Reset() { *m = QueryGroupMembersRequest{} } +func (m *QueryGroupMembersRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGroupMembersRequest) ProtoMessage() {} +func (*QueryGroupMembersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{4} +} +func (m *QueryGroupMembersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupMembersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupMembersRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGroupMembersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupMembersRequest.Merge(m, src) +} +func (m *QueryGroupMembersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupMembersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupMembersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupMembersRequest proto.InternalMessageInfo + +func (m *QueryGroupMembersRequest) GetGroupId() uint64 { + if m != nil { + return m.GroupId + } + return 0 +} + +func (m *QueryGroupMembersRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryGroupMembersResponse is the Query/GroupMembersResponse response type. +type QueryGroupMembersResponse struct { + // members are the members of the group with given group_id. + Members []*GroupMember `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGroupMembersResponse) Reset() { *m = QueryGroupMembersResponse{} } +func (m *QueryGroupMembersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGroupMembersResponse) ProtoMessage() {} +func (*QueryGroupMembersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{5} +} +func (m *QueryGroupMembersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupMembersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupMembersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGroupMembersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupMembersResponse.Merge(m, src) +} +func (m *QueryGroupMembersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupMembersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupMembersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupMembersResponse proto.InternalMessageInfo + +func (m *QueryGroupMembersResponse) GetMembers() []*GroupMember { + if m != nil { + return m.Members + } + return nil +} + +func (m *QueryGroupMembersResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryGroupsByAdminRequest is the Query/GroupsByAdminRequest request type. +type QueryGroupsByAdminRequest struct { + // admin is the account address of a group's admin. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGroupsByAdminRequest) Reset() { *m = QueryGroupsByAdminRequest{} } +func (m *QueryGroupsByAdminRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGroupsByAdminRequest) ProtoMessage() {} +func (*QueryGroupsByAdminRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{6} +} +func (m *QueryGroupsByAdminRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupsByAdminRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupsByAdminRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGroupsByAdminRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupsByAdminRequest.Merge(m, src) +} +func (m *QueryGroupsByAdminRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupsByAdminRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupsByAdminRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupsByAdminRequest proto.InternalMessageInfo + +func (m *QueryGroupsByAdminRequest) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *QueryGroupsByAdminRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. +type QueryGroupsByAdminResponse struct { + // groups are the groups info with the provided admin. + Groups []*GroupInfo `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGroupsByAdminResponse) Reset() { *m = QueryGroupsByAdminResponse{} } +func (m *QueryGroupsByAdminResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGroupsByAdminResponse) ProtoMessage() {} +func (*QueryGroupsByAdminResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{7} +} +func (m *QueryGroupsByAdminResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupsByAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupsByAdminResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGroupsByAdminResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupsByAdminResponse.Merge(m, src) +} +func (m *QueryGroupsByAdminResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupsByAdminResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupsByAdminResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupsByAdminResponse proto.InternalMessageInfo + +func (m *QueryGroupsByAdminResponse) GetGroups() []*GroupInfo { + if m != nil { + return m.Groups + } + return nil +} + +func (m *QueryGroupsByAdminResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryGroupAccountsByGroupRequest is the Query/GroupAccountsByGroup request type. +type QueryGroupAccountsByGroupRequest struct { + // group_id is the unique ID of the group account's group. + GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGroupAccountsByGroupRequest) Reset() { *m = QueryGroupAccountsByGroupRequest{} } +func (m *QueryGroupAccountsByGroupRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGroupAccountsByGroupRequest) ProtoMessage() {} +func (*QueryGroupAccountsByGroupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{8} +} +func (m *QueryGroupAccountsByGroupRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupAccountsByGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupAccountsByGroupRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGroupAccountsByGroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupAccountsByGroupRequest.Merge(m, src) +} +func (m *QueryGroupAccountsByGroupRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupAccountsByGroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupAccountsByGroupRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupAccountsByGroupRequest proto.InternalMessageInfo + +func (m *QueryGroupAccountsByGroupRequest) GetGroupId() uint64 { + if m != nil { + return m.GroupId + } + return 0 +} + +func (m *QueryGroupAccountsByGroupRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryGroupAccountsByGroupResponse is the Query/GroupAccountsByGroup response type. +type QueryGroupAccountsByGroupResponse struct { + // group_accounts are the group accounts info associated with the provided group. + GroupAccounts []*GroupAccountInfo `protobuf:"bytes,1,rep,name=group_accounts,json=groupAccounts,proto3" json:"group_accounts,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGroupAccountsByGroupResponse) Reset() { *m = QueryGroupAccountsByGroupResponse{} } +func (m *QueryGroupAccountsByGroupResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGroupAccountsByGroupResponse) ProtoMessage() {} +func (*QueryGroupAccountsByGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{9} +} +func (m *QueryGroupAccountsByGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupAccountsByGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupAccountsByGroupResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGroupAccountsByGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupAccountsByGroupResponse.Merge(m, src) +} +func (m *QueryGroupAccountsByGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupAccountsByGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupAccountsByGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupAccountsByGroupResponse proto.InternalMessageInfo + +func (m *QueryGroupAccountsByGroupResponse) GetGroupAccounts() []*GroupAccountInfo { + if m != nil { + return m.GroupAccounts + } + return nil +} + +func (m *QueryGroupAccountsByGroupResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryGroupAccountsByAdminRequest is the Query/GroupAccountsByAdmin request type. +type QueryGroupAccountsByAdminRequest struct { + // admin is the admin address of the group account. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGroupAccountsByAdminRequest) Reset() { *m = QueryGroupAccountsByAdminRequest{} } +func (m *QueryGroupAccountsByAdminRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGroupAccountsByAdminRequest) ProtoMessage() {} +func (*QueryGroupAccountsByAdminRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{10} +} +func (m *QueryGroupAccountsByAdminRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupAccountsByAdminRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupAccountsByAdminRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGroupAccountsByAdminRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupAccountsByAdminRequest.Merge(m, src) +} +func (m *QueryGroupAccountsByAdminRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupAccountsByAdminRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupAccountsByAdminRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupAccountsByAdminRequest proto.InternalMessageInfo + +func (m *QueryGroupAccountsByAdminRequest) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *QueryGroupAccountsByAdminRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryGroupAccountsByAdminResponse is the Query/GroupAccountsByAdmin response type. +type QueryGroupAccountsByAdminResponse struct { + // group_accounts are the group accounts info with provided admin. + GroupAccounts []*GroupAccountInfo `protobuf:"bytes,1,rep,name=group_accounts,json=groupAccounts,proto3" json:"group_accounts,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGroupAccountsByAdminResponse) Reset() { *m = QueryGroupAccountsByAdminResponse{} } +func (m *QueryGroupAccountsByAdminResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGroupAccountsByAdminResponse) ProtoMessage() {} +func (*QueryGroupAccountsByAdminResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{11} +} +func (m *QueryGroupAccountsByAdminResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupAccountsByAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupAccountsByAdminResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGroupAccountsByAdminResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupAccountsByAdminResponse.Merge(m, src) +} +func (m *QueryGroupAccountsByAdminResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupAccountsByAdminResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupAccountsByAdminResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupAccountsByAdminResponse proto.InternalMessageInfo + +func (m *QueryGroupAccountsByAdminResponse) GetGroupAccounts() []*GroupAccountInfo { + if m != nil { + return m.GroupAccounts + } + return nil +} + +func (m *QueryGroupAccountsByAdminResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProposalRequest is the Query/Proposal request type. +type QueryProposalRequest struct { + // proposal_id is the unique ID of a proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (m *QueryProposalRequest) Reset() { *m = QueryProposalRequest{} } +func (m *QueryProposalRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProposalRequest) ProtoMessage() {} +func (*QueryProposalRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{12} +} +func (m *QueryProposalRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposalRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryProposalRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalRequest.Merge(m, src) +} +func (m *QueryProposalRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProposalRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposalRequest proto.InternalMessageInfo + +func (m *QueryProposalRequest) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +// QueryProposalResponse is the Query/Proposal response type. +type QueryProposalResponse struct { + // proposal is the proposal info. + Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` +} + +func (m *QueryProposalResponse) Reset() { *m = QueryProposalResponse{} } +func (m *QueryProposalResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProposalResponse) ProtoMessage() {} +func (*QueryProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{13} +} +func (m *QueryProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposalResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalResponse.Merge(m, src) +} +func (m *QueryProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposalResponse proto.InternalMessageInfo + +func (m *QueryProposalResponse) GetProposal() *Proposal { + if m != nil { + return m.Proposal + } + return nil +} + +// QueryProposalsByGroupAccountRequest is the Query/ProposalByGroupAccount request type. +type QueryProposalsByGroupAccountRequest struct { + // address is the group account address related to proposals. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProposalsByGroupAccountRequest) Reset() { *m = QueryProposalsByGroupAccountRequest{} } +func (m *QueryProposalsByGroupAccountRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProposalsByGroupAccountRequest) ProtoMessage() {} +func (*QueryProposalsByGroupAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{14} +} +func (m *QueryProposalsByGroupAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProposalsByGroupAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposalsByGroupAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryProposalsByGroupAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalsByGroupAccountRequest.Merge(m, src) +} +func (m *QueryProposalsByGroupAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProposalsByGroupAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalsByGroupAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposalsByGroupAccountRequest proto.InternalMessageInfo + +func (m *QueryProposalsByGroupAccountRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *QueryProposalsByGroupAccountRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProposalsByGroupAccountResponse is the Query/ProposalByGroupAccount response type. +type QueryProposalsByGroupAccountResponse struct { + // proposals are the proposals with given group account. + Proposals []*Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProposalsByGroupAccountResponse) Reset() { *m = QueryProposalsByGroupAccountResponse{} } +func (m *QueryProposalsByGroupAccountResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProposalsByGroupAccountResponse) ProtoMessage() {} +func (*QueryProposalsByGroupAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{15} +} +func (m *QueryProposalsByGroupAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProposalsByGroupAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposalsByGroupAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryProposalsByGroupAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalsByGroupAccountResponse.Merge(m, src) +} +func (m *QueryProposalsByGroupAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProposalsByGroupAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalsByGroupAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposalsByGroupAccountResponse proto.InternalMessageInfo + +func (m *QueryProposalsByGroupAccountResponse) GetProposals() []*Proposal { + if m != nil { + return m.Proposals + } + return nil +} + +func (m *QueryProposalsByGroupAccountResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter request type. +type QueryVoteByProposalVoterRequest struct { + // proposal_id is the unique ID of a proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // voter is a proposal voter account address. + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` +} + +func (m *QueryVoteByProposalVoterRequest) Reset() { *m = QueryVoteByProposalVoterRequest{} } +func (m *QueryVoteByProposalVoterRequest) String() string { return proto.CompactTextString(m) } +func (*QueryVoteByProposalVoterRequest) ProtoMessage() {} +func (*QueryVoteByProposalVoterRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{16} +} +func (m *QueryVoteByProposalVoterRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryVoteByProposalVoterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryVoteByProposalVoterRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryVoteByProposalVoterRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVoteByProposalVoterRequest.Merge(m, src) +} +func (m *QueryVoteByProposalVoterRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryVoteByProposalVoterRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVoteByProposalVoterRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryVoteByProposalVoterRequest proto.InternalMessageInfo + +func (m *QueryVoteByProposalVoterRequest) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +func (m *QueryVoteByProposalVoterRequest) GetVoter() string { + if m != nil { + return m.Voter + } + return "" +} + +// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. +type QueryVoteByProposalVoterResponse struct { + // vote is the vote with given proposal_id and voter. + Vote *Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` +} + +func (m *QueryVoteByProposalVoterResponse) Reset() { *m = QueryVoteByProposalVoterResponse{} } +func (m *QueryVoteByProposalVoterResponse) String() string { return proto.CompactTextString(m) } +func (*QueryVoteByProposalVoterResponse) ProtoMessage() {} +func (*QueryVoteByProposalVoterResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{17} +} +func (m *QueryVoteByProposalVoterResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryVoteByProposalVoterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryVoteByProposalVoterResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryVoteByProposalVoterResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVoteByProposalVoterResponse.Merge(m, src) +} +func (m *QueryVoteByProposalVoterResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryVoteByProposalVoterResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVoteByProposalVoterResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryVoteByProposalVoterResponse proto.InternalMessageInfo + +func (m *QueryVoteByProposalVoterResponse) GetVote() *Vote { + if m != nil { + return m.Vote + } + return nil +} + +// QueryVotesByProposalResponse is the Query/VotesByProposal request type. +type QueryVotesByProposalRequest struct { + // proposal_id is the unique ID of a proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryVotesByProposalRequest) Reset() { *m = QueryVotesByProposalRequest{} } +func (m *QueryVotesByProposalRequest) String() string { return proto.CompactTextString(m) } +func (*QueryVotesByProposalRequest) ProtoMessage() {} +func (*QueryVotesByProposalRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{18} +} +func (m *QueryVotesByProposalRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryVotesByProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryVotesByProposalRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryVotesByProposalRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVotesByProposalRequest.Merge(m, src) +} +func (m *QueryVotesByProposalRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryVotesByProposalRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVotesByProposalRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryVotesByProposalRequest proto.InternalMessageInfo + +func (m *QueryVotesByProposalRequest) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +func (m *QueryVotesByProposalRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryVotesByProposalResponse is the Query/VotesByProposal response type. +type QueryVotesByProposalResponse struct { + // votes are the list of votes for given proposal_id. + Votes []*Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryVotesByProposalResponse) Reset() { *m = QueryVotesByProposalResponse{} } +func (m *QueryVotesByProposalResponse) String() string { return proto.CompactTextString(m) } +func (*QueryVotesByProposalResponse) ProtoMessage() {} +func (*QueryVotesByProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{19} +} +func (m *QueryVotesByProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryVotesByProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryVotesByProposalResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryVotesByProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVotesByProposalResponse.Merge(m, src) +} +func (m *QueryVotesByProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryVotesByProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVotesByProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryVotesByProposalResponse proto.InternalMessageInfo + +func (m *QueryVotesByProposalResponse) GetVotes() []*Vote { + if m != nil { + return m.Votes + } + return nil +} + +func (m *QueryVotesByProposalResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryVotesByVoterResponse is the Query/VotesByVoter request type. +type QueryVotesByVoterRequest struct { + // voter is a proposal voter account address. + Voter string `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryVotesByVoterRequest) Reset() { *m = QueryVotesByVoterRequest{} } +func (m *QueryVotesByVoterRequest) String() string { return proto.CompactTextString(m) } +func (*QueryVotesByVoterRequest) ProtoMessage() {} +func (*QueryVotesByVoterRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{20} +} +func (m *QueryVotesByVoterRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryVotesByVoterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryVotesByVoterRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryVotesByVoterRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVotesByVoterRequest.Merge(m, src) +} +func (m *QueryVotesByVoterRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryVotesByVoterRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVotesByVoterRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryVotesByVoterRequest proto.InternalMessageInfo + +func (m *QueryVotesByVoterRequest) GetVoter() string { + if m != nil { + return m.Voter + } + return "" +} + +func (m *QueryVotesByVoterRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryVotesByVoterResponse is the Query/VotesByVoter response type. +type QueryVotesByVoterResponse struct { + // votes are the list of votes by given voter. + Votes []*Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryVotesByVoterResponse) Reset() { *m = QueryVotesByVoterResponse{} } +func (m *QueryVotesByVoterResponse) String() string { return proto.CompactTextString(m) } +func (*QueryVotesByVoterResponse) ProtoMessage() {} +func (*QueryVotesByVoterResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae47912b18757b1a, []int{21} +} +func (m *QueryVotesByVoterResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryVotesByVoterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryVotesByVoterResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryVotesByVoterResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVotesByVoterResponse.Merge(m, src) +} +func (m *QueryVotesByVoterResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryVotesByVoterResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVotesByVoterResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryVotesByVoterResponse proto.InternalMessageInfo + +func (m *QueryVotesByVoterResponse) GetVotes() []*Vote { + if m != nil { + return m.Votes + } + return nil +} + +func (m *QueryVotesByVoterResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryGroupInfoRequest)(nil), "cosmos.group.v1beta1.QueryGroupInfoRequest") + proto.RegisterType((*QueryGroupInfoResponse)(nil), "cosmos.group.v1beta1.QueryGroupInfoResponse") + proto.RegisterType((*QueryGroupAccountInfoRequest)(nil), "cosmos.group.v1beta1.QueryGroupAccountInfoRequest") + proto.RegisterType((*QueryGroupAccountInfoResponse)(nil), "cosmos.group.v1beta1.QueryGroupAccountInfoResponse") + proto.RegisterType((*QueryGroupMembersRequest)(nil), "cosmos.group.v1beta1.QueryGroupMembersRequest") + proto.RegisterType((*QueryGroupMembersResponse)(nil), "cosmos.group.v1beta1.QueryGroupMembersResponse") + proto.RegisterType((*QueryGroupsByAdminRequest)(nil), "cosmos.group.v1beta1.QueryGroupsByAdminRequest") + proto.RegisterType((*QueryGroupsByAdminResponse)(nil), "cosmos.group.v1beta1.QueryGroupsByAdminResponse") + proto.RegisterType((*QueryGroupAccountsByGroupRequest)(nil), "cosmos.group.v1beta1.QueryGroupAccountsByGroupRequest") + proto.RegisterType((*QueryGroupAccountsByGroupResponse)(nil), "cosmos.group.v1beta1.QueryGroupAccountsByGroupResponse") + proto.RegisterType((*QueryGroupAccountsByAdminRequest)(nil), "cosmos.group.v1beta1.QueryGroupAccountsByAdminRequest") + proto.RegisterType((*QueryGroupAccountsByAdminResponse)(nil), "cosmos.group.v1beta1.QueryGroupAccountsByAdminResponse") + proto.RegisterType((*QueryProposalRequest)(nil), "cosmos.group.v1beta1.QueryProposalRequest") + proto.RegisterType((*QueryProposalResponse)(nil), "cosmos.group.v1beta1.QueryProposalResponse") + proto.RegisterType((*QueryProposalsByGroupAccountRequest)(nil), "cosmos.group.v1beta1.QueryProposalsByGroupAccountRequest") + proto.RegisterType((*QueryProposalsByGroupAccountResponse)(nil), "cosmos.group.v1beta1.QueryProposalsByGroupAccountResponse") + proto.RegisterType((*QueryVoteByProposalVoterRequest)(nil), "cosmos.group.v1beta1.QueryVoteByProposalVoterRequest") + proto.RegisterType((*QueryVoteByProposalVoterResponse)(nil), "cosmos.group.v1beta1.QueryVoteByProposalVoterResponse") + proto.RegisterType((*QueryVotesByProposalRequest)(nil), "cosmos.group.v1beta1.QueryVotesByProposalRequest") + proto.RegisterType((*QueryVotesByProposalResponse)(nil), "cosmos.group.v1beta1.QueryVotesByProposalResponse") + proto.RegisterType((*QueryVotesByVoterRequest)(nil), "cosmos.group.v1beta1.QueryVotesByVoterRequest") + proto.RegisterType((*QueryVotesByVoterResponse)(nil), "cosmos.group.v1beta1.QueryVotesByVoterResponse") +} + +func init() { proto.RegisterFile("cosmos/group/v1beta1/query.proto", fileDescriptor_ae47912b18757b1a) } + +var fileDescriptor_ae47912b18757b1a = []byte{ + // 883 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6e, 0xd3, 0x4e, + 0x10, 0xee, 0xfe, 0x7e, 0xfd, 0x97, 0x29, 0x05, 0x64, 0x02, 0xa4, 0x06, 0xd2, 0xd4, 0x54, 0x50, + 0xb5, 0xe0, 0xb4, 0xa9, 0x68, 0xa0, 0x20, 0xa4, 0xe6, 0x40, 0xd5, 0x43, 0xa5, 0x62, 0x24, 0x84, + 0xe0, 0x80, 0x9c, 0xc4, 0x0d, 0x11, 0x24, 0x9b, 0xda, 0x4e, 0xd5, 0x08, 0x21, 0x71, 0x00, 0x7a, + 0xed, 0x09, 0x89, 0x0b, 0x12, 0x0f, 0xc0, 0x13, 0xf0, 0x02, 0xdc, 0xe8, 0x91, 0x23, 0x6a, 0x5f, + 0x04, 0xd9, 0x3b, 0xfe, 0x97, 0x6c, 0x6c, 0x07, 0x59, 0x85, 0x53, 0xb2, 0xab, 0xf9, 0x66, 0xbe, + 0xf9, 0x66, 0x77, 0x67, 0x64, 0xc8, 0x55, 0xa8, 0xd1, 0xa0, 0x46, 0xbe, 0xa6, 0xd3, 0x76, 0x2b, + 0xbf, 0xbb, 0x54, 0xd6, 0x4c, 0x75, 0x29, 0xbf, 0xd3, 0xd6, 0xf4, 0x8e, 0xdc, 0xd2, 0xa9, 0x49, + 0x85, 0x34, 0xb3, 0x90, 0x6d, 0x0b, 0x19, 0x2d, 0x44, 0x3e, 0xce, 0xec, 0xb4, 0x34, 0x83, 0xe1, + 0xc4, 0x74, 0x8d, 0xd6, 0xa8, 0xfd, 0x37, 0x6f, 0xfd, 0xc3, 0xdd, 0x79, 0xc4, 0x95, 0x55, 0x43, + 0x63, 0x61, 0x5c, 0x70, 0x4b, 0xad, 0xd5, 0x9b, 0xaa, 0x59, 0xa7, 0x4d, 0x66, 0x2b, 0x15, 0xe0, + 0xfc, 0x43, 0xcb, 0x62, 0xdd, 0x8a, 0xb1, 0xd1, 0xdc, 0xa6, 0x8a, 0xb6, 0xd3, 0xd6, 0x0c, 0x53, + 0x98, 0x82, 0x71, 0x3b, 0xee, 0xf3, 0x7a, 0x35, 0x43, 0x72, 0x64, 0x6e, 0x58, 0x19, 0xb3, 0xd7, + 0x1b, 0x55, 0x69, 0x13, 0x2e, 0x74, 0x63, 0x8c, 0x16, 0x6d, 0x1a, 0x9a, 0xb0, 0x0c, 0xc3, 0xf5, + 0xe6, 0x36, 0xb5, 0x01, 0x13, 0x85, 0x69, 0x99, 0x97, 0x96, 0xec, 0xc1, 0x6c, 0x63, 0xe9, 0x36, + 0x5c, 0xf6, 0xdc, 0xad, 0x55, 0x2a, 0xb4, 0xdd, 0x34, 0xfd, 0x4c, 0x32, 0x30, 0xa6, 0x56, 0xab, + 0xba, 0x66, 0x18, 0xb6, 0xdf, 0x94, 0xe2, 0x2c, 0xa5, 0x67, 0x70, 0xa5, 0x0f, 0x12, 0xf9, 0xac, + 0x06, 0xf8, 0x5c, 0x0b, 0xe1, 0xe3, 0x47, 0x33, 0x5a, 0x6f, 0x20, 0xe3, 0x39, 0xdf, 0xd4, 0x1a, + 0x65, 0x4d, 0x37, 0xa2, 0xc5, 0x11, 0x1e, 0x00, 0x78, 0x22, 0x67, 0xfe, 0x0b, 0x06, 0xb6, 0x2a, + 0x22, 0xb3, 0xc2, 0x3b, 0xd1, 0xb7, 0xd4, 0x9a, 0x86, 0x6e, 0x15, 0x1f, 0x52, 0xfa, 0x42, 0x60, + 0x8a, 0x13, 0x1f, 0x13, 0xbb, 0x0b, 0x63, 0x0d, 0xb6, 0x95, 0x21, 0xb9, 0xff, 0xe7, 0x26, 0x0a, + 0x33, 0x21, 0xb9, 0x31, 0xb0, 0xe2, 0x20, 0x84, 0x75, 0x0e, 0xc5, 0xeb, 0x91, 0x14, 0x59, 0xe4, + 0x00, 0xc7, 0x8e, 0x9f, 0xa2, 0x51, 0xea, 0xac, 0x55, 0x1b, 0xf5, 0xa6, 0xa3, 0x51, 0x1a, 0x46, + 0x54, 0x6b, 0x8d, 0x45, 0x63, 0x8b, 0xc4, 0xe4, 0xf9, 0x4c, 0x40, 0xe4, 0xc5, 0x46, 0x7d, 0x8a, + 0x30, 0x6a, 0x0b, 0xe1, 0xc8, 0x13, 0x79, 0x14, 0xd1, 0x3c, 0x39, 0x6d, 0xde, 0x13, 0xc8, 0xf5, + 0x1c, 0x4e, 0xa3, 0xc4, 0x96, 0x27, 0x78, 0x8e, 0xbe, 0x11, 0x98, 0x09, 0xe1, 0x81, 0x7a, 0x6d, + 0xc2, 0x69, 0x46, 0x44, 0x45, 0x03, 0xd4, 0x2d, 0xee, 0x95, 0x99, 0xac, 0xf9, 0xbd, 0x27, 0xa7, + 0xe2, 0xdb, 0x3e, 0x2a, 0x9e, 0xe0, 0x49, 0xeb, 0x27, 0x60, 0xf0, 0xc0, 0xfd, 0xab, 0x02, 0x16, + 0x21, 0x6d, 0x93, 0xdf, 0xd2, 0x69, 0x8b, 0x1a, 0xea, 0x2b, 0x47, 0xb3, 0x69, 0x98, 0x68, 0xe1, + 0x96, 0x77, 0xf8, 0xc0, 0xd9, 0xda, 0xa8, 0x4a, 0x8f, 0xb0, 0x31, 0x78, 0x40, 0xf7, 0x4d, 0x1d, + 0x77, 0xcc, 0xf0, 0x5d, 0xcd, 0xf2, 0x73, 0x74, 0x91, 0xae, 0xbd, 0xb4, 0x4f, 0xe0, 0x6a, 0xc0, + 0xab, 0x73, 0x10, 0x31, 0xf1, 0xc8, 0x27, 0x3f, 0xb1, 0xaa, 0x7e, 0x25, 0x30, 0x1b, 0xce, 0x04, + 0xd3, 0xbd, 0x07, 0x29, 0x87, 0xbe, 0x53, 0xd3, 0xa8, 0x7c, 0x3d, 0x40, 0x72, 0x75, 0x7c, 0x02, + 0xd3, 0x36, 0xdd, 0xc7, 0xd4, 0xd4, 0x4a, 0x2e, 0x69, 0x6b, 0xa5, 0xc7, 0x2d, 0xa9, 0x75, 0x4f, + 0x76, 0x2d, 0x80, 0xcd, 0x23, 0xa5, 0xb0, 0x85, 0xa4, 0xe0, 0x0d, 0xe3, 0x7a, 0x46, 0x11, 0x64, + 0x18, 0xb6, 0x8c, 0xb1, 0xde, 0x22, 0x3f, 0x7f, 0x0b, 0xa2, 0xd8, 0x76, 0xd2, 0x07, 0x02, 0x97, + 0x5c, 0xa7, 0x46, 0x69, 0xe0, 0xd3, 0x97, 0x58, 0x99, 0x3f, 0x11, 0x1c, 0x2e, 0x7a, 0x88, 0x60, + 0x66, 0x8b, 0x4c, 0x13, 0xa7, 0xb4, 0x61, 0xa9, 0x31, 0xc3, 0xe4, 0x4a, 0xba, 0x87, 0x03, 0x06, + 0x52, 0x0b, 0xd4, 0xd2, 0x2d, 0x15, 0xf1, 0x95, 0x2a, 0x31, 0x55, 0x3e, 0x3a, 0xb3, 0x45, 0x30, + 0xf4, 0x5f, 0x97, 0xa4, 0xf0, 0x03, 0x60, 0xc4, 0x26, 0x26, 0x6c, 0x43, 0xca, 0x6d, 0xce, 0xc2, + 0x02, 0x9f, 0x02, 0x77, 0x70, 0x15, 0x6f, 0xc4, 0x33, 0xc6, 0x64, 0x5f, 0xc3, 0xd9, 0xee, 0xb7, + 0x58, 0x28, 0x44, 0x79, 0xe8, 0x1d, 0x52, 0xc5, 0xe5, 0x81, 0x30, 0x18, 0x9c, 0xc2, 0x29, 0xff, + 0x74, 0x27, 0xc8, 0x51, 0x4e, 0x82, 0x63, 0xa8, 0x98, 0x8f, 0x6d, 0x8f, 0x01, 0x75, 0x98, 0x0c, + 0xcc, 0x4b, 0x42, 0xa4, 0x87, 0xae, 0x5e, 0x2b, 0x2e, 0xc6, 0x07, 0x60, 0xcc, 0x7d, 0x02, 0x69, + 0xde, 0xec, 0x21, 0xac, 0xc4, 0x94, 0xac, 0x6b, 0x68, 0x12, 0x8b, 0x03, 0xe3, 0xfa, 0x33, 0x61, + 0x2a, 0x0c, 0xc0, 0x24, 0x20, 0x46, 0x71, 0x60, 0x1c, 0x32, 0xa9, 0xc0, 0xb8, 0xf3, 0x12, 0x09, + 0xf3, 0x21, 0x4e, 0xba, 0xde, 0x4d, 0x71, 0x21, 0x96, 0x2d, 0x06, 0x39, 0x20, 0x70, 0xb1, 0x4f, + 0x77, 0x13, 0xee, 0xc4, 0x70, 0xc4, 0xef, 0xcd, 0xe2, 0xea, 0x9f, 0x40, 0x91, 0xd2, 0x3b, 0x02, + 0xe7, 0x38, 0x7d, 0x46, 0xb8, 0x15, 0xe2, 0xb3, 0x7f, 0xc7, 0x13, 0x57, 0x06, 0x85, 0x21, 0x8d, + 0x3d, 0x38, 0xd3, 0xd5, 0x0f, 0x84, 0xa5, 0x08, 0x57, 0xbd, 0x4d, 0x4c, 0x2c, 0x0c, 0x02, 0xf1, + 0x6e, 0xbc, 0xff, 0xcd, 0x0d, 0xbd, 0xf1, 0x9c, 0xbe, 0x10, 0x7a, 0xe3, 0x79, 0x8f, 0x79, 0xe9, + 0xfe, 0xf7, 0xa3, 0x2c, 0x39, 0x3c, 0xca, 0x92, 0x5f, 0x47, 0x59, 0x72, 0x70, 0x9c, 0x1d, 0x3a, + 0x3c, 0xce, 0x0e, 0xfd, 0x3c, 0xce, 0x0e, 0x3d, 0x9d, 0xad, 0xd5, 0xcd, 0x17, 0xed, 0xb2, 0x5c, + 0xa1, 0x8d, 0x3c, 0x7e, 0x30, 0x60, 0x3f, 0x37, 0x8d, 0xea, 0xcb, 0xfc, 0x1e, 0xfb, 0xea, 0x50, + 0x1e, 0xb5, 0x3f, 0x13, 0x2c, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x69, 0x31, 0x95, 0x5c, 0xc4, + 0x10, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // GroupInfo queries group info based on group id. + GroupInfo(ctx context.Context, in *QueryGroupInfoRequest, opts ...grpc.CallOption) (*QueryGroupInfoResponse, error) + // GroupAccountInfo queries group account info based on group account address. + GroupAccountInfo(ctx context.Context, in *QueryGroupAccountInfoRequest, opts ...grpc.CallOption) (*QueryGroupAccountInfoResponse, error) + // GroupMembers queries members of a group + GroupMembers(ctx context.Context, in *QueryGroupMembersRequest, opts ...grpc.CallOption) (*QueryGroupMembersResponse, error) + // GroupsByAdmin queries groups by admin address. + GroupsByAdmin(ctx context.Context, in *QueryGroupsByAdminRequest, opts ...grpc.CallOption) (*QueryGroupsByAdminResponse, error) + // GroupAccountsByGroup queries group accounts by group id. + GroupAccountsByGroup(ctx context.Context, in *QueryGroupAccountsByGroupRequest, opts ...grpc.CallOption) (*QueryGroupAccountsByGroupResponse, error) + // GroupsByAdmin queries group accounts by admin address. + GroupAccountsByAdmin(ctx context.Context, in *QueryGroupAccountsByAdminRequest, opts ...grpc.CallOption) (*QueryGroupAccountsByAdminResponse, error) + // Proposal queries a proposal based on proposal id. + Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) + // ProposalsByGroupAccount queries proposals based on group account address. + ProposalsByGroupAccount(ctx context.Context, in *QueryProposalsByGroupAccountRequest, opts ...grpc.CallOption) (*QueryProposalsByGroupAccountResponse, error) + // VoteByProposalVoter queries a vote by proposal id and voter. + VoteByProposalVoter(ctx context.Context, in *QueryVoteByProposalVoterRequest, opts ...grpc.CallOption) (*QueryVoteByProposalVoterResponse, error) + // VotesByProposal queries a vote by proposal. + VotesByProposal(ctx context.Context, in *QueryVotesByProposalRequest, opts ...grpc.CallOption) (*QueryVotesByProposalResponse, error) + // VotesByVoter queries a vote by voter. + VotesByVoter(ctx context.Context, in *QueryVotesByVoterRequest, opts ...grpc.CallOption) (*QueryVotesByVoterResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) GroupInfo(ctx context.Context, in *QueryGroupInfoRequest, opts ...grpc.CallOption) (*QueryGroupInfoResponse, error) { + out := new(QueryGroupInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/GroupInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GroupAccountInfo(ctx context.Context, in *QueryGroupAccountInfoRequest, opts ...grpc.CallOption) (*QueryGroupAccountInfoResponse, error) { + out := new(QueryGroupAccountInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/GroupAccountInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GroupMembers(ctx context.Context, in *QueryGroupMembersRequest, opts ...grpc.CallOption) (*QueryGroupMembersResponse, error) { + out := new(QueryGroupMembersResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/GroupMembers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GroupsByAdmin(ctx context.Context, in *QueryGroupsByAdminRequest, opts ...grpc.CallOption) (*QueryGroupsByAdminResponse, error) { + out := new(QueryGroupsByAdminResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/GroupsByAdmin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GroupAccountsByGroup(ctx context.Context, in *QueryGroupAccountsByGroupRequest, opts ...grpc.CallOption) (*QueryGroupAccountsByGroupResponse, error) { + out := new(QueryGroupAccountsByGroupResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/GroupAccountsByGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GroupAccountsByAdmin(ctx context.Context, in *QueryGroupAccountsByAdminRequest, opts ...grpc.CallOption) (*QueryGroupAccountsByAdminResponse, error) { + out := new(QueryGroupAccountsByAdminResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/GroupAccountsByAdmin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) { + out := new(QueryProposalResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/Proposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ProposalsByGroupAccount(ctx context.Context, in *QueryProposalsByGroupAccountRequest, opts ...grpc.CallOption) (*QueryProposalsByGroupAccountResponse, error) { + out := new(QueryProposalsByGroupAccountResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/ProposalsByGroupAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) VoteByProposalVoter(ctx context.Context, in *QueryVoteByProposalVoterRequest, opts ...grpc.CallOption) (*QueryVoteByProposalVoterResponse, error) { + out := new(QueryVoteByProposalVoterResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/VoteByProposalVoter", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) VotesByProposal(ctx context.Context, in *QueryVotesByProposalRequest, opts ...grpc.CallOption) (*QueryVotesByProposalResponse, error) { + out := new(QueryVotesByProposalResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/VotesByProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) VotesByVoter(ctx context.Context, in *QueryVotesByVoterRequest, opts ...grpc.CallOption) (*QueryVotesByVoterResponse, error) { + out := new(QueryVotesByVoterResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/VotesByVoter", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // GroupInfo queries group info based on group id. + GroupInfo(context.Context, *QueryGroupInfoRequest) (*QueryGroupInfoResponse, error) + // GroupAccountInfo queries group account info based on group account address. + GroupAccountInfo(context.Context, *QueryGroupAccountInfoRequest) (*QueryGroupAccountInfoResponse, error) + // GroupMembers queries members of a group + GroupMembers(context.Context, *QueryGroupMembersRequest) (*QueryGroupMembersResponse, error) + // GroupsByAdmin queries groups by admin address. + GroupsByAdmin(context.Context, *QueryGroupsByAdminRequest) (*QueryGroupsByAdminResponse, error) + // GroupAccountsByGroup queries group accounts by group id. + GroupAccountsByGroup(context.Context, *QueryGroupAccountsByGroupRequest) (*QueryGroupAccountsByGroupResponse, error) + // GroupsByAdmin queries group accounts by admin address. + GroupAccountsByAdmin(context.Context, *QueryGroupAccountsByAdminRequest) (*QueryGroupAccountsByAdminResponse, error) + // Proposal queries a proposal based on proposal id. + Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error) + // ProposalsByGroupAccount queries proposals based on group account address. + ProposalsByGroupAccount(context.Context, *QueryProposalsByGroupAccountRequest) (*QueryProposalsByGroupAccountResponse, error) + // VoteByProposalVoter queries a vote by proposal id and voter. + VoteByProposalVoter(context.Context, *QueryVoteByProposalVoterRequest) (*QueryVoteByProposalVoterResponse, error) + // VotesByProposal queries a vote by proposal. + VotesByProposal(context.Context, *QueryVotesByProposalRequest) (*QueryVotesByProposalResponse, error) + // VotesByVoter queries a vote by voter. + VotesByVoter(context.Context, *QueryVotesByVoterRequest) (*QueryVotesByVoterResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) GroupInfo(ctx context.Context, req *QueryGroupInfoRequest) (*QueryGroupInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupInfo not implemented") +} +func (*UnimplementedQueryServer) GroupAccountInfo(ctx context.Context, req *QueryGroupAccountInfoRequest) (*QueryGroupAccountInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupAccountInfo not implemented") +} +func (*UnimplementedQueryServer) GroupMembers(ctx context.Context, req *QueryGroupMembersRequest) (*QueryGroupMembersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupMembers not implemented") +} +func (*UnimplementedQueryServer) GroupsByAdmin(ctx context.Context, req *QueryGroupsByAdminRequest) (*QueryGroupsByAdminResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupsByAdmin not implemented") +} +func (*UnimplementedQueryServer) GroupAccountsByGroup(ctx context.Context, req *QueryGroupAccountsByGroupRequest) (*QueryGroupAccountsByGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupAccountsByGroup not implemented") +} +func (*UnimplementedQueryServer) GroupAccountsByAdmin(ctx context.Context, req *QueryGroupAccountsByAdminRequest) (*QueryGroupAccountsByAdminResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupAccountsByAdmin not implemented") +} +func (*UnimplementedQueryServer) Proposal(ctx context.Context, req *QueryProposalRequest) (*QueryProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Proposal not implemented") +} +func (*UnimplementedQueryServer) ProposalsByGroupAccount(ctx context.Context, req *QueryProposalsByGroupAccountRequest) (*QueryProposalsByGroupAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProposalsByGroupAccount not implemented") +} +func (*UnimplementedQueryServer) VoteByProposalVoter(ctx context.Context, req *QueryVoteByProposalVoterRequest) (*QueryVoteByProposalVoterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VoteByProposalVoter not implemented") +} +func (*UnimplementedQueryServer) VotesByProposal(ctx context.Context, req *QueryVotesByProposalRequest) (*QueryVotesByProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VotesByProposal not implemented") +} +func (*UnimplementedQueryServer) VotesByVoter(ctx context.Context, req *QueryVotesByVoterRequest) (*QueryVotesByVoterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VotesByVoter not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_GroupInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GroupInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Query/GroupInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GroupInfo(ctx, req.(*QueryGroupInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GroupAccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupAccountInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GroupAccountInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Query/GroupAccountInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GroupAccountInfo(ctx, req.(*QueryGroupAccountInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupMembersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GroupMembers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Query/GroupMembers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GroupMembers(ctx, req.(*QueryGroupMembersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GroupsByAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupsByAdminRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GroupsByAdmin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Query/GroupsByAdmin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GroupsByAdmin(ctx, req.(*QueryGroupsByAdminRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GroupAccountsByGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupAccountsByGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GroupAccountsByGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Query/GroupAccountsByGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GroupAccountsByGroup(ctx, req.(*QueryGroupAccountsByGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GroupAccountsByAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupAccountsByAdminRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GroupAccountsByAdmin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Query/GroupAccountsByAdmin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GroupAccountsByAdmin(ctx, req.(*QueryGroupAccountsByAdminRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Proposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Proposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Query/Proposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Proposal(ctx, req.(*QueryProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ProposalsByGroupAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProposalsByGroupAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ProposalsByGroupAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Query/ProposalsByGroupAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ProposalsByGroupAccount(ctx, req.(*QueryProposalsByGroupAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_VoteByProposalVoter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryVoteByProposalVoterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).VoteByProposalVoter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Query/VoteByProposalVoter", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).VoteByProposalVoter(ctx, req.(*QueryVoteByProposalVoterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_VotesByProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryVotesByProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).VotesByProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Query/VotesByProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).VotesByProposal(ctx, req.(*QueryVotesByProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_VotesByVoter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryVotesByVoterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).VotesByVoter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Query/VotesByVoter", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).VotesByVoter(ctx, req.(*QueryVotesByVoterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.group.v1beta1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GroupInfo", + Handler: _Query_GroupInfo_Handler, + }, + { + MethodName: "GroupAccountInfo", + Handler: _Query_GroupAccountInfo_Handler, + }, + { + MethodName: "GroupMembers", + Handler: _Query_GroupMembers_Handler, + }, + { + MethodName: "GroupsByAdmin", + Handler: _Query_GroupsByAdmin_Handler, + }, + { + MethodName: "GroupAccountsByGroup", + Handler: _Query_GroupAccountsByGroup_Handler, + }, + { + MethodName: "GroupAccountsByAdmin", + Handler: _Query_GroupAccountsByAdmin_Handler, + }, + { + MethodName: "Proposal", + Handler: _Query_Proposal_Handler, + }, + { + MethodName: "ProposalsByGroupAccount", + Handler: _Query_ProposalsByGroupAccount_Handler, + }, + { + MethodName: "VoteByProposalVoter", + Handler: _Query_VoteByProposalVoter_Handler, + }, + { + MethodName: "VotesByProposal", + Handler: _Query_VotesByProposal_Handler, + }, + { + MethodName: "VotesByVoter", + Handler: _Query_VotesByVoter_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/group/v1beta1/query.proto", +} + +func (m *QueryGroupInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGroupInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GroupId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryGroupInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGroupInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Info != nil { + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGroupAccountInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGroupAccountInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupAccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGroupAccountInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGroupAccountInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Info != nil { + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGroupMembersRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGroupMembersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupMembersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.GroupId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryGroupMembersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGroupMembersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupMembersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryGroupsByAdminRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGroupsByAdminRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupsByAdminRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGroupsByAdminResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGroupsByAdminResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupsByAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryGroupAccountsByGroupRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGroupAccountsByGroupRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupAccountsByGroupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.GroupId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryGroupAccountsByGroupResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGroupAccountsByGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupAccountsByGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.GroupAccounts) > 0 { + for iNdEx := len(m.GroupAccounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GroupAccounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryGroupAccountsByAdminRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGroupAccountsByAdminRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupAccountsByAdminRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGroupAccountsByAdminResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGroupAccountsByAdminResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupAccountsByAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.GroupAccounts) > 0 { + for iNdEx := len(m.GroupAccounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GroupAccounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryProposalRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryProposalRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProposalId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryProposalResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Proposal != nil { + { + size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryProposalsByGroupAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryProposalsByGroupAccountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposalsByGroupAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryProposalsByGroupAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryProposalsByGroupAccountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposalsByGroupAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Proposals) > 0 { + for iNdEx := len(m.Proposals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Proposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryVoteByProposalVoterRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryVoteByProposalVoterRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryVoteByProposalVoterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Voter) > 0 { + i -= len(m.Voter) + copy(dAtA[i:], m.Voter) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Voter))) + i-- + dAtA[i] = 0x12 + } + if m.ProposalId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryVoteByProposalVoterResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryVoteByProposalVoterResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryVoteByProposalVoterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Vote != nil { + { + size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryVotesByProposalRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryVotesByProposalRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryVotesByProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.ProposalId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryVotesByProposalResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryVotesByProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryVotesByProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Votes) > 0 { + for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryVotesByVoterRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryVotesByVoterRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryVotesByVoterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Voter) > 0 { + i -= len(m.Voter) + copy(dAtA[i:], m.Voter) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Voter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryVotesByVoterResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryVotesByVoterResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryVotesByVoterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Votes) > 0 { + for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryGroupInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GroupId != 0 { + n += 1 + sovQuery(uint64(m.GroupId)) + } + return n +} + +func (m *QueryGroupInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Info != nil { + l = m.Info.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGroupAccountInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGroupAccountInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Info != nil { + l = m.Info.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGroupMembersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GroupId != 0 { + n += 1 + sovQuery(uint64(m.GroupId)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGroupMembersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGroupsByAdminRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGroupsByAdminResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGroupAccountsByGroupRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GroupId != 0 { + n += 1 + sovQuery(uint64(m.GroupId)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGroupAccountsByGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.GroupAccounts) > 0 { + for _, e := range m.GroupAccounts { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGroupAccountsByAdminRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGroupAccountsByAdminResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.GroupAccounts) > 0 { + for _, e := range m.GroupAccounts { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryProposalRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovQuery(uint64(m.ProposalId)) + } + return n +} + +func (m *QueryProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Proposal != nil { + l = m.Proposal.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryProposalsByGroupAccountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryProposalsByGroupAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Proposals) > 0 { + for _, e := range m.Proposals { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryVoteByProposalVoterRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovQuery(uint64(m.ProposalId)) + } + l = len(m.Voter) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryVoteByProposalVoterResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Vote != nil { + l = m.Vote.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryVotesByProposalRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovQuery(uint64(m.ProposalId)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryVotesByProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Votes) > 0 { + for _, e := range m.Votes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryVotesByVoterRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Voter) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryVotesByVoterResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Votes) > 0 { + for _, e := range m.Votes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryGroupInfoRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGroupInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGroupInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGroupInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Info == nil { + m.Info = &GroupInfo{} + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGroupAccountInfoRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGroupAccountInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupAccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGroupAccountInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGroupAccountInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupAccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Info == nil { + m.Info = &GroupAccountInfo{} + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGroupMembersRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGroupMembersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupMembersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGroupMembersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGroupMembersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupMembersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, &GroupMember{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGroupsByAdminRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGroupsByAdminRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupsByAdminRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGroupsByAdminResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGroupsByAdminResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupsByAdminResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, &GroupInfo{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGroupAccountsByGroupRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGroupAccountsByGroupRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupAccountsByGroupRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGroupAccountsByGroupResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGroupAccountsByGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupAccountsByGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupAccounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupAccounts = append(m.GroupAccounts, &GroupAccountInfo{}) + if err := m.GroupAccounts[len(m.GroupAccounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGroupAccountsByAdminRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGroupAccountsByAdminRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupAccountsByAdminRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGroupAccountsByAdminResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGroupAccountsByAdminResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupAccountsByAdminResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupAccounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupAccounts = append(m.GroupAccounts, &GroupAccountInfo{}) + if err := m.GroupAccounts[len(m.GroupAccounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProposalRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryProposalRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposalRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProposalResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proposal == nil { + m.Proposal = &Proposal{} + } + if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProposalsByGroupAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryProposalsByGroupAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposalsByGroupAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProposalsByGroupAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryProposalsByGroupAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposalsByGroupAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proposals = append(m.Proposals, &Proposal{}) + if err := m.Proposals[len(m.Proposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryVoteByProposalVoterRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryVoteByProposalVoterRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryVoteByProposalVoterRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Voter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryVoteByProposalVoterResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryVoteByProposalVoterResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryVoteByProposalVoterResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Vote == nil { + m.Vote = &Vote{} + } + if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryVotesByProposalRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryVotesByProposalRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryVotesByProposalRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryVotesByProposalResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryVotesByProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryVotesByProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Votes = append(m.Votes, &Vote{}) + if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryVotesByVoterRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryVotesByVoterRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryVotesByVoterRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Voter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryVotesByVoterResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryVotesByVoterResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryVotesByVoterResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Votes = append(m.Votes, &Vote{}) + if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go new file mode 100644 index 0000000000..c9e2c59087 --- /dev/null +++ b/x/group/tx.pb.go @@ -0,0 +1,5239 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/group/v1beta1/tx.proto + +package group + +import ( + context "context" + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Exec defines modes of execution of a proposal on creation or on new vote. +type Exec int32 + +const ( + // An empty value means that there should be a separate + // MsgExec request for the proposal to execute. + Exec_EXEC_UNSPECIFIED Exec = 0 + // Try to execute the proposal immediately. + // If the proposal is not allowed per the DecisionPolicy, + // the proposal will still be open and could + // be executed at a later point. + Exec_EXEC_TRY Exec = 1 +) + +var Exec_name = map[int32]string{ + 0: "EXEC_UNSPECIFIED", + 1: "EXEC_TRY", +} + +var Exec_value = map[string]int32{ + "EXEC_UNSPECIFIED": 0, + "EXEC_TRY": 1, +} + +func (x Exec) String() string { + return proto.EnumName(Exec_name, int32(x)) +} + +func (Exec) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{0} +} + +// MsgCreateGroupRequest is the Msg/CreateGroup request type. +type MsgCreateGroupRequest struct { + // admin is the account address of the group admin. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // members defines the group members. + Members []Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` + // metadata is any arbitrary metadata to attached to the group. + Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (m *MsgCreateGroupRequest) Reset() { *m = MsgCreateGroupRequest{} } +func (m *MsgCreateGroupRequest) String() string { return proto.CompactTextString(m) } +func (*MsgCreateGroupRequest) ProtoMessage() {} +func (*MsgCreateGroupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{0} +} +func (m *MsgCreateGroupRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateGroupRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateGroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateGroupRequest.Merge(m, src) +} +func (m *MsgCreateGroupRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateGroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateGroupRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateGroupRequest proto.InternalMessageInfo + +func (m *MsgCreateGroupRequest) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *MsgCreateGroupRequest) GetMembers() []Member { + if m != nil { + return m.Members + } + return nil +} + +func (m *MsgCreateGroupRequest) GetMetadata() []byte { + if m != nil { + return m.Metadata + } + return nil +} + +// MsgCreateGroupResponse is the Msg/CreateGroup response type. +type MsgCreateGroupResponse struct { + // group_id is the unique ID of the newly created group. + GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` +} + +func (m *MsgCreateGroupResponse) Reset() { *m = MsgCreateGroupResponse{} } +func (m *MsgCreateGroupResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateGroupResponse) ProtoMessage() {} +func (*MsgCreateGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{1} +} +func (m *MsgCreateGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateGroupResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateGroupResponse.Merge(m, src) +} +func (m *MsgCreateGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateGroupResponse proto.InternalMessageInfo + +func (m *MsgCreateGroupResponse) GetGroupId() uint64 { + if m != nil { + return m.GroupId + } + return 0 +} + +// MsgUpdateGroupMembersRequest is the Msg/UpdateGroupMembers request type. +type MsgUpdateGroupMembersRequest struct { + // admin is the account address of the group admin. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // group_id is the unique ID of the group. + GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // member_updates is the list of members to update, + // set weight to 0 to remove a member. + MemberUpdates []Member `protobuf:"bytes,3,rep,name=member_updates,json=memberUpdates,proto3" json:"member_updates"` +} + +func (m *MsgUpdateGroupMembersRequest) Reset() { *m = MsgUpdateGroupMembersRequest{} } +func (m *MsgUpdateGroupMembersRequest) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupMembersRequest) ProtoMessage() {} +func (*MsgUpdateGroupMembersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{2} +} +func (m *MsgUpdateGroupMembersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupMembersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupMembersRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateGroupMembersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupMembersRequest.Merge(m, src) +} +func (m *MsgUpdateGroupMembersRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupMembersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupMembersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupMembersRequest proto.InternalMessageInfo + +func (m *MsgUpdateGroupMembersRequest) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *MsgUpdateGroupMembersRequest) GetGroupId() uint64 { + if m != nil { + return m.GroupId + } + return 0 +} + +func (m *MsgUpdateGroupMembersRequest) GetMemberUpdates() []Member { + if m != nil { + return m.MemberUpdates + } + return nil +} + +// MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. +type MsgUpdateGroupMembersResponse struct { +} + +func (m *MsgUpdateGroupMembersResponse) Reset() { *m = MsgUpdateGroupMembersResponse{} } +func (m *MsgUpdateGroupMembersResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupMembersResponse) ProtoMessage() {} +func (*MsgUpdateGroupMembersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{3} +} +func (m *MsgUpdateGroupMembersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupMembersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupMembersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateGroupMembersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupMembersResponse.Merge(m, src) +} +func (m *MsgUpdateGroupMembersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupMembersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupMembersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupMembersResponse proto.InternalMessageInfo + +// MsgUpdateGroupAdminRequest is the Msg/UpdateGroupAdmin request type. +type MsgUpdateGroupAdminRequest struct { + // admin is the current account address of the group admin. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // group_id is the unique ID of the group. + GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // new_admin is the group new admin account address. + NewAdmin string `protobuf:"bytes,3,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty"` +} + +func (m *MsgUpdateGroupAdminRequest) Reset() { *m = MsgUpdateGroupAdminRequest{} } +func (m *MsgUpdateGroupAdminRequest) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupAdminRequest) ProtoMessage() {} +func (*MsgUpdateGroupAdminRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{4} +} +func (m *MsgUpdateGroupAdminRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupAdminRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupAdminRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateGroupAdminRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAdminRequest.Merge(m, src) +} +func (m *MsgUpdateGroupAdminRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupAdminRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAdminRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupAdminRequest proto.InternalMessageInfo + +func (m *MsgUpdateGroupAdminRequest) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *MsgUpdateGroupAdminRequest) GetGroupId() uint64 { + if m != nil { + return m.GroupId + } + return 0 +} + +func (m *MsgUpdateGroupAdminRequest) GetNewAdmin() string { + if m != nil { + return m.NewAdmin + } + return "" +} + +// MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. +type MsgUpdateGroupAdminResponse struct { +} + +func (m *MsgUpdateGroupAdminResponse) Reset() { *m = MsgUpdateGroupAdminResponse{} } +func (m *MsgUpdateGroupAdminResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupAdminResponse) ProtoMessage() {} +func (*MsgUpdateGroupAdminResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{5} +} +func (m *MsgUpdateGroupAdminResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupAdminResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateGroupAdminResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAdminResponse.Merge(m, src) +} +func (m *MsgUpdateGroupAdminResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupAdminResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAdminResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupAdminResponse proto.InternalMessageInfo + +// MsgUpdateGroupMetadataRequest is the Msg/UpdateGroupMetadata request type. +type MsgUpdateGroupMetadataRequest struct { + // admin is the account address of the group admin. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // group_id is the unique ID of the group. + GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // metadata is the updated group's metadata. + Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (m *MsgUpdateGroupMetadataRequest) Reset() { *m = MsgUpdateGroupMetadataRequest{} } +func (m *MsgUpdateGroupMetadataRequest) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupMetadataRequest) ProtoMessage() {} +func (*MsgUpdateGroupMetadataRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{6} +} +func (m *MsgUpdateGroupMetadataRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupMetadataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupMetadataRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateGroupMetadataRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupMetadataRequest.Merge(m, src) +} +func (m *MsgUpdateGroupMetadataRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupMetadataRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupMetadataRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupMetadataRequest proto.InternalMessageInfo + +func (m *MsgUpdateGroupMetadataRequest) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *MsgUpdateGroupMetadataRequest) GetGroupId() uint64 { + if m != nil { + return m.GroupId + } + return 0 +} + +func (m *MsgUpdateGroupMetadataRequest) GetMetadata() []byte { + if m != nil { + return m.Metadata + } + return nil +} + +// MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. +type MsgUpdateGroupMetadataResponse struct { +} + +func (m *MsgUpdateGroupMetadataResponse) Reset() { *m = MsgUpdateGroupMetadataResponse{} } +func (m *MsgUpdateGroupMetadataResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupMetadataResponse) ProtoMessage() {} +func (*MsgUpdateGroupMetadataResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{7} +} +func (m *MsgUpdateGroupMetadataResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupMetadataResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateGroupMetadataResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupMetadataResponse.Merge(m, src) +} +func (m *MsgUpdateGroupMetadataResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupMetadataResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupMetadataResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupMetadataResponse proto.InternalMessageInfo + +// MsgCreateGroupAccountRequest is the Msg/CreateGroupAccount request type. +type MsgCreateGroupAccountRequest struct { + // admin is the account address of the group admin. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // group_id is the unique ID of the group. + GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // metadata is any arbitrary metadata to attached to the group account. + Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + // decision_policy specifies the group account's decision policy. + DecisionPolicy *types.Any `protobuf:"bytes,4,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` +} + +func (m *MsgCreateGroupAccountRequest) Reset() { *m = MsgCreateGroupAccountRequest{} } +func (m *MsgCreateGroupAccountRequest) String() string { return proto.CompactTextString(m) } +func (*MsgCreateGroupAccountRequest) ProtoMessage() {} +func (*MsgCreateGroupAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{8} +} +func (m *MsgCreateGroupAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateGroupAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateGroupAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateGroupAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateGroupAccountRequest.Merge(m, src) +} +func (m *MsgCreateGroupAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateGroupAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateGroupAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateGroupAccountRequest proto.InternalMessageInfo + +// MsgCreateGroupAccountResponse is the Msg/CreateGroupAccount response type. +type MsgCreateGroupAccountResponse struct { + // address is the account address of the newly created group account. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *MsgCreateGroupAccountResponse) Reset() { *m = MsgCreateGroupAccountResponse{} } +func (m *MsgCreateGroupAccountResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateGroupAccountResponse) ProtoMessage() {} +func (*MsgCreateGroupAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{9} +} +func (m *MsgCreateGroupAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateGroupAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateGroupAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateGroupAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateGroupAccountResponse.Merge(m, src) +} +func (m *MsgCreateGroupAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateGroupAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateGroupAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateGroupAccountResponse proto.InternalMessageInfo + +func (m *MsgCreateGroupAccountResponse) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +// MsgUpdateGroupAccountAdminRequest is the Msg/UpdateGroupAccountAdmin request type. +type MsgUpdateGroupAccountAdminRequest struct { + // admin is the account address of the group admin. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // address is the group account address. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // new_admin is the new group account admin. + NewAdmin string `protobuf:"bytes,3,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty"` +} + +func (m *MsgUpdateGroupAccountAdminRequest) Reset() { *m = MsgUpdateGroupAccountAdminRequest{} } +func (m *MsgUpdateGroupAccountAdminRequest) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupAccountAdminRequest) ProtoMessage() {} +func (*MsgUpdateGroupAccountAdminRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{10} +} +func (m *MsgUpdateGroupAccountAdminRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupAccountAdminRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupAccountAdminRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateGroupAccountAdminRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAccountAdminRequest.Merge(m, src) +} +func (m *MsgUpdateGroupAccountAdminRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupAccountAdminRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAccountAdminRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupAccountAdminRequest proto.InternalMessageInfo + +func (m *MsgUpdateGroupAccountAdminRequest) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *MsgUpdateGroupAccountAdminRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *MsgUpdateGroupAccountAdminRequest) GetNewAdmin() string { + if m != nil { + return m.NewAdmin + } + return "" +} + +// MsgUpdateGroupAccountAdminResponse is the Msg/UpdateGroupAccountAdmin response type. +type MsgUpdateGroupAccountAdminResponse struct { +} + +func (m *MsgUpdateGroupAccountAdminResponse) Reset() { *m = MsgUpdateGroupAccountAdminResponse{} } +func (m *MsgUpdateGroupAccountAdminResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupAccountAdminResponse) ProtoMessage() {} +func (*MsgUpdateGroupAccountAdminResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{11} +} +func (m *MsgUpdateGroupAccountAdminResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupAccountAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupAccountAdminResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateGroupAccountAdminResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAccountAdminResponse.Merge(m, src) +} +func (m *MsgUpdateGroupAccountAdminResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupAccountAdminResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAccountAdminResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupAccountAdminResponse proto.InternalMessageInfo + +// MsgUpdateGroupAccountDecisionPolicyRequest is the Msg/UpdateGroupAccountDecisionPolicy request type. +type MsgUpdateGroupAccountDecisionPolicyRequest struct { + // admin is the account address of the group admin. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // address is the group account address. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // decision_policy is the updated group account decision policy. + DecisionPolicy *types.Any `protobuf:"bytes,3,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` +} + +func (m *MsgUpdateGroupAccountDecisionPolicyRequest) Reset() { + *m = MsgUpdateGroupAccountDecisionPolicyRequest{} +} +func (m *MsgUpdateGroupAccountDecisionPolicyRequest) String() string { + return proto.CompactTextString(m) +} +func (*MsgUpdateGroupAccountDecisionPolicyRequest) ProtoMessage() {} +func (*MsgUpdateGroupAccountDecisionPolicyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{12} +} +func (m *MsgUpdateGroupAccountDecisionPolicyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupAccountDecisionPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateGroupAccountDecisionPolicyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyRequest.Merge(m, src) +} +func (m *MsgUpdateGroupAccountDecisionPolicyRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupAccountDecisionPolicyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyRequest proto.InternalMessageInfo + +// MsgUpdateGroupAccountDecisionPolicyResponse is the Msg/UpdateGroupAccountDecisionPolicy response type. +type MsgUpdateGroupAccountDecisionPolicyResponse struct { +} + +func (m *MsgUpdateGroupAccountDecisionPolicyResponse) Reset() { + *m = MsgUpdateGroupAccountDecisionPolicyResponse{} +} +func (m *MsgUpdateGroupAccountDecisionPolicyResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgUpdateGroupAccountDecisionPolicyResponse) ProtoMessage() {} +func (*MsgUpdateGroupAccountDecisionPolicyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{13} +} +func (m *MsgUpdateGroupAccountDecisionPolicyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupAccountDecisionPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateGroupAccountDecisionPolicyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyResponse.Merge(m, src) +} +func (m *MsgUpdateGroupAccountDecisionPolicyResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupAccountDecisionPolicyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyResponse proto.InternalMessageInfo + +// MsgUpdateGroupAccountMetadataRequest is the Msg/UpdateGroupAccountMetadata request type. +type MsgUpdateGroupAccountMetadataRequest struct { + // admin is the account address of the group admin. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // address is the group account address. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // metadata is the updated group account metadata. + Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (m *MsgUpdateGroupAccountMetadataRequest) Reset() { *m = MsgUpdateGroupAccountMetadataRequest{} } +func (m *MsgUpdateGroupAccountMetadataRequest) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupAccountMetadataRequest) ProtoMessage() {} +func (*MsgUpdateGroupAccountMetadataRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{14} +} +func (m *MsgUpdateGroupAccountMetadataRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupAccountMetadataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupAccountMetadataRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateGroupAccountMetadataRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAccountMetadataRequest.Merge(m, src) +} +func (m *MsgUpdateGroupAccountMetadataRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupAccountMetadataRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAccountMetadataRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupAccountMetadataRequest proto.InternalMessageInfo + +func (m *MsgUpdateGroupAccountMetadataRequest) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *MsgUpdateGroupAccountMetadataRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *MsgUpdateGroupAccountMetadataRequest) GetMetadata() []byte { + if m != nil { + return m.Metadata + } + return nil +} + +// MsgUpdateGroupAccountMetadataResponse is the Msg/UpdateGroupAccountMetadata response type. +type MsgUpdateGroupAccountMetadataResponse struct { +} + +func (m *MsgUpdateGroupAccountMetadataResponse) Reset() { *m = MsgUpdateGroupAccountMetadataResponse{} } +func (m *MsgUpdateGroupAccountMetadataResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupAccountMetadataResponse) ProtoMessage() {} +func (*MsgUpdateGroupAccountMetadataResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{15} +} +func (m *MsgUpdateGroupAccountMetadataResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupAccountMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupAccountMetadataResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateGroupAccountMetadataResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAccountMetadataResponse.Merge(m, src) +} +func (m *MsgUpdateGroupAccountMetadataResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupAccountMetadataResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAccountMetadataResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupAccountMetadataResponse proto.InternalMessageInfo + +// MsgCreateProposalRequest is the Msg/CreateProposal request type. +type MsgCreateProposalRequest struct { + // address is the group account address. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // proposers are the account addresses of the proposers. + // Proposers signatures will be counted as yes votes. + Proposers []string `protobuf:"bytes,2,rep,name=proposers,proto3" json:"proposers,omitempty"` + // metadata is any arbitrary metadata to attached to the proposal. + Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + // msgs is a list of Msgs that will be executed if the proposal passes. + Msgs []*types.Any `protobuf:"bytes,4,rep,name=msgs,proto3" json:"msgs,omitempty"` + // exec defines the mode of execution of the proposal, + // whether it should be executed immediately on creation or not. + // If so, proposers signatures are considered as Yes votes. + Exec Exec `protobuf:"varint,5,opt,name=exec,proto3,enum=cosmos.group.v1beta1.Exec" json:"exec,omitempty"` +} + +func (m *MsgCreateProposalRequest) Reset() { *m = MsgCreateProposalRequest{} } +func (m *MsgCreateProposalRequest) String() string { return proto.CompactTextString(m) } +func (*MsgCreateProposalRequest) ProtoMessage() {} +func (*MsgCreateProposalRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{16} +} +func (m *MsgCreateProposalRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateProposalRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateProposalRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateProposalRequest.Merge(m, src) +} +func (m *MsgCreateProposalRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateProposalRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateProposalRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateProposalRequest proto.InternalMessageInfo + +// MsgCreateProposalResponse is the Msg/CreateProposal response type. +type MsgCreateProposalResponse struct { + // proposal is the unique ID of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` +} + +func (m *MsgCreateProposalResponse) Reset() { *m = MsgCreateProposalResponse{} } +func (m *MsgCreateProposalResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateProposalResponse) ProtoMessage() {} +func (*MsgCreateProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{17} +} +func (m *MsgCreateProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateProposalResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateProposalResponse.Merge(m, src) +} +func (m *MsgCreateProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateProposalResponse proto.InternalMessageInfo + +func (m *MsgCreateProposalResponse) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +// MsgVoteRequest is the Msg/Vote request type. +type MsgVoteRequest struct { + // proposal is the unique ID of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // voter is the voter account address. + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` + // choice is the voter's choice on the proposal. + Choice Choice `protobuf:"varint,3,opt,name=choice,proto3,enum=cosmos.group.v1beta1.Choice" json:"choice,omitempty"` + // metadata is any arbitrary metadata to attached to the vote. + Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + // exec defines whether the proposal should be executed + // immediately after voting or not. + Exec Exec `protobuf:"varint,5,opt,name=exec,proto3,enum=cosmos.group.v1beta1.Exec" json:"exec,omitempty"` +} + +func (m *MsgVoteRequest) Reset() { *m = MsgVoteRequest{} } +func (m *MsgVoteRequest) String() string { return proto.CompactTextString(m) } +func (*MsgVoteRequest) ProtoMessage() {} +func (*MsgVoteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{18} +} +func (m *MsgVoteRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgVoteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteRequest.Merge(m, src) +} +func (m *MsgVoteRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteRequest proto.InternalMessageInfo + +func (m *MsgVoteRequest) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +func (m *MsgVoteRequest) GetVoter() string { + if m != nil { + return m.Voter + } + return "" +} + +func (m *MsgVoteRequest) GetChoice() Choice { + if m != nil { + return m.Choice + } + return Choice_CHOICE_UNSPECIFIED +} + +func (m *MsgVoteRequest) GetMetadata() []byte { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *MsgVoteRequest) GetExec() Exec { + if m != nil { + return m.Exec + } + return Exec_EXEC_UNSPECIFIED +} + +// MsgVoteResponse is the Msg/Vote response type. +type MsgVoteResponse struct { +} + +func (m *MsgVoteResponse) Reset() { *m = MsgVoteResponse{} } +func (m *MsgVoteResponse) String() string { return proto.CompactTextString(m) } +func (*MsgVoteResponse) ProtoMessage() {} +func (*MsgVoteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{19} +} +func (m *MsgVoteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgVoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteResponse.Merge(m, src) +} +func (m *MsgVoteResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteResponse proto.InternalMessageInfo + +// MsgExecRequest is the Msg/Exec request type. +type MsgExecRequest struct { + // proposal is the unique ID of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // signer is the account address used to execute the proposal. + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (m *MsgExecRequest) Reset() { *m = MsgExecRequest{} } +func (m *MsgExecRequest) String() string { return proto.CompactTextString(m) } +func (*MsgExecRequest) ProtoMessage() {} +func (*MsgExecRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{20} +} +func (m *MsgExecRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExecRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExecRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgExecRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecRequest.Merge(m, src) +} +func (m *MsgExecRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgExecRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExecRequest proto.InternalMessageInfo + +func (m *MsgExecRequest) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +func (m *MsgExecRequest) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +// MsgExecResponse is the Msg/Exec request type. +type MsgExecResponse struct { +} + +func (m *MsgExecResponse) Reset() { *m = MsgExecResponse{} } +func (m *MsgExecResponse) String() string { return proto.CompactTextString(m) } +func (*MsgExecResponse) ProtoMessage() {} +func (*MsgExecResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_da0de9d603d844fb, []int{21} +} +func (m *MsgExecResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExecResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgExecResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecResponse.Merge(m, src) +} +func (m *MsgExecResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgExecResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExecResponse proto.InternalMessageInfo + +func init() { + proto.RegisterEnum("cosmos.group.v1beta1.Exec", Exec_name, Exec_value) + proto.RegisterType((*MsgCreateGroupRequest)(nil), "cosmos.group.v1beta1.MsgCreateGroupRequest") + proto.RegisterType((*MsgCreateGroupResponse)(nil), "cosmos.group.v1beta1.MsgCreateGroupResponse") + proto.RegisterType((*MsgUpdateGroupMembersRequest)(nil), "cosmos.group.v1beta1.MsgUpdateGroupMembersRequest") + proto.RegisterType((*MsgUpdateGroupMembersResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupMembersResponse") + proto.RegisterType((*MsgUpdateGroupAdminRequest)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAdminRequest") + proto.RegisterType((*MsgUpdateGroupAdminResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAdminResponse") + proto.RegisterType((*MsgUpdateGroupMetadataRequest)(nil), "cosmos.group.v1beta1.MsgUpdateGroupMetadataRequest") + proto.RegisterType((*MsgUpdateGroupMetadataResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse") + proto.RegisterType((*MsgCreateGroupAccountRequest)(nil), "cosmos.group.v1beta1.MsgCreateGroupAccountRequest") + proto.RegisterType((*MsgCreateGroupAccountResponse)(nil), "cosmos.group.v1beta1.MsgCreateGroupAccountResponse") + proto.RegisterType((*MsgUpdateGroupAccountAdminRequest)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAccountAdminRequest") + proto.RegisterType((*MsgUpdateGroupAccountAdminResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAccountAdminResponse") + proto.RegisterType((*MsgUpdateGroupAccountDecisionPolicyRequest)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAccountDecisionPolicyRequest") + proto.RegisterType((*MsgUpdateGroupAccountDecisionPolicyResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAccountDecisionPolicyResponse") + proto.RegisterType((*MsgUpdateGroupAccountMetadataRequest)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAccountMetadataRequest") + proto.RegisterType((*MsgUpdateGroupAccountMetadataResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAccountMetadataResponse") + proto.RegisterType((*MsgCreateProposalRequest)(nil), "cosmos.group.v1beta1.MsgCreateProposalRequest") + proto.RegisterType((*MsgCreateProposalResponse)(nil), "cosmos.group.v1beta1.MsgCreateProposalResponse") + proto.RegisterType((*MsgVoteRequest)(nil), "cosmos.group.v1beta1.MsgVoteRequest") + proto.RegisterType((*MsgVoteResponse)(nil), "cosmos.group.v1beta1.MsgVoteResponse") + proto.RegisterType((*MsgExecRequest)(nil), "cosmos.group.v1beta1.MsgExecRequest") + proto.RegisterType((*MsgExecResponse)(nil), "cosmos.group.v1beta1.MsgExecResponse") +} + +func init() { proto.RegisterFile("cosmos/group/v1beta1/tx.proto", fileDescriptor_da0de9d603d844fb) } + +var fileDescriptor_da0de9d603d844fb = []byte{ + // 990 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x73, 0xdb, 0x44, + 0x14, 0xf7, 0xc6, 0x6a, 0xfe, 0xbc, 0x14, 0x37, 0x2c, 0xa6, 0x28, 0x6a, 0xe2, 0x18, 0x4d, 0x3a, + 0x78, 0x52, 0x22, 0x13, 0xa7, 0x33, 0x40, 0xe9, 0x30, 0x24, 0xa9, 0x61, 0x7c, 0x30, 0x13, 0x54, + 0xca, 0x00, 0x17, 0x8f, 0x2c, 0x2d, 0x8a, 0x21, 0xd6, 0xaa, 0x5e, 0xb9, 0x49, 0x0e, 0xcc, 0x70, + 0x83, 0x03, 0x07, 0x2e, 0x5c, 0x38, 0x71, 0xe3, 0x0b, 0xc0, 0x37, 0xe0, 0x50, 0x38, 0x30, 0xb9, + 0xc1, 0x89, 0x61, 0x92, 0x2f, 0xc2, 0x78, 0x77, 0x95, 0xc8, 0x8e, 0x24, 0xcb, 0x86, 0x9e, 0x92, + 0xdd, 0xfd, 0xbd, 0xdf, 0xfb, 0xbd, 0xf7, 0x76, 0xdf, 0xb3, 0x60, 0xd5, 0xa6, 0xac, 0x4b, 0x59, + 0xd5, 0xed, 0xd1, 0xbe, 0x5f, 0x7d, 0xb2, 0xd5, 0x26, 0x81, 0xb5, 0x55, 0x0d, 0x8e, 0x0d, 0xbf, + 0x47, 0x03, 0x8a, 0x8b, 0xe2, 0xd8, 0xe0, 0xc7, 0x86, 0x3c, 0xd6, 0x8a, 0x2e, 0x75, 0x29, 0x07, + 0x54, 0x07, 0xff, 0x09, 0xac, 0xb6, 0x2c, 0xb0, 0x2d, 0x71, 0x20, 0x0d, 0xe5, 0x91, 0x4b, 0xa9, + 0x7b, 0x48, 0xaa, 0x7c, 0xd5, 0xee, 0x7f, 0x56, 0xb5, 0xbc, 0x13, 0x79, 0x54, 0x8e, 0x17, 0x70, + 0xe2, 0x13, 0x69, 0xac, 0x7f, 0x8d, 0xe0, 0xc5, 0x26, 0x73, 0xf7, 0x7a, 0xc4, 0x0a, 0xc8, 0x7b, + 0x03, 0x98, 0x49, 0x1e, 0xf7, 0x09, 0x0b, 0x70, 0x11, 0xae, 0x59, 0x4e, 0xb7, 0xe3, 0xa9, 0xa8, + 0x8c, 0x2a, 0x0b, 0xa6, 0x58, 0xe0, 0xfb, 0x30, 0xd7, 0x25, 0xdd, 0x36, 0xe9, 0x31, 0x75, 0xa6, + 0x9c, 0xaf, 0x2c, 0xd6, 0x56, 0x8c, 0xb8, 0x28, 0x8c, 0x26, 0x07, 0xed, 0x2a, 0x4f, 0xff, 0x5e, + 0xcb, 0x99, 0xa1, 0x09, 0xd6, 0x60, 0xbe, 0x4b, 0x02, 0xcb, 0xb1, 0x02, 0x4b, 0xcd, 0x97, 0x51, + 0xe5, 0xba, 0x79, 0xb1, 0xd6, 0xb7, 0xe1, 0xe6, 0xa8, 0x10, 0xe6, 0x53, 0x8f, 0x11, 0xbc, 0x0c, + 0xf3, 0x9c, 0xbc, 0xd5, 0x71, 0xb8, 0x18, 0xc5, 0x9c, 0xe3, 0xeb, 0x86, 0xa3, 0xff, 0x80, 0x60, + 0xa5, 0xc9, 0xdc, 0x47, 0xbe, 0x13, 0x5a, 0x09, 0xc7, 0x2c, 0x3d, 0x8a, 0x28, 0xe3, 0xcc, 0x10, + 0x23, 0x6e, 0x40, 0x41, 0xa8, 0x6d, 0xf5, 0x39, 0x29, 0x53, 0xf3, 0x99, 0xe3, 0x7c, 0x4e, 0x58, + 0x0a, 0x35, 0x4c, 0x5f, 0x83, 0xd5, 0x04, 0x6d, 0x22, 0x30, 0xfd, 0x73, 0xd0, 0x86, 0x01, 0x3b, + 0x03, 0x75, 0x53, 0x4b, 0xbf, 0x05, 0x0b, 0x1e, 0x39, 0x6a, 0x09, 0xa3, 0x3c, 0x37, 0x9a, 0xf7, + 0xc8, 0x11, 0x27, 0xd5, 0x57, 0xe1, 0x56, 0xac, 0x2f, 0x29, 0xe5, 0xf0, 0xaa, 0x56, 0x51, 0x97, + 0xa9, 0xd5, 0xa4, 0xd5, 0xba, 0x0c, 0xa5, 0x24, 0x6f, 0x52, 0xcf, 0xaf, 0xa2, 0xb0, 0x91, 0xeb, + 0xb0, 0x63, 0xdb, 0xb4, 0xef, 0x05, 0xcf, 0x42, 0x0f, 0xfe, 0x00, 0x6e, 0x38, 0xc4, 0xee, 0xb0, + 0x0e, 0xf5, 0x5a, 0x3e, 0x3d, 0xec, 0xd8, 0x27, 0xaa, 0x52, 0x46, 0x95, 0xc5, 0x5a, 0xd1, 0x10, + 0x8f, 0xcb, 0x08, 0x1f, 0x97, 0xb1, 0xe3, 0x9d, 0xec, 0xe2, 0xdf, 0x7f, 0xde, 0x2c, 0x3c, 0x90, + 0x06, 0xfb, 0x1c, 0x6f, 0x16, 0x9c, 0xa1, 0xf5, 0x3d, 0xe5, 0x9b, 0x1f, 0xd7, 0x72, 0xfa, 0x9b, + 0x3c, 0xad, 0x71, 0x51, 0xc8, 0xbb, 0xad, 0xc2, 0x9c, 0xe5, 0x38, 0x3d, 0xc2, 0x98, 0x0c, 0x24, + 0x5c, 0xea, 0x3e, 0xbc, 0x3c, 0x52, 0x30, 0x61, 0x9a, 0xe1, 0x8e, 0x44, 0x48, 0x67, 0x86, 0x48, + 0xd3, 0xaf, 0xc8, 0x3a, 0xe8, 0x69, 0x1e, 0x65, 0x65, 0x7e, 0x41, 0xb0, 0x11, 0x0b, 0x1b, 0x49, + 0xc8, 0x94, 0x0a, 0x63, 0x4a, 0x91, 0xff, 0x5f, 0x4a, 0xb1, 0x09, 0x77, 0x32, 0xc9, 0x96, 0x61, + 0xf6, 0x60, 0x3d, 0x16, 0x9e, 0xed, 0x5d, 0x24, 0xc7, 0x97, 0xf6, 0x2c, 0x5e, 0x81, 0xdb, 0x63, + 0x7c, 0x4a, 0x71, 0x7f, 0x20, 0x50, 0x2f, 0xee, 0xd5, 0x7e, 0x8f, 0xfa, 0x94, 0x59, 0x87, 0xa1, + 0xa2, 0xc4, 0x2b, 0x85, 0x57, 0x60, 0xc1, 0xe7, 0xe0, 0xb0, 0x7d, 0x2f, 0x98, 0x97, 0x1b, 0xa9, + 0x0f, 0xa4, 0x02, 0x4a, 0x97, 0xb9, 0x4c, 0x55, 0x78, 0x2f, 0x8c, 0x2d, 0x85, 0xc9, 0x11, 0xd8, + 0x00, 0x85, 0x1c, 0x13, 0x5b, 0xbd, 0x56, 0x46, 0x95, 0x42, 0x4d, 0x8b, 0xef, 0x9a, 0xf5, 0x63, + 0x62, 0x9b, 0x1c, 0x27, 0x8b, 0x73, 0x1f, 0x96, 0x63, 0xe2, 0x91, 0x6f, 0x64, 0x0d, 0x16, 0x7d, + 0xb9, 0x77, 0x39, 0x02, 0x20, 0xdc, 0x6a, 0x38, 0xfa, 0x6f, 0x08, 0x0a, 0x4d, 0xe6, 0x7e, 0x44, + 0x03, 0x12, 0x26, 0x61, 0x9c, 0xcd, 0xa0, 0x6e, 0x4f, 0x68, 0x40, 0x7a, 0xb2, 0x3e, 0x62, 0x81, + 0xef, 0xc2, 0xac, 0x7d, 0x40, 0x3b, 0x36, 0xe1, 0x19, 0x28, 0x24, 0x75, 0xfd, 0x3d, 0x8e, 0x31, + 0x25, 0x76, 0x28, 0x73, 0xca, 0x48, 0xe6, 0x26, 0xcc, 0x87, 0xfe, 0x3c, 0xdc, 0xb8, 0x08, 0x45, + 0x56, 0xbb, 0xc1, 0xa3, 0xe3, 0x98, 0xac, 0xd1, 0xdd, 0x84, 0x59, 0xd6, 0x71, 0xbd, 0x8b, 0xf0, + 0xe4, 0x4a, 0xb2, 0x0b, 0x2a, 0xc1, 0xbe, 0xb1, 0x01, 0xca, 0x60, 0x8d, 0x8b, 0xb0, 0x54, 0xff, + 0xb8, 0xbe, 0xd7, 0x7a, 0xf4, 0xfe, 0xc3, 0xfd, 0xfa, 0x5e, 0xe3, 0xdd, 0x46, 0xfd, 0xc1, 0x52, + 0x0e, 0x5f, 0x87, 0x79, 0xbe, 0xfb, 0xa1, 0xf9, 0xc9, 0x12, 0xaa, 0xfd, 0x09, 0x90, 0x6f, 0x32, + 0x17, 0x1f, 0xc0, 0x62, 0xa4, 0xa7, 0xe1, 0x3b, 0x09, 0xb3, 0x31, 0xee, 0x77, 0x85, 0xf6, 0x6a, + 0x36, 0xb0, 0xac, 0xfd, 0x97, 0x80, 0xaf, 0x0e, 0x50, 0x5c, 0x4b, 0xe4, 0x48, 0xfc, 0x25, 0xa0, + 0x6d, 0x4f, 0x64, 0x23, 0xdd, 0x1f, 0xc1, 0xd2, 0xe8, 0xc8, 0xc4, 0xaf, 0x65, 0x21, 0x8a, 0x76, + 0x69, 0x6d, 0x6b, 0x02, 0x0b, 0xe9, 0xf8, 0x2b, 0x04, 0x2f, 0xc4, 0xcc, 0x47, 0x9c, 0x31, 0x8a, + 0xa1, 0x1e, 0xa5, 0xdd, 0x9d, 0xcc, 0xe8, 0x32, 0xf5, 0x57, 0x07, 0x57, 0x4a, 0xea, 0x13, 0x67, + 0x75, 0x4a, 0xea, 0x53, 0x26, 0xe3, 0xb7, 0x08, 0x5e, 0x4a, 0x98, 0x45, 0xf8, 0xf5, 0x4c, 0x09, + 0xbd, 0x3a, 0x2f, 0xb5, 0x37, 0x26, 0x37, 0x94, 0x72, 0x7e, 0x42, 0x50, 0x1e, 0x37, 0x3c, 0xf0, + 0x3b, 0x13, 0xd0, 0xc7, 0x8e, 0x4b, 0x6d, 0xe7, 0x3f, 0x30, 0x48, 0xa5, 0xdf, 0x23, 0xd0, 0x92, + 0x67, 0x08, 0xbe, 0x37, 0x81, 0x87, 0xd1, 0x8b, 0xf4, 0xd6, 0x54, 0xb6, 0x52, 0xd7, 0x63, 0x28, + 0x0c, 0x37, 0x78, 0x6c, 0x8c, 0xb9, 0x17, 0x23, 0x93, 0x4d, 0xab, 0x66, 0xc6, 0x4b, 0x97, 0x0f, + 0x41, 0x19, 0x74, 0x52, 0xbc, 0x9e, 0x68, 0x18, 0x99, 0x19, 0xda, 0xed, 0x31, 0xa8, 0x4b, 0x52, + 0xde, 0x30, 0x93, 0x49, 0x23, 0xad, 0x3a, 0x85, 0x34, 0xda, 0x85, 0x77, 0xdf, 0x7e, 0x7a, 0x56, + 0x42, 0xa7, 0x67, 0x25, 0xf4, 0xcf, 0x59, 0x09, 0x7d, 0x77, 0x5e, 0xca, 0x9d, 0x9e, 0x97, 0x72, + 0x7f, 0x9d, 0x97, 0x72, 0x9f, 0xae, 0xbb, 0x9d, 0xe0, 0xa0, 0xdf, 0x36, 0x6c, 0xda, 0x95, 0xdf, + 0x7d, 0xf2, 0xcf, 0x26, 0x73, 0xbe, 0xa8, 0x1e, 0x8b, 0x6f, 0xbb, 0xf6, 0x2c, 0x1f, 0xc5, 0xdb, + 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x59, 0xdb, 0xbc, 0x73, 0x0e, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. + CreateGroup(ctx context.Context, in *MsgCreateGroupRequest, opts ...grpc.CallOption) (*MsgCreateGroupResponse, error) + // UpdateGroupMembers updates the group members with given group id and admin address. + UpdateGroupMembers(ctx context.Context, in *MsgUpdateGroupMembersRequest, opts ...grpc.CallOption) (*MsgUpdateGroupMembersResponse, error) + // UpdateGroupAdmin updates the group admin with given group id and previous admin address. + UpdateGroupAdmin(ctx context.Context, in *MsgUpdateGroupAdminRequest, opts ...grpc.CallOption) (*MsgUpdateGroupAdminResponse, error) + // UpdateGroupMetadata updates the group metadata with given group id and admin address. + UpdateGroupMetadata(ctx context.Context, in *MsgUpdateGroupMetadataRequest, opts ...grpc.CallOption) (*MsgUpdateGroupMetadataResponse, error) + // CreateGroupAccount creates a new group account using given DecisionPolicy. + CreateGroupAccount(ctx context.Context, in *MsgCreateGroupAccountRequest, opts ...grpc.CallOption) (*MsgCreateGroupAccountResponse, error) + // UpdateGroupAccountAdmin updates a group account admin. + UpdateGroupAccountAdmin(ctx context.Context, in *MsgUpdateGroupAccountAdminRequest, opts ...grpc.CallOption) (*MsgUpdateGroupAccountAdminResponse, error) + // UpdateGroupAccountDecisionPolicy allows a group account decision policy to be updated. + UpdateGroupAccountDecisionPolicy(ctx context.Context, in *MsgUpdateGroupAccountDecisionPolicyRequest, opts ...grpc.CallOption) (*MsgUpdateGroupAccountDecisionPolicyResponse, error) + // UpdateGroupAccountMetadata updates a group account metadata. + UpdateGroupAccountMetadata(ctx context.Context, in *MsgUpdateGroupAccountMetadataRequest, opts ...grpc.CallOption) (*MsgUpdateGroupAccountMetadataResponse, error) + // CreateProposal submits a new proposal. + CreateProposal(ctx context.Context, in *MsgCreateProposalRequest, opts ...grpc.CallOption) (*MsgCreateProposalResponse, error) + // Vote allows a voter to vote on a proposal. + Vote(ctx context.Context, in *MsgVoteRequest, opts ...grpc.CallOption) (*MsgVoteResponse, error) + // Exec executes a proposal. + Exec(ctx context.Context, in *MsgExecRequest, opts ...grpc.CallOption) (*MsgExecResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateGroup(ctx context.Context, in *MsgCreateGroupRequest, opts ...grpc.CallOption) (*MsgCreateGroupResponse, error) { + out := new(MsgCreateGroupResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/CreateGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateGroupMembers(ctx context.Context, in *MsgUpdateGroupMembersRequest, opts ...grpc.CallOption) (*MsgUpdateGroupMembersResponse, error) { + out := new(MsgUpdateGroupMembersResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupMembers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateGroupAdmin(ctx context.Context, in *MsgUpdateGroupAdminRequest, opts ...grpc.CallOption) (*MsgUpdateGroupAdminResponse, error) { + out := new(MsgUpdateGroupAdminResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupAdmin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateGroupMetadata(ctx context.Context, in *MsgUpdateGroupMetadataRequest, opts ...grpc.CallOption) (*MsgUpdateGroupMetadataResponse, error) { + out := new(MsgUpdateGroupMetadataResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupMetadata", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateGroupAccount(ctx context.Context, in *MsgCreateGroupAccountRequest, opts ...grpc.CallOption) (*MsgCreateGroupAccountResponse, error) { + out := new(MsgCreateGroupAccountResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/CreateGroupAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateGroupAccountAdmin(ctx context.Context, in *MsgUpdateGroupAccountAdminRequest, opts ...grpc.CallOption) (*MsgUpdateGroupAccountAdminResponse, error) { + out := new(MsgUpdateGroupAccountAdminResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupAccountAdmin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateGroupAccountDecisionPolicy(ctx context.Context, in *MsgUpdateGroupAccountDecisionPolicyRequest, opts ...grpc.CallOption) (*MsgUpdateGroupAccountDecisionPolicyResponse, error) { + out := new(MsgUpdateGroupAccountDecisionPolicyResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupAccountDecisionPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateGroupAccountMetadata(ctx context.Context, in *MsgUpdateGroupAccountMetadataRequest, opts ...grpc.CallOption) (*MsgUpdateGroupAccountMetadataResponse, error) { + out := new(MsgUpdateGroupAccountMetadataResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupAccountMetadata", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateProposal(ctx context.Context, in *MsgCreateProposalRequest, opts ...grpc.CallOption) (*MsgCreateProposalResponse, error) { + out := new(MsgCreateProposalResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/CreateProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Vote(ctx context.Context, in *MsgVoteRequest, opts ...grpc.CallOption) (*MsgVoteResponse, error) { + out := new(MsgVoteResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/Vote", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Exec(ctx context.Context, in *MsgExecRequest, opts ...grpc.CallOption) (*MsgExecResponse, error) { + out := new(MsgExecResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/Exec", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. + CreateGroup(context.Context, *MsgCreateGroupRequest) (*MsgCreateGroupResponse, error) + // UpdateGroupMembers updates the group members with given group id and admin address. + UpdateGroupMembers(context.Context, *MsgUpdateGroupMembersRequest) (*MsgUpdateGroupMembersResponse, error) + // UpdateGroupAdmin updates the group admin with given group id and previous admin address. + UpdateGroupAdmin(context.Context, *MsgUpdateGroupAdminRequest) (*MsgUpdateGroupAdminResponse, error) + // UpdateGroupMetadata updates the group metadata with given group id and admin address. + UpdateGroupMetadata(context.Context, *MsgUpdateGroupMetadataRequest) (*MsgUpdateGroupMetadataResponse, error) + // CreateGroupAccount creates a new group account using given DecisionPolicy. + CreateGroupAccount(context.Context, *MsgCreateGroupAccountRequest) (*MsgCreateGroupAccountResponse, error) + // UpdateGroupAccountAdmin updates a group account admin. + UpdateGroupAccountAdmin(context.Context, *MsgUpdateGroupAccountAdminRequest) (*MsgUpdateGroupAccountAdminResponse, error) + // UpdateGroupAccountDecisionPolicy allows a group account decision policy to be updated. + UpdateGroupAccountDecisionPolicy(context.Context, *MsgUpdateGroupAccountDecisionPolicyRequest) (*MsgUpdateGroupAccountDecisionPolicyResponse, error) + // UpdateGroupAccountMetadata updates a group account metadata. + UpdateGroupAccountMetadata(context.Context, *MsgUpdateGroupAccountMetadataRequest) (*MsgUpdateGroupAccountMetadataResponse, error) + // CreateProposal submits a new proposal. + CreateProposal(context.Context, *MsgCreateProposalRequest) (*MsgCreateProposalResponse, error) + // Vote allows a voter to vote on a proposal. + Vote(context.Context, *MsgVoteRequest) (*MsgVoteResponse, error) + // Exec executes a proposal. + Exec(context.Context, *MsgExecRequest) (*MsgExecResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateGroup(ctx context.Context, req *MsgCreateGroupRequest) (*MsgCreateGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented") +} +func (*UnimplementedMsgServer) UpdateGroupMembers(ctx context.Context, req *MsgUpdateGroupMembersRequest) (*MsgUpdateGroupMembersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupMembers not implemented") +} +func (*UnimplementedMsgServer) UpdateGroupAdmin(ctx context.Context, req *MsgUpdateGroupAdminRequest) (*MsgUpdateGroupAdminResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupAdmin not implemented") +} +func (*UnimplementedMsgServer) UpdateGroupMetadata(ctx context.Context, req *MsgUpdateGroupMetadataRequest) (*MsgUpdateGroupMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupMetadata not implemented") +} +func (*UnimplementedMsgServer) CreateGroupAccount(ctx context.Context, req *MsgCreateGroupAccountRequest) (*MsgCreateGroupAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGroupAccount not implemented") +} +func (*UnimplementedMsgServer) UpdateGroupAccountAdmin(ctx context.Context, req *MsgUpdateGroupAccountAdminRequest) (*MsgUpdateGroupAccountAdminResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupAccountAdmin not implemented") +} +func (*UnimplementedMsgServer) UpdateGroupAccountDecisionPolicy(ctx context.Context, req *MsgUpdateGroupAccountDecisionPolicyRequest) (*MsgUpdateGroupAccountDecisionPolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupAccountDecisionPolicy not implemented") +} +func (*UnimplementedMsgServer) UpdateGroupAccountMetadata(ctx context.Context, req *MsgUpdateGroupAccountMetadataRequest) (*MsgUpdateGroupAccountMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupAccountMetadata not implemented") +} +func (*UnimplementedMsgServer) CreateProposal(ctx context.Context, req *MsgCreateProposalRequest) (*MsgCreateProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateProposal not implemented") +} +func (*UnimplementedMsgServer) Vote(ctx context.Context, req *MsgVoteRequest) (*MsgVoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") +} +func (*UnimplementedMsgServer) Exec(ctx context.Context, req *MsgExecRequest) (*MsgExecResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/CreateGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateGroup(ctx, req.(*MsgCreateGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateGroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateGroupMembersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateGroupMembers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/UpdateGroupMembers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateGroupMembers(ctx, req.(*MsgUpdateGroupMembersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateGroupAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateGroupAdminRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateGroupAdmin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/UpdateGroupAdmin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateGroupAdmin(ctx, req.(*MsgUpdateGroupAdminRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateGroupMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateGroupMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateGroupMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/UpdateGroupMetadata", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateGroupMetadata(ctx, req.(*MsgUpdateGroupMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CreateGroupAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateGroupAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateGroupAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/CreateGroupAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateGroupAccount(ctx, req.(*MsgCreateGroupAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateGroupAccountAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateGroupAccountAdminRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateGroupAccountAdmin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/UpdateGroupAccountAdmin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateGroupAccountAdmin(ctx, req.(*MsgUpdateGroupAccountAdminRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateGroupAccountDecisionPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateGroupAccountDecisionPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateGroupAccountDecisionPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/UpdateGroupAccountDecisionPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateGroupAccountDecisionPolicy(ctx, req.(*MsgUpdateGroupAccountDecisionPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateGroupAccountMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateGroupAccountMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateGroupAccountMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/UpdateGroupAccountMetadata", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateGroupAccountMetadata(ctx, req.(*MsgUpdateGroupAccountMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CreateProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/CreateProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateProposal(ctx, req.(*MsgCreateProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVoteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Vote(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/Vote", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Vote(ctx, req.(*MsgVoteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgExecRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Exec(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.group.v1beta1.Msg/Exec", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Exec(ctx, req.(*MsgExecRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.group.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateGroup", + Handler: _Msg_CreateGroup_Handler, + }, + { + MethodName: "UpdateGroupMembers", + Handler: _Msg_UpdateGroupMembers_Handler, + }, + { + MethodName: "UpdateGroupAdmin", + Handler: _Msg_UpdateGroupAdmin_Handler, + }, + { + MethodName: "UpdateGroupMetadata", + Handler: _Msg_UpdateGroupMetadata_Handler, + }, + { + MethodName: "CreateGroupAccount", + Handler: _Msg_CreateGroupAccount_Handler, + }, + { + MethodName: "UpdateGroupAccountAdmin", + Handler: _Msg_UpdateGroupAccountAdmin_Handler, + }, + { + MethodName: "UpdateGroupAccountDecisionPolicy", + Handler: _Msg_UpdateGroupAccountDecisionPolicy_Handler, + }, + { + MethodName: "UpdateGroupAccountMetadata", + Handler: _Msg_UpdateGroupAccountMetadata_Handler, + }, + { + MethodName: "CreateProposal", + Handler: _Msg_CreateProposal_Handler, + }, + { + MethodName: "Vote", + Handler: _Msg_Vote_Handler, + }, + { + MethodName: "Exec", + Handler: _Msg_Exec_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/group/v1beta1/tx.proto", +} + +func (m *MsgCreateGroupRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateGroupRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateGroupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x1a + } + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateGroupResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GroupId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupMembersRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateGroupMembersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupMembersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MemberUpdates) > 0 { + for iNdEx := len(m.MemberUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MemberUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.GroupId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupMembersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateGroupMembersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupMembersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupAdminRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateGroupAdminRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupAdminRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NewAdmin) > 0 { + i -= len(m.NewAdmin) + copy(dAtA[i:], m.NewAdmin) + i = encodeVarintTx(dAtA, i, uint64(len(m.NewAdmin))) + i-- + dAtA[i] = 0x1a + } + if m.GroupId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupAdminResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateGroupAdminResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupMetadataRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateGroupMetadataRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x1a + } + if m.GroupId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupMetadataResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateGroupMetadataResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCreateGroupAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateGroupAccountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateGroupAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DecisionPolicy != nil { + { + size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x1a + } + if m.GroupId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateGroupAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateGroupAccountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateGroupAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupAccountAdminRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateGroupAccountAdminRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupAccountAdminRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NewAdmin) > 0 { + i -= len(m.NewAdmin) + copy(dAtA[i:], m.NewAdmin) + i = encodeVarintTx(dAtA, i, uint64(len(m.NewAdmin))) + i-- + dAtA[i] = 0x1a + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupAccountAdminResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateGroupAccountAdminResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupAccountAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupAccountDecisionPolicyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateGroupAccountDecisionPolicyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupAccountDecisionPolicyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DecisionPolicy != nil { + { + size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupAccountDecisionPolicyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateGroupAccountDecisionPolicyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupAccountDecisionPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupAccountMetadataRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateGroupAccountMetadataRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupAccountMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x1a + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupAccountMetadataResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateGroupAccountMetadataResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupAccountMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCreateProposalRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateProposalRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Exec != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Exec)) + i-- + dAtA[i] = 0x28 + } + if len(m.Msgs) > 0 { + for iNdEx := len(m.Msgs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Msgs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x1a + } + if len(m.Proposers) > 0 { + for iNdEx := len(m.Proposers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Proposers[iNdEx]) + copy(dAtA[i:], m.Proposers[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Proposers[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateProposalResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProposalId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgVoteRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgVoteRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Exec != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Exec)) + i-- + dAtA[i] = 0x28 + } + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x22 + } + if m.Choice != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Choice)) + i-- + dAtA[i] = 0x18 + } + if len(m.Voter) > 0 { + i -= len(m.Voter) + copy(dAtA[i:], m.Voter) + i = encodeVarintTx(dAtA, i, uint64(len(m.Voter))) + i-- + dAtA[i] = 0x12 + } + if m.ProposalId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgVoteResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgVoteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgExecRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgExecRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExecRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x12 + } + if m.ProposalId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgExecResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgExecResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExecResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateGroupRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GroupId != 0 { + n += 1 + sovTx(uint64(m.GroupId)) + } + return n +} + +func (m *MsgUpdateGroupMembersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GroupId != 0 { + n += 1 + sovTx(uint64(m.GroupId)) + } + if len(m.MemberUpdates) > 0 { + for _, e := range m.MemberUpdates { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgUpdateGroupMembersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateGroupAdminRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GroupId != 0 { + n += 1 + sovTx(uint64(m.GroupId)) + } + l = len(m.NewAdmin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateGroupAdminResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateGroupMetadataRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GroupId != 0 { + n += 1 + sovTx(uint64(m.GroupId)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateGroupMetadataResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCreateGroupAccountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GroupId != 0 { + n += 1 + sovTx(uint64(m.GroupId)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.DecisionPolicy != nil { + l = m.DecisionPolicy.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateGroupAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateGroupAccountAdminRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.NewAdmin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateGroupAccountAdminResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateGroupAccountDecisionPolicyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.DecisionPolicy != nil { + l = m.DecisionPolicy.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateGroupAccountDecisionPolicyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateGroupAccountMetadataRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateGroupAccountMetadataResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCreateProposalRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Proposers) > 0 { + for _, s := range m.Proposers { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Msgs) > 0 { + for _, e := range m.Msgs { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if m.Exec != 0 { + n += 1 + sovTx(uint64(m.Exec)) + } + return n +} + +func (m *MsgCreateProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovTx(uint64(m.ProposalId)) + } + return n +} + +func (m *MsgVoteRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovTx(uint64(m.ProposalId)) + } + l = len(m.Voter) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Choice != 0 { + n += 1 + sovTx(uint64(m.Choice)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Exec != 0 { + n += 1 + sovTx(uint64(m.Exec)) + } + return n +} + +func (m *MsgVoteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgExecRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovTx(uint64(m.ProposalId)) + } + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgExecResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCreateGroupRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateGroupRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateGroupRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, Member{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) + if m.Metadata == nil { + m.Metadata = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateGroupResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupMembersRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateGroupMembersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupMembersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MemberUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MemberUpdates = append(m.MemberUpdates, Member{}) + if err := m.MemberUpdates[len(m.MemberUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupMembersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateGroupMembersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupMembersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupAdminRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateGroupAdminRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupAdminRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewAdmin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewAdmin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupAdminResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateGroupAdminResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupAdminResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupMetadataRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateGroupMetadataRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) + if m.Metadata == nil { + m.Metadata = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupMetadataResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateGroupMetadataResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateGroupAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateGroupAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateGroupAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) + if m.Metadata == nil { + m.Metadata = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DecisionPolicy == nil { + m.DecisionPolicy = &types.Any{} + } + if err := m.DecisionPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateGroupAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateGroupAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateGroupAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupAccountAdminRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateGroupAccountAdminRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupAccountAdminRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewAdmin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewAdmin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupAccountAdminResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateGroupAccountAdminResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupAccountAdminResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupAccountDecisionPolicyRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateGroupAccountDecisionPolicyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupAccountDecisionPolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DecisionPolicy == nil { + m.DecisionPolicy = &types.Any{} + } + if err := m.DecisionPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupAccountDecisionPolicyResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateGroupAccountDecisionPolicyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupAccountDecisionPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupAccountMetadataRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateGroupAccountMetadataRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupAccountMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) + if m.Metadata == nil { + m.Metadata = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupAccountMetadataResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateGroupAccountMetadataResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupAccountMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateProposalRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateProposalRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateProposalRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proposers = append(m.Proposers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) + if m.Metadata == nil { + m.Metadata = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msgs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Msgs = append(m.Msgs, &types.Any{}) + if err := m.Msgs[len(m.Msgs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exec", wireType) + } + m.Exec = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Exec |= Exec(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateProposalResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgVoteRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgVoteRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Voter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Choice", wireType) + } + m.Choice = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Choice |= Choice(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) + if m.Metadata == nil { + m.Metadata = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exec", wireType) + } + m.Exec = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Exec |= Exec(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgVoteResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgVoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExecRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExecRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExecRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExecResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExecResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExecResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/group/types.go b/x/group/types.go new file mode 100644 index 0000000000..a4a74662f2 --- /dev/null +++ b/x/group/types.go @@ -0,0 +1,96 @@ +package group + +import ( + "fmt" + "time" + + proto "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/types" + + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type DecisionPolicyResult struct { + Allow bool + Final bool +} + +// DecisionPolicy is the persistent set of rules to determine the result of election on a proposal. +type DecisionPolicy interface { + codec.ProtoMarshaler + + ValidateBasic() error + GetTimeout() types.Duration + Allow(tally Tally, totalPower string, votingDuration time.Duration) (DecisionPolicyResult, error) + Validate(g GroupInfo) error +} + +// NewGroupAccountInfo creates a new GroupAccountInfo instance +func NewGroupAccountInfo(address sdk.AccAddress, group uint64, admin sdk.AccAddress, metadata []byte, + version uint64, decisionPolicy DecisionPolicy, derivationKey []byte) (GroupAccountInfo, error) { + p := GroupAccountInfo{ + Address: address.String(), + GroupId: group, + Admin: admin.String(), + Metadata: metadata, + Version: version, + DerivationKey: derivationKey, + } + + err := p.SetDecisionPolicy(decisionPolicy) + if err != nil { + return GroupAccountInfo{}, err + } + + return p, nil +} + +func (g *GroupAccountInfo) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { + msg, ok := decisionPolicy.(proto.Message) + if !ok { + return fmt.Errorf("can't proto marshal %T", msg) + } + any, err := codectypes.NewAnyWithValue(msg) + if err != nil { + return err + } + g.DecisionPolicy = any + return nil +} + +func (g GroupAccountInfo) GetDecisionPolicy() DecisionPolicy { + decisionPolicy, ok := g.DecisionPolicy.GetCachedValue().(DecisionPolicy) + if !ok { + return nil + } + return decisionPolicy +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (g GroupAccountInfo) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + var decisionPolicy DecisionPolicy + return unpacker.UnpackAny(g.DecisionPolicy, &decisionPolicy) +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (q QueryGroupAccountsByGroupResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + return unpackGroupAccounts(unpacker, q.GroupAccounts) +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (q QueryGroupAccountsByAdminResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + return unpackGroupAccounts(unpacker, q.GroupAccounts) +} + +func unpackGroupAccounts(unpacker codectypes.AnyUnpacker, accs []*GroupAccountInfo) error { + for _, g := range accs { + err := g.UnpackInterfaces(unpacker) + if err != nil { + return err + } + } + + return nil +} diff --git a/x/group/types.pb.go b/x/group/types.pb.go new file mode 100644 index 0000000000..56fbe2286f --- /dev/null +++ b/x/group/types.pb.go @@ -0,0 +1,3379 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/group/v1beta1/types.proto + +package group + +import ( + bytes "bytes" + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/regen-network/cosmos-proto" + _ "google.golang.org/protobuf/types/known/durationpb" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Choice defines available types of choices for voting. +type Choice int32 + +const ( + // CHOICE_UNSPECIFIED defines a no-op voting choice. + Choice_CHOICE_UNSPECIFIED Choice = 0 + // CHOICE_NO defines a no voting choice. + Choice_CHOICE_NO Choice = 1 + // CHOICE_YES defines a yes voting choice. + Choice_CHOICE_YES Choice = 2 + // CHOICE_ABSTAIN defines an abstaining voting choice. + Choice_CHOICE_ABSTAIN Choice = 3 + // CHOICE_VETO defines a voting choice with veto. + Choice_CHOICE_VETO Choice = 4 +) + +var Choice_name = map[int32]string{ + 0: "CHOICE_UNSPECIFIED", + 1: "CHOICE_NO", + 2: "CHOICE_YES", + 3: "CHOICE_ABSTAIN", + 4: "CHOICE_VETO", +} + +var Choice_value = map[string]int32{ + "CHOICE_UNSPECIFIED": 0, + "CHOICE_NO": 1, + "CHOICE_YES": 2, + "CHOICE_ABSTAIN": 3, + "CHOICE_VETO": 4, +} + +func (x Choice) String() string { + return proto.EnumName(Choice_name, int32(x)) +} + +func (Choice) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e091dfce5c49c8b6, []int{0} +} + +// Status defines proposal statuses. +type Proposal_Status int32 + +const ( + // An empty value is invalid and not allowed. + ProposalStatusInvalid Proposal_Status = 0 + // Initial status of a proposal when persisted. + ProposalStatusSubmitted Proposal_Status = 1 + // Final status of a proposal when the final tally was executed. + ProposalStatusClosed Proposal_Status = 2 + // Final status of a proposal when the group was modified before the final tally. + ProposalStatusAborted Proposal_Status = 3 +) + +var Proposal_Status_name = map[int32]string{ + 0: "STATUS_UNSPECIFIED", + 1: "STATUS_SUBMITTED", + 2: "STATUS_CLOSED", + 3: "STATUS_ABORTED", +} + +var Proposal_Status_value = map[string]int32{ + "STATUS_UNSPECIFIED": 0, + "STATUS_SUBMITTED": 1, + "STATUS_CLOSED": 2, + "STATUS_ABORTED": 3, +} + +func (x Proposal_Status) String() string { + return proto.EnumName(Proposal_Status_name, int32(x)) +} + +func (Proposal_Status) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e091dfce5c49c8b6, []int{6, 0} +} + +// Result defines types of proposal results. +type Proposal_Result int32 + +const ( + // An empty value is invalid and not allowed + ProposalResultInvalid Proposal_Result = 0 + // Until a final tally has happened the status is unfinalized + ProposalResultUnfinalized Proposal_Result = 1 + // Final result of the tally + ProposalResultAccepted Proposal_Result = 2 + // Final result of the tally + ProposalResultRejected Proposal_Result = 3 +) + +var Proposal_Result_name = map[int32]string{ + 0: "RESULT_UNSPECIFIED", + 1: "RESULT_UNFINALIZED", + 2: "RESULT_ACCEPTED", + 3: "RESULT_REJECTED", +} + +var Proposal_Result_value = map[string]int32{ + "RESULT_UNSPECIFIED": 0, + "RESULT_UNFINALIZED": 1, + "RESULT_ACCEPTED": 2, + "RESULT_REJECTED": 3, +} + +func (x Proposal_Result) String() string { + return proto.EnumName(Proposal_Result_name, int32(x)) +} + +func (Proposal_Result) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e091dfce5c49c8b6, []int{6, 1} +} + +// ExecutorResult defines types of proposal executor results. +type Proposal_ExecutorResult int32 + +const ( + // An empty value is not allowed. + ProposalExecutorResultInvalid Proposal_ExecutorResult = 0 + // We have not yet run the executor. + ProposalExecutorResultNotRun Proposal_ExecutorResult = 1 + // The executor was successful and proposed action updated state. + ProposalExecutorResultSuccess Proposal_ExecutorResult = 2 + // The executor returned an error and proposed action didn't update state. + ProposalExecutorResultFailure Proposal_ExecutorResult = 3 +) + +var Proposal_ExecutorResult_name = map[int32]string{ + 0: "EXECUTOR_RESULT_UNSPECIFIED", + 1: "EXECUTOR_RESULT_NOT_RUN", + 2: "EXECUTOR_RESULT_SUCCESS", + 3: "EXECUTOR_RESULT_FAILURE", +} + +var Proposal_ExecutorResult_value = map[string]int32{ + "EXECUTOR_RESULT_UNSPECIFIED": 0, + "EXECUTOR_RESULT_NOT_RUN": 1, + "EXECUTOR_RESULT_SUCCESS": 2, + "EXECUTOR_RESULT_FAILURE": 3, +} + +func (x Proposal_ExecutorResult) String() string { + return proto.EnumName(Proposal_ExecutorResult_name, int32(x)) +} + +func (Proposal_ExecutorResult) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e091dfce5c49c8b6, []int{6, 2} +} + +// Member represents a group member with an account address, +// non-zero weight and metadata. +type Member struct { + // address is the member's account address. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // weight is the member's voting weight that should be greater than 0. + Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` + // metadata is any arbitrary metadata to attached to the member. + Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (m *Member) Reset() { *m = Member{} } +func (m *Member) String() string { return proto.CompactTextString(m) } +func (*Member) ProtoMessage() {} +func (*Member) Descriptor() ([]byte, []int) { + return fileDescriptor_e091dfce5c49c8b6, []int{0} +} +func (m *Member) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Member) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Member.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Member) XXX_Merge(src proto.Message) { + xxx_messageInfo_Member.Merge(m, src) +} +func (m *Member) XXX_Size() int { + return m.Size() +} +func (m *Member) XXX_DiscardUnknown() { + xxx_messageInfo_Member.DiscardUnknown(m) +} + +var xxx_messageInfo_Member proto.InternalMessageInfo + +func (m *Member) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *Member) GetWeight() string { + if m != nil { + return m.Weight + } + return "" +} + +func (m *Member) GetMetadata() []byte { + if m != nil { + return m.Metadata + } + return nil +} + +// Members defines a repeated slice of Member objects. +type Members struct { + // members is the list of members. + Members []Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members"` +} + +func (m *Members) Reset() { *m = Members{} } +func (m *Members) String() string { return proto.CompactTextString(m) } +func (*Members) ProtoMessage() {} +func (*Members) Descriptor() ([]byte, []int) { + return fileDescriptor_e091dfce5c49c8b6, []int{1} +} +func (m *Members) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Members) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Members.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Members) XXX_Merge(src proto.Message) { + xxx_messageInfo_Members.Merge(m, src) +} +func (m *Members) XXX_Size() int { + return m.Size() +} +func (m *Members) XXX_DiscardUnknown() { + xxx_messageInfo_Members.DiscardUnknown(m) +} + +var xxx_messageInfo_Members proto.InternalMessageInfo + +func (m *Members) GetMembers() []Member { + if m != nil { + return m.Members + } + return nil +} + +// ThresholdDecisionPolicy implements the DecisionPolicy interface +type ThresholdDecisionPolicy struct { + // threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed. + Threshold string `protobuf:"bytes,1,opt,name=threshold,proto3" json:"threshold,omitempty"` + // timeout is the duration from submission of a proposal to the end of voting period + // Within this times votes and exec messages can be submitted. + Timeout time.Duration `protobuf:"bytes,2,opt,name=timeout,proto3,stdduration" json:"timeout"` +} + +func (m *ThresholdDecisionPolicy) Reset() { *m = ThresholdDecisionPolicy{} } +func (m *ThresholdDecisionPolicy) String() string { return proto.CompactTextString(m) } +func (*ThresholdDecisionPolicy) ProtoMessage() {} +func (*ThresholdDecisionPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_e091dfce5c49c8b6, []int{2} +} +func (m *ThresholdDecisionPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ThresholdDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ThresholdDecisionPolicy.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ThresholdDecisionPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_ThresholdDecisionPolicy.Merge(m, src) +} +func (m *ThresholdDecisionPolicy) XXX_Size() int { + return m.Size() +} +func (m *ThresholdDecisionPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_ThresholdDecisionPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_ThresholdDecisionPolicy proto.InternalMessageInfo + +func (m *ThresholdDecisionPolicy) GetThreshold() string { + if m != nil { + return m.Threshold + } + return "" +} + +func (m *ThresholdDecisionPolicy) GetTimeout() time.Duration { + if m != nil { + return m.Timeout + } + return 0 +} + +// GroupInfo represents the high-level on-chain information for a group. +type GroupInfo struct { + // group_id is the unique ID of the group. + GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // admin is the account address of the group's admin. + Admin string `protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty"` + // metadata is any arbitrary metadata to attached to the group. + Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + // version is used to track changes to a group's membership structure that + // would break existing proposals. Whenever any members weight is changed, + // or any member is added or removed this version is incremented and will + // cause proposals based on older versions of this group to fail + Version uint64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` + // total_weight is the sum of the group members' weights. + TotalWeight string `protobuf:"bytes,5,opt,name=total_weight,json=totalWeight,proto3" json:"total_weight,omitempty"` +} + +func (m *GroupInfo) Reset() { *m = GroupInfo{} } +func (m *GroupInfo) String() string { return proto.CompactTextString(m) } +func (*GroupInfo) ProtoMessage() {} +func (*GroupInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_e091dfce5c49c8b6, []int{3} +} +func (m *GroupInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GroupInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GroupInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupInfo.Merge(m, src) +} +func (m *GroupInfo) XXX_Size() int { + return m.Size() +} +func (m *GroupInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupInfo proto.InternalMessageInfo + +func (m *GroupInfo) GetGroupId() uint64 { + if m != nil { + return m.GroupId + } + return 0 +} + +func (m *GroupInfo) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *GroupInfo) GetMetadata() []byte { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *GroupInfo) GetVersion() uint64 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *GroupInfo) GetTotalWeight() string { + if m != nil { + return m.TotalWeight + } + return "" +} + +// GroupMember represents the relationship between a group and a member. +type GroupMember struct { + // group_id is the unique ID of the group. + GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // member is the member data. + Member *Member `protobuf:"bytes,2,opt,name=member,proto3" json:"member,omitempty"` +} + +func (m *GroupMember) Reset() { *m = GroupMember{} } +func (m *GroupMember) String() string { return proto.CompactTextString(m) } +func (*GroupMember) ProtoMessage() {} +func (*GroupMember) Descriptor() ([]byte, []int) { + return fileDescriptor_e091dfce5c49c8b6, []int{4} +} +func (m *GroupMember) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupMember) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GroupMember.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GroupMember) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupMember.Merge(m, src) +} +func (m *GroupMember) XXX_Size() int { + return m.Size() +} +func (m *GroupMember) XXX_DiscardUnknown() { + xxx_messageInfo_GroupMember.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupMember proto.InternalMessageInfo + +func (m *GroupMember) GetGroupId() uint64 { + if m != nil { + return m.GroupId + } + return 0 +} + +func (m *GroupMember) GetMember() *Member { + if m != nil { + return m.Member + } + return nil +} + +// GroupAccountInfo represents the high-level on-chain information for a group account. +type GroupAccountInfo struct { + // address is the group account address. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // group_id is the unique ID of the group. + GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // admin is the account address of the group admin. + Admin string `protobuf:"bytes,3,opt,name=admin,proto3" json:"admin,omitempty"` + // metadata is any arbitrary metadata to attached to the group account. + Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + // version is used to track changes to a group's GroupAccountInfo structure that + // would create a different result on a running proposal. + Version uint64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` + // decision_policy specifies the group account's decision policy. + DecisionPolicy *types.Any `protobuf:"bytes,6,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` + // derivation_key is the "derivation" key of the group account, + // which is needed to derive the group root module key and execute proposals. + DerivationKey []byte `protobuf:"bytes,7,opt,name=derivation_key,json=derivationKey,proto3" json:"derivation_key,omitempty"` +} + +func (m *GroupAccountInfo) Reset() { *m = GroupAccountInfo{} } +func (m *GroupAccountInfo) String() string { return proto.CompactTextString(m) } +func (*GroupAccountInfo) ProtoMessage() {} +func (*GroupAccountInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_e091dfce5c49c8b6, []int{5} +} +func (m *GroupAccountInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupAccountInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GroupAccountInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GroupAccountInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupAccountInfo.Merge(m, src) +} +func (m *GroupAccountInfo) XXX_Size() int { + return m.Size() +} +func (m *GroupAccountInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupAccountInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupAccountInfo proto.InternalMessageInfo + +// Proposal defines a group proposal. Any member of a group can submit a proposal +// for a group account to decide upon. +// A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal +// passes as well as some optional metadata associated with the proposal. +type Proposal struct { + // proposal_id is the unique id of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // address is the group account address. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // metadata is any arbitrary metadata to attached to the proposal. + Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + // proposers are the account addresses of the proposers. + Proposers []string `protobuf:"bytes,4,rep,name=proposers,proto3" json:"proposers,omitempty"` + // submitted_at is a timestamp specifying when a proposal was submitted. + SubmittedAt time.Time `protobuf:"bytes,5,opt,name=submitted_at,json=submittedAt,proto3,stdtime" json:"submitted_at"` + // group_version tracks the version of the group that this proposal corresponds to. + // When group membership is changed, existing proposals from previous group versions will become invalid. + GroupVersion uint64 `protobuf:"varint,6,opt,name=group_version,json=groupVersion,proto3" json:"group_version,omitempty"` + // group_account_version tracks the version of the group account that this proposal corresponds to. + // When a decision policy is changed, existing proposals from previous policy versions will become invalid. + GroupAccountVersion uint64 `protobuf:"varint,7,opt,name=group_account_version,json=groupAccountVersion,proto3" json:"group_account_version,omitempty"` + // Status represents the high level position in the life cycle of the proposal. Initial value is Submitted. + Status Proposal_Status `protobuf:"varint,8,opt,name=status,proto3,enum=cosmos.group.v1beta1.Proposal_Status" json:"status,omitempty"` + // result is the final result based on the votes and election rule. Initial value is unfinalized. + // The result is persisted so that clients can always rely on this state and not have to replicate the logic. + Result Proposal_Result `protobuf:"varint,9,opt,name=result,proto3,enum=cosmos.group.v1beta1.Proposal_Result" json:"result,omitempty"` + // vote_state contains the sums of all weighted votes for this proposal. + VoteState Tally `protobuf:"bytes,10,opt,name=vote_state,json=voteState,proto3" json:"vote_state"` + // timeout is the timestamp of the block where the proposal execution times out. Header times of the votes and execution messages + // must be before this end time to be included in the election. After the timeout timestamp the proposal can not be + // executed anymore and should be considered pending delete. + Timeout time.Time `protobuf:"bytes,11,opt,name=timeout,proto3,stdtime" json:"timeout"` + // executor_result is the final result based on the votes and election rule. Initial value is NotRun. + ExecutorResult Proposal_ExecutorResult `protobuf:"varint,12,opt,name=executor_result,json=executorResult,proto3,enum=cosmos.group.v1beta1.Proposal_ExecutorResult" json:"executor_result,omitempty"` + // msgs is a list of Msgs that will be executed if the proposal passes. + Msgs []*types.Any `protobuf:"bytes,13,rep,name=msgs,proto3" json:"msgs,omitempty"` +} + +func (m *Proposal) Reset() { *m = Proposal{} } +func (m *Proposal) String() string { return proto.CompactTextString(m) } +func (*Proposal) ProtoMessage() {} +func (*Proposal) Descriptor() ([]byte, []int) { + return fileDescriptor_e091dfce5c49c8b6, []int{6} +} +func (m *Proposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Proposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_Proposal.Merge(m, src) +} +func (m *Proposal) XXX_Size() int { + return m.Size() +} +func (m *Proposal) XXX_DiscardUnknown() { + xxx_messageInfo_Proposal.DiscardUnknown(m) +} + +var xxx_messageInfo_Proposal proto.InternalMessageInfo + +// Tally represents the sum of weighted votes. +type Tally struct { + // yes_count is the weighted sum of yes votes. + YesCount string `protobuf:"bytes,1,opt,name=yes_count,json=yesCount,proto3" json:"yes_count,omitempty"` + // no_count is the weighted sum of no votes. + NoCount string `protobuf:"bytes,2,opt,name=no_count,json=noCount,proto3" json:"no_count,omitempty"` + // abstain_count is the weighted sum of abstainers + AbstainCount string `protobuf:"bytes,3,opt,name=abstain_count,json=abstainCount,proto3" json:"abstain_count,omitempty"` + // veto_count is the weighted sum of vetoes. + VetoCount string `protobuf:"bytes,4,opt,name=veto_count,json=vetoCount,proto3" json:"veto_count,omitempty"` +} + +func (m *Tally) Reset() { *m = Tally{} } +func (m *Tally) String() string { return proto.CompactTextString(m) } +func (*Tally) ProtoMessage() {} +func (*Tally) Descriptor() ([]byte, []int) { + return fileDescriptor_e091dfce5c49c8b6, []int{7} +} +func (m *Tally) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Tally) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Tally.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Tally) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tally.Merge(m, src) +} +func (m *Tally) XXX_Size() int { + return m.Size() +} +func (m *Tally) XXX_DiscardUnknown() { + xxx_messageInfo_Tally.DiscardUnknown(m) +} + +var xxx_messageInfo_Tally proto.InternalMessageInfo + +// Vote represents a vote for a proposal. +type Vote struct { + // proposal is the unique ID of the proposal. + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + // voter is the account address of the voter. + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` + // choice is the voter's choice on the proposal. + Choice Choice `protobuf:"varint,3,opt,name=choice,proto3,enum=cosmos.group.v1beta1.Choice" json:"choice,omitempty"` + // metadata is any arbitrary metadata to attached to the vote. + Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + // submitted_at is the timestamp when the vote was submitted. + SubmittedAt time.Time `protobuf:"bytes,5,opt,name=submitted_at,json=submittedAt,proto3,stdtime" json:"submitted_at"` +} + +func (m *Vote) Reset() { *m = Vote{} } +func (m *Vote) String() string { return proto.CompactTextString(m) } +func (*Vote) ProtoMessage() {} +func (*Vote) Descriptor() ([]byte, []int) { + return fileDescriptor_e091dfce5c49c8b6, []int{8} +} +func (m *Vote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Vote.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Vote) XXX_Merge(src proto.Message) { + xxx_messageInfo_Vote.Merge(m, src) +} +func (m *Vote) XXX_Size() int { + return m.Size() +} +func (m *Vote) XXX_DiscardUnknown() { + xxx_messageInfo_Vote.DiscardUnknown(m) +} + +var xxx_messageInfo_Vote proto.InternalMessageInfo + +func (m *Vote) GetProposalId() uint64 { + if m != nil { + return m.ProposalId + } + return 0 +} + +func (m *Vote) GetVoter() string { + if m != nil { + return m.Voter + } + return "" +} + +func (m *Vote) GetChoice() Choice { + if m != nil { + return m.Choice + } + return Choice_CHOICE_UNSPECIFIED +} + +func (m *Vote) GetMetadata() []byte { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *Vote) GetSubmittedAt() time.Time { + if m != nil { + return m.SubmittedAt + } + return time.Time{} +} + +func init() { + proto.RegisterEnum("cosmos.group.v1beta1.Choice", Choice_name, Choice_value) + proto.RegisterEnum("cosmos.group.v1beta1.Proposal_Status", Proposal_Status_name, Proposal_Status_value) + proto.RegisterEnum("cosmos.group.v1beta1.Proposal_Result", Proposal_Result_name, Proposal_Result_value) + proto.RegisterEnum("cosmos.group.v1beta1.Proposal_ExecutorResult", Proposal_ExecutorResult_name, Proposal_ExecutorResult_value) + proto.RegisterType((*Member)(nil), "cosmos.group.v1beta1.Member") + proto.RegisterType((*Members)(nil), "cosmos.group.v1beta1.Members") + proto.RegisterType((*ThresholdDecisionPolicy)(nil), "cosmos.group.v1beta1.ThresholdDecisionPolicy") + proto.RegisterType((*GroupInfo)(nil), "cosmos.group.v1beta1.GroupInfo") + proto.RegisterType((*GroupMember)(nil), "cosmos.group.v1beta1.GroupMember") + proto.RegisterType((*GroupAccountInfo)(nil), "cosmos.group.v1beta1.GroupAccountInfo") + proto.RegisterType((*Proposal)(nil), "cosmos.group.v1beta1.Proposal") + proto.RegisterType((*Tally)(nil), "cosmos.group.v1beta1.Tally") + proto.RegisterType((*Vote)(nil), "cosmos.group.v1beta1.Vote") +} + +func init() { proto.RegisterFile("cosmos/group/v1beta1/types.proto", fileDescriptor_e091dfce5c49c8b6) } + +var fileDescriptor_e091dfce5c49c8b6 = []byte{ + // 1281 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x1b, 0xc5, + 0x1b, 0xf6, 0xda, 0x8e, 0xff, 0xbc, 0x4e, 0x1c, 0x6b, 0x7e, 0x69, 0xeb, 0x38, 0xa9, 0xb3, 0x75, + 0x7f, 0x95, 0x22, 0x50, 0x6c, 0x25, 0xc0, 0xa5, 0xa2, 0x15, 0xb6, 0xb3, 0x29, 0x86, 0xd4, 0x0e, + 0xbb, 0x76, 0x80, 0x1e, 0xb0, 0xd6, 0xbb, 0x53, 0x67, 0xa9, 0xbd, 0x63, 0xed, 0xce, 0x86, 0x9a, + 0x4f, 0x50, 0x7c, 0xea, 0x05, 0x01, 0x07, 0x4b, 0x95, 0xf8, 0x0a, 0x7c, 0x88, 0x8a, 0x53, 0xc5, + 0xa9, 0xe2, 0x00, 0xa8, 0xbd, 0xf0, 0x05, 0xb8, 0xa3, 0x9d, 0x99, 0x4d, 0xb2, 0x89, 0xe3, 0x82, + 0xc4, 0x29, 0x7e, 0xdf, 0x79, 0x9e, 0xf7, 0xcf, 0x33, 0x6f, 0xde, 0x59, 0x90, 0x0d, 0xe2, 0x0e, + 0x89, 0x5b, 0xe9, 0x3b, 0xc4, 0x1b, 0x55, 0x8e, 0xb7, 0x7b, 0x98, 0xea, 0xdb, 0x15, 0x3a, 0x1e, + 0x61, 0xb7, 0x3c, 0x72, 0x08, 0x25, 0x68, 0x85, 0x23, 0xca, 0x0c, 0x51, 0x16, 0x88, 0xc2, 0x4a, + 0x9f, 0xf4, 0x09, 0x03, 0x54, 0xfc, 0x5f, 0x1c, 0x5b, 0x28, 0xf6, 0x09, 0xe9, 0x0f, 0x70, 0x85, + 0x59, 0x3d, 0xef, 0x61, 0xc5, 0xf4, 0x1c, 0x9d, 0x5a, 0xc4, 0x16, 0xe7, 0x1b, 0xe7, 0xcf, 0xa9, + 0x35, 0xc4, 0x2e, 0xd5, 0x87, 0x23, 0x01, 0x58, 0xe5, 0xc9, 0xba, 0x3c, 0xb2, 0xc8, 0x2c, 0x8e, + 0xce, 0x73, 0x75, 0x7b, 0xcc, 0x8f, 0x4a, 0x87, 0x90, 0xb8, 0x8f, 0x87, 0x3d, 0xec, 0xa0, 0x3c, + 0x24, 0x75, 0xd3, 0x74, 0xb0, 0xeb, 0xe6, 0x25, 0x59, 0xda, 0x4c, 0xab, 0x81, 0x89, 0xae, 0x42, + 0xe2, 0x2b, 0x6c, 0xf5, 0x8f, 0x68, 0x3e, 0xca, 0x0e, 0x84, 0x85, 0x0a, 0x90, 0x1a, 0x62, 0xaa, + 0x9b, 0x3a, 0xd5, 0xf3, 0x31, 0x59, 0xda, 0x5c, 0x54, 0x4f, 0xec, 0xd2, 0x3d, 0x48, 0xf2, 0xb8, + 0x2e, 0x7a, 0x1f, 0x92, 0x43, 0xfe, 0x33, 0x2f, 0xc9, 0xb1, 0xcd, 0xcc, 0xce, 0x7a, 0x79, 0x96, + 0x2e, 0x65, 0x8e, 0xaf, 0xc5, 0x9f, 0xff, 0xb6, 0x11, 0x51, 0x03, 0x4a, 0x69, 0x22, 0xc1, 0xb5, + 0xf6, 0x91, 0x83, 0xdd, 0x23, 0x32, 0x30, 0x77, 0xb1, 0x61, 0xb9, 0x16, 0xb1, 0x0f, 0xc8, 0xc0, + 0x32, 0xc6, 0x68, 0x1d, 0xd2, 0x34, 0x38, 0x12, 0x45, 0x9f, 0x3a, 0xd0, 0x1d, 0x48, 0xfa, 0x1a, + 0x11, 0x8f, 0xd7, 0x9d, 0xd9, 0x59, 0x2d, 0x73, 0x1d, 0xca, 0x81, 0x0e, 0xe5, 0x5d, 0xa1, 0x71, + 0x2d, 0xe5, 0x27, 0xfd, 0xfe, 0xf7, 0x0d, 0x49, 0x0d, 0x38, 0xb7, 0xd1, 0x2f, 0x3f, 0x6d, 0x65, + 0xc3, 0x09, 0x4b, 0xdf, 0x4a, 0x90, 0xbe, 0xe7, 0x17, 0xdd, 0xb0, 0x1f, 0x12, 0xb4, 0x0a, 0x29, + 0xd6, 0x41, 0xd7, 0xe2, 0xd9, 0xe3, 0x6a, 0x92, 0xd9, 0x0d, 0x13, 0xad, 0xc0, 0x82, 0x6e, 0x0e, + 0x2d, 0x5b, 0x28, 0xc6, 0x8d, 0x79, 0x82, 0xf9, 0xf2, 0x1f, 0x63, 0xc7, 0xcf, 0x95, 0x8f, 0xf3, + 0x58, 0xc2, 0x44, 0x37, 0x60, 0x91, 0x12, 0xaa, 0x0f, 0xba, 0xe2, 0x12, 0x16, 0x58, 0xc8, 0x0c, + 0xf3, 0x7d, 0xca, 0x5c, 0xa5, 0x2f, 0x20, 0xc3, 0xca, 0x12, 0x57, 0x39, 0xa7, 0xb0, 0x77, 0x21, + 0xc1, 0x95, 0x15, 0x9a, 0xcc, 0xbd, 0x0b, 0x55, 0x60, 0x4b, 0xdf, 0x45, 0x21, 0xc7, 0x12, 0x54, + 0x0d, 0x83, 0x78, 0x36, 0x65, 0xed, 0x5f, 0x3e, 0x30, 0x67, 0xf3, 0x47, 0x2f, 0x11, 0x26, 0x76, + 0x99, 0x30, 0xf1, 0xcb, 0x85, 0x59, 0x08, 0x0b, 0xf3, 0x09, 0x2c, 0x9b, 0xe2, 0x7e, 0xba, 0x23, + 0x76, 0x41, 0xf9, 0x04, 0x6b, 0x6a, 0xe5, 0xc2, 0x45, 0x57, 0xed, 0x71, 0x0d, 0xfd, 0x7c, 0xe1, + 0x42, 0xd5, 0xac, 0x19, 0x9e, 0xa8, 0x5b, 0x90, 0x35, 0xb1, 0x63, 0x1d, 0xb3, 0xa9, 0xe8, 0x3e, + 0xc2, 0xe3, 0x7c, 0x92, 0x95, 0xb3, 0x74, 0xea, 0xfd, 0x18, 0x8f, 0x6f, 0xa7, 0x9e, 0x3c, 0xdb, + 0x88, 0xfc, 0xf9, 0x6c, 0x43, 0x2a, 0xfd, 0x05, 0x90, 0x3a, 0x70, 0xc8, 0x88, 0xb8, 0xfa, 0x00, + 0x6d, 0x40, 0x66, 0x24, 0x7e, 0x9f, 0x4a, 0x0f, 0x81, 0xab, 0x61, 0x9e, 0x95, 0x2c, 0x1a, 0x96, + 0x6c, 0xde, 0x68, 0xac, 0x43, 0x9a, 0xc7, 0xf0, 0xff, 0x85, 0xe2, 0x72, 0xcc, 0x1f, 0xf3, 0x13, + 0x07, 0xba, 0x07, 0x8b, 0xae, 0xd7, 0x1b, 0x5a, 0x94, 0x62, 0xb3, 0xab, 0xf3, 0xf1, 0xc8, 0xec, + 0x14, 0x2e, 0x48, 0xd0, 0x0e, 0xf6, 0x05, 0x1f, 0xf6, 0xa7, 0xfe, 0xb0, 0x67, 0x4e, 0x98, 0x55, + 0x8a, 0x6e, 0xc2, 0x12, 0xbf, 0xb5, 0x40, 0xee, 0x04, 0xab, 0x7f, 0x91, 0x39, 0x0f, 0x85, 0xe6, + 0x3b, 0x70, 0x85, 0x83, 0x74, 0x3e, 0x09, 0x27, 0xe0, 0x24, 0x03, 0xff, 0xaf, 0x7f, 0x66, 0x4a, + 0x02, 0xce, 0x1d, 0x48, 0xb8, 0x54, 0xa7, 0x9e, 0x9b, 0x4f, 0xc9, 0xd2, 0x66, 0x76, 0xe7, 0xd6, + 0xec, 0x99, 0x0b, 0x64, 0x2c, 0x6b, 0x0c, 0xac, 0x0a, 0x92, 0x4f, 0x77, 0xb0, 0xeb, 0x0d, 0x68, + 0x3e, 0xfd, 0x8f, 0xe8, 0x2a, 0x03, 0xab, 0x82, 0x84, 0x3e, 0x00, 0x38, 0x26, 0x14, 0x77, 0xfd, + 0x68, 0x38, 0x0f, 0x4c, 0x9d, 0xb5, 0xd9, 0x21, 0xda, 0xfa, 0x60, 0x30, 0x16, 0x0b, 0x28, 0xed, + 0x93, 0xfc, 0x4a, 0x30, 0xba, 0x7b, 0xba, 0x48, 0x32, 0xff, 0x42, 0xdc, 0x80, 0x84, 0x0e, 0x61, + 0x19, 0x3f, 0xc6, 0x86, 0x47, 0x89, 0xd3, 0x15, 0x9d, 0x2c, 0xb2, 0x4e, 0xb6, 0xde, 0xd0, 0x89, + 0x22, 0x58, 0xa2, 0xa3, 0x2c, 0x0e, 0xd9, 0x68, 0x13, 0xe2, 0x43, 0xb7, 0xef, 0xe6, 0x97, 0xd8, + 0x56, 0x9d, 0x39, 0xf4, 0x2a, 0x43, 0x94, 0x5e, 0x48, 0x90, 0xe0, 0xaa, 0xa2, 0x6d, 0x40, 0x5a, + 0xbb, 0xda, 0xee, 0x68, 0xdd, 0x4e, 0x53, 0x3b, 0x50, 0xea, 0x8d, 0xbd, 0x86, 0xb2, 0x9b, 0x8b, + 0x14, 0x56, 0x27, 0x53, 0xf9, 0x4a, 0x90, 0x99, 0x63, 0x1b, 0xf6, 0xb1, 0x3e, 0xb0, 0x4c, 0xb4, + 0x0d, 0x39, 0x41, 0xd1, 0x3a, 0xb5, 0xfb, 0x8d, 0x76, 0x5b, 0xd9, 0xcd, 0x49, 0x85, 0xb5, 0xc9, + 0x54, 0xbe, 0x16, 0x26, 0x68, 0xc1, 0x34, 0xa1, 0xb7, 0x61, 0x49, 0x50, 0xea, 0xfb, 0x2d, 0x4d, + 0xd9, 0xcd, 0x45, 0x0b, 0xf9, 0xc9, 0x54, 0x5e, 0x09, 0xe3, 0xeb, 0x03, 0xe2, 0x62, 0x13, 0x6d, + 0x41, 0x56, 0x80, 0xab, 0xb5, 0x96, 0xea, 0x47, 0x8f, 0xcd, 0x2a, 0xa7, 0xda, 0x23, 0x0e, 0xc5, + 0x66, 0x21, 0xfe, 0xe4, 0xc7, 0x62, 0xa4, 0xf4, 0xab, 0x04, 0x09, 0xa1, 0xc3, 0x36, 0x20, 0x55, + 0xd1, 0x3a, 0xfb, 0xed, 0x79, 0x2d, 0x71, 0x6c, 0xd0, 0xd2, 0x7b, 0x67, 0x28, 0x7b, 0x8d, 0x66, + 0x75, 0xbf, 0xf1, 0x80, 0x35, 0x75, 0x7d, 0x32, 0x95, 0x57, 0xc3, 0x94, 0x8e, 0xfd, 0xd0, 0xb2, + 0xf5, 0x81, 0xf5, 0x35, 0x36, 0x51, 0x05, 0x96, 0x05, 0xad, 0x5a, 0xaf, 0x2b, 0x07, 0x6d, 0xd6, + 0x58, 0x61, 0x32, 0x95, 0xaf, 0x86, 0x39, 0x55, 0xc3, 0xc0, 0x23, 0x1a, 0x22, 0xa8, 0xca, 0x47, + 0x4a, 0x9d, 0xf7, 0x36, 0x83, 0xa0, 0xe2, 0x2f, 0xb1, 0x71, 0xda, 0xdc, 0x0f, 0x51, 0xc8, 0x86, + 0x2f, 0x1f, 0xd5, 0x60, 0x4d, 0xf9, 0x4c, 0xa9, 0x77, 0xda, 0x2d, 0xb5, 0x3b, 0xb3, 0xdb, 0x1b, + 0x93, 0xa9, 0x7c, 0x3d, 0x88, 0x1a, 0x26, 0x07, 0x5d, 0xdf, 0x81, 0x6b, 0xe7, 0x63, 0x34, 0x5b, + 0xed, 0xae, 0xda, 0x69, 0xe6, 0xa4, 0x82, 0x3c, 0x99, 0xca, 0xeb, 0xb3, 0xf9, 0x4d, 0x42, 0x55, + 0xcf, 0x46, 0x77, 0x2f, 0xd2, 0xb5, 0x4e, 0xbd, 0xae, 0x68, 0x5a, 0x2e, 0x3a, 0x2f, 0xbd, 0xe6, + 0x19, 0x86, 0xbf, 0xe3, 0x66, 0xf0, 0xf7, 0xaa, 0x8d, 0xfd, 0x8e, 0xaa, 0xe4, 0x62, 0xf3, 0xf8, + 0x7b, 0xba, 0x35, 0xf0, 0x1c, 0xcc, 0xb5, 0xb9, 0x1d, 0xf7, 0x77, 0x6f, 0xe9, 0x1b, 0x09, 0x16, + 0xd8, 0xbf, 0x2b, 0x5a, 0x83, 0xf4, 0x18, 0xbb, 0x5d, 0xb6, 0x71, 0xc4, 0x43, 0x94, 0x1a, 0x63, + 0xb7, 0xee, 0xdb, 0xfe, 0x4b, 0x64, 0x13, 0x71, 0x26, 0x36, 0xae, 0x4d, 0xf8, 0xd1, 0x4d, 0x58, + 0xd2, 0x7b, 0x2e, 0xd5, 0x2d, 0x5b, 0x9c, 0xf3, 0x17, 0x69, 0x51, 0x38, 0x39, 0xe8, 0x3a, 0xc0, + 0x31, 0xa6, 0x41, 0x84, 0x38, 0xff, 0xc4, 0xf0, 0x3d, 0xec, 0x58, 0xd4, 0xf2, 0x52, 0x82, 0xf8, + 0x21, 0xa1, 0xf8, 0xcd, 0xfb, 0x7f, 0x05, 0x16, 0xfc, 0xb5, 0xe2, 0x04, 0x9f, 0x05, 0xcc, 0xf0, + 0xdf, 0x64, 0xe3, 0x88, 0x58, 0x06, 0x66, 0x25, 0x64, 0x2f, 0x7b, 0x93, 0xeb, 0x0c, 0xa3, 0x0a, + 0xec, 0xdc, 0x37, 0xf3, 0xbf, 0x7a, 0x13, 0xde, 0x32, 0x21, 0xc1, 0xd3, 0xa2, 0xab, 0x80, 0xea, + 0x1f, 0xb6, 0x1a, 0x75, 0x25, 0x3c, 0x76, 0x68, 0x09, 0xd2, 0xc2, 0xdf, 0x6c, 0xe5, 0x24, 0x94, + 0x05, 0x10, 0xe6, 0xe7, 0x8a, 0x96, 0x8b, 0x22, 0x04, 0x59, 0x61, 0x57, 0x6b, 0x5a, 0xbb, 0xda, + 0x68, 0xe6, 0x62, 0x68, 0x19, 0x32, 0xc2, 0x77, 0xa8, 0xb4, 0x5b, 0xb9, 0x78, 0xed, 0xee, 0xf3, + 0x57, 0x45, 0xe9, 0xc5, 0xab, 0xa2, 0xf4, 0xc7, 0xab, 0xa2, 0xf4, 0xf4, 0x75, 0x31, 0xf2, 0xe2, + 0x75, 0x31, 0xf2, 0xf2, 0x75, 0x31, 0xf2, 0xe0, 0xff, 0x7d, 0x8b, 0x1e, 0x79, 0xbd, 0xb2, 0x41, + 0x86, 0xe2, 0x93, 0x56, 0xfc, 0xd9, 0x72, 0xcd, 0x47, 0x95, 0xc7, 0xfc, 0xdb, 0xbb, 0x97, 0x60, + 0x0d, 0xbd, 0xf3, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa6, 0x1c, 0xbf, 0x87, 0x92, 0x0b, 0x00, + 0x00, +} + +func (this *GroupAccountInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GroupAccountInfo) + if !ok { + that2, ok := that.(GroupAccountInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Address != that1.Address { + return false + } + if this.GroupId != that1.GroupId { + return false + } + if this.Admin != that1.Admin { + return false + } + if !bytes.Equal(this.Metadata, that1.Metadata) { + return false + } + if this.Version != that1.Version { + return false + } + if !this.DecisionPolicy.Equal(that1.DecisionPolicy) { + return false + } + if !bytes.Equal(this.DerivationKey, that1.DerivationKey) { + return false + } + return true +} +func (m *Member) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Member) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x1a + } + if len(m.Weight) > 0 { + i -= len(m.Weight) + copy(dAtA[i:], m.Weight) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Weight))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Members) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Members) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Members) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ThresholdDecisionPolicy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ThresholdDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ThresholdDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Timeout, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintTypes(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x12 + if len(m.Threshold) > 0 { + i -= len(m.Threshold) + copy(dAtA[i:], m.Threshold) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Threshold))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GroupInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TotalWeight) > 0 { + i -= len(m.TotalWeight) + copy(dAtA[i:], m.TotalWeight) + i = encodeVarintTypes(dAtA, i, uint64(len(m.TotalWeight))) + i-- + dAtA[i] = 0x2a + } + if m.Version != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x20 + } + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x1a + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x12 + } + if m.GroupId != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GroupMember) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupMember) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupMember) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Member != nil { + { + size, err := m.Member.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.GroupId != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GroupAccountInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupAccountInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupAccountInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DerivationKey) > 0 { + i -= len(m.DerivationKey) + copy(dAtA[i:], m.DerivationKey) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DerivationKey))) + i-- + dAtA[i] = 0x3a + } + if m.DecisionPolicy != nil { + { + size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.Version != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x28 + } + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x22 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x1a + } + if m.GroupId != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GroupId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Proposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Proposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Msgs) > 0 { + for iNdEx := len(m.Msgs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Msgs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + } + } + if m.ExecutorResult != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ExecutorResult)) + i-- + dAtA[i] = 0x60 + } + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timeout, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timeout):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintTypes(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x5a + { + size, err := m.VoteState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + if m.Result != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Result)) + i-- + dAtA[i] = 0x48 + } + if m.Status != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x40 + } + if m.GroupAccountVersion != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GroupAccountVersion)) + i-- + dAtA[i] = 0x38 + } + if m.GroupVersion != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GroupVersion)) + i-- + dAtA[i] = 0x30 + } + n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SubmittedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmittedAt):]) + if err6 != nil { + return 0, err6 + } + i -= n6 + i = encodeVarintTypes(dAtA, i, uint64(n6)) + i-- + dAtA[i] = 0x2a + if len(m.Proposers) > 0 { + for iNdEx := len(m.Proposers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Proposers[iNdEx]) + copy(dAtA[i:], m.Proposers[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Proposers[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x1a + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if m.ProposalId != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Tally) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Tally) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Tally) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.VetoCount) > 0 { + i -= len(m.VetoCount) + copy(dAtA[i:], m.VetoCount) + i = encodeVarintTypes(dAtA, i, uint64(len(m.VetoCount))) + i-- + dAtA[i] = 0x22 + } + if len(m.AbstainCount) > 0 { + i -= len(m.AbstainCount) + copy(dAtA[i:], m.AbstainCount) + i = encodeVarintTypes(dAtA, i, uint64(len(m.AbstainCount))) + i-- + dAtA[i] = 0x1a + } + if len(m.NoCount) > 0 { + i -= len(m.NoCount) + copy(dAtA[i:], m.NoCount) + i = encodeVarintTypes(dAtA, i, uint64(len(m.NoCount))) + i-- + dAtA[i] = 0x12 + } + if len(m.YesCount) > 0 { + i -= len(m.YesCount) + copy(dAtA[i:], m.YesCount) + i = encodeVarintTypes(dAtA, i, uint64(len(m.YesCount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Vote) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Vote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SubmittedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmittedAt):]) + if err7 != nil { + return 0, err7 + } + i -= n7 + i = encodeVarintTypes(dAtA, i, uint64(n7)) + i-- + dAtA[i] = 0x2a + if len(m.Metadata) > 0 { + i -= len(m.Metadata) + copy(dAtA[i:], m.Metadata) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata))) + i-- + dAtA[i] = 0x22 + } + if m.Choice != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Choice)) + i-- + dAtA[i] = 0x18 + } + if len(m.Voter) > 0 { + i -= len(m.Voter) + copy(dAtA[i:], m.Voter) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Voter))) + i-- + dAtA[i] = 0x12 + } + if m.ProposalId != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ProposalId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Member) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Weight) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Members) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *ThresholdDecisionPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Threshold) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout) + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func (m *GroupInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GroupId != 0 { + n += 1 + sovTypes(uint64(m.GroupId)) + } + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Version != 0 { + n += 1 + sovTypes(uint64(m.Version)) + } + l = len(m.TotalWeight) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *GroupMember) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GroupId != 0 { + n += 1 + sovTypes(uint64(m.GroupId)) + } + if m.Member != nil { + l = m.Member.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *GroupAccountInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.GroupId != 0 { + n += 1 + sovTypes(uint64(m.GroupId)) + } + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Version != 0 { + n += 1 + sovTypes(uint64(m.Version)) + } + if m.DecisionPolicy != nil { + l = m.DecisionPolicy.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.DerivationKey) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Proposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovTypes(uint64(m.ProposalId)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Proposers) > 0 { + for _, s := range m.Proposers { + l = len(s) + n += 1 + l + sovTypes(uint64(l)) + } + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmittedAt) + n += 1 + l + sovTypes(uint64(l)) + if m.GroupVersion != 0 { + n += 1 + sovTypes(uint64(m.GroupVersion)) + } + if m.GroupAccountVersion != 0 { + n += 1 + sovTypes(uint64(m.GroupAccountVersion)) + } + if m.Status != 0 { + n += 1 + sovTypes(uint64(m.Status)) + } + if m.Result != 0 { + n += 1 + sovTypes(uint64(m.Result)) + } + l = m.VoteState.Size() + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timeout) + n += 1 + l + sovTypes(uint64(l)) + if m.ExecutorResult != 0 { + n += 1 + sovTypes(uint64(m.ExecutorResult)) + } + if len(m.Msgs) > 0 { + for _, e := range m.Msgs { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *Tally) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.YesCount) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.NoCount) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.AbstainCount) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.VetoCount) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Vote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProposalId != 0 { + n += 1 + sovTypes(uint64(m.ProposalId)) + } + l = len(m.Voter) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Choice != 0 { + n += 1 + sovTypes(uint64(m.Choice)) + } + l = len(m.Metadata) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmittedAt) + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Member) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Member: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Member: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Weight = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) + if m.Metadata == nil { + m.Metadata = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Members) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Members: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Members: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, Member{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ThresholdDecisionPolicy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ThresholdDecisionPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ThresholdDecisionPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Threshold = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Timeout, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) + if m.Metadata == nil { + m.Metadata = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalWeight", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TotalWeight = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupMember) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupMember: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupMember: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Member", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Member == nil { + m.Member = &Member{} + } + if err := m.Member.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupAccountInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupAccountInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupAccountInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + m.GroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) + if m.Metadata == nil { + m.Metadata = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DecisionPolicy == nil { + m.DecisionPolicy = &types.Any{} + } + if err := m.DecisionPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivationKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivationKey = append(m.DerivationKey[:0], dAtA[iNdEx:postIndex]...) + if m.DerivationKey == nil { + m.DerivationKey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Proposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Proposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) + if m.Metadata == nil { + m.Metadata = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proposers = append(m.Proposers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubmittedAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.SubmittedAt, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupVersion", wireType) + } + m.GroupVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupVersion |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupAccountVersion", wireType) + } + m.GroupAccountVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupAccountVersion |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= Proposal_Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + m.Result = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Result |= Proposal_Result(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VoteState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VoteState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timeout, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorResult", wireType) + } + m.ExecutorResult = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExecutorResult |= Proposal_ExecutorResult(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msgs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Msgs = append(m.Msgs, &types.Any{}) + if err := m.Msgs[len(m.Msgs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Tally) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Tally: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tally: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field YesCount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.YesCount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NoCount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NoCount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AbstainCount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AbstainCount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VetoCount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VetoCount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Vote) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Vote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) + } + m.ProposalId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Voter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Choice", wireType) + } + m.Choice = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Choice |= Choice(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) + if m.Metadata == nil { + m.Metadata = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubmittedAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.SubmittedAt, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +)