group

package
v0.47.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 40 Imported by: 0

README


sidebar_position: 1

x/group

Abstract

The following documents specify the group module.

This module allows the creation and management of on-chain multisig accounts and enables voting for message execution based on configurable decision policies.

Contents

Concepts

Group

A group is simply an aggregation of accounts with associated weights. It is not an account and doesn't have a balance. It doesn't in and of itself have any sort of voting or decision weight. It does have an "administrator" which has the ability to add, remove and update members in the group. Note that a group policy account could be an administrator of a group, and that the administrator doesn't necessarily have to be a member of the group.

Group Policy

A group policy is an account associated with a group and a decision policy. Group policies are abstracted from groups because a single group may have multiple decision policies for different types of actions. Managing group membership separately from decision policies results in the least overhead and keeps membership consistent across different policies. The pattern that is recommended is to have a single master group policy for a given group, and then to create separate group policies with different decision policies and delegate the desired permissions from the master account to those "sub-accounts" using the x/authz module.

Decision Policy

A decision policy is the mechanism by which members of a group can vote on proposals, as well as the rules that dictate whether a proposal should pass or not based on its tally outcome.

All decision policies generally would have a mininum execution period and a maximum voting window. The minimum execution period is the minimum amount of time that must pass after submission in order for a proposal to potentially be executed, and it may be set to 0. The maximum voting window is the maximum time after submission that a proposal may be voted on before it is tallied.

The chain developer also defines an app-wide maximum execution period, which is the maximum amount of time after a proposal's voting period end where users are allowed to execute a proposal.

The current group module comes shipped with two decision policies: threshold and percentage. Any chain developer can extend upon these two, by creating custom decision policies, as long as they adhere to the DecisionPolicy interface:

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/x/group/types.go#L27-L41
Threshold decision policy

A threshold decision policy defines a threshold of yes votes (based on a tally of voter weights) that must be achieved in order for a proposal to pass. For this decision policy, abstain and veto are simply treated as no's.

This decision policy also has a VotingPeriod window and a MinExecutionPeriod window. The former defines the duration after proposal submission where members are allowed to vote, after which tallying is performed. The latter specifies the minimum duration after proposal submission where the proposal can be executed. If set to 0, then the proposal is allowed to be executed immediately on submission (using the TRY_EXEC option). Obviously, MinExecutionPeriod cannot be greater than VotingPeriod+MaxExecutionPeriod (where MaxExecution is the app-defined duration that specifies the window after voting ended where a proposal can be executed).

Percentage decision policy

A percentage decision policy is similar to a threshold decision policy, except that the threshold is not defined as a constant weight, but as a percentage. It's more suited for groups where the group members' weights can be updated, as the percentage threshold stays the same, and doesn't depend on how those member weights get updated.

Same as the Threshold decision policy, the percentage decision policy has the two VotingPeriod and MinExecutionPeriod parameters.

Proposal

Any member(s) of a group can submit a proposal for a group policy account to decide upon. A proposal consists of a set of messages that will be executed if the proposal passes as well as any metadata associated with the proposal.

Voting

There are four choices to choose while voting - yes, no, abstain and veto. Not all decision policies will take the four choices into account. Votes can contain some optional metadata. In the current implementation, the voting window begins as soon as a proposal is submitted, and the end is defined by the group policy's decision policy.

Withdrawing Proposals

Proposals can be withdrawn any time before the voting period end, either by the admin of the group policy or by one of the proposers. Once withdrawn, it is marked as PROPOSAL_STATUS_WITHDRAWN, and no more voting or execution is allowed on it.

Aborted Proposals

If the group policy is updated during the voting period of the proposal, then the proposal is marked as PROPOSAL_STATUS_ABORTED, and no more voting or execution is allowed on it. This is because the group policy defines the rules of proposal voting and execution, so if those rules change during the lifecycle of a proposal, then the proposal should be marked as stale.

Tallying

Tallying is the counting of all votes on a proposal. It happens only once in the lifecycle of a proposal, but can be triggered by two factors, whichever happens first:

  • either someone tries to execute the proposal (see next section), which can happen on a Msg/Exec transaction, or a Msg/{SubmitProposal,Vote} transaction with the Exec field set. When a proposal execution is attempted, a tally is done first to make sure the proposal passes.
  • or on EndBlock when the proposal's voting period end just passed.

If the tally result passes the decision policy's rules, then the proposal is marked as PROPOSAL_STATUS_ACCEPTED, or else it is marked as PROPOSAL_STATUS_REJECTED. In any case, no more voting is allowed anymore, and the tally result is persisted to state in the proposal's FinalTallyResult.

Executing Proposals

Proposals are executed only when the tallying is done, and the group account's decision policy allows the proposal to pass based on the tally outcome. They are marked by the status PROPOSAL_STATUS_ACCEPTED. Execution must happen before a duration of MaxExecutionPeriod (set by the chain developer) after each proposal's voting period end.

Proposals will not be automatically executed by the chain in this current design, but rather a user must submit a Msg/Exec transaction to attempt to execute the proposal based on the current votes and decision policy. Any user (not only the group members) can execute proposals that have been accepted, and execution fees are paid by the proposal executor. It's also possible to try to execute a proposal immediately on creation or on new votes using the Exec field of Msg/SubmitProposal and Msg/Vote requests. In the former case, proposers signatures are considered as yes votes. In these cases, if the proposal can't be executed (i.e. it didn't pass the decision policy's rules), it will still be opened for new votes and could be tallied and executed later on.

A successful proposal execution will have its ExecutorResult marked as PROPOSAL_EXECUTOR_RESULT_SUCCESS. The proposal will be automatically pruned after execution. On the other hand, a failed proposal execution will be marked as PROPOSAL_EXECUTOR_RESULT_FAILURE. Such a proposal can be re-executed multiple times, until it expires after MaxExecutionPeriod after voting period end.

Pruning

Proposals and votes are automatically pruned to avoid state bloat.

Votes are pruned:

  • either after a successful tally, i.e. a tally whose result passes the decision policy's rules, which can be trigged by a Msg/Exec or a Msg/{SubmitProposal,Vote} with the Exec field set,
  • or on EndBlock right after the proposal's voting period end. This applies to proposals with status aborted or withdrawn too.

whichever happens first.

Proposals are pruned:

  • on EndBlock whose proposal status is withdrawn or aborted on proposal's voting period end before tallying,
  • and either after a successful proposal execution,
  • or on EndBlock right after the proposal's voting_period_end + max_execution_period (defined as an app-wide configuration) is passed,

whichever happens first.

State

The group module uses the orm package which provides table storage with support for primary keys and secondary indexes. orm also defines Sequence which is a persistent unique key generator based on a counter that can be used along with Tables.

Here's the list of tables and associated sequences and indexes stored as part of the group module.

Group Table

The groupTable stores GroupInfo: 0x0 | BigEndian(GroupId) -> ProtocolBuffer(GroupInfo).

groupSeq

The value of groupSeq is incremented when creating a new group and corresponds to the new GroupId: 0x1 | 0x1 -> BigEndian.

The second 0x1 corresponds to the ORM sequenceStorageKey.

groupByAdminIndex

groupByAdminIndex allows to retrieve groups by admin address: 0x2 | len([]byte(group.Admin)) | []byte(group.Admin) | BigEndian(GroupId) -> []byte().

Group Member Table

The groupMemberTable stores GroupMembers: 0x10 | BigEndian(GroupId) | []byte(member.Address) -> ProtocolBuffer(GroupMember).

The groupMemberTable is a primary key table and its PrimaryKey is given by BigEndian(GroupId) | []byte(member.Address) which is used by the following indexes.

groupMemberByGroupIndex

groupMemberByGroupIndex allows to retrieve group members by group id: 0x11 | BigEndian(GroupId) | PrimaryKey -> []byte().

groupMemberByMemberIndex

groupMemberByMemberIndex allows to retrieve group members by member address: 0x12 | len([]byte(member.Address)) | []byte(member.Address) | PrimaryKey -> []byte().

Group Policy Table

The groupPolicyTable stores GroupPolicyInfo: 0x20 | len([]byte(Address)) | []byte(Address) -> ProtocolBuffer(GroupPolicyInfo).

The groupPolicyTable is a primary key table and its PrimaryKey is given by len([]byte(Address)) | []byte(Address) which is used by the following indexes.

groupPolicySeq

The value of groupPolicySeq is incremented when creating a new group policy and is used to generate the new group policy account Address: 0x21 | 0x1 -> BigEndian.

The second 0x1 corresponds to the ORM sequenceStorageKey.

groupPolicyByGroupIndex

groupPolicyByGroupIndex allows to retrieve group policies by group id: 0x22 | BigEndian(GroupId) | PrimaryKey -> []byte().

groupPolicyByAdminIndex

groupPolicyByAdminIndex allows to retrieve group policies by admin address: 0x23 | len([]byte(Address)) | []byte(Address) | PrimaryKey -> []byte().

Proposal Table

The proposalTable stores Proposals: 0x30 | BigEndian(ProposalId) -> ProtocolBuffer(Proposal).

proposalSeq

The value of proposalSeq is incremented when creating a new proposal and corresponds to the new ProposalId: 0x31 | 0x1 -> BigEndian.

The second 0x1 corresponds to the ORM sequenceStorageKey.

proposalByGroupPolicyIndex

proposalByGroupPolicyIndex allows to retrieve proposals by group policy account address: 0x32 | len([]byte(account.Address)) | []byte(account.Address) | BigEndian(ProposalId) -> []byte().

ProposalsByVotingPeriodEndIndex

proposalsByVotingPeriodEndIndex allows to retrieve proposals sorted by chronological voting_period_end: 0x33 | sdk.FormatTimeBytes(proposal.VotingPeriodEnd) | BigEndian(ProposalId) -> []byte().

This index is used when tallying the proposal votes at the end of the voting period, and for pruning proposals at VotingPeriodEnd + MaxExecutionPeriod.

Vote Table

The voteTable stores Votes: 0x40 | BigEndian(ProposalId) | []byte(voter.Address) -> ProtocolBuffer(Vote).

The voteTable is a primary key table and its PrimaryKey is given by BigEndian(ProposalId) | []byte(voter.Address) which is used by the following indexes.

voteByProposalIndex

voteByProposalIndex allows to retrieve votes by proposal id: 0x41 | BigEndian(ProposalId) | PrimaryKey -> []byte().

voteByVoterIndex

voteByVoterIndex allows to retrieve votes by voter address: 0x42 | len([]byte(voter.Address)) | []byte(voter.Address) | PrimaryKey -> []byte().

Msg Service

Msg/CreateGroup

A new group can be created with the MsgCreateGroup, which has an admin address, a list of members and some optional metadata.

The metadata has a maximum length that is chosen by the app developer, and passed into the group keeper as a config.

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L66-L78

It's expected to fail if

  • metadata length is greater than MaxMetadataLen config
  • members are not correctly set (e.g. wrong address format, duplicates, or with 0 weight).

Msg/UpdateGroupMembers

Group members can be updated with the UpdateGroupMembers.

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L87-L100

In the list of MemberUpdates, an existing member can be removed by setting its weight to 0.

It's expected to fail if:

  • the signer is not the admin of the group.
  • for any one of the associated group policies, if its decision policy's Validate() method fails against the updated group.

Msg/UpdateGroupAdmin

The UpdateGroupAdmin can be used to update a group admin.

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L105-L117

It's expected to fail if the signer is not the admin of the group.

Msg/UpdateGroupMetadata

The UpdateGroupMetadata can be used to update a group metadata.

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L122-L134

It's expected to fail if:

  • new metadata length is greater than MaxMetadataLen config.
  • the signer is not the admin of the group.

Msg/CreateGroupPolicy

A new group policy can be created with the MsgCreateGroupPolicy, which has an admin address, a group id, a decision policy and some optional metadata.

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L143-L160

It's expected to fail if:

  • the signer is not the admin of the group.
  • metadata length is greater than MaxMetadataLen config.
  • the decision policy's Validate() method doesn't pass against the group.

Msg/CreateGroupWithPolicy

A new group with policy can be created with the MsgCreateGroupWithPolicy, which has an admin address, a list of members, a decision policy, a group_policy_as_admin field to optionally set group and group policy admin with group policy address and some optional metadata for group and group policy.

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L183-L206

It's expected to fail for the same reasons as Msg/CreateGroup and Msg/CreateGroupPolicy.

Msg/UpdateGroupPolicyAdmin

The UpdateGroupPolicyAdmin can be used to update a group policy admin.

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L169-L181

It's expected to fail if the signer is not the admin of the group policy.

Msg/UpdateGroupPolicyDecisionPolicy

The UpdateGroupPolicyDecisionPolicy can be used to update a decision policy.

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L219-L235

It's expected to fail if:

  • the signer is not the admin of the group policy.
  • the new decision policy's Validate() method doesn't pass against the group.

Msg/UpdateGroupPolicyMetadata

The UpdateGroupPolicyMetadata can be used to update a group policy metadata.

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L240-L252

It's expected to fail if:

  • new metadata length is greater than MaxMetadataLen config.
  • the signer is not the admin of the group.

Msg/SubmitProposal

A new proposal can be created with the MsgSubmitProposal, which has a group policy account address, a list of proposers addresses, a list of messages to execute if the proposal is accepted and some optional metadata. An optional Exec value can be provided to try to execute the proposal immediately after proposal creation. Proposers signatures are considered as yes votes in this case.

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L275-L298

It's expected to fail if:

  • metadata, title, or summary length is greater than MaxMetadataLen config.
  • if any of the proposers is not a group member.

Msg/WithdrawProposal

A proposal can be withdrawn using MsgWithdrawProposal which has an address (can be either a proposer or the group policy admin) and a proposal_id (which has to be withdrawn).

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L307-L316

It's expected to fail if:

  • the signer is neither the group policy admin nor proposer of the proposal.
  • the proposal is already closed or aborted.

Msg/Vote

A new vote can be created with the MsgVote, given a proposal id, a voter address, a choice (yes, no, veto or abstain) and some optional metadata. An optional Exec value can be provided to try to execute the proposal immediately after voting.

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L321-L339

It's expected to fail if:

  • metadata length is greater than MaxMetadataLen config.
  • the proposal is not in voting period anymore.

Msg/Exec

A proposal can be executed with the MsgExec.

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L341-L353

The messages that are part of this proposal won't be executed if:

  • the proposal has not been accepted by the group policy.
  • the proposal has already been successfully executed.

Msg/LeaveGroup

The MsgLeaveGroup allows group member to leave a group.

https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/proto/cosmos/group/v1/tx.proto#L362-L370

It's expected to fail if:

  • the group member is not part of the group.
  • for any one of the associated group policies, if its decision policy's Validate() method fails against the updated group.

Events

The group module emits the following events:

EventCreateGroup

Type Attribute Key Attribute Value
message action /cosmos.group.v1.Msg/CreateGroup
cosmos.group.v1.EventCreateGroup group_id {groupId}

EventUpdateGroup

Type Attribute Key Attribute Value
message action /cosmos.group.v1.Msg/UpdateGroup{Admin|Metadata|Members}
cosmos.group.v1.EventUpdateGroup group_id {groupId}

EventCreateGroupPolicy

Type Attribute Key Attribute Value
message action /cosmos.group.v1.Msg/CreateGroupPolicy
cosmos.group.v1.EventCreateGroupPolicy address {groupPolicyAddress}

EventUpdateGroupPolicy

Type Attribute Key Attribute Value
message action /cosmos.group.v1.Msg/UpdateGroupPolicy{Admin|Metadata|DecisionPolicy}
cosmos.group.v1.EventUpdateGroupPolicy address {groupPolicyAddress}

EventCreateProposal

Type Attribute Key Attribute Value
message action /cosmos.group.v1.Msg/CreateProposal
cosmos.group.v1.EventCreateProposal proposal_id {proposalId}

EventWithdrawProposal

Type Attribute Key Attribute Value
message action /cosmos.group.v1.Msg/WithdrawProposal
cosmos.group.v1.EventWithdrawProposal proposal_id {proposalId}

EventVote

Type Attribute Key Attribute Value
message action /cosmos.group.v1.Msg/Vote
cosmos.group.v1.EventVote proposal_id {proposalId}

EventExec

Type Attribute Key Attribute Value
message action /cosmos.group.v1.Msg/Exec
cosmos.group.v1.EventExec proposal_id {proposalId}
cosmos.group.v1.EventExec logs {logs_string}

EventLeaveGroup

Type Attribute Key Attribute Value
message action /cosmos.group.v1.Msg/LeaveGroup
cosmos.group.v1.EventLeaveGroup proposal_id {proposalId}
cosmos.group.v1.EventLeaveGroup address {address}

Client

CLI

A user can query and interact with the group module using the CLI.

Query

The query commands allow users to query group state.

simd query group --help
group-info

The group-info command allows users to query for group info by given group id.

simd query group group-info [id] [flags]

Example:

simd query group group-info 1

Example Output:

admin: cosmos1..
group_id: "1"
metadata: AQ==
total_weight: "3"
version: "1"
group-policy-info

The group-policy-info command allows users to query for group policy info by account address of group policy .

simd query group group-policy-info [group-policy-account] [flags]

Example:

simd query group group-policy-info cosmos1..

Example Output:

address: cosmos1..
admin: cosmos1..
decision_policy:
  '@type': /cosmos.group.v1.ThresholdDecisionPolicy
  threshold: "1"
  windows:
      min_execution_period: 0s
      voting_period: 432000s
group_id: "1"
metadata: AQ==
version: "1"
group-members

The group-members command allows users to query for group members by group id with pagination flags.

simd query group group-members [id] [flags]

Example:

simd query group group-members 1

Example Output:

members:
- group_id: "1"
  member:
    address: cosmos1..
    metadata: AQ==
    weight: "2"
- group_id: "1"
  member:
    address: cosmos1..
    metadata: AQ==
    weight: "1"
pagination:
  next_key: null
  total: "2"
groups-by-admin

The groups-by-admin command allows users to query for groups by admin account address with pagination flags.

simd query group groups-by-admin [admin] [flags]

Example:

simd query group groups-by-admin cosmos1..

Example Output:

groups:
- admin: cosmos1..
  group_id: "1"
  metadata: AQ==
  total_weight: "3"
  version: "1"
- admin: cosmos1..
  group_id: "2"
  metadata: AQ==
  total_weight: "3"
  version: "1"
pagination:
  next_key: null
  total: "2"
group-policies-by-group

The group-policies-by-group command allows users to query for group policies by group id with pagination flags.

simd query group group-policies-by-group [group-id] [flags]

Example:

simd query group group-policies-by-group 1

Example Output:

group_policies:
- address: cosmos1..
  admin: cosmos1..
  decision_policy:
    '@type': /cosmos.group.v1.ThresholdDecisionPolicy
    threshold: "1"
    windows:
      min_execution_period: 0s
      voting_period: 432000s
  group_id: "1"
  metadata: AQ==
  version: "1"
- address: cosmos1..
  admin: cosmos1..
  decision_policy:
    '@type': /cosmos.group.v1.ThresholdDecisionPolicy
    threshold: "1"
    windows:
      min_execution_period: 0s
      voting_period: 432000s
  group_id: "1"
  metadata: AQ==
  version: "1"
pagination:
  next_key: null
  total: "2"
group-policies-by-admin

The group-policies-by-admin command allows users to query for group policies by admin account address with pagination flags.

simd query group group-policies-by-admin [admin] [flags]

Example:

simd query group group-policies-by-admin cosmos1..

Example Output:

group_policies:
- address: cosmos1..
  admin: cosmos1..
  decision_policy:
    '@type': /cosmos.group.v1.ThresholdDecisionPolicy
    threshold: "1"
    windows:
      min_execution_period: 0s
      voting_period: 432000s
  group_id: "1"
  metadata: AQ==
  version: "1"
- address: cosmos1..
  admin: cosmos1..
  decision_policy:
    '@type': /cosmos.group.v1.ThresholdDecisionPolicy
    threshold: "1"
    windows:
      min_execution_period: 0s
      voting_period: 432000s
  group_id: "1"
  metadata: AQ==
  version: "1"
pagination:
  next_key: null
  total: "2"
proposal

The proposal command allows users to query for proposal by id.

simd query group proposal [id] [flags]

Example:

simd query group proposal 1

Example Output:

proposal:
  address: cosmos1..
  executor_result: EXECUTOR_RESULT_NOT_RUN
  group_policy_version: "1"
  group_version: "1"
  metadata: AQ==
  msgs:
  - '@type': /cosmos.bank.v1beta1.MsgSend
    amount:
    - amount: "100000000"
      denom: stake
    from_address: cosmos1..
    to_address: cosmos1..
  proposal_id: "1"
  proposers:
  - cosmos1..
  result: RESULT_UNFINALIZED
  status: STATUS_SUBMITTED
  submitted_at: "2021-12-17T07:06:26.310638964Z"
  windows:
    min_execution_period: 0s
    voting_period: 432000s
  vote_state:
    abstain_count: "0"
    no_count: "0"
    veto_count: "0"
    yes_count: "0"
  summary: "Summary"
  title: "Title"
proposals-by-group-policy

The proposals-by-group-policy command allows users to query for proposals by account address of group policy with pagination flags.

simd query group proposals-by-group-policy [group-policy-account] [flags]

Example:

simd query group proposals-by-group-policy cosmos1..

Example Output:

pagination:
  next_key: null
  total: "1"
proposals:
- address: cosmos1..
  executor_result: EXECUTOR_RESULT_NOT_RUN
  group_policy_version: "1"
  group_version: "1"
  metadata: AQ==
  msgs:
  - '@type': /cosmos.bank.v1beta1.MsgSend
    amount:
    - amount: "100000000"
      denom: stake
    from_address: cosmos1..
    to_address: cosmos1..
  proposal_id: "1"
  proposers:
  - cosmos1..
  result: RESULT_UNFINALIZED
  status: STATUS_SUBMITTED
  submitted_at: "2021-12-17T07:06:26.310638964Z"
  windows:
    min_execution_period: 0s
    voting_period: 432000s
  vote_state:
    abstain_count: "0"
    no_count: "0"
    veto_count: "0"
    yes_count: "0"
  summary: "Summary"
  title: "Title"
vote

The vote command allows users to query for vote by proposal id and voter account address.

simd query group vote [proposal-id] [voter] [flags]

Example:

simd query group vote 1 cosmos1..

Example Output:

vote:
  choice: CHOICE_YES
  metadata: AQ==
  proposal_id: "1"
  submitted_at: "2021-12-17T08:05:02.490164009Z"
  voter: cosmos1..
votes-by-proposal

The votes-by-proposal command allows users to query for votes by proposal id with pagination flags.

simd query group votes-by-proposal [proposal-id] [flags]

Example:

simd query group votes-by-proposal 1

Example Output:

pagination:
  next_key: null
  total: "1"
votes:
- choice: CHOICE_YES
  metadata: AQ==
  proposal_id: "1"
  submitted_at: "2021-12-17T08:05:02.490164009Z"
  voter: cosmos1..
votes-by-voter

The votes-by-voter command allows users to query for votes by voter account address with pagination flags.

simd query group votes-by-voter [voter] [flags]

Example:

simd query group votes-by-voter cosmos1..

Example Output:

pagination:
  next_key: null
  total: "1"
votes:
- choice: CHOICE_YES
  metadata: AQ==
  proposal_id: "1"
  submitted_at: "2021-12-17T08:05:02.490164009Z"
  voter: cosmos1..

Transactions

The tx commands allow users to interact with the group module.

simd tx group --help
create-group

The create-group command allows users to create a group which is an aggregation of member accounts with associated weights and an administrator account.

simd tx group create-group [admin] [metadata] [members-json-file]

Example:

simd tx group create-group cosmos1.. "AQ==" members.json
update-group-admin

The update-group-admin command allows users to update a group's admin.

simd tx group update-group-admin [admin] [group-id] [new-admin] [flags]

Example:

simd tx group update-group-admin cosmos1.. 1 cosmos1..
update-group-members

The update-group-members command allows users to update a group's members.

simd tx group update-group-members [admin] [group-id] [members-json-file] [flags]

Example:

simd tx group update-group-members cosmos1.. 1 members.json
update-group-metadata

The update-group-metadata command allows users to update a group's metadata.

simd tx group update-group-metadata [admin] [group-id] [metadata] [flags]

Example:

simd tx group update-group-metadata cosmos1.. 1 "AQ=="
create-group-policy

The create-group-policy command allows users to create a group policy which is an account associated with a group and a decision policy.

simd tx group create-group-policy [admin] [group-id] [metadata] [decision-policy] [flags]

Example:

simd tx group create-group-policy cosmos1.. 1 "AQ==" '{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}'
create-group-with-policy

The create-group-with-policy command allows users to create a group which is an aggregation of member accounts with associated weights and an administrator account with decision policy. If the --group-policy-as-admin flag is set to true, the group policy address becomes the group and group policy admin.

simd tx group create-group-with-policy [admin] [group-metadata] [group-policy-metadata] [members-json-file] [decision-policy] [flags]

Example:

simd tx group create-group-with-policy cosmos1.. "AQ==" "AQ==" members.json '{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}'
update-group-policy-admin

The update-group-policy-admin command allows users to update a group policy admin.

simd tx group update-group-policy-admin [admin] [group-policy-account] [new-admin] [flags]

Example:

simd tx group update-group-policy-admin cosmos1.. cosmos1.. cosmos1..
update-group-policy-metadata

The update-group-policy-metadata command allows users to update a group policy metadata.

simd tx group update-group-policy-metadata [admin] [group-policy-account] [new-metadata] [flags]

Example:

simd tx group update-group-policy-metadata cosmos1.. cosmos1.. "AQ=="
update-group-policy-decision-policy

The update-group-policy-decision-policy command allows users to update a group policy's decision policy.

simd  tx group update-group-policy-decision-policy [admin] [group-policy-account] [decision-policy] [flags]

Example:

simd tx group update-group-policy-decision-policy cosmos1.. cosmos1.. '{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"2", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}'
create-proposal

The create-proposal command allows users to submit a new proposal.

simd tx group create-proposal [group-policy-account] [proposer[,proposer]*] [msg_tx_json_file] [metadata] [flags]

Example:

simd tx group create-proposal cosmos1.. cosmos1.. msg_tx.json "AQ=="
withdraw-proposal

The withdraw-proposal command allows users to withdraw a proposal.

simd tx group withdraw-proposal [proposal-id] [group-policy-admin-or-proposer]

Example:

simd tx group withdraw-proposal 1 cosmos1..
vote

The vote command allows users to vote on a proposal.

simd tx group vote proposal-id] [voter] [choice] [metadata] [flags]

Example:

simd tx group vote 1 cosmos1.. CHOICE_YES "AQ=="
exec

The exec command allows users to execute a proposal.

simd tx group exec [proposal-id] [flags]

Example:

simd tx group exec 1
leave-group

The leave-group command allows group member to leave the group.

simd tx group leave-group [member-address] [group-id]

Example:

simd tx group leave-group cosmos1... 1

gRPC

A user can query the group module using gRPC endpoints.

GroupInfo

The GroupInfo endpoint allows users to query for group info by given group id.

cosmos.group.v1.Query/GroupInfo

Example:

grpcurl -plaintext \
    -d '{"group_id":1}' localhost:9090 cosmos.group.v1.Query/GroupInfo

Example Output:

{
  "info": {
    "groupId": "1",
    "admin": "cosmos1..",
    "metadata": "AQ==",
    "version": "1",
    "totalWeight": "3"
  }
}
GroupPolicyInfo

The GroupPolicyInfo endpoint allows users to query for group policy info by account address of group policy.

cosmos.group.v1.Query/GroupPolicyInfo

Example:

grpcurl -plaintext \
    -d '{"address":"cosmos1.."}'  localhost:9090 cosmos.group.v1.Query/GroupPolicyInfo

Example Output:

{
  "info": {
    "address": "cosmos1..",
    "groupId": "1",
    "admin": "cosmos1..",
    "version": "1",
    "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows": {"voting_period": "120h", "min_execution_period": "0s"}},
  }
}
GroupMembers

The GroupMembers endpoint allows users to query for group members by group id with pagination flags.

cosmos.group.v1.Query/GroupMembers

Example:

grpcurl -plaintext \
    -d '{"group_id":"1"}'  localhost:9090 cosmos.group.v1.Query/GroupMembers

Example Output:

{
  "members": [
    {
      "groupId": "1",
      "member": {
        "address": "cosmos1..",
        "weight": "1"
      }
    },
    {
      "groupId": "1",
      "member": {
        "address": "cosmos1..",
        "weight": "2"
      }
    }
  ],
  "pagination": {
    "total": "2"
  }
}
GroupsByAdmin

The GroupsByAdmin endpoint allows users to query for groups by admin account address with pagination flags.

cosmos.group.v1.Query/GroupsByAdmin

Example:

grpcurl -plaintext \
    -d '{"admin":"cosmos1.."}'  localhost:9090 cosmos.group.v1.Query/GroupsByAdmin

Example Output:

{
  "groups": [
    {
      "groupId": "1",
      "admin": "cosmos1..",
      "metadata": "AQ==",
      "version": "1",
      "totalWeight": "3"
    },
    {
      "groupId": "2",
      "admin": "cosmos1..",
      "metadata": "AQ==",
      "version": "1",
      "totalWeight": "3"
    }
  ],
  "pagination": {
    "total": "2"
  }
}
GroupPoliciesByGroup

The GroupPoliciesByGroup endpoint allows users to query for group policies by group id with pagination flags.

cosmos.group.v1.Query/GroupPoliciesByGroup

Example:

grpcurl -plaintext \
    -d '{"group_id":"1"}'  localhost:9090 cosmos.group.v1.Query/GroupPoliciesByGroup

Example Output:

{
  "GroupPolicies": [
    {
      "address": "cosmos1..",
      "groupId": "1",
      "admin": "cosmos1..",
      "version": "1",
      "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}},
    },
    {
      "address": "cosmos1..",
      "groupId": "1",
      "admin": "cosmos1..",
      "version": "1",
      "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}},
    }
  ],
  "pagination": {
    "total": "2"
  }
}
GroupPoliciesByAdmin

