cosmos/group

Table of Contents

cosmos/group/module/v1/module.proto

Top

Module

Module is the config object of the group module.

FieldTypeLabelDescription
max_execution_period google.protobuf.Duration

max_execution_period defines the max duration after a proposal's voting period ends that members can send a MsgExec to execute the proposal.

max_metadata_len uint64

max_metadata_len defines the max length of the metadata bytes field for various entities within the group module. Defaults to 255 if not explicitly set.

cosmos/group/v1/events.proto

Top

Since: cosmos-sdk 0.46

EventCreateGroup

EventCreateGroup is an event emitted when a group is created.

FieldTypeLabelDescription
group_id uint64

group_id is the unique ID of the group.

EventCreateGroupPolicy

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

FieldTypeLabelDescription
address string

address is the account address of the group policy.

EventExec

EventExec is an event emitted when a proposal is executed.

FieldTypeLabelDescription
proposal_id uint64

proposal_id is the unique ID of the proposal.

result ProposalExecutorResult

result is the proposal execution result.

logs string

logs contains error logs in case the execution result is FAILURE.

EventLeaveGroup

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

FieldTypeLabelDescription
group_id uint64

group_id is the unique ID of the group.

address string

address is the account address of the group member.

EventProposalPruned

EventProposalPruned is an event emitted when a proposal is pruned.

FieldTypeLabelDescription
proposal_id uint64

proposal_id is the unique ID of the proposal.

status ProposalStatus

status is the proposal status (UNSPECIFIED, SUBMITTED, ACCEPTED, REJECTED, ABORTED, WITHDRAWN).

tally_result TallyResult

tally_result is the proposal tally result (when applicable).

EventSubmitProposal

EventSubmitProposal is an event emitted when a proposal is created.

FieldTypeLabelDescription
proposal_id uint64

proposal_id is the unique ID of the proposal.

EventUpdateGroup

EventUpdateGroup is an event emitted when a group is updated.

FieldTypeLabelDescription
group_id uint64

group_id is the unique ID of the group.

EventUpdateGroupPolicy

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

FieldTypeLabelDescription
address string

address is the account address of the group policy.

EventVote

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

FieldTypeLabelDescription
proposal_id uint64

proposal_id is the unique ID of the proposal.

EventWithdrawProposal

EventWithdrawProposal is an event emitted when a proposal is withdrawn.

FieldTypeLabelDescription
proposal_id uint64

proposal_id is the unique ID of the proposal.

cosmos/group/v1/genesis.proto

Top

Since: cosmos-sdk 0.46

GenesisState

GenesisState defines the group module's genesis state.

FieldTypeLabelDescription
group_seq uint64

group_seq is the group table orm.Sequence, it is used to get the next group ID.

groups GroupInfo repeated

groups is the list of groups info.

group_members GroupMember repeated

group_members is the list of groups members.

group_policy_seq uint64

group_policy_seq is the group policy table orm.Sequence, it is used to generate the next group policy account address.

group_policies GroupPolicyInfo repeated

group_policies is the list of group policies info.

proposal_seq uint64

proposal_seq is the proposal table orm.Sequence, it is used to get the next proposal ID.

proposals Proposal repeated

proposals is the list of proposals.

votes Vote repeated

votes is the list of votes.

cosmos/group/v1/query.proto

Top

Since: cosmos-sdk 0.46

QueryGroupInfoRequest

QueryGroupInfoRequest is the Query/GroupInfo request type.

FieldTypeLabelDescription
group_id uint64

group_id is the unique ID of the group.

QueryGroupInfoResponse

QueryGroupInfoResponse is the Query/GroupInfo response type.

FieldTypeLabelDescription
info GroupInfo

info is the GroupInfo of the group.

QueryGroupMembersRequest

QueryGroupMembersRequest is the Query/GroupMembers request type.

FieldTypeLabelDescription
group_id uint64

