From efa675eb8df8463b02c595ae2f4d70526ca00443 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Wed, 28 Jul 2021 00:59:09 +0200 Subject: [PATCH] format x/group proto files (#9795) --- proto/cosmos/group/v1beta1/query.proto | 26 +- proto/cosmos/group/v1beta1/tx.proto | 295 ++++++++++----------- proto/cosmos/group/v1beta1/types.proto | 350 ++++++++++++------------- 3 files changed, 336 insertions(+), 335 deletions(-) diff --git a/proto/cosmos/group/v1beta1/query.proto b/proto/cosmos/group/v1beta1/query.proto index 379afc90e9..1a91eca667 100644 --- a/proto/cosmos/group/v1beta1/query.proto +++ b/proto/cosmos/group/v1beta1/query.proto @@ -16,7 +16,7 @@ service Query { // GroupAccountInfo queries group account info based on group account address. rpc GroupAccountInfo(QueryGroupAccountInfoRequest) returns (QueryGroupAccountInfoResponse); - + // GroupMembers queries members of a group rpc GroupMembers(QueryGroupMembersRequest) returns (QueryGroupMembersResponse); @@ -25,16 +25,16 @@ service Query { // GroupAccountsByGroup queries group accounts by group id. rpc GroupAccountsByGroup(QueryGroupAccountsByGroupRequest) returns (QueryGroupAccountsByGroupResponse); - + // GroupsByAdmin queries group accounts by admin address. rpc GroupAccountsByAdmin(QueryGroupAccountsByAdminRequest) returns (QueryGroupAccountsByAdminResponse); - + // Proposal queries a proposal based on proposal id. rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse); // ProposalsByGroupAccount queries proposals based on group account address. rpc ProposalsByGroupAccount(QueryProposalsByGroupAccountRequest) returns (QueryProposalsByGroupAccountResponse); - + // VoteByProposalVoter queries a vote by proposal id and voter. rpc VoteByProposalVoter(QueryVoteByProposalVoterRequest) returns (QueryVoteByProposalVoterResponse); @@ -47,7 +47,7 @@ service Query { // QueryGroupInfoRequest is the Query/GroupInfo request type. message QueryGroupInfoRequest { - + // group_id is the unique ID of the group. uint64 group_id = 1; } @@ -55,8 +55,8 @@ message QueryGroupInfoRequest { // QueryGroupInfoResponse is the Query/GroupInfo response type. message QueryGroupInfoResponse { - // info is the GroupInfo for the group. - GroupInfo info = 1; + // info is the GroupInfo for the group. + GroupInfo info = 1; } // QueryGroupAccountInfoRequest is the Query/GroupAccountInfo request type. @@ -69,8 +69,8 @@ message QueryGroupAccountInfoRequest { // QueryGroupAccountInfoResponse is the Query/GroupAccountInfo response type. message QueryGroupAccountInfoResponse { - // info is the GroupAccountInfo for the group account. - GroupAccountInfo info = 1; + // info is the GroupAccountInfo for the group account. + GroupAccountInfo info = 1; } // QueryGroupMembersRequest is the Query/GroupMembersRequest request type. @@ -115,7 +115,7 @@ message QueryGroupsByAdminResponse { // QueryGroupAccountsByGroupRequest is the Query/GroupAccountsByGroup request type. message QueryGroupAccountsByGroupRequest { - + // group_id is the unique ID of the group account's group. uint64 group_id = 1; @@ -135,7 +135,7 @@ message QueryGroupAccountsByGroupResponse { // QueryGroupAccountsByAdminRequest is the Query/GroupAccountsByAdmin request type. message QueryGroupAccountsByAdminRequest { - + // admin is the admin address of the group account. string admin = 1; @@ -192,7 +192,7 @@ message QueryVoteByProposalVoterRequest { // proposal_id is the unique ID of a proposal. uint64 proposal_id = 1; - + // voter is a proposal voter account address. string voter = 2; } @@ -209,7 +209,7 @@ message QueryVotesByProposalRequest { // proposal_id is the unique ID of a proposal. uint64 proposal_id = 1; - + // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } diff --git a/proto/cosmos/group/v1beta1/tx.proto b/proto/cosmos/group/v1beta1/tx.proto index 1e637e2d12..5fabeed132 100644 --- a/proto/cosmos/group/v1beta1/tx.proto +++ b/proto/cosmos/group/v1beta1/tx.proto @@ -12,38 +12,39 @@ import "cosmos/group/v1beta1/types.proto"; // Msg is the cosmos.group.v1beta1 Msg service. service Msg { - // CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. - rpc CreateGroup(MsgCreateGroupRequest) returns (MsgCreateGroupResponse); + // CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. + rpc CreateGroup(MsgCreateGroupRequest) returns (MsgCreateGroupResponse); - // UpdateGroupMembers updates the group members with given group id and admin address. - rpc UpdateGroupMembers(MsgUpdateGroupMembersRequest) returns (MsgUpdateGroupMembersResponse); + // UpdateGroupMembers updates the group members with given group id and admin address. + rpc UpdateGroupMembers(MsgUpdateGroupMembersRequest) returns (MsgUpdateGroupMembersResponse); - // UpdateGroupAdmin updates the group admin with given group id and previous admin address. - rpc UpdateGroupAdmin(MsgUpdateGroupAdminRequest) returns (MsgUpdateGroupAdminResponse); + // UpdateGroupAdmin updates the group admin with given group id and previous admin address. + rpc UpdateGroupAdmin(MsgUpdateGroupAdminRequest) returns (MsgUpdateGroupAdminResponse); - // UpdateGroupMetadata updates the group metadata with given group id and admin address. - rpc UpdateGroupMetadata(MsgUpdateGroupMetadataRequest) returns (MsgUpdateGroupMetadataResponse); + // UpdateGroupMetadata updates the group metadata with given group id and admin address. + rpc UpdateGroupMetadata(MsgUpdateGroupMetadataRequest) returns (MsgUpdateGroupMetadataResponse); - // CreateGroupAccount creates a new group account using given DecisionPolicy. - rpc CreateGroupAccount(MsgCreateGroupAccountRequest) returns (MsgCreateGroupAccountResponse); + // CreateGroupAccount creates a new group account using given DecisionPolicy. + rpc CreateGroupAccount(MsgCreateGroupAccountRequest) returns (MsgCreateGroupAccountResponse); - // UpdateGroupAccountAdmin updates a group account admin. - rpc UpdateGroupAccountAdmin(MsgUpdateGroupAccountAdminRequest) returns (MsgUpdateGroupAccountAdminResponse); + // UpdateGroupAccountAdmin updates a group account admin. + rpc UpdateGroupAccountAdmin(MsgUpdateGroupAccountAdminRequest) returns (MsgUpdateGroupAccountAdminResponse); - // UpdateGroupAccountDecisionPolicy allows a group account decision policy to be updated. - rpc UpdateGroupAccountDecisionPolicy(MsgUpdateGroupAccountDecisionPolicyRequest) returns (MsgUpdateGroupAccountDecisionPolicyResponse); + // UpdateGroupAccountDecisionPolicy allows a group account decision policy to be updated. + rpc UpdateGroupAccountDecisionPolicy(MsgUpdateGroupAccountDecisionPolicyRequest) + returns (MsgUpdateGroupAccountDecisionPolicyResponse); - // UpdateGroupAccountMetadata updates a group account metadata. - rpc UpdateGroupAccountMetadata(MsgUpdateGroupAccountMetadataRequest) returns (MsgUpdateGroupAccountMetadataResponse); + // UpdateGroupAccountMetadata updates a group account metadata. + rpc UpdateGroupAccountMetadata(MsgUpdateGroupAccountMetadataRequest) returns (MsgUpdateGroupAccountMetadataResponse); - // CreateProposal submits a new proposal. - rpc CreateProposal(MsgCreateProposalRequest) returns (MsgCreateProposalResponse); + // CreateProposal submits a new proposal. + rpc CreateProposal(MsgCreateProposalRequest) returns (MsgCreateProposalResponse); - // Vote allows a voter to vote on a proposal. - rpc Vote(MsgVoteRequest) returns (MsgVoteResponse); + // Vote allows a voter to vote on a proposal. + rpc Vote(MsgVoteRequest) returns (MsgVoteResponse); - // Exec executes a proposal. - rpc Exec(MsgExecRequest) returns (MsgExecResponse); + // Exec executes a proposal. + rpc Exec(MsgExecRequest) returns (MsgExecResponse); } // @@ -53,71 +54,71 @@ service Msg { // MsgCreateGroupRequest is the Msg/CreateGroup request type. message MsgCreateGroupRequest { - // admin is the account address of the group admin. - string admin = 1; - - // members defines the group members. - repeated Member members = 2 [(gogoproto.nullable) = false]; - - // metadata is any arbitrary metadata to attached to the group. - bytes metadata = 3; + // admin is the account address of the group admin. + string admin = 1; + + // members defines the group members. + repeated Member members = 2 [(gogoproto.nullable) = false]; + + // metadata is any arbitrary metadata to attached to the group. + bytes metadata = 3; } // MsgCreateGroupResponse is the Msg/CreateGroup response type. message MsgCreateGroupResponse { - // group_id is the unique ID of the newly created group. - uint64 group_id = 1; + // group_id is the unique ID of the newly created group. + uint64 group_id = 1; } // MsgUpdateGroupMembersRequest is the Msg/UpdateGroupMembers request type. message MsgUpdateGroupMembersRequest { - // admin is the account address of the group admin. - string admin = 1; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // member_updates is the list of members to update, - // set weight to 0 to remove a member. - repeated Member member_updates = 3 [(gogoproto.nullable) = false]; + // admin is the account address of the group admin. + string admin = 1; + + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // member_updates is the list of members to update, + // set weight to 0 to remove a member. + repeated Member member_updates = 3 [(gogoproto.nullable) = false]; } // MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. -message MsgUpdateGroupMembersResponse { } +message MsgUpdateGroupMembersResponse {} // MsgUpdateGroupAdminRequest is the Msg/UpdateGroupAdmin request type. message MsgUpdateGroupAdminRequest { - // admin is the current account address of the group admin. - string admin = 1; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // new_admin is the group new admin account address. - string new_admin = 3; + // admin is the current account address of the group admin. + string admin = 1; + + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // new_admin is the group new admin account address. + string new_admin = 3; } // MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. -message MsgUpdateGroupAdminResponse { } +message MsgUpdateGroupAdminResponse {} // MsgUpdateGroupMetadataRequest is the Msg/UpdateGroupMetadata request type. message MsgUpdateGroupMetadataRequest { - // admin is the account address of the group admin. - string admin = 1; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // metadata is the updated group's metadata. - bytes metadata = 3; + // admin is the account address of the group admin. + string admin = 1; + + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // metadata is the updated group's metadata. + bytes metadata = 3; } // MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. -message MsgUpdateGroupMetadataResponse { } +message MsgUpdateGroupMetadataResponse {} // // Group Accounts @@ -125,76 +126,76 @@ message MsgUpdateGroupMetadataResponse { } // MsgCreateGroupAccountRequest is the Msg/CreateGroupAccount request type. message MsgCreateGroupAccountRequest { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; - // admin is the account address of the group admin. - string admin = 1; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // metadata is any arbitrary metadata to attached to the group account. - bytes metadata = 3; + // admin is the account address of the group admin. + string admin = 1; - // decision_policy specifies the group account's decision policy. - google.protobuf.Any decision_policy = 4 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // metadata is any arbitrary metadata to attached to the group account. + bytes metadata = 3; + + // decision_policy specifies the group account's decision policy. + google.protobuf.Any decision_policy = 4 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; } // MsgCreateGroupAccountResponse is the Msg/CreateGroupAccount response type. message MsgCreateGroupAccountResponse { - // address is the account address of the newly created group account. - string address = 1; + // address is the account address of the newly created group account. + string address = 1; } // MsgUpdateGroupAccountAdminRequest is the Msg/UpdateGroupAccountAdmin request type. message MsgUpdateGroupAccountAdminRequest { - // admin is the account address of the group admin. - string admin = 1; - - // address is the group account address. - string address = 2; - - // new_admin is the new group account admin. - string new_admin = 3; + // admin is the account address of the group admin. + string admin = 1; + + // address is the group account address. + string address = 2; + + // new_admin is the new group account admin. + string new_admin = 3; } // MsgUpdateGroupAccountAdminResponse is the Msg/UpdateGroupAccountAdmin response type. -message MsgUpdateGroupAccountAdminResponse { } +message MsgUpdateGroupAccountAdminResponse {} // MsgUpdateGroupAccountDecisionPolicyRequest is the Msg/UpdateGroupAccountDecisionPolicy request type. message MsgUpdateGroupAccountDecisionPolicyRequest { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; - // admin is the account address of the group admin. - string admin = 1; - - // address is the group account address. - string address = 2; - - // decision_policy is the updated group account decision policy. - google.protobuf.Any decision_policy = 3 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; + // admin is the account address of the group admin. + string admin = 1; + + // address is the group account address. + string address = 2; + + // decision_policy is the updated group account decision policy. + google.protobuf.Any decision_policy = 3 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; } // MsgUpdateGroupAccountDecisionPolicyResponse is the Msg/UpdateGroupAccountDecisionPolicy response type. -message MsgUpdateGroupAccountDecisionPolicyResponse { } +message MsgUpdateGroupAccountDecisionPolicyResponse {} // MsgUpdateGroupAccountMetadataRequest is the Msg/UpdateGroupAccountMetadata request type. message MsgUpdateGroupAccountMetadataRequest { - // admin is the account address of the group admin. - string admin = 1; - - // address is the group account address. - string address = 2; - - // metadata is the updated group account metadata. - bytes metadata = 3; + // admin is the account address of the group admin. + string admin = 1; + + // address is the group account address. + string address = 2; + + // metadata is the updated group account metadata. + bytes metadata = 3; } // MsgUpdateGroupAccountMetadataResponse is the Msg/UpdateGroupAccountMetadata response type. -message MsgUpdateGroupAccountMetadataResponse { } +message MsgUpdateGroupAccountMetadataResponse {} // // Proposals and Voting @@ -203,79 +204,79 @@ message MsgUpdateGroupAccountMetadataResponse { } // Exec defines modes of execution of a proposal on creation or on new vote. enum Exec { - // An empty value means that there should be a separate - // MsgExec request for the proposal to execute. - EXEC_UNSPECIFIED = 0; + // An empty value means that there should be a separate + // MsgExec request for the proposal to execute. + EXEC_UNSPECIFIED = 0; - // Try to execute the proposal immediately. - // If the proposal is not allowed per the DecisionPolicy, - // the proposal will still be open and could - // be executed at a later point. - EXEC_TRY = 1; + // Try to execute the proposal immediately. + // If the proposal is not allowed per the DecisionPolicy, + // the proposal will still be open and could + // be executed at a later point. + EXEC_TRY = 1; } // MsgCreateProposalRequest is the Msg/CreateProposal request type. message MsgCreateProposalRequest { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; - // address is the group account address. - string address = 1; - - // proposers are the account addresses of the proposers. - // Proposers signatures will be counted as yes votes. - repeated string proposers = 2; - - // metadata is any arbitrary metadata to attached to the proposal. - bytes metadata = 3; + // address is the group account address. + string address = 1; - // msgs is a list of Msgs that will be executed if the proposal passes. - repeated google.protobuf.Any msgs = 4; + // proposers are the account addresses of the proposers. + // Proposers signatures will be counted as yes votes. + repeated string proposers = 2; - // exec defines the mode of execution of the proposal, - // whether it should be executed immediately on creation or not. - // If so, proposers signatures are considered as Yes votes. - Exec exec = 5; + // metadata is any arbitrary metadata to attached to the proposal. + bytes metadata = 3; + + // msgs is a list of Msgs that will be executed if the proposal passes. + repeated google.protobuf.Any msgs = 4; + + // exec defines the mode of execution of the proposal, + // whether it should be executed immediately on creation or not. + // If so, proposers signatures are considered as Yes votes. + Exec exec = 5; } // MsgCreateProposalResponse is the Msg/CreateProposal response type. message MsgCreateProposalResponse { - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; + // proposal is the unique ID of the proposal. + uint64 proposal_id = 1; } // MsgVoteRequest is the Msg/Vote request type. message MsgVoteRequest { - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; - - // voter is the voter account address. - string voter = 2; - - // choice is the voter's choice on the proposal. - Choice choice = 3; + // proposal is the unique ID of the proposal. + uint64 proposal_id = 1; - // metadata is any arbitrary metadata to attached to the vote. - bytes metadata = 4; + // voter is the voter account address. + string voter = 2; - // exec defines whether the proposal should be executed - // immediately after voting or not. - Exec exec = 5; + // choice is the voter's choice on the proposal. + Choice choice = 3; + + // metadata is any arbitrary metadata to attached to the vote. + bytes metadata = 4; + + // exec defines whether the proposal should be executed + // immediately after voting or not. + Exec exec = 5; } // MsgVoteResponse is the Msg/Vote response type. -message MsgVoteResponse { } +message MsgVoteResponse {} // MsgExecRequest is the Msg/Exec request type. message MsgExecRequest { - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; - - // signer is the account address used to execute the proposal. - string signer = 2; + // proposal is the unique ID of the proposal. + uint64 proposal_id = 1; + + // signer is the account address used to execute the proposal. + string signer = 2; } // MsgExecResponse is the Msg/Exec request type. -message MsgExecResponse { } +message MsgExecResponse {} diff --git a/proto/cosmos/group/v1beta1/types.proto b/proto/cosmos/group/v1beta1/types.proto index 9116442469..c1a12c99ec 100644 --- a/proto/cosmos/group/v1beta1/types.proto +++ b/proto/cosmos/group/v1beta1/types.proto @@ -14,52 +14,52 @@ import "google/protobuf/any.proto"; // non-zero weight and metadata. message Member { - // address is the member's account address. - string address = 1; - - // weight is the member's voting weight that should be greater than 0. - string weight = 2; - - // metadata is any arbitrary metadata to attached to the member. - bytes metadata = 3; + // address is the member's account address. + string address = 1; + + // weight is the member's voting weight that should be greater than 0. + string weight = 2; + + // metadata is any arbitrary metadata to attached to the member. + bytes metadata = 3; } // Members defines a repeated slice of Member objects. message Members { - // members is the list of members. - repeated Member members = 1 [(gogoproto.nullable) = false]; + // members is the list of members. + repeated Member members = 1 [(gogoproto.nullable) = false]; } // ThresholdDecisionPolicy implements the DecisionPolicy interface message ThresholdDecisionPolicy { - option (cosmos_proto.implements_interface) = "DecisionPolicy"; + option (cosmos_proto.implements_interface) = "DecisionPolicy"; - // threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed. - string threshold = 1; - - // timeout is the duration from submission of a proposal to the end of voting period - // Within this times votes and exec messages can be submitted. - google.protobuf.Duration timeout = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + // threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed. + string threshold = 1; + + // timeout is the duration from submission of a proposal to the end of voting period + // Within this times votes and exec messages can be submitted. + google.protobuf.Duration timeout = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; } // Choice defines available types of choices for voting. enum Choice { - // CHOICE_UNSPECIFIED defines a no-op voting choice. - CHOICE_UNSPECIFIED = 0; + // CHOICE_UNSPECIFIED defines a no-op voting choice. + CHOICE_UNSPECIFIED = 0; - // CHOICE_NO defines a no voting choice. - CHOICE_NO = 1; + // CHOICE_NO defines a no voting choice. + CHOICE_NO = 1; - // CHOICE_YES defines a yes voting choice. - CHOICE_YES = 2; + // CHOICE_YES defines a yes voting choice. + CHOICE_YES = 2; - // CHOICE_ABSTAIN defines an abstaining voting choice. - CHOICE_ABSTAIN = 3; + // CHOICE_ABSTAIN defines an abstaining voting choice. + CHOICE_ABSTAIN = 3; - // CHOICE_VETO defines a voting choice with veto. - CHOICE_VETO = 4; + // CHOICE_VETO defines a voting choice with veto. + CHOICE_VETO = 4; } // @@ -69,62 +69,62 @@ enum Choice { // GroupInfo represents the high-level on-chain information for a group. message GroupInfo { - // group_id is the unique ID of the group. - uint64 group_id = 1; + // group_id is the unique ID of the group. + uint64 group_id = 1; - // admin is the account address of the group's admin. - string admin = 2; - - // metadata is any arbitrary metadata to attached to the group. - bytes metadata = 3; + // admin is the account address of the group's admin. + string admin = 2; - // version is used to track changes to a group's membership structure that - // would break existing proposals. Whenever any members weight is changed, - // or any member is added or removed this version is incremented and will - // cause proposals based on older versions of this group to fail - uint64 version = 4; + // metadata is any arbitrary metadata to attached to the group. + bytes metadata = 3; - // total_weight is the sum of the group members' weights. - string total_weight = 5; + // version is used to track changes to a group's membership structure that + // would break existing proposals. Whenever any members weight is changed, + // or any member is added or removed this version is incremented and will + // cause proposals based on older versions of this group to fail + uint64 version = 4; + + // total_weight is the sum of the group members' weights. + string total_weight = 5; } // GroupMember represents the relationship between a group and a member. message GroupMember { - // group_id is the unique ID of the group. - uint64 group_id = 1; + // group_id is the unique ID of the group. + uint64 group_id = 1; - // member is the member data. - Member member = 2; + // member is the member data. + Member member = 2; } // GroupAccountInfo represents the high-level on-chain information for a group account. message GroupAccountInfo { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; - // address is the group account address. - string address = 1; - - // group_id is the unique ID of the group. - uint64 group_id = 2; + // address is the group account address. + string address = 1; - // admin is the account address of the group admin. - string admin = 3; - - // metadata is any arbitrary metadata to attached to the group account. - bytes metadata = 4; + // group_id is the unique ID of the group. + uint64 group_id = 2; - // version is used to track changes to a group's GroupAccountInfo structure that - // would create a different result on a running proposal. - uint64 version = 5; + // admin is the account address of the group admin. + string admin = 3; - // decision_policy specifies the group account's decision policy. - google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; + // metadata is any arbitrary metadata to attached to the group account. + bytes metadata = 4; - // derivation_key is the "derivation" key of the group account, - // which is needed to derive the group root module key and execute proposals. - bytes derivation_key = 7; + // version is used to track changes to a group's GroupAccountInfo structure that + // would create a different result on a running proposal. + uint64 version = 5; + + // decision_policy specifies the group account's decision policy. + google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; + + // derivation_key is the "derivation" key of the group account, + // which is needed to derive the group root module key and execute proposals. + bytes derivation_key = 7; } // Proposal defines a group proposal. Any member of a group can submit a proposal @@ -132,141 +132,141 @@ message GroupAccountInfo { // A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal // passes as well as some optional metadata associated with the proposal. message Proposal { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; - // proposal_id is the unique id of the proposal. - uint64 proposal_id = 1; + // proposal_id is the unique id of the proposal. + uint64 proposal_id = 1; - // address is the group account address. - string address = 2; - - // metadata is any arbitrary metadata to attached to the proposal. - bytes metadata = 3; + // address is the group account address. + string address = 2; - // proposers are the account addresses of the proposers. - repeated string proposers = 4; - - // submitted_at is a timestamp specifying when a proposal was submitted. - google.protobuf.Timestamp submitted_at = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - - // group_version tracks the version of the group that this proposal corresponds to. - // When group membership is changed, existing proposals from previous group versions will become invalid. - uint64 group_version = 6; + // metadata is any arbitrary metadata to attached to the proposal. + bytes metadata = 3; - // group_account_version tracks the version of the group account that this proposal corresponds to. - // When a decision policy is changed, existing proposals from previous policy versions will become invalid. - uint64 group_account_version = 7; + // proposers are the account addresses of the proposers. + repeated string proposers = 4; - // Status defines proposal statuses. - enum Status { - option (gogoproto.goproto_enum_prefix) = false; - - // An empty value is invalid and not allowed. - STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "ProposalStatusInvalid"]; - - // Initial status of a proposal when persisted. - STATUS_SUBMITTED = 1 [(gogoproto.enumvalue_customname) = "ProposalStatusSubmitted"]; - - // Final status of a proposal when the final tally was executed. - STATUS_CLOSED = 2 [(gogoproto.enumvalue_customname) = "ProposalStatusClosed"]; - - // Final status of a proposal when the group was modified before the final tally. - STATUS_ABORTED = 3 [(gogoproto.enumvalue_customname) = "ProposalStatusAborted"]; + // submitted_at is a timestamp specifying when a proposal was submitted. + google.protobuf.Timestamp submitted_at = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // TODO: do we want to support a withdrawn operation? - // A proposal can be deleted before the voting start time by the owner. When this happens the final status - // is Withdrawn. - // STATUS_WITHDRAWN = 4 [(gogoproto.enumvalue_customname) = "Withdrawn"]; - } + // group_version tracks the version of the group that this proposal corresponds to. + // When group membership is changed, existing proposals from previous group versions will become invalid. + uint64 group_version = 6; - // Status represents the high level position in the life cycle of the proposal. Initial value is Submitted. - Status status = 8; + // group_account_version tracks the version of the group account that this proposal corresponds to. + // When a decision policy is changed, existing proposals from previous policy versions will become invalid. + uint64 group_account_version = 7; - // Result defines types of proposal results. - enum Result { - option (gogoproto.goproto_enum_prefix) = false; + // Status defines proposal statuses. + enum Status { + option (gogoproto.goproto_enum_prefix) = false; - // An empty value is invalid and not allowed - RESULT_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "ProposalResultInvalid"]; - - // Until a final tally has happened the status is unfinalized - RESULT_UNFINALIZED = 1 [(gogoproto.enumvalue_customname) = "ProposalResultUnfinalized"]; - - // Final result of the tally - RESULT_ACCEPTED = 2 [(gogoproto.enumvalue_customname) = "ProposalResultAccepted"]; - - // Final result of the tally - RESULT_REJECTED = 3 [(gogoproto.enumvalue_customname) = "ProposalResultRejected"]; - } + // An empty value is invalid and not allowed. + STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "ProposalStatusInvalid"]; - // result is the final result based on the votes and election rule. Initial value is unfinalized. - // The result is persisted so that clients can always rely on this state and not have to replicate the logic. - Result result = 9; + // Initial status of a proposal when persisted. + STATUS_SUBMITTED = 1 [(gogoproto.enumvalue_customname) = "ProposalStatusSubmitted"]; - // vote_state contains the sums of all weighted votes for this proposal. - Tally vote_state = 10 [(gogoproto.nullable) = false]; + // Final status of a proposal when the final tally was executed. + STATUS_CLOSED = 2 [(gogoproto.enumvalue_customname) = "ProposalStatusClosed"]; - // timeout is the timestamp of the block where the proposal execution times out. Header times of the votes and execution messages - // must be before this end time to be included in the election. After the timeout timestamp the proposal can not be - // executed anymore and should be considered pending delete. - google.protobuf.Timestamp timeout = 11 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + // Final status of a proposal when the group was modified before the final tally. + STATUS_ABORTED = 3 [(gogoproto.enumvalue_customname) = "ProposalStatusAborted"]; - // ExecutorResult defines types of proposal executor results. - enum ExecutorResult { - option (gogoproto.goproto_enum_prefix) = false; - - // An empty value is not allowed. - EXECUTOR_RESULT_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "ProposalExecutorResultInvalid"]; - - // We have not yet run the executor. - EXECUTOR_RESULT_NOT_RUN = 1 [(gogoproto.enumvalue_customname) = "ProposalExecutorResultNotRun"]; - - // The executor was successful and proposed action updated state. - EXECUTOR_RESULT_SUCCESS = 2 [(gogoproto.enumvalue_customname) = "ProposalExecutorResultSuccess"]; - - // The executor returned an error and proposed action didn't update state. - EXECUTOR_RESULT_FAILURE = 3 [(gogoproto.enumvalue_customname) = "ProposalExecutorResultFailure"]; - } + // TODO: do we want to support a withdrawn operation? + // A proposal can be deleted before the voting start time by the owner. When this happens the final status + // is Withdrawn. + // STATUS_WITHDRAWN = 4 [(gogoproto.enumvalue_customname) = "Withdrawn"]; + } - // executor_result is the final result based on the votes and election rule. Initial value is NotRun. - ExecutorResult executor_result = 12; + // Status represents the high level position in the life cycle of the proposal. Initial value is Submitted. + Status status = 8; - // msgs is a list of Msgs that will be executed if the proposal passes. - repeated google.protobuf.Any msgs = 13; + // Result defines types of proposal results. + enum Result { + option (gogoproto.goproto_enum_prefix) = false; + + // An empty value is invalid and not allowed + RESULT_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "ProposalResultInvalid"]; + + // Until a final tally has happened the status is unfinalized + RESULT_UNFINALIZED = 1 [(gogoproto.enumvalue_customname) = "ProposalResultUnfinalized"]; + + // Final result of the tally + RESULT_ACCEPTED = 2 [(gogoproto.enumvalue_customname) = "ProposalResultAccepted"]; + + // Final result of the tally + RESULT_REJECTED = 3 [(gogoproto.enumvalue_customname) = "ProposalResultRejected"]; + } + + // result is the final result based on the votes and election rule. Initial value is unfinalized. + // The result is persisted so that clients can always rely on this state and not have to replicate the logic. + Result result = 9; + + // vote_state contains the sums of all weighted votes for this proposal. + Tally vote_state = 10 [(gogoproto.nullable) = false]; + + // timeout is the timestamp of the block where the proposal execution times out. Header times of the votes and + // execution messages must be before this end time to be included in the election. After the timeout timestamp the + // proposal can not be executed anymore and should be considered pending delete. + google.protobuf.Timestamp timeout = 11 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + + // ExecutorResult defines types of proposal executor results. + enum ExecutorResult { + option (gogoproto.goproto_enum_prefix) = false; + + // An empty value is not allowed. + EXECUTOR_RESULT_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "ProposalExecutorResultInvalid"]; + + // We have not yet run the executor. + EXECUTOR_RESULT_NOT_RUN = 1 [(gogoproto.enumvalue_customname) = "ProposalExecutorResultNotRun"]; + + // The executor was successful and proposed action updated state. + EXECUTOR_RESULT_SUCCESS = 2 [(gogoproto.enumvalue_customname) = "ProposalExecutorResultSuccess"]; + + // The executor returned an error and proposed action didn't update state. + EXECUTOR_RESULT_FAILURE = 3 [(gogoproto.enumvalue_customname) = "ProposalExecutorResultFailure"]; + } + + // executor_result is the final result based on the votes and election rule. Initial value is NotRun. + ExecutorResult executor_result = 12; + + // msgs is a list of Msgs that will be executed if the proposal passes. + repeated google.protobuf.Any msgs = 13; } // Tally represents the sum of weighted votes. message Tally { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; - // yes_count is the weighted sum of yes votes. - string yes_count = 1; - - // no_count is the weighted sum of no votes. - string no_count = 2; - - // abstain_count is the weighted sum of abstainers - string abstain_count = 3; - - // veto_count is the weighted sum of vetoes. - string veto_count = 4; + // yes_count is the weighted sum of yes votes. + string yes_count = 1; + + // no_count is the weighted sum of no votes. + string no_count = 2; + + // abstain_count is the weighted sum of abstainers + string abstain_count = 3; + + // veto_count is the weighted sum of vetoes. + string veto_count = 4; } // Vote represents a vote for a proposal. message Vote { - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; - - // voter is the account address of the voter. - string voter = 2; - - // choice is the voter's choice on the proposal. - Choice choice = 3; + // proposal is the unique ID of the proposal. + uint64 proposal_id = 1; - // metadata is any arbitrary metadata to attached to the vote. - bytes metadata = 4; + // voter is the account address of the voter. + string voter = 2; - // submitted_at is the timestamp when the vote was submitted. - google.protobuf.Timestamp submitted_at = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + // choice is the voter's choice on the proposal. + Choice choice = 3; + + // metadata is any arbitrary metadata to attached to the vote. + bytes metadata = 4; + + // submitted_at is the timestamp when the vote was submitted. + google.protobuf.Timestamp submitted_at = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; }