The GroupPoliciesByAdmin endpoint allows users to query for group policies by admin account address with pagination flags.

cosmos.group.v1.Query/GroupPoliciesByAdmin

Example:

grpcurl -plaintext \
    -d '{"admin":"cosmos1.."}'  localhost:9090 cosmos.group.v1.Query/GroupPoliciesByAdmin

Example Output:

{
  "GroupPolicies": [
    {
      "address": "cosmos1..",
      "groupId": "1",
      "admin": "cosmos1..",
      "version": "1",
      "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}},
    },
    {
      "address": "cosmos1..",
      "groupId": "1",
      "admin": "cosmos1..",
      "version": "1",
      "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}},
    }
  ],
  "pagination": {
    "total": "2"
  }
}
Proposal

The Proposal endpoint allows users to query for proposal by id.

cosmos.group.v1.Query/Proposal

Example:

grpcurl -plaintext \
    -d '{"proposal_id":"1"}'  localhost:9090 cosmos.group.v1.Query/Proposal

Example Output:

{
  "proposal": {
    "proposalId": "1",
    "address": "cosmos1..",
    "proposers": [
      "cosmos1.."
    ],
    "submittedAt": "2021-12-17T07:06:26.310638964Z",
    "groupVersion": "1",
    "GroupPolicyVersion": "1",
    "status": "STATUS_SUBMITTED",
    "result": "RESULT_UNFINALIZED",
    "voteState": {
      "yesCount": "0",
      "noCount": "0",
      "abstainCount": "0",
      "vetoCount": "0"
    },
    "windows": {
      "min_execution_period": "0s",
      "voting_period": "432000s"
    },
    "executorResult": "EXECUTOR_RESULT_NOT_RUN",
    "messages": [
      {"@type":"/cosmos.bank.v1beta1.MsgSend","amount":[{"denom":"stake","amount":"100000000"}],"fromAddress":"cosmos1..","toAddress":"cosmos1.."}
    ],
    "title": "Title",
    "summary": "Summary",
  }
}
ProposalsByGroupPolicy

The ProposalsByGroupPolicy endpoint allows users to query for proposals by account address of group policy with pagination flags.

cosmos.group.v1.Query/ProposalsByGroupPolicy

Example:

grpcurl -plaintext \
    -d '{"address":"cosmos1.."}'  localhost:9090 cosmos.group.v1.Query/ProposalsByGroupPolicy

Example Output:

{
  "proposals": [
    {
      "proposalId": "1",
      "address": "cosmos1..",
      "proposers": [
        "cosmos1.."
      ],
      "submittedAt": "2021-12-17T08:03:27.099649352Z",
      "groupVersion": "1",
      "GroupPolicyVersion": "1",
      "status": "STATUS_CLOSED",
      "result": "RESULT_ACCEPTED",
      "voteState": {
        "yesCount": "1",
        "noCount": "0",
        "abstainCount": "0",
        "vetoCount": "0"
      },
      "windows": {
        "min_execution_period": "0s",
        "voting_period": "432000s"
      },
      "executorResult": "EXECUTOR_RESULT_NOT_RUN",
      "messages": [
        {"@type":"/cosmos.bank.v1beta1.MsgSend","amount":[{"denom":"stake","amount":"100000000"}],"fromAddress":"cosmos1..","toAddress":"cosmos1.."}
      ],
      "title": "Title",
      "summary": "Summary",
    }
  ],
  "pagination": {
    "total": "1"
  }
}
VoteByProposalVoter

The VoteByProposalVoter endpoint allows users to query for vote by proposal id and voter account address.

cosmos.group.v1.Query/VoteByProposalVoter

Example:

grpcurl -plaintext \
    -d '{"proposal_id":"1","voter":"cosmos1.."}'  localhost:9090 cosmos.group.v1.Query/VoteByProposalVoter

Example Output:

{
  "vote": {
    "proposalId": "1",
    "voter": "cosmos1..",
    "choice": "CHOICE_YES",
    "submittedAt": "2021-12-17T08:05:02.490164009Z"
  }
}
VotesByProposal

The VotesByProposal endpoint allows users to query for votes by proposal id with pagination flags.

cosmos.group.v1.Query/VotesByProposal

Example:

grpcurl -plaintext \
    -d '{"proposal_id":"1"}'  localhost:9090 cosmos.group.v1.Query/VotesByProposal

Example Output:

{
  "votes": [
    {
      "proposalId": "1",
      "voter": "cosmos1..",
      "choice": "CHOICE_YES",
      "submittedAt": "2021-12-17T08:05:02.490164009Z"
    }
  ],
  "pagination": {
    "total": "1"
  }
}
VotesByVoter

The VotesByVoter endpoint allows users to query for votes by voter account address with pagination flags.

cosmos.group.v1.Query/VotesByVoter

Example:

grpcurl -plaintext \
    -d '{"voter":"cosmos1.."}'  localhost:9090 cosmos.group.v1.Query/VotesByVoter

Example Output:

{
  "votes": [
    {
      "proposalId": "1",
      "voter": "cosmos1..",
      "choice": "CHOICE_YES",
      "submittedAt": "2021-12-17T08:05:02.490164009Z"
    }
  ],
  "pagination": {
    "total": "1"
  }
}

REST

A user can query the group module using REST endpoints.

GroupInfo

The GroupInfo endpoint allows users to query for group info by given group id.

/cosmos/group/v1/group_info/{group_id}

Example:

curl localhost:1317/cosmos/group/v1/group_info/1

Example Output:

{
  "info": {
    "id": "1",
    "admin": "cosmos1..",
    "metadata": "AQ==",
    "version": "1",
    "total_weight": "3"
  }
}
GroupPolicyInfo

The GroupPolicyInfo endpoint allows users to query for group policy info by account address of group policy.

/cosmos/group/v1/group_policy_info/{address}

Example:

curl localhost:1317/cosmos/group/v1/group_policy_info/cosmos1..

Example Output:

{
  "info": {
    "address": "cosmos1..",
    "group_id": "1",
    "admin": "cosmos1..",
    "metadata": "AQ==",
    "version": "1",
    "decision_policy": {
      "@type": "/cosmos.group.v1.ThresholdDecisionPolicy",
      "threshold": "1",
      "windows": {
        "voting_period": "120h",
        "min_execution_period": "0s"
      }
    },
  }
}
GroupMembers

The GroupMembers endpoint allows users to query for group members by group id with pagination flags.

/cosmos/group/v1/group_members/{group_id}

Example:

curl localhost:1317/cosmos/group/v1/group_members/1

Example Output:

{
  "members": [
    {
      "group_id": "1",
      "member": {
        "address": "cosmos1..",
        "weight": "1",
        "metadata": "AQ=="
      }
    },
    {
      "group_id": "1",
      "member": {
        "address": "cosmos1..",
        "weight": "2",
        "metadata": "AQ=="
    }
  ],
  "pagination": {
    "next_key": null,
    "total": "2"
  }
}
GroupsByAdmin

The GroupsByAdmin endpoint allows users to query for groups by admin account address with pagination flags.

/cosmos/group/v1/groups_by_admin/{admin}

Example:

curl localhost:1317/cosmos/group/v1/groups_by_admin/cosmos1..

Example Output:

{
  "groups": [
    {
      "id": "1",
      "admin": "cosmos1..",
      "metadata": "AQ==",
      "version": "1",
      "total_weight": "3"
    },
    {
      "id": "2",
      "admin": "cosmos1..",
      "metadata": "AQ==",
      "version": "1",
      "total_weight": "3"
    }
  ],
  "pagination": {
    "next_key": null,
    "total": "2"
  }
}
GroupPoliciesByGroup

The GroupPoliciesByGroup endpoint allows users to query for group policies by group id with pagination flags.

/cosmos/group/v1/group_policies_by_group/{group_id}

Example:

curl localhost:1317/cosmos/group/v1/group_policies_by_group/1

Example Output:

{
  "group_policies": [
    {
      "address": "cosmos1..",
      "group_id": "1",
      "admin": "cosmos1..",
      "metadata": "AQ==",
      "version": "1",
      "decision_policy": {
        "@type": "/cosmos.group.v1.ThresholdDecisionPolicy",
        "threshold": "1",
        "windows": {
          "voting_period": "120h",
          "min_execution_period": "0s"
      }
      },
    },
    {
      "address": "cosmos1..",
      "group_id": "1",
      "admin": "cosmos1..",
      "metadata": "AQ==",
      "version": "1",
      "decision_policy": {
        "@type": "/cosmos.group.v1.ThresholdDecisionPolicy",
        "threshold": "1",
        "windows": {
          "voting_period": "120h",
          "min_execution_period": "0s"
      }
      },
    }
  ],
  "pagination": {
    "next_key": null,
    "total": "2"
  }
}
GroupPoliciesByAdmin

The GroupPoliciesByAdmin endpoint allows users to query for group policies by admin account address with pagination flags.

/cosmos/group/v1/group_policies_by_admin/{admin}

Example:

curl localhost:1317/cosmos/group/v1/group_policies_by_admin/cosmos1..

Example Output:

{
  "group_policies": [
    {
      "address": "cosmos1..",
      "group_id": "1",
      "admin": "cosmos1..",
      "metadata": "AQ==",
      "version": "1",
      "decision_policy": {
        "@type": "/cosmos.group.v1.ThresholdDecisionPolicy",
        "threshold": "1",
        "windows": {
          "voting_period": "120h",
          "min_execution_period": "0s"
      } 
      },
    },
    {
      "address": "cosmos1..",
      "group_id": "1",
      "admin": "cosmos1..",
      "metadata": "AQ==",
      "version": "1",
      "decision_policy": {
        "@type": "/cosmos.group.v1.ThresholdDecisionPolicy",
        "threshold": "1",
        "windows": {
          "voting_period": "120h",
          "min_execution_period": "0s"
      }
      },
    }
  ],
  "pagination": {
    "next_key": null,
    "total": "2"
  }
Proposal

The Proposal endpoint allows users to query for proposal by id.

/cosmos/group/v1/proposal/{proposal_id}

Example:

curl localhost:1317/cosmos/group/v1/proposal/1

Example Output:

{
  "proposal": {
    "proposal_id": "1",
    "address": "cosmos1..",
    "metadata": "AQ==",
    "proposers": [
      "cosmos1.."
    ],
    "submitted_at": "2021-12-17T07:06:26.310638964Z",
    "group_version": "1",
    "group_policy_version": "1",
    "status": "STATUS_SUBMITTED",
    "result": "RESULT_UNFINALIZED",
    "vote_state": {
      "yes_count": "0",
      "no_count": "0",
      "abstain_count": "0",
      "veto_count": "0"
    },
    "windows": {
      "min_execution_period": "0s",
      "voting_period": "432000s"
    },
    "executor_result": "EXECUTOR_RESULT_NOT_RUN",
    "messages": [
      {
        "@type": "/cosmos.bank.v1beta1.MsgSend",
        "from_address": "cosmos1..",
        "to_address": "cosmos1..",
        "amount": [
          {
            "denom": "stake",
            "amount": "100000000"
          }
        ]
      }
    ],
    "title": "Title",
    "summary": "Summary",
  }
}
ProposalsByGroupPolicy

The ProposalsByGroupPolicy endpoint allows users to query for proposals by account address of group policy with pagination flags.

/cosmos/group/v1/proposals_by_group_policy/{address}

Example:

curl localhost:1317/cosmos/group/v1/proposals_by_group_policy/cosmos1..

Example Output:

{
  "proposals": [
    {
      "id": "1",
      "group_policy_address": "cosmos1..",
      "metadata": "AQ==",
      "proposers": [
        "cosmos1.."
      ],
      "submit_time": "2021-12-17T08:03:27.099649352Z",
      "group_version": "1",
      "group_policy_version": "1",
      "status": "STATUS_CLOSED",
      "result": "RESULT_ACCEPTED",
      "vote_state": {
        "yes_count": "1",
        "no_count": "0",
        "abstain_count": "0",
        "veto_count": "0"
      },
      "windows": {
        "min_execution_period": "0s",
        "voting_period": "432000s"
      },
      "executor_result": "EXECUTOR_RESULT_NOT_RUN",
      "messages": [
        {
          "@type": "/cosmos.bank.v1beta1.MsgSend",
          "from_address": "cosmos1..",
          "to_address": "cosmos1..",
          "amount": [
            {
              "denom": "stake",
              "amount": "100000000"
            }
          ]
        }
      ]
    }
  ],
  "pagination": {
    "next_key": null,
    "total": "1"
  }
}
VoteByProposalVoter

The VoteByProposalVoter endpoint allows users to query for vote by proposal id and voter account address.

/cosmos/group/v1/vote_by_proposal_voter/{proposal_id}/{voter}

Example:

curl localhost:1317/cosmos/group/v1beta1/vote_by_proposal_voter/1/cosmos1..

Example Output:

{
  "vote": {
    "proposal_id": "1",
    "voter": "cosmos1..",
    "choice": "CHOICE_YES",
    "metadata": "AQ==",
    "submitted_at": "2021-12-17T08:05:02.490164009Z"
  }
}
VotesByProposal

The VotesByProposal endpoint allows users to query for votes by proposal id with pagination flags.

/cosmos/group/v1/votes_by_proposal/{proposal_id}

Example:

curl localhost:1317/cosmos/group/v1/votes_by_proposal/1

Example Output:

{
  "votes": [
    {
      "proposal_id": "1",
      "voter": "cosmos1..",
      "option": "CHOICE_YES",
      "metadata": "AQ==",
      "submit_time": "2021-12-17T08:05:02.490164009Z"
    }
  ],
  "pagination": {
    "next_key": null,
    "total": "1"
  }
}
VotesByVoter

The VotesByVoter endpoint allows users to query for votes by voter account address with pagination flags.

/cosmos/group/v1/votes_by_voter/{voter}

Example:

curl localhost:1317/cosmos/group/v1/votes_by_voter/cosmos1..

Example Output:

{
  "votes": [
    {
      "proposal_id": "1",
      "voter": "cosmos1..",
      "choice": "CHOICE_YES",
      "metadata": "AQ==",
      "submitted_at": "2021-12-17T08:05:02.490164009Z"
    }
  ],
  "pagination": {
    "next_key": null,
    "total": "1"
  }
}

Metadata

The group module has four locations for metadata where users can provide further context about the on-chain actions they are taking. By default all metadata fields have a 255 character length field where metadata can be stored in json format, either on-chain or off-chain depending on the amount of data required. Here we provide a recommendation for the json structure and where the data should be stored. There are two important factors in making these recommendations. First, that the group and gov modules are consistent with one another, note the number of proposals made by all groups may be quite large. Second, that client applications such as block explorers and governance interfaces have confidence in the consistency of metadata structure accross chains.

Proposal

Location: off-chain as json object stored on IPFS (mirrors gov proposal)

{
  "title": "",
  "authors": [""],
  "summary": "",
  "details": "",
  "proposal_forum_url": "",
  "vote_option_context": "",
}

:::note The authors field is an array of strings, this is to allow for multiple authors to be listed in the metadata. In v0.46, the authors field is a comma-separated string. Frontends are encouraged to support both formats for backwards compatibility. :::

Vote

Location: on-chain as json within 255 character limit (mirrors gov vote)

{
  "justification": "",
}

Group

Location: off-chain as json object stored on IPFS

{
  "name": "",
  "description": "",
  "group_website_url": "",
  "group_forum_url": "",
}

Decision policy

Location: on-chain as json within 255 character limit

{
  "name": "",
  "description": "",
}

Documentation

Overview

Package group is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName is the module name constant used in many places
	ModuleName = "group"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName
)

Variables

View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Exec_name = map[int32]string{
	0: "EXEC_UNSPECIFIED",
	1: "EXEC_TRY",
}
View Source
var Exec_value = map[string]int32{
	"EXEC_UNSPECIFIED": 0,
	"EXEC_TRY":         1,
}
View Source
var ProposalExecutorResult_name = map[int32]string{
	0: "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED",
	1: "PROPOSAL_EXECUTOR_RESULT_NOT_RUN",
	2: "PROPOSAL_EXECUTOR_RESULT_SUCCESS",
	3: "PROPOSAL_EXECUTOR_RESULT_FAILURE",
}
View Source
var ProposalExecutorResult_value = map[string]int32{
	"PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED": 0,
	"PROPOSAL_EXECUTOR_RESULT_NOT_RUN":     1,
	"PROPOSAL_EXECUTOR_RESULT_SUCCESS":     2,
	"PROPOSAL_EXECUTOR_RESULT_FAILURE":     3,
}
View Source
var ProposalStatus_name = map[int32]string{
	0: "PROPOSAL_STATUS_UNSPECIFIED",
	1: "PROPOSAL_STATUS_SUBMITTED",
	2: "PROPOSAL_STATUS_ACCEPTED",
	3: "PROPOSAL_STATUS_REJECTED",
	4: "PROPOSAL_STATUS_ABORTED",
	5: "PROPOSAL_STATUS_WITHDRAWN",
}
View Source
var ProposalStatus_value = map[string]int32{
	"PROPOSAL_STATUS_UNSPECIFIED": 0,
	"PROPOSAL_STATUS_SUBMITTED":   1,
	"PROPOSAL_STATUS_ACCEPTED":    2,
	"PROPOSAL_STATUS_REJECTED":    3,
	"PROPOSAL_STATUS_ABORTED":     4,
	"PROPOSAL_STATUS_WITHDRAWN":   5,
}
View Source
var VoteOption_name = map[int32]string{
	0: "VOTE_OPTION_UNSPECIFIED",
	1: "VOTE_OPTION_YES",
	2: "VOTE_OPTION_ABSTAIN",
	3: "VOTE_OPTION_NO",
	4: "VOTE_OPTION_NO_WITH_VETO",
}
View Source
var VoteOption_value = map[string]int32{
	"VOTE_OPTION_UNSPECIFIED":  0,
	"VOTE_OPTION_YES":          1,
	"VOTE_OPTION_ABSTAIN":      2,
	"VOTE_OPTION_NO":           3,
	"VOTE_OPTION_NO_WITH_VETO": 4,
}

Functions

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers the interfaces types with the interface registry.

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codectypes.LegacyAmino)

RegisterLegacyAminoCodec registers all the necessary group module concrete types and interfaces with the provided codec reference. These types are used for Amino JSON serialization.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper

type AccountKeeper interface {
	// NewAccount returns a new account with the next account number. Does not save the new account to the store.
	NewAccount(sdk.Context, authtypes.AccountI) authtypes.AccountI

	// GetAccount retrieves an account from the store.
	GetAccount(sdk.Context, sdk.AccAddress) authtypes.AccountI

	// SetAccount sets an account in the store.
	SetAccount(sdk.Context, authtypes.AccountI)
	// RemoveAccount removes an account in the store.
	RemoveAccount(ctx sdk.Context, acc authtypes.AccountI)
}

type BankKeeper

type BankKeeper interface {
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected interface needed to retrieve account balances.

type Config

type Config struct {
	// MaxExecutionPeriod defines the max duration after a proposal's voting
	// period ends that members can send a MsgExec to execute the proposal.
	MaxExecutionPeriod time.Duration
	// MaxMetadataLen defines the max length of the metadata bytes field for various entities within the group module. Defaults to 255 if not explicitly set.
	MaxMetadataLen uint64
}

Config is a config struct used for intialising the group module to avoid using globals.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default config for group.

type DecisionPolicy

type DecisionPolicy interface {
	codec.ProtoMarshaler

	// GetVotingPeriod returns the duration after proposal submission where
	// votes are accepted.
	GetVotingPeriod() time.Duration
	// GetMinExecutionPeriod returns the minimum duration after submission
	// where we can execution a proposal. It can be set to 0 or to a value
	// lesser than VotingPeriod to allow TRY_EXEC.
	GetMinExecutionPeriod() time.Duration
	// Allow defines policy-specific logic to allow a proposal to pass or not,
	// based on its tally result, the group's total power and the time since
	// the proposal was submitted.
	Allow(tallyResult TallyResult, totalPower string) (DecisionPolicyResult, error)

	ValidateBasic() error
	Validate(g GroupInfo, config Config) error
}

DecisionPolicy is the persistent set of rules to determine the result of election on a proposal.

func NewPercentageDecisionPolicy

func NewPercentageDecisionPolicy(percentage string, votingPeriod time.Duration, executionPeriod time.Duration) DecisionPolicy

NewPercentageDecisionPolicy creates a new percentage DecisionPolicy

func NewThresholdDecisionPolicy

func NewThresholdDecisionPolicy(threshold string, votingPeriod time.Duration, minExecutionPeriod time.Duration) DecisionPolicy

NewThresholdDecisionPolicy creates a threshold DecisionPolicy

type DecisionPolicyResult

type DecisionPolicyResult struct {
	// Allow determines if the proposal is allowed to pass.
	Allow bool
	// Final determines if the tally result is final or not. If final, then
	// votes are pruned, and the tally result is saved in the proposal's
	// `FinalTallyResult` field.
	Final bool
}

DecisionPolicyResult is the result of whether a proposal passes or not a decision policy.

type DecisionPolicyWindows

type DecisionPolicyWindows struct {
	// voting_period is the duration from submission of a proposal to the end of voting period
	// Within this times votes can be submitted with MsgVote.
	VotingPeriod time.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period"`
	// min_execution_period is the minimum duration after the proposal submission
	// where members can start sending MsgExec. This means that the window for
	// sending a MsgExec transaction is:
	// `[ submission + min_execution_period ; submission + voting_period + max_execution_period]`
	// where max_execution_period is a app-specific config, defined in the keeper.
	// If not set, min_execution_period will default to 0.
	//
	// Please make sure to set a `min_execution_period` that is smaller than
	// `voting_period + max_execution_period`, or else the above execution window
	// is empty, meaning that all proposals created with this decision policy
	// won't be able to be executed.
	MinExecutionPeriod time.Duration `protobuf:"bytes,2,opt,name=min_execution_period,json=minExecutionPeriod,proto3,stdduration" json:"min_execution_period"`
}

DecisionPolicyWindows defines the different windows for voting and execution.

func (*DecisionPolicyWindows) Descriptor

func (*DecisionPolicyWindows) Descriptor() ([]byte, []int)

func (*DecisionPolicyWindows) GetMinExecutionPeriod

func (m *DecisionPolicyWindows) GetMinExecutionPeriod() time.Duration

func (*DecisionPolicyWindows) GetVotingPeriod

func (m *DecisionPolicyWindows) GetVotingPeriod() time.Duration

func (*DecisionPolicyWindows) Marshal

func (m *DecisionPolicyWindows) Marshal() (dAtA []byte, err error)

func (*DecisionPolicyWindows) MarshalTo

func (m *DecisionPolicyWindows) MarshalTo(dAtA []byte) (int, error)

func (*DecisionPolicyWindows) MarshalToSizedBuffer

func (m *DecisionPolicyWindows) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DecisionPolicyWindows) ProtoMessage

func (*DecisionPolicyWindows) ProtoMessage()

func (*DecisionPolicyWindows) Reset

func (m *DecisionPolicyWindows) Reset()

func (*DecisionPolicyWindows) Size

func (m *DecisionPolicyWindows) Size() (n int)

func (*DecisionPolicyWindows) String

func (m *DecisionPolicyWindows) String() string

func (*DecisionPolicyWindows) Unmarshal

func (m *DecisionPolicyWindows) Unmarshal(dAtA []byte) error

func (*DecisionPolicyWindows) XXX_DiscardUnknown

func (m *DecisionPolicyWindows) XXX_DiscardUnknown()

func (*DecisionPolicyWindows) XXX_Marshal

func (m *DecisionPolicyWindows) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DecisionPolicyWindows) XXX_Merge

func (m *DecisionPolicyWindows) XXX_Merge(src proto.Message)

func (*DecisionPolicyWindows) XXX_Size

func (m *DecisionPolicyWindows) XXX_Size() int

func (*DecisionPolicyWindows) XXX_Unmarshal

func (m *DecisionPolicyWindows) XXX_Unmarshal(b []byte) error

type EventCreateGroup

type EventCreateGroup 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"`
}

EventCreateGroup is an event emitted when a group is created.

func (*EventCreateGroup) Descriptor

func (*EventCreateGroup) Descriptor() ([]byte, []int)

func (*EventCreateGroup) GetGroupId

func (m *EventCreateGroup) GetGroupId() uint64

func (*EventCreateGroup) Marshal

func (m *EventCreateGroup) Marshal() (dAtA []byte, err error)

func (*EventCreateGroup) MarshalTo

func (m *EventCreateGroup) MarshalTo(dAtA []byte) (int, error)

func (*EventCreateGroup) MarshalToSizedBuffer

func (m *EventCreateGroup) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventCreateGroup) ProtoMessage

func (*EventCreateGroup) ProtoMessage()

func (*EventCreateGroup) Reset

func (m *EventCreateGroup) Reset()

func (*EventCreateGroup) Size

func (m *EventCreateGroup) Size() (n int)

func (*EventCreateGroup) String

func (m *EventCreateGroup) String() string

func (*EventCreateGroup) Unmarshal

func (m *EventCreateGroup) Unmarshal(dAtA []byte) error

func (*EventCreateGroup) XXX_DiscardUnknown

func (m *EventCreateGroup) XXX_DiscardUnknown()

func (*EventCreateGroup) XXX_Marshal

func (m *EventCreateGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventCreateGroup) XXX_Merge

func (m *EventCreateGroup) XXX_Merge(src proto.Message)

func (*EventCreateGroup) XXX_Size

func (m *EventCreateGroup) XXX_Size() int

func (*EventCreateGroup) XXX_Unmarshal

func (m *EventCreateGroup) XXX_Unmarshal(b []byte) error

type EventCreateGroupPolicy

type EventCreateGroupPolicy struct {
	// address is the account address of the group policy.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

EventCreateGroupPolicy is an event emitted when a group policy is created.

func (*EventCreateGroupPolicy) Descriptor

func (*EventCreateGroupPolicy) Descriptor() ([]byte, []int)

func (*EventCreateGroupPolicy) GetAddress

func (m *EventCreateGroupPolicy) GetAddress() string

func (*EventCreateGroupPolicy) Marshal

func (m *EventCreateGroupPolicy) Marshal() (dAtA []byte, err error)

func (*EventCreateGroupPolicy) MarshalTo

func (m *EventCreateGroupPolicy) MarshalTo(dAtA []byte) (int, error)

func (*EventCreateGroupPolicy) MarshalToSizedBuffer

func (m *EventCreateGroupPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventCreateGroupPolicy) ProtoMessage

func (*EventCreateGroupPolicy) ProtoMessage()

func (*EventCreateGroupPolicy) Reset

func (m *EventCreateGroupPolicy) Reset()

func (*EventCreateGroupPolicy) Size

func (m *EventCreateGroupPolicy) Size() (n int)

func (*EventCreateGroupPolicy) String

func (m *EventCreateGroupPolicy) String() string

func (*EventCreateGroupPolicy) Unmarshal

func (m *EventCreateGroupPolicy) Unmarshal(dAtA []byte) error

func (*EventCreateGroupPolicy) XXX_DiscardUnknown

func (m *EventCreateGroupPolicy) XXX_DiscardUnknown()

func (*EventCreateGroupPolicy) XXX_Marshal

func (m *EventCreateGroupPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventCreateGroupPolicy) XXX_Merge

func (m *EventCreateGroupPolicy) XXX_Merge(src proto.Message)

func (*EventCreateGroupPolicy) XXX_Size

func (m *EventCreateGroupPolicy) XXX_Size() int

func (*EventCreateGroupPolicy) XXX_Unmarshal

func (m *EventCreateGroupPolicy) XXX_Unmarshal(b []byte) error

type EventExec

type EventExec 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"`
	// result is the proposal execution result.
	Result ProposalExecutorResult `protobuf:"varint,2,opt,name=result,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"result,omitempty"`
	// logs contains error logs in case the execution result is FAILURE.
	Logs string `protobuf:"bytes,3,opt,name=logs,proto3" json:"logs,omitempty"`
}

EventExec is an event emitted when a proposal is executed.

func (*EventExec) Descriptor

func (*EventExec) Descriptor() ([]byte, []int)

func (*EventExec) GetLogs

func (m *EventExec) GetLogs() string

func (*EventExec) GetProposalId

func (m *EventExec) GetProposalId() uint64

func (*EventExec) GetResult

func (m *EventExec) GetResult() ProposalExecutorResult

func (*EventExec) Marshal

func (m *EventExec) Marshal() (dAtA []byte, err error)

func (*EventExec) MarshalTo

func (m *EventExec) MarshalTo(dAtA []byte) (int, error)

func (*EventExec) MarshalToSizedBuffer

func (m *EventExec) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventExec) ProtoMessage

func (*EventExec) ProtoMessage()

func (*EventExec) Reset

func (m *EventExec) Reset()

func (*EventExec) Size

func (m *EventExec) Size() (n int)

func (*EventExec) String

func (m *EventExec) String() string

func (*EventExec) Unmarshal

func (m *EventExec) Unmarshal(dAtA []byte) error

func (*EventExec) XXX_DiscardUnknown

func (m *EventExec) XXX_DiscardUnknown()

func (*EventExec) XXX_Marshal

func (m *EventExec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventExec) XXX_Merge

func (m *EventExec) XXX_Merge(src proto.Message)

func (*EventExec) XXX_Size

func (m *EventExec) XXX_Size() int

func (*EventExec) XXX_Unmarshal

func (m *EventExec) XXX_Unmarshal(b []byte) error

type EventLeaveGroup

type EventLeaveGroup 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"`
	// address is the account address of the group member.
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
}

EventLeaveGroup is an event emitted when group member leaves the group.

func (*EventLeaveGroup) Descriptor

func (*EventLeaveGroup) Descriptor() ([]byte, []int)

func (*EventLeaveGroup) GetAddress