group_id is the unique ID of the group.

pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request.

QueryGroupMembersResponse

QueryGroupMembersResponse is the Query/GroupMembersResponse response type.

FieldTypeLabelDescription
members GroupMember repeated

members are the members of the group with given group_id.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response.

QueryGroupPoliciesByAdminRequest

QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type.

FieldTypeLabelDescription
admin string

admin is the admin address of the group policy.

pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request.

QueryGroupPoliciesByAdminResponse

QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type.

FieldTypeLabelDescription
group_policies GroupPolicyInfo repeated

group_policies are the group policies info with provided admin.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response.

QueryGroupPoliciesByGroupRequest

QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type.

FieldTypeLabelDescription
group_id uint64

group_id is the unique ID of the group policy's group.

pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request.

QueryGroupPoliciesByGroupResponse

QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type.

FieldTypeLabelDescription
group_policies GroupPolicyInfo repeated

group_policies are the group policies info associated with the provided group.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response.

QueryGroupPolicyInfoRequest

QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type.

FieldTypeLabelDescription
address string

address is the account address of the group policy.

QueryGroupPolicyInfoResponse

QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type.

FieldTypeLabelDescription
info GroupPolicyInfo

info is the GroupPolicyInfo of the group policy.

QueryGroupsByAdminRequest

QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type.

FieldTypeLabelDescription
admin string

admin is the account address of a group's admin.

pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request.

QueryGroupsByAdminResponse

QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type.

FieldTypeLabelDescription
groups GroupInfo repeated

groups are the groups info with the provided admin.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response.

QueryGroupsByMemberRequest

QueryGroupsByMemberRequest is the Query/GroupsByMember request type.

FieldTypeLabelDescription
address string

address is the group member address.

pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request.

QueryGroupsByMemberResponse

QueryGroupsByMemberResponse is the Query/GroupsByMember response type.

FieldTypeLabelDescription
groups GroupInfo repeated

groups are the groups info with the provided group member.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response.

QueryGroupsRequest

QueryGroupsRequest is the Query/Groups request type.

Since: cosmos-sdk 0.47.1

FieldTypeLabelDescription
pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request.

QueryGroupsResponse

QueryGroupsResponse is the Query/Groups response type.

Since: cosmos-sdk 0.47.1

FieldTypeLabelDescription
groups GroupInfo repeated

`groups` is all the groups present in state.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response.

QueryProposalRequest

QueryProposalRequest is the Query/Proposal request type.

FieldTypeLabelDescription
proposal_id uint64

proposal_id is the unique ID of a proposal.

QueryProposalResponse

QueryProposalResponse is the Query/Proposal response type.

FieldTypeLabelDescription
proposal Proposal

proposal is the proposal info.

QueryProposalsByGroupPolicyRequest

QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type.

FieldTypeLabelDescription
address string

address is the account address of the group policy related to proposals.

pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request.

QueryProposalsByGroupPolicyResponse

QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type.

FieldTypeLabelDescription
proposals Proposal repeated

proposals are the proposals with given group policy.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response.

QueryTallyResultRequest

QueryTallyResultRequest is the Query/TallyResult request type.

FieldTypeLabelDescription
proposal_id uint64

proposal_id is the unique id of a proposal.

QueryTallyResultResponse

QueryTallyResultResponse is the Query/TallyResult response type.

FieldTypeLabelDescription
tally TallyResult

tally defines the requested tally.

QueryVoteByProposalVoterRequest

QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type.

FieldTypeLabelDescription
proposal_id uint64

proposal_id is the unique ID of a proposal.

voter string

voter is a proposal voter account address.

QueryVoteByProposalVoterResponse

QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type.

FieldTypeLabelDescription
vote Vote

vote is the vote with given proposal_id and voter.

QueryVotesByProposalRequest

QueryVotesByProposalRequest is the Query/VotesByProposal request type.