func (m *EventLeaveGroup) GetAddress() string

func (*EventLeaveGroup) GetGroupId

func (m *EventLeaveGroup) GetGroupId() uint64

func (*EventLeaveGroup) Marshal

func (m *EventLeaveGroup) Marshal() (dAtA []byte, err error)

func (*EventLeaveGroup) MarshalTo

func (m *EventLeaveGroup) MarshalTo(dAtA []byte) (int, error)

func (*EventLeaveGroup) MarshalToSizedBuffer

func (m *EventLeaveGroup) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventLeaveGroup) ProtoMessage

func (*EventLeaveGroup) ProtoMessage()

func (*EventLeaveGroup) Reset

func (m *EventLeaveGroup) Reset()

func (*EventLeaveGroup) Size

func (m *EventLeaveGroup) Size() (n int)

func (*EventLeaveGroup) String

func (m *EventLeaveGroup) String() string

func (*EventLeaveGroup) Unmarshal

func (m *EventLeaveGroup) Unmarshal(dAtA []byte) error

func (*EventLeaveGroup) XXX_DiscardUnknown

func (m *EventLeaveGroup) XXX_DiscardUnknown()

func (*EventLeaveGroup) XXX_Marshal

func (m *EventLeaveGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventLeaveGroup) XXX_Merge

func (m *EventLeaveGroup) XXX_Merge(src proto.Message)

func (*EventLeaveGroup) XXX_Size

func (m *EventLeaveGroup) XXX_Size() int

func (*EventLeaveGroup) XXX_Unmarshal

func (m *EventLeaveGroup) XXX_Unmarshal(b []byte) error

type EventSubmitProposal

type EventSubmitProposal 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"`
}

EventSubmitProposal is an event emitted when a proposal is created.

func (*EventSubmitProposal) Descriptor

func (*EventSubmitProposal) Descriptor() ([]byte, []int)

func (*EventSubmitProposal) GetProposalId

func (m *EventSubmitProposal) GetProposalId() uint64

func (*EventSubmitProposal) Marshal

func (m *EventSubmitProposal) Marshal() (dAtA []byte, err error)

func (*EventSubmitProposal) MarshalTo

func (m *EventSubmitProposal) MarshalTo(dAtA []byte) (int, error)

func (*EventSubmitProposal) MarshalToSizedBuffer

func (m *EventSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventSubmitProposal) ProtoMessage

func (*EventSubmitProposal) ProtoMessage()

func (*EventSubmitProposal) Reset

func (m *EventSubmitProposal) Reset()

func (*EventSubmitProposal) Size

func (m *EventSubmitProposal) Size() (n int)

func (*EventSubmitProposal) String

func (m *EventSubmitProposal) String() string

func (*EventSubmitProposal) Unmarshal

func (m *EventSubmitProposal) Unmarshal(dAtA []byte) error

func (*EventSubmitProposal) XXX_DiscardUnknown

func (m *EventSubmitProposal) XXX_DiscardUnknown()

func (*EventSubmitProposal) XXX_Marshal

func (m *EventSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventSubmitProposal) XXX_Merge

func (m *EventSubmitProposal) XXX_Merge(src proto.Message)

func (*EventSubmitProposal) XXX_Size

func (m *EventSubmitProposal) XXX_Size() int

func (*EventSubmitProposal) XXX_Unmarshal

func (m *EventSubmitProposal) XXX_Unmarshal(b []byte) error

type EventUpdateGroup

type EventUpdateGroup 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"`
}

EventUpdateGroup is an event emitted when a group is updated.

func (*EventUpdateGroup) Descriptor

func (*EventUpdateGroup) Descriptor() ([]byte, []int)

func (*EventUpdateGroup) GetGroupId

func (m *EventUpdateGroup) GetGroupId() uint64

func (*EventUpdateGroup) Marshal

func (m *EventUpdateGroup) Marshal() (dAtA []byte, err error)

func (*EventUpdateGroup) MarshalTo

func (m *EventUpdateGroup) MarshalTo(dAtA []byte) (int, error)

func (*EventUpdateGroup) MarshalToSizedBuffer

func (m *EventUpdateGroup) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventUpdateGroup) ProtoMessage

func (*EventUpdateGroup) ProtoMessage()

func (*EventUpdateGroup) Reset

func (m *EventUpdateGroup) Reset()

func (*EventUpdateGroup) Size

func (m *EventUpdateGroup) Size() (n int)

func (*EventUpdateGroup) String

func (m *EventUpdateGroup) String() string

func (*EventUpdateGroup) Unmarshal

func (m *EventUpdateGroup) Unmarshal(dAtA []byte) error

func (*EventUpdateGroup) XXX_DiscardUnknown

func (m *EventUpdateGroup) XXX_DiscardUnknown()

func (*EventUpdateGroup) XXX_Marshal

func (m *EventUpdateGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventUpdateGroup) XXX_Merge

func (m *EventUpdateGroup) XXX_Merge(src proto.Message)

func (*EventUpdateGroup) XXX_Size

func (m *EventUpdateGroup) XXX_Size() int

func (*EventUpdateGroup) XXX_Unmarshal

func (m *EventUpdateGroup) XXX_Unmarshal(b []byte) error

type EventUpdateGroupPolicy

type EventUpdateGroupPolicy struct {
	// address is the account address of the group policy.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

EventUpdateGroupPolicy is an event emitted when a group policy is updated.

func (*EventUpdateGroupPolicy) Descriptor

func (*EventUpdateGroupPolicy) Descriptor() ([]byte, []int)

func (*EventUpdateGroupPolicy) GetAddress

func (m *EventUpdateGroupPolicy) GetAddress() string

func (*EventUpdateGroupPolicy) Marshal

func (m *EventUpdateGroupPolicy) Marshal() (dAtA []byte, err error)

func (*EventUpdateGroupPolicy) MarshalTo

func (m *EventUpdateGroupPolicy) MarshalTo(dAtA []byte) (int, error)

func (*EventUpdateGroupPolicy) MarshalToSizedBuffer

func (m *EventUpdateGroupPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventUpdateGroupPolicy) ProtoMessage

func (*EventUpdateGroupPolicy) ProtoMessage()

func (*EventUpdateGroupPolicy) Reset

func (m *EventUpdateGroupPolicy) Reset()

func (*EventUpdateGroupPolicy) Size

func (m *EventUpdateGroupPolicy) Size() (n int)

func (*EventUpdateGroupPolicy) String

func (m *EventUpdateGroupPolicy) String() string

func (*EventUpdateGroupPolicy) Unmarshal

func (m *EventUpdateGroupPolicy) Unmarshal(dAtA []byte) error

func (*EventUpdateGroupPolicy) XXX_DiscardUnknown

func (m *EventUpdateGroupPolicy) XXX_DiscardUnknown()

func (*EventUpdateGroupPolicy) XXX_Marshal

func (m *EventUpdateGroupPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventUpdateGroupPolicy) XXX_Merge

func (m *EventUpdateGroupPolicy) XXX_Merge(src proto.Message)

func (*EventUpdateGroupPolicy) XXX_Size

func (m *EventUpdateGroupPolicy) XXX_Size() int

func (*EventUpdateGroupPolicy) XXX_Unmarshal

func (m *EventUpdateGroupPolicy) XXX_Unmarshal(b []byte) error

type EventVote

type EventVote 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"`
}

EventVote is an event emitted when a voter votes on a proposal.

func (*EventVote) Descriptor

func (*EventVote) Descriptor() ([]byte, []int)

func (*EventVote) GetProposalId

func (m *EventVote) GetProposalId() uint64

func (*EventVote) Marshal

func (m *EventVote) Marshal() (dAtA []byte, err error)

func (*EventVote) MarshalTo

func (m *EventVote) MarshalTo(dAtA []byte) (int, error)

func (*EventVote) MarshalToSizedBuffer

func (m *EventVote) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventVote) ProtoMessage

func (*EventVote) ProtoMessage()

func (*EventVote) Reset

func (m *EventVote) Reset()

func (*EventVote) Size

func (m *EventVote) Size() (n int)

func (*EventVote) String

func (m *EventVote) String() string

func (*EventVote) Unmarshal

func (m *EventVote) Unmarshal(dAtA []byte) error

func (*EventVote) XXX_DiscardUnknown

func (m *EventVote) XXX_DiscardUnknown()

func (*EventVote) XXX_Marshal

func (m *EventVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventVote) XXX_Merge

func (m *EventVote) XXX_Merge(src proto.Message)

func (*EventVote) XXX_Size

func (m *EventVote) XXX_Size() int

func (*EventVote) XXX_Unmarshal

func (m *EventVote) XXX_Unmarshal(b []byte) error

type EventWithdrawProposal

type EventWithdrawProposal 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"`
}

EventWithdrawProposal is an event emitted when a proposal is withdrawn.

func (*EventWithdrawProposal) Descriptor

func (*EventWithdrawProposal) Descriptor() ([]byte, []int)

func (*EventWithdrawProposal) GetProposalId

func (m *EventWithdrawProposal) GetProposalId() uint64

func (*EventWithdrawProposal) Marshal

func (m *EventWithdrawProposal) Marshal() (dAtA []byte, err error)

func (*EventWithdrawProposal) MarshalTo

func (m *EventWithdrawProposal) MarshalTo(dAtA []byte) (int, error)

func (*EventWithdrawProposal) MarshalToSizedBuffer

func (m *EventWithdrawProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventWithdrawProposal) ProtoMessage

func (*EventWithdrawProposal) ProtoMessage()

func (*EventWithdrawProposal) Reset

func (m *EventWithdrawProposal) Reset()

func (*EventWithdrawProposal) Size

func (m *EventWithdrawProposal) Size() (n int)

func (*EventWithdrawProposal) String

func (m *EventWithdrawProposal) String() string

func (*EventWithdrawProposal) Unmarshal

func (m *EventWithdrawProposal) Unmarshal(dAtA []byte) error

func (*EventWithdrawProposal) XXX_DiscardUnknown

func (m *EventWithdrawProposal) XXX_DiscardUnknown()

func (*EventWithdrawProposal) XXX_Marshal

func (m *EventWithdrawProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventWithdrawProposal) XXX_Merge

func (m *EventWithdrawProposal) XXX_Merge(src proto.Message)

func (*EventWithdrawProposal) XXX_Size

func (m *EventWithdrawProposal) XXX_Size() int

func (*EventWithdrawProposal) XXX_Unmarshal

func (m *EventWithdrawProposal) XXX_Unmarshal(b []byte) error

type Exec

type Exec int32

Exec defines modes of execution of a proposal on creation or on new vote.

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
)

func (Exec) EnumDescriptor

func (Exec) EnumDescriptor() ([]byte, []int)

func (Exec) String

func (x Exec) String() string

type GenesisState

type GenesisState struct {
	// group_seq is the group table orm.Sequence,
	// it is used to get the next group ID.
	GroupSeq uint64 `protobuf:"varint,1,opt,name=group_seq,json=groupSeq,proto3" json:"group_seq,omitempty"`
	// groups is the list of groups info.
	Groups []*GroupInfo `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"`
	// group_members is the list of groups members.
	GroupMembers []*GroupMember `protobuf:"bytes,3,rep,name=group_members,json=groupMembers,proto3" json:"group_members,omitempty"`
	// group_policy_seq is the group policy table orm.Sequence,
	// it is used to generate the next group policy account address.
	GroupPolicySeq uint64 `protobuf:"varint,4,opt,name=group_policy_seq,json=groupPolicySeq,proto3" json:"group_policy_seq,omitempty"`
	// group_policies is the list of group policies info.
	GroupPolicies []*GroupPolicyInfo `protobuf:"bytes,5,rep,name=group_policies,json=groupPolicies,proto3" json:"group_policies,omitempty"`
	// proposal_seq is the proposal table orm.Sequence,
	// it is used to get the next proposal ID.
	ProposalSeq uint64 `protobuf:"varint,6,opt,name=proposal_seq,json=proposalSeq,proto3" json:"proposal_seq,omitempty"`
	// proposals is the list of proposals.
	Proposals []*Proposal `protobuf:"bytes,7,rep,name=proposals,proto3" json:"proposals,omitempty"`
	// votes is the list of votes.
	Votes []*Vote `protobuf:"bytes,8,rep,name=votes,proto3" json:"votes,omitempty"`
}

GenesisState defines the group module's genesis state.

func NewGenesisState

func NewGenesisState() *GenesisState

NewGenesisState creates a new genesis state with default values.

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetGroupMembers

func (m *GenesisState) GetGroupMembers() []*GroupMember

func (*GenesisState) GetGroupPolicies

func (m *GenesisState) GetGroupPolicies() []*GroupPolicyInfo

func (*GenesisState) GetGroupPolicySeq

func (m *GenesisState) GetGroupPolicySeq() uint64

func (*GenesisState) GetGroupSeq

func (m *GenesisState) GetGroupSeq() uint64

func (*GenesisState) GetGroups

func (m *GenesisState) GetGroups() []*GroupInfo

func (*GenesisState) GetProposalSeq

func (m *GenesisState) GetProposalSeq() uint64

func (*GenesisState) GetProposals

func (m *GenesisState) GetProposals() []*Proposal

func (*GenesisState) GetVotes

func (m *GenesisState) GetVotes() []*Vote

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) UnpackInterfaces

func (s GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (GenesisState) Validate

func (s GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type GroupInfo

type GroupInfo struct {
	// id is the unique ID of the group.
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"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 string `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"`
	// created_at is a timestamp specifying when a group was created.
	CreatedAt time.Time `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"`
}

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

func (*GroupInfo) Descriptor

func (*GroupInfo) Descriptor() ([]byte, []int)

func (*GroupInfo) GetAdmin

func (m *GroupInfo) GetAdmin() string

func (*GroupInfo) GetCreatedAt

func (m *GroupInfo) GetCreatedAt() time.Time

func (*GroupInfo) GetId

func (m *GroupInfo) GetId() uint64

func (*GroupInfo) GetMetadata

func (m *GroupInfo) GetMetadata() string

func (*GroupInfo) GetTotalWeight

func (m *GroupInfo) GetTotalWeight() string

func (*GroupInfo) GetVersion

func (m *GroupInfo) GetVersion() uint64

func (*GroupInfo) Marshal

func (m *GroupInfo) Marshal() (dAtA []byte, err error)

func (*GroupInfo) MarshalTo

func (m *GroupInfo) MarshalTo(dAtA []byte) (int, error)

func (*GroupInfo) MarshalToSizedBuffer

func (m *GroupInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (GroupInfo) PrimaryKeyFields

func (g GroupInfo) PrimaryKeyFields() []interface{}

func (*GroupInfo) ProtoMessage

func (*GroupInfo) ProtoMessage()

func (*GroupInfo) Reset

func (m *GroupInfo) Reset()

func (*GroupInfo) Size

func (m *GroupInfo) Size() (n int)

func (*GroupInfo) String

func (m *GroupInfo) String() string

func (*GroupInfo) Unmarshal

func (m *GroupInfo) Unmarshal(dAtA []byte) error

func (GroupInfo) ValidateBasic

func (g GroupInfo) ValidateBasic() error

ValidateBasic does basic validation on group info.

func (*GroupInfo) XXX_DiscardUnknown

func (m *GroupInfo) XXX_DiscardUnknown()

func (*GroupInfo) XXX_Marshal

func (m *GroupInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GroupInfo) XXX_Merge

func (m *GroupInfo) XXX_Merge(src proto.Message)

func (*GroupInfo) XXX_Size

func (m *GroupInfo) XXX_Size() int

func (*GroupInfo) XXX_Unmarshal

func (m *GroupInfo) XXX_Unmarshal(b []byte) error

type GroupMember

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"`
}

GroupMember represents the relationship between a group and a member.

func (*GroupMember) Descriptor

func (*GroupMember) Descriptor() ([]byte, []int)

func (*GroupMember) GetGroupId

func (m *GroupMember) GetGroupId() uint64

func (*GroupMember) GetMember

func (m *GroupMember) GetMember() *Member

func (*GroupMember) Marshal

func (m *GroupMember) Marshal() (dAtA []byte, err error)

func (*GroupMember) MarshalTo

func (m *GroupMember) MarshalTo(dAtA []byte) (int, error)

func (*GroupMember) MarshalToSizedBuffer

func (m *GroupMember) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (GroupMember) PrimaryKeyFields

func (g GroupMember) PrimaryKeyFields() []interface{}

func (*GroupMember) ProtoMessage

func (*GroupMember) ProtoMessage()

func (*GroupMember) Reset

func (m *GroupMember) Reset()

func (*GroupMember) Size

func (m *GroupMember) Size() (n int)

func (*GroupMember) String

func (m *GroupMember) String() string

func (*GroupMember) Unmarshal

func (m *GroupMember) Unmarshal(dAtA []byte) error

func (GroupMember) ValidateBasic

func (g GroupMember) ValidateBasic() error

ValidateBasic does basic validation on group member.

func (*GroupMember) XXX_DiscardUnknown

func (m *GroupMember) XXX_DiscardUnknown()

func (*GroupMember) XXX_Marshal

func (m *GroupMember) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GroupMember) XXX_Merge

func (m *GroupMember) XXX_Merge(src proto.Message)

func (*GroupMember) XXX_Size

func (m *GroupMember) XXX_Size() int

func (*GroupMember) XXX_Unmarshal

func (m *GroupMember) XXX_Unmarshal(b []byte) error

type GroupPolicyInfo

type GroupPolicyInfo struct {
	// address is the account address of group policy.
	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 attached to the group policy.
	Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// version is used to track changes to a group's GroupPolicyInfo 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 policy's decision policy.
	DecisionPolicy *types.Any `protobuf:"bytes,6,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"`
	// created_at is a timestamp specifying when a group policy was created.
	CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"`
}

GroupPolicyInfo represents the high-level on-chain information for a group policy.

func NewGroupPolicyInfo

func NewGroupPolicyInfo(address sdk.AccAddress, group uint64, admin sdk.AccAddress, metadata string,
	version uint64, decisionPolicy DecisionPolicy, createdAt time.Time,
) (GroupPolicyInfo, error)

NewGroupPolicyInfo creates a new GroupPolicyInfo instance

func (*GroupPolicyInfo) Descriptor

func (*GroupPolicyInfo) Descriptor() ([]byte, []int)

func (*GroupPolicyInfo) Equal

func (this *GroupPolicyInfo) Equal(that interface{}) bool

func (GroupPolicyInfo) GetDecisionPolicy

func (g GroupPolicyInfo) GetDecisionPolicy() (DecisionPolicy, error)

GetDecisionPolicy gets the decision policy of GroupPolicyInfo

func (*GroupPolicyInfo) Marshal

func (m *GroupPolicyInfo) Marshal() (dAtA []byte, err error)

func (*GroupPolicyInfo) MarshalTo

func (m *GroupPolicyInfo) MarshalTo(dAtA []byte) (int, error)

func (*GroupPolicyInfo) MarshalToSizedBuffer

func (m *GroupPolicyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (GroupPolicyInfo) PrimaryKeyFields

func (g GroupPolicyInfo) PrimaryKeyFields() []interface{}

func (*GroupPolicyInfo) ProtoMessage

func (*GroupPolicyInfo) ProtoMessage()

func (*GroupPolicyInfo) Reset

func (m *GroupPolicyInfo) Reset()

func (*GroupPolicyInfo) SetDecisionPolicy

func (g *GroupPolicyInfo) SetDecisionPolicy(decisionPolicy DecisionPolicy) error

SetDecisionPolicy sets the decision policy for GroupPolicyInfo.

func (*GroupPolicyInfo) Size

func (m *GroupPolicyInfo) Size() (n int)

func (*GroupPolicyInfo) String

func (m *GroupPolicyInfo) String() string

func (*GroupPolicyInfo) Unmarshal

func (m *GroupPolicyInfo) Unmarshal(dAtA []byte) error

func (GroupPolicyInfo) UnpackInterfaces

func (g GroupPolicyInfo) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (GroupPolicyInfo) ValidateBasic

func (g GroupPolicyInfo) ValidateBasic() error

ValidateBasic does basic validation on group policy info.

func (*GroupPolicyInfo) XXX_DiscardUnknown

func (m *GroupPolicyInfo) XXX_DiscardUnknown()

func (*GroupPolicyInfo) XXX_Marshal

func (m *GroupPolicyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GroupPolicyInfo) XXX_Merge

func (m *GroupPolicyInfo) XXX_Merge(src proto.Message)

func (*GroupPolicyInfo) XXX_Size

func (m *GroupPolicyInfo) XXX_Size() int

func (*GroupPolicyInfo) XXX_Unmarshal

func (m *GroupPolicyInfo) XXX_Unmarshal(b []byte) error

type Member

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 attached to the member.
	Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// added_at is a timestamp specifying when a member was added.
	AddedAt time.Time `protobuf:"bytes,4,opt,name=added_at,json=addedAt,proto3,stdtime" json:"added_at"`
}

Member represents a group member with an account address, non-zero weight, metadata and added_at timestamp.

func (*Member) Descriptor

func (*Member) Descriptor() ([]byte, []int)

func (*Member) GetAddedAt

func (m *Member) GetAddedAt() time.Time

func (*Member) GetAddress

func (m *Member) GetAddress() string

func (*Member) GetMetadata

func (m *Member) GetMetadata() string

func (*Member) GetWeight

func (m *Member) GetWeight() string

func (*Member) Marshal

func (m *Member) Marshal() (dAtA []byte, err error)

func (*Member) MarshalTo

func (m *Member) MarshalTo(dAtA []byte) (int, error)

func (*Member) MarshalToSizedBuffer

func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Member) ProtoMessage

func (*Member) ProtoMessage()

func (*Member) Reset

func (m *Member) Reset()

func (*Member) Size

func (m *Member) Size() (n int)

func (*Member) String

func (m *Member) String() string

func (*Member) Unmarshal

func (m *Member) Unmarshal(dAtA []byte) error

func (*Member) XXX_DiscardUnknown

func (m *Member) XXX_DiscardUnknown()

func (*Member) XXX_Marshal

func (m *Member) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Member) XXX_Merge

func (m *Member) XXX_Merge(src proto.Message)

func (*Member) XXX_Size

func (m *Member) XXX_Size() int

func (*Member) XXX_Unmarshal

func (m *Member) XXX_Unmarshal(b []byte) error

type MemberRequest

type MemberRequest 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 attached to the member.
	Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
}

MemberRequest represents a group member to be used in Msg server requests. Contrary to `Member`, it doesn't have any `added_at` field since this field cannot be set as part of requests.

func MemberToMemberRequest

func MemberToMemberRequest(m *Member) MemberRequest

MemberToMemberRequest converts a `Member` (used for storage) to a `MemberRequest` (used in requests). The only difference between the two is that `MemberRequest` doesn't have any `AddedAt` field since it cannot be set as part of requests.

func (*MemberRequest) Descriptor

func (*MemberRequest) Descriptor() ([]byte, []int)

func (*MemberRequest) GetAddress

func (m *MemberRequest) GetAddress() string

func (*MemberRequest) GetMetadata

func (m *MemberRequest) GetMetadata() string

func (*MemberRequest) GetWeight

func (m *MemberRequest) GetWeight() string

func (*MemberRequest) Marshal

func (m *MemberRequest) Marshal() (dAtA []byte, err error)

func (*MemberRequest) MarshalTo

func (m *MemberRequest) MarshalTo(dAtA []byte) (int, error)

func (*MemberRequest) MarshalToSizedBuffer

func (m *MemberRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MemberRequest) ProtoMessage

func (*MemberRequest) ProtoMessage()

func (*MemberRequest) Reset

func (m *MemberRequest) Reset()

func (*MemberRequest) Size

func (m *MemberRequest) Size() (n int)

func (*MemberRequest) String

func (m *MemberRequest) String() string

func (*MemberRequest) Unmarshal

func (m *MemberRequest) Unmarshal(dAtA []byte) error

func (MemberRequest) ValidateBasic

func (m MemberRequest) ValidateBasic() error

ValidateBasic performs stateless validation on a group member, such as making sure the address is well-formed, and the weight is non-negative. Note: in state, a member's weight MUST be positive. However, in some Msgs, it's possible to set a zero member weight, for example in MsgUpdateGroupMembers to denote that we're removing a member.

func (*MemberRequest) XXX_DiscardUnknown

func (m *MemberRequest) XXX_DiscardUnknown()

func (*MemberRequest) XXX_Marshal

func (m *MemberRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MemberRequest) XXX_Merge

func (m *MemberRequest) XXX_Merge(src proto.Message)

func (*MemberRequest) XXX_Size

func (m *MemberRequest) XXX_Size() int

func (*MemberRequest) XXX_Unmarshal

func (m *MemberRequest) XXX_Unmarshal(b []byte) error

type MemberRequests

type MemberRequests struct {
	Members []MemberRequest
}

MemberRequests defines a repeated slice of MemberRequest objects.

func (MemberRequests) ValidateBasic

func (ms MemberRequests) ValidateBasic() error

ValidateBasic performs stateless validation on an array of members. On top of validating each member individually, it also makes sure there are no duplicate addresses.

type MsgClient

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 *MsgCreateGroup, opts ...grpc.CallOption) (*MsgCreateGroupResponse, error)
	// UpdateGroupMembers updates the group members with given group id and admin address.
	UpdateGroupMembers(ctx context.Context, in *MsgUpdateGroupMembers, opts ...grpc.CallOption) (*MsgUpdateGroupMembersResponse, error)
	// UpdateGroupAdmin updates the group admin with given group id and previous admin address.
	UpdateGroupAdmin(ctx context.Context, in *MsgUpdateGroupAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupAdminResponse, error)
	// UpdateGroupMetadata updates the group metadata with given group id and admin address.
	UpdateGroupMetadata(ctx context.Context, in *MsgUpdateGroupMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupMetadataResponse, error)
	// CreateGroupPolicy creates a new group policy using given DecisionPolicy.
	CreateGroupPolicy(ctx context.Context, in *MsgCreateGroupPolicy, opts ...grpc.CallOption) (*MsgCreateGroupPolicyResponse, error)
	// CreateGroupWithPolicy creates a new group with policy.
	CreateGroupWithPolicy(ctx context.Context, in *MsgCreateGroupWithPolicy, opts ...grpc.CallOption) (*MsgCreateGroupWithPolicyResponse, error)
	// UpdateGroupPolicyAdmin updates a group policy admin.
	UpdateGroupPolicyAdmin(ctx context.Context, in *MsgUpdateGroupPolicyAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyAdminResponse, error)
	// UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated.
	UpdateGroupPolicyDecisionPolicy(ctx context.Context, in *MsgUpdateGroupPolicyDecisionPolicy, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyDecisionPolicyResponse, error)
	// UpdateGroupPolicyMetadata updates a group policy metadata.
	UpdateGroupPolicyMetadata(ctx context.Context, in *MsgUpdateGroupPolicyMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyMetadataResponse, error)
	// SubmitProposal submits a new proposal.
	SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error)
	// WithdrawProposal withdraws a proposal.
	WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error)
	// Vote allows a voter to vote on a proposal.
	Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error)
	// Exec executes a proposal.
	Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error)
	// LeaveGroup allows a group member to leave the group.
	LeaveGroup(ctx context.Context, in *MsgLeaveGroup, opts ...grpc.CallOption) (*MsgLeaveGroupResponse, error)
}

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.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgCreateGroup

type MsgCreateGroup 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 []MemberRequest `protobuf:"bytes,2,rep,name=members,proto3" json:"members"`
	// metadata is any arbitrary metadata to attached to the group.
	Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
}

MsgCreateGroup is the Msg/CreateGroup request type.

func (*MsgCreateGroup) Descriptor

func (*MsgCreateGroup) Descriptor() ([]byte, []int)

func (*MsgCreateGroup) GetAdmin

func (m *MsgCreateGroup) GetAdmin() string

func (*MsgCreateGroup) GetMembers

func (m *MsgCreateGroup) GetMembers() []MemberRequest

func (*MsgCreateGroup) GetMetadata

func (m *MsgCreateGroup) GetMetadata() string

func (MsgCreateGroup) GetSignBytes

func (m MsgCreateGroup) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgCreateGroup) GetSigners

func (m MsgCreateGroup) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgCreateGroup.

func (*MsgCreateGroup) Marshal

func (m *MsgCreateGroup) Marshal() (dAtA []byte, err error)

func (*MsgCreateGroup) MarshalTo

func (m *MsgCreateGroup) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateGroup) MarshalToSizedBuffer

func (m *MsgCreateGroup) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateGroup) ProtoMessage

func (*MsgCreateGroup) ProtoMessage()

func (*MsgCreateGroup) Reset

func (m *MsgCreateGroup) Reset()

func (MsgCreateGroup) Route

func (m MsgCreateGroup) Route() string

Route Implements Msg.

func (*MsgCreateGroup) Size

func (m *MsgCreateGroup) Size() (n int)

func (*MsgCreateGroup) String

func (m *MsgCreateGroup) String() string

func (MsgCreateGroup) Type

func (m MsgCreateGroup) Type() string

Type Implements Msg.

func (*MsgCreateGroup) Unmarshal

func (m *MsgCreateGroup) Unmarshal(dAtA []byte) error

func (MsgCreateGroup) ValidateBasic

func (m MsgCreateGroup) ValidateBasic() error

ValidateBasic does a sanity check on the provided data

func (*MsgCreateGroup) XXX_DiscardUnknown

func (m *MsgCreateGroup) XXX_DiscardUnknown()

func (*MsgCreateGroup) XXX_Marshal

func (m *MsgCreateGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateGroup) XXX_Merge

func (m *MsgCreateGroup) XXX_Merge(src proto.Message)

func (*MsgCreateGroup) XXX_Size

func (m *MsgCreateGroup) XXX_Size() int

func (*MsgCreateGroup) XXX_Unmarshal

func (m *MsgCreateGroup) XXX_Unmarshal(b []byte) error

type MsgCreateGroupPolicy

type MsgCreateGroupPolicy 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 attached to the group policy.
	Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// decision_policy specifies the group policy's decision policy.
	DecisionPolicy *types.Any `protobuf:"bytes,4,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"`
}

MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type.

func NewMsgCreateGroupPolicy

func NewMsgCreateGroupPolicy(admin sdk.AccAddress, group uint64, metadata string, decisionPolicy DecisionPolicy) (*MsgCreateGroupPolicy, error)

NewMsgCreateGroupPolicy creates a new MsgCreateGroupPolicy.

func (*MsgCreateGroupPolicy) Descriptor

func (*MsgCreateGroupPolicy) Descriptor() ([]byte, []int)

func (*MsgCreateGroupPolicy) GetAdmin

func (m *MsgCreateGroupPolicy) GetAdmin() string

GetAdmin gets the admin of MsgCreateGroupPolicy.

func (*MsgCreateGroupPolicy) GetDecisionPolicy

func (m *MsgCreateGroupPolicy) GetDecisionPolicy() (DecisionPolicy, error)

GetDecisionPolicy gets the decision policy of MsgCreateGroupPolicy.

func (*MsgCreateGroupPolicy) GetGroupID

func (m *MsgCreateGroupPolicy) GetGroupID() uint64

GetGroupID gets the group id of MsgCreateGroupPolicy.

func (*MsgCreateGroupPolicy) GetMetadata

func (m *MsgCreateGroupPolicy) GetMetadata() string

GetMetadata gets the metadata of MsgCreateGroupPolicy.

func (MsgCreateGroupPolicy) GetSignBytes

func (m MsgCreateGroupPolicy) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgCreateGroupPolicy) GetSigners

func (m MsgCreateGroupPolicy) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgCreateGroupPolicy.

func (*MsgCreateGroupPolicy) Marshal

func (m *MsgCreateGroupPolicy) Marshal() (dAtA []byte, err error)

func (*MsgCreateGroupPolicy) MarshalTo

func (m *MsgCreateGroupPolicy) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateGroupPolicy) MarshalToSizedBuffer

func (m *MsgCreateGroupPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateGroupPolicy) ProtoMessage

func (*MsgCreateGroupPolicy) ProtoMessage()

func (*MsgCreateGroupPolicy) Reset

func (m *MsgCreateGroupPolicy) Reset()

func (MsgCreateGroupPolicy) Route

func (m MsgCreateGroupPolicy) Route() string

Route Implements Msg.

func (*MsgCreateGroupPolicy) SetDecisionPolicy

func (m *MsgCreateGroupPolicy) SetDecisionPolicy(decisionPolicy DecisionPolicy) error

SetDecisionPolicy sets the decision policy of MsgCreateGroupPolicy.

func (*MsgCreateGroupPolicy) Size

func (m *MsgCreateGroupPolicy) Size() (n int)

func (*MsgCreateGroupPolicy) String

func (m *MsgCreateGroupPolicy) String() string

func (MsgCreateGroupPolicy) Type

func (m MsgCreateGroupPolicy) Type() string

Type Implements Msg.

func (*MsgCreateGroupPolicy) Unmarshal

func (m *MsgCreateGroupPolicy) Unmarshal(dAtA []byte) error

func (MsgCreateGroupPolicy) UnpackInterfaces

func (m MsgCreateGroupPolicy) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (MsgCreateGroupPolicy) ValidateBasic

func (m MsgCreateGroupPolicy) ValidateBasic() error

ValidateBasic does a sanity check on the provided data

func (*MsgCreateGroupPolicy) XXX_DiscardUnknown

func (m *MsgCreateGroupPolicy) XXX_DiscardUnknown()

func (*MsgCreateGroupPolicy) XXX_Marshal

func (m *MsgCreateGroupPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateGroupPolicy) XXX_Merge

func (m *MsgCreateGroupPolicy) XXX_Merge(src proto.Message)

func (*MsgCreateGroupPolicy) XXX_Size

func (m *MsgCreateGroupPolicy) XXX_Size() int

func (*MsgCreateGroupPolicy) XXX_Unmarshal

func (m *MsgCreateGroupPolicy) XXX_Unmarshal(b []byte) error

type MsgCreateGroupPolicyResponse

type MsgCreateGroupPolicyResponse struct {
	// address is the account address of the newly created group policy.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type.

func (*MsgCreateGroupPolicyResponse) Descriptor

func (*MsgCreateGroupPolicyResponse) Descriptor() ([]byte, []int)

func (*MsgCreateGroupPolicyResponse) GetAddress

func (m *MsgCreateGroupPolicyResponse) GetAddress() string

func (*MsgCreateGroupPolicyResponse) Marshal

func (m *MsgCreateGroupPolicyResponse) Marshal() (dAtA []byte, err error)

func (*MsgCreateGroupPolicyResponse) MarshalTo

func (m *MsgCreateGroupPolicyResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateGroupPolicyResponse) MarshalToSizedBuffer

func (m *MsgCreateGroupPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateGroupPolicyResponse) ProtoMessage

func (*MsgCreateGroupPolicyResponse) ProtoMessage()

func (*MsgCreateGroupPolicyResponse) Reset

func (m *MsgCreateGroupPolicyResponse) Reset()

func (*MsgCreateGroupPolicyResponse) Size

func (m *MsgCreateGroupPolicyResponse) Size() (n int)

func (*MsgCreateGroupPolicyResponse) String

func (*MsgCreateGroupPolicyResponse) Unmarshal

func (m *MsgCreateGroupPolicyResponse) Unmarshal(dAtA []byte) error

func (*MsgCreateGroupPolicyResponse) XXX_DiscardUnknown

func (m *MsgCreateGroupPolicyResponse) XXX_DiscardUnknown()

func (*MsgCreateGroupPolicyResponse) XXX_Marshal

func (m *MsgCreateGroupPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateGroupPolicyResponse) XXX_Merge

func (m *MsgCreateGroupPolicyResponse) XXX_Merge(src proto.Message)

func (*MsgCreateGroupPolicyResponse) XXX_Size

func (m *MsgCreateGroupPolicyResponse) XXX_Size() int

func (*MsgCreateGroupPolicyResponse) XXX_Unmarshal

func (m *MsgCreateGroupPolicyResponse) XXX_Unmarshal(b []byte) error

type MsgCreateGroupResponse

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"`
}

MsgCreateGroupResponse is the Msg/CreateGroup response type.

func (*MsgCreateGroupResponse) Descriptor

func (*MsgCreateGroupResponse) Descriptor() ([]byte, []int)

func (*MsgCreateGroupResponse) GetGroupId

func (m *MsgCreateGroupResponse) GetGroupId() uint64

func (*MsgCreateGroupResponse) Marshal

func (m *MsgCreateGroupResponse) Marshal() (dAtA []byte, err error)

func (*MsgCreateGroupResponse) MarshalTo

func (m *MsgCreateGroupResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateGroupResponse) MarshalToSizedBuffer

func (m *MsgCreateGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateGroupResponse) ProtoMessage

func (*MsgCreateGroupResponse) ProtoMessage()

func (*MsgCreateGroupResponse) Reset

func (m *MsgCreateGroupResponse) Reset()

func (*MsgCreateGroupResponse) Size

func (m *MsgCreateGroupResponse) Size() (n int)

func (*MsgCreateGroupResponse) String

func (m *MsgCreateGroupResponse) String() string

func (*MsgCreateGroupResponse) Unmarshal

func (m *MsgCreateGroupResponse) Unmarshal(dAtA []byte) error

func (*MsgCreateGroupResponse) XXX_DiscardUnknown

func (m *MsgCreateGroupResponse) XXX_DiscardUnknown()

func (*MsgCreateGroupResponse) XXX_Marshal

func (m *MsgCreateGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateGroupResponse) XXX_Merge

func (m *MsgCreateGroupResponse) XXX_Merge(src proto.Message)

func (*MsgCreateGroupResponse) XXX_Size

func (m *MsgCreateGroupResponse) XXX_Size() int

func (*MsgCreateGroupResponse) XXX_Unmarshal

func (m *MsgCreateGroupResponse) XXX_Unmarshal(b []byte) error

type MsgCreateGroupWithPolicy

type MsgCreateGroupWithPolicy struct {
	// admin is the account address of the group and group policy admin.
	Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"`
	// members defines the group members.
	Members []MemberRequest `protobuf:"bytes,2,rep,name=members,proto3" json:"members"`
	// group_metadata is any arbitrary metadata attached to the group.
	GroupMetadata string `protobuf:"bytes,3,opt,name=group_metadata,json=groupMetadata,proto3" json:"group_metadata,omitempty"`
	// group_policy_metadata is any arbitrary metadata attached to the group policy.
	GroupPolicyMetadata string `protobuf:"bytes,4,opt,name=group_policy_metadata,json=groupPolicyMetadata,proto3" json:"group_policy_metadata,omitempty"`
	// group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group
	// and group policy admin.
	GroupPolicyAsAdmin bool `protobuf:"varint,5,opt,name=group_policy_as_admin,json=groupPolicyAsAdmin,proto3" json:"group_policy_as_admin,omitempty"`
	// decision_policy specifies the group policy's decision policy.
	DecisionPolicy *types.Any `protobuf:"bytes,6,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"`
}

MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type.

func NewMsgCreateGroupWithPolicy

func NewMsgCreateGroupWithPolicy(admin string, members []MemberRequest, groupMetadata string, groupPolicyMetadata string, groupPolicyAsAdmin bool, decisionPolicy DecisionPolicy) (*MsgCreateGroupWithPolicy, error)

NewMsgCreateGroupWithPolicy creates a new MsgCreateGroupWithPolicy.

func (*MsgCreateGroupWithPolicy) Descriptor

func (*MsgCreateGroupWithPolicy) Descriptor() ([]byte, []int)

func (*MsgCreateGroupWithPolicy) GetDecisionPolicy

func (m *MsgCreateGroupWithPolicy) GetDecisionPolicy() (DecisionPolicy, error)

GetDecisionPolicy gets the decision policy of MsgCreateGroupWithPolicy.

func (MsgCreateGroupWithPolicy) GetSignBytes

func (m MsgCreateGroupWithPolicy) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgCreateGroupWithPolicy) GetSigners

func (m MsgCreateGroupWithPolicy) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgCreateGroupWithPolicy.

func (*MsgCreateGroupWithPolicy) Marshal

func (m *MsgCreateGroupWithPolicy) Marshal() (dAtA []byte, err error)

func (*MsgCreateGroupWithPolicy) MarshalTo

func (m *MsgCreateGroupWithPolicy) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateGroupWithPolicy) MarshalToSizedBuffer

func (m *MsgCreateGroupWithPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateGroupWithPolicy) ProtoMessage

func (*MsgCreateGroupWithPolicy) ProtoMessage()

func (*MsgCreateGroupWithPolicy) Reset

func (m *MsgCreateGroupWithPolicy) Reset()

func (MsgCreateGroupWithPolicy) Route

func (m MsgCreateGroupWithPolicy) Route() string

Route Implements Msg.

func (*MsgCreateGroupWithPolicy) SetDecisionPolicy

func (m *MsgCreateGroupWithPolicy) SetDecisionPolicy(decisionPolicy DecisionPolicy) error

SetDecisionPolicy sets the decision policy for MsgCreateGroupWithPolicy.

func (*MsgCreateGroupWithPolicy) Size

func (m *MsgCreateGroupWithPolicy) Size() (n int)

func (*MsgCreateGroupWithPolicy) String

func (m *MsgCreateGroupWithPolicy) String() string

func (MsgCreateGroupWithPolicy) Type

Type Implements Msg.

func (*MsgCreateGroupWithPolicy) Unmarshal

func (m *MsgCreateGroupWithPolicy) Unmarshal(dAtA []byte) error

func (MsgCreateGroupWithPolicy) UnpackInterfaces

func (m MsgCreateGroupWithPolicy) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (MsgCreateGroupWithPolicy) ValidateBasic

func (m MsgCreateGroupWithPolicy) ValidateBasic() error

ValidateBasic does a sanity check on the provided data

func (*MsgCreateGroupWithPolicy) XXX_DiscardUnknown

func (m *MsgCreateGroupWithPolicy) XXX_DiscardUnknown()

func (*MsgCreateGroupWithPolicy) XXX_Marshal

func (m *MsgCreateGroupWithPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateGroupWithPolicy) XXX_Merge

func (m *MsgCreateGroupWithPolicy) XXX_Merge(src proto.Message)

func (*MsgCreateGroupWithPolicy) XXX_Size

func (m *MsgCreateGroupWithPolicy) XXX_Size() int

func (*MsgCreateGroupWithPolicy) XXX_Unmarshal

func (m *MsgCreateGroupWithPolicy) XXX_Unmarshal(b []byte) error

type MsgCreateGroupWithPolicyResponse

type MsgCreateGroupWithPolicyResponse struct {
	// group_id is the unique ID of the newly created group with policy.
	GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// group_policy_address is the account address of the newly created group policy.
	GroupPolicyAddress string `protobuf:"bytes,2,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"`
}

MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type.

func (*MsgCreateGroupWithPolicyResponse) Descriptor

func (*MsgCreateGroupWithPolicyResponse) Descriptor() ([]byte, []int)

func (*MsgCreateGroupWithPolicyResponse) GetGroupId

func (m *MsgCreateGroupWithPolicyResponse) GetGroupId() uint64

func (*MsgCreateGroupWithPolicyResponse) GetGroupPolicyAddress

func (m *MsgCreateGroupWithPolicyResponse) GetGroupPolicyAddress() string

func (*MsgCreateGroupWithPolicyResponse) Marshal

func (m *MsgCreateGroupWithPolicyResponse) Marshal() (dAtA []byte, err error)

func (*MsgCreateGroupWithPolicyResponse) MarshalTo

func (m *MsgCreateGroupWithPolicyResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateGroupWithPolicyResponse) MarshalToSizedBuffer

func (m *MsgCreateGroupWithPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateGroupWithPolicyResponse) ProtoMessage

func (*MsgCreateGroupWithPolicyResponse) ProtoMessage()

func (*MsgCreateGroupWithPolicyResponse) Reset

func (*MsgCreateGroupWithPolicyResponse) Size

func (m *MsgCreateGroupWithPolicyResponse) Size() (n int)

func (*MsgCreateGroupWithPolicyResponse) String

func (*MsgCreateGroupWithPolicyResponse) Unmarshal

func (m *MsgCreateGroupWithPolicyResponse) Unmarshal(dAtA []byte) error

func (*MsgCreateGroupWithPolicyResponse) XXX_DiscardUnknown

func (m *MsgCreateGroupWithPolicyResponse) XXX_DiscardUnknown()

func (*MsgCreateGroupWithPolicyResponse) XXX_Marshal

func (m *MsgCreateGroupWithPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateGroupWithPolicyResponse) XXX_Merge

func (*MsgCreateGroupWithPolicyResponse) XXX_Size

func (m *MsgCreateGroupWithPolicyResponse) XXX_Size() int

func (*MsgCreateGroupWithPolicyResponse) XXX_Unmarshal

func (m *MsgCreateGroupWithPolicyResponse) XXX_Unmarshal(b []byte) error

type MsgExec

type MsgExec 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"`
	// executor is the account address used to execute the proposal.
	Executor string `protobuf:"bytes,2,opt,name=executor,proto3" json:"executor,omitempty"`
}

MsgExec is the Msg/Exec request type.

func (*MsgExec) Descriptor

func (*MsgExec) Descriptor() ([]byte, []int)

func (*MsgExec) GetExecutor

func (m *MsgExec) GetExecutor() string

func (*MsgExec) GetProposalId

func (m *MsgExec) GetProposalId() uint64

func (MsgExec) GetSignBytes

func (m MsgExec) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgExec) GetSigners

func (m MsgExec) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgExec.

func (*MsgExec) Marshal

func (m *MsgExec) Marshal() (dAtA []byte, err error)

func (*MsgExec) MarshalTo

func (m *MsgExec) MarshalTo(dAtA []byte) (int, error)

func (*MsgExec) MarshalToSizedBuffer

func (m *MsgExec) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgExec) ProtoMessage

func (*MsgExec) ProtoMessage()

func (*MsgExec) Reset

func (m *MsgExec) Reset()

func (MsgExec) Route

func (m MsgExec) Route() string

Route Implements Msg.

func (*MsgExec) Size

func (m *MsgExec) Size() (n int)

func (*MsgExec) String

func (m *MsgExec) String() string

func (MsgExec) Type

func (m MsgExec) Type() string

Type Implements Msg.

func (*MsgExec) Unmarshal

func (m *MsgExec) Unmarshal(dAtA []byte) error

func (MsgExec) ValidateBasic

func (m MsgExec) ValidateBasic() error

ValidateBasic does a sanity check on the provided data

func (*MsgExec) XXX_DiscardUnknown

func (m *MsgExec) XXX_DiscardUnknown()

func (*MsgExec) XXX_Marshal

func (m *MsgExec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgExec) XXX_Merge

func (m *MsgExec) XXX_Merge(src proto.Message)

func (*MsgExec) XXX_Size

func (m *MsgExec) XXX_Size() int

func (*MsgExec) XXX_Unmarshal

func (m *MsgExec) XXX_Unmarshal(b []byte) error

type MsgExecResponse

type MsgExecResponse struct {
	// result is the final result of the proposal execution.
	Result ProposalExecutorResult `protobuf:"varint,2,opt,name=result,proto3,enum=cosmos.group.v1.ProposalExecutorResult" json:"result,omitempty"`
}

MsgExecResponse is the Msg/Exec request type.

func (*MsgExecResponse) Descriptor

func (*MsgExecResponse) Descriptor() ([]byte, []int)

func (*MsgExecResponse) GetResult

func (m *MsgExecResponse) GetResult() ProposalExecutorResult

func (*MsgExecResponse) Marshal

func (m *MsgExecResponse) Marshal() (dAtA []byte, err error)

func (*MsgExecResponse) MarshalTo

func (m *MsgExecResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgExecResponse) MarshalToSizedBuffer

func (m *MsgExecResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgExecResponse) ProtoMessage

func (*MsgExecResponse) ProtoMessage()

func (*MsgExecResponse) Reset

func (m *MsgExecResponse) Reset()

func (*MsgExecResponse) Size

func (m *MsgExecResponse) Size() (n int)

func (*MsgExecResponse) String

func (m *MsgExecResponse) String() string

func (*MsgExecResponse) Unmarshal

func (m *MsgExecResponse) Unmarshal(dAtA []byte) error

func (*MsgExecResponse) XXX_DiscardUnknown

func (m *MsgExecResponse) XXX_DiscardUnknown()

func (*MsgExecResponse) XXX_Marshal

func (m *MsgExecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgExecResponse) XXX_Merge

func (m *MsgExecResponse) XXX_Merge(src proto.Message)

func (*MsgExecResponse) XXX_Size

func (m *MsgExecResponse) XXX_Size() int

func (*MsgExecResponse) XXX_Unmarshal

func (m *MsgExecResponse) XXX_Unmarshal(b []byte) error

type MsgLeaveGroup

type MsgLeaveGroup struct {
	// address is the account address of the group member.
	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"`
}

MsgLeaveGroup is the Msg/LeaveGroup request type.

func (*MsgLeaveGroup) Descriptor

func (*MsgLeaveGroup) Descriptor() ([]byte, []int)

func (*MsgLeaveGroup) GetAddress

func (m *MsgLeaveGroup) GetAddress() string

func (*MsgLeaveGroup) GetGroupId

func (m *MsgLeaveGroup) GetGroupId() uint64

func (MsgLeaveGroup) GetSignBytes

func (m MsgLeaveGroup) GetSignBytes() []byte

GetSignBytes Implements Msg

func (MsgLeaveGroup) GetSigners

func (m MsgLeaveGroup) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgLeaveGroup

func (*MsgLeaveGroup) Marshal

func (m *MsgLeaveGroup) Marshal() (dAtA []byte, err error)

func (*MsgLeaveGroup) MarshalTo

func (m *MsgLeaveGroup) MarshalTo(dAtA []byte) (int, error)

func (*MsgLeaveGroup) MarshalToSizedBuffer

func (m *MsgLeaveGroup) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgLeaveGroup) ProtoMessage

func (*MsgLeaveGroup) ProtoMessage()

func (*MsgLeaveGroup) Reset

func (m *MsgLeaveGroup) Reset()

func (MsgLeaveGroup) Route

func (m MsgLeaveGroup) Route() string

Route Implements Msg

func (*MsgLeaveGroup) Size

func (m *MsgLeaveGroup) Size() (n int)

func (*MsgLeaveGroup) String

func (m *MsgLeaveGroup) String() string

func (MsgLeaveGroup) Type

func (m MsgLeaveGroup) Type() string

Type Implements Msg

func (*MsgLeaveGroup) Unmarshal

func (m *MsgLeaveGroup) Unmarshal(dAtA []byte) error

func (MsgLeaveGroup) ValidateBasic

func (m MsgLeaveGroup) ValidateBasic() error

ValidateBasic does a sanity check on the provided data

func (*MsgLeaveGroup) XXX_DiscardUnknown

func (m *MsgLeaveGroup) XXX_DiscardUnknown()

func (*MsgLeaveGroup) XXX_Marshal

func (m *MsgLeaveGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgLeaveGroup) XXX_Merge

func (m *MsgLeaveGroup) XXX_Merge(src proto.Message)

func (*MsgLeaveGroup) XXX_Size

func (m *MsgLeaveGroup) XXX_Size() int

func (*MsgLeaveGroup) XXX_Unmarshal

func (m *MsgLeaveGroup) XXX_Unmarshal(b []byte) error

type MsgLeaveGroupResponse

type MsgLeaveGroupResponse struct {
}

MsgLeaveGroupResponse is the Msg/LeaveGroup response type.

func (*MsgLeaveGroupResponse) Descriptor

func (*MsgLeaveGroupResponse) Descriptor() ([]byte, []int)

func (*MsgLeaveGroupResponse) Marshal

func (m *MsgLeaveGroupResponse) Marshal() (dAtA []byte, err error)

func (*MsgLeaveGroupResponse) MarshalTo

func (m *MsgLeaveGroupResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgLeaveGroupResponse) MarshalToSizedBuffer

func (m *MsgLeaveGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgLeaveGroupResponse) ProtoMessage

func (*MsgLeaveGroupResponse) ProtoMessage()

func (*MsgLeaveGroupResponse) Reset

func (m *MsgLeaveGroupResponse) Reset()

func (*MsgLeaveGroupResponse) Size

func (m *MsgLeaveGroupResponse) Size() (n int)

func (*MsgLeaveGroupResponse) String

func (m *MsgLeaveGroupResponse) String() string

func (*MsgLeaveGroupResponse) Unmarshal

func (m *MsgLeaveGroupResponse) Unmarshal(dAtA []byte) error

func (*MsgLeaveGroupResponse) XXX_DiscardUnknown

func (m *MsgLeaveGroupResponse) XXX_DiscardUnknown()

func (*MsgLeaveGroupResponse) XXX_Marshal

func (m *MsgLeaveGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgLeaveGroupResponse) XXX_Merge

func (m *MsgLeaveGroupResponse) XXX_Merge(src proto.Message)

func (*MsgLeaveGroupResponse) XXX_Size

func (m *MsgLeaveGroupResponse) XXX_Size() int

func (*MsgLeaveGroupResponse) XXX_Unmarshal

func (m *MsgLeaveGroupResponse) XXX_Unmarshal(b []byte) error

type MsgServer

type MsgServer interface {
	// CreateGroup creates a new group with an admin account address, a list of members and some optional metadata.
	CreateGroup(context.Context, *MsgCreateGroup) (*MsgCreateGroupResponse, error)
	// UpdateGroupMembers updates the group members with given group id and admin address.
	UpdateGroupMembers(context.Context, *MsgUpdateGroupMembers) (*MsgUpdateGroupMembersResponse, error)
	// UpdateGroupAdmin updates the group admin with given group id and previous admin address.
	UpdateGroupAdmin(context.Context, *MsgUpdateGroupAdmin) (*MsgUpdateGroupAdminResponse, error)
	// UpdateGroupMetadata updates the group metadata with given group id and admin address.
	UpdateGroupMetadata(context.Context, *MsgUpdateGroupMetadata) (*MsgUpdateGroupMetadataResponse, error)
	// CreateGroupPolicy creates a new group policy using given DecisionPolicy.
	CreateGroupPolicy(context.Context, *MsgCreateGroupPolicy) (*MsgCreateGroupPolicyResponse, error)
	// CreateGroupWithPolicy creates a new group with policy.
	CreateGroupWithPolicy(context.Context, *MsgCreateGroupWithPolicy) (*MsgCreateGroupWithPolicyResponse, error)
	// UpdateGroupPolicyAdmin updates a group policy admin.
	UpdateGroupPolicyAdmin(context.Context, *MsgUpdateGroupPolicyAdmin) (*MsgUpdateGroupPolicyAdminResponse, error)
	// UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated.
	UpdateGroupPolicyDecisionPolicy(context.Context, *MsgUpdateGroupPolicyDecisionPolicy) (*MsgUpdateGroupPolicyDecisionPolicyResponse, error)
	// UpdateGroupPolicyMetadata updates a group policy metadata.
	UpdateGroupPolicyMetadata(context.Context, *MsgUpdateGroupPolicyMetadata) (*MsgUpdateGroupPolicyMetadataResponse, error)
	// SubmitProposal submits a new proposal.
	SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error)
	// WithdrawProposal withdraws a proposal.
	WithdrawProposal(context.Context, *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error)
	// Vote allows a voter to vote on a proposal.
	Vote(context.Context, *MsgVote) (*MsgVoteResponse, error)
	// Exec executes a proposal.
	Exec(context.Context, *MsgExec) (*MsgExecResponse, error)
	// LeaveGroup allows a group member to leave the group.
	LeaveGroup(context.Context, *MsgLeaveGroup) (*MsgLeaveGroupResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSubmitProposal

type MsgSubmitProposal struct {
	// group_policy_address is the account address of group policy.
	GroupPolicyAddress string `protobuf:"bytes,1,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_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 attached to the proposal.
	Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// messages is a list of `sdk.Msg`s that will be executed if the proposal passes.
	Messages []*types.Any `protobuf:"bytes,4,rep,name=messages,proto3" json:"messages,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.v1.Exec" json:"exec,omitempty"`
	// title is the title of the proposal.
	//
	// Since: cosmos-sdk 0.47
	Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"`
	// summary is the summary of the proposal.
	//
	// Since: cosmos-sdk 0.47
	Summary string `protobuf:"bytes,7,opt,name=summary,proto3" json:"summary,omitempty"`
}

MsgSubmitProposal is the Msg/SubmitProposal request type.

func NewMsgSubmitProposal

func NewMsgSubmitProposal(address string, proposers []string, msgs []sdk.Msg, metadata string, exec Exec, title, summary string) (*MsgSubmitProposal, error)

NewMsgSubmitProposal creates a new MsgSubmitProposal.

func (*MsgSubmitProposal) Descriptor

func (*MsgSubmitProposal) Descriptor() ([]byte, []int)

func (MsgSubmitProposal) GetMsgs

func (m MsgSubmitProposal) GetMsgs() ([]sdk.Msg, error)

GetMsgs unpacks m.Messages Any's into sdk.Msg's

func (MsgSubmitProposal) GetSignBytes

func (m MsgSubmitProposal) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgSubmitProposal) GetSigners

func (m MsgSubmitProposal) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgSubmitProposal.

func (*MsgSubmitProposal) Marshal

func (m *MsgSubmitProposal) Marshal() (dAtA []byte, err error)

func (*MsgSubmitProposal) MarshalTo

func (m *MsgSubmitProposal) MarshalTo(dAtA []byte) (int, error)

func (*MsgSubmitProposal) MarshalToSizedBuffer

func (m *MsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSubmitProposal) ProtoMessage

func (*MsgSubmitProposal) ProtoMessage()

func (*MsgSubmitProposal) Reset

func (m *MsgSubmitProposal) Reset()

func (MsgSubmitProposal) Route

func (m MsgSubmitProposal) Route() string

Route Implements Msg.

func (*MsgSubmitProposal) SetMsgs

func (m *MsgSubmitProposal) SetMsgs(msgs []sdk.Msg) error

SetMsgs packs msgs into Any's

func (*MsgSubmitProposal) Size

func (m *MsgSubmitProposal) Size() (n int)

func (*MsgSubmitProposal) String

func (m *MsgSubmitProposal) String() string

func (MsgSubmitProposal) Type

func (m MsgSubmitProposal) Type() string

Type Implements Msg.

func (*MsgSubmitProposal) Unmarshal

func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error

func (MsgSubmitProposal) UnpackInterfaces

func (m MsgSubmitProposal) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (MsgSubmitProposal) ValidateBasic

func (m MsgSubmitProposal) ValidateBasic() error

ValidateBasic does a sanity check on the provided proposal, such as verifying proposer addresses, and performing ValidateBasic on each individual `sdk.Msg`.

func (*MsgSubmitProposal) XXX_DiscardUnknown

func (m *MsgSubmitProposal) XXX_DiscardUnknown()

func (*MsgSubmitProposal) XXX_Marshal

func (m *MsgSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSubmitProposal) XXX_Merge

func (m *MsgSubmitProposal) XXX_Merge(src proto.Message)

func (*MsgSubmitProposal) XXX_Size

func (m *MsgSubmitProposal) XXX_Size() int

func (*MsgSubmitProposal) XXX_Unmarshal

func (m *MsgSubmitProposal) XXX_Unmarshal(b []byte) error

type MsgSubmitProposalResponse

type MsgSubmitProposalResponse 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"`
}

MsgSubmitProposalResponse is the Msg/SubmitProposal response type.

func (*MsgSubmitProposalResponse) Descriptor

func (*MsgSubmitProposalResponse) Descriptor() ([]byte, []int)

func (*MsgSubmitProposalResponse) GetProposalId

func (m *MsgSubmitProposalResponse) GetProposalId() uint64

func (*MsgSubmitProposalResponse) Marshal