FieldTypeLabelDescription
proposal_id uint64

proposal_id is the unique ID of a proposal.

pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request.

QueryVotesByProposalResponse

QueryVotesByProposalResponse is the Query/VotesByProposal response type.

FieldTypeLabelDescription
votes Vote repeated

votes are the list of votes for given proposal_id.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response.

QueryVotesByVoterRequest

QueryVotesByVoterRequest is the Query/VotesByVoter request type.

FieldTypeLabelDescription
voter string

voter is a proposal voter account address.

pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request.

QueryVotesByVoterResponse

QueryVotesByVoterResponse is the Query/VotesByVoter response type.

FieldTypeLabelDescription
votes Vote repeated

votes are the list of votes by given voter.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response.

Query

Query is the cosmos.group.v1 Query service.

Method NameRequest TypeResponse TypeDescription
GroupInfo QueryGroupInfoRequest QueryGroupInfoResponse

GroupInfo queries group info based on group id.

GroupPolicyInfo QueryGroupPolicyInfoRequest QueryGroupPolicyInfoResponse

GroupPolicyInfo queries group policy info based on account address of group policy.

GroupMembers QueryGroupMembersRequest QueryGroupMembersResponse

GroupMembers queries members of a group by group id.

GroupsByAdmin QueryGroupsByAdminRequest QueryGroupsByAdminResponse

GroupsByAdmin queries groups by admin address.

GroupPoliciesByGroup QueryGroupPoliciesByGroupRequest QueryGroupPoliciesByGroupResponse

GroupPoliciesByGroup queries group policies by group id.

GroupPoliciesByAdmin QueryGroupPoliciesByAdminRequest QueryGroupPoliciesByAdminResponse

GroupPoliciesByAdmin queries group policies by admin address.

Proposal QueryProposalRequest QueryProposalResponse

Proposal queries a proposal based on proposal id.

ProposalsByGroupPolicy QueryProposalsByGroupPolicyRequest QueryProposalsByGroupPolicyResponse

ProposalsByGroupPolicy queries proposals based on account address of group policy.

VoteByProposalVoter QueryVoteByProposalVoterRequest QueryVoteByProposalVoterResponse

VoteByProposalVoter queries a vote by proposal id and voter.

VotesByProposal QueryVotesByProposalRequest QueryVotesByProposalResponse

VotesByProposal queries a vote by proposal id.

VotesByVoter QueryVotesByVoterRequest QueryVotesByVoterResponse

VotesByVoter queries a vote by voter.

GroupsByMember QueryGroupsByMemberRequest QueryGroupsByMemberResponse

GroupsByMember queries groups by member address.

TallyResult QueryTallyResultRequest QueryTallyResultResponse

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.

Groups QueryGroupsRequest QueryGroupsResponse

Groups queries all groups in state. Since: cosmos-sdk 0.47.1

Methods with HTTP bindings

Method Name Method Pattern Body
GroupInfo GET /cosmos/group/v1/group_info/{group_id}
GroupPolicyInfo GET /cosmos/group/v1/group_policy_info/{address}
GroupMembers GET /cosmos/group/v1/group_members/{group_id}
GroupsByAdmin GET /cosmos/group/v1/groups_by_admin/{admin}
GroupPoliciesByGroup GET /cosmos/group/v1/group_policies_by_group/{group_id}
GroupPoliciesByAdmin GET /cosmos/group/v1/group_policies_by_admin/{admin}
Proposal GET /cosmos/group/v1/proposal/{proposal_id}
ProposalsByGroupPolicy GET /cosmos/group/v1/proposals_by_group_policy/{address}
VoteByProposalVoter GET /cosmos/group/v1/vote_by_proposal_voter/{proposal_id}/{voter}
VotesByProposal GET /cosmos/group/v1/votes_by_proposal/{proposal_id}
VotesByVoter GET /cosmos/group/v1/votes_by_voter/{voter}
GroupsByMember GET /cosmos/group/v1/groups_by_member/{address}
TallyResult GET /cosmos/group/v1/proposals/{proposal_id}/tally
Groups GET /cosmos/group/v1/groups