func (m *MsgSubmitProposalResponse) Marshal() (dAtA []byte, err error)

func (*MsgSubmitProposalResponse) MarshalTo

func (m *MsgSubmitProposalResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgSubmitProposalResponse) MarshalToSizedBuffer

func (m *MsgSubmitProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSubmitProposalResponse) ProtoMessage

func (*MsgSubmitProposalResponse) ProtoMessage()

func (*MsgSubmitProposalResponse) Reset

func (m *MsgSubmitProposalResponse) Reset()

func (*MsgSubmitProposalResponse) Size

func (m *MsgSubmitProposalResponse) Size() (n int)

func (*MsgSubmitProposalResponse) String

func (m *MsgSubmitProposalResponse) String() string

func (*MsgSubmitProposalResponse) Unmarshal

func (m *MsgSubmitProposalResponse) Unmarshal(dAtA []byte) error

func (*MsgSubmitProposalResponse) XXX_DiscardUnknown

func (m *MsgSubmitProposalResponse) XXX_DiscardUnknown()

func (*MsgSubmitProposalResponse) XXX_Marshal

func (m *MsgSubmitProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSubmitProposalResponse) XXX_Merge

func (m *MsgSubmitProposalResponse) XXX_Merge(src proto.Message)

func (*MsgSubmitProposalResponse) XXX_Size

func (m *MsgSubmitProposalResponse) XXX_Size() int

func (*MsgSubmitProposalResponse) XXX_Unmarshal

func (m *MsgSubmitProposalResponse) XXX_Unmarshal(b []byte) error

type MsgUpdateGroupAdmin

type MsgUpdateGroupAdmin 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"`
}

MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type.

func (*MsgUpdateGroupAdmin) Descriptor

func (*MsgUpdateGroupAdmin) Descriptor() ([]byte, []int)

func (*MsgUpdateGroupAdmin) GetAdmin

func (m *MsgUpdateGroupAdmin) GetAdmin() string

func (*MsgUpdateGroupAdmin) GetGroupID

func (m *MsgUpdateGroupAdmin) GetGroupID() uint64

GetGroupID gets the group id of the MsgUpdateGroupAdmin.

func (*MsgUpdateGroupAdmin) GetGroupId

func (m *MsgUpdateGroupAdmin) GetGroupId() uint64

func (*MsgUpdateGroupAdmin) GetNewAdmin

func (m *MsgUpdateGroupAdmin) GetNewAdmin() string

func (MsgUpdateGroupAdmin) GetSignBytes

func (m MsgUpdateGroupAdmin) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgUpdateGroupAdmin) GetSigners

func (m MsgUpdateGroupAdmin) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgUpdateGroupAdmin.

func (*MsgUpdateGroupAdmin) Marshal

func (m *MsgUpdateGroupAdmin) Marshal() (dAtA []byte, err error)

func (*MsgUpdateGroupAdmin) MarshalTo

func (m *MsgUpdateGroupAdmin) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateGroupAdmin) MarshalToSizedBuffer

func (m *MsgUpdateGroupAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateGroupAdmin) ProtoMessage

func (*MsgUpdateGroupAdmin) ProtoMessage()

func (*MsgUpdateGroupAdmin) Reset

func (m *MsgUpdateGroupAdmin) Reset()

func (MsgUpdateGroupAdmin) Route

func (m MsgUpdateGroupAdmin) Route() string

Route Implements Msg.

func (*MsgUpdateGroupAdmin) Size

func (m *MsgUpdateGroupAdmin) Size() (n int)

func (*MsgUpdateGroupAdmin) String

func (m *MsgUpdateGroupAdmin) String() string

func (MsgUpdateGroupAdmin) Type

func (m MsgUpdateGroupAdmin) Type() string

Type Implements Msg.

func (*MsgUpdateGroupAdmin) Unmarshal

func (m *MsgUpdateGroupAdmin) Unmarshal(dAtA []byte) error

func (MsgUpdateGroupAdmin) ValidateBasic

func (m MsgUpdateGroupAdmin) ValidateBasic() error

ValidateBasic does a sanity check on the provided data.

func (*MsgUpdateGroupAdmin) XXX_DiscardUnknown

func (m *MsgUpdateGroupAdmin) XXX_DiscardUnknown()

func (*MsgUpdateGroupAdmin) XXX_Marshal

func (m *MsgUpdateGroupAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateGroupAdmin) XXX_Merge

func (m *MsgUpdateGroupAdmin) XXX_Merge(src proto.Message)

func (*MsgUpdateGroupAdmin) XXX_Size

func (m *MsgUpdateGroupAdmin) XXX_Size() int

func (*MsgUpdateGroupAdmin) XXX_Unmarshal

func (m *MsgUpdateGroupAdmin) XXX_Unmarshal(b []byte) error

type MsgUpdateGroupAdminResponse

type MsgUpdateGroupAdminResponse struct {
}

MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type.

func (*MsgUpdateGroupAdminResponse) Descriptor

func (*MsgUpdateGroupAdminResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateGroupAdminResponse) Marshal

func (m *MsgUpdateGroupAdminResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateGroupAdminResponse) MarshalTo

func (m *MsgUpdateGroupAdminResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateGroupAdminResponse) MarshalToSizedBuffer

func (m *MsgUpdateGroupAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateGroupAdminResponse) ProtoMessage

func (*MsgUpdateGroupAdminResponse) ProtoMessage()

func (*MsgUpdateGroupAdminResponse) Reset

func (m *MsgUpdateGroupAdminResponse) Reset()

func (*MsgUpdateGroupAdminResponse) Size

func (m *MsgUpdateGroupAdminResponse) Size() (n int)

func (*MsgUpdateGroupAdminResponse) String

func (m *MsgUpdateGroupAdminResponse) String() string

func (*MsgUpdateGroupAdminResponse) Unmarshal

func (m *MsgUpdateGroupAdminResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateGroupAdminResponse) XXX_DiscardUnknown

func (m *MsgUpdateGroupAdminResponse) XXX_DiscardUnknown()

func (*MsgUpdateGroupAdminResponse) XXX_Marshal

func (m *MsgUpdateGroupAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateGroupAdminResponse) XXX_Merge

func (m *MsgUpdateGroupAdminResponse) XXX_Merge(src proto.Message)

func (*MsgUpdateGroupAdminResponse) XXX_Size

func (m *MsgUpdateGroupAdminResponse) XXX_Size() int

func (*MsgUpdateGroupAdminResponse) XXX_Unmarshal

func (m *MsgUpdateGroupAdminResponse) XXX_Unmarshal(b []byte) error

type MsgUpdateGroupMembers

type MsgUpdateGroupMembers 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 []MemberRequest `protobuf:"bytes,3,rep,name=member_updates,json=memberUpdates,proto3" json:"member_updates"`
}

MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type.

func (*MsgUpdateGroupMembers) Descriptor

func (*MsgUpdateGroupMembers) Descriptor() ([]byte, []int)

func (*MsgUpdateGroupMembers) GetAdmin

func (m *MsgUpdateGroupMembers) GetAdmin() string

func (*MsgUpdateGroupMembers) GetGroupID

func (m *MsgUpdateGroupMembers) GetGroupID() uint64

GetGroupID gets the group id of the MsgUpdateGroupMembers.

func (*MsgUpdateGroupMembers) GetGroupId

func (m *MsgUpdateGroupMembers) GetGroupId() uint64

func (*MsgUpdateGroupMembers) GetMemberUpdates

func (m *MsgUpdateGroupMembers) GetMemberUpdates() []MemberRequest

func (MsgUpdateGroupMembers) GetSignBytes

func (m MsgUpdateGroupMembers) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgUpdateGroupMembers) GetSigners

func (m MsgUpdateGroupMembers) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgUpdateGroupMembers.

func (*MsgUpdateGroupMembers) Marshal

func (m *MsgUpdateGroupMembers) Marshal() (dAtA []byte, err error)

func (*MsgUpdateGroupMembers) MarshalTo

func (m *MsgUpdateGroupMembers) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateGroupMembers) MarshalToSizedBuffer

func (m *MsgUpdateGroupMembers) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateGroupMembers) ProtoMessage

func (*MsgUpdateGroupMembers) ProtoMessage()

func (*MsgUpdateGroupMembers) Reset

func (m *MsgUpdateGroupMembers) Reset()

func (MsgUpdateGroupMembers) Route

func (m MsgUpdateGroupMembers) Route() string

Route Implements Msg.

func (*MsgUpdateGroupMembers) Size

func (m *MsgUpdateGroupMembers) Size() (n int)

func (*MsgUpdateGroupMembers) String

func (m *MsgUpdateGroupMembers) String() string

func (MsgUpdateGroupMembers) Type

func (m MsgUpdateGroupMembers) Type() string

Type Implements Msg.

func (*MsgUpdateGroupMembers) Unmarshal

func (m *MsgUpdateGroupMembers) Unmarshal(dAtA []byte) error

func (MsgUpdateGroupMembers) ValidateBasic

func (m MsgUpdateGroupMembers) ValidateBasic() error

ValidateBasic does a sanity check on the provided data

func (*MsgUpdateGroupMembers) XXX_DiscardUnknown

func (m *MsgUpdateGroupMembers) XXX_DiscardUnknown()

func (*MsgUpdateGroupMembers) XXX_Marshal

func (m *MsgUpdateGroupMembers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateGroupMembers) XXX_Merge

func (m *MsgUpdateGroupMembers) XXX_Merge(src proto.Message)

func (*MsgUpdateGroupMembers) XXX_Size

func (m *MsgUpdateGroupMembers) XXX_Size() int

func (*MsgUpdateGroupMembers) XXX_Unmarshal

func (m *MsgUpdateGroupMembers) XXX_Unmarshal(b []byte) error

type MsgUpdateGroupMembersResponse

type MsgUpdateGroupMembersResponse struct {
}

MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type.

func (*MsgUpdateGroupMembersResponse) Descriptor

func (*MsgUpdateGroupMembersResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateGroupMembersResponse) Marshal

func (m *MsgUpdateGroupMembersResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateGroupMembersResponse) MarshalTo

func (m *MsgUpdateGroupMembersResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateGroupMembersResponse) MarshalToSizedBuffer

func (m *MsgUpdateGroupMembersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateGroupMembersResponse) ProtoMessage

func (*MsgUpdateGroupMembersResponse) ProtoMessage()

func (*MsgUpdateGroupMembersResponse) Reset

func (m *MsgUpdateGroupMembersResponse) Reset()

func (*MsgUpdateGroupMembersResponse) Size

func (m *MsgUpdateGroupMembersResponse) Size() (n int)

func (*MsgUpdateGroupMembersResponse) String

func (*MsgUpdateGroupMembersResponse) Unmarshal

func (m *MsgUpdateGroupMembersResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateGroupMembersResponse) XXX_DiscardUnknown

func (m *MsgUpdateGroupMembersResponse) XXX_DiscardUnknown()

func (*MsgUpdateGroupMembersResponse) XXX_Marshal

func (m *MsgUpdateGroupMembersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateGroupMembersResponse) XXX_Merge

func (m *MsgUpdateGroupMembersResponse) XXX_Merge(src proto.Message)

func (*MsgUpdateGroupMembersResponse) XXX_Size

func (m *MsgUpdateGroupMembersResponse) XXX_Size() int

func (*MsgUpdateGroupMembersResponse) XXX_Unmarshal

func (m *MsgUpdateGroupMembersResponse) XXX_Unmarshal(b []byte) error

type MsgUpdateGroupMetadata

type MsgUpdateGroupMetadata 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 string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
}

MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type.

func (*MsgUpdateGroupMetadata) Descriptor

func (*MsgUpdateGroupMetadata) Descriptor() ([]byte, []int)

func (*MsgUpdateGroupMetadata) GetAdmin

func (m *MsgUpdateGroupMetadata) GetAdmin() string

func (*MsgUpdateGroupMetadata) GetGroupID

func (m *MsgUpdateGroupMetadata) GetGroupID() uint64

GetGroupID gets the group id of the MsgUpdateGroupMetadata.

func (*MsgUpdateGroupMetadata) GetGroupId

func (m *MsgUpdateGroupMetadata) GetGroupId() uint64

func (*MsgUpdateGroupMetadata) GetMetadata

func (m *MsgUpdateGroupMetadata) GetMetadata() string

func (MsgUpdateGroupMetadata) GetSignBytes

func (m MsgUpdateGroupMetadata) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgUpdateGroupMetadata) GetSigners

func (m MsgUpdateGroupMetadata) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgUpdateGroupMetadata.

func (*MsgUpdateGroupMetadata) Marshal

func (m *MsgUpdateGroupMetadata) Marshal() (dAtA []byte, err error)

func (*MsgUpdateGroupMetadata) MarshalTo

func (m *MsgUpdateGroupMetadata) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateGroupMetadata) MarshalToSizedBuffer

func (m *MsgUpdateGroupMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateGroupMetadata) ProtoMessage

func (*MsgUpdateGroupMetadata) ProtoMessage()

func (*MsgUpdateGroupMetadata) Reset

func (m *MsgUpdateGroupMetadata) Reset()

func (MsgUpdateGroupMetadata) Route

func (m MsgUpdateGroupMetadata) Route() string

Route Implements Msg.

func (*MsgUpdateGroupMetadata) Size

func (m *MsgUpdateGroupMetadata) Size() (n int)

func (*MsgUpdateGroupMetadata) String

func (m *MsgUpdateGroupMetadata) String() string

func (MsgUpdateGroupMetadata) Type

func (m MsgUpdateGroupMetadata) Type() string

Type Implements Msg.

func (*MsgUpdateGroupMetadata) Unmarshal

func (m *MsgUpdateGroupMetadata) Unmarshal(dAtA []byte) error

func (MsgUpdateGroupMetadata) ValidateBasic

func (m MsgUpdateGroupMetadata) ValidateBasic() error

ValidateBasic does a sanity check on the provided data

func (*MsgUpdateGroupMetadata) XXX_DiscardUnknown

func (m *MsgUpdateGroupMetadata) XXX_DiscardUnknown()

func (*MsgUpdateGroupMetadata) XXX_Marshal

func (m *MsgUpdateGroupMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateGroupMetadata) XXX_Merge

func (m *MsgUpdateGroupMetadata) XXX_Merge(src proto.Message)

func (*MsgUpdateGroupMetadata) XXX_Size

func (m *MsgUpdateGroupMetadata) XXX_Size() int

func (*MsgUpdateGroupMetadata) XXX_Unmarshal

func (m *MsgUpdateGroupMetadata) XXX_Unmarshal(b []byte) error

type MsgUpdateGroupMetadataResponse

type MsgUpdateGroupMetadataResponse struct {
}

MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type.

func (*MsgUpdateGroupMetadataResponse) Descriptor

func (*MsgUpdateGroupMetadataResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateGroupMetadataResponse) Marshal

func (m *MsgUpdateGroupMetadataResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateGroupMetadataResponse) MarshalTo

func (m *MsgUpdateGroupMetadataResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateGroupMetadataResponse) MarshalToSizedBuffer

func (m *MsgUpdateGroupMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateGroupMetadataResponse) ProtoMessage

func (*MsgUpdateGroupMetadataResponse) ProtoMessage()

func (*MsgUpdateGroupMetadataResponse) Reset

func (m *MsgUpdateGroupMetadataResponse) Reset()

func (*MsgUpdateGroupMetadataResponse) Size

func (m *MsgUpdateGroupMetadataResponse) Size() (n int)

func (*MsgUpdateGroupMetadataResponse) String

func (*MsgUpdateGroupMetadataResponse) Unmarshal

func (m *MsgUpdateGroupMetadataResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateGroupMetadataResponse) XXX_DiscardUnknown

func (m *MsgUpdateGroupMetadataResponse) XXX_DiscardUnknown()

func (*MsgUpdateGroupMetadataResponse) XXX_Marshal

func (m *MsgUpdateGroupMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateGroupMetadataResponse) XXX_Merge

func (m *MsgUpdateGroupMetadataResponse) XXX_Merge(src proto.Message)

func (*MsgUpdateGroupMetadataResponse) XXX_Size

func (m *MsgUpdateGroupMetadataResponse) XXX_Size() int

func (*MsgUpdateGroupMetadataResponse) XXX_Unmarshal

func (m *MsgUpdateGroupMetadataResponse) XXX_Unmarshal(b []byte) error

type MsgUpdateGroupPolicyAdmin

type MsgUpdateGroupPolicyAdmin struct {
	// admin is the account address of the group admin.
	Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"`
	// group_policy_address is the account address of the group policy.
	GroupPolicyAddress string `protobuf:"bytes,2,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"`
	// new_admin is the new group policy admin.
	NewAdmin string `protobuf:"bytes,3,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty"`
}

MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type.

func (*MsgUpdateGroupPolicyAdmin) Descriptor

func (*MsgUpdateGroupPolicyAdmin) Descriptor() ([]byte, []int)

func (*MsgUpdateGroupPolicyAdmin) GetAdmin

func (m *MsgUpdateGroupPolicyAdmin) GetAdmin() string

func (*MsgUpdateGroupPolicyAdmin) GetGroupPolicyAddress

func (m *MsgUpdateGroupPolicyAdmin) GetGroupPolicyAddress() string

func (*MsgUpdateGroupPolicyAdmin) GetNewAdmin

func (m *MsgUpdateGroupPolicyAdmin) GetNewAdmin() string

func (MsgUpdateGroupPolicyAdmin) GetSignBytes

func (m MsgUpdateGroupPolicyAdmin) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgUpdateGroupPolicyAdmin) GetSigners

func (m MsgUpdateGroupPolicyAdmin) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgUpdateGroupPolicyAdmin.

func (*MsgUpdateGroupPolicyAdmin) Marshal

func (m *MsgUpdateGroupPolicyAdmin) Marshal() (dAtA []byte, err error)

func (*MsgUpdateGroupPolicyAdmin) MarshalTo

func (m *MsgUpdateGroupPolicyAdmin) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateGroupPolicyAdmin) MarshalToSizedBuffer

func (m *MsgUpdateGroupPolicyAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateGroupPolicyAdmin) ProtoMessage

func (*MsgUpdateGroupPolicyAdmin) ProtoMessage()

func (*MsgUpdateGroupPolicyAdmin) Reset

func (m *MsgUpdateGroupPolicyAdmin) Reset()

func (MsgUpdateGroupPolicyAdmin) Route

Route Implements Msg.

func (*MsgUpdateGroupPolicyAdmin) Size

func (m *MsgUpdateGroupPolicyAdmin) Size() (n int)

func (*MsgUpdateGroupPolicyAdmin) String

func (m *MsgUpdateGroupPolicyAdmin) String() string

func (MsgUpdateGroupPolicyAdmin) Type

Type Implements Msg.

func (*MsgUpdateGroupPolicyAdmin) Unmarshal

func (m *MsgUpdateGroupPolicyAdmin) Unmarshal(dAtA []byte) error

func (MsgUpdateGroupPolicyAdmin) ValidateBasic

func (m MsgUpdateGroupPolicyAdmin) ValidateBasic() error

ValidateBasic does a sanity check on the provided data

func (*MsgUpdateGroupPolicyAdmin) XXX_DiscardUnknown

func (m *MsgUpdateGroupPolicyAdmin) XXX_DiscardUnknown()

func (*MsgUpdateGroupPolicyAdmin) XXX_Marshal

func (m *MsgUpdateGroupPolicyAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateGroupPolicyAdmin) XXX_Merge

func (m *MsgUpdateGroupPolicyAdmin) XXX_Merge(src proto.Message)

func (*MsgUpdateGroupPolicyAdmin) XXX_Size

func (m *MsgUpdateGroupPolicyAdmin) XXX_Size() int

func (*MsgUpdateGroupPolicyAdmin) XXX_Unmarshal

func (m *MsgUpdateGroupPolicyAdmin) XXX_Unmarshal(b []byte) error

type MsgUpdateGroupPolicyAdminResponse

type MsgUpdateGroupPolicyAdminResponse struct {
}

MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type.

func (*MsgUpdateGroupPolicyAdminResponse) Descriptor

func (*MsgUpdateGroupPolicyAdminResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateGroupPolicyAdminResponse) Marshal

func (m *MsgUpdateGroupPolicyAdminResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateGroupPolicyAdminResponse) MarshalTo

func (m *MsgUpdateGroupPolicyAdminResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateGroupPolicyAdminResponse) MarshalToSizedBuffer

func (m *MsgUpdateGroupPolicyAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateGroupPolicyAdminResponse) ProtoMessage

func (*MsgUpdateGroupPolicyAdminResponse) ProtoMessage()

func (*MsgUpdateGroupPolicyAdminResponse) Reset

func (*MsgUpdateGroupPolicyAdminResponse) Size

func (m *MsgUpdateGroupPolicyAdminResponse) Size() (n int)

func (*MsgUpdateGroupPolicyAdminResponse) String

func (*MsgUpdateGroupPolicyAdminResponse) Unmarshal

func (m *MsgUpdateGroupPolicyAdminResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateGroupPolicyAdminResponse) XXX_DiscardUnknown

func (m *MsgUpdateGroupPolicyAdminResponse) XXX_DiscardUnknown()

func (*MsgUpdateGroupPolicyAdminResponse) XXX_Marshal

func (m *MsgUpdateGroupPolicyAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateGroupPolicyAdminResponse) XXX_Merge

func (*MsgUpdateGroupPolicyAdminResponse) XXX_Size

func (m *MsgUpdateGroupPolicyAdminResponse) XXX_Size() int

func (*MsgUpdateGroupPolicyAdminResponse) XXX_Unmarshal

func (m *MsgUpdateGroupPolicyAdminResponse) XXX_Unmarshal(b []byte) error

type MsgUpdateGroupPolicyDecisionPolicy

type MsgUpdateGroupPolicyDecisionPolicy struct {
	// admin is the account address of the group admin.
	Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"`
	// group_policy_address is the account address of group policy.
	GroupPolicyAddress string `protobuf:"bytes,2,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"`
	// decision_policy is the updated group policy's decision policy.
	DecisionPolicy *types.Any `protobuf:"bytes,3,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"`
}

MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type.

func NewMsgUpdateGroupPolicyDecisionPolicy

func NewMsgUpdateGroupPolicyDecisionPolicy(admin sdk.AccAddress, address sdk.AccAddress, decisionPolicy DecisionPolicy) (*MsgUpdateGroupPolicyDecisionPolicy, error)

NewMsgUpdateGroupPolicyDecisionPolicy creates a new MsgUpdateGroupPolicyDecisionPolicy.

func (*MsgUpdateGroupPolicyDecisionPolicy) Descriptor

func (*MsgUpdateGroupPolicyDecisionPolicy) Descriptor() ([]byte, []int)

func (*MsgUpdateGroupPolicyDecisionPolicy) GetDecisionPolicy

func (m *MsgUpdateGroupPolicyDecisionPolicy) GetDecisionPolicy() (DecisionPolicy, error)

GetDecisionPolicy gets the decision policy of MsgUpdateGroupPolicyDecisionPolicy.

func (MsgUpdateGroupPolicyDecisionPolicy) GetSignBytes

func (m MsgUpdateGroupPolicyDecisionPolicy) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgUpdateGroupPolicyDecisionPolicy) GetSigners

GetSigners returns the expected signers for a MsgUpdateGroupPolicyDecisionPolicy.

func (*MsgUpdateGroupPolicyDecisionPolicy) Marshal

func (m *MsgUpdateGroupPolicyDecisionPolicy) Marshal() (dAtA []byte, err error)

func (*MsgUpdateGroupPolicyDecisionPolicy) MarshalTo

func (m *MsgUpdateGroupPolicyDecisionPolicy) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateGroupPolicyDecisionPolicy) MarshalToSizedBuffer

func (m *MsgUpdateGroupPolicyDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateGroupPolicyDecisionPolicy) ProtoMessage

func (*MsgUpdateGroupPolicyDecisionPolicy) ProtoMessage()

func (*MsgUpdateGroupPolicyDecisionPolicy) Reset

func (MsgUpdateGroupPolicyDecisionPolicy) Route

Route Implements Msg.

func (*MsgUpdateGroupPolicyDecisionPolicy) SetDecisionPolicy

func (m *MsgUpdateGroupPolicyDecisionPolicy) SetDecisionPolicy(decisionPolicy DecisionPolicy) error

SetDecisionPolicy sets the decision policy for MsgUpdateGroupPolicyDecisionPolicy.

func (*MsgUpdateGroupPolicyDecisionPolicy) Size

func (*MsgUpdateGroupPolicyDecisionPolicy) String

func (MsgUpdateGroupPolicyDecisionPolicy) Type

Type Implements Msg.

func (*MsgUpdateGroupPolicyDecisionPolicy) Unmarshal

func (m *MsgUpdateGroupPolicyDecisionPolicy) Unmarshal(dAtA []byte) error

func (MsgUpdateGroupPolicyDecisionPolicy) UnpackInterfaces

func (m MsgUpdateGroupPolicyDecisionPolicy) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (MsgUpdateGroupPolicyDecisionPolicy) ValidateBasic

func (m MsgUpdateGroupPolicyDecisionPolicy) ValidateBasic() error

ValidateBasic does a sanity check on the provided data

func (*MsgUpdateGroupPolicyDecisionPolicy) XXX_DiscardUnknown

func (m *MsgUpdateGroupPolicyDecisionPolicy) XXX_DiscardUnknown()

func (*MsgUpdateGroupPolicyDecisionPolicy) XXX_Marshal

func (m *MsgUpdateGroupPolicyDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateGroupPolicyDecisionPolicy) XXX_Merge

func (*MsgUpdateGroupPolicyDecisionPolicy) XXX_Size

func (*MsgUpdateGroupPolicyDecisionPolicy) XXX_Unmarshal

func (m *MsgUpdateGroupPolicyDecisionPolicy) XXX_Unmarshal(b []byte) error

type MsgUpdateGroupPolicyDecisionPolicyResponse

type MsgUpdateGroupPolicyDecisionPolicyResponse struct {
}

MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type.

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) Descriptor

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) Marshal

func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) MarshalTo

func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) MarshalToSizedBuffer

func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) ProtoMessage

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) Reset

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) Size

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) String

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) Unmarshal

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) XXX_DiscardUnknown

func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) XXX_DiscardUnknown()

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) XXX_Marshal

func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) XXX_Merge

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) XXX_Size

func (*MsgUpdateGroupPolicyDecisionPolicyResponse) XXX_Unmarshal

type MsgUpdateGroupPolicyMetadata

type MsgUpdateGroupPolicyMetadata struct {
	// admin is the account address of the group admin.
	Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"`
	// group_policy_address is the account address of group policy.
	GroupPolicyAddress string `protobuf:"bytes,2,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"`
	// metadata is the group policy metadata to be updated.
	Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
}

MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type.

func (*MsgUpdateGroupPolicyMetadata) Descriptor

func (*MsgUpdateGroupPolicyMetadata) Descriptor() ([]byte, []int)

func (*MsgUpdateGroupPolicyMetadata) GetAdmin

func (m *MsgUpdateGroupPolicyMetadata) GetAdmin() string

func (*MsgUpdateGroupPolicyMetadata) GetGroupPolicyAddress

func (m *MsgUpdateGroupPolicyMetadata) GetGroupPolicyAddress() string

func (*MsgUpdateGroupPolicyMetadata) GetMetadata

func (m *MsgUpdateGroupPolicyMetadata) GetMetadata() string

func (MsgUpdateGroupPolicyMetadata) GetSignBytes

func (m MsgUpdateGroupPolicyMetadata) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgUpdateGroupPolicyMetadata) GetSigners

func (m MsgUpdateGroupPolicyMetadata) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgUpdateGroupPolicyMetadata.

func (*MsgUpdateGroupPolicyMetadata) Marshal

func (m *MsgUpdateGroupPolicyMetadata) Marshal() (dAtA []byte, err error)

func (*MsgUpdateGroupPolicyMetadata) MarshalTo

func (m *MsgUpdateGroupPolicyMetadata) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateGroupPolicyMetadata) MarshalToSizedBuffer

func (m *MsgUpdateGroupPolicyMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateGroupPolicyMetadata) ProtoMessage

func (*MsgUpdateGroupPolicyMetadata) ProtoMessage()

func (*MsgUpdateGroupPolicyMetadata) Reset

func (m *MsgUpdateGroupPolicyMetadata) Reset()

func (MsgUpdateGroupPolicyMetadata) Route

Route Implements Msg.

func (*MsgUpdateGroupPolicyMetadata) Size

func (m *MsgUpdateGroupPolicyMetadata) Size() (n int)

func (*MsgUpdateGroupPolicyMetadata) String

func (MsgUpdateGroupPolicyMetadata) Type

Type Implements Msg.

func (*MsgUpdateGroupPolicyMetadata) Unmarshal

func (m *MsgUpdateGroupPolicyMetadata) Unmarshal(dAtA []byte) error

func (MsgUpdateGroupPolicyMetadata) ValidateBasic

func (m MsgUpdateGroupPolicyMetadata) ValidateBasic() error

ValidateBasic does a sanity check on the provided data

func (*MsgUpdateGroupPolicyMetadata) XXX_DiscardUnknown

func (m *MsgUpdateGroupPolicyMetadata) XXX_DiscardUnknown()

func (*MsgUpdateGroupPolicyMetadata) XXX_Marshal

func (m *MsgUpdateGroupPolicyMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateGroupPolicyMetadata) XXX_Merge

func (m *MsgUpdateGroupPolicyMetadata) XXX_Merge(src proto.Message)

func (*MsgUpdateGroupPolicyMetadata) XXX_Size

func (m *MsgUpdateGroupPolicyMetadata) XXX_Size() int

func (*MsgUpdateGroupPolicyMetadata) XXX_Unmarshal

func (m *MsgUpdateGroupPolicyMetadata) XXX_Unmarshal(b []byte) error

type MsgUpdateGroupPolicyMetadataResponse

type MsgUpdateGroupPolicyMetadataResponse struct {
}

MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type.

func (*MsgUpdateGroupPolicyMetadataResponse) Descriptor

func (*MsgUpdateGroupPolicyMetadataResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateGroupPolicyMetadataResponse) Marshal

func (m *MsgUpdateGroupPolicyMetadataResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateGroupPolicyMetadataResponse) MarshalTo

func (m *MsgUpdateGroupPolicyMetadataResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateGroupPolicyMetadataResponse) MarshalToSizedBuffer

func (m *MsgUpdateGroupPolicyMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateGroupPolicyMetadataResponse) ProtoMessage

func (*MsgUpdateGroupPolicyMetadataResponse) ProtoMessage()

func (*MsgUpdateGroupPolicyMetadataResponse) Reset

func (*MsgUpdateGroupPolicyMetadataResponse) Size

func (*MsgUpdateGroupPolicyMetadataResponse) String

func (*MsgUpdateGroupPolicyMetadataResponse) Unmarshal

func (m *MsgUpdateGroupPolicyMetadataResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateGroupPolicyMetadataResponse) XXX_DiscardUnknown

func (m *MsgUpdateGroupPolicyMetadataResponse) XXX_DiscardUnknown()

func (*MsgUpdateGroupPolicyMetadataResponse) XXX_Marshal

func (m *MsgUpdateGroupPolicyMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateGroupPolicyMetadataResponse) XXX_Merge

func (*MsgUpdateGroupPolicyMetadataResponse) XXX_Size

func (*MsgUpdateGroupPolicyMetadataResponse) XXX_Unmarshal

func (m *MsgUpdateGroupPolicyMetadataResponse) XXX_Unmarshal(b []byte) error

type MsgVote

type MsgVote 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"`
	// option is the voter's choice on the proposal.
	Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.group.v1.VoteOption" json:"option,omitempty"`
	// metadata is any arbitrary metadata attached to the vote.
	Metadata string `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.v1.Exec" json:"exec,omitempty"`
}

MsgVote is the Msg/Vote request type.

func (*MsgVote) Descriptor

func (*MsgVote) Descriptor() ([]byte, []int)

func (*MsgVote) GetExec

func (m *MsgVote) GetExec() Exec

func (*MsgVote) GetMetadata

func (m *MsgVote) GetMetadata() string

func (*MsgVote) GetOption

func (m *MsgVote) GetOption() VoteOption

func (*MsgVote) GetProposalId

func (m *MsgVote) GetProposalId() uint64

func (MsgVote) GetSignBytes

func (m MsgVote) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgVote) GetSigners

func (m MsgVote) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgVote.

func (*MsgVote) GetVoter

func (m *MsgVote) GetVoter() string

func (*MsgVote) Marshal

func (m *MsgVote) Marshal() (dAtA []byte, err error)

func (*MsgVote) MarshalTo

func (m *MsgVote) MarshalTo(dAtA []byte) (int, error)

func (*MsgVote) MarshalToSizedBuffer

func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgVote) ProtoMessage

func (*MsgVote) ProtoMessage()

func (*MsgVote) Reset

func (m *MsgVote) Reset()

func (MsgVote) Route

func (m MsgVote) Route() string

Route Implements Msg.

func (*MsgVote) Size

func (m *MsgVote) Size() (n int)

func (*MsgVote) String

func (m *MsgVote) String() string

func (MsgVote) Type

func (m MsgVote) Type() string

Type Implements Msg.

func (*MsgVote) Unmarshal

func (m *MsgVote) Unmarshal(dAtA []byte) error

func (MsgVote) ValidateBasic

func (m MsgVote) ValidateBasic() error

ValidateBasic does a sanity check on the provided data

func (*MsgVote) XXX_DiscardUnknown

func (m *MsgVote) XXX_DiscardUnknown()

func (*MsgVote) XXX_Marshal

func (m *MsgVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgVote) XXX_Merge

func (m *MsgVote) XXX_Merge(src proto.Message)

func (*MsgVote) XXX_Size

func (m *MsgVote) XXX_Size() int

func (*MsgVote) XXX_Unmarshal

func (m *MsgVote) XXX_Unmarshal(b []byte) error

type MsgVoteResponse

type MsgVoteResponse struct {
}

MsgVoteResponse is the Msg/Vote response type.

func (*MsgVoteResponse) Descriptor

func (*MsgVoteResponse) Descriptor() ([]byte, []int)

func (*MsgVoteResponse) Marshal

func (m *MsgVoteResponse) Marshal() (dAtA []byte, err error)

func (*MsgVoteResponse) MarshalTo

func (m *MsgVoteResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgVoteResponse) MarshalToSizedBuffer

func (m *MsgVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgVoteResponse) ProtoMessage

func (*MsgVoteResponse) ProtoMessage()

func (*MsgVoteResponse) Reset

func (m *MsgVoteResponse) Reset()

func (*MsgVoteResponse) Size

func (m *MsgVoteResponse) Size() (n int)

func (*MsgVoteResponse) String

func (m *MsgVoteResponse) String() string

func (*MsgVoteResponse) Unmarshal

func (m *MsgVoteResponse) Unmarshal(dAtA []byte) error

func (*MsgVoteResponse) XXX_DiscardUnknown

func (m *MsgVoteResponse) XXX_DiscardUnknown()

func (*MsgVoteResponse) XXX_Marshal

func (m *MsgVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgVoteResponse) XXX_Merge

func (m *MsgVoteResponse) XXX_Merge(src proto.Message)

func (*MsgVoteResponse) XXX_Size

func (m *MsgVoteResponse) XXX_Size() int

func (*MsgVoteResponse) XXX_Unmarshal

func (m *MsgVoteResponse) XXX_Unmarshal(b []byte) error

type MsgWithdrawProposal

type MsgWithdrawProposal 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"`
	// address is the admin of the group policy or one of the proposer of the proposal.
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
}

MsgWithdrawProposal is the Msg/WithdrawProposal request type.

func (*MsgWithdrawProposal) Descriptor

func (*MsgWithdrawProposal) Descriptor() ([]byte, []int)

func (*MsgWithdrawProposal) GetAddress

func (m *MsgWithdrawProposal) GetAddress() string

func (*MsgWithdrawProposal) GetProposalId

func (m *MsgWithdrawProposal) GetProposalId() uint64

func (MsgWithdrawProposal) GetSignBytes

func (m MsgWithdrawProposal) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgWithdrawProposal) GetSigners

func (m MsgWithdrawProposal) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgWithdrawProposal.

func (*MsgWithdrawProposal) Marshal

func (m *MsgWithdrawProposal) Marshal() (dAtA []byte, err error)

func (*MsgWithdrawProposal) MarshalTo

func (m *MsgWithdrawProposal) MarshalTo(dAtA []byte) (int, error)

func (*MsgWithdrawProposal) MarshalToSizedBuffer

func (m *MsgWithdrawProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgWithdrawProposal) ProtoMessage

func (*MsgWithdrawProposal) ProtoMessage()

func (*MsgWithdrawProposal) Reset

func (m *MsgWithdrawProposal) Reset()

func (MsgWithdrawProposal) Route

func (m MsgWithdrawProposal) Route() string

Route Implements Msg.

func (*MsgWithdrawProposal) Size

func (m *MsgWithdrawProposal) Size() (n int)

func (*MsgWithdrawProposal) String

func (m *MsgWithdrawProposal) String() string

func (MsgWithdrawProposal) Type

func (m MsgWithdrawProposal) Type() string

Type Implements Msg.

func (*MsgWithdrawProposal) Unmarshal

func (m *MsgWithdrawProposal) Unmarshal(dAtA []byte) error

func (MsgWithdrawProposal) ValidateBasic

func (m MsgWithdrawProposal) ValidateBasic() error

ValidateBasic does a sanity check on the provided data

func (*MsgWithdrawProposal) XXX_DiscardUnknown

func (m *MsgWithdrawProposal) XXX_DiscardUnknown()

func (*MsgWithdrawProposal) XXX_Marshal

func (m *MsgWithdrawProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgWithdrawProposal) XXX_Merge

func (m *MsgWithdrawProposal) XXX_Merge(src proto.Message)

func (*MsgWithdrawProposal) XXX_Size

func (m *MsgWithdrawProposal) XXX_Size() int

func (*MsgWithdrawProposal) XXX_Unmarshal

func (m *MsgWithdrawProposal) XXX_Unmarshal(b []byte) error

type MsgWithdrawProposalResponse

type MsgWithdrawProposalResponse struct {
}

MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type.

func (*MsgWithdrawProposalResponse) Descriptor

func (*MsgWithdrawProposalResponse) Descriptor() ([]byte, []int)

func (*MsgWithdrawProposalResponse) Marshal

func (m *MsgWithdrawProposalResponse) Marshal() (dAtA []byte, err error)

func (*MsgWithdrawProposalResponse) MarshalTo

func (m *MsgWithdrawProposalResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgWithdrawProposalResponse) MarshalToSizedBuffer

func (m *MsgWithdrawProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgWithdrawProposalResponse) ProtoMessage

func (*MsgWithdrawProposalResponse) ProtoMessage()

func (*MsgWithdrawProposalResponse) Reset

func (m *MsgWithdrawProposalResponse) Reset()

func (*MsgWithdrawProposalResponse) Size

func (m *MsgWithdrawProposalResponse) Size() (n int)

func (*MsgWithdrawProposalResponse) String

func (m *MsgWithdrawProposalResponse) String() string

func (*MsgWithdrawProposalResponse) Unmarshal

func (m *MsgWithdrawProposalResponse) Unmarshal(dAtA []byte) error

func (*MsgWithdrawProposalResponse) XXX_DiscardUnknown

func (m *MsgWithdrawProposalResponse) XXX_DiscardUnknown()

func (*MsgWithdrawProposalResponse) XXX_Marshal

func (m *MsgWithdrawProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgWithdrawProposalResponse) XXX_Merge

func (m *MsgWithdrawProposalResponse) XXX_Merge(src proto.Message)

func (*MsgWithdrawProposalResponse) XXX_Size

func (m *MsgWithdrawProposalResponse) XXX_Size() int

func (*MsgWithdrawProposalResponse) XXX_Unmarshal

func (m *MsgWithdrawProposalResponse) XXX_Unmarshal(b []byte) error

type PercentageDecisionPolicy

type PercentageDecisionPolicy struct {
	// percentage is the minimum percentage of the weighted sum of `YES` votes must
	// meet for a proposal to succeed.
	Percentage string `protobuf:"bytes,1,opt,name=percentage,proto3" json:"percentage,omitempty"`
	// windows defines the different windows for voting and execution.
	Windows *DecisionPolicyWindows `protobuf:"bytes,2,opt,name=windows,proto3" json:"windows,omitempty"`
}

PercentageDecisionPolicy is a decision policy where a proposal passes when it satisfies the two following conditions:

  1. The percentage of all `YES` voters' weights out of the total group weight is greater or equal than the given `percentage`.
  2. The voting and execution periods of the proposal respect the parameters given by `windows`.

func (PercentageDecisionPolicy) Allow

Allow allows a proposal to pass when the tally of yes votes equals or exceeds the percentage threshold before the timeout.

func (*PercentageDecisionPolicy) Descriptor

func (*PercentageDecisionPolicy) Descriptor() ([]byte, []int)

func (PercentageDecisionPolicy) GetMinExecutionPeriod added in v0.46.5

func (p PercentageDecisionPolicy) GetMinExecutionPeriod() time.Duration

GetMinExecutionPeriod returns the minimum execution period of PercentageDecisionPolicy

func (*PercentageDecisionPolicy) GetPercentage

func (m *PercentageDecisionPolicy) GetPercentage() string

func (PercentageDecisionPolicy) GetVotingPeriod

func (p PercentageDecisionPolicy) GetVotingPeriod() time.Duration

GetVotingPeriod returns the voitng period of PercentageDecisionPolicy

func (*PercentageDecisionPolicy) GetWindows

func (*PercentageDecisionPolicy) Marshal

func (m *PercentageDecisionPolicy) Marshal() (dAtA []byte, err error)

func (*PercentageDecisionPolicy) MarshalTo

func (m *PercentageDecisionPolicy) MarshalTo(dAtA []byte) (int, error)

func (*PercentageDecisionPolicy) MarshalToSizedBuffer

func (m *PercentageDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PercentageDecisionPolicy) ProtoMessage

func (*PercentageDecisionPolicy) ProtoMessage()

func (*PercentageDecisionPolicy) Reset

func (m *PercentageDecisionPolicy) Reset()

func (*PercentageDecisionPolicy) Size

func (m *PercentageDecisionPolicy) Size() (n int)

func (*PercentageDecisionPolicy) String

func (m *PercentageDecisionPolicy) String() string

func (*PercentageDecisionPolicy) Unmarshal

func (m *PercentageDecisionPolicy) Unmarshal(dAtA []byte) error

func (*PercentageDecisionPolicy) Validate

func (p *PercentageDecisionPolicy) Validate(g GroupInfo, config Config) error

Validate validates the policy against the group.

func (PercentageDecisionPolicy) ValidateBasic

func (p PercentageDecisionPolicy) ValidateBasic() error

ValidateBasic does basic validation on PercentageDecisionPolicy

func (*PercentageDecisionPolicy) XXX_DiscardUnknown

func (m *PercentageDecisionPolicy) XXX_DiscardUnknown()

func (*PercentageDecisionPolicy) XXX_Marshal

func (m *PercentageDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PercentageDecisionPolicy) XXX_Merge

func (m *PercentageDecisionPolicy) XXX_Merge(src proto.Message)

func (*PercentageDecisionPolicy) XXX_Size

func (m *PercentageDecisionPolicy) XXX_Size() int

func (*PercentageDecisionPolicy) XXX_Unmarshal

func (m *PercentageDecisionPolicy) XXX_Unmarshal(b []byte) error

type Proposal

type Proposal struct {
	// id is the unique id of the proposal.
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// group_policy_address is the account address of group policy.
	GroupPolicyAddress string `protobuf:"bytes,2,opt,name=group_policy_address,json=groupPolicyAddress,proto3" json:"group_policy_address,omitempty"`
	// metadata is any arbitrary metadata attached to the proposal.
	Metadata string `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"`
	// submit_time is a timestamp specifying when a proposal was submitted.
	SubmitTime time.Time `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time"`
	// group_version tracks the version of the group at proposal submission.
	// This field is here for informational purposes only.
	GroupVersion uint64 `protobuf:"varint,6,opt,name=group_version,json=groupVersion,proto3" json:"group_version,omitempty"`
	// group_policy_version tracks the version of the group policy at proposal submission.
	// When a decision policy is changed, existing proposals from previous policy
	// versions will become invalid with the `ABORTED` status.
	// This field is here for informational purposes only.
	GroupPolicyVersion uint64 `protobuf:"varint,7,opt,name=group_policy_version,json=groupPolicyVersion,proto3" json:"group_policy_version,omitempty"`
	// status represents the high level position in the life cycle of the proposal. Initial value is Submitted.
	Status ProposalStatus `protobuf:"varint,8,opt,name=status,proto3,enum=cosmos.group.v1.ProposalStatus" json:"status,omitempty"`
	// final_tally_result contains the sums of all weighted votes for this
	// proposal for each vote option. It is empty at submission, and only
	// populated after tallying, at voting period end or at proposal execution,
	// whichever happens first.
	FinalTallyResult TallyResult `protobuf:"bytes,9,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result"`
	// voting_period_end is the timestamp before which voting must be done.
	// Unless a successful MsgExec is called before (to execute a proposal whose
	// tally is successful before the voting period ends), tallying will be done
	// at this point, and the `final_tally_result`and `status` fields will be
	// accordingly updated.
	VotingPeriodEnd time.Time `protobuf:"bytes,10,opt,name=voting_period_end,json=votingPeriodEnd,proto3,stdtime" json:"voting_period_end"`
	// executor_result is the final result of the proposal execution. Initial value is NotRun.
	ExecutorResult ProposalExecutorResult `` /* 149-byte string literal not displayed */
	// messages is a list of `sdk.Msg`s that will be executed if the proposal passes.
	Messages []*types.Any `protobuf:"bytes,12,rep,name=messages,proto3" json:"messages,omitempty"`
	// title is the title of the proposal
	//
	// Since: cosmos-sdk 0.47
	Title string `protobuf:"bytes,13,opt,name=title,proto3" json:"title,omitempty"`
	// summary is a short summary of the proposal
	//
	// Since: cosmos-sdk 0.47
	Summary string `protobuf:"bytes,14,opt,name=summary,proto3" json:"summary,omitempty"`
}

Proposal defines a group proposal. Any member of a group can submit a proposal for a group policy 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.

func (*Proposal) Descriptor

func (*Proposal) Descriptor() ([]byte, []int)

func (*Proposal) GetMsgs

func (p *Proposal) GetMsgs() ([]sdk.Msg, error)

GetMsgs unpacks p.Messages Any's into sdk.Msg's

func (*Proposal) Marshal

func (m *Proposal) Marshal() (dAtA []byte, err error)

func (*Proposal) MarshalTo

func (m *Proposal) MarshalTo(dAtA []byte) (int, error)

func (*Proposal) MarshalToSizedBuffer

func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (Proposal) PrimaryKeyFields

func (g Proposal) PrimaryKeyFields() []interface{}

func (*Proposal) ProtoMessage

func (*Proposal) ProtoMessage()

func (*Proposal) Reset

func (m *Proposal) Reset()

func (*Proposal) SetMsgs

func (p *Proposal) SetMsgs(msgs []sdk.Msg) error

SetMsgs packs msgs into Any's

func (*Proposal) Size

func (m *Proposal) Size() (n int)

func (*Proposal) String

func (m *Proposal) String() string

func (*Proposal) Unmarshal

func (m *Proposal) Unmarshal(dAtA []byte) error

func (Proposal) UnpackInterfaces

func (p Proposal) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (Proposal) ValidateBasic

func (g Proposal) ValidateBasic() error

ValidateBasic does basic validation on proposal.

func (*Proposal) XXX_DiscardUnknown

func (m *Proposal) XXX_DiscardUnknown()

func (*Proposal) XXX_Marshal

func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Proposal) XXX_Merge

func (m *Proposal) XXX_Merge(src proto.Message)

func (*Proposal) XXX_Size

func (m *Proposal) XXX_Size() int

func (*Proposal) XXX_Unmarshal

func (m *Proposal) XXX_Unmarshal(b []byte) error

type ProposalExecutorResult

type ProposalExecutorResult int32

ProposalExecutorResult defines types of proposal executor results.

const (
	// An empty value is not allowed.
	PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED ProposalExecutorResult = 0
	// We have not yet run the executor.
	PROPOSAL_EXECUTOR_RESULT_NOT_RUN ProposalExecutorResult = 1
	// The executor was successful and proposed action updated state.
	PROPOSAL_EXECUTOR_RESULT_SUCCESS ProposalExecutorResult = 2
	// The executor returned an error and proposed action didn't update state.
	PROPOSAL_EXECUTOR_RESULT_FAILURE ProposalExecutorResult = 3
)

func (ProposalExecutorResult) EnumDescriptor

func (ProposalExecutorResult) EnumDescriptor() ([]byte, []int)

func (ProposalExecutorResult) String

func (x ProposalExecutorResult) String() string

type ProposalStatus

type ProposalStatus int32

ProposalStatus defines proposal statuses.

const (
	// An empty value is invalid and not allowed.
	PROPOSAL_STATUS_UNSPECIFIED ProposalStatus = 0
	// Initial status of a proposal when submitted.
	PROPOSAL_STATUS_SUBMITTED ProposalStatus = 1
	// Final status of a proposal when the final tally is done and the outcome
	// passes the group policy's decision policy.
	PROPOSAL_STATUS_ACCEPTED ProposalStatus = 2
	// Final status of a proposal when the final tally is done and the outcome
	// is rejected by the group policy's decision policy.
	PROPOSAL_STATUS_REJECTED ProposalStatus = 3
	// Final status of a proposal when the group policy is modified before the
	// final tally.
	PROPOSAL_STATUS_ABORTED ProposalStatus = 4
	// A proposal can be withdrawn before the voting start time by the owner.
	// When this happens the final status is Withdrawn.
	PROPOSAL_STATUS_WITHDRAWN ProposalStatus = 5
)

func (ProposalStatus) EnumDescriptor

func (ProposalStatus) EnumDescriptor() ([]byte, []int)

func (ProposalStatus) String

func (x ProposalStatus) String() string

type QueryClient

type QueryClient interface {
	// GroupInfo queries group info based on group id.
	GroupInfo(ctx context.Context, in *QueryGroupInfoRequest, opts ...grpc.CallOption) (*QueryGroupInfoResponse, error)
	// GroupPolicyInfo queries group policy info based on account address of group policy.
	GroupPolicyInfo(ctx context.Context, in *QueryGroupPolicyInfoRequest, opts ...grpc.CallOption) (*QueryGroupPolicyInfoResponse, error)
	// GroupMembers queries members of a group by group id.
	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)
	// GroupPoliciesByGroup queries group policies by group id.
	GroupPoliciesByGroup(ctx context.Context, in *QueryGroupPoliciesByGroupRequest, opts ...grpc.CallOption) (*QueryGroupPoliciesByGroupResponse, error)
	// GroupPoliciesByAdmin queries group policies by admin address.
	GroupPoliciesByAdmin(ctx context.Context, in *QueryGroupPoliciesByAdminRequest, opts ...grpc.CallOption) (*QueryGroupPoliciesByAdminResponse, error)
	// Proposal queries a proposal based on proposal id.
	Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error)
	// ProposalsByGroupPolicy queries proposals based on account address of group policy.
	ProposalsByGroupPolicy(ctx context.Context, in *QueryProposalsByGroupPolicyRequest, opts ...grpc.CallOption) (*QueryProposalsByGroupPolicyResponse, 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 id.
	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)
	// GroupsByMember queries groups by member address.
	GroupsByMember(ctx context.Context, in *QueryGroupsByMemberRequest, opts ...grpc.CallOption) (*QueryGroupsByMemberResponse, error)
	// TallyResult returns the tally result of a proposal. If the proposal is
	// still in voting period, then this query computes the current tally state,
	// which might not be final. On the other hand, if the proposal is final,
	// then it simply returns the `final_tally_result` state stored in the
	// proposal itself.
	TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error)
}

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.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryGroupInfoRequest

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"`
}

QueryGroupInfoRequest is the Query/GroupInfo request type.

func (*QueryGroupInfoRequest) Descriptor

func (*QueryGroupInfoRequest) Descriptor() ([]byte, []int)

func (*QueryGroupInfoRequest) GetGroupId

func (m *QueryGroupInfoRequest) GetGroupId() uint64

func (*QueryGroupInfoRequest) Marshal

func (m *QueryGroupInfoRequest) Marshal() (dAtA []byte, err error)

func (*QueryGroupInfoRequest) MarshalTo

func (m *QueryGroupInfoRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupInfoRequest) MarshalToSizedBuffer

func (m *QueryGroupInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupInfoRequest) ProtoMessage

func (*QueryGroupInfoRequest) ProtoMessage()

func (*QueryGroupInfoRequest) Reset

func (m *QueryGroupInfoRequest) Reset()

func (*QueryGroupInfoRequest) Size

func (m *QueryGroupInfoRequest) Size() (n int)

func (*QueryGroupInfoRequest) String

func (m *QueryGroupInfoRequest) String() string

func (*QueryGroupInfoRequest) Unmarshal

func (m *QueryGroupInfoRequest) Unmarshal(dAtA []byte) error

func (*QueryGroupInfoRequest) XXX_DiscardUnknown

func (m *QueryGroupInfoRequest) XXX_DiscardUnknown()

func (*QueryGroupInfoRequest) XXX_Marshal

func (m *QueryGroupInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupInfoRequest) XXX_Merge

func (m *QueryGroupInfoRequest) XXX_Merge(src proto.Message)

func (*QueryGroupInfoRequest) XXX_Size

func (m *QueryGroupInfoRequest) XXX_Size() int

func (*QueryGroupInfoRequest) XXX_Unmarshal

func (m *QueryGroupInfoRequest) XXX_Unmarshal(b []byte) error

type QueryGroupInfoResponse

type QueryGroupInfoResponse struct {
	// info is the GroupInfo of the group.
	Info *GroupInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
}

QueryGroupInfoResponse is the Query/GroupInfo response type.

func (*QueryGroupInfoResponse) Descriptor

func (*QueryGroupInfoResponse) Descriptor() ([]byte, []int)

func (*QueryGroupInfoResponse) GetInfo

func (m *QueryGroupInfoResponse) GetInfo() *GroupInfo

func (*QueryGroupInfoResponse) Marshal

func (m *QueryGroupInfoResponse) Marshal() (dAtA []byte, err error)

func (*QueryGroupInfoResponse) MarshalTo

func (m *QueryGroupInfoResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupInfoResponse) MarshalToSizedBuffer

func (m *QueryGroupInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupInfoResponse) ProtoMessage

func (*QueryGroupInfoResponse) ProtoMessage()

func (*QueryGroupInfoResponse) Reset

func (m *QueryGroupInfoResponse) Reset()

func (*QueryGroupInfoResponse) Size

func (m *QueryGroupInfoResponse) Size() (n int)

func (*QueryGroupInfoResponse) String

func (m *QueryGroupInfoResponse) String() string

func (*QueryGroupInfoResponse) Unmarshal

func (m *QueryGroupInfoResponse) Unmarshal(dAtA []byte) error

func (*QueryGroupInfoResponse) XXX_DiscardUnknown

func (m *QueryGroupInfoResponse) XXX_DiscardUnknown()

func (*QueryGroupInfoResponse) XXX_Marshal

func (m *QueryGroupInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupInfoResponse) XXX_Merge

func (m *QueryGroupInfoResponse) XXX_Merge(src proto.Message)

func (*QueryGroupInfoResponse) XXX_Size

func (m *QueryGroupInfoResponse) XXX_Size() int

func (*QueryGroupInfoResponse) XXX_Unmarshal

func (m *QueryGroupInfoResponse) XXX_Unmarshal(b []byte) error

type QueryGroupMembersRequest

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"`
}

QueryGroupMembersRequest is the Query/GroupMembers request type.

func (*QueryGroupMembersRequest) Descriptor

func (*QueryGroupMembersRequest) Descriptor() ([]byte, []int)

func (*QueryGroupMembersRequest) GetGroupId

func (m *QueryGroupMembersRequest) GetGroupId() uint64

func (*QueryGroupMembersRequest) GetPagination

func (m *QueryGroupMembersRequest) GetPagination() *query.PageRequest

func (*QueryGroupMembersRequest) Marshal

func (m *QueryGroupMembersRequest) Marshal() (dAtA []byte, err error)

func (*QueryGroupMembersRequest) MarshalTo

func (m *QueryGroupMembersRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupMembersRequest) MarshalToSizedBuffer

func (m *QueryGroupMembersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupMembersRequest) ProtoMessage

func (*QueryGroupMembersRequest) ProtoMessage()

func (*QueryGroupMembersRequest) Reset

func (m *QueryGroupMembersRequest) Reset()

func (*QueryGroupMembersRequest) Size

func (m *QueryGroupMembersRequest) Size() (n int)

func (*QueryGroupMembersRequest) String

func (m *QueryGroupMembersRequest) String() string

func (*QueryGroupMembersRequest) Unmarshal

func (m *QueryGroupMembersRequest) Unmarshal(dAtA []byte) error

func (*QueryGroupMembersRequest) XXX_DiscardUnknown

func (m *QueryGroupMembersRequest) XXX_DiscardUnknown()

func (*QueryGroupMembersRequest) XXX_Marshal

func (m *QueryGroupMembersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupMembersRequest) XXX_Merge

func (m *QueryGroupMembersRequest) XXX_Merge(src proto.Message)

func (*QueryGroupMembersRequest) XXX_Size

func (m *QueryGroupMembersRequest) XXX_Size() int

func (*QueryGroupMembersRequest) XXX_Unmarshal

func (m *QueryGroupMembersRequest) XXX_Unmarshal(b []byte) error

type QueryGroupMembersResponse

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"`
}

QueryGroupMembersResponse is the Query/GroupMembersResponse response type.

func (*QueryGroupMembersResponse) Descriptor

func (*QueryGroupMembersResponse) Descriptor() ([]byte, []int)

func (*QueryGroupMembersResponse) GetMembers

func (m *QueryGroupMembersResponse) GetMembers() []*GroupMember

func (*QueryGroupMembersResponse) GetPagination

func (m *QueryGroupMembersResponse) GetPagination() *query.PageResponse

func (*QueryGroupMembersResponse) Marshal

func (m *QueryGroupMembersResponse) Marshal() (dAtA []byte, err error)

func (*QueryGroupMembersResponse) MarshalTo

func (m *QueryGroupMembersResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupMembersResponse) MarshalToSizedBuffer

func (m *QueryGroupMembersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupMembersResponse) ProtoMessage

func (*QueryGroupMembersResponse) ProtoMessage()

func (*QueryGroupMembersResponse) Reset

func (m *QueryGroupMembersResponse) Reset()

func (*QueryGroupMembersResponse) Size

func (m *QueryGroupMembersResponse) Size() (n int)

func (*QueryGroupMembersResponse) String

func (m *QueryGroupMembersResponse) String() string

func (*QueryGroupMembersResponse) Unmarshal

func (m *QueryGroupMembersResponse) Unmarshal(dAtA []byte) error

func (*QueryGroupMembersResponse) XXX_DiscardUnknown

func (m *QueryGroupMembersResponse) XXX_DiscardUnknown()

func (*QueryGroupMembersResponse) XXX_Marshal

func (m *QueryGroupMembersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupMembersResponse) XXX_Merge

func (m *QueryGroupMembersResponse) XXX_Merge(src proto.Message)

func (*QueryGroupMembersResponse) XXX_Size