cosmos/group/v1/tx.proto

Top

Since: cosmos-sdk 0.46

MsgCreateGroup

MsgCreateGroup is the Msg/CreateGroup request type.

FieldTypeLabelDescription
admin string

admin is the account address of the group admin.

members MemberRequest repeated

members defines the group members.

metadata string

metadata is any arbitrary metadata to attached to the group.

MsgCreateGroupPolicy

MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type.

FieldTypeLabelDescription
admin string

admin is the account address of the group admin.

group_id uint64

group_id is the unique ID of the group.

metadata string

metadata is any arbitrary metadata attached to the group policy.

decision_policy google.protobuf.Any

decision_policy specifies the group policy's decision policy.

MsgCreateGroupPolicyResponse

MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type.

FieldTypeLabelDescription
address string

address is the account address of the newly created group policy.

MsgCreateGroupResponse

MsgCreateGroupResponse is the Msg/CreateGroup response type.

FieldTypeLabelDescription
group_id uint64

group_id is the unique ID of the newly created group.

MsgCreateGroupWithPolicy

MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type.

FieldTypeLabelDescription
admin string

admin is the account address of the group and group policy admin.

members MemberRequest repeated

members defines the group members.

group_metadata string

group_metadata is any arbitrary metadata attached to the group.

group_policy_metadata string

group_policy_metadata is any arbitrary metadata attached to the group policy.

group_policy_as_admin bool

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.

decision_policy google.protobuf.Any

decision_policy specifies the group policy's decision policy.

MsgCreateGroupWithPolicyResponse

MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type.

FieldTypeLabelDescription
group_id uint64

group_id is the unique ID of the newly created group with policy.

group_policy_address string

group_policy_address is the account address of the newly created group policy.

MsgExec

MsgExec is the Msg/Exec request type.

FieldTypeLabelDescription
proposal_id uint64

proposal is the unique ID of the proposal.

executor string

executor is the account address used to execute the proposal.

MsgExecResponse

MsgExecResponse is the Msg/Exec request type.

FieldTypeLabelDescription
result ProposalExecutorResult

result is the final result of the proposal execution.

MsgLeaveGroup

MsgLeaveGroup is the Msg/LeaveGroup request type.

FieldTypeLabelDescription
address string

address is the account address of the group member.

group_id uint64

group_id is the unique ID of the group.

MsgLeaveGroupResponse

MsgLeaveGroupResponse is the Msg/LeaveGroup response type.

MsgSubmitProposal

MsgSubmitProposal is the Msg/SubmitProposal request type.

FieldTypeLabelDescription
group_policy_address string

group_policy_address is the account address of group policy.

proposers string repeated

proposers are the account addresses of the proposers. Proposers signatures will be counted as yes votes.

metadata string

metadata is any arbitrary metadata attached to the proposal.

messages google.protobuf.Any repeated

messages is a list of `sdk.Msg`s that will be executed if the proposal passes.

exec Exec

exec defines the mode of execution of the proposal, whether it should be executed immediately on creation or not. If so, proposers signatures are considered as Yes votes.

title string

title is the title of the proposal. Since: cosmos-sdk 0.47

summary string

summary is the summary of the proposal. Since: cosmos-sdk 0.47

MsgSubmitProposalResponse

MsgSubmitProposalResponse is the Msg/SubmitProposal response type.

FieldTypeLabelDescription
proposal_id uint64

proposal is the unique ID of the proposal.

MsgUpdateGroupAdmin

MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type.

FieldTypeLabelDescription
admin string

admin is the current account address of the group admin.

group_id uint64

group_id is the unique ID of the group.

new_admin string

new_admin is the group new admin account address.

MsgUpdateGroupAdminResponse

MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type.

MsgUpdateGroupMembers

MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type.

FieldTypeLabelDescription
admin string

admin is the account address of the group admin.

group_id uint64

group_id is the unique ID of the group.

member_updates MemberRequest repeated

member_updates is the list of members to update, set weight to 0 to remove a member.

MsgUpdateGroupMembersResponse

MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type.

MsgUpdateGroupMetadata

MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type.

FieldTypeLabelDescription
admin string

admin is the account address of the group admin.

group_id uint64

group_id is the unique ID of the group.

metadata string

metadata is the updated group's metadata.

MsgUpdateGroupMetadataResponse

MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type.

MsgUpdateGroupPolicyAdmin

MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type.

FieldTypeLabelDescription
admin string

admin is the account address of the group admin.

group_policy_address string

group_policy_address is the account address of the group policy.

new_admin string

new_admin is the new group policy admin.

MsgUpdateGroupPolicyAdminResponse

MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type.

MsgUpdateGroupPolicyDecisionPolicy

MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type.

FieldTypeLabelDescription
admin string

admin is the account address of the group admin.

group_policy_address string

group_policy_address is the account address of group policy.

decision_policy google.protobuf.Any

decision_policy is the updated group policy's decision policy.

MsgUpdateGroupPolicyDecisionPolicyResponse

MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type.

MsgUpdateGroupPolicyMetadata

MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type.

FieldTypeLabelDescription
admin string

admin is the account address of the group admin.

group_policy_address string

group_policy_address is the account address of group policy.

metadata string

metadata is the group policy metadata to be updated.

MsgUpdateGroupPolicyMetadataResponse

MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type.

MsgVote

MsgVote is the Msg/Vote request type.

FieldTypeLabelDescription
proposal_id uint64

proposal is the unique ID of the proposal.

voter string

voter is the voter account address.

option VoteOption

option is the voter's choice on the proposal.

metadata string

metadata is any arbitrary metadata attached to the vote.

exec Exec

exec defines whether the proposal should be executed immediately after voting or not.

MsgVoteResponse

MsgVoteResponse is the Msg/Vote response type.

MsgWithdrawProposal

MsgWithdrawProposal is the Msg/WithdrawProposal request type.

FieldTypeLabelDescription
proposal_id uint64

proposal is the unique ID of the proposal.

address string

address is the admin of the group policy or one of the proposer of the proposal.

MsgWithdrawProposalResponse

MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type.

Exec

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

NameNumberDescription
EXEC_UNSPECIFIED 0

An empty value means that there should be a separate MsgExec request for the proposal to execute.

EXEC_TRY 1

Try to execute the proposal immediately. If the proposal is not allowed per the DecisionPolicy, the proposal will still be open and could be executed at a later point.

Msg

Msg is the cosmos.group.v1 Msg service.

Method NameRequest TypeResponse TypeDescription
CreateGroup MsgCreateGroup MsgCreateGroupResponse

CreateGroup creates a new group with an admin account address, a list of members and some optional metadata.

UpdateGroupMembers MsgUpdateGroupMembers MsgUpdateGroupMembersResponse

UpdateGroupMembers updates the group members with given group id and admin address.

UpdateGroupAdmin MsgUpdateGroupAdmin MsgUpdateGroupAdminResponse

UpdateGroupAdmin updates the group admin with given group id and previous admin address.

UpdateGroupMetadata MsgUpdateGroupMetadata MsgUpdateGroupMetadataResponse

UpdateGroupMetadata updates the group metadata with given group id and admin address.

CreateGroupPolicy MsgCreateGroupPolicy MsgCreateGroupPolicyResponse

CreateGroupPolicy creates a new group policy using given DecisionPolicy.

CreateGroupWithPolicy MsgCreateGroupWithPolicy MsgCreateGroupWithPolicyResponse

CreateGroupWithPolicy creates a new group with policy.

UpdateGroupPolicyAdmin MsgUpdateGroupPolicyAdmin MsgUpdateGroupPolicyAdminResponse

UpdateGroupPolicyAdmin updates a group policy admin.

UpdateGroupPolicyDecisionPolicy MsgUpdateGroupPolicyDecisionPolicy MsgUpdateGroupPolicyDecisionPolicyResponse

UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated.

UpdateGroupPolicyMetadata MsgUpdateGroupPolicyMetadata MsgUpdateGroupPolicyMetadataResponse

UpdateGroupPolicyMetadata updates a group policy metadata.

SubmitProposal MsgSubmitProposal MsgSubmitProposalResponse

SubmitProposal submits a new proposal.

WithdrawProposal MsgWithdrawProposal MsgWithdrawProposalResponse

WithdrawProposal withdraws a proposal.

Vote MsgVote MsgVoteResponse

Vote allows a voter to vote on a proposal.

Exec MsgExec MsgExecResponse

Exec executes a proposal.

LeaveGroup MsgLeaveGroup MsgLeaveGroupResponse

LeaveGroup allows a group member to leave the group.

cosmos/group/v1/types.proto

Top

Since: cosmos-sdk 0.46

DecisionPolicyWindows

DecisionPolicyWindows defines the different windows for voting and execution.

FieldTypeLabelDescription
voting_period google.protobuf.Duration

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.

min_execution_period google.protobuf.Duration

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.

GroupInfo

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

FieldTypeLabelDescription
id uint64

id is the unique ID of the group.

admin string

admin is the account address of the group's admin.

metadata string

metadata is any arbitrary metadata to attached to the group. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1

version uint64

version is used to track changes to a group's membership structure that would break existing proposals. Whenever any members weight is changed, or any member is added or removed this version is incremented and will cause proposals based on older versions of this group to fail

total_weight string

total_weight is the sum of the group members' weights.

created_at google.protobuf.Timestamp

created_at is a timestamp specifying when a group was created.

GroupMember

GroupMember represents the relationship between a group and a member.

FieldTypeLabelDescription
group_id uint64

group_id is the unique ID of the group.

member Member

member is the member data.

GroupPolicyInfo

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

FieldTypeLabelDescription
address string

address is the account address of group policy.

group_id uint64

group_id is the unique ID of the group.

admin string

admin is the account address of the group admin.

metadata string

metadata is any arbitrary metadata attached to the group policy. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#decision-policy-1

version uint64

version is used to track changes to a group's GroupPolicyInfo structure that would create a different result on a running proposal.

decision_policy google.protobuf.Any

decision_policy specifies the group policy's decision policy.

created_at google.protobuf.Timestamp

created_at is a timestamp specifying when a group policy was created.

Member

Member represents a group member with an account address,

non-zero weight, metadata and added_at timestamp.

FieldTypeLabelDescription
address string

address is the member's account address.

weight string

weight is the member's voting weight that should be greater than 0.

metadata string

metadata is any arbitrary metadata attached to the member.

added_at google.protobuf.Timestamp

added_at is a timestamp specifying when a member was added.

MemberRequest

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.

FieldTypeLabelDescription
address string

address is the member's account address.

weight string

weight is the member's voting weight that should be greater than 0.

metadata string

metadata is any arbitrary metadata attached to the member.

PercentageDecisionPolicy

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`.

FieldTypeLabelDescription
percentage string

percentage is the minimum percentage of the weighted sum of `YES` votes must meet for a proposal to succeed.

windows DecisionPolicyWindows

windows defines the different windows for voting and execution.

Proposal

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.

FieldTypeLabelDescription
id uint64

id is the unique id of the proposal.

group_policy_address string

group_policy_address is the account address of group policy.

metadata string

metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#proposal-4

proposers string repeated

proposers are the account addresses of the proposers.

submit_time google.protobuf.Timestamp

submit_time is a timestamp specifying when a proposal was submitted.

group_version uint64

group_version tracks the version of the group at proposal submission. This field is here for informational purposes only.

group_policy_version uint64

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.

status ProposalStatus

status represents the high level position in the life cycle of the proposal. Initial value is Submitted.

final_tally_result TallyResult

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.

voting_period_end google.protobuf.Timestamp

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.

executor_result ProposalExecutorResult

executor_result is the final result of the proposal execution. Initial value is NotRun.

messages google.protobuf.Any repeated

messages is a list of `sdk.Msg`s that will be executed if the proposal passes.

title string

title is the title of the proposal Since: cosmos-sdk 0.47

summary string

summary is a short summary of the proposal Since: cosmos-sdk 0.47

TallyResult

TallyResult represents the sum of weighted votes for each vote option.

FieldTypeLabelDescription
yes_count string

yes_count is the weighted sum of yes votes.

abstain_count string

abstain_count is the weighted sum of abstainers.

no_count string

no_count is the weighted sum of no votes.

no_with_veto_count string

no_with_veto_count is the weighted sum of veto.

ThresholdDecisionPolicy

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`.

FieldTypeLabelDescription
threshold string

threshold is the minimum weighted sum of `YES` votes that must be met or exceeded for a proposal to succeed.

windows DecisionPolicyWindows

windows defines the different windows for voting and execution.

Vote

Vote represents a vote for a proposal.string metadata

FieldTypeLabelDescription
proposal_id uint64

proposal is the unique ID of the proposal.

voter string

voter is the account address of the voter.

option VoteOption

option is the voter's choice on the proposal.

metadata string

metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2

submit_time google.protobuf.Timestamp

submit_time is the timestamp when the vote was submitted.

ProposalExecutorResult

ProposalExecutorResult defines types of proposal executor results.

NameNumberDescription
PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED 0

An empty value is not allowed.

PROPOSAL_EXECUTOR_RESULT_NOT_RUN 1

We have not yet run the executor.

PROPOSAL_EXECUTOR_RESULT_SUCCESS 2

The executor was successful and proposed action updated state.

PROPOSAL_EXECUTOR_RESULT_FAILURE 3

The executor returned an error and proposed action didn't update state.

ProposalStatus

ProposalStatus defines proposal statuses.

NameNumberDescription
PROPOSAL_STATUS_UNSPECIFIED 0

An empty value is invalid and not allowed.

PROPOSAL_STATUS_SUBMITTED 1

Initial status of a proposal when submitted.

PROPOSAL_STATUS_ACCEPTED 2

Final status of a proposal when the final tally is done and the outcome passes the group policy's decision policy.

PROPOSAL_STATUS_REJECTED 3

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_ABORTED 4

Final status of a proposal when the group policy is modified before the final tally.

PROPOSAL_STATUS_WITHDRAWN 5

A proposal can be withdrawn before the voting start time by the owner. When this happens the final status is Withdrawn.

VoteOption

VoteOption enumerates the valid vote options for a given proposal.

NameNumberDescription
VOTE_OPTION_UNSPECIFIED 0

VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will return an error.

VOTE_OPTION_YES 1

VOTE_OPTION_YES defines a yes vote option.

VOTE_OPTION_ABSTAIN 2

VOTE_OPTION_ABSTAIN defines an abstain vote option.

VOTE_OPTION_NO 3

VOTE_OPTION_NO defines a no vote option.

VOTE_OPTION_NO_WITH_VETO 4

VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.

Scalar Value Types

.proto Type Notes Python Type
double float
float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int/long
uint32 Uses variable-length encoding. int/long
uint64 Uses variable-length encoding. int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. int/long
sfixed32 Always four bytes. int
sfixed64 Always eight bytes. int/long
bool boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. str/unicode
bytes May contain any arbitrary sequence of bytes. str