func (m *QueryGroupMembersResponse) XXX_Size() int

func (*QueryGroupMembersResponse) XXX_Unmarshal

func (m *QueryGroupMembersResponse) XXX_Unmarshal(b []byte) error

type QueryGroupPoliciesByAdminRequest

type QueryGroupPoliciesByAdminRequest struct {
	// admin is the admin address of the group policy.
	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"`
}

QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type.

func (*QueryGroupPoliciesByAdminRequest) Descriptor

func (*QueryGroupPoliciesByAdminRequest) Descriptor() ([]byte, []int)

func (*QueryGroupPoliciesByAdminRequest) GetAdmin

func (*QueryGroupPoliciesByAdminRequest) GetPagination

func (*QueryGroupPoliciesByAdminRequest) Marshal

func (m *QueryGroupPoliciesByAdminRequest) Marshal() (dAtA []byte, err error)

func (*QueryGroupPoliciesByAdminRequest) MarshalTo

func (m *QueryGroupPoliciesByAdminRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupPoliciesByAdminRequest) MarshalToSizedBuffer

func (m *QueryGroupPoliciesByAdminRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupPoliciesByAdminRequest) ProtoMessage

func (*QueryGroupPoliciesByAdminRequest) ProtoMessage()

func (*QueryGroupPoliciesByAdminRequest) Reset

func (*QueryGroupPoliciesByAdminRequest) Size

func (m *QueryGroupPoliciesByAdminRequest) Size() (n int)

func (*QueryGroupPoliciesByAdminRequest) String

func (*QueryGroupPoliciesByAdminRequest) Unmarshal

func (m *QueryGroupPoliciesByAdminRequest) Unmarshal(dAtA []byte) error

func (*QueryGroupPoliciesByAdminRequest) XXX_DiscardUnknown

func (m *QueryGroupPoliciesByAdminRequest) XXX_DiscardUnknown()

func (*QueryGroupPoliciesByAdminRequest) XXX_Marshal

func (m *QueryGroupPoliciesByAdminRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupPoliciesByAdminRequest) XXX_Merge

func (*QueryGroupPoliciesByAdminRequest) XXX_Size

func (m *QueryGroupPoliciesByAdminRequest) XXX_Size() int

func (*QueryGroupPoliciesByAdminRequest) XXX_Unmarshal

func (m *QueryGroupPoliciesByAdminRequest) XXX_Unmarshal(b []byte) error

type QueryGroupPoliciesByAdminResponse

type QueryGroupPoliciesByAdminResponse struct {
	// group_policies are the group policies info with provided admin.
	GroupPolicies []*GroupPolicyInfo `protobuf:"bytes,1,rep,name=group_policies,json=groupPolicies,proto3" json:"group_policies,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type.

func (*QueryGroupPoliciesByAdminResponse) Descriptor

func (*QueryGroupPoliciesByAdminResponse) Descriptor() ([]byte, []int)

func (*QueryGroupPoliciesByAdminResponse) GetGroupPolicies

func (m *QueryGroupPoliciesByAdminResponse) GetGroupPolicies() []*GroupPolicyInfo

func (*QueryGroupPoliciesByAdminResponse) GetPagination

func (*QueryGroupPoliciesByAdminResponse) Marshal

func (m *QueryGroupPoliciesByAdminResponse) Marshal() (dAtA []byte, err error)

func (*QueryGroupPoliciesByAdminResponse) MarshalTo

func (m *QueryGroupPoliciesByAdminResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupPoliciesByAdminResponse) MarshalToSizedBuffer

func (m *QueryGroupPoliciesByAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupPoliciesByAdminResponse) ProtoMessage

func (*QueryGroupPoliciesByAdminResponse) ProtoMessage()

func (*QueryGroupPoliciesByAdminResponse) Reset

func (*QueryGroupPoliciesByAdminResponse) Size

func (m *QueryGroupPoliciesByAdminResponse) Size() (n int)

func (*QueryGroupPoliciesByAdminResponse) String

func (*QueryGroupPoliciesByAdminResponse) Unmarshal

func (m *QueryGroupPoliciesByAdminResponse) Unmarshal(dAtA []byte) error

func (QueryGroupPoliciesByAdminResponse) UnpackInterfaces

func (q QueryGroupPoliciesByAdminResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (*QueryGroupPoliciesByAdminResponse) XXX_DiscardUnknown

func (m *QueryGroupPoliciesByAdminResponse) XXX_DiscardUnknown()

func (*QueryGroupPoliciesByAdminResponse) XXX_Marshal

func (m *QueryGroupPoliciesByAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupPoliciesByAdminResponse) XXX_Merge

func (*QueryGroupPoliciesByAdminResponse) XXX_Size

func (m *QueryGroupPoliciesByAdminResponse) XXX_Size() int

func (*QueryGroupPoliciesByAdminResponse) XXX_Unmarshal

func (m *QueryGroupPoliciesByAdminResponse) XXX_Unmarshal(b []byte) error

type QueryGroupPoliciesByGroupRequest

type QueryGroupPoliciesByGroupRequest struct {
	// group_id is the unique ID of the group policy'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"`
}

QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type.

func (*QueryGroupPoliciesByGroupRequest) Descriptor

func (*QueryGroupPoliciesByGroupRequest) Descriptor() ([]byte, []int)

func (*QueryGroupPoliciesByGroupRequest) GetGroupId

func (m *QueryGroupPoliciesByGroupRequest) GetGroupId() uint64

func (*QueryGroupPoliciesByGroupRequest) GetPagination

func (*QueryGroupPoliciesByGroupRequest) Marshal

func (m *QueryGroupPoliciesByGroupRequest) Marshal() (dAtA []byte, err error)

func (*QueryGroupPoliciesByGroupRequest) MarshalTo

func (m *QueryGroupPoliciesByGroupRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupPoliciesByGroupRequest) MarshalToSizedBuffer

func (m *QueryGroupPoliciesByGroupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupPoliciesByGroupRequest) ProtoMessage

func (*QueryGroupPoliciesByGroupRequest) ProtoMessage()

func (*QueryGroupPoliciesByGroupRequest) Reset

func (*QueryGroupPoliciesByGroupRequest) Size

func (m *QueryGroupPoliciesByGroupRequest) Size() (n int)

func (*QueryGroupPoliciesByGroupRequest) String

func (*QueryGroupPoliciesByGroupRequest) Unmarshal

func (m *QueryGroupPoliciesByGroupRequest) Unmarshal(dAtA []byte) error

func (*QueryGroupPoliciesByGroupRequest) XXX_DiscardUnknown

func (m *QueryGroupPoliciesByGroupRequest) XXX_DiscardUnknown()

func (*QueryGroupPoliciesByGroupRequest) XXX_Marshal

func (m *QueryGroupPoliciesByGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupPoliciesByGroupRequest) XXX_Merge

func (*QueryGroupPoliciesByGroupRequest) XXX_Size

func (m *QueryGroupPoliciesByGroupRequest) XXX_Size() int

func (*QueryGroupPoliciesByGroupRequest) XXX_Unmarshal

func (m *QueryGroupPoliciesByGroupRequest) XXX_Unmarshal(b []byte) error

type QueryGroupPoliciesByGroupResponse

type QueryGroupPoliciesByGroupResponse struct {
	// group_policies are the group policies info associated with the provided group.
	GroupPolicies []*GroupPolicyInfo `protobuf:"bytes,1,rep,name=group_policies,json=groupPolicies,proto3" json:"group_policies,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type.

func (*QueryGroupPoliciesByGroupResponse) Descriptor

func (*QueryGroupPoliciesByGroupResponse) Descriptor() ([]byte, []int)

func (*QueryGroupPoliciesByGroupResponse) GetGroupPolicies

func (m *QueryGroupPoliciesByGroupResponse) GetGroupPolicies() []*GroupPolicyInfo

func (*QueryGroupPoliciesByGroupResponse) GetPagination

func (*QueryGroupPoliciesByGroupResponse) Marshal

func (m *QueryGroupPoliciesByGroupResponse) Marshal() (dAtA []byte, err error)

func (*QueryGroupPoliciesByGroupResponse) MarshalTo

func (m *QueryGroupPoliciesByGroupResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupPoliciesByGroupResponse) MarshalToSizedBuffer

func (m *QueryGroupPoliciesByGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupPoliciesByGroupResponse) ProtoMessage

func (*QueryGroupPoliciesByGroupResponse) ProtoMessage()

func (*QueryGroupPoliciesByGroupResponse) Reset

func (*QueryGroupPoliciesByGroupResponse) Size

func (m *QueryGroupPoliciesByGroupResponse) Size() (n int)

func (*QueryGroupPoliciesByGroupResponse) String

func (*QueryGroupPoliciesByGroupResponse) Unmarshal

func (m *QueryGroupPoliciesByGroupResponse) Unmarshal(dAtA []byte) error

func (QueryGroupPoliciesByGroupResponse) UnpackInterfaces

func (q QueryGroupPoliciesByGroupResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (*QueryGroupPoliciesByGroupResponse) XXX_DiscardUnknown

func (m *QueryGroupPoliciesByGroupResponse) XXX_DiscardUnknown()

func (*QueryGroupPoliciesByGroupResponse) XXX_Marshal

func (m *QueryGroupPoliciesByGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupPoliciesByGroupResponse) XXX_Merge

func (*QueryGroupPoliciesByGroupResponse) XXX_Size

func (m *QueryGroupPoliciesByGroupResponse) XXX_Size() int

func (*QueryGroupPoliciesByGroupResponse) XXX_Unmarshal

func (m *QueryGroupPoliciesByGroupResponse) XXX_Unmarshal(b []byte) error

type QueryGroupPolicyInfoRequest

type QueryGroupPolicyInfoRequest struct {
	// address is the account address of the group policy.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type.

func (*QueryGroupPolicyInfoRequest) Descriptor

func (*QueryGroupPolicyInfoRequest) Descriptor() ([]byte, []int)

func (*QueryGroupPolicyInfoRequest) GetAddress

func (m *QueryGroupPolicyInfoRequest) GetAddress() string

func (*QueryGroupPolicyInfoRequest) Marshal

func (m *QueryGroupPolicyInfoRequest) Marshal() (dAtA []byte, err error)

func (*QueryGroupPolicyInfoRequest) MarshalTo

func (m *QueryGroupPolicyInfoRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupPolicyInfoRequest) MarshalToSizedBuffer

func (m *QueryGroupPolicyInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupPolicyInfoRequest) ProtoMessage

func (*QueryGroupPolicyInfoRequest) ProtoMessage()

func (*QueryGroupPolicyInfoRequest) Reset

func (m *QueryGroupPolicyInfoRequest) Reset()

func (*QueryGroupPolicyInfoRequest) Size

func (m *QueryGroupPolicyInfoRequest) Size() (n int)

func (*QueryGroupPolicyInfoRequest) String

func (m *QueryGroupPolicyInfoRequest) String() string

func (*QueryGroupPolicyInfoRequest) Unmarshal

func (m *QueryGroupPolicyInfoRequest) Unmarshal(dAtA []byte) error

func (*QueryGroupPolicyInfoRequest) XXX_DiscardUnknown

func (m *QueryGroupPolicyInfoRequest) XXX_DiscardUnknown()

func (*QueryGroupPolicyInfoRequest) XXX_Marshal

func (m *QueryGroupPolicyInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupPolicyInfoRequest) XXX_Merge

func (m *QueryGroupPolicyInfoRequest) XXX_Merge(src proto.Message)

func (*QueryGroupPolicyInfoRequest) XXX_Size

func (m *QueryGroupPolicyInfoRequest) XXX_Size() int

func (*QueryGroupPolicyInfoRequest) XXX_Unmarshal

func (m *QueryGroupPolicyInfoRequest) XXX_Unmarshal(b []byte) error

type QueryGroupPolicyInfoResponse

type QueryGroupPolicyInfoResponse struct {
	// info is the GroupPolicyInfo of the group policy.
	Info *GroupPolicyInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
}

QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type.

func (*QueryGroupPolicyInfoResponse) Descriptor

func (*QueryGroupPolicyInfoResponse) Descriptor() ([]byte, []int)

func (*QueryGroupPolicyInfoResponse) GetInfo

func (*QueryGroupPolicyInfoResponse) Marshal

func (m *QueryGroupPolicyInfoResponse) Marshal() (dAtA []byte, err error)

func (*QueryGroupPolicyInfoResponse) MarshalTo

func (m *QueryGroupPolicyInfoResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupPolicyInfoResponse) MarshalToSizedBuffer

func (m *QueryGroupPolicyInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupPolicyInfoResponse) ProtoMessage

func (*QueryGroupPolicyInfoResponse) ProtoMessage()

func (*QueryGroupPolicyInfoResponse) Reset

func (m *QueryGroupPolicyInfoResponse) Reset()

func (*QueryGroupPolicyInfoResponse) Size

func (m *QueryGroupPolicyInfoResponse) Size() (n int)

func (*QueryGroupPolicyInfoResponse) String

func (*QueryGroupPolicyInfoResponse) Unmarshal

func (m *QueryGroupPolicyInfoResponse) Unmarshal(dAtA []byte) error

func (*QueryGroupPolicyInfoResponse) XXX_DiscardUnknown

func (m *QueryGroupPolicyInfoResponse) XXX_DiscardUnknown()

func (*QueryGroupPolicyInfoResponse) XXX_Marshal

func (m *QueryGroupPolicyInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupPolicyInfoResponse) XXX_Merge

func (m *QueryGroupPolicyInfoResponse) XXX_Merge(src proto.Message)

func (*QueryGroupPolicyInfoResponse) XXX_Size

func (m *QueryGroupPolicyInfoResponse) XXX_Size() int

func (*QueryGroupPolicyInfoResponse) XXX_Unmarshal

func (m *QueryGroupPolicyInfoResponse) XXX_Unmarshal(b []byte) error

type QueryGroupsByAdminRequest

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"`
}

QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type.

func (*QueryGroupsByAdminRequest) Descriptor

func (*QueryGroupsByAdminRequest) Descriptor() ([]byte, []int)

func (*QueryGroupsByAdminRequest) GetAdmin

func (m *QueryGroupsByAdminRequest) GetAdmin() string

func (*QueryGroupsByAdminRequest) GetPagination

func (m *QueryGroupsByAdminRequest) GetPagination() *query.PageRequest

func (*QueryGroupsByAdminRequest) Marshal

func (m *QueryGroupsByAdminRequest) Marshal() (dAtA []byte, err error)

func (*QueryGroupsByAdminRequest) MarshalTo

func (m *QueryGroupsByAdminRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupsByAdminRequest) MarshalToSizedBuffer

func (m *QueryGroupsByAdminRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupsByAdminRequest) ProtoMessage

func (*QueryGroupsByAdminRequest) ProtoMessage()

func (*QueryGroupsByAdminRequest) Reset

func (m *QueryGroupsByAdminRequest) Reset()

func (*QueryGroupsByAdminRequest) Size

func (m *QueryGroupsByAdminRequest) Size() (n int)

func (*QueryGroupsByAdminRequest) String

func (m *QueryGroupsByAdminRequest) String() string

func (*QueryGroupsByAdminRequest) Unmarshal

func (m *QueryGroupsByAdminRequest) Unmarshal(dAtA []byte) error

func (*QueryGroupsByAdminRequest) XXX_DiscardUnknown

func (m *QueryGroupsByAdminRequest) XXX_DiscardUnknown()

func (*QueryGroupsByAdminRequest) XXX_Marshal

func (m *QueryGroupsByAdminRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupsByAdminRequest) XXX_Merge

func (m *QueryGroupsByAdminRequest) XXX_Merge(src proto.Message)

func (*QueryGroupsByAdminRequest) XXX_Size

func (m *QueryGroupsByAdminRequest) XXX_Size() int

func (*QueryGroupsByAdminRequest) XXX_Unmarshal

func (m *QueryGroupsByAdminRequest) XXX_Unmarshal(b []byte) error

type QueryGroupsByAdminResponse

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"`
}

QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type.

func (*QueryGroupsByAdminResponse) Descriptor

func (*QueryGroupsByAdminResponse) Descriptor() ([]byte, []int)

func (*QueryGroupsByAdminResponse) GetGroups

func (m *QueryGroupsByAdminResponse) GetGroups() []*GroupInfo

func (*QueryGroupsByAdminResponse) GetPagination

func (m *QueryGroupsByAdminResponse) GetPagination() *query.PageResponse

func (*QueryGroupsByAdminResponse) Marshal

func (m *QueryGroupsByAdminResponse) Marshal() (dAtA []byte, err error)

func (*QueryGroupsByAdminResponse) MarshalTo

func (m *QueryGroupsByAdminResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupsByAdminResponse) MarshalToSizedBuffer

func (m *QueryGroupsByAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupsByAdminResponse) ProtoMessage

func (*QueryGroupsByAdminResponse) ProtoMessage()

func (*QueryGroupsByAdminResponse) Reset

func (m *QueryGroupsByAdminResponse) Reset()

func (*QueryGroupsByAdminResponse) Size

func (m *QueryGroupsByAdminResponse) Size() (n int)

func (*QueryGroupsByAdminResponse) String

func (m *QueryGroupsByAdminResponse) String() string

func (*QueryGroupsByAdminResponse) Unmarshal

func (m *QueryGroupsByAdminResponse) Unmarshal(dAtA []byte) error

func (*QueryGroupsByAdminResponse) XXX_DiscardUnknown

func (m *QueryGroupsByAdminResponse) XXX_DiscardUnknown()

func (*QueryGroupsByAdminResponse) XXX_Marshal

func (m *QueryGroupsByAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupsByAdminResponse) XXX_Merge

func (m *QueryGroupsByAdminResponse) XXX_Merge(src proto.Message)

func (*QueryGroupsByAdminResponse) XXX_Size

func (m *QueryGroupsByAdminResponse) XXX_Size() int

func (*QueryGroupsByAdminResponse) XXX_Unmarshal

func (m *QueryGroupsByAdminResponse) XXX_Unmarshal(b []byte) error

type QueryGroupsByMemberRequest

type QueryGroupsByMemberRequest struct {
	// address is the group member address.
	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"`
}

QueryGroupsByMemberRequest is the Query/GroupsByMember request type.

func (*QueryGroupsByMemberRequest) Descriptor

func (*QueryGroupsByMemberRequest) Descriptor() ([]byte, []int)

func (*QueryGroupsByMemberRequest) GetAddress

func (m *QueryGroupsByMemberRequest) GetAddress() string

func (*QueryGroupsByMemberRequest) GetPagination

func (m *QueryGroupsByMemberRequest) GetPagination() *query.PageRequest

func (*QueryGroupsByMemberRequest) Marshal

func (m *QueryGroupsByMemberRequest) Marshal() (dAtA []byte, err error)

func (*QueryGroupsByMemberRequest) MarshalTo

func (m *QueryGroupsByMemberRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupsByMemberRequest) MarshalToSizedBuffer

func (m *QueryGroupsByMemberRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupsByMemberRequest) ProtoMessage

func (*QueryGroupsByMemberRequest) ProtoMessage()

func (*QueryGroupsByMemberRequest) Reset

func (m *QueryGroupsByMemberRequest) Reset()

func (*QueryGroupsByMemberRequest) Size

func (m *QueryGroupsByMemberRequest) Size() (n int)

func (*QueryGroupsByMemberRequest) String

func (m *QueryGroupsByMemberRequest) String() string

func (*QueryGroupsByMemberRequest) Unmarshal

func (m *QueryGroupsByMemberRequest) Unmarshal(dAtA []byte) error

func (*QueryGroupsByMemberRequest) XXX_DiscardUnknown

func (m *QueryGroupsByMemberRequest) XXX_DiscardUnknown()

func (*QueryGroupsByMemberRequest) XXX_Marshal

func (m *QueryGroupsByMemberRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupsByMemberRequest) XXX_Merge

func (m *QueryGroupsByMemberRequest) XXX_Merge(src proto.Message)

func (*QueryGroupsByMemberRequest) XXX_Size

func (m *QueryGroupsByMemberRequest) XXX_Size() int

func (*QueryGroupsByMemberRequest) XXX_Unmarshal

func (m *QueryGroupsByMemberRequest) XXX_Unmarshal(b []byte) error

type QueryGroupsByMemberResponse

type QueryGroupsByMemberResponse struct {
	// groups are the groups info with the provided group member.
	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"`
}

QueryGroupsByMemberResponse is the Query/GroupsByMember response type.

func (*QueryGroupsByMemberResponse) Descriptor

func (*QueryGroupsByMemberResponse) Descriptor() ([]byte, []int)

func (*QueryGroupsByMemberResponse) GetGroups

func (m *QueryGroupsByMemberResponse) GetGroups() []*GroupInfo

func (*QueryGroupsByMemberResponse) GetPagination

func (m *QueryGroupsByMemberResponse) GetPagination() *query.PageResponse

func (*QueryGroupsByMemberResponse) Marshal

func (m *QueryGroupsByMemberResponse) Marshal() (dAtA []byte, err error)

func (*QueryGroupsByMemberResponse) MarshalTo

func (m *QueryGroupsByMemberResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryGroupsByMemberResponse) MarshalToSizedBuffer

func (m *QueryGroupsByMemberResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryGroupsByMemberResponse) ProtoMessage

func (*QueryGroupsByMemberResponse) ProtoMessage()

func (*QueryGroupsByMemberResponse) Reset

func (m *QueryGroupsByMemberResponse) Reset()

func (*QueryGroupsByMemberResponse) Size

func (m *QueryGroupsByMemberResponse) Size() (n int)

func (*QueryGroupsByMemberResponse) String

func (m *QueryGroupsByMemberResponse) String() string

func (*QueryGroupsByMemberResponse) Unmarshal

func (m *QueryGroupsByMemberResponse) Unmarshal(dAtA []byte) error

func (*QueryGroupsByMemberResponse) XXX_DiscardUnknown

func (m *QueryGroupsByMemberResponse) XXX_DiscardUnknown()

func (*QueryGroupsByMemberResponse) XXX_Marshal

func (m *QueryGroupsByMemberResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryGroupsByMemberResponse) XXX_Merge

func (m *QueryGroupsByMemberResponse) XXX_Merge(src proto.Message)

func (*QueryGroupsByMemberResponse) XXX_Size

func (m *QueryGroupsByMemberResponse) XXX_Size() int

func (*QueryGroupsByMemberResponse) XXX_Unmarshal

func (m *QueryGroupsByMemberResponse) XXX_Unmarshal(b []byte) error

type QueryProposalRequest

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"`
}

QueryProposalRequest is the Query/Proposal request type.

func (*QueryProposalRequest) Descriptor

func (*QueryProposalRequest) Descriptor() ([]byte, []int)

func (*QueryProposalRequest) GetProposalId

func (m *QueryProposalRequest) GetProposalId() uint64

func (*QueryProposalRequest) Marshal

func (m *QueryProposalRequest) Marshal() (dAtA []byte, err error)

func (*QueryProposalRequest) MarshalTo

func (m *QueryProposalRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryProposalRequest) MarshalToSizedBuffer

func (m *QueryProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryProposalRequest) ProtoMessage

func (*QueryProposalRequest) ProtoMessage()

func (*QueryProposalRequest) Reset

func (m *QueryProposalRequest) Reset()

func (*QueryProposalRequest) Size

func (m *QueryProposalRequest) Size() (n int)

func (*QueryProposalRequest) String

func (m *QueryProposalRequest) String() string

func (*QueryProposalRequest) Unmarshal

func (m *QueryProposalRequest) Unmarshal(dAtA []byte) error

func (*QueryProposalRequest) XXX_DiscardUnknown

func (m *QueryProposalRequest) XXX_DiscardUnknown()

func (*QueryProposalRequest) XXX_Marshal

func (m *QueryProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryProposalRequest) XXX_Merge

func (m *QueryProposalRequest) XXX_Merge(src proto.Message)

func (*QueryProposalRequest) XXX_Size

func (m *QueryProposalRequest) XXX_Size() int

func (*QueryProposalRequest) XXX_Unmarshal

func (m *QueryProposalRequest) XXX_Unmarshal(b []byte) error

type QueryProposalResponse

type QueryProposalResponse struct {
	// proposal is the proposal info.
	Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"`
}

QueryProposalResponse is the Query/Proposal response type.

func (*QueryProposalResponse) Descriptor

func (*QueryProposalResponse) Descriptor() ([]byte, []int)

func (*QueryProposalResponse) GetProposal

func (m *QueryProposalResponse) GetProposal() *Proposal

func (*QueryProposalResponse) Marshal

func (m *QueryProposalResponse) Marshal() (dAtA []byte, err error)

func (*QueryProposalResponse) MarshalTo

func (m *QueryProposalResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryProposalResponse) MarshalToSizedBuffer

func (m *QueryProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryProposalResponse) ProtoMessage

func (*QueryProposalResponse) ProtoMessage()

func (*QueryProposalResponse) Reset

func (m *QueryProposalResponse) Reset()

func (*QueryProposalResponse) Size

func (m *QueryProposalResponse) Size() (n int)

func (*QueryProposalResponse) String

func (m *QueryProposalResponse) String() string

func (*QueryProposalResponse) Unmarshal

func (m *QueryProposalResponse) Unmarshal(dAtA []byte) error

func (*QueryProposalResponse) XXX_DiscardUnknown

func (m *QueryProposalResponse) XXX_DiscardUnknown()

func (*QueryProposalResponse) XXX_Marshal

func (m *QueryProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryProposalResponse) XXX_Merge

func (m *QueryProposalResponse) XXX_Merge(src proto.Message)

func (*QueryProposalResponse) XXX_Size

func (m *QueryProposalResponse) XXX_Size() int

func (*QueryProposalResponse) XXX_Unmarshal

func (m *QueryProposalResponse) XXX_Unmarshal(b []byte) error

type QueryProposalsByGroupPolicyRequest

type QueryProposalsByGroupPolicyRequest struct {
	// address is the account address of the group policy 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"`
}

QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type.

func (*QueryProposalsByGroupPolicyRequest) Descriptor

func (*QueryProposalsByGroupPolicyRequest) Descriptor() ([]byte, []int)

func (*QueryProposalsByGroupPolicyRequest) GetAddress

func (*QueryProposalsByGroupPolicyRequest) GetPagination

func (*QueryProposalsByGroupPolicyRequest) Marshal

func (m *QueryProposalsByGroupPolicyRequest) Marshal() (dAtA []byte, err error)

func (*QueryProposalsByGroupPolicyRequest) MarshalTo

func (m *QueryProposalsByGroupPolicyRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryProposalsByGroupPolicyRequest) MarshalToSizedBuffer

func (m *QueryProposalsByGroupPolicyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryProposalsByGroupPolicyRequest) ProtoMessage

func (*QueryProposalsByGroupPolicyRequest) ProtoMessage()

func (*QueryProposalsByGroupPolicyRequest) Reset

func (*QueryProposalsByGroupPolicyRequest) Size

func (*QueryProposalsByGroupPolicyRequest) String

func (*QueryProposalsByGroupPolicyRequest) Unmarshal

func (m *QueryProposalsByGroupPolicyRequest) Unmarshal(dAtA []byte) error

func (*QueryProposalsByGroupPolicyRequest) XXX_DiscardUnknown

func (m *QueryProposalsByGroupPolicyRequest) XXX_DiscardUnknown()

func (*QueryProposalsByGroupPolicyRequest) XXX_Marshal

func (m *QueryProposalsByGroupPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryProposalsByGroupPolicyRequest) XXX_Merge

func (*QueryProposalsByGroupPolicyRequest) XXX_Size

func (*QueryProposalsByGroupPolicyRequest) XXX_Unmarshal

func (m *QueryProposalsByGroupPolicyRequest) XXX_Unmarshal(b []byte) error

type QueryProposalsByGroupPolicyResponse

type QueryProposalsByGroupPolicyResponse struct {
	// proposals are the proposals with given group policy.
	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"`
}

QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type.

func (*QueryProposalsByGroupPolicyResponse) Descriptor

func (*QueryProposalsByGroupPolicyResponse) Descriptor() ([]byte, []int)

func (*QueryProposalsByGroupPolicyResponse) GetPagination

func (*QueryProposalsByGroupPolicyResponse) GetProposals

func (m *QueryProposalsByGroupPolicyResponse) GetProposals() []*Proposal

func (*QueryProposalsByGroupPolicyResponse) Marshal

func (m *QueryProposalsByGroupPolicyResponse) Marshal() (dAtA []byte, err error)

func (*QueryProposalsByGroupPolicyResponse) MarshalTo

func (m *QueryProposalsByGroupPolicyResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryProposalsByGroupPolicyResponse) MarshalToSizedBuffer

func (m *QueryProposalsByGroupPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryProposalsByGroupPolicyResponse) ProtoMessage

func (*QueryProposalsByGroupPolicyResponse) ProtoMessage()

func (*QueryProposalsByGroupPolicyResponse) Reset

func (*QueryProposalsByGroupPolicyResponse) Size

func (*QueryProposalsByGroupPolicyResponse) String

func (*QueryProposalsByGroupPolicyResponse) Unmarshal

func (m *QueryProposalsByGroupPolicyResponse) Unmarshal(dAtA []byte) error

func (*QueryProposalsByGroupPolicyResponse) XXX_DiscardUnknown

func (m *QueryProposalsByGroupPolicyResponse) XXX_DiscardUnknown()

func (*QueryProposalsByGroupPolicyResponse) XXX_Marshal

func (m *QueryProposalsByGroupPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryProposalsByGroupPolicyResponse) XXX_Merge

func (*QueryProposalsByGroupPolicyResponse) XXX_Size

func (*QueryProposalsByGroupPolicyResponse) XXX_Unmarshal

func (m *QueryProposalsByGroupPolicyResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// GroupInfo queries group info based on group id.
	GroupInfo(context.Context, *QueryGroupInfoRequest) (*QueryGroupInfoResponse, error)
	// GroupPolicyInfo queries group policy info based on account address of group policy.
	GroupPolicyInfo(context.Context, *QueryGroupPolicyInfoRequest) (*QueryGroupPolicyInfoResponse, error)
	// GroupMembers queries members of a group by group id.
	GroupMembers(context.Context, *QueryGroupMembersRequest) (*QueryGroupMembersResponse, error)
	// GroupsByAdmin queries groups by admin address.
	GroupsByAdmin(context.Context, *QueryGroupsByAdminRequest) (*QueryGroupsByAdminResponse, error)
	// GroupPoliciesByGroup queries group policies by group id.
	GroupPoliciesByGroup(context.Context, *QueryGroupPoliciesByGroupRequest) (*QueryGroupPoliciesByGroupResponse, error)
	// GroupPoliciesByAdmin queries group policies by admin address.
	GroupPoliciesByAdmin(context.Context, *QueryGroupPoliciesByAdminRequest) (*QueryGroupPoliciesByAdminResponse, error)
	// Proposal queries a proposal based on proposal id.
	Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error)
	// ProposalsByGroupPolicy queries proposals based on account address of group policy.
	ProposalsByGroupPolicy(context.Context, *QueryProposalsByGroupPolicyRequest) (*QueryProposalsByGroupPolicyResponse, error)
	// VoteByProposalVoter queries a vote by proposal id and voter.
	VoteByProposalVoter(context.Context, *QueryVoteByProposalVoterRequest) (*QueryVoteByProposalVoterResponse, error)
	// VotesByProposal queries a vote by proposal id.
	VotesByProposal(context.Context, *QueryVotesByProposalRequest) (*QueryVotesByProposalResponse, error)
	// VotesByVoter queries a vote by voter.
	VotesByVoter(context.Context, *QueryVotesByVoterRequest) (*QueryVotesByVoterResponse, error)
	// GroupsByMember queries groups by member address.
	GroupsByMember(context.Context, *QueryGroupsByMemberRequest) (*QueryGroupsByMemberResponse, error)
	// TallyResult returns the tally result of a proposal. If the proposal is
	// still in voting period, then this query computes the current tally state,
	// which might not be final. On the other hand, if the proposal is final,
	// then it simply returns the `final_tally_result` state stored in the
	// proposal itself.
	TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error)
}

QueryServer is the server API for Query service.

type QueryTallyResultRequest

type QueryTallyResultRequest 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"`
}

QueryTallyResultRequest is the Query/TallyResult request type.

func (*QueryTallyResultRequest) Descriptor

func (*QueryTallyResultRequest) Descriptor() ([]byte, []int)

func (*QueryTallyResultRequest) GetProposalId

func (m *QueryTallyResultRequest) GetProposalId() uint64

func (*QueryTallyResultRequest) Marshal

func (m *QueryTallyResultRequest) Marshal() (dAtA []byte, err error)

func (*QueryTallyResultRequest) MarshalTo

func (m *QueryTallyResultRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryTallyResultRequest) MarshalToSizedBuffer

func (m *QueryTallyResultRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryTallyResultRequest) ProtoMessage

func (*QueryTallyResultRequest) ProtoMessage()

func (*QueryTallyResultRequest) Reset

func (m *QueryTallyResultRequest) Reset()

func (*QueryTallyResultRequest) Size

func (m *QueryTallyResultRequest) Size() (n int)

func (*QueryTallyResultRequest) String

func (m *QueryTallyResultRequest) String() string

func (*QueryTallyResultRequest) Unmarshal

func (m *QueryTallyResultRequest) Unmarshal(dAtA []byte) error

func (*QueryTallyResultRequest) XXX_DiscardUnknown

func (m *QueryTallyResultRequest) XXX_DiscardUnknown()

func (*QueryTallyResultRequest) XXX_Marshal

func (m *QueryTallyResultRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryTallyResultRequest) XXX_Merge

func (m *QueryTallyResultRequest) XXX_Merge(src proto.Message)

func (*QueryTallyResultRequest) XXX_Size

func (m *QueryTallyResultRequest) XXX_Size() int

func (*QueryTallyResultRequest) XXX_Unmarshal

func (m *QueryTallyResultRequest) XXX_Unmarshal(b []byte) error

type QueryTallyResultResponse

type QueryTallyResultResponse struct {
	// tally defines the requested tally.
	Tally TallyResult `protobuf:"bytes,1,opt,name=tally,proto3" json:"tally"`
}

QueryTallyResultResponse is the Query/TallyResult response type.

func (*QueryTallyResultResponse) Descriptor

func (*QueryTallyResultResponse) Descriptor() ([]byte, []int)

func (*QueryTallyResultResponse) GetTally

func (m *QueryTallyResultResponse) GetTally() TallyResult

func (*QueryTallyResultResponse) Marshal

func (m *QueryTallyResultResponse) Marshal() (dAtA []byte, err error)

func (*QueryTallyResultResponse) MarshalTo

func (m *QueryTallyResultResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryTallyResultResponse) MarshalToSizedBuffer

func (m *QueryTallyResultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryTallyResultResponse) ProtoMessage

func (*QueryTallyResultResponse) ProtoMessage()

func (*QueryTallyResultResponse) Reset

func (m *QueryTallyResultResponse) Reset()

func (*QueryTallyResultResponse) Size

func (m *QueryTallyResultResponse) Size() (n int)

func (*QueryTallyResultResponse) String

func (m *QueryTallyResultResponse) String() string

func (*QueryTallyResultResponse) Unmarshal

func (m *QueryTallyResultResponse) Unmarshal(dAtA []byte) error

func (*QueryTallyResultResponse) XXX_DiscardUnknown

func (m *QueryTallyResultResponse) XXX_DiscardUnknown()

func (*QueryTallyResultResponse) XXX_Marshal

func (m *QueryTallyResultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryTallyResultResponse) XXX_Merge

func (m *QueryTallyResultResponse) XXX_Merge(src proto.Message)

func (*QueryTallyResultResponse) XXX_Size

func (m *QueryTallyResultResponse) XXX_Size() int

func (*QueryTallyResultResponse) XXX_Unmarshal

func (m *QueryTallyResultResponse) XXX_Unmarshal(b []byte) error

type QueryVoteByProposalVoterRequest

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"`
}

QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type.

func (*QueryVoteByProposalVoterRequest) Descriptor

func (*QueryVoteByProposalVoterRequest) Descriptor() ([]byte, []int)

func (*QueryVoteByProposalVoterRequest) GetProposalId

func (m *QueryVoteByProposalVoterRequest) GetProposalId() uint64

func (*QueryVoteByProposalVoterRequest) GetVoter

func (*QueryVoteByProposalVoterRequest) Marshal

func (m *QueryVoteByProposalVoterRequest) Marshal() (dAtA []byte, err error)

func (*QueryVoteByProposalVoterRequest) MarshalTo

func (m *QueryVoteByProposalVoterRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryVoteByProposalVoterRequest) MarshalToSizedBuffer

func (m *QueryVoteByProposalVoterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVoteByProposalVoterRequest) ProtoMessage

func (*QueryVoteByProposalVoterRequest) ProtoMessage()

func (*QueryVoteByProposalVoterRequest) Reset

func (*QueryVoteByProposalVoterRequest) Size

func (m *QueryVoteByProposalVoterRequest) Size() (n int)

func (*QueryVoteByProposalVoterRequest) String

func (*QueryVoteByProposalVoterRequest) Unmarshal

func (m *QueryVoteByProposalVoterRequest) Unmarshal(dAtA []byte) error

func (*QueryVoteByProposalVoterRequest) XXX_DiscardUnknown

func (m *QueryVoteByProposalVoterRequest) XXX_DiscardUnknown()

func (*QueryVoteByProposalVoterRequest) XXX_Marshal

func (m *QueryVoteByProposalVoterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryVoteByProposalVoterRequest) XXX_Merge

func (m *QueryVoteByProposalVoterRequest) XXX_Merge(src proto.Message)

func (*QueryVoteByProposalVoterRequest) XXX_Size

func (m *QueryVoteByProposalVoterRequest) XXX_Size() int

func (*QueryVoteByProposalVoterRequest) XXX_Unmarshal

func (m *QueryVoteByProposalVoterRequest) XXX_Unmarshal(b []byte) error

type QueryVoteByProposalVoterResponse

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"`
}

QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type.

func (*QueryVoteByProposalVoterResponse) Descriptor

func (*QueryVoteByProposalVoterResponse) Descriptor() ([]byte, []int)

func (*QueryVoteByProposalVoterResponse) GetVote

func (m *QueryVoteByProposalVoterResponse) GetVote() *Vote

func (*QueryVoteByProposalVoterResponse) Marshal

func (m *QueryVoteByProposalVoterResponse) Marshal() (dAtA []byte, err error)

func (*QueryVoteByProposalVoterResponse) MarshalTo

func (m *QueryVoteByProposalVoterResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryVoteByProposalVoterResponse) MarshalToSizedBuffer

func (m *QueryVoteByProposalVoterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVoteByProposalVoterResponse) ProtoMessage

func (*QueryVoteByProposalVoterResponse) ProtoMessage()

func (*QueryVoteByProposalVoterResponse) Reset

func (*QueryVoteByProposalVoterResponse) Size

func (m *QueryVoteByProposalVoterResponse) Size() (n int)

func (*QueryVoteByProposalVoterResponse) String

func (*QueryVoteByProposalVoterResponse) Unmarshal

func (m *QueryVoteByProposalVoterResponse) Unmarshal(dAtA []byte) error

func (*QueryVoteByProposalVoterResponse) XXX_DiscardUnknown

func (m *QueryVoteByProposalVoterResponse) XXX_DiscardUnknown()

func (*QueryVoteByProposalVoterResponse) XXX_Marshal

func (m *QueryVoteByProposalVoterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryVoteByProposalVoterResponse) XXX_Merge

func (*QueryVoteByProposalVoterResponse) XXX_Size

func (m *QueryVoteByProposalVoterResponse) XXX_Size() int

func (*QueryVoteByProposalVoterResponse) XXX_Unmarshal

func (m *QueryVoteByProposalVoterResponse) XXX_Unmarshal(b []byte) error

type QueryVotesByProposalRequest

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"`
}

QueryVotesByProposalRequest is the Query/VotesByProposal request type.

func (*QueryVotesByProposalRequest) Descriptor

func (*QueryVotesByProposalRequest) Descriptor() ([]byte, []int)

func (*QueryVotesByProposalRequest) GetPagination

func (m *QueryVotesByProposalRequest) GetPagination() *query.PageRequest

func (*QueryVotesByProposalRequest) GetProposalId

func (m *QueryVotesByProposalRequest) GetProposalId() uint64

func (*QueryVotesByProposalRequest) Marshal

func (m *QueryVotesByProposalRequest) Marshal() (dAtA []byte, err error)

func (*QueryVotesByProposalRequest) MarshalTo

func (m *QueryVotesByProposalRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryVotesByProposalRequest) MarshalToSizedBuffer

func (m *QueryVotesByProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVotesByProposalRequest) ProtoMessage

func (*QueryVotesByProposalRequest) ProtoMessage()

func (*QueryVotesByProposalRequest) Reset

func (m *QueryVotesByProposalRequest) Reset()

func (*QueryVotesByProposalRequest) Size

func (m *QueryVotesByProposalRequest) Size() (n int)

func (*QueryVotesByProposalRequest) String

func (m *QueryVotesByProposalRequest) String() string

func (*QueryVotesByProposalRequest) Unmarshal

func (m *QueryVotesByProposalRequest) Unmarshal(dAtA []byte) error

func (*QueryVotesByProposalRequest) XXX_DiscardUnknown

func (m *QueryVotesByProposalRequest) XXX_DiscardUnknown()

func (*QueryVotesByProposalRequest) XXX_Marshal

func (m *QueryVotesByProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryVotesByProposalRequest) XXX_Merge

func (m *QueryVotesByProposalRequest) XXX_Merge(src proto.Message)

func (*QueryVotesByProposalRequest) XXX_Size

func (m *QueryVotesByProposalRequest) XXX_Size() int

func (*QueryVotesByProposalRequest) XXX_Unmarshal

func (m *QueryVotesByProposalRequest) XXX_Unmarshal(b []byte) error

type QueryVotesByProposalResponse

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"`
}

QueryVotesByProposalResponse is the Query/VotesByProposal response type.

func (*QueryVotesByProposalResponse) Descriptor

func (*QueryVotesByProposalResponse) Descriptor() ([]byte, []int)

func (*QueryVotesByProposalResponse) GetPagination

func (m *QueryVotesByProposalResponse) GetPagination() *query.PageResponse

func (*QueryVotesByProposalResponse) GetVotes

func (m *QueryVotesByProposalResponse) GetVotes() []*Vote

func (*QueryVotesByProposalResponse) Marshal

func (m *QueryVotesByProposalResponse) Marshal() (dAtA []byte, err error)

func (*QueryVotesByProposalResponse) MarshalTo

func (m *QueryVotesByProposalResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryVotesByProposalResponse) MarshalToSizedBuffer

func (m *QueryVotesByProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVotesByProposalResponse) ProtoMessage

func (*QueryVotesByProposalResponse) ProtoMessage()

func (*QueryVotesByProposalResponse) Reset

func (m *QueryVotesByProposalResponse) Reset()

func (*QueryVotesByProposalResponse) Size

func (m *QueryVotesByProposalResponse) Size() (n int)

func (*QueryVotesByProposalResponse) String

func (*QueryVotesByProposalResponse) Unmarshal

func (m *QueryVotesByProposalResponse) Unmarshal(dAtA []byte) error

func (*QueryVotesByProposalResponse) XXX_DiscardUnknown

func (m *QueryVotesByProposalResponse) XXX_DiscardUnknown()

func (*QueryVotesByProposalResponse) XXX_Marshal

func (m *QueryVotesByProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryVotesByProposalResponse) XXX_Merge

func (m *QueryVotesByProposalResponse) XXX_Merge(src proto.Message)

func (*QueryVotesByProposalResponse) XXX_Size

func (m *QueryVotesByProposalResponse) XXX_Size() int

func (*QueryVotesByProposalResponse) XXX_Unmarshal

func (m *QueryVotesByProposalResponse) XXX_Unmarshal(b []byte) error

type QueryVotesByVoterRequest

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"`
}

QueryVotesByVoterRequest is the Query/VotesByVoter request type.

func (*QueryVotesByVoterRequest) Descriptor

func (*QueryVotesByVoterRequest) Descriptor() ([]byte, []int)

func (*QueryVotesByVoterRequest) GetPagination

func (m *QueryVotesByVoterRequest) GetPagination() *query.PageRequest

func (*QueryVotesByVoterRequest) GetVoter

func (m *QueryVotesByVoterRequest) GetVoter() string

func (*QueryVotesByVoterRequest) Marshal

func (m *QueryVotesByVoterRequest) Marshal() (dAtA []byte, err error)

func (*QueryVotesByVoterRequest) MarshalTo

func (m *QueryVotesByVoterRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryVotesByVoterRequest) MarshalToSizedBuffer

func (m *QueryVotesByVoterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVotesByVoterRequest) ProtoMessage

func (*QueryVotesByVoterRequest) ProtoMessage()

func (*QueryVotesByVoterRequest) Reset

func (m *QueryVotesByVoterRequest) Reset()

func (*QueryVotesByVoterRequest) Size

func (m *QueryVotesByVoterRequest) Size() (n int)

func (*QueryVotesByVoterRequest) String

func (m *QueryVotesByVoterRequest) String() string

func (*QueryVotesByVoterRequest) Unmarshal

func (m *QueryVotesByVoterRequest) Unmarshal(dAtA []byte) error

func (*QueryVotesByVoterRequest) XXX_DiscardUnknown

func (m *QueryVotesByVoterRequest) XXX_DiscardUnknown()

func (*QueryVotesByVoterRequest) XXX_Marshal

func (m *QueryVotesByVoterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryVotesByVoterRequest) XXX_Merge

func (m *QueryVotesByVoterRequest) XXX_Merge(src proto.Message)

func (*QueryVotesByVoterRequest) XXX_Size

func (m *QueryVotesByVoterRequest) XXX_Size() int

func (*QueryVotesByVoterRequest) XXX_Unmarshal

func (m *QueryVotesByVoterRequest) XXX_Unmarshal(b []byte) error

type QueryVotesByVoterResponse

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"`
}

QueryVotesByVoterResponse is the Query/VotesByVoter response type.

func (*QueryVotesByVoterResponse) Descriptor

func (*QueryVotesByVoterResponse) Descriptor() ([]byte, []int)

func (*QueryVotesByVoterResponse) GetPagination

func (m *QueryVotesByVoterResponse) GetPagination() *query.PageResponse

func (*QueryVotesByVoterResponse) GetVotes

func (m *QueryVotesByVoterResponse) GetVotes() []*Vote

func (*QueryVotesByVoterResponse) Marshal

func (m *QueryVotesByVoterResponse) Marshal() (dAtA []byte, err error)

func (*QueryVotesByVoterResponse) MarshalTo

func (m *QueryVotesByVoterResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryVotesByVoterResponse) MarshalToSizedBuffer

func (m *QueryVotesByVoterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVotesByVoterResponse) ProtoMessage

func (*QueryVotesByVoterResponse) ProtoMessage()

func (*QueryVotesByVoterResponse) Reset

func (m *QueryVotesByVoterResponse) Reset()

func (*QueryVotesByVoterResponse) Size

func (m *QueryVotesByVoterResponse) Size() (n int)

func (*QueryVotesByVoterResponse) String

func (m *QueryVotesByVoterResponse) String() string

func (*QueryVotesByVoterResponse) Unmarshal

func (m *QueryVotesByVoterResponse) Unmarshal(dAtA []byte) error

func (*QueryVotesByVoterResponse) XXX_DiscardUnknown

func (m *QueryVotesByVoterResponse) XXX_DiscardUnknown()

func (*QueryVotesByVoterResponse) XXX_Marshal

func (m *QueryVotesByVoterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryVotesByVoterResponse) XXX_Merge

func (m *QueryVotesByVoterResponse) XXX_Merge(src proto.Message)

func (*QueryVotesByVoterResponse) XXX_Size

func (m *QueryVotesByVoterResponse) XXX_Size() int

func (*QueryVotesByVoterResponse) XXX_Unmarshal

func (m *QueryVotesByVoterResponse) XXX_Unmarshal(b []byte) error

type TallyResult

type TallyResult 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"`
	// abstain_count is the weighted sum of abstainers.
	AbstainCount string `protobuf:"bytes,2,opt,name=abstain_count,json=abstainCount,proto3" json:"abstain_count,omitempty"`
	// no_count is the weighted sum of no votes.
	NoCount string `protobuf:"bytes,3,opt,name=no_count,json=noCount,proto3" json:"no_count,omitempty"`
	// no_with_veto_count is the weighted sum of veto.
	NoWithVetoCount string `protobuf:"bytes,4,opt,name=no_with_veto_count,json=noWithVetoCount,proto3" json:"no_with_veto_count,omitempty"`
}

TallyResult represents the sum of weighted votes for each vote option.

func DefaultTallyResult

func DefaultTallyResult() TallyResult

DefaultTallyResult returns a TallyResult with all counts set to 0.

func (*TallyResult) Add

func (t *TallyResult) Add(vote Vote, weight string) error

func (*TallyResult) Descriptor

func (*TallyResult) Descriptor() ([]byte, []int)

func (TallyResult) GetAbstainCount

func (t TallyResult) GetAbstainCount() (math.Dec, error)

GetAbstainCount returns the number of abstain counts from tally result.

func (TallyResult) GetNoCount

func (t TallyResult) GetNoCount() (math.Dec, error)

GetNoCount returns the number of no counts from tally result.

func (TallyResult) GetNoWithVetoCount

func (t TallyResult) GetNoWithVetoCount() (math.Dec, error)

GetNoWithVetoCount returns the number of no with veto counts from tally result.

func (TallyResult) GetYesCount

func (t TallyResult) GetYesCount() (math.Dec, error)

GetYesCount returns the number of yes counts from tally result.

func (*TallyResult) Marshal

func (m *TallyResult) Marshal() (dAtA []byte, err error)

func (*TallyResult) MarshalTo

func (m *TallyResult) MarshalTo(dAtA []byte) (int, error)

func (*TallyResult) MarshalToSizedBuffer

func (m *TallyResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TallyResult) ProtoMessage

func (*TallyResult) ProtoMessage()

func (*TallyResult) Reset

func (m *TallyResult) Reset()

func (*TallyResult) Size

func (m *TallyResult) Size() (n int)

func (*TallyResult) String

func (m *TallyResult) String() string

func (TallyResult) TotalCounts

func (t TallyResult) TotalCounts() (math.Dec, error)

TotalCounts is the sum of all weights.

func (*TallyResult) Unmarshal

func (m *TallyResult) Unmarshal(dAtA []byte) error

func (*TallyResult) XXX_DiscardUnknown

func (m *TallyResult) XXX_DiscardUnknown()

func (*TallyResult) XXX_Marshal

func (m *TallyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TallyResult) XXX_Merge

func (m *TallyResult) XXX_Merge(src proto.Message)

func (*TallyResult) XXX_Size

func (m *TallyResult) XXX_Size() int

func (*TallyResult) XXX_Unmarshal

func (m *TallyResult) XXX_Unmarshal(b []byte) error

type ThresholdDecisionPolicy

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"`
	// windows defines the different windows for voting and execution.
	Windows *DecisionPolicyWindows `protobuf:"bytes,2,opt,name=windows,proto3" json:"windows,omitempty"`
}

ThresholdDecisionPolicy is a decision policy where a proposal passes when it satisfies the two following conditions:

  1. The sum of all `YES` voter's weights is greater or equal than the defined `threshold`.
  2. The voting and execution periods of the proposal respect the parameters given by `windows`.

func (ThresholdDecisionPolicy) Allow

func (p ThresholdDecisionPolicy) Allow(tallyResult TallyResult, totalPower string) (DecisionPolicyResult, error)

Allow allows a proposal to pass when the tally of yes votes equals or exceeds the threshold before the timeout.

func (*ThresholdDecisionPolicy) Descriptor

func (*ThresholdDecisionPolicy) Descriptor() ([]byte, []int)

func (ThresholdDecisionPolicy) GetMinExecutionPeriod added in v0.46.5

func (p ThresholdDecisionPolicy) GetMinExecutionPeriod() time.Duration

GetMinExecutionPeriod returns the minimum execution period of ThresholdDecisionPolicy

func (*ThresholdDecisionPolicy) GetThreshold

func (m *ThresholdDecisionPolicy) GetThreshold() string

func (ThresholdDecisionPolicy) GetVotingPeriod

func (p ThresholdDecisionPolicy) GetVotingPeriod() time.Duration

GetVotingPeriod returns the voitng period of ThresholdDecisionPolicy

func (*ThresholdDecisionPolicy) GetWindows

func (*ThresholdDecisionPolicy) Marshal

func (m *ThresholdDecisionPolicy) Marshal() (dAtA []byte, err error)

func (*ThresholdDecisionPolicy) MarshalTo

func (m *ThresholdDecisionPolicy) MarshalTo(dAtA []byte) (int, error)

func (*ThresholdDecisionPolicy) MarshalToSizedBuffer

func (m *ThresholdDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ThresholdDecisionPolicy) ProtoMessage

func (*ThresholdDecisionPolicy) ProtoMessage()

func (*ThresholdDecisionPolicy) Reset

func (m *ThresholdDecisionPolicy) Reset()

func (*ThresholdDecisionPolicy) Size

func (m *ThresholdDecisionPolicy) Size() (n int)

func (*ThresholdDecisionPolicy) String

func (m *ThresholdDecisionPolicy) String() string

func (*ThresholdDecisionPolicy) Unmarshal

func (m *ThresholdDecisionPolicy) Unmarshal(dAtA []byte) error

func (*ThresholdDecisionPolicy) Validate

func (p *ThresholdDecisionPolicy) Validate(g GroupInfo, config Config) error

Validate validates the policy against the group. Note that the threshold can actually be greater than the group's total weight: in the Allow method we check the tally weight against `min(threshold,total_weight)`.

func (ThresholdDecisionPolicy) ValidateBasic

func (p ThresholdDecisionPolicy) ValidateBasic() error

ValidateBasic does basic validation on ThresholdDecisionPolicy

func (*ThresholdDecisionPolicy) XXX_DiscardUnknown

func (m *ThresholdDecisionPolicy) XXX_DiscardUnknown()

func (*ThresholdDecisionPolicy) XXX_Marshal

func (m *ThresholdDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ThresholdDecisionPolicy) XXX_Merge

func (m *ThresholdDecisionPolicy) XXX_Merge(src proto.Message)

func (*ThresholdDecisionPolicy) XXX_Size

func (m *ThresholdDecisionPolicy) XXX_Size() int

func (*ThresholdDecisionPolicy) XXX_Unmarshal

func (m *ThresholdDecisionPolicy) XXX_Unmarshal(b []byte) error

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CreateGroup

func (*UnimplementedMsgServer) CreateGroupPolicy

func (*UnimplementedMsgServer) CreateGroupWithPolicy

func (*UnimplementedMsgServer) Exec

func (*UnimplementedMsgServer) LeaveGroup

func (*UnimplementedMsgServer) SubmitProposal

func (*UnimplementedMsgServer) UpdateGroupAdmin

func (*UnimplementedMsgServer) UpdateGroupMembers

func (*UnimplementedMsgServer) UpdateGroupMetadata

func (*UnimplementedMsgServer) UpdateGroupPolicyAdmin

func (*UnimplementedMsgServer) UpdateGroupPolicyMetadata

func (*UnimplementedMsgServer) Vote

func (*UnimplementedMsgServer) WithdrawProposal

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) GroupInfo

func (*UnimplementedQueryServer) GroupMembers

func (*UnimplementedQueryServer) GroupPolicyInfo

func (*UnimplementedQueryServer) GroupsByAdmin

func (*UnimplementedQueryServer) GroupsByMember

func (*UnimplementedQueryServer) Proposal

func (*UnimplementedQueryServer) TallyResult

func (*UnimplementedQueryServer) VoteByProposalVoter

func (*UnimplementedQueryServer) VotesByProposal

func (*UnimplementedQueryServer) VotesByVoter

type Vote

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"`
	// option is the voter's choice on the proposal.
	Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.group.v1.VoteOption" json:"option,omitempty"`
	// metadata is any arbitrary metadata attached to the vote.
	Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// submit_time is the timestamp when the vote was submitted.
	SubmitTime time.Time `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time"`
}

Vote represents a vote for a proposal.

func (*Vote) Descriptor

func (*Vote) Descriptor() ([]byte, []int)

func (*Vote) GetMetadata

func (m *Vote) GetMetadata() string

func (*Vote) GetOption

func (m *Vote) GetOption() VoteOption

func (*Vote) GetProposalId

func (m *Vote) GetProposalId() uint64

func (*Vote) GetSubmitTime

func (m *Vote) GetSubmitTime() time.Time

func (*Vote) GetVoter

func (m *Vote) GetVoter() string

func (*Vote) Marshal

func (m *Vote) Marshal() (dAtA []byte, err error)

func (*Vote) MarshalTo

func (m *Vote) MarshalTo(dAtA []byte) (int, error)

func (*Vote) MarshalToSizedBuffer

func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (Vote) PrimaryKeyFields

func (v Vote) PrimaryKeyFields() []interface{}

func (*Vote) ProtoMessage

func (*Vote) ProtoMessage()

func (*Vote) Reset

func (m *Vote) Reset()

func (*Vote) Size

func (m *Vote) Size() (n int)

func (*Vote) String

func (m *Vote) String() string

func (*Vote) Unmarshal

func (m *Vote) Unmarshal(dAtA []byte) error

func (Vote) ValidateBasic

func (v Vote) ValidateBasic() error

ValidateBasic does basic validation on vote.

func (*Vote) XXX_DiscardUnknown

func (m *Vote) XXX_DiscardUnknown()

func (*Vote) XXX_Marshal

func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Vote) XXX_Merge

func (m *Vote) XXX_Merge(src proto.Message)

func (*Vote) XXX_Size

func (m *Vote) XXX_Size() int

func (*Vote) XXX_Unmarshal

func (m *Vote) XXX_Unmarshal(b []byte) error

type VoteOption

type VoteOption int32

VoteOption enumerates the valid vote options for a given proposal.

const (
	// VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will
	// return an error.
	VOTE_OPTION_UNSPECIFIED VoteOption = 0
	// VOTE_OPTION_YES defines a yes vote option.
	VOTE_OPTION_YES VoteOption = 1
	// VOTE_OPTION_ABSTAIN defines an abstain vote option.
	VOTE_OPTION_ABSTAIN VoteOption = 2
	// VOTE_OPTION_NO defines a no vote option.
	VOTE_OPTION_NO VoteOption = 3
	// VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.
	VOTE_OPTION_NO_WITH_VETO VoteOption = 4
)

func VoteOptionFromString

func VoteOptionFromString(str string) (VoteOption, error)

VoteOptionFromString returns a VoteOption from a string. It returns an error if the string is invalid.

func (VoteOption) EnumDescriptor

func (VoteOption) EnumDescriptor() ([]byte, []int)

func (VoteOption) String

func (x VoteOption) String() string

Directories

Path Synopsis
client
cli
Package codec provides a singleton instance of Amino codec that should be used to register any concrete type that can later be referenced inside a MsgSubmitProposal instance so that they can be (de)serialized properly.
Package codec provides a singleton instance of Amino codec that should be used to register any concrete type that can later be referenced inside a MsgSubmitProposal instance so that they can be (de)serialized properly.
internal
math
Package math provides helper functions for doing mathematical calculations and parsing for the group module.
Package math provides helper functions for doing mathematical calculations and parsing for the group module.
orm
Package orm is a convenient object to data store mapper.
Package orm is a convenient object to data store mapper.
migrations
v2
Package testutil is a generated GoMock package.
Package testutil is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL