diff --git a/proto/cosmos/group/v1beta1/events.proto b/proto/cosmos/group/v1beta1/events.proto index 7a20e9748..9b59e4744 100644 --- a/proto/cosmos/group/v1beta1/events.proto +++ b/proto/cosmos/group/v1beta1/events.proto @@ -20,18 +20,18 @@ message EventUpdateGroup { uint64 group_id = 1; } -// EventCreateGroupAccount is an event emitted when a group account is created. -message EventCreateGroupAccount { +// EventCreateGroupPolicy is an event emitted when a group policy is created. +message EventCreateGroupPolicy { - // address is the address of the group account. + // address is the account address of the group policy. string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; ; } -// EventUpdateGroupAccount is an event emitted when a group account is updated. -message EventUpdateGroupAccount { +// EventUpdateGroupPolicy is an event emitted when a group policy is updated. +message EventUpdateGroupPolicy { - // address is the address of the group account. + // address is the account address of the group policy. string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; ; } diff --git a/proto/cosmos/group/v1beta1/query.proto b/proto/cosmos/group/v1beta1/query.proto index ed7270d90..5b48c59ac 100644 --- a/proto/cosmos/group/v1beta1/query.proto +++ b/proto/cosmos/group/v1beta1/query.proto @@ -17,9 +17,9 @@ service Query { option (google.api.http).get = "/cosmos/group/v1beta1/group_info/{group_id}"; }; - // GroupAccountInfo queries group account info based on group account address. - rpc GroupAccountInfo(QueryGroupAccountInfoRequest) returns (QueryGroupAccountInfoResponse) { - option (google.api.http).get = "/cosmos/group/v1beta1/group_account_info/{address}"; + // GroupPolicyInfo queries group policy info based on account address of group policy. + rpc GroupPolicyInfo(QueryGroupPolicyInfoRequest) returns (QueryGroupPolicyInfoResponse) { + option (google.api.http).get = "/cosmos/group/v1beta1/group_policy_info/{address}"; }; // GroupMembers queries members of a group @@ -32,14 +32,14 @@ service Query { option (google.api.http).get = "/cosmos/group/v1beta1/groups_by_admin/{admin}"; }; - // GroupAccountsByGroup queries group accounts by group id. - rpc GroupAccountsByGroup(QueryGroupAccountsByGroupRequest) returns (QueryGroupAccountsByGroupResponse) { - option (google.api.http).get = "/cosmos/group/v1beta1/group_accounts_by_group/{group_id}"; + // GroupPoliciesByGroup queries group policies by group id. + rpc GroupPoliciesByGroup(QueryGroupPoliciesByGroupRequest) returns (QueryGroupPoliciesByGroupResponse) { + option (google.api.http).get = "/cosmos/group/v1beta1/group_policies_by_group/{group_id}"; }; - // GroupsByAdmin queries group accounts by admin address. - rpc GroupAccountsByAdmin(QueryGroupAccountsByAdminRequest) returns (QueryGroupAccountsByAdminResponse) { - option (google.api.http).get = "/cosmos/group/v1beta1/group_accounts_by_admin/{admin}"; + // GroupsByAdmin queries group policies by admin address. + rpc GroupPoliciesByAdmin(QueryGroupPoliciesByAdminRequest) returns (QueryGroupPoliciesByAdminResponse) { + option (google.api.http).get = "/cosmos/group/v1beta1/group_policies_by_admin/{admin}"; }; // Proposal queries a proposal based on proposal id. @@ -47,9 +47,9 @@ service Query { option (google.api.http).get = "/cosmos/group/v1beta1/proposal/{proposal_id}"; }; - // ProposalsByGroupAccount queries proposals based on group account address. - rpc ProposalsByGroupAccount(QueryProposalsByGroupAccountRequest) returns (QueryProposalsByGroupAccountResponse) { - option (google.api.http).get = "/cosmos/group/v1beta1/proposals_by_group_account/{address}"; + // ProposalsByGroupPolicy queries proposals based on account address of group policy. + rpc ProposalsByGroupPolicy(QueryProposalsByGroupPolicyRequest) returns (QueryProposalsByGroupPolicyResponse) { + option (google.api.http).get = "/cosmos/group/v1beta1/proposals_by_group_policy/{address}"; }; // VoteByProposalVoter queries a vote by proposal id and voter. @@ -87,18 +87,18 @@ message QueryGroupInfoResponse { GroupInfo info = 1; } -// QueryGroupAccountInfoRequest is the Query/GroupAccountInfo request type. -message QueryGroupAccountInfoRequest { +// QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. +message QueryGroupPolicyInfoRequest { - // address is the account address of the group account. + // address is the account address of the group policy. string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// QueryGroupAccountInfoResponse is the Query/GroupAccountInfo response type. -message QueryGroupAccountInfoResponse { +// QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. +message QueryGroupPolicyInfoResponse { - // info is the GroupAccountInfo for the group account. - GroupAccountInfo info = 1; + // info is the GroupPolicyInfo for the group policy. + GroupPolicyInfo info = 1; } // QueryGroupMembersRequest is the Query/GroupMembers request type. @@ -141,41 +141,41 @@ message QueryGroupsByAdminResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryGroupAccountsByGroupRequest is the Query/GroupAccountsByGroup request type. -message QueryGroupAccountsByGroupRequest { +// QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. +message QueryGroupPoliciesByGroupRequest { - // group_id is the unique ID of the group account's group. + // group_id is the unique ID of the group policy's group. uint64 group_id = 1; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryGroupAccountsByGroupResponse is the Query/GroupAccountsByGroup response type. -message QueryGroupAccountsByGroupResponse { +// QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. +message QueryGroupPoliciesByGroupResponse { - // group_accounts are the group accounts info associated with the provided group. - repeated GroupAccountInfo group_accounts = 1; + // group_policies are the group policies info associated with the provided group. + repeated GroupPolicyInfo group_policies = 1; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryGroupAccountsByAdminRequest is the Query/GroupAccountsByAdmin request type. -message QueryGroupAccountsByAdminRequest { +// QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. +message QueryGroupPoliciesByAdminRequest { - // admin is the admin address of the group account. + // admin is the admin address of the group policy. string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryGroupAccountsByAdminResponse is the Query/GroupAccountsByAdmin response type. -message QueryGroupAccountsByAdminResponse { +// QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. +message QueryGroupPoliciesByAdminResponse { - // group_accounts are the group accounts info with provided admin. - repeated GroupAccountInfo group_accounts = 1; + // group_policies are the group policies info with provided admin. + repeated GroupPolicyInfo group_policies = 1; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; @@ -195,20 +195,20 @@ message QueryProposalResponse { Proposal proposal = 1; } -// QueryProposalsByGroupAccountRequest is the Query/ProposalByGroupAccount request type. -message QueryProposalsByGroupAccountRequest { +// QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. +message QueryProposalsByGroupPolicyRequest { - // address is the group account address related to proposals. + // address is the account address of the group policy related to proposals. string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryProposalsByGroupAccountResponse is the Query/ProposalByGroupAccount response type. -message QueryProposalsByGroupAccountResponse { +// QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. +message QueryProposalsByGroupPolicyResponse { - // proposals are the proposals with given group account. + // proposals are the proposals with given group policy. repeated Proposal proposals = 1; // pagination defines the pagination in the response. diff --git a/proto/cosmos/group/v1beta1/tx.proto b/proto/cosmos/group/v1beta1/tx.proto index c235b014d..6e93bdc9c 100644 --- a/proto/cosmos/group/v1beta1/tx.proto +++ b/proto/cosmos/group/v1beta1/tx.proto @@ -24,18 +24,18 @@ service Msg { // UpdateGroupMetadata updates the group metadata with given group id and admin address. rpc UpdateGroupMetadata(MsgUpdateGroupMetadata) returns (MsgUpdateGroupMetadataResponse); - // CreateGroupAccount creates a new group account using given DecisionPolicy. - rpc CreateGroupAccount(MsgCreateGroupAccount) returns (MsgCreateGroupAccountResponse); + // CreateGroupPolicy creates a new group policy using given DecisionPolicy. + rpc CreateGroupPolicy(MsgCreateGroupPolicy) returns (MsgCreateGroupPolicyResponse); - // UpdateGroupAccountAdmin updates a group account admin. - rpc UpdateGroupAccountAdmin(MsgUpdateGroupAccountAdmin) returns (MsgUpdateGroupAccountAdminResponse); + // UpdateGroupPolicyAdmin updates a group policy admin. + rpc UpdateGroupPolicyAdmin(MsgUpdateGroupPolicyAdmin) returns (MsgUpdateGroupPolicyAdminResponse); - // UpdateGroupAccountDecisionPolicy allows a group account decision policy to be updated. - rpc UpdateGroupAccountDecisionPolicy(MsgUpdateGroupAccountDecisionPolicy) - returns (MsgUpdateGroupAccountDecisionPolicyResponse); + // UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. + rpc UpdateGroupPolicyDecisionPolicy(MsgUpdateGroupPolicyDecisionPolicy) + returns (MsgUpdateGroupPolicyDecisionPolicyResponse); - // UpdateGroupAccountMetadata updates a group account metadata. - rpc UpdateGroupAccountMetadata(MsgUpdateGroupAccountMetadata) returns (MsgUpdateGroupAccountMetadataResponse); + // UpdateGroupPolicyMetadata updates a group policy metadata. + rpc UpdateGroupPolicyMetadata(MsgUpdateGroupPolicyMetadata) returns (MsgUpdateGroupPolicyMetadataResponse); // CreateProposal submits a new proposal. rpc CreateProposal(MsgCreateProposal) returns (MsgCreateProposalResponse); @@ -121,11 +121,11 @@ message MsgUpdateGroupMetadata { message MsgUpdateGroupMetadataResponse {} // -// Group Accounts +// Group Policies // -// MsgCreateGroupAccount is the Msg/CreateGroupAccount request type. -message MsgCreateGroupAccount { +// MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. +message MsgCreateGroupPolicy { option (gogoproto.goproto_getters) = false; // admin is the account address of the group admin. @@ -134,68 +134,68 @@ message MsgCreateGroupAccount { // group_id is the unique ID of the group. uint64 group_id = 2; - // metadata is any arbitrary metadata to attached to the group account. + // metadata is any arbitrary metadata attached to the group policy. bytes metadata = 3; - // decision_policy specifies the group account's decision policy. + // decision_policy specifies the group policy's decision policy. google.protobuf.Any decision_policy = 4 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; } -// MsgCreateGroupAccountResponse is the Msg/CreateGroupAccount response type. -message MsgCreateGroupAccountResponse { +// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. +message MsgCreateGroupPolicyResponse { - // address is the account address of the newly created group account. + // address is the account address of the newly created group policy. string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// MsgUpdateGroupAccountAdmin is the Msg/UpdateGroupAccountAdmin request type. -message MsgUpdateGroupAccountAdmin { +// MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. +message MsgUpdateGroupPolicyAdmin { // admin is the account address of the group admin. string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // address is the group account address. + // address is the account address of the group policy. string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // new_admin is the new group account admin. + // new_admin is the new group policy admin. string new_admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// MsgUpdateGroupAccountAdminResponse is the Msg/UpdateGroupAccountAdmin response type. -message MsgUpdateGroupAccountAdminResponse {} +// MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. +message MsgUpdateGroupPolicyAdminResponse {} -// MsgUpdateGroupAccountDecisionPolicy is the Msg/UpdateGroupAccountDecisionPolicy request type. -message MsgUpdateGroupAccountDecisionPolicy { +// MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. +message MsgUpdateGroupPolicyDecisionPolicy { option (gogoproto.goproto_getters) = false; // admin is the account address of the group admin. string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // address is the group account address. + // address is the account address of group policy. string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // decision_policy is the updated group account decision policy. + // decision_policy is the updated group policy's decision policy. google.protobuf.Any decision_policy = 3 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; } -// MsgUpdateGroupAccountDecisionPolicyResponse is the Msg/UpdateGroupAccountDecisionPolicy response type. -message MsgUpdateGroupAccountDecisionPolicyResponse {} +// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. +message MsgUpdateGroupPolicyDecisionPolicyResponse {} -// MsgUpdateGroupAccountMetadata is the Msg/UpdateGroupAccountMetadata request type. -message MsgUpdateGroupAccountMetadata { +// MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. +message MsgUpdateGroupPolicyMetadata { // admin is the account address of the group admin. string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // address is the group account address. + // address is the account address of group policy. string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // metadata is the updated group account metadata. + // metadata is the updated group policy metadata. bytes metadata = 3; } -// MsgUpdateGroupAccountMetadataResponse is the Msg/UpdateGroupAccountMetadata response type. -message MsgUpdateGroupAccountMetadataResponse {} +// MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. +message MsgUpdateGroupPolicyMetadataResponse {} // // Proposals and Voting @@ -219,7 +219,7 @@ enum Exec { message MsgCreateProposal { option (gogoproto.goproto_getters) = false; - // address is the group account address. + // address is the account address of group policy. string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // proposers are the account addresses of the proposers. diff --git a/proto/cosmos/group/v1beta1/types.proto b/proto/cosmos/group/v1beta1/types.proto index aa5e5f353..a6a17b84e 100644 --- a/proto/cosmos/group/v1beta1/types.proto +++ b/proto/cosmos/group/v1beta1/types.proto @@ -98,12 +98,12 @@ message GroupMember { Member member = 2; } -// GroupAccountInfo represents the high-level on-chain information for a group account. -message GroupAccountInfo { +// GroupPolicyInfo represents the high-level on-chain information for a group policy. +message GroupPolicyInfo { option (gogoproto.equal) = true; option (gogoproto.goproto_getters) = false; - // address is the group account address. + // address is the account address of group policy. string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // group_id is the unique ID of the group. @@ -112,19 +112,19 @@ message GroupAccountInfo { // admin is the account address of the group admin. string admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // metadata is any arbitrary metadata to attached to the group account. + // metadata is any arbitrary metadata to attached to the group policy. bytes metadata = 4; - // version is used to track changes to a group's GroupAccountInfo structure that + // version is used to track changes to a group's GroupPolicyInfo structure that // would create a different result on a running proposal. uint64 version = 5; - // decision_policy specifies the group account's decision policy. + // decision_policy specifies the group policy's decision policy. google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; } // Proposal defines a group proposal. Any member of a group can submit a proposal -// for a group account to decide upon. +// 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. message Proposal { @@ -133,7 +133,7 @@ message Proposal { // proposal_id is the unique id of the proposal. uint64 proposal_id = 1; - // address is the group account address. + // address is the account address of group policy. string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // metadata is any arbitrary metadata to attached to the proposal. @@ -149,9 +149,9 @@ message Proposal { // When group membership is changed, existing proposals from previous group versions will become invalid. uint64 group_version = 6; - // group_account_version tracks the version of the group account that this proposal corresponds to. + // group_policy_version tracks the version of the group policy 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; + uint64 group_policy_version = 7; // Status defines proposal statuses. enum Status { diff --git a/x/group/client/cli/query.go b/x/group/client/cli/query.go index 94de8ebda..6abc7a289 100644 --- a/x/group/client/cli/query.go +++ b/x/group/client/cli/query.go @@ -21,13 +21,13 @@ func QueryCmd(name string) *cobra.Command { queryCmd.AddCommand( QueryGroupInfoCmd(), - QueryGroupAccountInfoCmd(), + QueryGroupPolicyInfoCmd(), QueryGroupMembersCmd(), QueryGroupsByAdminCmd(), - QueryGroupAccountsByGroupCmd(), - QueryGroupAccountsByAdminCmd(), + QueryGroupPoliciesByGroupCmd(), + QueryGroupPoliciesByAdminCmd(), QueryProposalCmd(), - QueryProposalsByGroupAccountCmd(), + QueryProposalsByGroupPolicyCmd(), QueryVoteByProposalVoterCmd(), QueryVotesByProposalCmd(), QueryVotesByVoterCmd(), @@ -101,11 +101,11 @@ func QueryGroupInfoCmd() *cobra.Command { return cmd } -// QueryGroupAccountInfoCmd creates a CLI command for Query/GroupAccountInfo. -func QueryGroupAccountInfoCmd() *cobra.Command { +// QueryGroupPolicyInfoCmd creates a CLI command for Query/GroupPolicyInfo. +func QueryGroupPolicyInfoCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "group-account-info [group-account]", - Short: "Query for group account info by group account address", + Use: "group-policy-info [group-policy-account]", + Short: "Query for group policy info by account address of group policy", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -115,7 +115,7 @@ func QueryGroupAccountInfoCmd() *cobra.Command { queryClient := group.NewQueryClient(clientCtx) - res, err := queryClient.GroupAccountInfo(cmd.Context(), &group.QueryGroupAccountInfoRequest{ + res, err := queryClient.GroupPolicyInfo(cmd.Context(), &group.QueryGroupPolicyInfoRequest{ Address: args[0], }) if err != nil { @@ -208,11 +208,11 @@ func QueryGroupsByAdminCmd() *cobra.Command { return cmd } -// QueryGroupAccountsByGroupCmd creates a CLI command for Query/GroupAccountsByGroup. -func QueryGroupAccountsByGroupCmd() *cobra.Command { +// QueryGroupPoliciesByGroupCmd creates a CLI command for Query/GroupPoliciesByGroup. +func QueryGroupPoliciesByGroupCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "group-accounts-by-group [group-id]", - Short: "Query for group accounts by group id with pagination flags", + Use: "group-policies-by-group [group-id]", + Short: "Query for group policies by group id with pagination flags", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -232,7 +232,7 @@ func QueryGroupAccountsByGroupCmd() *cobra.Command { queryClient := group.NewQueryClient(clientCtx) - res, err := queryClient.GroupAccountsByGroup(cmd.Context(), &group.QueryGroupAccountsByGroupRequest{ + res, err := queryClient.GroupPoliciesByGroup(cmd.Context(), &group.QueryGroupPoliciesByGroupRequest{ GroupId: groupID, Pagination: pageReq, }) @@ -249,11 +249,11 @@ func QueryGroupAccountsByGroupCmd() *cobra.Command { return cmd } -// QueryGroupAccountsByAdminCmd creates a CLI command for Query/GroupAccountsByAdmin. -func QueryGroupAccountsByAdminCmd() *cobra.Command { +// QueryGroupPoliciesByAdminCmd creates a CLI command for Query/GroupPoliciesByAdmin. +func QueryGroupPoliciesByAdminCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "group-accounts-by-admin [admin]", - Short: "Query for group accounts by admin account address with pagination flags", + Use: "group-policies-by-admin [admin]", + Short: "Query for group policies by admin account address with pagination flags", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -268,7 +268,7 @@ func QueryGroupAccountsByAdminCmd() *cobra.Command { queryClient := group.NewQueryClient(clientCtx) - res, err := queryClient.GroupAccountsByAdmin(cmd.Context(), &group.QueryGroupAccountsByAdminRequest{ + res, err := queryClient.GroupPoliciesByAdmin(cmd.Context(), &group.QueryGroupPoliciesByAdminRequest{ Admin: args[0], Pagination: pageReq, }) @@ -320,11 +320,11 @@ func QueryProposalCmd() *cobra.Command { return cmd } -// QueryProposalsByGroupAccountCmd creates a CLI command for Query/ProposalsByGroupAccount. -func QueryProposalsByGroupAccountCmd() *cobra.Command { +// QueryProposalsByGroupPolicyCmd creates a CLI command for Query/ProposalsByGroupPolicy. +func QueryProposalsByGroupPolicyCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "proposals-by-group-account [group-account]", - Short: "Query for proposals by group account address with pagination flags", + Use: "proposals-by-group-policy [group-policy-account]", + Short: "Query for proposals by account address of group policy with pagination flags", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -339,7 +339,7 @@ func QueryProposalsByGroupAccountCmd() *cobra.Command { queryClient := group.NewQueryClient(clientCtx) - res, err := queryClient.ProposalsByGroupAccount(cmd.Context(), &group.QueryProposalsByGroupAccountRequest{ + res, err := queryClient.ProposalsByGroupPolicy(cmd.Context(), &group.QueryProposalsByGroupPolicyRequest{ Address: args[0], Pagination: pageReq, }) diff --git a/x/group/client/cli/tx.go b/x/group/client/cli/tx.go index 8ef9633ce..5806cd249 100644 --- a/x/group/client/cli/tx.go +++ b/x/group/client/cli/tx.go @@ -38,10 +38,10 @@ func TxCmd(name string) *cobra.Command { MsgUpdateGroupAdminCmd(), MsgUpdateGroupMetadataCmd(), MsgUpdateGroupMembersCmd(), - MsgCreateGroupAccountCmd(), - MsgUpdateGroupAccountAdminCmd(), - MsgUpdateGroupAccountDecisionPolicyCmd(), - MsgUpdateGroupAccountMetadataCmd(), + MsgCreateGroupPolicyCmd(), + MsgUpdateGroupPolicyAdminCmd(), + MsgUpdateGroupPolicyDecisionPolicyCmd(), + MsgUpdateGroupPolicyMetadataCmd(), MsgCreateProposalCmd(), MsgVoteCmd(), MsgExecCmd(), @@ -284,20 +284,20 @@ func MsgUpdateGroupMetadataCmd() *cobra.Command { return cmd } -// MsgCreateGroupAccountCmd creates a CLI command for Msg/CreateGroupAccount. -func MsgCreateGroupAccountCmd() *cobra.Command { +// MsgCreateGroupPolicyCmd creates a CLI command for Msg/CreateGroupPolicy. +func MsgCreateGroupPolicyCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "create-group-account [admin] [group-id] [metadata] [decision-policy]", - Short: "Create a group account which is an account " + + Use: "create-group-policy [admin] [group-id] [metadata] [decision-policy]", + Short: "Create a group policy which is an account " + "associated with a group and a decision policy. " + "Note, the '--from' flag is " + "ignored as it is implied from [admin].", Long: strings.TrimSpace( - fmt.Sprintf(`Create a group account which is an account associated with a group and a decision policy. + fmt.Sprintf(`Create a group policy which is an account associated with a group and a decision policy. Note, the '--from' flag is ignored as it is implied from [admin]. Example: -$ %s tx group create-group-account [admin] [group-id] [metadata] \ +$ %s tx group create-group-policy [admin] [group-id] [metadata] \ '{"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy", "threshold":"1", "timeout":"1s"}' `, version.AppName, @@ -330,7 +330,7 @@ $ %s tx group create-group-account [admin] [group-id] [metadata] \ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "metadata is malformed, proper base64 string is required") } - msg, err := group.NewMsgCreateGroupAccount( + msg, err := group.NewMsgCreateGroupPolicy( clientCtx.GetFromAddress(), groupID, b, @@ -352,11 +352,11 @@ $ %s tx group create-group-account [admin] [group-id] [metadata] \ return cmd } -// MsgUpdateGroupAccountAdminCmd creates a CLI command for Msg/UpdateGroupAccountAdmin. -func MsgUpdateGroupAccountAdminCmd() *cobra.Command { +// MsgUpdateGroupPolicyAdminCmd creates a CLI command for Msg/UpdateGroupPolicyAdmin. +func MsgUpdateGroupPolicyAdminCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "update-group-account-admin [admin] [group-account] [new-admin]", - Short: "Update a group account admin", + Use: "update-group-policy-admin [admin] [group-policy-account] [new-admin]", + Short: "Update a group policy admin", Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { err := cmd.Flags().Set(flags.FlagFrom, args[0]) @@ -369,7 +369,7 @@ func MsgUpdateGroupAccountAdminCmd() *cobra.Command { return err } - msg := &group.MsgUpdateGroupAccountAdmin{ + msg := &group.MsgUpdateGroupPolicyAdmin{ Admin: clientCtx.GetFromAddress().String(), Address: args[1], NewAdmin: args[2], @@ -387,11 +387,11 @@ func MsgUpdateGroupAccountAdminCmd() *cobra.Command { return cmd } -// MsgUpdateGroupAccountDecisionPolicyCmd creates a CLI command for Msg/UpdateGroupAccountDecisionPolicy. -func MsgUpdateGroupAccountDecisionPolicyCmd() *cobra.Command { +// MsgUpdateGroupPolicyDecisionPolicyCmd creates a CLI command for Msg/UpdateGroupPolicyDecisionPolicy. +func MsgUpdateGroupPolicyDecisionPolicyCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "update-group-account-policy [admin] [group-account] [decision-policy]", - Short: "Update a group account decision policy", + Use: "update-group-account-policy [admin] [group-policy-account] [decision-policy]", + Short: "Update a group policy's decision policy", Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { err := cmd.Flags().Set(flags.FlagFrom, args[0]) @@ -414,7 +414,7 @@ func MsgUpdateGroupAccountDecisionPolicyCmd() *cobra.Command { return err } - msg, err := group.NewMsgUpdateGroupAccountDecisionPolicyRequest( + msg, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest( clientCtx.GetFromAddress(), accountAddress, policy, @@ -436,11 +436,11 @@ func MsgUpdateGroupAccountDecisionPolicyCmd() *cobra.Command { return cmd } -// MsgUpdateGroupAccountMetadataCmd creates a CLI command for Msg/MsgUpdateGroupAccountMetadata. -func MsgUpdateGroupAccountMetadataCmd() *cobra.Command { +// MsgUpdateGroupPolicyMetadataCmd creates a CLI command for Msg/MsgUpdateGroupPolicyMetadata. +func MsgUpdateGroupPolicyMetadataCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "update-group-account-metadata [admin] [group-account] [new-metadata]", - Short: "Update a group account metadata", + Use: "update-group-policy-metadata [admin] [group-policy-account] [new-metadata]", + Short: "Update a group policy metadata", Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { err := cmd.Flags().Set(flags.FlagFrom, args[0]) @@ -458,7 +458,7 @@ func MsgUpdateGroupAccountMetadataCmd() *cobra.Command { return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "metadata is malformed, proper base64 string is required") } - msg := &group.MsgUpdateGroupAccountMetadata{ + msg := &group.MsgUpdateGroupPolicyMetadata{ Admin: clientCtx.GetFromAddress().String(), Address: args[1], Metadata: b, @@ -479,12 +479,12 @@ func MsgUpdateGroupAccountMetadataCmd() *cobra.Command { // MsgCreateProposalCmd creates a CLI command for Msg/CreateProposal. func MsgCreateProposalCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "create-proposal [group-account] [proposer[,proposer]*] [msg_tx_json_file] [metadata]", + Use: "create-proposal [group-policy-account] [proposer[,proposer]*] [msg_tx_json_file] [metadata]", Short: "Submit a new proposal", Long: `Submit a new proposal. Parameters: - group-account: address of the group account + group-policy-account: account address of the group policy proposer: comma separated (no spaces) list of proposer account addresses. Example: "addr1,addr2" Metadata: metadata for the proposal msg_tx_json_file: path to json file with messages that will be executed if the proposal is accepted. diff --git a/x/group/client/testutil/query.go b/x/group/client/testutil/query.go index f369ae407..6a5117779 100644 --- a/x/group/client/testutil/query.go +++ b/x/group/client/testutil/query.go @@ -280,7 +280,7 @@ func (s *IntegrationTestSuite) TestQueryGroupsByAdmin() { } } -func (s *IntegrationTestSuite) TestQueryGroupAccountInfo() { +func (s *IntegrationTestSuite) TestQueryGroupPolicyInfo() { val := s.network.Validators[0] clientCtx := val.ClientCtx @@ -292,15 +292,15 @@ func (s *IntegrationTestSuite) TestQueryGroupAccountInfo() { expectedCode uint32 }{ { - "group account not found", + "group policy not found", []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, true, "not found: invalid request", 0, }, { - "group account found", - []string{s.groupAccounts[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + "group policy found", + []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, false, "", 0, @@ -311,7 +311,7 @@ func (s *IntegrationTestSuite) TestQueryGroupAccountInfo() { tc := tc s.Run(tc.name, func() { - cmd := client.QueryGroupAccountInfoCmd() + cmd := client.QueryGroupPolicyInfoCmd() out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) if tc.expectErr { @@ -319,20 +319,20 @@ func (s *IntegrationTestSuite) TestQueryGroupAccountInfo() { } else { s.Require().NoError(err, out.String()) - var g group.GroupAccountInfo + var g group.GroupPolicyInfo s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &g)) - s.Require().Equal(s.groupAccounts[0].GroupId, g.GroupId) - s.Require().Equal(s.groupAccounts[0].Address, g.Address) - s.Require().Equal(s.groupAccounts[0].Admin, g.Admin) - s.Require().Equal(s.groupAccounts[0].Metadata, g.Metadata) - s.Require().Equal(s.groupAccounts[0].Version, g.Version) - s.Require().Equal(s.groupAccounts[0].GetDecisionPolicy(), g.GetDecisionPolicy()) + s.Require().Equal(s.groupPolicies[0].GroupId, g.GroupId) + s.Require().Equal(s.groupPolicies[0].Address, g.Address) + s.Require().Equal(s.groupPolicies[0].Admin, g.Admin) + s.Require().Equal(s.groupPolicies[0].Metadata, g.Metadata) + s.Require().Equal(s.groupPolicies[0].Version, g.Version) + s.Require().Equal(s.groupPolicies[0].GetDecisionPolicy(), g.GetDecisionPolicy()) } }) } } -func (s *IntegrationTestSuite) TestQueryGroupAccountsByGroup() { +func (s *IntegrationTestSuite) TestQueryGroupPoliciesByGroup() { val := s.network.Validators[0] clientCtx := val.ClientCtx @@ -342,7 +342,7 @@ func (s *IntegrationTestSuite) TestQueryGroupAccountsByGroup() { expectErr bool expectErrMsg string expectedCode uint32 - expectGroupAccounts []*group.GroupAccountInfo + expectGroupPolicies []*group.GroupPolicyInfo }{ { "invalid group id", @@ -350,28 +350,28 @@ func (s *IntegrationTestSuite) TestQueryGroupAccountsByGroup() { true, "strconv.ParseUint: parsing \"\": invalid syntax", 0, - []*group.GroupAccountInfo{}, + []*group.GroupPolicyInfo{}, }, { - "no group account", + "no group policy", []string{"12345", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, false, "", 0, - []*group.GroupAccountInfo{}, + []*group.GroupPolicyInfo{}, }, { - "found group accounts", + "found group policies", []string{strconv.FormatUint(s.group.GroupId, 10), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, false, "", 0, - []*group.GroupAccountInfo{ - s.groupAccounts[0], - s.groupAccounts[1], - s.groupAccounts[2], - s.groupAccounts[3], - s.groupAccounts[4], + []*group.GroupPolicyInfo{ + s.groupPolicies[0], + s.groupPolicies[1], + s.groupPolicies[2], + s.groupPolicies[3], + s.groupPolicies[4], }, }, } @@ -380,7 +380,7 @@ func (s *IntegrationTestSuite) TestQueryGroupAccountsByGroup() { tc := tc s.Run(tc.name, func() { - cmd := client.QueryGroupAccountsByGroupCmd() + cmd := client.QueryGroupPoliciesByGroupCmd() out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) if tc.expectErr { @@ -388,22 +388,22 @@ func (s *IntegrationTestSuite) TestQueryGroupAccountsByGroup() { } else { s.Require().NoError(err, out.String()) - var res group.QueryGroupAccountsByGroupResponse + var res group.QueryGroupPoliciesByGroupResponse s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().Equal(len(res.GroupAccounts), len(tc.expectGroupAccounts)) - for i := range res.GroupAccounts { - s.Require().Equal(res.GroupAccounts[i].GroupId, tc.expectGroupAccounts[i].GroupId) - s.Require().Equal(res.GroupAccounts[i].Metadata, tc.expectGroupAccounts[i].Metadata) - s.Require().Equal(res.GroupAccounts[i].Version, tc.expectGroupAccounts[i].Version) - s.Require().Equal(res.GroupAccounts[i].Admin, tc.expectGroupAccounts[i].Admin) - s.Require().Equal(res.GroupAccounts[i].GetDecisionPolicy(), tc.expectGroupAccounts[i].GetDecisionPolicy()) + s.Require().Equal(len(res.GroupPolicies), len(tc.expectGroupPolicies)) + for i := range res.GroupPolicies { + s.Require().Equal(res.GroupPolicies[i].GroupId, tc.expectGroupPolicies[i].GroupId) + s.Require().Equal(res.GroupPolicies[i].Metadata, tc.expectGroupPolicies[i].Metadata) + s.Require().Equal(res.GroupPolicies[i].Version, tc.expectGroupPolicies[i].Version) + s.Require().Equal(res.GroupPolicies[i].Admin, tc.expectGroupPolicies[i].Admin) + s.Require().Equal(res.GroupPolicies[i].GetDecisionPolicy(), tc.expectGroupPolicies[i].GetDecisionPolicy()) } } }) } } -func (s *IntegrationTestSuite) TestQueryGroupAccountsByAdmin() { +func (s *IntegrationTestSuite) TestQueryGroupPoliciesByAdmin() { val := s.network.Validators[0] clientCtx := val.ClientCtx @@ -413,7 +413,7 @@ func (s *IntegrationTestSuite) TestQueryGroupAccountsByAdmin() { expectErr bool expectErrMsg string expectedCode uint32 - expectGroupAccounts []*group.GroupAccountInfo + expectGroupPolicies []*group.GroupPolicyInfo }{ { "invalid admin address", @@ -421,28 +421,28 @@ func (s *IntegrationTestSuite) TestQueryGroupAccountsByAdmin() { true, "decoding bech32 failed: invalid bech32 string", 0, - []*group.GroupAccountInfo{}, + []*group.GroupPolicyInfo{}, }, { - "no group account", + "no group policy", []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, false, "", 0, - []*group.GroupAccountInfo{}, + []*group.GroupPolicyInfo{}, }, { - "found group accounts", + "found group policies", []string{val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, false, "", 0, - []*group.GroupAccountInfo{ - s.groupAccounts[0], - s.groupAccounts[1], - s.groupAccounts[2], - s.groupAccounts[3], - s.groupAccounts[4], + []*group.GroupPolicyInfo{ + s.groupPolicies[0], + s.groupPolicies[1], + s.groupPolicies[2], + s.groupPolicies[3], + s.groupPolicies[4], }, }, } @@ -451,7 +451,7 @@ func (s *IntegrationTestSuite) TestQueryGroupAccountsByAdmin() { tc := tc s.Run(tc.name, func() { - cmd := client.QueryGroupAccountsByAdminCmd() + cmd := client.QueryGroupPoliciesByAdminCmd() out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) if tc.expectErr { @@ -459,15 +459,15 @@ func (s *IntegrationTestSuite) TestQueryGroupAccountsByAdmin() { } else { s.Require().NoError(err, out.String()) - var res group.QueryGroupAccountsByAdminResponse + var res group.QueryGroupPoliciesByAdminResponse s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().Equal(len(res.GroupAccounts), len(tc.expectGroupAccounts)) - for i := range res.GroupAccounts { - s.Require().Equal(res.GroupAccounts[i].GroupId, tc.expectGroupAccounts[i].GroupId) - s.Require().Equal(res.GroupAccounts[i].Metadata, tc.expectGroupAccounts[i].Metadata) - s.Require().Equal(res.GroupAccounts[i].Version, tc.expectGroupAccounts[i].Version) - s.Require().Equal(res.GroupAccounts[i].Admin, tc.expectGroupAccounts[i].Admin) - s.Require().Equal(res.GroupAccounts[i].GetDecisionPolicy(), tc.expectGroupAccounts[i].GetDecisionPolicy()) + s.Require().Equal(len(res.GroupPolicies), len(tc.expectGroupPolicies)) + for i := range res.GroupPolicies { + s.Require().Equal(res.GroupPolicies[i].GroupId, tc.expectGroupPolicies[i].GroupId) + s.Require().Equal(res.GroupPolicies[i].Metadata, tc.expectGroupPolicies[i].Metadata) + s.Require().Equal(res.GroupPolicies[i].Version, tc.expectGroupPolicies[i].Version) + s.Require().Equal(res.GroupPolicies[i].Admin, tc.expectGroupPolicies[i].Admin) + s.Require().Equal(res.GroupPolicies[i].GetDecisionPolicy(), tc.expectGroupPolicies[i].GetDecisionPolicy()) } } }) @@ -517,7 +517,7 @@ func (s *IntegrationTestSuite) TestQueryProposal() { } } -func (s *IntegrationTestSuite) TestQueryProposalsByGroupAccount() { +func (s *IntegrationTestSuite) TestQueryProposalsByGroupPolicy() { val := s.network.Validators[0] clientCtx := val.ClientCtx @@ -530,7 +530,7 @@ func (s *IntegrationTestSuite) TestQueryProposalsByGroupAccount() { expectProposals []*group.Proposal }{ { - "invalid group account address", + "invalid group policy address", []string{"invalid"}, true, "decoding bech32 failed: invalid bech32 string", @@ -538,7 +538,7 @@ func (s *IntegrationTestSuite) TestQueryProposalsByGroupAccount() { []*group.Proposal{}, }, { - "no group account", + "no group policy", []string{s.network.Validators[1].Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, false, "", @@ -547,7 +547,7 @@ func (s *IntegrationTestSuite) TestQueryProposalsByGroupAccount() { }, { "found proposals", - []string{s.groupAccounts[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, false, "", 0, @@ -561,7 +561,7 @@ func (s *IntegrationTestSuite) TestQueryProposalsByGroupAccount() { tc := tc s.Run(tc.name, func() { - cmd := client.QueryProposalsByGroupAccountCmd() + cmd := client.QueryProposalsByGroupPolicyCmd() out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) if tc.expectErr { @@ -569,7 +569,7 @@ func (s *IntegrationTestSuite) TestQueryProposalsByGroupAccount() { } else { s.Require().NoError(err, out.String()) - var res group.QueryProposalsByGroupAccountResponse + var res group.QueryProposalsByGroupPolicyResponse s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) s.Require().Equal(len(res.Proposals), len(tc.expectProposals)) for i := range res.Proposals { @@ -708,7 +708,7 @@ func (s *IntegrationTestSuite) TestQueryVotesByVoter() { }, { "no votes", - []string{s.groupAccounts[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + []string{s.groupPolicies[0].Address, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, true, "", 0, diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index efe75e1e2..3185786ea 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -28,7 +28,7 @@ type IntegrationTestSuite struct { network *network.Network group *group.GroupInfo - groupAccounts []*group.GroupAccountInfo + groupPolicies []*group.GroupPolicyInfo proposal *group.Proposal vote *group.Vote } @@ -100,13 +100,13 @@ func (s *IntegrationTestSuite) SetupSuite() { s.group = &group.GroupInfo{GroupId: 1, Admin: val.Address.String(), Metadata: []byte{1}, TotalWeight: "3", Version: 1} - // create 5 group accounts + // create 5 group policies for i := 0; i < 5; i++ { threshold := i + 1 if threshold > 3 { threshold = 3 } - out, err = cli.ExecTestCLICmd(val.ClientCtx, client.MsgCreateGroupAccountCmd(), + out, err = cli.ExecTestCLICmd(val.ClientCtx, client.MsgCreateGroupPolicyCmd(), append( []string{ val.Address.String(), @@ -121,21 +121,21 @@ func (s *IntegrationTestSuite) SetupSuite() { s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txResp), out.String()) s.Require().Equal(uint32(0), txResp.Code, out.String()) - out, err = cli.ExecTestCLICmd(val.ClientCtx, client.QueryGroupAccountsByGroupCmd(), []string{"1", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) + out, err = cli.ExecTestCLICmd(val.ClientCtx, client.QueryGroupPoliciesByGroupCmd(), []string{"1", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) s.Require().NoError(err, out.String()) } - var res group.QueryGroupAccountsByGroupResponse + var res group.QueryGroupPoliciesByGroupResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) - s.Require().Equal(len(res.GroupAccounts), 5) - s.groupAccounts = res.GroupAccounts + s.Require().Equal(len(res.GroupPolicies), 5) + s.groupPolicies = res.GroupPolicies // create a proposal - validTxFileName := getTxSendFileName(s, s.groupAccounts[0].Address, val.Address.String()) + validTxFileName := getTxSendFileName(s, s.groupPolicies[0].Address, val.Address.String()) out, err = cli.ExecTestCLICmd(val.ClientCtx, client.MsgCreateProposalCmd(), append( []string{ - s.groupAccounts[0].Address, + s.groupPolicies[0].Address, val.Address.String(), validTxFileName, "", @@ -565,7 +565,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMembers() { "address": "%s", "weight": "1", "metadata": "%s" - }]}`, val.Address.String(), validMetadata, s.groupAccounts[0].Address, validMetadata)).Name() + }]}`, val.Address.String(), validMetadata, s.groupPolicies[0].Address, validMetadata)).Name() invalidMembersMetadata := fmt.Sprintf(`{"members": [{ "address": "%s", @@ -607,7 +607,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMembers() { "address": "%s", "weight": "2", "metadata": "%s" - }]}`, s.groupAccounts[0].Address, validMetadata)).Name(), + }]}`, s.groupPolicies[0].Address, validMetadata)).Name(), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, commonFlags..., @@ -669,7 +669,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupMembers() { } } -func (s *IntegrationTestSuite) TestTxCreateGroupAccount() { +func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val := s.network.Validators[0] wrongAdmin := s.network.Validators[1].Address clientCtx := val.ClientCtx @@ -751,7 +751,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupAccount() { commonFlags..., ), true, - "group account metadata: limit exceeded", + "group policy metadata: limit exceeded", &sdk.TxResponse{}, 0, }, @@ -777,7 +777,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupAccount() { tc := tc s.Run(tc.name, func() { - cmd := client.MsgCreateGroupAccountCmd() + cmd := client.MsgCreateGroupPolicyCmd() out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) if tc.expectErr { @@ -793,11 +793,11 @@ func (s *IntegrationTestSuite) TestTxCreateGroupAccount() { } } -func (s *IntegrationTestSuite) TestTxUpdateGroupAccountAdmin() { +func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyAdmin() { val := s.network.Validators[0] newAdmin := s.network.Validators[1].Address clientCtx := val.ClientCtx - groupAccount := s.groupAccounts[3] + groupPolicy := s.groupPolicies[3] var commonFlags = []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), @@ -817,8 +817,8 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountAdmin() { "correct data", append( []string{ - groupAccount.Admin, - groupAccount.Address, + groupPolicy.Admin, + groupPolicy.Address, newAdmin.String(), }, commonFlags..., @@ -832,8 +832,8 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountAdmin() { "with amino-json", append( []string{ - groupAccount.Admin, - s.groupAccounts[4].Address, + groupPolicy.Admin, + s.groupPolicies[4].Address, newAdmin.String(), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, @@ -849,7 +849,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountAdmin() { append( []string{ newAdmin.String(), - groupAccount.Address, + groupPolicy.Address, newAdmin.String(), }, commonFlags..., @@ -860,17 +860,17 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountAdmin() { 0, }, { - "wrong group account", + "wrong group policy", append( []string{ - groupAccount.Admin, + groupPolicy.Admin, newAdmin.String(), newAdmin.String(), }, commonFlags..., ), true, - "load group account: not found", + "load group policy: not found", &sdk.TxResponse{}, 0, }, @@ -880,7 +880,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountAdmin() { tc := tc s.Run(tc.name, func() { - cmd := client.MsgUpdateGroupAccountAdminCmd() + cmd := client.MsgUpdateGroupPolicyAdminCmd() out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) if tc.expectErr { @@ -896,11 +896,11 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountAdmin() { } } -func (s *IntegrationTestSuite) TestTxUpdateGroupAccountDecisionPolicy() { +func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { val := s.network.Validators[0] newAdmin := s.network.Validators[1].Address clientCtx := val.ClientCtx - groupAccount := s.groupAccounts[2] + groupPolicy := s.groupPolicies[2] var commonFlags = []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), @@ -920,8 +920,8 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountDecisionPolicy() { "correct data", append( []string{ - groupAccount.Admin, - groupAccount.Address, + groupPolicy.Admin, + groupPolicy.Address, "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"timeout\":\"40000s\"}", }, commonFlags..., @@ -935,8 +935,8 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountDecisionPolicy() { "with amino-json", append( []string{ - groupAccount.Admin, - groupAccount.Address, + groupPolicy.Admin, + groupPolicy.Address, "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"timeout\":\"50000s\"}", fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, @@ -952,7 +952,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountDecisionPolicy() { append( []string{ newAdmin.String(), - groupAccount.Address, + groupPolicy.Address, "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"timeout\":\"1s\"}", }, commonFlags..., @@ -963,17 +963,17 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountDecisionPolicy() { 0, }, { - "wrong group account", + "wrong group policy", append( []string{ - groupAccount.Admin, + groupPolicy.Admin, newAdmin.String(), "{\"@type\":\"/cosmos.group.v1beta1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"timeout\":\"1s\"}", }, commonFlags..., ), true, - "load group account: not found", + "load group policy: not found", &sdk.TxResponse{}, 0, }, @@ -983,7 +983,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountDecisionPolicy() { tc := tc s.Run(tc.name, func() { - cmd := client.MsgUpdateGroupAccountDecisionPolicyCmd() + cmd := client.MsgUpdateGroupPolicyDecisionPolicyCmd() out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) if tc.expectErr { @@ -999,11 +999,11 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountDecisionPolicy() { } } -func (s *IntegrationTestSuite) TestTxUpdateGroupAccountMetadata() { +func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyMetadata() { val := s.network.Validators[0] newAdmin := s.network.Validators[1].Address clientCtx := val.ClientCtx - groupAccount := s.groupAccounts[2] + groupPolicy := s.groupPolicies[2] var commonFlags = []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), @@ -1023,8 +1023,8 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountMetadata() { "correct data", append( []string{ - groupAccount.Admin, - groupAccount.Address, + groupPolicy.Admin, + groupPolicy.Address, validMetadata, }, commonFlags..., @@ -1038,8 +1038,8 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountMetadata() { "with amino-json", append( []string{ - groupAccount.Admin, - groupAccount.Address, + groupPolicy.Admin, + groupPolicy.Address, validMetadata, fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, @@ -1054,14 +1054,14 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountMetadata() { "long metadata", append( []string{ - groupAccount.Admin, - groupAccount.Address, + groupPolicy.Admin, + groupPolicy.Address, strings.Repeat("a", 500), }, commonFlags..., ), true, - "group account metadata: limit exceeded", + "group policy metadata: limit exceeded", &sdk.TxResponse{}, 0, }, @@ -1070,7 +1070,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountMetadata() { append( []string{ newAdmin.String(), - groupAccount.Address, + groupPolicy.Address, validMetadata, }, commonFlags..., @@ -1081,17 +1081,17 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountMetadata() { 0, }, { - "wrong group account", + "wrong group policy", append( []string{ - groupAccount.Admin, + groupPolicy.Admin, newAdmin.String(), validMetadata, }, commonFlags..., ), true, - "load group account: not found", + "load group policy: not found", &sdk.TxResponse{}, 0, }, @@ -1101,7 +1101,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupAccountMetadata() { tc := tc s.Run(tc.name, func() { - cmd := client.MsgUpdateGroupAccountMetadataCmd() + cmd := client.MsgUpdateGroupPolicyMetadataCmd() out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) if tc.expectErr { @@ -1127,9 +1127,9 @@ func (s *IntegrationTestSuite) TestTxCreateProposal() { fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), } - validTxFileName := getTxSendFileName(s, s.groupAccounts[0].Address, val.Address.String()) - unauthzTxFileName := getTxSendFileName(s, val.Address.String(), s.groupAccounts[0].Address) - validTxFileName2 := getTxSendFileName(s, s.groupAccounts[3].Address, val.Address.String()) + validTxFileName := getTxSendFileName(s, s.groupPolicies[0].Address, val.Address.String()) + unauthzTxFileName := getTxSendFileName(s, val.Address.String(), s.groupPolicies[0].Address) + validTxFileName2 := getTxSendFileName(s, s.groupPolicies[3].Address, val.Address.String()) testCases := []struct { name string @@ -1143,7 +1143,7 @@ func (s *IntegrationTestSuite) TestTxCreateProposal() { "correct data", append( []string{ - s.groupAccounts[0].Address, + s.groupPolicies[0].Address, val.Address.String(), validTxFileName, "", @@ -1160,7 +1160,7 @@ func (s *IntegrationTestSuite) TestTxCreateProposal() { "with try exec", append( []string{ - s.groupAccounts[0].Address, + s.groupPolicies[0].Address, val.Address.String(), validTxFileName, "", @@ -1178,7 +1178,7 @@ func (s *IntegrationTestSuite) TestTxCreateProposal() { "with try exec, not enough yes votes for proposal to pass", append( []string{ - s.groupAccounts[3].Address, + s.groupPolicies[3].Address, val.Address.String(), validTxFileName2, "", @@ -1196,7 +1196,7 @@ func (s *IntegrationTestSuite) TestTxCreateProposal() { "with amino-json", append( []string{ - s.groupAccounts[0].Address, + s.groupPolicies[0].Address, val.Address.String(), validTxFileName, "", @@ -1214,7 +1214,7 @@ func (s *IntegrationTestSuite) TestTxCreateProposal() { "metadata too long", append( []string{ - s.groupAccounts[0].Address, + s.groupPolicies[0].Address, val.Address.String(), validTxFileName, "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ==", @@ -1231,7 +1231,7 @@ func (s *IntegrationTestSuite) TestTxCreateProposal() { "unauthorized msg", append( []string{ - s.groupAccounts[0].Address, + s.groupPolicies[0].Address, val.Address.String(), unauthzTxFileName, "", @@ -1240,7 +1240,7 @@ func (s *IntegrationTestSuite) TestTxCreateProposal() { commonFlags..., ), true, - "msg does not have group account authorization: unauthorized", + "msg does not have group policy authorization: unauthorized", nil, 0, }, @@ -1248,7 +1248,7 @@ func (s *IntegrationTestSuite) TestTxCreateProposal() { "invalid proposers", append( []string{ - s.groupAccounts[0].Address, + s.groupPolicies[0].Address, "invalid", validTxFileName, "", @@ -1262,7 +1262,7 @@ func (s *IntegrationTestSuite) TestTxCreateProposal() { 0, }, { - "invalid group account", + "invalid group policy", append( []string{ "invalid", @@ -1274,12 +1274,12 @@ func (s *IntegrationTestSuite) TestTxCreateProposal() { commonFlags..., ), true, - "group account: decoding bech32 failed", + "group policy: decoding bech32 failed", nil, 0, }, { - "no group account", + "no group policy", append( []string{ val.Address.String(), @@ -1291,7 +1291,7 @@ func (s *IntegrationTestSuite) TestTxCreateProposal() { commonFlags..., ), true, - "group account: not found", + "group policy: not found", nil, 0, }, @@ -1327,12 +1327,12 @@ func (s *IntegrationTestSuite) TestTxVote() { fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), } - validTxFileName := getTxSendFileName(s, s.groupAccounts[1].Address, val.Address.String()) + validTxFileName := getTxSendFileName(s, s.groupPolicies[1].Address, val.Address.String()) for i := 0; i < 2; i++ { out, err := cli.ExecTestCLICmd(val.ClientCtx, client.MsgCreateProposalCmd(), append( []string{ - s.groupAccounts[1].Address, + s.groupPolicies[1].Address, val.Address.String(), validTxFileName, "", @@ -1517,11 +1517,11 @@ func (s *IntegrationTestSuite) TestTxExec() { // create proposals and vote for i := 3; i <= 4; i++ { - validTxFileName := getTxSendFileName(s, s.groupAccounts[0].Address, val.Address.String()) + validTxFileName := getTxSendFileName(s, s.groupPolicies[0].Address, val.Address.String()) out, err := cli.ExecTestCLICmd(val.ClientCtx, client.MsgCreateProposalCmd(), append( []string{ - s.groupAccounts[0].Address, + s.groupPolicies[0].Address, val.Address.String(), validTxFileName, "", diff --git a/x/group/codec.go b/x/group/codec.go index bfc20f5b7..8a1d492d1 100644 --- a/x/group/codec.go +++ b/x/group/codec.go @@ -17,10 +17,10 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgUpdateGroupMembers{}, "cosmos-sdk/MsgUpdateGroupMembers", nil) cdc.RegisterConcrete(&MsgUpdateGroupAdmin{}, "cosmos-sdk/MsgUpdateGroupAdmin", nil) cdc.RegisterConcrete(&MsgUpdateGroupMetadata{}, "cosmos-sdk/MsgUpdateGroupMetadata", nil) - cdc.RegisterConcrete(&MsgCreateGroupAccount{}, "cosmos-sdk/MsgCreateGroupAccount", nil) - cdc.RegisterConcrete(&MsgUpdateGroupAccountAdmin{}, "cosmos-sdk/MsgUpdateGroupAccountAdmin", nil) - cdc.RegisterConcrete(&MsgUpdateGroupAccountDecisionPolicy{}, "cosmos-sdk/MsgUpdateGroupAccountDecisionPolicy", nil) - cdc.RegisterConcrete(&MsgUpdateGroupAccountMetadata{}, "cosmos-sdk/MsgUpdateGroupAccountMetadata", nil) + cdc.RegisterConcrete(&MsgCreateGroupPolicy{}, "cosmos-sdk/MsgCreateGroupPolicy", nil) + cdc.RegisterConcrete(&MsgUpdateGroupPolicyAdmin{}, "cosmos-sdk/MsgUpdateGroupPolicyAdmin", nil) + cdc.RegisterConcrete(&MsgUpdateGroupPolicyDecisionPolicy{}, "cosmos-sdk/MsgUpdateGroupPolicyDecisionPolicy", nil) + cdc.RegisterConcrete(&MsgUpdateGroupPolicyMetadata{}, "cosmos-sdk/MsgUpdateGroupPolicyMetadata", nil) cdc.RegisterConcrete(&MsgCreateProposal{}, "cosmos-sdk/group/MsgCreateProposal", nil) cdc.RegisterConcrete(&MsgVote{}, "cosmos-sdk/group/MsgVote", nil) cdc.RegisterConcrete(&MsgExec{}, "cosmos-sdk/group/MsgExec", nil) @@ -32,10 +32,10 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgUpdateGroupMembers{}, &MsgUpdateGroupAdmin{}, &MsgUpdateGroupMetadata{}, - &MsgCreateGroupAccount{}, - &MsgUpdateGroupAccountAdmin{}, - &MsgUpdateGroupAccountDecisionPolicy{}, - &MsgUpdateGroupAccountMetadata{}, + &MsgCreateGroupPolicy{}, + &MsgUpdateGroupPolicyAdmin{}, + &MsgUpdateGroupPolicyDecisionPolicy{}, + &MsgUpdateGroupPolicyMetadata{}, &MsgCreateProposal{}, &MsgVote{}, &MsgExec{}, diff --git a/x/group/events.pb.go b/x/group/events.pb.go index 57a00ee65..c298b3ddc 100644 --- a/x/group/events.pb.go +++ b/x/group/events.pb.go @@ -115,24 +115,24 @@ func (m *EventUpdateGroup) GetGroupId() uint64 { return 0 } -// EventCreateGroupAccount is an event emitted when a group account is created. -type EventCreateGroupAccount struct { - // address is the address of the group account. +// EventCreateGroupPolicy is an event emitted when a group policy is created. +type EventCreateGroupPolicy struct { + // address is the account address of the group policy. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } -func (m *EventCreateGroupAccount) Reset() { *m = EventCreateGroupAccount{} } -func (m *EventCreateGroupAccount) String() string { return proto.CompactTextString(m) } -func (*EventCreateGroupAccount) ProtoMessage() {} -func (*EventCreateGroupAccount) Descriptor() ([]byte, []int) { +func (m *EventCreateGroupPolicy) Reset() { *m = EventCreateGroupPolicy{} } +func (m *EventCreateGroupPolicy) String() string { return proto.CompactTextString(m) } +func (*EventCreateGroupPolicy) ProtoMessage() {} +func (*EventCreateGroupPolicy) Descriptor() ([]byte, []int) { return fileDescriptor_7879e051fb126fc0, []int{2} } -func (m *EventCreateGroupAccount) XXX_Unmarshal(b []byte) error { +func (m *EventCreateGroupPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EventCreateGroupAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *EventCreateGroupPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EventCreateGroupAccount.Marshal(b, m, deterministic) + return xxx_messageInfo_EventCreateGroupPolicy.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -142,43 +142,43 @@ func (m *EventCreateGroupAccount) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *EventCreateGroupAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventCreateGroupAccount.Merge(m, src) +func (m *EventCreateGroupPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventCreateGroupPolicy.Merge(m, src) } -func (m *EventCreateGroupAccount) XXX_Size() int { +func (m *EventCreateGroupPolicy) XXX_Size() int { return m.Size() } -func (m *EventCreateGroupAccount) XXX_DiscardUnknown() { - xxx_messageInfo_EventCreateGroupAccount.DiscardUnknown(m) +func (m *EventCreateGroupPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_EventCreateGroupPolicy.DiscardUnknown(m) } -var xxx_messageInfo_EventCreateGroupAccount proto.InternalMessageInfo +var xxx_messageInfo_EventCreateGroupPolicy proto.InternalMessageInfo -func (m *EventCreateGroupAccount) GetAddress() string { +func (m *EventCreateGroupPolicy) GetAddress() string { if m != nil { return m.Address } return "" } -// EventUpdateGroupAccount is an event emitted when a group account is updated. -type EventUpdateGroupAccount struct { - // address is the address of the group account. +// EventUpdateGroupPolicy is an event emitted when a group policy is updated. +type EventUpdateGroupPolicy struct { + // address is the account address of the group policy. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } -func (m *EventUpdateGroupAccount) Reset() { *m = EventUpdateGroupAccount{} } -func (m *EventUpdateGroupAccount) String() string { return proto.CompactTextString(m) } -func (*EventUpdateGroupAccount) ProtoMessage() {} -func (*EventUpdateGroupAccount) Descriptor() ([]byte, []int) { +func (m *EventUpdateGroupPolicy) Reset() { *m = EventUpdateGroupPolicy{} } +func (m *EventUpdateGroupPolicy) String() string { return proto.CompactTextString(m) } +func (*EventUpdateGroupPolicy) ProtoMessage() {} +func (*EventUpdateGroupPolicy) Descriptor() ([]byte, []int) { return fileDescriptor_7879e051fb126fc0, []int{3} } -func (m *EventUpdateGroupAccount) XXX_Unmarshal(b []byte) error { +func (m *EventUpdateGroupPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EventUpdateGroupAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *EventUpdateGroupPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EventUpdateGroupAccount.Marshal(b, m, deterministic) + return xxx_messageInfo_EventUpdateGroupPolicy.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -188,19 +188,19 @@ func (m *EventUpdateGroupAccount) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *EventUpdateGroupAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventUpdateGroupAccount.Merge(m, src) +func (m *EventUpdateGroupPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUpdateGroupPolicy.Merge(m, src) } -func (m *EventUpdateGroupAccount) XXX_Size() int { +func (m *EventUpdateGroupPolicy) XXX_Size() int { return m.Size() } -func (m *EventUpdateGroupAccount) XXX_DiscardUnknown() { - xxx_messageInfo_EventUpdateGroupAccount.DiscardUnknown(m) +func (m *EventUpdateGroupPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_EventUpdateGroupPolicy.DiscardUnknown(m) } -var xxx_messageInfo_EventUpdateGroupAccount proto.InternalMessageInfo +var xxx_messageInfo_EventUpdateGroupPolicy proto.InternalMessageInfo -func (m *EventUpdateGroupAccount) GetAddress() string { +func (m *EventUpdateGroupPolicy) GetAddress() string { if m != nil { return m.Address } @@ -348,8 +348,8 @@ func (m *EventExec) GetProposalId() uint64 { func init() { proto.RegisterType((*EventCreateGroup)(nil), "cosmos.group.v1beta1.EventCreateGroup") proto.RegisterType((*EventUpdateGroup)(nil), "cosmos.group.v1beta1.EventUpdateGroup") - proto.RegisterType((*EventCreateGroupAccount)(nil), "cosmos.group.v1beta1.EventCreateGroupAccount") - proto.RegisterType((*EventUpdateGroupAccount)(nil), "cosmos.group.v1beta1.EventUpdateGroupAccount") + proto.RegisterType((*EventCreateGroupPolicy)(nil), "cosmos.group.v1beta1.EventCreateGroupPolicy") + proto.RegisterType((*EventUpdateGroupPolicy)(nil), "cosmos.group.v1beta1.EventUpdateGroupPolicy") proto.RegisterType((*EventCreateProposal)(nil), "cosmos.group.v1beta1.EventCreateProposal") proto.RegisterType((*EventVote)(nil), "cosmos.group.v1beta1.EventVote") proto.RegisterType((*EventExec)(nil), "cosmos.group.v1beta1.EventExec") @@ -358,7 +358,7 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/events.proto", fileDescriptor_7879e051fb126fc0) } var fileDescriptor_7879e051fb126fc0 = []byte{ - // 281 bytes of a gzipped FileDescriptorProto + // 280 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x81, @@ -366,17 +366,17 @@ var fileDescriptor_7879e051fb126fc0 = []byte{ 0x95, 0x80, 0x39, 0x4a, 0xba, 0x5c, 0x02, 0xae, 0x20, 0x03, 0x9c, 0x8b, 0x52, 0x13, 0x4b, 0x52, 0xdd, 0x41, 0xda, 0x84, 0x24, 0xb9, 0x38, 0xc0, 0xfa, 0xe3, 0x33, 0x53, 0x24, 0x18, 0x15, 0x18, 0x35, 0x58, 0x82, 0xd8, 0xc1, 0x7c, 0xcf, 0x14, 0xb8, 0xf2, 0xd0, 0x82, 0x14, 0x62, 0x94, 0xfb, - 0x72, 0x89, 0xa3, 0x9b, 0xee, 0x98, 0x9c, 0x9c, 0x5f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xc3, 0xe9, 0x24, 0x71, 0x69, 0x8b, 0x2e, 0xcc, 0xf5, + 0x8e, 0x10, 0x99, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x98, 0x42, 0xb8, 0x69, 0x48, 0x96, + 0x53, 0x60, 0x9a, 0x19, 0x97, 0x30, 0x92, 0xdb, 0x02, 0x8a, 0xf2, 0x0b, 0xf2, 0x8b, 0x13, 0x73, + 0x84, 0xe4, 0xb9, 0xb8, 0x0b, 0xa0, 0x6c, 0x84, 0x87, 0xb8, 0x60, 0x42, 0x9e, 0x29, 0x4a, 0x3a, + 0x5c, 0x9c, 0x60, 0x7d, 0x61, 0xf9, 0x25, 0xa9, 0xc4, 0xab, 0x76, 0xad, 0x48, 0x4d, 0x26, 0xa8, + 0xda, 0xc9, 0xee, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, + 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x54, 0xd2, 0x33, + 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xa1, 0x11, 0x08, 0xa5, 0x74, 0x8b, 0x53, 0xb2, + 0xf5, 0x2b, 0x20, 0x69, 0x22, 0x89, 0x0d, 0x1c, 0xa9, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x78, 0x22, 0x27, 0x30, 0x2a, 0x02, 0x00, 0x00, } func (m *EventCreateGroup) Marshal() (dAtA []byte, err error) { @@ -435,7 +435,7 @@ func (m *EventUpdateGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *EventCreateGroupAccount) Marshal() (dAtA []byte, err error) { +func (m *EventCreateGroupPolicy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -445,12 +445,12 @@ func (m *EventCreateGroupAccount) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventCreateGroupAccount) MarshalTo(dAtA []byte) (int, error) { +func (m *EventCreateGroupPolicy) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *EventCreateGroupAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *EventCreateGroupPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -465,7 +465,7 @@ func (m *EventCreateGroupAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *EventUpdateGroupAccount) Marshal() (dAtA []byte, err error) { +func (m *EventUpdateGroupPolicy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -475,12 +475,12 @@ func (m *EventUpdateGroupAccount) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventUpdateGroupAccount) MarshalTo(dAtA []byte) (int, error) { +func (m *EventUpdateGroupPolicy) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *EventUpdateGroupAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *EventUpdateGroupPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -614,7 +614,7 @@ func (m *EventUpdateGroup) Size() (n int) { return n } -func (m *EventCreateGroupAccount) Size() (n int) { +func (m *EventCreateGroupPolicy) Size() (n int) { if m == nil { return 0 } @@ -627,7 +627,7 @@ func (m *EventCreateGroupAccount) Size() (n int) { return n } -func (m *EventUpdateGroupAccount) Size() (n int) { +func (m *EventUpdateGroupPolicy) Size() (n int) { if m == nil { return 0 } @@ -820,7 +820,7 @@ func (m *EventUpdateGroup) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventCreateGroupAccount) Unmarshal(dAtA []byte) error { +func (m *EventCreateGroupPolicy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -843,10 +843,10 @@ func (m *EventCreateGroupAccount) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventCreateGroupAccount: wiretype end group for non-group") + return fmt.Errorf("proto: EventCreateGroupPolicy: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventCreateGroupAccount: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventCreateGroupPolicy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -902,7 +902,7 @@ func (m *EventCreateGroupAccount) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventUpdateGroupAccount) Unmarshal(dAtA []byte) error { +func (m *EventUpdateGroupPolicy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -925,10 +925,10 @@ func (m *EventUpdateGroupAccount) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventUpdateGroupAccount: wiretype end group for non-group") + return fmt.Errorf("proto: EventUpdateGroupPolicy: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventUpdateGroupAccount: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventUpdateGroupPolicy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/group/keeper/grpc_query.go b/x/group/keeper/grpc_query.go index f3228811b..062dd1bff 100644 --- a/x/group/keeper/grpc_query.go +++ b/x/group/keeper/grpc_query.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -31,19 +32,19 @@ func (q Keeper) getGroupInfo(ctx sdk.Context, id uint64) (group.GroupInfo, error return obj, err } -func (q Keeper) GroupAccountInfo(goCtx context.Context, request *group.QueryGroupAccountInfoRequest) (*group.QueryGroupAccountInfoResponse, error) { +func (q Keeper) GroupPolicyInfo(goCtx context.Context, request *group.QueryGroupPolicyInfoRequest) (*group.QueryGroupPolicyInfoResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - groupAccountInfo, err := q.getGroupAccountInfo(ctx, request.Address) + groupPolicyInfo, err := q.getGroupPolicyInfo(ctx, request.Address) if err != nil { return nil, err } - return &group.QueryGroupAccountInfoResponse{Info: &groupAccountInfo}, nil + return &group.QueryGroupPolicyInfoResponse{Info: &groupPolicyInfo}, nil } -func (q Keeper) getGroupAccountInfo(ctx sdk.Context, accountAddress string) (group.GroupAccountInfo, error) { - var obj group.GroupAccountInfo - return obj, q.groupAccountTable.GetOne(ctx.KVStore(q.key), orm.PrimaryKey(&group.GroupAccountInfo{Address: accountAddress}), &obj) +func (q Keeper) getGroupPolicyInfo(ctx sdk.Context, accountAddress string) (group.GroupPolicyInfo, error) { + var obj group.GroupPolicyInfo + return obj, q.groupPolicyTable.GetOne(ctx.KVStore(q.key), orm.PrimaryKey(&group.GroupPolicyInfo{Address: accountAddress}), &obj) } func (q Keeper) GroupMembers(goCtx context.Context, request *group.QueryGroupMembersRequest) (*group.QueryGroupMembersResponse, error) { @@ -97,55 +98,55 @@ func (q Keeper) getGroupsByAdmin(ctx sdk.Context, admin sdk.AccAddress, pageRequ return q.groupByAdminIndex.GetPaginated(ctx.KVStore(q.key), admin.Bytes(), pageRequest) } -func (q Keeper) GroupAccountsByGroup(goCtx context.Context, request *group.QueryGroupAccountsByGroupRequest) (*group.QueryGroupAccountsByGroupResponse, error) { +func (q Keeper) GroupPoliciesByGroup(goCtx context.Context, request *group.QueryGroupPoliciesByGroupRequest) (*group.QueryGroupPoliciesByGroupResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) groupID := request.GroupId - it, err := q.getGroupAccountsByGroup(ctx, groupID, request.Pagination) + it, err := q.getGroupPoliciesByGroup(ctx, groupID, request.Pagination) if err != nil { return nil, err } - var accounts []*group.GroupAccountInfo + var accounts []*group.GroupPolicyInfo pageRes, err := orm.Paginate(it, request.Pagination, &accounts) if err != nil { return nil, err } - return &group.QueryGroupAccountsByGroupResponse{ - GroupAccounts: accounts, + return &group.QueryGroupPoliciesByGroupResponse{ + GroupPolicies: accounts, Pagination: pageRes, }, nil } -func (q Keeper) getGroupAccountsByGroup(ctx sdk.Context, id uint64, pageRequest *query.PageRequest) (orm.Iterator, error) { - return q.groupAccountByGroupIndex.GetPaginated(ctx.KVStore(q.key), id, pageRequest) +func (q Keeper) getGroupPoliciesByGroup(ctx sdk.Context, id uint64, pageRequest *query.PageRequest) (orm.Iterator, error) { + return q.groupPolicyByGroupIndex.GetPaginated(ctx.KVStore(q.key), id, pageRequest) } -func (q Keeper) GroupAccountsByAdmin(goCtx context.Context, request *group.QueryGroupAccountsByAdminRequest) (*group.QueryGroupAccountsByAdminResponse, error) { +func (q Keeper) GroupPoliciesByAdmin(goCtx context.Context, request *group.QueryGroupPoliciesByAdminRequest) (*group.QueryGroupPoliciesByAdminResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) addr, err := sdk.AccAddressFromBech32(request.Admin) if err != nil { return nil, err } - it, err := q.getGroupAccountsByAdmin(ctx, addr, request.Pagination) + it, err := q.getGroupPoliciesByAdmin(ctx, addr, request.Pagination) if err != nil { return nil, err } - var accounts []*group.GroupAccountInfo + var accounts []*group.GroupPolicyInfo pageRes, err := orm.Paginate(it, request.Pagination, &accounts) if err != nil { return nil, err } - return &group.QueryGroupAccountsByAdminResponse{ - GroupAccounts: accounts, + return &group.QueryGroupPoliciesByAdminResponse{ + GroupPolicies: accounts, Pagination: pageRes, }, nil } -func (q Keeper) getGroupAccountsByAdmin(ctx sdk.Context, admin sdk.AccAddress, pageRequest *query.PageRequest) (orm.Iterator, error) { - return q.groupAccountByAdminIndex.GetPaginated(ctx.KVStore(q.key), admin.Bytes(), pageRequest) +func (q Keeper) getGroupPoliciesByAdmin(ctx sdk.Context, admin sdk.AccAddress, pageRequest *query.PageRequest) (orm.Iterator, error) { + return q.groupPolicyByAdminIndex.GetPaginated(ctx.KVStore(q.key), admin.Bytes(), pageRequest) } func (q Keeper) Proposal(goCtx context.Context, request *group.QueryProposalRequest) (*group.QueryProposalResponse, error) { @@ -159,13 +160,13 @@ func (q Keeper) Proposal(goCtx context.Context, request *group.QueryProposalRequ return &group.QueryProposalResponse{Proposal: &proposal}, nil } -func (q Keeper) ProposalsByGroupAccount(goCtx context.Context, request *group.QueryProposalsByGroupAccountRequest) (*group.QueryProposalsByGroupAccountResponse, error) { +func (q Keeper) ProposalsByGroupPolicy(goCtx context.Context, request *group.QueryProposalsByGroupPolicyRequest) (*group.QueryProposalsByGroupPolicyResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) addr, err := sdk.AccAddressFromBech32(request.Address) if err != nil { return nil, err } - it, err := q.getProposalsByGroupAccount(ctx, addr, request.Pagination) + it, err := q.getProposalsByGroupPolicy(ctx, addr, request.Pagination) if err != nil { return nil, err } @@ -176,14 +177,14 @@ func (q Keeper) ProposalsByGroupAccount(goCtx context.Context, request *group.Qu return nil, err } - return &group.QueryProposalsByGroupAccountResponse{ + return &group.QueryProposalsByGroupPolicyResponse{ Proposals: proposals, Pagination: pageRes, }, nil } -func (q Keeper) getProposalsByGroupAccount(ctx sdk.Context, account sdk.AccAddress, pageRequest *query.PageRequest) (orm.Iterator, error) { - return q.proposalByGroupAccountIndex.GetPaginated(ctx.KVStore(q.key), account.Bytes(), pageRequest) +func (q Keeper) getProposalsByGroupPolicy(ctx sdk.Context, account sdk.AccAddress, pageRequest *query.PageRequest) (orm.Iterator, error) { + return q.proposalByGroupPolicyIndex.GetPaginated(ctx.KVStore(q.key), account.Bytes(), pageRequest) } func (q Keeper) getProposal(ctx sdk.Context, proposalID uint64) (group.Proposal, error) { diff --git a/x/group/keeper/grpc_query_test.go b/x/group/keeper/grpc_query_test.go index 053d960b6..2b2b46583 100644 --- a/x/group/keeper/grpc_query_test.go +++ b/x/group/keeper/grpc_query_test.go @@ -22,7 +22,7 @@ func TestQueryGroupsByMember(t *testing.T) { addrs := simapp.AddTestAddrsIncremental(app, ctx, 6, sdk.NewInt(30000000)) - // Initial group, group account and balance setup + // Initial group, group policy and balance setup members := []group.Member{ {Address: addrs[2].String(), Weight: "1"}, {Address: addrs[3].String(), Weight: "2"}, } @@ -31,7 +31,7 @@ func TestQueryGroupsByMember(t *testing.T) { Members: members, Metadata: nil, }) - require.NoError(t,err) + require.NoError(t, err) members = []group.Member{ {Address: addrs[3].String(), Weight: "1"}, {Address: addrs[4].String(), Weight: "2"}, @@ -41,26 +41,26 @@ func TestQueryGroupsByMember(t *testing.T) { Members: members, Metadata: nil, }) - require.NoError(t,err) + require.NoError(t, err) // not part of any group resp, err := queryClient.GroupsByMember(context.Background(), &group.QueryGroupsByMemberRequest{ Address: addrs[5].String(), }) - require.NoError(t,err) - require.Len(t, resp.Groups,0) + require.NoError(t, err) + require.Len(t, resp.Groups, 0) // expect one group resp, err = queryClient.GroupsByMember(context.Background(), &group.QueryGroupsByMemberRequest{ Address: addrs[4].String(), }) - require.NoError(t,err) - require.Len(t, resp.Groups,1) + require.NoError(t, err) + require.Len(t, resp.Groups, 1) // expect two groups resp, err = queryClient.GroupsByMember(context.Background(), &group.QueryGroupsByMemberRequest{ Address: addrs[3].String(), }) - require.NoError(t,err) - require.Len(t, resp.Groups,2) + require.NoError(t, err) + require.Len(t, resp.Groups, 2) } diff --git a/x/group/keeper/invariants.go b/x/group/keeper/invariants.go index 376b91603..9510e891e 100644 --- a/x/group/keeper/invariants.go +++ b/x/group/keeper/invariants.go @@ -49,7 +49,7 @@ func GroupTotalWeightInvariant(keeper Keeper) sdk.Invariant { // TallyVotesSumInvariant checks that proposal VoteState must correspond to the vote choice. func TallyVotesSumInvariant(keeper Keeper) sdk.Invariant { return func(ctx sdk.Context) (string, bool) { - msg, broken := TallyVotesSumInvariantHelper(ctx, keeper.key, keeper.groupTable, keeper.proposalTable, keeper.groupMemberTable, keeper.voteByProposalIndex, keeper.groupAccountTable) + msg, broken := TallyVotesSumInvariantHelper(ctx, keeper.key, keeper.groupTable, keeper.proposalTable, keeper.groupMemberTable, keeper.voteByProposalIndex, keeper.groupPolicyTable) return sdk.FormatInvariant(group.ModuleName, votesSumInvariant, msg), broken } } @@ -200,13 +200,13 @@ func GroupTotalWeightInvariantHelper(ctx sdk.Context, key storetypes.StoreKey, g return msg, broken } -func TallyVotesSumInvariantHelper(ctx sdk.Context, key storetypes.StoreKey, groupTable orm.AutoUInt64Table, proposalTable orm.AutoUInt64Table, groupMemberTable orm.PrimaryKeyTable, voteByProposalIndex orm.Index, groupAccountTable orm.PrimaryKeyTable) (string, bool) { +func TallyVotesSumInvariantHelper(ctx sdk.Context, key storetypes.StoreKey, groupTable orm.AutoUInt64Table, proposalTable orm.AutoUInt64Table, groupMemberTable orm.PrimaryKeyTable, voteByProposalIndex orm.Index, groupPolicyTable orm.PrimaryKeyTable) (string, bool) { var msg string var broken bool var groupInfo group.GroupInfo var proposal group.Proposal - var groupAcc group.GroupAccountInfo + var groupPolicy group.GroupPolicyInfo var groupMem group.GroupMember var vote group.Vote @@ -251,20 +251,20 @@ func TallyVotesSumInvariantHelper(ctx sdk.Context, key storetypes.StoreKey, grou break } - err = groupAccountTable.GetOne(ctx.KVStore(key), orm.PrimaryKey(&group.GroupAccountInfo{Address: proposal.Address}), &groupAcc) + err = groupPolicyTable.GetOne(ctx.KVStore(key), orm.PrimaryKey(&group.GroupPolicyInfo{Address: proposal.Address}), &groupPolicy) if err != nil { - msg += fmt.Sprintf("group account not found for address: %s\n%v\n", proposal.Address, err) + msg += fmt.Sprintf("group policy not found for address: %s\n%v\n", proposal.Address, err) return msg, broken } - if proposal.GroupAccountVersion != groupAcc.Version { - msg += fmt.Sprintf("group account with address %s was modified\n", groupAcc.Address) + if proposal.GroupPolicyVersion != groupPolicy.Version { + msg += fmt.Sprintf("group policy with address %s was modified\n", groupPolicy.Address) return msg, broken } - _, err = groupTable.GetOne(ctx.KVStore(key), groupAcc.GroupId, &groupInfo) + _, err = groupTable.GetOne(ctx.KVStore(key), groupPolicy.GroupId, &groupInfo) if err != nil { - msg += fmt.Sprintf("group info not found for group id %d\n%v\n", groupAcc.GroupId, err) + msg += fmt.Sprintf("group info not found for group id %d\n%v\n", groupPolicy.GroupId, err) return msg, broken } @@ -286,9 +286,9 @@ func TallyVotesSumInvariantHelper(ctx sdk.Context, key storetypes.StoreKey, grou break } - err = groupMemberTable.GetOne(ctx.KVStore(key), orm.PrimaryKey(&group.GroupMember{GroupId: groupAcc.GroupId, Member: &group.Member{Address: vote.Voter}}), &groupMem) + err = groupMemberTable.GetOne(ctx.KVStore(key), orm.PrimaryKey(&group.GroupMember{GroupId: groupPolicy.GroupId, Member: &group.Member{Address: vote.Voter}}), &groupMem) if err != nil { - msg += fmt.Sprintf("group member not found with group ID %d and group member %s\n%v\n", groupAcc.GroupId, vote.Voter, err) + msg += fmt.Sprintf("group member not found with group ID %d and group member %s\n%v\n", groupPolicy.GroupId, vote.Voter, err) return msg, broken } diff --git a/x/group/keeper/invariants_test.go b/x/group/keeper/invariants_test.go index 05f118e01..853862935 100644 --- a/x/group/keeper/invariants_test.go +++ b/x/group/keeper/invariants_test.go @@ -72,146 +72,146 @@ func (s *invariantTestSuite) TestTallyVotesInvariant() { }{ "invariant not broken": { prevProposal: &group.Proposal{ - ProposalId: 1, - Address: addr1.String(), - Proposers: []string{addr1.String()}, - SubmittedAt: prevCtx.BlockTime(), - GroupVersion: 1, - GroupAccountVersion: 1, - Status: group.ProposalStatusSubmitted, - Result: group.ProposalResultUnfinalized, - VoteState: group.Tally{YesCount: "1", NoCount: "0", AbstainCount: "0", VetoCount: "0"}, - Timeout: prevCtx.BlockTime().Add(time.Second * 600), - ExecutorResult: group.ProposalExecutorResultNotRun, + ProposalId: 1, + Address: addr1.String(), + Proposers: []string{addr1.String()}, + SubmittedAt: prevCtx.BlockTime(), + GroupVersion: 1, + GroupPolicyVersion: 1, + Status: group.ProposalStatusSubmitted, + Result: group.ProposalResultUnfinalized, + VoteState: group.Tally{YesCount: "1", NoCount: "0", AbstainCount: "0", VetoCount: "0"}, + Timeout: prevCtx.BlockTime().Add(time.Second * 600), + ExecutorResult: group.ProposalExecutorResultNotRun, }, curProposal: &group.Proposal{ - ProposalId: 1, - Address: addr2.String(), - Proposers: []string{addr2.String()}, - SubmittedAt: curCtx.BlockTime(), - GroupVersion: 1, - GroupAccountVersion: 1, - Status: group.ProposalStatusSubmitted, - Result: group.ProposalResultUnfinalized, - VoteState: group.Tally{YesCount: "2", NoCount: "0", AbstainCount: "0", VetoCount: "0"}, - Timeout: curCtx.BlockTime().Add(time.Second * 600), - ExecutorResult: group.ProposalExecutorResultNotRun, + ProposalId: 1, + Address: addr2.String(), + Proposers: []string{addr2.String()}, + SubmittedAt: curCtx.BlockTime(), + GroupVersion: 1, + GroupPolicyVersion: 1, + Status: group.ProposalStatusSubmitted, + Result: group.ProposalResultUnfinalized, + VoteState: group.Tally{YesCount: "2", NoCount: "0", AbstainCount: "0", VetoCount: "0"}, + Timeout: curCtx.BlockTime().Add(time.Second * 600), + ExecutorResult: group.ProposalExecutorResultNotRun, }, }, "current block yes vote count must be greater than previous block yes vote count": { prevProposal: &group.Proposal{ - ProposalId: 1, - Address: addr1.String(), - Proposers: []string{addr1.String()}, - SubmittedAt: prevCtx.BlockTime(), - GroupVersion: 1, - GroupAccountVersion: 1, - Status: group.ProposalStatusSubmitted, - Result: group.ProposalResultUnfinalized, - VoteState: group.Tally{YesCount: "2", NoCount: "0", AbstainCount: "0", VetoCount: "0"}, - Timeout: prevCtx.BlockTime().Add(time.Second * 600), - ExecutorResult: group.ProposalExecutorResultNotRun, + ProposalId: 1, + Address: addr1.String(), + Proposers: []string{addr1.String()}, + SubmittedAt: prevCtx.BlockTime(), + GroupVersion: 1, + GroupPolicyVersion: 1, + Status: group.ProposalStatusSubmitted, + Result: group.ProposalResultUnfinalized, + VoteState: group.Tally{YesCount: "2", NoCount: "0", AbstainCount: "0", VetoCount: "0"}, + Timeout: prevCtx.BlockTime().Add(time.Second * 600), + ExecutorResult: group.ProposalExecutorResultNotRun, }, curProposal: &group.Proposal{ - ProposalId: 1, - Address: addr2.String(), - Proposers: []string{addr2.String()}, - SubmittedAt: curCtx.BlockTime(), - GroupVersion: 1, - GroupAccountVersion: 1, - Status: group.ProposalStatusSubmitted, - Result: group.ProposalResultUnfinalized, - VoteState: group.Tally{YesCount: "1", NoCount: "0", AbstainCount: "0", VetoCount: "0"}, - Timeout: curCtx.BlockTime().Add(time.Second * 600), - ExecutorResult: group.ProposalExecutorResultNotRun, + ProposalId: 1, + Address: addr2.String(), + Proposers: []string{addr2.String()}, + SubmittedAt: curCtx.BlockTime(), + GroupVersion: 1, + GroupPolicyVersion: 1, + Status: group.ProposalStatusSubmitted, + Result: group.ProposalResultUnfinalized, + VoteState: group.Tally{YesCount: "1", NoCount: "0", AbstainCount: "0", VetoCount: "0"}, + Timeout: curCtx.BlockTime().Add(time.Second * 600), + ExecutorResult: group.ProposalExecutorResultNotRun, }, expBroken: true, }, "current block no vote count must be greater than previous block no vote count": { prevProposal: &group.Proposal{ - ProposalId: 1, - Address: addr1.String(), - Proposers: []string{addr1.String()}, - SubmittedAt: prevCtx.BlockTime(), - GroupVersion: 1, - GroupAccountVersion: 1, - Status: group.ProposalStatusSubmitted, - Result: group.ProposalResultUnfinalized, - VoteState: group.Tally{YesCount: "0", NoCount: "2", AbstainCount: "0", VetoCount: "0"}, - Timeout: prevCtx.BlockTime().Add(time.Second * 600), - ExecutorResult: group.ProposalExecutorResultNotRun, + ProposalId: 1, + Address: addr1.String(), + Proposers: []string{addr1.String()}, + SubmittedAt: prevCtx.BlockTime(), + GroupVersion: 1, + GroupPolicyVersion: 1, + Status: group.ProposalStatusSubmitted, + Result: group.ProposalResultUnfinalized, + VoteState: group.Tally{YesCount: "0", NoCount: "2", AbstainCount: "0", VetoCount: "0"}, + Timeout: prevCtx.BlockTime().Add(time.Second * 600), + ExecutorResult: group.ProposalExecutorResultNotRun, }, curProposal: &group.Proposal{ - ProposalId: 1, - Address: addr2.String(), - Proposers: []string{addr2.String()}, - SubmittedAt: curCtx.BlockTime(), - GroupVersion: 1, - GroupAccountVersion: 1, - Status: group.ProposalStatusSubmitted, - Result: group.ProposalResultUnfinalized, - VoteState: group.Tally{YesCount: "0", NoCount: "1", AbstainCount: "0", VetoCount: "0"}, - Timeout: curCtx.BlockTime().Add(time.Second * 600), - ExecutorResult: group.ProposalExecutorResultNotRun, + ProposalId: 1, + Address: addr2.String(), + Proposers: []string{addr2.String()}, + SubmittedAt: curCtx.BlockTime(), + GroupVersion: 1, + GroupPolicyVersion: 1, + Status: group.ProposalStatusSubmitted, + Result: group.ProposalResultUnfinalized, + VoteState: group.Tally{YesCount: "0", NoCount: "1", AbstainCount: "0", VetoCount: "0"}, + Timeout: curCtx.BlockTime().Add(time.Second * 600), + ExecutorResult: group.ProposalExecutorResultNotRun, }, expBroken: true, }, "current block abstain vote count must be greater than previous block abstain vote count": { prevProposal: &group.Proposal{ - ProposalId: 1, - Address: addr1.String(), - Proposers: []string{addr1.String()}, - SubmittedAt: prevCtx.BlockTime(), - GroupVersion: 1, - GroupAccountVersion: 1, - Status: group.ProposalStatusSubmitted, - Result: group.ProposalResultUnfinalized, - VoteState: group.Tally{YesCount: "0", NoCount: "0", AbstainCount: "2", VetoCount: "0"}, - Timeout: prevCtx.BlockTime().Add(time.Second * 600), - ExecutorResult: group.ProposalExecutorResultNotRun, + ProposalId: 1, + Address: addr1.String(), + Proposers: []string{addr1.String()}, + SubmittedAt: prevCtx.BlockTime(), + GroupVersion: 1, + GroupPolicyVersion: 1, + Status: group.ProposalStatusSubmitted, + Result: group.ProposalResultUnfinalized, + VoteState: group.Tally{YesCount: "0", NoCount: "0", AbstainCount: "2", VetoCount: "0"}, + Timeout: prevCtx.BlockTime().Add(time.Second * 600), + ExecutorResult: group.ProposalExecutorResultNotRun, }, curProposal: &group.Proposal{ - ProposalId: 1, - Address: addr2.String(), - Proposers: []string{addr2.String()}, - SubmittedAt: curCtx.BlockTime(), - GroupVersion: 1, - GroupAccountVersion: 1, - Status: group.ProposalStatusSubmitted, - Result: group.ProposalResultUnfinalized, - VoteState: group.Tally{YesCount: "0", NoCount: "0", AbstainCount: "1", VetoCount: "0"}, - Timeout: curCtx.BlockTime().Add(time.Second * 600), - ExecutorResult: group.ProposalExecutorResultNotRun, + ProposalId: 1, + Address: addr2.String(), + Proposers: []string{addr2.String()}, + SubmittedAt: curCtx.BlockTime(), + GroupVersion: 1, + GroupPolicyVersion: 1, + Status: group.ProposalStatusSubmitted, + Result: group.ProposalResultUnfinalized, + VoteState: group.Tally{YesCount: "0", NoCount: "0", AbstainCount: "1", VetoCount: "0"}, + Timeout: curCtx.BlockTime().Add(time.Second * 600), + ExecutorResult: group.ProposalExecutorResultNotRun, }, expBroken: true, }, "current block veto vote count must be greater than previous block veto vote count": { prevProposal: &group.Proposal{ - ProposalId: 1, - Address: addr1.String(), - Proposers: []string{addr1.String()}, - SubmittedAt: prevCtx.BlockTime(), - GroupVersion: 1, - GroupAccountVersion: 1, - Status: group.ProposalStatusSubmitted, - Result: group.ProposalResultUnfinalized, - VoteState: group.Tally{YesCount: "0", NoCount: "0", AbstainCount: "0", VetoCount: "2"}, - Timeout: prevCtx.BlockTime().Add(time.Second * 600), - ExecutorResult: group.ProposalExecutorResultNotRun, + ProposalId: 1, + Address: addr1.String(), + Proposers: []string{addr1.String()}, + SubmittedAt: prevCtx.BlockTime(), + GroupVersion: 1, + GroupPolicyVersion: 1, + Status: group.ProposalStatusSubmitted, + Result: group.ProposalResultUnfinalized, + VoteState: group.Tally{YesCount: "0", NoCount: "0", AbstainCount: "0", VetoCount: "2"}, + Timeout: prevCtx.BlockTime().Add(time.Second * 600), + ExecutorResult: group.ProposalExecutorResultNotRun, }, curProposal: &group.Proposal{ - ProposalId: 1, - Address: addr2.String(), - Proposers: []string{addr2.String()}, - SubmittedAt: curCtx.BlockTime(), - GroupVersion: 1, - GroupAccountVersion: 1, - Status: group.ProposalStatusSubmitted, - Result: group.ProposalResultUnfinalized, - VoteState: group.Tally{YesCount: "0", NoCount: "0", AbstainCount: "0", VetoCount: "1"}, - Timeout: curCtx.BlockTime().Add(time.Second * 600), - ExecutorResult: group.ProposalExecutorResultNotRun, + ProposalId: 1, + Address: addr2.String(), + Proposers: []string{addr2.String()}, + SubmittedAt: curCtx.BlockTime(), + GroupVersion: 1, + GroupPolicyVersion: 1, + Status: group.ProposalStatusSubmitted, + Result: group.ProposalResultUnfinalized, + VoteState: group.Tally{YesCount: "0", NoCount: "0", AbstainCount: "0", VetoCount: "1"}, + Timeout: curCtx.BlockTime().Add(time.Second * 600), + ExecutorResult: group.ProposalExecutorResultNotRun, }, expBroken: true, }, @@ -341,8 +341,8 @@ func (s *invariantTestSuite) TestTallyVotesSumInvariant() { groupTable, err := orm.NewAutoUInt64Table([2]byte{keeper.GroupTablePrefix}, keeper.GroupTableSeqPrefix, &group.GroupInfo{}, cdc) s.Require().NoError(err) - // Group Account Table - groupAccountTable, err := orm.NewPrimaryKeyTable([2]byte{keeper.GroupAccountTablePrefix}, &group.GroupAccountInfo{}, cdc) + // Group Policy Table + groupPolicyTable, err := orm.NewPrimaryKeyTable([2]byte{keeper.GroupPolicyTablePrefix}, &group.GroupPolicyInfo{}, cdc) s.Require().NoError(err) // Group Member Table @@ -368,7 +368,7 @@ func (s *invariantTestSuite) TestTallyVotesSumInvariant() { specs := map[string]struct { groupsInfo *group.GroupInfo - groupAcc *group.GroupAccountInfo + groupPolicy *group.GroupPolicyInfo groupMembers []*group.GroupMember proposal *group.Proposal votes []*group.Vote @@ -381,7 +381,7 @@ func (s *invariantTestSuite) TestTallyVotesSumInvariant() { Version: 1, TotalWeight: "7", }, - groupAcc: &group.GroupAccountInfo{ + groupPolicy: &group.GroupPolicyInfo{ Address: addr1.String(), GroupId: 1, Admin: adminAddr.String(), @@ -404,17 +404,17 @@ func (s *invariantTestSuite) TestTallyVotesSumInvariant() { }, }, proposal: &group.Proposal{ - ProposalId: 1, - Address: addr1.String(), - Proposers: []string{addr1.String()}, - SubmittedAt: curCtx.BlockTime(), - GroupVersion: 1, - GroupAccountVersion: 1, - Status: group.ProposalStatusSubmitted, - Result: group.ProposalResultUnfinalized, - VoteState: group.Tally{YesCount: "4", NoCount: "3", AbstainCount: "0", VetoCount: "0"}, - Timeout: curCtx.BlockTime().Add(time.Second * 600), - ExecutorResult: group.ProposalExecutorResultNotRun, + ProposalId: 1, + Address: addr1.String(), + Proposers: []string{addr1.String()}, + SubmittedAt: curCtx.BlockTime(), + GroupVersion: 1, + GroupPolicyVersion: 1, + Status: group.ProposalStatusSubmitted, + Result: group.ProposalResultUnfinalized, + VoteState: group.Tally{YesCount: "4", NoCount: "3", AbstainCount: "0", VetoCount: "0"}, + Timeout: curCtx.BlockTime().Add(time.Second * 600), + ExecutorResult: group.ProposalExecutorResultNotRun, }, votes: []*group.Vote{ { @@ -439,7 +439,7 @@ func (s *invariantTestSuite) TestTallyVotesSumInvariant() { Version: 1, TotalWeight: "5", }, - groupAcc: &group.GroupAccountInfo{ + groupPolicy: &group.GroupPolicyInfo{ Address: addr1.String(), GroupId: 1, Admin: adminAddr.String(), @@ -462,17 +462,17 @@ func (s *invariantTestSuite) TestTallyVotesSumInvariant() { }, }, proposal: &group.Proposal{ - ProposalId: 1, - Address: addr1.String(), - Proposers: []string{addr1.String()}, - SubmittedAt: curCtx.BlockTime(), - GroupVersion: 1, - GroupAccountVersion: 1, - Status: group.ProposalStatusSubmitted, - Result: group.ProposalResultUnfinalized, - VoteState: group.Tally{YesCount: "6", NoCount: "0", AbstainCount: "0", VetoCount: "0"}, - Timeout: curCtx.BlockTime().Add(time.Second * 600), - ExecutorResult: group.ProposalExecutorResultNotRun, + ProposalId: 1, + Address: addr1.String(), + Proposers: []string{addr1.String()}, + SubmittedAt: curCtx.BlockTime(), + GroupVersion: 1, + GroupPolicyVersion: 1, + Status: group.ProposalStatusSubmitted, + Result: group.ProposalResultUnfinalized, + VoteState: group.Tally{YesCount: "6", NoCount: "0", AbstainCount: "0", VetoCount: "0"}, + Timeout: curCtx.BlockTime().Add(time.Second * 600), + ExecutorResult: group.ProposalExecutorResultNotRun, }, votes: []*group.Vote{ { @@ -497,7 +497,7 @@ func (s *invariantTestSuite) TestTallyVotesSumInvariant() { Version: 1, TotalWeight: "7", }, - groupAcc: &group.GroupAccountInfo{ + groupPolicy: &group.GroupPolicyInfo{ Address: addr1.String(), GroupId: 1, Admin: adminAddr.String(), @@ -520,17 +520,17 @@ func (s *invariantTestSuite) TestTallyVotesSumInvariant() { }, }, proposal: &group.Proposal{ - ProposalId: 1, - Address: addr1.String(), - Proposers: []string{addr1.String()}, - SubmittedAt: curCtx.BlockTime(), - GroupVersion: 1, - GroupAccountVersion: 1, - Status: group.ProposalStatusSubmitted, - Result: group.ProposalResultUnfinalized, - VoteState: group.Tally{YesCount: "4", NoCount: "3", AbstainCount: "0", VetoCount: "0"}, - Timeout: curCtx.BlockTime().Add(time.Second * 600), - ExecutorResult: group.ProposalExecutorResultNotRun, + ProposalId: 1, + Address: addr1.String(), + Proposers: []string{addr1.String()}, + SubmittedAt: curCtx.BlockTime(), + GroupVersion: 1, + GroupPolicyVersion: 1, + Status: group.ProposalStatusSubmitted, + Result: group.ProposalResultUnfinalized, + VoteState: group.Tally{YesCount: "4", NoCount: "3", AbstainCount: "0", VetoCount: "0"}, + Timeout: curCtx.BlockTime().Add(time.Second * 600), + ExecutorResult: group.ProposalExecutorResultNotRun, }, votes: []*group.Vote{ { @@ -554,16 +554,16 @@ func (s *invariantTestSuite) TestTallyVotesSumInvariant() { cacheCurCtx, _ := curCtx.CacheContext() groupsInfo := spec.groupsInfo proposal := spec.proposal - groupAcc := spec.groupAcc + groupPolicy := spec.groupPolicy groupMembers := spec.groupMembers votes := spec.votes _, err := groupTable.Create(cacheCurCtx.KVStore(key), groupsInfo) s.Require().NoError(err) - err = groupAcc.SetDecisionPolicy(group.NewThresholdDecisionPolicy("1", time.Second)) + err = groupPolicy.SetDecisionPolicy(group.NewThresholdDecisionPolicy("1", time.Second)) s.Require().NoError(err) - err = groupAccountTable.Create(cacheCurCtx.KVStore(key), groupAcc) + err = groupPolicyTable.Create(cacheCurCtx.KVStore(key), groupPolicy) s.Require().NoError(err) for i := 0; i < len(groupMembers); i++ { @@ -579,7 +579,7 @@ func (s *invariantTestSuite) TestTallyVotesSumInvariant() { s.Require().NoError(err) } - _, broken := keeper.TallyVotesSumInvariantHelper(cacheCurCtx, key, *groupTable, *proposalTable, *groupMemberTable, voteByProposalIndex, *groupAccountTable) + _, broken := keeper.TallyVotesSumInvariantHelper(cacheCurCtx, key, *groupTable, *proposalTable, *groupMemberTable, voteByProposalIndex, *groupPolicyTable) s.Require().Equal(spec.expBroken, broken) } } diff --git a/x/group/keeper/keeper.go b/x/group/keeper/keeper.go index 4a75a0d1f..e428ad45e 100644 --- a/x/group/keeper/keeper.go +++ b/x/group/keeper/keeper.go @@ -24,17 +24,17 @@ const ( GroupMemberByGroupIndexPrefix byte = 0x11 GroupMemberByMemberIndexPrefix byte = 0x12 - // Group Account Table - GroupAccountTablePrefix byte = 0x20 - GroupAccountTableSeqPrefix byte = 0x21 - GroupAccountByGroupIndexPrefix byte = 0x22 - GroupAccountByAdminIndexPrefix byte = 0x23 + // Group Policy Table + GroupPolicyTablePrefix byte = 0x20 + GroupPolicyTableSeqPrefix byte = 0x21 + GroupPolicyByGroupIndexPrefix byte = 0x22 + GroupPolicyByAdminIndexPrefix byte = 0x23 // Proposal Table - ProposalTablePrefix byte = 0x30 - ProposalTableSeqPrefix byte = 0x31 - ProposalByGroupAccountIndexPrefix byte = 0x32 - ProposalByProposerIndexPrefix byte = 0x33 + ProposalTablePrefix byte = 0x30 + ProposalTableSeqPrefix byte = 0x31 + ProposalByGroupPolicyIndexPrefix byte = 0x32 + ProposalByProposerIndexPrefix byte = 0x33 // Vote Table VoteTablePrefix byte = 0x40 @@ -56,16 +56,16 @@ type Keeper struct { groupMemberByGroupIndex orm.Index groupMemberByMemberIndex orm.Index - // Group Account Table - groupAccountSeq orm.Sequence - groupAccountTable orm.PrimaryKeyTable - groupAccountByGroupIndex orm.Index - groupAccountByAdminIndex orm.Index + // Group Policy Table + groupPolicySeq orm.Sequence + groupPolicyTable orm.PrimaryKeyTable + groupPolicyByGroupIndex orm.Index + groupPolicyByAdminIndex orm.Index // Proposal Table - proposalTable orm.AutoUInt64Table - proposalByGroupAccountIndex orm.Index - proposalByProposerIndex orm.Index + proposalTable orm.AutoUInt64Table + proposalByGroupPolicyIndex orm.Index + proposalByProposerIndex orm.Index // Vote Table voteTable orm.PrimaryKeyTable @@ -123,20 +123,20 @@ func NewKeeper(storeKey storetypes.StoreKey, cdc codec.Codec, router *authmiddle } k.groupMemberTable = *groupMemberTable - // Group Account Table - k.groupAccountSeq = orm.NewSequence(GroupAccountTableSeqPrefix) - groupAccountTable, err := orm.NewPrimaryKeyTable([2]byte{GroupAccountTablePrefix}, &group.GroupAccountInfo{}, cdc) + // Group Policy Table + k.groupPolicySeq = orm.NewSequence(GroupPolicyTableSeqPrefix) + groupPolicyTable, err := orm.NewPrimaryKeyTable([2]byte{GroupPolicyTablePrefix}, &group.GroupPolicyInfo{}, cdc) if err != nil { panic(err.Error()) } - k.groupAccountByGroupIndex, err = orm.NewIndex(groupAccountTable, GroupAccountByGroupIndexPrefix, func(value interface{}) ([]interface{}, error) { - return []interface{}{value.(*group.GroupAccountInfo).GroupId}, nil - }, group.GroupAccountInfo{}.GroupId) + k.groupPolicyByGroupIndex, err = orm.NewIndex(groupPolicyTable, GroupPolicyByGroupIndexPrefix, func(value interface{}) ([]interface{}, error) { + return []interface{}{value.(*group.GroupPolicyInfo).GroupId}, nil + }, group.GroupPolicyInfo{}.GroupId) if err != nil { panic(err.Error()) } - k.groupAccountByAdminIndex, err = orm.NewIndex(groupAccountTable, GroupAccountByAdminIndexPrefix, func(value interface{}) ([]interface{}, error) { - admin := value.(*group.GroupAccountInfo).Admin + k.groupPolicyByAdminIndex, err = orm.NewIndex(groupPolicyTable, GroupPolicyByAdminIndexPrefix, func(value interface{}) ([]interface{}, error) { + admin := value.(*group.GroupPolicyInfo).Admin addr, err := sdk.AccAddressFromBech32(admin) if err != nil { return nil, err @@ -146,14 +146,14 @@ func NewKeeper(storeKey storetypes.StoreKey, cdc codec.Codec, router *authmiddle if err != nil { panic(err.Error()) } - k.groupAccountTable = *groupAccountTable + k.groupPolicyTable = *groupPolicyTable // Proposal Table proposalTable, err := orm.NewAutoUInt64Table([2]byte{ProposalTablePrefix}, ProposalTableSeqPrefix, &group.Proposal{}, cdc) if err != nil { panic(err.Error()) } - k.proposalByGroupAccountIndex, err = orm.NewIndex(proposalTable, ProposalByGroupAccountIndexPrefix, func(value interface{}) ([]interface{}, error) { + k.proposalByGroupPolicyIndex, err = orm.NewIndex(proposalTable, ProposalByGroupPolicyIndexPrefix, func(value interface{}) ([]interface{}, error) { account := value.(*group.Proposal).Address addr, err := sdk.AccAddressFromBech32(account) if err != nil { diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index 7f7583fec..86a580560 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -24,14 +24,14 @@ import ( type TestSuite struct { suite.Suite - app *simapp.SimApp - sdkCtx sdk.Context - ctx context.Context - addrs []sdk.AccAddress - groupID uint64 - groupAccountAddr sdk.AccAddress - keeper keeper.Keeper - blockTime time.Time + app *simapp.SimApp + sdkCtx sdk.Context + ctx context.Context + addrs []sdk.AccAddress + groupID uint64 + groupPolicyAddr sdk.AccAddress + keeper keeper.Keeper + blockTime time.Time } func (s *TestSuite) SetupTest() { @@ -47,7 +47,7 @@ func (s *TestSuite) SetupTest() { s.keeper = s.app.GroupKeeper s.addrs = simapp.AddTestAddrsIncremental(app, ctx, 6, sdk.NewInt(30000000)) - // Initial group, group account and balance setup + // Initial group, group policy and balance setup members := []group.Member{ {Address: s.addrs[4].String(), Weight: "1"}, {Address: s.addrs[1].String(), Weight: "2"}, } @@ -63,19 +63,19 @@ func (s *TestSuite) SetupTest() { "2", time.Second, ) - accountReq := &group.MsgCreateGroupAccount{ + policyReq := &group.MsgCreateGroupPolicy{ Admin: s.addrs[0].String(), GroupId: s.groupID, Metadata: nil, } - err = accountReq.SetDecisionPolicy(policy) + err = policyReq.SetDecisionPolicy(policy) s.Require().NoError(err) - accountRes, err := s.keeper.CreateGroupAccount(s.ctx, accountReq) + policyRes, err := s.keeper.CreateGroupPolicy(s.ctx, policyReq) s.Require().NoError(err) - addr, err := sdk.AccAddressFromBech32(accountRes.Address) + addr, err := sdk.AccAddressFromBech32(policyRes.Address) s.Require().NoError(err) - s.groupAccountAddr = addr - s.Require().NoError(testutil.FundAccount(s.app.BankKeeper, s.sdkCtx, s.groupAccountAddr, sdk.Coins{sdk.NewInt64Coin("test", 10000)})) + s.groupPolicyAddr = addr + s.Require().NoError(testutil.FundAccount(s.app.BankKeeper, s.sdkCtx, s.groupPolicyAddr, sdk.Coins{sdk.NewInt64Coin("test", 10000)})) } func TestKeeperTestSuite(t *testing.T) { @@ -684,7 +684,7 @@ func (s *TestSuite) TestUpdateGroupMembers() { } } -func (s *TestSuite) TestCreateGroupAccount() { +func (s *TestSuite) TestCreateGroupPolicy() { addrs := s.addrs addr1 := addrs[0] addr4 := addrs[3] @@ -698,12 +698,12 @@ func (s *TestSuite) TestCreateGroupAccount() { myGroupID := groupRes.GroupId specs := map[string]struct { - req *group.MsgCreateGroupAccount + req *group.MsgCreateGroupPolicy policy group.DecisionPolicy expErr bool }{ "all good": { - req: &group.MsgCreateGroupAccount{ + req: &group.MsgCreateGroupPolicy{ Admin: addr1.String(), Metadata: nil, GroupId: myGroupID, @@ -714,7 +714,7 @@ func (s *TestSuite) TestCreateGroupAccount() { ), }, "decision policy threshold > total group weight": { - req: &group.MsgCreateGroupAccount{ + req: &group.MsgCreateGroupPolicy{ Admin: addr1.String(), Metadata: nil, GroupId: myGroupID, @@ -725,7 +725,7 @@ func (s *TestSuite) TestCreateGroupAccount() { ), }, "group id does not exists": { - req: &group.MsgCreateGroupAccount{ + req: &group.MsgCreateGroupPolicy{ Admin: addr1.String(), Metadata: nil, GroupId: 9999, @@ -737,7 +737,7 @@ func (s *TestSuite) TestCreateGroupAccount() { expErr: true, }, "admin not group admin": { - req: &group.MsgCreateGroupAccount{ + req: &group.MsgCreateGroupPolicy{ Admin: addr4.String(), Metadata: nil, GroupId: myGroupID, @@ -749,7 +749,7 @@ func (s *TestSuite) TestCreateGroupAccount() { expErr: true, }, "metadata too long": { - req: &group.MsgCreateGroupAccount{ + req: &group.MsgCreateGroupPolicy{ Admin: addr1.String(), Metadata: []byte(strings.Repeat("a", 256)), GroupId: myGroupID, @@ -767,7 +767,7 @@ func (s *TestSuite) TestCreateGroupAccount() { err := spec.req.SetDecisionPolicy(spec.policy) s.Require().NoError(err) - res, err := s.keeper.CreateGroupAccount(s.ctx, spec.req) + res, err := s.keeper.CreateGroupPolicy(s.ctx, spec.req) if spec.expErr { s.Require().Error(err) return @@ -776,43 +776,43 @@ func (s *TestSuite) TestCreateGroupAccount() { addr := res.Address // then all data persisted - groupAccountRes, err := s.keeper.GroupAccountInfo(s.ctx, &group.QueryGroupAccountInfoRequest{Address: addr}) + groupPolicyRes, err := s.keeper.GroupPolicyInfo(s.ctx, &group.QueryGroupPolicyInfoRequest{Address: addr}) s.Require().NoError(err) - groupAccount := groupAccountRes.Info - s.Assert().Equal(addr, groupAccount.Address) - s.Assert().Equal(myGroupID, groupAccount.GroupId) - s.Assert().Equal(spec.req.Admin, groupAccount.Admin) - s.Assert().Equal(spec.req.Metadata, groupAccount.Metadata) - s.Assert().Equal(uint64(1), groupAccount.Version) - s.Assert().Equal(spec.policy.(*group.ThresholdDecisionPolicy), groupAccount.GetDecisionPolicy()) + groupPolicy := groupPolicyRes.Info + s.Assert().Equal(addr, groupPolicy.Address) + s.Assert().Equal(myGroupID, groupPolicy.GroupId) + s.Assert().Equal(spec.req.Admin, groupPolicy.Admin) + s.Assert().Equal(spec.req.Metadata, groupPolicy.Metadata) + s.Assert().Equal(uint64(1), groupPolicy.Version) + s.Assert().Equal(spec.policy.(*group.ThresholdDecisionPolicy), groupPolicy.GetDecisionPolicy()) }) } } -func (s *TestSuite) TestUpdateGroupAccountAdmin() { +func (s *TestSuite) TestUpdateGroupPolicyAdmin() { addrs := s.addrs addr1 := addrs[0] addr2 := addrs[1] addr5 := addrs[4] admin, newAdmin := addr1, addr2 - groupAccountAddr, myGroupID, policy := createGroupAndGroupAccount(admin, s) + groupPolicyAddr, myGroupID, policy := createGroupAndGroupPolicy(admin, s) specs := map[string]struct { - req *group.MsgUpdateGroupAccountAdmin - expGroupAccount *group.GroupAccountInfo - expErr bool + req *group.MsgUpdateGroupPolicyAdmin + expGroupPolicy *group.GroupPolicyInfo + expErr bool }{ "with wrong admin": { - req: &group.MsgUpdateGroupAccountAdmin{ + req: &group.MsgUpdateGroupPolicyAdmin{ Admin: addr5.String(), - Address: groupAccountAddr, + Address: groupPolicyAddr, NewAdmin: newAdmin.String(), }, - expGroupAccount: &group.GroupAccountInfo{ + expGroupPolicy: &group.GroupPolicyInfo{ Admin: admin.String(), - Address: groupAccountAddr, + Address: groupPolicyAddr, GroupId: myGroupID, Metadata: nil, Version: 2, @@ -820,15 +820,15 @@ func (s *TestSuite) TestUpdateGroupAccountAdmin() { }, expErr: true, }, - "with wrong group account": { - req: &group.MsgUpdateGroupAccountAdmin{ + "with wrong group policy": { + req: &group.MsgUpdateGroupPolicyAdmin{ Admin: admin.String(), Address: addr5.String(), NewAdmin: newAdmin.String(), }, - expGroupAccount: &group.GroupAccountInfo{ + expGroupPolicy: &group.GroupPolicyInfo{ Admin: admin.String(), - Address: groupAccountAddr, + Address: groupPolicyAddr, GroupId: myGroupID, Metadata: nil, Version: 2, @@ -837,14 +837,14 @@ func (s *TestSuite) TestUpdateGroupAccountAdmin() { expErr: true, }, "correct data": { - req: &group.MsgUpdateGroupAccountAdmin{ + req: &group.MsgUpdateGroupPolicyAdmin{ Admin: admin.String(), - Address: groupAccountAddr, + Address: groupPolicyAddr, NewAdmin: newAdmin.String(), }, - expGroupAccount: &group.GroupAccountInfo{ + expGroupPolicy: &group.GroupPolicyInfo{ Admin: newAdmin.String(), - Address: groupAccountAddr, + Address: groupPolicyAddr, GroupId: myGroupID, Metadata: nil, Version: 2, @@ -855,74 +855,74 @@ func (s *TestSuite) TestUpdateGroupAccountAdmin() { } for msg, spec := range specs { spec := spec - err := spec.expGroupAccount.SetDecisionPolicy(policy) + err := spec.expGroupPolicy.SetDecisionPolicy(policy) s.Require().NoError(err) s.Run(msg, func() { - _, err := s.keeper.UpdateGroupAccountAdmin(s.ctx, spec.req) + _, err := s.keeper.UpdateGroupPolicyAdmin(s.ctx, spec.req) if spec.expErr { s.Require().Error(err) return } s.Require().NoError(err) - res, err := s.keeper.GroupAccountInfo(s.ctx, &group.QueryGroupAccountInfoRequest{ - Address: groupAccountAddr, + res, err := s.keeper.GroupPolicyInfo(s.ctx, &group.QueryGroupPolicyInfoRequest{ + Address: groupPolicyAddr, }) s.Require().NoError(err) - s.Assert().Equal(spec.expGroupAccount, res.Info) + s.Assert().Equal(spec.expGroupPolicy, res.Info) }) } } -func (s *TestSuite) TestUpdateGroupAccountMetadata() { +func (s *TestSuite) TestUpdateGroupPolicyMetadata() { addrs := s.addrs addr1 := addrs[0] addr5 := addrs[4] admin := addr1 - groupAccountAddr, myGroupID, policy := createGroupAndGroupAccount(admin, s) + groupPolicyAddr, myGroupID, policy := createGroupAndGroupPolicy(admin, s) specs := map[string]struct { - req *group.MsgUpdateGroupAccountMetadata - expGroupAccount *group.GroupAccountInfo - expErr bool + req *group.MsgUpdateGroupPolicyMetadata + expGroupPolicy *group.GroupPolicyInfo + expErr bool }{ "with wrong admin": { - req: &group.MsgUpdateGroupAccountMetadata{ + req: &group.MsgUpdateGroupPolicyMetadata{ Admin: addr5.String(), - Address: groupAccountAddr, + Address: groupPolicyAddr, Metadata: []byte("hello"), }, - expGroupAccount: &group.GroupAccountInfo{}, - expErr: true, + expGroupPolicy: &group.GroupPolicyInfo{}, + expErr: true, }, - "with wrong group account": { - req: &group.MsgUpdateGroupAccountMetadata{ + "with wrong group policy": { + req: &group.MsgUpdateGroupPolicyMetadata{ Admin: admin.String(), Address: addr5.String(), Metadata: []byte("hello"), }, - expGroupAccount: &group.GroupAccountInfo{}, - expErr: true, + expGroupPolicy: &group.GroupPolicyInfo{}, + expErr: true, }, "with comment too long": { - req: &group.MsgUpdateGroupAccountMetadata{ + req: &group.MsgUpdateGroupPolicyMetadata{ Admin: admin.String(), Address: addr5.String(), Metadata: []byte(strings.Repeat("a", 256)), }, - expGroupAccount: &group.GroupAccountInfo{}, - expErr: true, + expGroupPolicy: &group.GroupPolicyInfo{}, + expErr: true, }, "correct data": { - req: &group.MsgUpdateGroupAccountMetadata{ + req: &group.MsgUpdateGroupPolicyMetadata{ Admin: admin.String(), - Address: groupAccountAddr, + Address: groupPolicyAddr, Metadata: []byte("hello"), }, - expGroupAccount: &group.GroupAccountInfo{ + expGroupPolicy: &group.GroupPolicyInfo{ Admin: admin.String(), - Address: groupAccountAddr, + Address: groupPolicyAddr, GroupId: myGroupID, Metadata: []byte("hello"), Version: 2, @@ -933,69 +933,69 @@ func (s *TestSuite) TestUpdateGroupAccountMetadata() { } for msg, spec := range specs { spec := spec - err := spec.expGroupAccount.SetDecisionPolicy(policy) + err := spec.expGroupPolicy.SetDecisionPolicy(policy) s.Require().NoError(err) s.Run(msg, func() { - _, err := s.keeper.UpdateGroupAccountMetadata(s.ctx, spec.req) + _, err := s.keeper.UpdateGroupPolicyMetadata(s.ctx, spec.req) if spec.expErr { s.Require().Error(err) return } s.Require().NoError(err) - res, err := s.keeper.GroupAccountInfo(s.ctx, &group.QueryGroupAccountInfoRequest{ - Address: groupAccountAddr, + res, err := s.keeper.GroupPolicyInfo(s.ctx, &group.QueryGroupPolicyInfoRequest{ + Address: groupPolicyAddr, }) s.Require().NoError(err) - s.Assert().Equal(spec.expGroupAccount, res.Info) + s.Assert().Equal(spec.expGroupPolicy, res.Info) }) } } -func (s *TestSuite) TestUpdateGroupAccountDecisionPolicy() { +func (s *TestSuite) TestUpdateGroupPolicyDecisionPolicy() { addrs := s.addrs addr1 := addrs[0] addr5 := addrs[4] admin := addr1 - groupAccountAddr, myGroupID, policy := createGroupAndGroupAccount(admin, s) + groupPolicyAddr, myGroupID, policy := createGroupAndGroupPolicy(admin, s) specs := map[string]struct { - req *group.MsgUpdateGroupAccountDecisionPolicy - policy group.DecisionPolicy - expGroupAccount *group.GroupAccountInfo - expErr bool + req *group.MsgUpdateGroupPolicyDecisionPolicy + policy group.DecisionPolicy + expGroupPolicy *group.GroupPolicyInfo + expErr bool }{ "with wrong admin": { - req: &group.MsgUpdateGroupAccountDecisionPolicy{ + req: &group.MsgUpdateGroupPolicyDecisionPolicy{ Admin: addr5.String(), - Address: groupAccountAddr, + Address: groupPolicyAddr, }, - policy: policy, - expGroupAccount: &group.GroupAccountInfo{}, - expErr: true, + policy: policy, + expGroupPolicy: &group.GroupPolicyInfo{}, + expErr: true, }, - "with wrong group account": { - req: &group.MsgUpdateGroupAccountDecisionPolicy{ + "with wrong group policy": { + req: &group.MsgUpdateGroupPolicyDecisionPolicy{ Admin: admin.String(), Address: addr5.String(), }, - policy: policy, - expGroupAccount: &group.GroupAccountInfo{}, - expErr: true, + policy: policy, + expGroupPolicy: &group.GroupPolicyInfo{}, + expErr: true, }, "correct data": { - req: &group.MsgUpdateGroupAccountDecisionPolicy{ + req: &group.MsgUpdateGroupPolicyDecisionPolicy{ Admin: admin.String(), - Address: groupAccountAddr, + Address: groupPolicyAddr, }, policy: group.NewThresholdDecisionPolicy( "2", time.Duration(2)*time.Second, ), - expGroupAccount: &group.GroupAccountInfo{ + expGroupPolicy: &group.GroupPolicyInfo{ Admin: admin.String(), - Address: groupAccountAddr, + Address: groupPolicyAddr, GroupId: myGroupID, Metadata: nil, Version: 2, @@ -1006,29 +1006,29 @@ func (s *TestSuite) TestUpdateGroupAccountDecisionPolicy() { } for msg, spec := range specs { spec := spec - err := spec.expGroupAccount.SetDecisionPolicy(spec.policy) + err := spec.expGroupPolicy.SetDecisionPolicy(spec.policy) s.Require().NoError(err) err = spec.req.SetDecisionPolicy(spec.policy) s.Require().NoError(err) s.Run(msg, func() { - _, err := s.keeper.UpdateGroupAccountDecisionPolicy(s.ctx, spec.req) + _, err := s.keeper.UpdateGroupPolicyDecisionPolicy(s.ctx, spec.req) if spec.expErr { s.Require().Error(err) return } s.Require().NoError(err) - res, err := s.keeper.GroupAccountInfo(s.ctx, &group.QueryGroupAccountInfoRequest{ - Address: groupAccountAddr, + res, err := s.keeper.GroupPolicyInfo(s.ctx, &group.QueryGroupPolicyInfoRequest{ + Address: groupPolicyAddr, }) s.Require().NoError(err) - s.Assert().Equal(spec.expGroupAccount, res.Info) + s.Assert().Equal(spec.expGroupPolicy, res.Info) }) } } -func (s *TestSuite) TestGroupAccountsByAdminOrGroup() { +func (s *TestSuite) TestGroupPoliciesByAdminOrGroup() { addrs := s.addrs addr2 := addrs[1] @@ -1053,19 +1053,19 @@ func (s *TestSuite) TestGroupAccountsByAdminOrGroup() { } count := 2 - expectAccs := make([]*group.GroupAccountInfo, count) + expectAccs := make([]*group.GroupPolicyInfo, count) for i := range expectAccs { - req := &group.MsgCreateGroupAccount{ + req := &group.MsgCreateGroupPolicy{ Admin: admin.String(), Metadata: nil, GroupId: myGroupID, } err := req.SetDecisionPolicy(policies[i]) s.Require().NoError(err) - res, err := s.keeper.CreateGroupAccount(s.ctx, req) + res, err := s.keeper.CreateGroupPolicy(s.ctx, req) s.Require().NoError(err) - expectAcc := &group.GroupAccountInfo{ + expectAcc := &group.GroupPolicyInfo{ Address: res.Address, Admin: admin.String(), Metadata: nil, @@ -1078,40 +1078,40 @@ func (s *TestSuite) TestGroupAccountsByAdminOrGroup() { } sort.Slice(expectAccs, func(i, j int) bool { return expectAccs[i].Address < expectAccs[j].Address }) - // query group account by group - accountsByGroupRes, err := s.keeper.GroupAccountsByGroup(s.ctx, &group.QueryGroupAccountsByGroupRequest{ + // query group policy by group + policiesByGroupRes, err := s.keeper.GroupPoliciesByGroup(s.ctx, &group.QueryGroupPoliciesByGroupRequest{ GroupId: myGroupID, }) s.Require().NoError(err) - accounts := accountsByGroupRes.GroupAccounts - s.Require().Equal(len(accounts), count) - // we reorder accounts by address to be able to compare them - sort.Slice(accounts, func(i, j int) bool { return accounts[i].Address < accounts[j].Address }) - for i := range accounts { - s.Assert().Equal(accounts[i].Address, expectAccs[i].Address) - s.Assert().Equal(accounts[i].GroupId, expectAccs[i].GroupId) - s.Assert().Equal(accounts[i].Admin, expectAccs[i].Admin) - s.Assert().Equal(accounts[i].Metadata, expectAccs[i].Metadata) - s.Assert().Equal(accounts[i].Version, expectAccs[i].Version) - s.Assert().Equal(accounts[i].GetDecisionPolicy(), expectAccs[i].GetDecisionPolicy()) + policyAccs := policiesByGroupRes.GroupPolicies + s.Require().Equal(len(policyAccs), count) + // we reorder policyAccs by address to be able to compare them + sort.Slice(policyAccs, func(i, j int) bool { return policyAccs[i].Address < policyAccs[j].Address }) + for i := range policyAccs { + s.Assert().Equal(policyAccs[i].Address, expectAccs[i].Address) + s.Assert().Equal(policyAccs[i].GroupId, expectAccs[i].GroupId) + s.Assert().Equal(policyAccs[i].Admin, expectAccs[i].Admin) + s.Assert().Equal(policyAccs[i].Metadata, expectAccs[i].Metadata) + s.Assert().Equal(policyAccs[i].Version, expectAccs[i].Version) + s.Assert().Equal(policyAccs[i].GetDecisionPolicy(), expectAccs[i].GetDecisionPolicy()) } - // query group account by admin - accountsByAdminRes, err := s.keeper.GroupAccountsByAdmin(s.ctx, &group.QueryGroupAccountsByAdminRequest{ + // query group policy by admin + policiesByAdminRes, err := s.keeper.GroupPoliciesByAdmin(s.ctx, &group.QueryGroupPoliciesByAdminRequest{ Admin: admin.String(), }) s.Require().NoError(err) - accounts = accountsByAdminRes.GroupAccounts - s.Require().Equal(len(accounts), count) - // we reorder accounts by address to be able to compare them - sort.Slice(accounts, func(i, j int) bool { return accounts[i].Address < accounts[j].Address }) - for i := range accounts { - s.Assert().Equal(accounts[i].Address, expectAccs[i].Address) - s.Assert().Equal(accounts[i].GroupId, expectAccs[i].GroupId) - s.Assert().Equal(accounts[i].Admin, expectAccs[i].Admin) - s.Assert().Equal(accounts[i].Metadata, expectAccs[i].Metadata) - s.Assert().Equal(accounts[i].Version, expectAccs[i].Version) - s.Assert().Equal(accounts[i].GetDecisionPolicy(), expectAccs[i].GetDecisionPolicy()) + policyAccs = policiesByAdminRes.GroupPolicies + s.Require().Equal(len(policyAccs), count) + // we reorder policyAccs by address to be able to compare them + sort.Slice(policyAccs, func(i, j int) bool { return policyAccs[i].Address < policyAccs[j].Address }) + for i := range policyAccs { + s.Assert().Equal(policyAccs[i].Address, expectAccs[i].Address) + s.Assert().Equal(policyAccs[i].GroupId, expectAccs[i].GroupId) + s.Assert().Equal(policyAccs[i].Admin, expectAccs[i].Admin) + s.Assert().Equal(policyAccs[i].Metadata, expectAccs[i].Metadata) + s.Assert().Equal(policyAccs[i].Version, expectAccs[i].Version) + s.Assert().Equal(policyAccs[i].GetDecisionPolicy(), expectAccs[i].GetDecisionPolicy()) } } @@ -1123,15 +1123,15 @@ func (s *TestSuite) TestCreateProposal() { addr5 := addrs[4] myGroupID := s.groupID - accountAddr := s.groupAccountAddr + accountAddr := s.groupPolicyAddr msgSend := &banktypes.MsgSend{ - FromAddress: s.groupAccountAddr.String(), + FromAddress: s.groupPolicyAddr.String(), ToAddress: addr2.String(), Amount: sdk.Coins{sdk.NewInt64Coin("test", 100)}, } - accountReq := &group.MsgCreateGroupAccount{ + policyReq := &group.MsgCreateGroupPolicy{ Admin: addr1.String(), GroupId: myGroupID, Metadata: nil, @@ -1140,9 +1140,9 @@ func (s *TestSuite) TestCreateProposal() { "100", time.Second, ) - err := accountReq.SetDecisionPolicy(policy) + err := policyReq.SetDecisionPolicy(policy) s.Require().NoError(err) - bigThresholdRes, err := s.keeper.CreateGroupAccount(s.ctx, accountReq) + bigThresholdRes, err := s.keeper.CreateGroupPolicy(s.ctx, policyReq) s.Require().NoError(err) bigThresholdAddr := bigThresholdRes.Address @@ -1194,7 +1194,7 @@ func (s *TestSuite) TestCreateProposal() { expErr: true, postRun: func(sdkCtx sdk.Context) {}, }, - "group account required": { + "group policy required": { req: &group.MsgCreateProposal{ Metadata: nil, Proposers: []string{addr2.String()}, @@ -1202,7 +1202,7 @@ func (s *TestSuite) TestCreateProposal() { expErr: true, postRun: func(sdkCtx sdk.Context) {}, }, - "existing group account required": { + "existing group policy required": { req: &group.MsgCreateProposal{ Address: addr1.String(), Proposers: []string{addr2.String()}, @@ -1243,7 +1243,7 @@ func (s *TestSuite) TestCreateProposal() { expErr: true, postRun: func(sdkCtx sdk.Context) {}, }, - "reject msgs that are not authz by group account": { + "reject msgs that are not authz by group policy": { req: &group.MsgCreateProposal{ Address: accountAddr.String(), Metadata: nil, @@ -1323,7 +1323,7 @@ func (s *TestSuite) TestCreateProposal() { s.Assert().Equal(spec.req.Proposers, proposal.Proposers) s.Assert().Equal(s.blockTime, proposal.SubmittedAt) s.Assert().Equal(uint64(1), proposal.GroupVersion) - s.Assert().Equal(uint64(1), proposal.GroupAccountVersion) + s.Assert().Equal(uint64(1), proposal.GroupPolicyVersion) s.Assert().Equal(spec.expProposal.Status, proposal.Status) s.Assert().Equal(spec.expProposal.Result, proposal.Result) s.Assert().Equal(spec.expProposal.VoteState, proposal.VoteState) @@ -1364,21 +1364,21 @@ func (s *TestSuite) TestVote() { "2", time.Duration(2), ) - accountReq := &group.MsgCreateGroupAccount{ + policyReq := &group.MsgCreateGroupPolicy{ Admin: addr1.String(), GroupId: myGroupID, Metadata: nil, } - err = accountReq.SetDecisionPolicy(policy) + err = policyReq.SetDecisionPolicy(policy) s.Require().NoError(err) - accountRes, err := s.keeper.CreateGroupAccount(s.ctx, accountReq) + policyRes, err := s.keeper.CreateGroupPolicy(s.ctx, policyReq) s.Require().NoError(err) - accountAddr := accountRes.Address - groupAccount, err := sdk.AccAddressFromBech32(accountAddr) + accountAddr := policyRes.Address + groupPolicy, err := sdk.AccAddressFromBech32(accountAddr) s.Require().NoError(err) - s.Require().NotNil(groupAccount) + s.Require().NotNil(groupPolicy) - s.Require().NoError(testutil.FundAccount(s.app.BankKeeper, s.sdkCtx, groupAccount, sdk.Coins{sdk.NewInt64Coin("test", 10000)})) + s.Require().NoError(testutil.FundAccount(s.app.BankKeeper, s.sdkCtx, groupPolicy, sdk.Coins{sdk.NewInt64Coin("test", 10000)})) req := &group.MsgCreateProposal{ Address: accountAddr, @@ -1397,8 +1397,8 @@ func (s *TestSuite) TestVote() { s.Require().NoError(err) myProposalID := proposalRes.ProposalId - // proposals by group account - proposalsRes, err := s.keeper.ProposalsByGroupAccount(s.ctx, &group.QueryProposalsByGroupAccountRequest{ + // proposals by group policy + proposalsRes, err := s.keeper.ProposalsByGroupPolicy(s.ctx, &group.QueryProposalsByGroupPolicyRequest{ Address: accountAddr, }) s.Require().NoError(err) @@ -1410,7 +1410,7 @@ func (s *TestSuite) TestVote() { s.Assert().Equal(s.blockTime, proposals[0].SubmittedAt) s.Assert().Equal(uint64(1), proposals[0].GroupVersion) - s.Assert().Equal(uint64(1), proposals[0].GroupAccountVersion) + s.Assert().Equal(uint64(1), proposals[0].GroupPolicyVersion) s.Assert().Equal(group.ProposalStatusSubmitted, proposals[0].Status) s.Assert().Equal(group.ProposalResultUnfinalized, proposals[0].Result) s.Assert().Equal(group.Tally{ @@ -1465,7 +1465,7 @@ func (s *TestSuite) TestVote() { expResult: group.ProposalResultAccepted, expExecutorResult: group.ProposalExecutorResultSuccess, postRun: func(sdkCtx sdk.Context) { - fromBalances := s.app.BankKeeper.GetAllBalances(sdkCtx, groupAccount) + fromBalances := s.app.BankKeeper.GetAllBalances(sdkCtx, groupPolicy) s.Require().Contains(fromBalances, sdk.NewInt64Coin("test", 9900)) toBalances := s.app.BankKeeper.GetAllBalances(sdkCtx, addr5) s.Require().Contains(toBalances, sdk.NewInt64Coin("test", 100)) @@ -1696,9 +1696,9 @@ func (s *TestSuite) TestVote() { Choice: group.Choice_CHOICE_NO, }, doBefore: func(ctx context.Context) { - m, err := group.NewMsgUpdateGroupAccountDecisionPolicyRequest( + m, err := group.NewMsgUpdateGroupPolicyDecisionPolicyRequest( addr1, - groupAccount, + groupPolicy, &group.ThresholdDecisionPolicy{ Threshold: "1", Timeout: time.Second, @@ -1706,7 +1706,7 @@ func (s *TestSuite) TestVote() { ) s.Require().NoError(err) - _, err = s.keeper.UpdateGroupAccountDecisionPolicy(ctx, m) + _, err = s.keeper.UpdateGroupPolicyDecisionPolicy(ctx, m) s.Require().NoError(err) }, expErr: true, @@ -1797,12 +1797,12 @@ func (s *TestSuite) TestExecProposal() { addr2 := addrs[1] msgSend1 := &banktypes.MsgSend{ - FromAddress: s.groupAccountAddr.String(), + FromAddress: s.groupPolicyAddr.String(), ToAddress: addr2.String(), Amount: sdk.Coins{sdk.NewInt64Coin("test", 100)}, } msgSend2 := &banktypes.MsgSend{ - FromAddress: s.groupAccountAddr.String(), + FromAddress: s.groupPolicyAddr.String(), ToAddress: addr2.String(), Amount: sdk.Coins{sdk.NewInt64Coin("test", 10001)}, } @@ -1903,13 +1903,13 @@ func (s *TestSuite) TestExecProposal() { expProposalResult: group.ProposalResultUnfinalized, expExecutorResult: group.ProposalExecutorResultNotRun, }, - "with group account modified before tally": { + "with group policy modified before tally": { setupProposal: func(ctx context.Context) uint64 { myProposalID := createProposal(ctx, s, []sdk.Msg{msgSend1}, proposers) - _, err := s.keeper.UpdateGroupAccountMetadata(ctx, &group.MsgUpdateGroupAccountMetadata{ + _, err := s.keeper.UpdateGroupPolicyMetadata(ctx, &group.MsgUpdateGroupPolicyMetadata{ Admin: addr1.String(), - Address: s.groupAccountAddr.String(), - Metadata: []byte("group account modified before tally"), + Address: s.groupPolicyAddr.String(), + Metadata: []byte("group policy modified before tally"), }) s.Require().NoError(err) return myProposalID @@ -1950,7 +1950,7 @@ func (s *TestSuite) TestExecProposal() { _, err := s.keeper.Exec(ctx, &group.MsgExec{Signer: addr1.String(), ProposalId: myProposalID}) s.Require().NoError(err) sdkCtx := sdk.UnwrapSDKContext(ctx) - s.Require().NoError(testutil.FundAccount(s.app.BankKeeper, sdkCtx, s.groupAccountAddr, sdk.Coins{sdk.NewInt64Coin("test", 10002)})) + s.Require().NoError(testutil.FundAccount(s.app.BankKeeper, sdkCtx, s.groupPolicyAddr, sdk.Coins{sdk.NewInt64Coin("test", 10002)})) return myProposalID }, @@ -1996,7 +1996,7 @@ func (s *TestSuite) TestExecProposal() { s.Assert().Equal(exp, got) if spec.expBalance { - fromBalances := s.app.BankKeeper.GetAllBalances(sdkCtx, s.groupAccountAddr) + fromBalances := s.app.BankKeeper.GetAllBalances(sdkCtx, s.groupPolicyAddr) s.Require().Contains(fromBalances, spec.expFromBalances) toBalances := s.app.BankKeeper.GetAllBalances(sdkCtx, addr2) s.Require().Contains(toBalances, spec.expToBalances) @@ -2009,7 +2009,7 @@ func createProposal( ctx context.Context, s *TestSuite, msgs []sdk.Msg, proposers []string) uint64 { proposalReq := &group.MsgCreateProposal{ - Address: s.groupAccountAddr.String(), + Address: s.groupPolicyAddr.String(), Proposers: proposers, Metadata: nil, } @@ -2036,7 +2036,7 @@ func createProposalAndVote( return myProposalID } -func createGroupAndGroupAccount( +func createGroupAndGroupPolicy( admin sdk.AccAddress, s *TestSuite, ) (string, uint64, group.DecisionPolicy) { @@ -2048,7 +2048,7 @@ func createGroupAndGroupAccount( s.Require().NoError(err) myGroupID := groupRes.GroupId - groupAccount := &group.MsgCreateGroupAccount{ + groupPolicy := &group.MsgCreateGroupPolicy{ Admin: admin.String(), GroupId: myGroupID, Metadata: nil, @@ -2058,11 +2058,11 @@ func createGroupAndGroupAccount( "1", time.Second, ) - err = groupAccount.SetDecisionPolicy(policy) + err = groupPolicy.SetDecisionPolicy(policy) s.Require().NoError(err) - groupAccountRes, err := s.keeper.CreateGroupAccount(s.ctx, groupAccount) + groupPolicyRes, err := s.keeper.CreateGroupPolicy(s.ctx, groupPolicy) s.Require().NoError(err) - return groupAccountRes.Address, myGroupID, policy + return groupPolicyRes.Address, myGroupID, policy } diff --git a/x/group/keeper/msg_server.go b/x/group/keeper/msg_server.go index 18150ecb3..1bac956e8 100644 --- a/x/group/keeper/msg_server.go +++ b/x/group/keeper/msg_server.go @@ -231,7 +231,7 @@ func (k Keeper) UpdateGroupMetadata(goCtx context.Context, req *group.MsgUpdateG return &group.MsgUpdateGroupMetadataResponse{}, nil } -func (k Keeper) CreateGroupAccount(goCtx context.Context, req *group.MsgCreateGroupAccount) (*group.MsgCreateGroupAccountResponse, error) { +func (k Keeper) CreateGroupPolicy(goCtx context.Context, req *group.MsgCreateGroupPolicy) (*group.MsgCreateGroupPolicyResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) admin, err := sdk.AccAddressFromBech32(req.GetAdmin()) if err != nil { @@ -241,7 +241,7 @@ func (k Keeper) CreateGroupAccount(goCtx context.Context, req *group.MsgCreateGr groupID := req.GetGroupID() metadata := req.GetMetadata() - if err := assertMetadataLength(metadata, "group account metadata"); err != nil { + if err := assertMetadataLength(metadata, "group policy metadata"); err != nil { return nil, err } @@ -253,20 +253,20 @@ func (k Keeper) CreateGroupAccount(goCtx context.Context, req *group.MsgCreateGr if err != nil { return nil, sdkerrors.Wrap(err, "group admin") } - // Only current group admin is authorized to create a group account for this + // Only current group admin is authorized to create a group policy for this if !groupAdmin.Equals(admin) { return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "not group admin") } - // Generate group account address. + // Generate account address of group policy. var accountAddr sdk.AccAddress // loop here in the rare case of a collision for { - nextAccVal := k.groupAccountSeq.NextVal(ctx.KVStore(k.key)) + nextAccVal := k.groupPolicySeq.NextVal(ctx.KVStore(k.key)) var buf = make([]byte, 8) binary.BigEndian.PutUint64(buf, nextAccVal) - parentAcc := address.Module(group.ModuleName, []byte{GroupAccountTablePrefix}) + parentAcc := address.Module(group.ModuleName, []byte{GroupPolicyTablePrefix}) accountAddr = address.Derive(parentAcc, buf) if k.accKeeper.GetAccount(ctx, accountAddr) != nil { @@ -284,7 +284,7 @@ func (k Keeper) CreateGroupAccount(goCtx context.Context, req *group.MsgCreateGr break } - groupAccount, err := group.NewGroupAccountInfo( + groupPolicy, err := group.NewGroupPolicyInfo( accountAddr, groupID, admin, @@ -296,83 +296,83 @@ func (k Keeper) CreateGroupAccount(goCtx context.Context, req *group.MsgCreateGr return nil, err } - if err := k.groupAccountTable.Create(ctx.KVStore(k.key), &groupAccount); err != nil { - return nil, sdkerrors.Wrap(err, "could not create group account") + if err := k.groupPolicyTable.Create(ctx.KVStore(k.key), &groupPolicy); err != nil { + return nil, sdkerrors.Wrap(err, "could not create group policy") } - err = ctx.EventManager().EmitTypedEvent(&group.EventCreateGroupAccount{Address: accountAddr.String()}) + err = ctx.EventManager().EmitTypedEvent(&group.EventCreateGroupPolicy{Address: accountAddr.String()}) if err != nil { return nil, err } - return &group.MsgCreateGroupAccountResponse{Address: accountAddr.String()}, nil + return &group.MsgCreateGroupPolicyResponse{Address: accountAddr.String()}, nil } -func (k Keeper) UpdateGroupAccountAdmin(goCtx context.Context, req *group.MsgUpdateGroupAccountAdmin) (*group.MsgUpdateGroupAccountAdminResponse, error) { +func (k Keeper) UpdateGroupPolicyAdmin(goCtx context.Context, req *group.MsgUpdateGroupPolicyAdmin) (*group.MsgUpdateGroupPolicyAdminResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - action := func(groupAccount *group.GroupAccountInfo) error { - groupAccount.Admin = req.NewAdmin - groupAccount.Version++ - return k.groupAccountTable.Update(ctx.KVStore(k.key), groupAccount) + action := func(groupPolicy *group.GroupPolicyInfo) error { + groupPolicy.Admin = req.NewAdmin + groupPolicy.Version++ + return k.groupPolicyTable.Update(ctx.KVStore(k.key), groupPolicy) } - err := k.doUpdateGroupAccount(ctx, req.Address, req.Admin, action, "group account admin updated") + err := k.doUpdateGroupPolicy(ctx, req.Address, req.Admin, action, "group policy admin updated") if err != nil { return nil, err } - return &group.MsgUpdateGroupAccountAdminResponse{}, nil + return &group.MsgUpdateGroupPolicyAdminResponse{}, nil } -func (k Keeper) UpdateGroupAccountDecisionPolicy(goCtx context.Context, req *group.MsgUpdateGroupAccountDecisionPolicy) (*group.MsgUpdateGroupAccountDecisionPolicyResponse, error) { +func (k Keeper) UpdateGroupPolicyDecisionPolicy(goCtx context.Context, req *group.MsgUpdateGroupPolicyDecisionPolicy) (*group.MsgUpdateGroupPolicyDecisionPolicyResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) policy := req.GetDecisionPolicy() - action := func(groupAccount *group.GroupAccountInfo) error { - err := groupAccount.SetDecisionPolicy(policy) + action := func(groupPolicy *group.GroupPolicyInfo) error { + err := groupPolicy.SetDecisionPolicy(policy) if err != nil { return err } - groupAccount.Version++ - return k.groupAccountTable.Update(ctx.KVStore(k.key), groupAccount) + groupPolicy.Version++ + return k.groupPolicyTable.Update(ctx.KVStore(k.key), groupPolicy) } - err := k.doUpdateGroupAccount(ctx, req.Address, req.Admin, action, "group account decision policy updated") + err := k.doUpdateGroupPolicy(ctx, req.Address, req.Admin, action, "group policy's decision policy updated") if err != nil { return nil, err } - return &group.MsgUpdateGroupAccountDecisionPolicyResponse{}, nil + return &group.MsgUpdateGroupPolicyDecisionPolicyResponse{}, nil } -func (k Keeper) UpdateGroupAccountMetadata(goCtx context.Context, req *group.MsgUpdateGroupAccountMetadata) (*group.MsgUpdateGroupAccountMetadataResponse, error) { +func (k Keeper) UpdateGroupPolicyMetadata(goCtx context.Context, req *group.MsgUpdateGroupPolicyMetadata) (*group.MsgUpdateGroupPolicyMetadataResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) metadata := req.GetMetadata() - action := func(groupAccount *group.GroupAccountInfo) error { - groupAccount.Metadata = metadata - groupAccount.Version++ - return k.groupAccountTable.Update(ctx.KVStore(k.key), groupAccount) + action := func(groupPolicy *group.GroupPolicyInfo) error { + groupPolicy.Metadata = metadata + groupPolicy.Version++ + return k.groupPolicyTable.Update(ctx.KVStore(k.key), groupPolicy) } - if err := assertMetadataLength(metadata, "group account metadata"); err != nil { + if err := assertMetadataLength(metadata, "group policy metadata"); err != nil { return nil, err } - err := k.doUpdateGroupAccount(ctx, req.Address, req.Admin, action, "group account metadata updated") + err := k.doUpdateGroupPolicy(ctx, req.Address, req.Admin, action, "group policy metadata updated") if err != nil { return nil, err } - return &group.MsgUpdateGroupAccountMetadataResponse{}, nil + return &group.MsgUpdateGroupPolicyMetadataResponse{}, nil } func (k Keeper) CreateProposal(goCtx context.Context, req *group.MsgCreateProposal) (*group.MsgCreateProposalResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) accountAddress, err := sdk.AccAddressFromBech32(req.Address) if err != nil { - return nil, sdkerrors.Wrap(err, "request group account") + return nil, sdkerrors.Wrap(err, "request account address of group policy") } metadata := req.Metadata proposers := req.Proposers @@ -382,14 +382,14 @@ func (k Keeper) CreateProposal(goCtx context.Context, req *group.MsgCreatePropos return nil, err } - account, err := k.getGroupAccountInfo(ctx, req.Address) + policyAcc, err := k.getGroupPolicyInfo(ctx, req.Address) if err != nil { - return nil, sdkerrors.Wrap(err, "load group account") + return nil, sdkerrors.Wrap(err, "load group policy") } - g, err := k.getGroupInfo(ctx, account.GroupId) + g, err := k.getGroupInfo(ctx, policyAcc.GroupId) if err != nil { - return nil, sdkerrors.Wrap(err, "get group by account") + return nil, sdkerrors.Wrap(err, "get group by groupId of group policy") } // Only members of the group can submit a new proposal. @@ -399,12 +399,12 @@ func (k Keeper) CreateProposal(goCtx context.Context, req *group.MsgCreatePropos } } - // Check that if the messages require signers, they are all equal to the given group account. + // Check that if the messages require signers, they are all equal to the given account address of group policy. if err := ensureMsgAuthZ(msgs, accountAddress); err != nil { return nil, err } - policy := account.GetDecisionPolicy() + policy := policyAcc.GetDecisionPolicy() if policy == nil { return nil, sdkerrors.Wrap(errors.ErrEmpty, "nil policy") } @@ -421,17 +421,17 @@ func (k Keeper) CreateProposal(goCtx context.Context, req *group.MsgCreatePropos window := timeout m := &group.Proposal{ - ProposalId: k.proposalTable.Sequence().PeekNextVal(ctx.KVStore(k.key)), - Address: req.Address, - Metadata: metadata, - Proposers: proposers, - SubmittedAt: ctx.BlockTime(), - GroupVersion: g.Version, - GroupAccountVersion: account.Version, - Result: group.ProposalResultUnfinalized, - Status: group.ProposalStatusSubmitted, - ExecutorResult: group.ProposalExecutorResultNotRun, - Timeout: ctx.BlockTime().Add(window), + ProposalId: k.proposalTable.Sequence().PeekNextVal(ctx.KVStore(k.key)), + Address: req.Address, + Metadata: metadata, + Proposers: proposers, + SubmittedAt: ctx.BlockTime(), + GroupVersion: g.Version, + GroupPolicyVersion: policyAcc.Version, + Result: group.ProposalResultUnfinalized, + Status: group.ProposalStatusSubmitted, + ExecutorResult: group.ProposalExecutorResultNotRun, + Timeout: ctx.BlockTime().Add(window), VoteState: group.Tally{ YesCount: "0", NoCount: "0", @@ -471,7 +471,7 @@ func (k Keeper) CreateProposal(goCtx context.Context, req *group.MsgCreatePropos _, err = k.Exec(sdk.WrapSDKContext(ctx), &group.MsgExec{ ProposalId: id, // We consider the first proposer as the MsgExecRequest signer - // but that could be revisited (eg using the group account) + // but that could be revisited (eg using the group policy) Signer: proposers[0], }) if err != nil { @@ -512,18 +512,18 @@ func (k Keeper) Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteR return nil, sdkerrors.Wrap(errors.ErrExpired, "voting period has ended already") } - var accountInfo group.GroupAccountInfo + var policyInfo group.GroupPolicyInfo - // Ensure that group account hasn't been modified since the proposal submission. - if accountInfo, err = k.getGroupAccountInfo(ctx, proposal.Address); err != nil { - return nil, sdkerrors.Wrap(err, "load group account") + // Ensure that group policy hasn't been modified since the proposal submission. + if policyInfo, err = k.getGroupPolicyInfo(ctx, proposal.Address); err != nil { + return nil, sdkerrors.Wrap(err, "load group policy") } - if proposal.GroupAccountVersion != accountInfo.Version { - return nil, sdkerrors.Wrap(errors.ErrModified, "group account was modified") + if proposal.GroupPolicyVersion != policyInfo.Version { + return nil, sdkerrors.Wrap(errors.ErrModified, "group policy was modified") } // Ensure that group hasn't been modified since the proposal submission. - electorate, err := k.getGroupInfo(ctx, accountInfo.GroupId) + electorate, err := k.getGroupInfo(ctx, policyInfo.GroupId) if err != nil { return nil, err } @@ -555,7 +555,7 @@ func (k Keeper) Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteR } // Run tally with new votes to close early. - if err := doTally(ctx, &proposal, electorate, accountInfo); err != nil { + if err := doTally(ctx, &proposal, electorate, policyInfo); err != nil { return nil, err } @@ -582,9 +582,9 @@ func (k Keeper) Vote(goCtx context.Context, req *group.MsgVote) (*group.MsgVoteR return &group.MsgVoteResponse{}, nil } -// doTally updates the proposal status and tally if necessary based on the group account's decision policy. -func doTally(ctx sdk.Context, p *group.Proposal, electorate group.GroupInfo, accountInfo group.GroupAccountInfo) error { - policy := accountInfo.GetDecisionPolicy() +// doTally updates the proposal status and tally if necessary based on the group policy's decision policy. +func doTally(ctx sdk.Context, p *group.Proposal, electorate group.GroupInfo, policyInfo group.GroupPolicyInfo) error { + policy := policyInfo.GetDecisionPolicy() pSubmittedAt, err := gogotypes.TimestampProto(p.SubmittedAt) if err != nil { return err @@ -620,9 +620,9 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR return nil, sdkerrors.Wrapf(errors.ErrInvalid, "not possible with proposal status %s", proposal.Status.String()) } - var accountInfo group.GroupAccountInfo - if accountInfo, err = k.getGroupAccountInfo(ctx, proposal.Address); err != nil { - return nil, sdkerrors.Wrap(err, "load group account") + var policyInfo group.GroupPolicyInfo + if policyInfo, err = k.getGroupPolicyInfo(ctx, proposal.Address); err != nil { + return nil, sdkerrors.Wrap(err, "load group policy") } storeUpdates := func() (*group.MsgExecResponse, error) { @@ -633,14 +633,14 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR } if proposal.Status == group.ProposalStatusSubmitted { - // Ensure that group account hasn't been modified before tally. - if proposal.GroupAccountVersion != accountInfo.Version { + // Ensure that group policy hasn't been modified before tally. + if proposal.GroupPolicyVersion != policyInfo.Version { proposal.Result = group.ProposalResultUnfinalized proposal.Status = group.ProposalStatusAborted return storeUpdates() } - electorate, err := k.getGroupInfo(ctx, accountInfo.GroupId) + electorate, err := k.getGroupInfo(ctx, policyInfo.GroupId) if err != nil { return nil, sdkerrors.Wrap(err, "load group") } @@ -651,7 +651,7 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR proposal.Status = group.ProposalStatusAborted return storeUpdates() } - if err := doTally(ctx, &proposal, electorate, accountInfo); err != nil { + if err := doTally(ctx, &proposal, electorate, policyInfo); err != nil { return nil, err } } @@ -662,7 +662,7 @@ func (k Keeper) Exec(goCtx context.Context, req *group.MsgExec) (*group.MsgExecR // Caching context so that we don't update the store in case of failure. ctx, flush := ctx.CacheContext() - addr, err := sdk.AccAddressFromBech32(accountInfo.Address) + addr, err := sdk.AccAddressFromBech32(policyInfo.Address) if err != nil { return nil, err } @@ -697,31 +697,31 @@ type authNGroupReq interface { } type actionFn func(m *group.GroupInfo) error -type groupAccountActionFn func(m *group.GroupAccountInfo) error +type groupPolicyActionFn func(m *group.GroupPolicyInfo) error -// doUpdateGroupAccount first makes sure that the group account admin initiated the group account update, -// before performing the group account update and emitting an event. -func (k Keeper) doUpdateGroupAccount(ctx sdk.Context, groupAccount string, admin string, action groupAccountActionFn, note string) error { - groupAccountInfo, err := k.getGroupAccountInfo(ctx, groupAccount) +// doUpdateGroupPolicy first makes sure that the group policy admin initiated the group policy update, +// before performing the group policy update and emitting an event. +func (k Keeper) doUpdateGroupPolicy(ctx sdk.Context, groupPolicy string, admin string, action groupPolicyActionFn, note string) error { + groupPolicyInfo, err := k.getGroupPolicyInfo(ctx, groupPolicy) if err != nil { - return sdkerrors.Wrap(err, "load group account") + return sdkerrors.Wrap(err, "load group policy") } - groupAccountAdmin, err := sdk.AccAddressFromBech32(admin) + groupPolicyAdmin, err := sdk.AccAddressFromBech32(admin) if err != nil { - return sdkerrors.Wrap(err, "group account admin") + return sdkerrors.Wrap(err, "group policy admin") } - // Only current group account admin is authorized to update a group account. - if groupAccountAdmin.String() != groupAccountInfo.Admin { - return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "not group account admin") + // Only current group policy admin is authorized to update a group policy. + if groupPolicyAdmin.String() != groupPolicyInfo.Admin { + return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "not group policy admin") } - if err := action(&groupAccountInfo); err != nil { + if err := action(&groupPolicyInfo); err != nil { return sdkerrors.Wrap(err, note) } - err = ctx.EventManager().EmitTypedEvent(&group.EventUpdateGroupAccount{Address: admin}) + err = ctx.EventManager().EmitTypedEvent(&group.EventUpdateGroupPolicy{Address: admin}) if err != nil { return err } diff --git a/x/group/keeper/proposal_executor.go b/x/group/keeper/proposal_executor.go index 4331ad944..865919aab 100644 --- a/x/group/keeper/proposal_executor.go +++ b/x/group/keeper/proposal_executor.go @@ -9,12 +9,12 @@ import ( ) // doExecuteMsgs routes the messages to the registered handlers. Messages are limited to those that require no authZ or -// by the group account only. Otherwise this gives access to other peoples accounts as the sdk ant handler is bypassed -func (s Keeper) doExecuteMsgs(ctx sdk.Context, router *authmiddleware.MsgServiceRouter, proposal group.Proposal, groupAccount sdk.AccAddress) ([]sdk.Result, error) { +// by the account of group policy only. Otherwise this gives access to other peoples accounts as the sdk ant handler is bypassed +func (s Keeper) doExecuteMsgs(ctx sdk.Context, router *authmiddleware.MsgServiceRouter, proposal group.Proposal, groupPolicyAcc sdk.AccAddress) ([]sdk.Result, error) { msgs := proposal.GetMsgs() results := make([]sdk.Result, len(msgs)) - if err := ensureMsgAuthZ(msgs, groupAccount); err != nil { + if err := ensureMsgAuthZ(msgs, groupPolicyAcc); err != nil { return nil, err } for i, msg := range msgs { @@ -33,12 +33,12 @@ func (s Keeper) doExecuteMsgs(ctx sdk.Context, router *authmiddleware.MsgService return results, nil } -// ensureMsgAuthZ checks that if a message requires signers that all of them are equal to the given group account. -func ensureMsgAuthZ(msgs []sdk.Msg, groupAccount sdk.AccAddress) error { +// ensureMsgAuthZ checks that if a message requires signers that all of them are equal to the given account address of group policy. +func ensureMsgAuthZ(msgs []sdk.Msg, groupPolicyAcc sdk.AccAddress) error { for i := range msgs { for _, acct := range msgs[i].GetSigners() { - if !groupAccount.Equals(acct) { - return errors.Wrap(errors.ErrUnauthorized, "msg does not have group account authorization") + if !groupPolicyAcc.Equals(acct) { + return errors.Wrap(errors.ErrUnauthorized, "msg does not have group policy authorization") } } } diff --git a/x/group/msgs.go b/x/group/msgs.go index 9728c4131..4e4a11352 100644 --- a/x/group/msgs.go +++ b/x/group/msgs.go @@ -15,17 +15,17 @@ import ( // Group message types and routes const ( - TypeMsgCreateGroup = "create_group" - TypeMsgUpdateGroupAdmin = "update_group_admin" - TypeMsgUpdateGroupComment = "update_group_comment" - TypeMsgUpdateGroupMembers = "update_group_members" - TypeMsgCreateGroupAccount = "create_group_account" - TypeMsgUpdateGroupAccountAdmin = "update_group_account_admin" - TypeMsgUpdateGroupAccountDecisionPolicy = "update_group_account_decision_policy" - TypeMsgUpdateGroupAccountComment = "update_group_account_comment" - TypeMsgCreateProposal = "create_proposal" - TypeMsgVote = "vote" - TypeMsgExec = "exec" + TypeMsgCreateGroup = "create_group" + TypeMsgUpdateGroupAdmin = "update_group_admin" + TypeMsgUpdateGroupComment = "update_group_comment" + TypeMsgUpdateGroupMembers = "update_group_members" + TypeMsgCreateGroupPolicy = "create_group_policy" + TypeMsgUpdateGroupPolicyAdmin = "update_group_policy_admin" + TypeMsgUpdateGroupPolicyDecisionPolicy = "update_group_policy_decision_policy" + TypeMsgUpdateGroupPolicyComment = "update_group_policy_comment" + TypeMsgCreateProposal = "create_proposal" + TypeMsgVote = "vote" + TypeMsgExec = "exec" ) var _ sdk.Msg = &MsgCreateGroup{} @@ -226,23 +226,23 @@ func (m *MsgUpdateGroupMembers) GetGroupID() uint64 { return m.GroupId } -var _ sdk.Msg = &MsgCreateGroupAccount{} +var _ sdk.Msg = &MsgCreateGroupPolicy{} // Route Implements Msg. -func (m MsgCreateGroupAccount) Route() string { +func (m MsgCreateGroupPolicy) Route() string { return RouterKey } // Type Implements Msg. -func (m MsgCreateGroupAccount) Type() string { return TypeMsgCreateGroupAccount } +func (m MsgCreateGroupPolicy) Type() string { return TypeMsgCreateGroupPolicy } // GetSignBytes Implements Msg. -func (m MsgCreateGroupAccount) GetSignBytes() []byte { +func (m MsgCreateGroupPolicy) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) } -// GetSigners returns the expected signers for a MsgCreateGroupAccount. -func (m MsgCreateGroupAccount) GetSigners() []sdk.AccAddress { +// GetSigners returns the expected signers for a MsgCreateGroupPolicy. +func (m MsgCreateGroupPolicy) GetSigners() []sdk.AccAddress { admin, err := sdk.AccAddressFromBech32(m.Admin) if err != nil { panic(err) @@ -251,7 +251,7 @@ func (m MsgCreateGroupAccount) GetSigners() []sdk.AccAddress { } // ValidateBasic does a sanity check on the provided data -func (m MsgCreateGroupAccount) ValidateBasic() error { +func (m MsgCreateGroupPolicy) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(m.Admin) if err != nil { return sdkerrors.Wrap(err, "admin") @@ -271,23 +271,23 @@ func (m MsgCreateGroupAccount) ValidateBasic() error { return nil } -var _ sdk.Msg = &MsgUpdateGroupAccountAdmin{} +var _ sdk.Msg = &MsgUpdateGroupPolicyAdmin{} // Route Implements Msg. -func (m MsgUpdateGroupAccountAdmin) Route() string { +func (m MsgUpdateGroupPolicyAdmin) Route() string { return RouterKey } // Type Implements Msg. -func (m MsgUpdateGroupAccountAdmin) Type() string { return TypeMsgUpdateGroupAccountAdmin } +func (m MsgUpdateGroupPolicyAdmin) Type() string { return TypeMsgUpdateGroupPolicyAdmin } // GetSignBytes Implements Msg. -func (m MsgUpdateGroupAccountAdmin) GetSignBytes() []byte { +func (m MsgUpdateGroupPolicyAdmin) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) } -// GetSigners returns the expected signers for a MsgUpdateGroupAccountAdmin. -func (m MsgUpdateGroupAccountAdmin) GetSigners() []sdk.AccAddress { +// GetSigners returns the expected signers for a MsgUpdateGroupPolicyAdmin. +func (m MsgUpdateGroupPolicyAdmin) GetSigners() []sdk.AccAddress { admin, err := sdk.AccAddressFromBech32(m.Admin) if err != nil { panic(err) @@ -296,7 +296,7 @@ func (m MsgUpdateGroupAccountAdmin) GetSigners() []sdk.AccAddress { } // ValidateBasic does a sanity check on the provided data -func (m MsgUpdateGroupAccountAdmin) ValidateBasic() error { +func (m MsgUpdateGroupPolicyAdmin) ValidateBasic() error { admin, err := sdk.AccAddressFromBech32(m.Admin) if err != nil { return sdkerrors.Wrap(err, "admin") @@ -309,7 +309,7 @@ func (m MsgUpdateGroupAccountAdmin) ValidateBasic() error { _, err = sdk.AccAddressFromBech32(m.Address) if err != nil { - return sdkerrors.Wrap(err, "group account") + return sdkerrors.Wrap(err, "group policy") } if admin.Equals(newAdmin) { @@ -318,11 +318,11 @@ func (m MsgUpdateGroupAccountAdmin) ValidateBasic() error { return nil } -var _ sdk.Msg = &MsgUpdateGroupAccountDecisionPolicy{} -var _ types.UnpackInterfacesMessage = MsgUpdateGroupAccountDecisionPolicy{} +var _ sdk.Msg = &MsgUpdateGroupPolicyDecisionPolicy{} +var _ types.UnpackInterfacesMessage = MsgUpdateGroupPolicyDecisionPolicy{} -func NewMsgUpdateGroupAccountDecisionPolicyRequest(admin sdk.AccAddress, address sdk.AccAddress, decisionPolicy DecisionPolicy) (*MsgUpdateGroupAccountDecisionPolicy, error) { - m := &MsgUpdateGroupAccountDecisionPolicy{ +func NewMsgUpdateGroupPolicyDecisionPolicyRequest(admin sdk.AccAddress, address sdk.AccAddress, decisionPolicy DecisionPolicy) (*MsgUpdateGroupPolicyDecisionPolicy, error) { + m := &MsgUpdateGroupPolicyDecisionPolicy{ Admin: admin.String(), Address: address.String(), } @@ -333,7 +333,7 @@ func NewMsgUpdateGroupAccountDecisionPolicyRequest(admin sdk.AccAddress, address return m, nil } -func (m *MsgUpdateGroupAccountDecisionPolicy) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { +func (m *MsgUpdateGroupPolicyDecisionPolicy) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { msg, ok := decisionPolicy.(proto.Message) if !ok { return fmt.Errorf("can't proto marshal %T", msg) @@ -347,22 +347,22 @@ func (m *MsgUpdateGroupAccountDecisionPolicy) SetDecisionPolicy(decisionPolicy D } // Route Implements Msg. -func (m MsgUpdateGroupAccountDecisionPolicy) Route() string { +func (m MsgUpdateGroupPolicyDecisionPolicy) Route() string { return RouterKey } // Type Implements Msg. -func (m MsgUpdateGroupAccountDecisionPolicy) Type() string { - return TypeMsgUpdateGroupAccountDecisionPolicy +func (m MsgUpdateGroupPolicyDecisionPolicy) Type() string { + return TypeMsgUpdateGroupPolicyDecisionPolicy } // GetSignBytes Implements Msg. -func (m MsgUpdateGroupAccountDecisionPolicy) GetSignBytes() []byte { +func (m MsgUpdateGroupPolicyDecisionPolicy) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) } -// GetSigners returns the expected signers for a MsgUpdateGroupAccountDecisionPolicy. -func (m MsgUpdateGroupAccountDecisionPolicy) GetSigners() []sdk.AccAddress { +// GetSigners returns the expected signers for a MsgUpdateGroupPolicyDecisionPolicy. +func (m MsgUpdateGroupPolicyDecisionPolicy) GetSigners() []sdk.AccAddress { admin, err := sdk.AccAddressFromBech32(m.Admin) if err != nil { panic(err) @@ -371,7 +371,7 @@ func (m MsgUpdateGroupAccountDecisionPolicy) GetSigners() []sdk.AccAddress { } // ValidateBasic does a sanity check on the provided data -func (m MsgUpdateGroupAccountDecisionPolicy) ValidateBasic() error { +func (m MsgUpdateGroupPolicyDecisionPolicy) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(m.Admin) if err != nil { return sdkerrors.Wrap(err, "admin") @@ -379,7 +379,7 @@ func (m MsgUpdateGroupAccountDecisionPolicy) ValidateBasic() error { _, err = sdk.AccAddressFromBech32(m.Address) if err != nil { - return sdkerrors.Wrap(err, "group account") + return sdkerrors.Wrap(err, "group policy") } policy := m.GetDecisionPolicy() @@ -394,7 +394,7 @@ func (m MsgUpdateGroupAccountDecisionPolicy) ValidateBasic() error { return nil } -func (m *MsgUpdateGroupAccountDecisionPolicy) GetDecisionPolicy() DecisionPolicy { +func (m *MsgUpdateGroupPolicyDecisionPolicy) GetDecisionPolicy() DecisionPolicy { decisionPolicy, ok := m.DecisionPolicy.GetCachedValue().(DecisionPolicy) if !ok { return nil @@ -403,28 +403,28 @@ func (m *MsgUpdateGroupAccountDecisionPolicy) GetDecisionPolicy() DecisionPolicy } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (m MsgUpdateGroupAccountDecisionPolicy) UnpackInterfaces(unpacker types.AnyUnpacker) error { +func (m MsgUpdateGroupPolicyDecisionPolicy) UnpackInterfaces(unpacker types.AnyUnpacker) error { var decisionPolicy DecisionPolicy return unpacker.UnpackAny(m.DecisionPolicy, &decisionPolicy) } -var _ sdk.Msg = &MsgUpdateGroupAccountMetadata{} +var _ sdk.Msg = &MsgUpdateGroupPolicyMetadata{} // Route Implements Msg. -func (m MsgUpdateGroupAccountMetadata) Route() string { +func (m MsgUpdateGroupPolicyMetadata) Route() string { return RouterKey } // Type Implements Msg. -func (m MsgUpdateGroupAccountMetadata) Type() string { return TypeMsgUpdateGroupAccountComment } +func (m MsgUpdateGroupPolicyMetadata) Type() string { return TypeMsgUpdateGroupPolicyComment } // GetSignBytes Implements Msg. -func (m MsgUpdateGroupAccountMetadata) GetSignBytes() []byte { +func (m MsgUpdateGroupPolicyMetadata) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) } -// GetSigners returns the expected signers for a MsgUpdateGroupAccountMetadata. -func (m MsgUpdateGroupAccountMetadata) GetSigners() []sdk.AccAddress { +// GetSigners returns the expected signers for a MsgUpdateGroupPolicyMetadata. +func (m MsgUpdateGroupPolicyMetadata) GetSigners() []sdk.AccAddress { admin, err := sdk.AccAddressFromBech32(m.Admin) if err != nil { panic(err) @@ -433,7 +433,7 @@ func (m MsgUpdateGroupAccountMetadata) GetSigners() []sdk.AccAddress { } // ValidateBasic does a sanity check on the provided data -func (m MsgUpdateGroupAccountMetadata) ValidateBasic() error { +func (m MsgUpdateGroupPolicyMetadata) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(m.Admin) if err != nil { return sdkerrors.Wrap(err, "admin") @@ -441,18 +441,18 @@ func (m MsgUpdateGroupAccountMetadata) ValidateBasic() error { _, err = sdk.AccAddressFromBech32(m.Address) if err != nil { - return sdkerrors.Wrap(err, "group account") + return sdkerrors.Wrap(err, "group policy") } return nil } -var _ sdk.Msg = &MsgCreateGroupAccount{} -var _ types.UnpackInterfacesMessage = MsgCreateGroupAccount{} +var _ sdk.Msg = &MsgCreateGroupPolicy{} +var _ types.UnpackInterfacesMessage = MsgCreateGroupPolicy{} -// NewMsgCreateGroupAccount creates a new MsgCreateGroupAccount. -func NewMsgCreateGroupAccount(admin sdk.AccAddress, group uint64, metadata []byte, decisionPolicy DecisionPolicy) (*MsgCreateGroupAccount, error) { - m := &MsgCreateGroupAccount{ +// NewMsgCreateGroupPolicy creates a new MsgCreateGroupPolicy. +func NewMsgCreateGroupPolicy(admin sdk.AccAddress, group uint64, metadata []byte, decisionPolicy DecisionPolicy) (*MsgCreateGroupPolicy, error) { + m := &MsgCreateGroupPolicy{ Admin: admin.String(), GroupId: group, Metadata: metadata, @@ -464,19 +464,19 @@ func NewMsgCreateGroupAccount(admin sdk.AccAddress, group uint64, metadata []byt return m, nil } -func (m *MsgCreateGroupAccount) GetAdmin() string { +func (m *MsgCreateGroupPolicy) GetAdmin() string { return m.Admin } -func (m *MsgCreateGroupAccount) GetGroupID() uint64 { +func (m *MsgCreateGroupPolicy) GetGroupID() uint64 { return m.GroupId } -func (m *MsgCreateGroupAccount) GetMetadata() []byte { +func (m *MsgCreateGroupPolicy) GetMetadata() []byte { return m.Metadata } -func (m *MsgCreateGroupAccount) GetDecisionPolicy() DecisionPolicy { +func (m *MsgCreateGroupPolicy) GetDecisionPolicy() DecisionPolicy { decisionPolicy, ok := m.DecisionPolicy.GetCachedValue().(DecisionPolicy) if !ok { return nil @@ -484,7 +484,7 @@ func (m *MsgCreateGroupAccount) GetDecisionPolicy() DecisionPolicy { return decisionPolicy } -func (m *MsgCreateGroupAccount) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { +func (m *MsgCreateGroupPolicy) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { msg, ok := decisionPolicy.(proto.Message) if !ok { return fmt.Errorf("can't proto marshal %T", msg) @@ -498,7 +498,7 @@ func (m *MsgCreateGroupAccount) SetDecisionPolicy(decisionPolicy DecisionPolicy) } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (m MsgCreateGroupAccount) UnpackInterfaces(unpacker types.AnyUnpacker) error { +func (m MsgCreateGroupPolicy) UnpackInterfaces(unpacker types.AnyUnpacker) error { var decisionPolicy DecisionPolicy return unpacker.UnpackAny(m.DecisionPolicy, &decisionPolicy) } @@ -550,7 +550,7 @@ func (m MsgCreateProposal) GetSigners() []sdk.AccAddress { func (m MsgCreateProposal) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(m.Address) if err != nil { - return sdkerrors.Wrap(err, "group account") + return sdkerrors.Wrap(err, "group policy") } if len(m.Proposers) == 0 { diff --git a/x/group/query.pb.go b/x/group/query.pb.go index 62774990f..99641b67c 100644 --- a/x/group/query.pb.go +++ b/x/group/query.pb.go @@ -122,24 +122,24 @@ func (m *QueryGroupInfoResponse) GetInfo() *GroupInfo { return nil } -// QueryGroupAccountInfoRequest is the Query/GroupAccountInfo request type. -type QueryGroupAccountInfoRequest struct { - // address is the account address of the group account. +// QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. +type QueryGroupPolicyInfoRequest struct { + // address is the account address of the group policy. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } -func (m *QueryGroupAccountInfoRequest) Reset() { *m = QueryGroupAccountInfoRequest{} } -func (m *QueryGroupAccountInfoRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGroupAccountInfoRequest) ProtoMessage() {} -func (*QueryGroupAccountInfoRequest) Descriptor() ([]byte, []int) { +func (m *QueryGroupPolicyInfoRequest) Reset() { *m = QueryGroupPolicyInfoRequest{} } +func (m *QueryGroupPolicyInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGroupPolicyInfoRequest) ProtoMessage() {} +func (*QueryGroupPolicyInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ae47912b18757b1a, []int{2} } -func (m *QueryGroupAccountInfoRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryGroupPolicyInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryGroupAccountInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGroupPolicyInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryGroupAccountInfoRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGroupPolicyInfoRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -149,43 +149,43 @@ func (m *QueryGroupAccountInfoRequest) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *QueryGroupAccountInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGroupAccountInfoRequest.Merge(m, src) +func (m *QueryGroupPolicyInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupPolicyInfoRequest.Merge(m, src) } -func (m *QueryGroupAccountInfoRequest) XXX_Size() int { +func (m *QueryGroupPolicyInfoRequest) XXX_Size() int { return m.Size() } -func (m *QueryGroupAccountInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGroupAccountInfoRequest.DiscardUnknown(m) +func (m *QueryGroupPolicyInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupPolicyInfoRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryGroupAccountInfoRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryGroupPolicyInfoRequest proto.InternalMessageInfo -func (m *QueryGroupAccountInfoRequest) GetAddress() string { +func (m *QueryGroupPolicyInfoRequest) GetAddress() string { if m != nil { return m.Address } return "" } -// QueryGroupAccountInfoResponse is the Query/GroupAccountInfo response type. -type QueryGroupAccountInfoResponse struct { - // info is the GroupAccountInfo for the group account. - Info *GroupAccountInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` +// QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. +type QueryGroupPolicyInfoResponse struct { + // info is the GroupPolicyInfo for the group policy. + Info *GroupPolicyInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` } -func (m *QueryGroupAccountInfoResponse) Reset() { *m = QueryGroupAccountInfoResponse{} } -func (m *QueryGroupAccountInfoResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGroupAccountInfoResponse) ProtoMessage() {} -func (*QueryGroupAccountInfoResponse) Descriptor() ([]byte, []int) { +func (m *QueryGroupPolicyInfoResponse) Reset() { *m = QueryGroupPolicyInfoResponse{} } +func (m *QueryGroupPolicyInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGroupPolicyInfoResponse) ProtoMessage() {} +func (*QueryGroupPolicyInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ae47912b18757b1a, []int{3} } -func (m *QueryGroupAccountInfoResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryGroupPolicyInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryGroupAccountInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGroupPolicyInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryGroupAccountInfoResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGroupPolicyInfoResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -195,19 +195,19 @@ func (m *QueryGroupAccountInfoResponse) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *QueryGroupAccountInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGroupAccountInfoResponse.Merge(m, src) +func (m *QueryGroupPolicyInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupPolicyInfoResponse.Merge(m, src) } -func (m *QueryGroupAccountInfoResponse) XXX_Size() int { +func (m *QueryGroupPolicyInfoResponse) XXX_Size() int { return m.Size() } -func (m *QueryGroupAccountInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGroupAccountInfoResponse.DiscardUnknown(m) +func (m *QueryGroupPolicyInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupPolicyInfoResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryGroupAccountInfoResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryGroupPolicyInfoResponse proto.InternalMessageInfo -func (m *QueryGroupAccountInfoResponse) GetInfo() *GroupAccountInfo { +func (m *QueryGroupPolicyInfoResponse) GetInfo() *GroupPolicyInfo { if m != nil { return m.Info } @@ -434,26 +434,26 @@ func (m *QueryGroupsByAdminResponse) GetPagination() *query.PageResponse { return nil } -// QueryGroupAccountsByGroupRequest is the Query/GroupAccountsByGroup request type. -type QueryGroupAccountsByGroupRequest struct { - // group_id is the unique ID of the group account's group. +// QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. +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"` } -func (m *QueryGroupAccountsByGroupRequest) Reset() { *m = QueryGroupAccountsByGroupRequest{} } -func (m *QueryGroupAccountsByGroupRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGroupAccountsByGroupRequest) ProtoMessage() {} -func (*QueryGroupAccountsByGroupRequest) Descriptor() ([]byte, []int) { +func (m *QueryGroupPoliciesByGroupRequest) Reset() { *m = QueryGroupPoliciesByGroupRequest{} } +func (m *QueryGroupPoliciesByGroupRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGroupPoliciesByGroupRequest) ProtoMessage() {} +func (*QueryGroupPoliciesByGroupRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ae47912b18757b1a, []int{8} } -func (m *QueryGroupAccountsByGroupRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryGroupPoliciesByGroupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryGroupAccountsByGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGroupPoliciesByGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryGroupAccountsByGroupRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGroupPoliciesByGroupRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -463,52 +463,52 @@ func (m *QueryGroupAccountsByGroupRequest) XXX_Marshal(b []byte, deterministic b return b[:n], nil } } -func (m *QueryGroupAccountsByGroupRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGroupAccountsByGroupRequest.Merge(m, src) +func (m *QueryGroupPoliciesByGroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupPoliciesByGroupRequest.Merge(m, src) } -func (m *QueryGroupAccountsByGroupRequest) XXX_Size() int { +func (m *QueryGroupPoliciesByGroupRequest) XXX_Size() int { return m.Size() } -func (m *QueryGroupAccountsByGroupRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGroupAccountsByGroupRequest.DiscardUnknown(m) +func (m *QueryGroupPoliciesByGroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupPoliciesByGroupRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryGroupAccountsByGroupRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryGroupPoliciesByGroupRequest proto.InternalMessageInfo -func (m *QueryGroupAccountsByGroupRequest) GetGroupId() uint64 { +func (m *QueryGroupPoliciesByGroupRequest) GetGroupId() uint64 { if m != nil { return m.GroupId } return 0 } -func (m *QueryGroupAccountsByGroupRequest) GetPagination() *query.PageRequest { +func (m *QueryGroupPoliciesByGroupRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } -// QueryGroupAccountsByGroupResponse is the Query/GroupAccountsByGroup response type. -type QueryGroupAccountsByGroupResponse struct { - // group_accounts are the group accounts info associated with the provided group. - GroupAccounts []*GroupAccountInfo `protobuf:"bytes,1,rep,name=group_accounts,json=groupAccounts,proto3" json:"group_accounts,omitempty"` +// QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. +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"` } -func (m *QueryGroupAccountsByGroupResponse) Reset() { *m = QueryGroupAccountsByGroupResponse{} } -func (m *QueryGroupAccountsByGroupResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGroupAccountsByGroupResponse) ProtoMessage() {} -func (*QueryGroupAccountsByGroupResponse) Descriptor() ([]byte, []int) { +func (m *QueryGroupPoliciesByGroupResponse) Reset() { *m = QueryGroupPoliciesByGroupResponse{} } +func (m *QueryGroupPoliciesByGroupResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGroupPoliciesByGroupResponse) ProtoMessage() {} +func (*QueryGroupPoliciesByGroupResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ae47912b18757b1a, []int{9} } -func (m *QueryGroupAccountsByGroupResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryGroupPoliciesByGroupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryGroupAccountsByGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGroupPoliciesByGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryGroupAccountsByGroupResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGroupPoliciesByGroupResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -518,52 +518,52 @@ func (m *QueryGroupAccountsByGroupResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QueryGroupAccountsByGroupResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGroupAccountsByGroupResponse.Merge(m, src) +func (m *QueryGroupPoliciesByGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupPoliciesByGroupResponse.Merge(m, src) } -func (m *QueryGroupAccountsByGroupResponse) XXX_Size() int { +func (m *QueryGroupPoliciesByGroupResponse) XXX_Size() int { return m.Size() } -func (m *QueryGroupAccountsByGroupResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGroupAccountsByGroupResponse.DiscardUnknown(m) +func (m *QueryGroupPoliciesByGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupPoliciesByGroupResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryGroupAccountsByGroupResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryGroupPoliciesByGroupResponse proto.InternalMessageInfo -func (m *QueryGroupAccountsByGroupResponse) GetGroupAccounts() []*GroupAccountInfo { +func (m *QueryGroupPoliciesByGroupResponse) GetGroupPolicies() []*GroupPolicyInfo { if m != nil { - return m.GroupAccounts + return m.GroupPolicies } return nil } -func (m *QueryGroupAccountsByGroupResponse) GetPagination() *query.PageResponse { +func (m *QueryGroupPoliciesByGroupResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } -// QueryGroupAccountsByAdminRequest is the Query/GroupAccountsByAdmin request type. -type QueryGroupAccountsByAdminRequest struct { - // admin is the admin address of the group account. +// QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. +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"` } -func (m *QueryGroupAccountsByAdminRequest) Reset() { *m = QueryGroupAccountsByAdminRequest{} } -func (m *QueryGroupAccountsByAdminRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGroupAccountsByAdminRequest) ProtoMessage() {} -func (*QueryGroupAccountsByAdminRequest) Descriptor() ([]byte, []int) { +func (m *QueryGroupPoliciesByAdminRequest) Reset() { *m = QueryGroupPoliciesByAdminRequest{} } +func (m *QueryGroupPoliciesByAdminRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGroupPoliciesByAdminRequest) ProtoMessage() {} +func (*QueryGroupPoliciesByAdminRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ae47912b18757b1a, []int{10} } -func (m *QueryGroupAccountsByAdminRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryGroupPoliciesByAdminRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryGroupAccountsByAdminRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGroupPoliciesByAdminRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryGroupAccountsByAdminRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGroupPoliciesByAdminRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -573,52 +573,52 @@ func (m *QueryGroupAccountsByAdminRequest) XXX_Marshal(b []byte, deterministic b return b[:n], nil } } -func (m *QueryGroupAccountsByAdminRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGroupAccountsByAdminRequest.Merge(m, src) +func (m *QueryGroupPoliciesByAdminRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupPoliciesByAdminRequest.Merge(m, src) } -func (m *QueryGroupAccountsByAdminRequest) XXX_Size() int { +func (m *QueryGroupPoliciesByAdminRequest) XXX_Size() int { return m.Size() } -func (m *QueryGroupAccountsByAdminRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGroupAccountsByAdminRequest.DiscardUnknown(m) +func (m *QueryGroupPoliciesByAdminRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupPoliciesByAdminRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryGroupAccountsByAdminRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryGroupPoliciesByAdminRequest proto.InternalMessageInfo -func (m *QueryGroupAccountsByAdminRequest) GetAdmin() string { +func (m *QueryGroupPoliciesByAdminRequest) GetAdmin() string { if m != nil { return m.Admin } return "" } -func (m *QueryGroupAccountsByAdminRequest) GetPagination() *query.PageRequest { +func (m *QueryGroupPoliciesByAdminRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } -// QueryGroupAccountsByAdminResponse is the Query/GroupAccountsByAdmin response type. -type QueryGroupAccountsByAdminResponse struct { - // group_accounts are the group accounts info with provided admin. - GroupAccounts []*GroupAccountInfo `protobuf:"bytes,1,rep,name=group_accounts,json=groupAccounts,proto3" json:"group_accounts,omitempty"` +// QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. +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"` } -func (m *QueryGroupAccountsByAdminResponse) Reset() { *m = QueryGroupAccountsByAdminResponse{} } -func (m *QueryGroupAccountsByAdminResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGroupAccountsByAdminResponse) ProtoMessage() {} -func (*QueryGroupAccountsByAdminResponse) Descriptor() ([]byte, []int) { +func (m *QueryGroupPoliciesByAdminResponse) Reset() { *m = QueryGroupPoliciesByAdminResponse{} } +func (m *QueryGroupPoliciesByAdminResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGroupPoliciesByAdminResponse) ProtoMessage() {} +func (*QueryGroupPoliciesByAdminResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ae47912b18757b1a, []int{11} } -func (m *QueryGroupAccountsByAdminResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryGroupPoliciesByAdminResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryGroupAccountsByAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGroupPoliciesByAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryGroupAccountsByAdminResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGroupPoliciesByAdminResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -628,26 +628,26 @@ func (m *QueryGroupAccountsByAdminResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QueryGroupAccountsByAdminResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGroupAccountsByAdminResponse.Merge(m, src) +func (m *QueryGroupPoliciesByAdminResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupPoliciesByAdminResponse.Merge(m, src) } -func (m *QueryGroupAccountsByAdminResponse) XXX_Size() int { +func (m *QueryGroupPoliciesByAdminResponse) XXX_Size() int { return m.Size() } -func (m *QueryGroupAccountsByAdminResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGroupAccountsByAdminResponse.DiscardUnknown(m) +func (m *QueryGroupPoliciesByAdminResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupPoliciesByAdminResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryGroupAccountsByAdminResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryGroupPoliciesByAdminResponse proto.InternalMessageInfo -func (m *QueryGroupAccountsByAdminResponse) GetGroupAccounts() []*GroupAccountInfo { +func (m *QueryGroupPoliciesByAdminResponse) GetGroupPolicies() []*GroupPolicyInfo { if m != nil { - return m.GroupAccounts + return m.GroupPolicies } return nil } -func (m *QueryGroupAccountsByAdminResponse) GetPagination() *query.PageResponse { +func (m *QueryGroupPoliciesByAdminResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } @@ -746,26 +746,26 @@ func (m *QueryProposalResponse) GetProposal() *Proposal { return nil } -// QueryProposalsByGroupAccountRequest is the Query/ProposalByGroupAccount request type. -type QueryProposalsByGroupAccountRequest struct { - // address is the group account address related to proposals. +// QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. +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"` } -func (m *QueryProposalsByGroupAccountRequest) Reset() { *m = QueryProposalsByGroupAccountRequest{} } -func (m *QueryProposalsByGroupAccountRequest) String() string { return proto.CompactTextString(m) } -func (*QueryProposalsByGroupAccountRequest) ProtoMessage() {} -func (*QueryProposalsByGroupAccountRequest) Descriptor() ([]byte, []int) { +func (m *QueryProposalsByGroupPolicyRequest) Reset() { *m = QueryProposalsByGroupPolicyRequest{} } +func (m *QueryProposalsByGroupPolicyRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProposalsByGroupPolicyRequest) ProtoMessage() {} +func (*QueryProposalsByGroupPolicyRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ae47912b18757b1a, []int{14} } -func (m *QueryProposalsByGroupAccountRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryProposalsByGroupPolicyRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryProposalsByGroupAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryProposalsByGroupPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryProposalsByGroupAccountRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryProposalsByGroupPolicyRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -775,52 +775,52 @@ func (m *QueryProposalsByGroupAccountRequest) XXX_Marshal(b []byte, deterministi return b[:n], nil } } -func (m *QueryProposalsByGroupAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryProposalsByGroupAccountRequest.Merge(m, src) +func (m *QueryProposalsByGroupPolicyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalsByGroupPolicyRequest.Merge(m, src) } -func (m *QueryProposalsByGroupAccountRequest) XXX_Size() int { +func (m *QueryProposalsByGroupPolicyRequest) XXX_Size() int { return m.Size() } -func (m *QueryProposalsByGroupAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryProposalsByGroupAccountRequest.DiscardUnknown(m) +func (m *QueryProposalsByGroupPolicyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalsByGroupPolicyRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryProposalsByGroupAccountRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryProposalsByGroupPolicyRequest proto.InternalMessageInfo -func (m *QueryProposalsByGroupAccountRequest) GetAddress() string { +func (m *QueryProposalsByGroupPolicyRequest) GetAddress() string { if m != nil { return m.Address } return "" } -func (m *QueryProposalsByGroupAccountRequest) GetPagination() *query.PageRequest { +func (m *QueryProposalsByGroupPolicyRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } -// QueryProposalsByGroupAccountResponse is the Query/ProposalByGroupAccount response type. -type QueryProposalsByGroupAccountResponse struct { - // proposals are the proposals with given group account. +// QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. +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"` } -func (m *QueryProposalsByGroupAccountResponse) Reset() { *m = QueryProposalsByGroupAccountResponse{} } -func (m *QueryProposalsByGroupAccountResponse) String() string { return proto.CompactTextString(m) } -func (*QueryProposalsByGroupAccountResponse) ProtoMessage() {} -func (*QueryProposalsByGroupAccountResponse) Descriptor() ([]byte, []int) { +func (m *QueryProposalsByGroupPolicyResponse) Reset() { *m = QueryProposalsByGroupPolicyResponse{} } +func (m *QueryProposalsByGroupPolicyResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProposalsByGroupPolicyResponse) ProtoMessage() {} +func (*QueryProposalsByGroupPolicyResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ae47912b18757b1a, []int{15} } -func (m *QueryProposalsByGroupAccountResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryProposalsByGroupPolicyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryProposalsByGroupAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryProposalsByGroupPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryProposalsByGroupAccountResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryProposalsByGroupPolicyResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -830,26 +830,26 @@ func (m *QueryProposalsByGroupAccountResponse) XXX_Marshal(b []byte, determinist return b[:n], nil } } -func (m *QueryProposalsByGroupAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryProposalsByGroupAccountResponse.Merge(m, src) +func (m *QueryProposalsByGroupPolicyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalsByGroupPolicyResponse.Merge(m, src) } -func (m *QueryProposalsByGroupAccountResponse) XXX_Size() int { +func (m *QueryProposalsByGroupPolicyResponse) XXX_Size() int { return m.Size() } -func (m *QueryProposalsByGroupAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryProposalsByGroupAccountResponse.DiscardUnknown(m) +func (m *QueryProposalsByGroupPolicyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalsByGroupPolicyResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryProposalsByGroupAccountResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryProposalsByGroupPolicyResponse proto.InternalMessageInfo -func (m *QueryProposalsByGroupAccountResponse) GetProposals() []*Proposal { +func (m *QueryProposalsByGroupPolicyResponse) GetProposals() []*Proposal { if m != nil { return m.Proposals } return nil } -func (m *QueryProposalsByGroupAccountResponse) GetPagination() *query.PageResponse { +func (m *QueryProposalsByGroupPolicyResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } @@ -1290,20 +1290,20 @@ func (m *QueryGroupsByMemberResponse) GetPagination() *query.PageResponse { func init() { proto.RegisterType((*QueryGroupInfoRequest)(nil), "cosmos.group.v1beta1.QueryGroupInfoRequest") proto.RegisterType((*QueryGroupInfoResponse)(nil), "cosmos.group.v1beta1.QueryGroupInfoResponse") - proto.RegisterType((*QueryGroupAccountInfoRequest)(nil), "cosmos.group.v1beta1.QueryGroupAccountInfoRequest") - proto.RegisterType((*QueryGroupAccountInfoResponse)(nil), "cosmos.group.v1beta1.QueryGroupAccountInfoResponse") + proto.RegisterType((*QueryGroupPolicyInfoRequest)(nil), "cosmos.group.v1beta1.QueryGroupPolicyInfoRequest") + proto.RegisterType((*QueryGroupPolicyInfoResponse)(nil), "cosmos.group.v1beta1.QueryGroupPolicyInfoResponse") proto.RegisterType((*QueryGroupMembersRequest)(nil), "cosmos.group.v1beta1.QueryGroupMembersRequest") proto.RegisterType((*QueryGroupMembersResponse)(nil), "cosmos.group.v1beta1.QueryGroupMembersResponse") proto.RegisterType((*QueryGroupsByAdminRequest)(nil), "cosmos.group.v1beta1.QueryGroupsByAdminRequest") proto.RegisterType((*QueryGroupsByAdminResponse)(nil), "cosmos.group.v1beta1.QueryGroupsByAdminResponse") - proto.RegisterType((*QueryGroupAccountsByGroupRequest)(nil), "cosmos.group.v1beta1.QueryGroupAccountsByGroupRequest") - proto.RegisterType((*QueryGroupAccountsByGroupResponse)(nil), "cosmos.group.v1beta1.QueryGroupAccountsByGroupResponse") - proto.RegisterType((*QueryGroupAccountsByAdminRequest)(nil), "cosmos.group.v1beta1.QueryGroupAccountsByAdminRequest") - proto.RegisterType((*QueryGroupAccountsByAdminResponse)(nil), "cosmos.group.v1beta1.QueryGroupAccountsByAdminResponse") + proto.RegisterType((*QueryGroupPoliciesByGroupRequest)(nil), "cosmos.group.v1beta1.QueryGroupPoliciesByGroupRequest") + proto.RegisterType((*QueryGroupPoliciesByGroupResponse)(nil), "cosmos.group.v1beta1.QueryGroupPoliciesByGroupResponse") + proto.RegisterType((*QueryGroupPoliciesByAdminRequest)(nil), "cosmos.group.v1beta1.QueryGroupPoliciesByAdminRequest") + proto.RegisterType((*QueryGroupPoliciesByAdminResponse)(nil), "cosmos.group.v1beta1.QueryGroupPoliciesByAdminResponse") proto.RegisterType((*QueryProposalRequest)(nil), "cosmos.group.v1beta1.QueryProposalRequest") proto.RegisterType((*QueryProposalResponse)(nil), "cosmos.group.v1beta1.QueryProposalResponse") - proto.RegisterType((*QueryProposalsByGroupAccountRequest)(nil), "cosmos.group.v1beta1.QueryProposalsByGroupAccountRequest") - proto.RegisterType((*QueryProposalsByGroupAccountResponse)(nil), "cosmos.group.v1beta1.QueryProposalsByGroupAccountResponse") + proto.RegisterType((*QueryProposalsByGroupPolicyRequest)(nil), "cosmos.group.v1beta1.QueryProposalsByGroupPolicyRequest") + proto.RegisterType((*QueryProposalsByGroupPolicyResponse)(nil), "cosmos.group.v1beta1.QueryProposalsByGroupPolicyResponse") proto.RegisterType((*QueryVoteByProposalVoterRequest)(nil), "cosmos.group.v1beta1.QueryVoteByProposalVoterRequest") proto.RegisterType((*QueryVoteByProposalVoterResponse)(nil), "cosmos.group.v1beta1.QueryVoteByProposalVoterResponse") proto.RegisterType((*QueryVotesByProposalRequest)(nil), "cosmos.group.v1beta1.QueryVotesByProposalRequest") @@ -1317,80 +1317,80 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/query.proto", fileDescriptor_ae47912b18757b1a) } var fileDescriptor_ae47912b18757b1a = []byte{ - // 1158 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xf4, 0x9b, 0x36, 0xc9, 0x4b, 0xdb, 0x2f, 0x0c, 0x01, 0x9c, 0xa5, 0x38, 0xa9, 0xa9, - 0xa0, 0x6a, 0x9a, 0xdd, 0xc4, 0x69, 0xe2, 0x62, 0x0a, 0x22, 0x16, 0xa2, 0x0a, 0x52, 0xa4, 0xe2, - 0x4a,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7, - 0xc5, 0xa2, 0x8d, 0x33, 0xfc, 0xdf, 0xaa, 0x6b, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x46, 0x16, - 0x8f, 0xe9, 0x17, 0x16, 0x00, 0x00, + // 1168 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xdf, 0x6b, 0x1c, 0x55, + 0x14, 0xce, 0xad, 0x69, 0x93, 0x9c, 0xf4, 0x07, 0x5e, 0x63, 0xd9, 0x8c, 0x65, 0x93, 0x8e, 0xbf, + 0x4a, 0xd3, 0xcc, 0x64, 0x37, 0x26, 0x9b, 0xb4, 0x2a, 0x66, 0x11, 0x4b, 0xc4, 0x42, 0xba, 0x05, + 0x41, 0x5f, 0xc2, 0x6c, 0x76, 0xb2, 0x0e, 0x66, 0xe7, 0x6e, 0x67, 0x26, 0xc5, 0x25, 0xec, 0x8b, + 0xa0, 0xcf, 0x62, 0x41, 0xac, 0x8a, 0x3f, 0x1e, 0x44, 0x04, 0xc1, 0x07, 0x05, 0xc1, 0x3f, 0x40, + 0xf4, 0x2d, 0xe8, 0x8b, 0x8f, 0x92, 0xf8, 0x87, 0xc8, 0xdc, 0x7b, 0xee, 0xce, 0xcc, 0xe6, 0x66, + 0x66, 0x56, 0x17, 0x9b, 0xa7, 0x30, 0xb3, 0xe7, 0xdc, 0xf3, 0x7d, 0xdf, 0x39, 0x73, 0xef, 0x77, + 0x03, 0xb3, 0x5b, 0xcc, 0x6f, 0x31, 0xdf, 0x6c, 0x7a, 0x6c, 0xb7, 0x6d, 0xde, 0x2b, 0xd5, 0xed, + 0xc0, 0x2a, 0x99, 0x77, 0x77, 0x6d, 0xaf, 0x63, 0xb4, 0x3d, 0x16, 0x30, 0x3a, 0x25, 0x22, 0x0c, + 0x1e, 0x61, 0x60, 0x84, 0x76, 0xa9, 0xc9, 0x58, 0x73, 0xc7, 0x36, 0xad, 0xb6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+ 0x33, 0xfa, 0x0a, 0x40, 0xd4, 0x96, 0xc2, 0x29, 0x5e, 0xf7, 0x19, 0x59, 0x37, 0xec, 0xa1, 0x21, + 0x46, 0x46, 0x16, 0xdf, 0xb0, 0x9a, 0x36, 0x2e, 0x5b, 0x8b, 0x65, 0xea, 0x5f, 0x11, 0x98, 0x56, + 0xd4, 0x47, 0x5e, 0x37, 0x60, 0xac, 0x25, 0x5e, 0x15, 0xc8, 0xec, 0x23, 0x57, 0x26, 0xcb, 0x97, + 0x53, 0xa8, 0x89, 0xe4, 0x9a, 0xcc, 0xa0, 0x37, 0x15, 0x10, 0x9f, 0xcd, 0x84, 0x28, 0x2a, 0x27, + 0x30, 0xde, 0x4f, 0x60, 0xf4, 0xab, 0x9d, 0xb5, 0x46, 0xcb, 0x71, 0xa5, 0x48, 0x06, 0x9c, 0xb6, + 0xc2, 0xe7, 0xcc, 0x6e, 0x8a, 0xb0, 0xa1, 0x29, 0xf7, 0x39, 0x01, 0x4d, 0x85, 0x0a, 0xa5, 0xab, + 0xc0, 0x19, 0xae, 0x91, 0x54, 0x2e, 0x73, 0x78, 0x31, 0x7c, 0x78, 0xb2, 0xbd, 0x47, 0x60, 0xb6, + 0x6f, 0x6a, 0x1d, 0xdb, 0xaf, 0x8a, 0xc7, 0xff, 0x71, 0xc4, 0x7e, 0x26, 0x70, 0x39, 0x05, 0x07, + 0xea, 0xf5, 0x1a, 0x9c, 0x17, 0x40, 0xda, 0x18, 0x80, 0xba, 0xe5, 0xfc, 0x98, 0xce, 0x35, 0xe3, + 0x8b, 0x0f, 0x4f, 0xc4, 0x4f, 0x8e, 0x11, 0xf1, 0x44, 0x8c, 0xe0, 0x71, 0xca, 0x26, 0x27, 0xf1, + 0x84, 0x2a, 0x5b, 0x81, 0x29, 0x8e, 0x7d, 0xc3, 0x63, 0x6d, 0xe6, 0x5b, 0x3b, 0x52, 0xcc, 0x19, + 0x98, 0x6c, 0xe3, 0xab, 0x68, 0x28, 0x41, 0xbe, 0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8c, 0x7a, 0xa3, 0xc2, 0xdf, 0x13, + 0x38, 0x9f, 0x74, 0x22, 0x34, 0xcf, 0xa6, 0x9d, 0xf0, 0x53, 0x5a, 0x69, 0x80, 0x0c, 0x44, 0xbb, + 0xc2, 0xd1, 0x96, 0xe9, 0x42, 0xd6, 0x3e, 0x2f, 0x0e, 0xa6, 0x68, 0xcc, 0xab, 0x2f, 0xfe, 0x7a, + 0x50, 0x24, 0xfb, 0x07, 0x45, 0xf2, 0xd7, 0x41, 0x91, 0x7c, 0x70, 0x58, 0x1c, 0xd9, 0x3f, 0x2c, + 0x8e, 0xfc, 0x79, 0x58, 0x1c, 0x79, 0xf3, 0xa9, 0xa6, 0x13, 0xbc, 0xb5, 0x5b, 0x37, 0xb6, 0x58, + 0x4b, 0xae, 0x2a, 0xfe, 0xcc, 0xfb, 0x8d, 0xb7, 0xcd, 0x77, 0xc4, 0xa2, 0xf5, 0x33, 0xfc, 0xff, + 0xa8, 0x8b, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x70, 0x38, 0xb6, 0x08, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1407,20 +1407,20 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // GroupInfo queries group info based on group id. GroupInfo(ctx context.Context, in *QueryGroupInfoRequest, opts ...grpc.CallOption) (*QueryGroupInfoResponse, error) - // GroupAccountInfo queries group account info based on group account address. - GroupAccountInfo(ctx context.Context, in *QueryGroupAccountInfoRequest, opts ...grpc.CallOption) (*QueryGroupAccountInfoResponse, error) + // 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 GroupMembers(ctx context.Context, in *QueryGroupMembersRequest, opts ...grpc.CallOption) (*QueryGroupMembersResponse, error) // GroupsByAdmin queries groups by admin address. GroupsByAdmin(ctx context.Context, in *QueryGroupsByAdminRequest, opts ...grpc.CallOption) (*QueryGroupsByAdminResponse, error) - // GroupAccountsByGroup queries group accounts by group id. - GroupAccountsByGroup(ctx context.Context, in *QueryGroupAccountsByGroupRequest, opts ...grpc.CallOption) (*QueryGroupAccountsByGroupResponse, error) - // GroupsByAdmin queries group accounts by admin address. - GroupAccountsByAdmin(ctx context.Context, in *QueryGroupAccountsByAdminRequest, opts ...grpc.CallOption) (*QueryGroupAccountsByAdminResponse, error) + // GroupPoliciesByGroup queries group policies by group id. + GroupPoliciesByGroup(ctx context.Context, in *QueryGroupPoliciesByGroupRequest, opts ...grpc.CallOption) (*QueryGroupPoliciesByGroupResponse, error) + // GroupsByAdmin 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) - // ProposalsByGroupAccount queries proposals based on group account address. - ProposalsByGroupAccount(ctx context.Context, in *QueryProposalsByGroupAccountRequest, opts ...grpc.CallOption) (*QueryProposalsByGroupAccountResponse, 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. @@ -1448,9 +1448,9 @@ func (c *queryClient) GroupInfo(ctx context.Context, in *QueryGroupInfoRequest, return out, nil } -func (c *queryClient) GroupAccountInfo(ctx context.Context, in *QueryGroupAccountInfoRequest, opts ...grpc.CallOption) (*QueryGroupAccountInfoResponse, error) { - out := new(QueryGroupAccountInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/GroupAccountInfo", in, out, opts...) +func (c *queryClient) GroupPolicyInfo(ctx context.Context, in *QueryGroupPolicyInfoRequest, opts ...grpc.CallOption) (*QueryGroupPolicyInfoResponse, error) { + out := new(QueryGroupPolicyInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/GroupPolicyInfo", in, out, opts...) if err != nil { return nil, err } @@ -1475,18 +1475,18 @@ func (c *queryClient) GroupsByAdmin(ctx context.Context, in *QueryGroupsByAdminR return out, nil } -func (c *queryClient) GroupAccountsByGroup(ctx context.Context, in *QueryGroupAccountsByGroupRequest, opts ...grpc.CallOption) (*QueryGroupAccountsByGroupResponse, error) { - out := new(QueryGroupAccountsByGroupResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/GroupAccountsByGroup", in, out, opts...) +func (c *queryClient) GroupPoliciesByGroup(ctx context.Context, in *QueryGroupPoliciesByGroupRequest, opts ...grpc.CallOption) (*QueryGroupPoliciesByGroupResponse, error) { + out := new(QueryGroupPoliciesByGroupResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/GroupPoliciesByGroup", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) GroupAccountsByAdmin(ctx context.Context, in *QueryGroupAccountsByAdminRequest, opts ...grpc.CallOption) (*QueryGroupAccountsByAdminResponse, error) { - out := new(QueryGroupAccountsByAdminResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/GroupAccountsByAdmin", in, out, opts...) +func (c *queryClient) GroupPoliciesByAdmin(ctx context.Context, in *QueryGroupPoliciesByAdminRequest, opts ...grpc.CallOption) (*QueryGroupPoliciesByAdminResponse, error) { + out := new(QueryGroupPoliciesByAdminResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/GroupPoliciesByAdmin", in, out, opts...) if err != nil { return nil, err } @@ -1502,9 +1502,9 @@ func (c *queryClient) Proposal(ctx context.Context, in *QueryProposalRequest, op return out, nil } -func (c *queryClient) ProposalsByGroupAccount(ctx context.Context, in *QueryProposalsByGroupAccountRequest, opts ...grpc.CallOption) (*QueryProposalsByGroupAccountResponse, error) { - out := new(QueryProposalsByGroupAccountResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/ProposalsByGroupAccount", in, out, opts...) +func (c *queryClient) ProposalsByGroupPolicy(ctx context.Context, in *QueryProposalsByGroupPolicyRequest, opts ...grpc.CallOption) (*QueryProposalsByGroupPolicyResponse, error) { + out := new(QueryProposalsByGroupPolicyResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Query/ProposalsByGroupPolicy", in, out, opts...) if err != nil { return nil, err } @@ -1551,20 +1551,20 @@ func (c *queryClient) GroupsByMember(ctx context.Context, in *QueryGroupsByMembe type QueryServer interface { // GroupInfo queries group info based on group id. GroupInfo(context.Context, *QueryGroupInfoRequest) (*QueryGroupInfoResponse, error) - // GroupAccountInfo queries group account info based on group account address. - GroupAccountInfo(context.Context, *QueryGroupAccountInfoRequest) (*QueryGroupAccountInfoResponse, error) + // GroupPolicyInfo queries group policy info based on account address of group policy. + GroupPolicyInfo(context.Context, *QueryGroupPolicyInfoRequest) (*QueryGroupPolicyInfoResponse, error) // GroupMembers queries members of a group GroupMembers(context.Context, *QueryGroupMembersRequest) (*QueryGroupMembersResponse, error) // GroupsByAdmin queries groups by admin address. GroupsByAdmin(context.Context, *QueryGroupsByAdminRequest) (*QueryGroupsByAdminResponse, error) - // GroupAccountsByGroup queries group accounts by group id. - GroupAccountsByGroup(context.Context, *QueryGroupAccountsByGroupRequest) (*QueryGroupAccountsByGroupResponse, error) - // GroupsByAdmin queries group accounts by admin address. - GroupAccountsByAdmin(context.Context, *QueryGroupAccountsByAdminRequest) (*QueryGroupAccountsByAdminResponse, error) + // GroupPoliciesByGroup queries group policies by group id. + GroupPoliciesByGroup(context.Context, *QueryGroupPoliciesByGroupRequest) (*QueryGroupPoliciesByGroupResponse, error) + // GroupsByAdmin 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) - // ProposalsByGroupAccount queries proposals based on group account address. - ProposalsByGroupAccount(context.Context, *QueryProposalsByGroupAccountRequest) (*QueryProposalsByGroupAccountResponse, 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. @@ -1582,8 +1582,8 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) GroupInfo(ctx context.Context, req *QueryGroupInfoRequest) (*QueryGroupInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GroupInfo not implemented") } -func (*UnimplementedQueryServer) GroupAccountInfo(ctx context.Context, req *QueryGroupAccountInfoRequest) (*QueryGroupAccountInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupAccountInfo not implemented") +func (*UnimplementedQueryServer) GroupPolicyInfo(ctx context.Context, req *QueryGroupPolicyInfoRequest) (*QueryGroupPolicyInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupPolicyInfo not implemented") } func (*UnimplementedQueryServer) GroupMembers(ctx context.Context, req *QueryGroupMembersRequest) (*QueryGroupMembersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GroupMembers not implemented") @@ -1591,17 +1591,17 @@ func (*UnimplementedQueryServer) GroupMembers(ctx context.Context, req *QueryGro func (*UnimplementedQueryServer) GroupsByAdmin(ctx context.Context, req *QueryGroupsByAdminRequest) (*QueryGroupsByAdminResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GroupsByAdmin not implemented") } -func (*UnimplementedQueryServer) GroupAccountsByGroup(ctx context.Context, req *QueryGroupAccountsByGroupRequest) (*QueryGroupAccountsByGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupAccountsByGroup not implemented") +func (*UnimplementedQueryServer) GroupPoliciesByGroup(ctx context.Context, req *QueryGroupPoliciesByGroupRequest) (*QueryGroupPoliciesByGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupPoliciesByGroup not implemented") } -func (*UnimplementedQueryServer) GroupAccountsByAdmin(ctx context.Context, req *QueryGroupAccountsByAdminRequest) (*QueryGroupAccountsByAdminResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupAccountsByAdmin not implemented") +func (*UnimplementedQueryServer) GroupPoliciesByAdmin(ctx context.Context, req *QueryGroupPoliciesByAdminRequest) (*QueryGroupPoliciesByAdminResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupPoliciesByAdmin not implemented") } func (*UnimplementedQueryServer) Proposal(ctx context.Context, req *QueryProposalRequest) (*QueryProposalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Proposal not implemented") } -func (*UnimplementedQueryServer) ProposalsByGroupAccount(ctx context.Context, req *QueryProposalsByGroupAccountRequest) (*QueryProposalsByGroupAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProposalsByGroupAccount not implemented") +func (*UnimplementedQueryServer) ProposalsByGroupPolicy(ctx context.Context, req *QueryProposalsByGroupPolicyRequest) (*QueryProposalsByGroupPolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProposalsByGroupPolicy not implemented") } func (*UnimplementedQueryServer) VoteByProposalVoter(ctx context.Context, req *QueryVoteByProposalVoterRequest) (*QueryVoteByProposalVoterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VoteByProposalVoter not implemented") @@ -1638,20 +1638,20 @@ func _Query_GroupInfo_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } -func _Query_GroupAccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGroupAccountInfoRequest) +func _Query_GroupPolicyInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupPolicyInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).GroupAccountInfo(ctx, in) + return srv.(QueryServer).GroupPolicyInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.group.v1beta1.Query/GroupAccountInfo", + FullMethod: "/cosmos.group.v1beta1.Query/GroupPolicyInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GroupAccountInfo(ctx, req.(*QueryGroupAccountInfoRequest)) + return srv.(QueryServer).GroupPolicyInfo(ctx, req.(*QueryGroupPolicyInfoRequest)) } return interceptor(ctx, in, info, handler) } @@ -1692,38 +1692,38 @@ func _Query_GroupsByAdmin_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Query_GroupAccountsByGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGroupAccountsByGroupRequest) +func _Query_GroupPoliciesByGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupPoliciesByGroupRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).GroupAccountsByGroup(ctx, in) + return srv.(QueryServer).GroupPoliciesByGroup(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.group.v1beta1.Query/GroupAccountsByGroup", + FullMethod: "/cosmos.group.v1beta1.Query/GroupPoliciesByGroup", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GroupAccountsByGroup(ctx, req.(*QueryGroupAccountsByGroupRequest)) + return srv.(QueryServer).GroupPoliciesByGroup(ctx, req.(*QueryGroupPoliciesByGroupRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_GroupAccountsByAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGroupAccountsByAdminRequest) +func _Query_GroupPoliciesByAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupPoliciesByAdminRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).GroupAccountsByAdmin(ctx, in) + return srv.(QueryServer).GroupPoliciesByAdmin(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.group.v1beta1.Query/GroupAccountsByAdmin", + FullMethod: "/cosmos.group.v1beta1.Query/GroupPoliciesByAdmin", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GroupAccountsByAdmin(ctx, req.(*QueryGroupAccountsByAdminRequest)) + return srv.(QueryServer).GroupPoliciesByAdmin(ctx, req.(*QueryGroupPoliciesByAdminRequest)) } return interceptor(ctx, in, info, handler) } @@ -1746,20 +1746,20 @@ func _Query_Proposal_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -func _Query_ProposalsByGroupAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryProposalsByGroupAccountRequest) +func _Query_ProposalsByGroupPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProposalsByGroupPolicyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).ProposalsByGroupAccount(ctx, in) + return srv.(QueryServer).ProposalsByGroupPolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.group.v1beta1.Query/ProposalsByGroupAccount", + FullMethod: "/cosmos.group.v1beta1.Query/ProposalsByGroupPolicy", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ProposalsByGroupAccount(ctx, req.(*QueryProposalsByGroupAccountRequest)) + return srv.(QueryServer).ProposalsByGroupPolicy(ctx, req.(*QueryProposalsByGroupPolicyRequest)) } return interceptor(ctx, in, info, handler) } @@ -1845,8 +1845,8 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_GroupInfo_Handler, }, { - MethodName: "GroupAccountInfo", - Handler: _Query_GroupAccountInfo_Handler, + MethodName: "GroupPolicyInfo", + Handler: _Query_GroupPolicyInfo_Handler, }, { MethodName: "GroupMembers", @@ -1857,20 +1857,20 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_GroupsByAdmin_Handler, }, { - MethodName: "GroupAccountsByGroup", - Handler: _Query_GroupAccountsByGroup_Handler, + MethodName: "GroupPoliciesByGroup", + Handler: _Query_GroupPoliciesByGroup_Handler, }, { - MethodName: "GroupAccountsByAdmin", - Handler: _Query_GroupAccountsByAdmin_Handler, + MethodName: "GroupPoliciesByAdmin", + Handler: _Query_GroupPoliciesByAdmin_Handler, }, { MethodName: "Proposal", Handler: _Query_Proposal_Handler, }, { - MethodName: "ProposalsByGroupAccount", - Handler: _Query_ProposalsByGroupAccount_Handler, + MethodName: "ProposalsByGroupPolicy", + Handler: _Query_ProposalsByGroupPolicy_Handler, }, { MethodName: "VoteByProposalVoter", @@ -1956,7 +1956,7 @@ func (m *QueryGroupInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryGroupAccountInfoRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGroupPolicyInfoRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1966,12 +1966,12 @@ func (m *QueryGroupAccountInfoRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGroupAccountInfoRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGroupPolicyInfoRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGroupAccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGroupPolicyInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1986,7 +1986,7 @@ func (m *QueryGroupAccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } -func (m *QueryGroupAccountInfoResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryGroupPolicyInfoResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1996,12 +1996,12 @@ func (m *QueryGroupAccountInfoResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGroupAccountInfoResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGroupPolicyInfoResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGroupAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGroupPolicyInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2201,7 +2201,7 @@ func (m *QueryGroupsByAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *QueryGroupAccountsByGroupRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGroupPoliciesByGroupRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2211,12 +2211,12 @@ func (m *QueryGroupAccountsByGroupRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGroupAccountsByGroupRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGroupPoliciesByGroupRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGroupAccountsByGroupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGroupPoliciesByGroupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2241,7 +2241,7 @@ func (m *QueryGroupAccountsByGroupRequest) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *QueryGroupAccountsByGroupResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryGroupPoliciesByGroupResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2251,12 +2251,12 @@ func (m *QueryGroupAccountsByGroupResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGroupAccountsByGroupResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGroupPoliciesByGroupResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGroupAccountsByGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGroupPoliciesByGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2273,10 +2273,10 @@ func (m *QueryGroupAccountsByGroupResponse) MarshalToSizedBuffer(dAtA []byte) (i i-- dAtA[i] = 0x12 } - if len(m.GroupAccounts) > 0 { - for iNdEx := len(m.GroupAccounts) - 1; iNdEx >= 0; iNdEx-- { + if len(m.GroupPolicies) > 0 { + for iNdEx := len(m.GroupPolicies) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.GroupAccounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.GroupPolicies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2290,7 +2290,7 @@ func (m *QueryGroupAccountsByGroupResponse) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } -func (m *QueryGroupAccountsByAdminRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGroupPoliciesByAdminRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2300,12 +2300,12 @@ func (m *QueryGroupAccountsByAdminRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGroupAccountsByAdminRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGroupPoliciesByAdminRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGroupAccountsByAdminRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGroupPoliciesByAdminRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2332,7 +2332,7 @@ func (m *QueryGroupAccountsByAdminRequest) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *QueryGroupAccountsByAdminResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryGroupPoliciesByAdminResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2342,12 +2342,12 @@ func (m *QueryGroupAccountsByAdminResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGroupAccountsByAdminResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGroupPoliciesByAdminResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGroupAccountsByAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGroupPoliciesByAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2364,10 +2364,10 @@ func (m *QueryGroupAccountsByAdminResponse) MarshalToSizedBuffer(dAtA []byte) (i i-- dAtA[i] = 0x12 } - if len(m.GroupAccounts) > 0 { - for iNdEx := len(m.GroupAccounts) - 1; iNdEx >= 0; iNdEx-- { + if len(m.GroupPolicies) > 0 { + for iNdEx := len(m.GroupPolicies) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.GroupAccounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.GroupPolicies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2444,7 +2444,7 @@ func (m *QueryProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryProposalsByGroupAccountRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryProposalsByGroupPolicyRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2454,12 +2454,12 @@ func (m *QueryProposalsByGroupAccountRequest) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *QueryProposalsByGroupAccountRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryProposalsByGroupPolicyRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryProposalsByGroupAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryProposalsByGroupPolicyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2486,7 +2486,7 @@ func (m *QueryProposalsByGroupAccountRequest) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } -func (m *QueryProposalsByGroupAccountResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryProposalsByGroupPolicyResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2496,12 +2496,12 @@ func (m *QueryProposalsByGroupAccountResponse) Marshal() (dAtA []byte, err error return dAtA[:n], nil } -func (m *QueryProposalsByGroupAccountResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryProposalsByGroupPolicyResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryProposalsByGroupAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryProposalsByGroupPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2912,7 +2912,7 @@ func (m *QueryGroupInfoResponse) Size() (n int) { return n } -func (m *QueryGroupAccountInfoRequest) Size() (n int) { +func (m *QueryGroupPolicyInfoRequest) Size() (n int) { if m == nil { return 0 } @@ -2925,7 +2925,7 @@ func (m *QueryGroupAccountInfoRequest) Size() (n int) { return n } -func (m *QueryGroupAccountInfoResponse) Size() (n int) { +func (m *QueryGroupPolicyInfoResponse) Size() (n int) { if m == nil { return 0 } @@ -3009,7 +3009,7 @@ func (m *QueryGroupsByAdminResponse) Size() (n int) { return n } -func (m *QueryGroupAccountsByGroupRequest) Size() (n int) { +func (m *QueryGroupPoliciesByGroupRequest) Size() (n int) { if m == nil { return 0 } @@ -3025,14 +3025,14 @@ func (m *QueryGroupAccountsByGroupRequest) Size() (n int) { return n } -func (m *QueryGroupAccountsByGroupResponse) Size() (n int) { +func (m *QueryGroupPoliciesByGroupResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.GroupAccounts) > 0 { - for _, e := range m.GroupAccounts { + if len(m.GroupPolicies) > 0 { + for _, e := range m.GroupPolicies { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } @@ -3044,7 +3044,7 @@ func (m *QueryGroupAccountsByGroupResponse) Size() (n int) { return n } -func (m *QueryGroupAccountsByAdminRequest) Size() (n int) { +func (m *QueryGroupPoliciesByAdminRequest) Size() (n int) { if m == nil { return 0 } @@ -3061,14 +3061,14 @@ func (m *QueryGroupAccountsByAdminRequest) Size() (n int) { return n } -func (m *QueryGroupAccountsByAdminResponse) Size() (n int) { +func (m *QueryGroupPoliciesByAdminResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.GroupAccounts) > 0 { - for _, e := range m.GroupAccounts { + if len(m.GroupPolicies) > 0 { + for _, e := range m.GroupPolicies { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } @@ -3105,7 +3105,7 @@ func (m *QueryProposalResponse) Size() (n int) { return n } -func (m *QueryProposalsByGroupAccountRequest) Size() (n int) { +func (m *QueryProposalsByGroupPolicyRequest) Size() (n int) { if m == nil { return 0 } @@ -3122,7 +3122,7 @@ func (m *QueryProposalsByGroupAccountRequest) Size() (n int) { return n } -func (m *QueryProposalsByGroupAccountResponse) Size() (n int) { +func (m *QueryProposalsByGroupPolicyResponse) Size() (n int) { if m == nil { return 0 } @@ -3438,7 +3438,7 @@ func (m *QueryGroupInfoResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGroupAccountInfoRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGroupPolicyInfoRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3461,10 +3461,10 @@ func (m *QueryGroupAccountInfoRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGroupAccountInfoRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGroupPolicyInfoRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGroupAccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGroupPolicyInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3520,7 +3520,7 @@ func (m *QueryGroupAccountInfoRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGroupAccountInfoResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGroupPolicyInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3543,10 +3543,10 @@ func (m *QueryGroupAccountInfoResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGroupAccountInfoResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGroupPolicyInfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGroupAccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGroupPolicyInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3579,7 +3579,7 @@ func (m *QueryGroupAccountInfoResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Info == nil { - m.Info = &GroupAccountInfo{} + m.Info = &GroupPolicyInfo{} } if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -4069,7 +4069,7 @@ func (m *QueryGroupsByAdminResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGroupAccountsByGroupRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGroupPoliciesByGroupRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4092,10 +4092,10 @@ func (m *QueryGroupAccountsByGroupRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGroupAccountsByGroupRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGroupPoliciesByGroupRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGroupAccountsByGroupRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGroupPoliciesByGroupRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4174,7 +4174,7 @@ func (m *QueryGroupAccountsByGroupRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGroupAccountsByGroupResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGroupPoliciesByGroupResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4197,15 +4197,15 @@ func (m *QueryGroupAccountsByGroupResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGroupAccountsByGroupResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGroupPoliciesByGroupResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGroupAccountsByGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGroupPoliciesByGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupAccounts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupPolicies", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4232,8 +4232,8 @@ func (m *QueryGroupAccountsByGroupResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.GroupAccounts = append(m.GroupAccounts, &GroupAccountInfo{}) - if err := m.GroupAccounts[len(m.GroupAccounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.GroupPolicies = append(m.GroupPolicies, &GroupPolicyInfo{}) + if err := m.GroupPolicies[len(m.GroupPolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4294,7 +4294,7 @@ func (m *QueryGroupAccountsByGroupResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGroupAccountsByAdminRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGroupPoliciesByAdminRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4317,10 +4317,10 @@ func (m *QueryGroupAccountsByAdminRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGroupAccountsByAdminRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGroupPoliciesByAdminRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGroupAccountsByAdminRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGroupPoliciesByAdminRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4412,7 +4412,7 @@ func (m *QueryGroupAccountsByAdminRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGroupAccountsByAdminResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGroupPoliciesByAdminResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4435,15 +4435,15 @@ func (m *QueryGroupAccountsByAdminResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGroupAccountsByAdminResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGroupPoliciesByAdminResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGroupAccountsByAdminResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGroupPoliciesByAdminResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupAccounts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupPolicies", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4470,8 +4470,8 @@ func (m *QueryGroupAccountsByAdminResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.GroupAccounts = append(m.GroupAccounts, &GroupAccountInfo{}) - if err := m.GroupAccounts[len(m.GroupAccounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.GroupPolicies = append(m.GroupPolicies, &GroupPolicyInfo{}) + if err := m.GroupPolicies[len(m.GroupPolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4687,7 +4687,7 @@ func (m *QueryProposalResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryProposalsByGroupAccountRequest) Unmarshal(dAtA []byte) error { +func (m *QueryProposalsByGroupPolicyRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4710,10 +4710,10 @@ func (m *QueryProposalsByGroupAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryProposalsByGroupAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryProposalsByGroupPolicyRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryProposalsByGroupAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryProposalsByGroupPolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4805,7 +4805,7 @@ func (m *QueryProposalsByGroupAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryProposalsByGroupAccountResponse) Unmarshal(dAtA []byte) error { +func (m *QueryProposalsByGroupPolicyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4828,10 +4828,10 @@ func (m *QueryProposalsByGroupAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryProposalsByGroupAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryProposalsByGroupPolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryProposalsByGroupAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryProposalsByGroupPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/group/query.pb.gw.go b/x/group/query.pb.gw.go index 6393c0bd7..a71698590 100644 --- a/x/group/query.pb.gw.go +++ b/x/group/query.pb.gw.go @@ -85,8 +85,8 @@ func local_request_Query_GroupInfo_0(ctx context.Context, marshaler runtime.Mars } -func request_Query_GroupAccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGroupAccountInfoRequest +func request_Query_GroupPolicyInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupPolicyInfoRequest var metadata runtime.ServerMetadata var ( @@ -107,13 +107,13 @@ func request_Query_GroupAccountInfo_0(ctx context.Context, marshaler runtime.Mar return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } - msg, err := client.GroupAccountInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GroupPolicyInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_GroupAccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGroupAccountInfoRequest +func local_request_Query_GroupPolicyInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupPolicyInfoRequest var metadata runtime.ServerMetadata var ( @@ -134,7 +134,7 @@ func local_request_Query_GroupAccountInfo_0(ctx context.Context, marshaler runti return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } - msg, err := server.GroupAccountInfo(ctx, &protoReq) + msg, err := server.GroupPolicyInfo(ctx, &protoReq) return msg, metadata, err } @@ -284,11 +284,11 @@ func local_request_Query_GroupsByAdmin_0(ctx context.Context, marshaler runtime. } var ( - filter_Query_GroupAccountsByGroup_0 = &utilities.DoubleArray{Encoding: map[string]int{"group_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_GroupPoliciesByGroup_0 = &utilities.DoubleArray{Encoding: map[string]int{"group_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_GroupAccountsByGroup_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGroupAccountsByGroupRequest +func request_Query_GroupPoliciesByGroup_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupPoliciesByGroupRequest var metadata runtime.ServerMetadata var ( @@ -312,17 +312,17 @@ func request_Query_GroupAccountsByGroup_0(ctx context.Context, marshaler runtime if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GroupAccountsByGroup_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GroupPoliciesByGroup_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GroupAccountsByGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GroupPoliciesByGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_GroupAccountsByGroup_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGroupAccountsByGroupRequest +func local_request_Query_GroupPoliciesByGroup_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupPoliciesByGroupRequest var metadata runtime.ServerMetadata var ( @@ -346,21 +346,21 @@ func local_request_Query_GroupAccountsByGroup_0(ctx context.Context, marshaler r if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GroupAccountsByGroup_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GroupPoliciesByGroup_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GroupAccountsByGroup(ctx, &protoReq) + msg, err := server.GroupPoliciesByGroup(ctx, &protoReq) return msg, metadata, err } var ( - filter_Query_GroupAccountsByAdmin_0 = &utilities.DoubleArray{Encoding: map[string]int{"admin": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_GroupPoliciesByAdmin_0 = &utilities.DoubleArray{Encoding: map[string]int{"admin": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_GroupAccountsByAdmin_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGroupAccountsByAdminRequest +func request_Query_GroupPoliciesByAdmin_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupPoliciesByAdminRequest var metadata runtime.ServerMetadata var ( @@ -384,17 +384,17 @@ func request_Query_GroupAccountsByAdmin_0(ctx context.Context, marshaler runtime if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GroupAccountsByAdmin_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GroupPoliciesByAdmin_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GroupAccountsByAdmin(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GroupPoliciesByAdmin(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_GroupAccountsByAdmin_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGroupAccountsByAdminRequest +func local_request_Query_GroupPoliciesByAdmin_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupPoliciesByAdminRequest var metadata runtime.ServerMetadata var ( @@ -418,11 +418,11 @@ func local_request_Query_GroupAccountsByAdmin_0(ctx context.Context, marshaler r if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GroupAccountsByAdmin_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GroupPoliciesByAdmin_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GroupAccountsByAdmin(ctx, &protoReq) + msg, err := server.GroupPoliciesByAdmin(ctx, &protoReq) return msg, metadata, err } @@ -482,11 +482,11 @@ func local_request_Query_Proposal_0(ctx context.Context, marshaler runtime.Marsh } var ( - filter_Query_ProposalsByGroupAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_ProposalsByGroupPolicy_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_ProposalsByGroupAccount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryProposalsByGroupAccountRequest +func request_Query_ProposalsByGroupPolicy_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProposalsByGroupPolicyRequest var metadata runtime.ServerMetadata var ( @@ -510,17 +510,17 @@ func request_Query_ProposalsByGroupAccount_0(ctx context.Context, marshaler runt if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ProposalsByGroupAccount_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ProposalsByGroupPolicy_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ProposalsByGroupAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ProposalsByGroupPolicy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_ProposalsByGroupAccount_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryProposalsByGroupAccountRequest +func local_request_Query_ProposalsByGroupPolicy_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProposalsByGroupPolicyRequest var metadata runtime.ServerMetadata var ( @@ -544,11 +544,11 @@ func local_request_Query_ProposalsByGroupAccount_0(ctx context.Context, marshale if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ProposalsByGroupAccount_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ProposalsByGroupPolicy_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ProposalsByGroupAccount(ctx, &protoReq) + msg, err := server.ProposalsByGroupPolicy(ctx, &protoReq) return msg, metadata, err } @@ -871,7 +871,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_GroupAccountInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_GroupPolicyInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -880,14 +880,14 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_GroupAccountInfo_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_GroupPolicyInfo_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_GroupAccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GroupPolicyInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -931,7 +931,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_GroupAccountsByGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_GroupPoliciesByGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -940,18 +940,18 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_GroupAccountsByGroup_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_GroupPoliciesByGroup_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_GroupAccountsByGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GroupPoliciesByGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_GroupAccountsByAdmin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_GroupPoliciesByAdmin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -960,14 +960,14 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_GroupAccountsByAdmin_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_GroupPoliciesByAdmin_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_GroupAccountsByAdmin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GroupPoliciesByAdmin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -991,7 +991,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_ProposalsByGroupAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ProposalsByGroupPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -1000,14 +1000,14 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ProposalsByGroupAccount_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ProposalsByGroupPolicy_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_ProposalsByGroupAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ProposalsByGroupPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1152,7 +1152,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_GroupAccountInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_GroupPolicyInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -1161,14 +1161,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_GroupAccountInfo_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_GroupPolicyInfo_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_GroupAccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GroupPolicyInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1212,7 +1212,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_GroupAccountsByGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_GroupPoliciesByGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -1221,18 +1221,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_GroupAccountsByGroup_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_GroupPoliciesByGroup_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_GroupAccountsByGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GroupPoliciesByGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_GroupAccountsByAdmin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_GroupPoliciesByAdmin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -1241,14 +1241,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_GroupAccountsByAdmin_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_GroupPoliciesByAdmin_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_GroupAccountsByAdmin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GroupPoliciesByAdmin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1272,7 +1272,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_ProposalsByGroupAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ProposalsByGroupPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -1281,14 +1281,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ProposalsByGroupAccount_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_ProposalsByGroupPolicy_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_ProposalsByGroupAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ProposalsByGroupPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1378,19 +1378,19 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_GroupInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "group", "v1beta1", "group_info", "group_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GroupAccountInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "group", "v1beta1", "group_account_info", "address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GroupPolicyInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "group", "v1beta1", "group_policy_info", "address"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GroupMembers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "group", "v1beta1", "group_members", "group_id"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GroupsByAdmin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "group", "v1beta1", "groups_by_admin", "admin"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GroupAccountsByGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "group", "v1beta1", "group_accounts_by_group", "group_id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GroupPoliciesByGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "group", "v1beta1", "group_policies_by_group", "group_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GroupAccountsByAdmin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "group", "v1beta1", "group_accounts_by_admin", "admin"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GroupPoliciesByAdmin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "group", "v1beta1", "group_policies_by_admin", "admin"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Proposal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "group", "v1beta1", "proposal", "proposal_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ProposalsByGroupAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "group", "v1beta1", "proposals_by_group_account", "address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ProposalsByGroupPolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "group", "v1beta1", "proposals_by_group_policy", "address"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_VoteByProposalVoter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"cosmos", "group", "v1beta1", "vote_by_proposal_voter", "proposal_id", "voter"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1404,19 +1404,19 @@ var ( var ( forward_Query_GroupInfo_0 = runtime.ForwardResponseMessage - forward_Query_GroupAccountInfo_0 = runtime.ForwardResponseMessage + forward_Query_GroupPolicyInfo_0 = runtime.ForwardResponseMessage forward_Query_GroupMembers_0 = runtime.ForwardResponseMessage forward_Query_GroupsByAdmin_0 = runtime.ForwardResponseMessage - forward_Query_GroupAccountsByGroup_0 = runtime.ForwardResponseMessage + forward_Query_GroupPoliciesByGroup_0 = runtime.ForwardResponseMessage - forward_Query_GroupAccountsByAdmin_0 = runtime.ForwardResponseMessage + forward_Query_GroupPoliciesByAdmin_0 = runtime.ForwardResponseMessage forward_Query_Proposal_0 = runtime.ForwardResponseMessage - forward_Query_ProposalsByGroupAccount_0 = runtime.ForwardResponseMessage + forward_Query_ProposalsByGroupPolicy_0 = runtime.ForwardResponseMessage forward_Query_VoteByProposalVoter_0 = runtime.ForwardResponseMessage diff --git a/x/group/spec/01_concepts.md b/x/group/spec/01_concepts.md index 8400a2eec..e2ea7d89b 100644 --- a/x/group/spec/01_concepts.md +++ b/x/group/spec/01_concepts.md @@ -10,17 +10,17 @@ 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 account could be an administrator of a group. +group policy account could be an administrator of a group. -## Group Account +## Group Policy -A group account is an account associated with a group and a decision policy. -Group accounts are abstracted from groups because a single group may have +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 account for a given group, -and then to create separate group accounts with different decision policies +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. @@ -43,7 +43,7 @@ this decision policy, abstain and veto are simply treated as no's. ## Proposal -Any member of a group can submit a proposal for a group account to decide upon. +Any member 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. @@ -69,6 +69,6 @@ could be executed later on. ### Changing Group Membership In the current implementation, changing a group's membership (adding or removing members or changing their weight) -will cause all existing proposals for group accounts linked to this group +will cause all existing proposals for group policy accounts linked to this group to be invalidated. They will simply fail if someone calls `Msg/Exec` and will eventually be garbage collected. \ No newline at end of file diff --git a/x/group/spec/02_state.md b/x/group/spec/02_state.md index 4b222a93a..55be76d87 100644 --- a/x/group/spec/02_state.md +++ b/x/group/spec/02_state.md @@ -41,28 +41,28 @@ The `groupMemberTable` is a primary key table and its `PrimaryKey` is given by `groupMemberByMemberIndex` allows to retrieve group members by member address: `0x12 | len([]byte(member.Address)) | []byte(member.Address) | PrimaryKey -> []byte()`. -## Group Account Table +## Group Policy Table -The `groupAccountTable` stores `GroupAccountInfo`: `0x20 | len([]byte(Address)) | []byte(Address) -> ProtocolBuffer(GroupAccountInfo)`. +The `groupPolicyTable` stores `GroupPolicyInfo`: `0x20 | len([]byte(Address)) | []byte(Address) -> ProtocolBuffer(GroupPolicyInfo)`. -The `groupAccountTable` is a primary key table and its `PrimaryKey` is given by +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. -### groupAccountSeq +### groupPolicySeq -The value of `groupAccountSeq` is incremented when creating a new group account and is used to generate the new group account `Address`: +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`. -### groupAccountByGroupIndex +### groupPolicyByGroupIndex -`groupAccountByGroupIndex` allows to retrieve group accounts by group id: +`groupPolicyByGroupIndex` allows to retrieve group policies by group id: `0x22 | BigEndian(GroupId) | PrimaryKey -> []byte()`. -### groupAccountByAdminIndex +### groupPolicyByAdminIndex -`groupAccountByAdminIndex` allows to retrieve group accounts by admin address: +`groupPolicyByAdminIndex` allows to retrieve group policies by admin address: `0x23 | len([]byte(Address)) | []byte(Address) | PrimaryKey -> []byte()`. ## Proposal Table @@ -75,9 +75,9 @@ The value of `proposalSeq` is incremented when creating a new proposal and corre The second `0x1` corresponds to the ORM `sequenceStorageKey`. -### proposalByGroupAccountIndex +### proposalByGroupPolicyIndex -`proposalByGroupAccountIndex` allows to retrieve proposals by group account address: +`proposalByGroupPolicyIndex` allows to retrieve proposals by group policy account address: `0x32 | len([]byte(account.Address)) | []byte(account.Address) | BigEndian(ProposalId) -> []byte()`. ### proposalByProposerIndex diff --git a/x/group/spec/03_messages.md b/x/group/spec/03_messages.md index 387f9145d..240897378 100644 --- a/x/group/spec/03_messages.md +++ b/x/group/spec/03_messages.md @@ -40,33 +40,33 @@ It's expecting to fail if: - new metadata length is greater than some `MaxMetadataLength`. - the signer is not the admin of the group. -## Msg/CreateGroupAccount +## Msg/CreateGroupPolicy -A new group account can be created with the `MsgCreateGroupAccount`, which has an admin address, a group id, a decision policy and some optional metadata bytes. +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 bytes. +++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L121-L142 It's expecting to fail if metadata length is greater than some `MaxMetadataLength`. -## Msg/UpdateGroupAccountAdmin +## Msg/UpdateGroupPolicyAdmin -The `UpdateGroupAccountAdmin` can be used to update a group account admin. +The `UpdateGroupPolicyAdmin` can be used to update a group policy admin. +++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L151-L162 -It's expecting to fail if the signer is not the admin of the group account. +It's expecting to fail if the signer is not the admin of the group policy. -## Msg/UpdateGroupAccountDecisionPolicy +## Msg/UpdateGroupPolicyDecisionPolicy -The `UpdateGroupAccountDecisionPolicy` can be used to update a decision policy. +The `UpdateGroupPolicyDecisionPolicy` can be used to update a decision policy. +++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L167-L179 -It's expecting to fail if the signer is not the admin of the group account. +It's expecting to fail if the signer is not the admin of the group policy. -## Msg/UpdateGroupAccountMetadata +## Msg/UpdateGroupPolicyMetadata -The `UpdateGroupAccountMetadata` can be used to update a group account metadata. +The `UpdateGroupPolicyMetadata` can be used to update a group policy metadata. +++ https://github.com/cosmos/cosmos-sdk/blob/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L184-L195 @@ -76,7 +76,7 @@ It's expecting to fail if: ## Msg/CreateProposal -A new group account can be created with the `MsgCreateProposal`, which has a group account address, a list of proposers addresses, a list of messages to execute if the proposal is accepted and some optional metadata bytes. +A new proposal can be created with the `MsgCreateProposal`, 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 bytes. 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/6f58963e7f6ce820e9b33f02f06f7b96f6d2e347/proto/cosmos/group/v1beta1/tx.proto#L218-L239 @@ -100,7 +100,7 @@ A proposal can be executed with the `MsgExec`. The messages that are part of this proposal won't be executed if: - the group has been modified before tally. -- the group account has been modified before tally. +- the group policy has been modified before tally. - the proposal has not been accepted. - the proposal status is not closed. - the proposal has already been successfully executed. \ No newline at end of file diff --git a/x/group/spec/04_events.md b/x/group/spec/04_events.md index 8607a511e..2a52cb1bf 100644 --- a/x/group/spec/04_events.md +++ b/x/group/spec/04_events.md @@ -20,19 +20,19 @@ The group module emits the following events: | message | action | /cosmos.group.v1beta1.Msg/UpdateGroup{Admin\|Metadata\|Members} | | cosmos.group.v1beta1.EventUpdateGroup | group_id | {groupId} | -## EventCreateGroupAccount +## EventCreateGroupPolicy | Type | Attribute Key | Attribute Value | |----------------------------------------------|---------------|----------------------------------------------| -| message | action | /cosmos.group.v1beta1.Msg/CreateGroupAccount | -| cosmos.group.v1beta1.EventCreateGroupAccount | address | {groupAccountAddress} | +| message | action | /cosmos.group.v1beta1.Msg/CreateGroupPolicy | +| cosmos.group.v1beta1.EventCreateGroupPolicy | address | {groupPolicyAddress} | -## EventUpdateGroupAccount +## EventUpdateGroupPolicy | Type | Attribute Key | Attribute Value | |----------------------------------------------|---------------|-------------------------------------------------------------------------------| -| message | action | /cosmos.group.v1beta1.Msg/UpdateGroupAccount{Admin\|Metadata\|DecisionPolicy} | -| cosmos.group.v1beta1.EventUpdateGroupAccount | address | {groupAccountAddress} | +| message | action | /cosmos.group.v1beta1.Msg/UpdateGroupPolicy{Admin\|Metadata\|DecisionPolicy} | +| cosmos.group.v1beta1.EventUpdateGroupPolicy | address | {groupPolicyAddress} | ## EventCreateProposal diff --git a/x/group/spec/05_client.md b/x/group/spec/05_client.md index d5ea498ce..bdeb6b76b 100644 --- a/x/group/spec/05_client.md +++ b/x/group/spec/05_client.md @@ -40,18 +40,18 @@ total_weight: "3" version: "1" ``` -#### group-account-info +#### group-policy-info -The `group-account-info` command allows users to query for group account info by group account address. +The `group-policy-info` command allows users to query for group policy info by account address of group policy . ```bash -simd query group group-account-info [group-account] [flags] +simd query group group-policy-info [group-policy-account] [flags] ``` Example: ```bash -simd query group group-account-info cosmos1.. +simd query group group-policy-info cosmos1.. ``` Example Output: @@ -134,24 +134,24 @@ pagination: total: "2" ``` -#### group-accounts-by-group +#### group-policies-by-group -The `group-accounts-by-group` command allows users to query for group accounts by group id with pagination flags. +The `group-policies-by-group` command allows users to query for group policies by group id with pagination flags. ```bash -simd query group group-accounts-by-group [group-id] [flags] +simd query group group-policies-by-group [group-id] [flags] ``` Example: ```bash -simd query group group-accounts-by-group 1 +simd query group group-policies-by-group 1 ``` Example Output: ```bash -group_accounts: +group_policies: - address: cosmos1.. admin: cosmos1.. decision_policy: @@ -175,24 +175,24 @@ pagination: total: "2" ``` -#### group-accounts-by-admin +#### group-policies-by-admin -The `group-accounts-by-admin` command allows users to query for group accounts by admin account address with pagination flags. +The `group-policies-by-admin` command allows users to query for group policies by admin account address with pagination flags. ```bash -simd query group group-accounts-by-admin [admin] [flags] +simd query group group-policies-by-admin [admin] [flags] ``` Example: ```bash -simd query group group-accounts-by-admin cosmos1.. +simd query group group-policies-by-admin cosmos1.. ``` Example Output: ```bash -group_accounts: +group_policies: - address: cosmos1.. admin: cosmos1.. decision_policy: @@ -236,7 +236,7 @@ Example Output: proposal: address: cosmos1.. executor_result: EXECUTOR_RESULT_NOT_RUN - group_account_version: "1" + group_policy_version: "1" group_version: "1" metadata: AQ== msgs: @@ -260,18 +260,18 @@ proposal: yes_count: "0" ``` -#### proposals-by-group-account +#### proposals-by-group-policy -The `proposals-by-group-account` command allows users to query for proposals by group account address with pagination flags. +The `proposals-by-group-policy` command allows users to query for proposals by account address of group policy with pagination flags. ```bash -simd query group proposals-by-group-account [group-account] [flags] +simd query group proposals-by-group-policy [group-policy-account] [flags] ``` Example: ```bash -simd query group proposals-by-group-account cosmos1.. +simd query group proposals-by-group-policy cosmos1.. ``` Example Output: @@ -283,7 +283,7 @@ pagination: proposals: - address: cosmos1.. executor_result: EXECUTOR_RESULT_NOT_RUN - group_account_version: "1" + group_policy_version: "1" group_version: "1" metadata: AQ== msgs: @@ -453,54 +453,54 @@ Example: simd tx group update-group-metadata cosmos1.. 1 "AQ==" ``` -#### create-group-account +#### create-group-policy -The `create-group-account` command allows users to create a group account which is an account associated with a group and a decision 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. ```bash -simd tx group create-group-account [admin] [group-id] [metadata] [decision-policy] [flags] +simd tx group create-group-policy [admin] [group-id] [metadata] [decision-policy] [flags] ``` Example: ```bash -simd tx group create-group-account cosmos1.. 1 "AQ==" '{"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy", "threshold":"1", "timeout":"600s"}' +simd tx group create-group-policy cosmos1.. 1 "AQ==" '{"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy", "threshold":"1", "timeout":"600s"}' ``` -#### update-group-account-admin +#### update-group-policy-admin -The `update-group-account-admin` command allows users to update a group account admin. +The `update-group-policy-admin` command allows users to update a group policy admin. ```bash -simd tx group update-group-account-admin [admin] [group-account] [new-admin] [flags] +simd tx group update-group-policy-admin [admin] [group-policy-account] [new-admin] [flags] ``` Example: ```bash -simd tx group update-group-account-admin cosmos1.. cosmos1.. cosmos1.. +simd tx group update-group-policy-admin cosmos1.. cosmos1.. cosmos1.. ``` -#### update-group-account-metadata +#### update-group-policy-metadata -The `update-group-account-metadata` command allows users to update a group account metadata. +The `update-group-policy-metadata` command allows users to update a group policy metadata. ```bash -simd tx group update-group-account-metadata [admin] [group-account] [new-metadata] [flags] +simd tx group update-group-policy-metadata [admin] [group-policy-account] [new-metadata] [flags] ``` Example: ```bash -simd tx group update-group-account-metadata cosmos1.. cosmos1.. "AQ==" +simd tx group update-group-policy-metadata cosmos1.. cosmos1.. "AQ==" ``` #### update-group-account-policy -The `update-group-account-policy` command allows users to update a group account decision policy. +The `update-group-account-policy` command allows users to update a group policy's decision policy. ```bash -simd tx group update-group-account-policy [admin] [group-account] [decision-policy] [flags] +simd tx group update-group-account-policy [admin] [group-policy-account] [decision-policy] [flags] ``` Example: @@ -514,7 +514,7 @@ simd tx group update-group-account-policy cosmos1.. cosmos1.. '{"@type":"/cosmos The `create-proposal` command allows users to submit a new proposal. ```bash -simd tx group create-proposal [group-account] [proposer[,proposer]*] [msg_tx_json_file] [metadata] [flags] +simd tx group create-proposal [group-policy-account] [proposer[,proposer]*] [msg_tx_json_file] [metadata] [flags] ``` Example: @@ -584,19 +584,19 @@ Example Output: } ``` -### GroupAccountInfo +### GroupPolicyInfo -The `GroupAccountInfo` endpoint allows users to query for group account info by group account address. +The `GroupPolicyInfo` endpoint allows users to query for group policy info by account address of group policy. ```bash -cosmos.group.v1beta1.Query/GroupAccountInfo +cosmos.group.v1beta1.Query/GroupPolicyInfo ``` Example: ```bash grpcurl -plaintext \ - -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/GroupAccountInfo + -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/GroupPolicyInfo ``` Example Output: @@ -695,26 +695,26 @@ Example Output: } ``` -### GroupAccountsByGroup +### GroupPolicysByGroup -The `GroupAccountsByGroup` endpoint allows users to query for group accounts by group id with pagination flags. +The `GroupPolicysByGroup` endpoint allows users to query for group policies by group id with pagination flags. ```bash -cosmos.group.v1beta1.Query/GroupAccountsByGroup +cosmos.group.v1beta1.Query/GroupPolicysByGroup ``` Example: ```bash grpcurl -plaintext \ - -d '{"group_id":"1"}' localhost:9090 cosmos.group.v1beta1.Query/GroupAccountsByGroup + -d '{"group_id":"1"}' localhost:9090 cosmos.group.v1beta1.Query/GroupPolicysByGroup ``` Example Output: ```bash { - "groupAccounts": [ + "GroupPolicys": [ { "address": "cosmos1..", "groupId": "1", @@ -736,26 +736,26 @@ Example Output: } ``` -### GroupAccountsByAdmin +### GroupPolicysByAdmin -The `GroupAccountsByAdmin` endpoint allows users to query for group accounts by admin account address with pagination flags. +The `GroupPolicysByAdmin` endpoint allows users to query for group policies by admin account address with pagination flags. ```bash -cosmos.group.v1beta1.Query/GroupAccountsByAdmin +cosmos.group.v1beta1.Query/GroupPolicysByAdmin ``` Example: ```bash grpcurl -plaintext \ - -d '{"admin":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/GroupAccountsByAdmin + -d '{"admin":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/GroupPolicysByAdmin ``` Example Output: ```bash { - "groupAccounts": [ + "GroupPolicys": [ { "address": "cosmos1..", "groupId": "1", @@ -804,7 +804,7 @@ Example Output: ], "submittedAt": "2021-12-17T07:06:26.310638964Z", "groupVersion": "1", - "groupAccountVersion": "1", + "GroupPolicyVersion": "1", "status": "STATUS_SUBMITTED", "result": "RESULT_UNFINALIZED", "voteState": { @@ -822,19 +822,19 @@ Example Output: } ``` -### ProposalsByGroupAccount +### ProposalsByGroupPolicy -The `ProposalsByGroupAccount` endpoint allows users to query for proposals by group account address with pagination flags. +The `ProposalsByGroupPolicy` endpoint allows users to query for proposals by account address of group policy with pagination flags. ```bash -cosmos.group.v1beta1.Query/ProposalsByGroupAccount +cosmos.group.v1beta1.Query/ProposalsByGroupPolicy ``` Example: ```bash grpcurl -plaintext \ - -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/ProposalsByGroupAccount + -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/ProposalsByGroupPolicy ``` Example Output: @@ -850,7 +850,7 @@ Example Output: ], "submittedAt": "2021-12-17T08:03:27.099649352Z", "groupVersion": "1", - "groupAccountVersion": "1", + "GroupPolicyVersion": "1", "status": "STATUS_CLOSED", "result": "RESULT_ACCEPTED", "voteState": { @@ -998,18 +998,18 @@ Example Output: } ``` -### GroupAccountInfo +### GroupPolicyInfo -The `GroupAccountInfo` endpoint allows users to query for group account info by group account address. +The `GroupPolicyInfo` endpoint allows users to query for group policy info by account address of group policy. ```bash -/cosmos/group/v1beta1/group_account_info/{address} +/cosmos/group/v1beta1/group_policy_info/{address} ``` Example: ```bash -curl localhost:1317/cosmos/group/v1beta1/group_account_info/cosmos1.. +curl localhost:1317/cosmos/group/v1beta1/group_policy_info/cosmos1.. ``` Example Output: @@ -1114,25 +1114,25 @@ Example Output: } ``` -### GroupAccountsByGroup +### GroupPolicysByGroup -The `GroupAccountsByGroup` endpoint allows users to query for group accounts by group id with pagination flags. +The `GroupPolicysByGroup` endpoint allows users to query for group policies by group id with pagination flags. ```bash -/cosmos/group/v1beta1/group_accounts_by_group/{group_id} +/cosmos/group/v1beta1/group_policies_by_group/{group_id} ``` Example: ```bash -curl localhost:1317/cosmos/group/v1beta1/group_accounts_by_group/1 +curl localhost:1317/cosmos/group/v1beta1/group_policies_by_group/1 ``` Example Output: ```bash { - "group_accounts": [ + "group_policies": [ { "address": "cosmos1..", "group_id": "1", @@ -1165,25 +1165,25 @@ Example Output: } ``` -### GroupAccountsByAdmin +### GroupPolicysByAdmin -The `GroupAccountsByAdmin` endpoint allows users to query for group accounts by admin account address with pagination flags. +The `GroupPolicysByAdmin` endpoint allows users to query for group policies by admin account address with pagination flags. ```bash -/cosmos/group/v1beta1/group_accounts_by_admin/{admin} +/cosmos/group/v1beta1/group_policies_by_admin/{admin} ``` Example: ```bash -curl localhost:1317/cosmos/group/v1beta1/group_accounts_by_admin/cosmos1.. +curl localhost:1317/cosmos/group/v1beta1/group_policies_by_admin/cosmos1.. ``` Example Output: ```bash { - "group_accounts": [ + "group_policies": [ { "address": "cosmos1..", "group_id": "1", @@ -1242,7 +1242,7 @@ Example Output: ], "submitted_at": "2021-12-17T07:06:26.310638964Z", "group_version": "1", - "group_account_version": "1", + "group_policy_version": "1", "status": "STATUS_SUBMITTED", "result": "RESULT_UNFINALIZED", "vote_state": { @@ -1270,18 +1270,18 @@ Example Output: } ``` -### ProposalsByGroupAccount +### ProposalsByGroupPolicy -The `ProposalsByGroupAccount` endpoint allows users to query for proposals by group account address with pagination flags. +The `ProposalsByGroupPolicy` endpoint allows users to query for proposals by account address of group policy with pagination flags. ```bash -/cosmos/group/v1beta1/proposals_by_group_account/{address} +/cosmos/group/v1beta1/proposals_by_group_policy/{address} ``` Example: ```bash -curl localhost:1317/cosmos/group/v1beta1/proposals_by_group_account/cosmos1.. +curl localhost:1317/cosmos/group/v1beta1/proposals_by_group_policy/cosmos1.. ``` Example Output: @@ -1298,7 +1298,7 @@ Example Output: ], "submitted_at": "2021-12-17T08:03:27.099649352Z", "group_version": "1", - "group_account_version": "1", + "group_policy_version": "1", "status": "STATUS_CLOSED", "result": "RESULT_ACCEPTED", "vote_state": { diff --git a/x/group/tx.pb.go b/x/group/tx.pb.go index bb0a6f6a0..7fcd4eeba 100644 --- a/x/group/tx.pb.go +++ b/x/group/tx.pb.go @@ -476,30 +476,30 @@ func (m *MsgUpdateGroupMetadataResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateGroupMetadataResponse proto.InternalMessageInfo -// MsgCreateGroupAccount is the Msg/CreateGroupAccount request type. -type MsgCreateGroupAccount struct { +// MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. +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 to attached to the group account. + // metadata is any arbitrary metadata attached to the group policy. Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - // decision_policy specifies the group account's decision policy. + // 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"` } -func (m *MsgCreateGroupAccount) Reset() { *m = MsgCreateGroupAccount{} } -func (m *MsgCreateGroupAccount) String() string { return proto.CompactTextString(m) } -func (*MsgCreateGroupAccount) ProtoMessage() {} -func (*MsgCreateGroupAccount) Descriptor() ([]byte, []int) { +func (m *MsgCreateGroupPolicy) Reset() { *m = MsgCreateGroupPolicy{} } +func (m *MsgCreateGroupPolicy) String() string { return proto.CompactTextString(m) } +func (*MsgCreateGroupPolicy) ProtoMessage() {} +func (*MsgCreateGroupPolicy) Descriptor() ([]byte, []int) { return fileDescriptor_da0de9d603d844fb, []int{8} } -func (m *MsgCreateGroupAccount) XXX_Unmarshal(b []byte) error { +func (m *MsgCreateGroupPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgCreateGroupAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgCreateGroupPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgCreateGroupAccount.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgCreateGroupPolicy.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -509,36 +509,36 @@ func (m *MsgCreateGroupAccount) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (m *MsgCreateGroupAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateGroupAccount.Merge(m, src) +func (m *MsgCreateGroupPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateGroupPolicy.Merge(m, src) } -func (m *MsgCreateGroupAccount) XXX_Size() int { +func (m *MsgCreateGroupPolicy) XXX_Size() int { return m.Size() } -func (m *MsgCreateGroupAccount) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateGroupAccount.DiscardUnknown(m) +func (m *MsgCreateGroupPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateGroupPolicy.DiscardUnknown(m) } -var xxx_messageInfo_MsgCreateGroupAccount proto.InternalMessageInfo +var xxx_messageInfo_MsgCreateGroupPolicy proto.InternalMessageInfo -// MsgCreateGroupAccountResponse is the Msg/CreateGroupAccount response type. -type MsgCreateGroupAccountResponse struct { - // address is the account address of the newly created group account. +// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. +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"` } -func (m *MsgCreateGroupAccountResponse) Reset() { *m = MsgCreateGroupAccountResponse{} } -func (m *MsgCreateGroupAccountResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCreateGroupAccountResponse) ProtoMessage() {} -func (*MsgCreateGroupAccountResponse) Descriptor() ([]byte, []int) { +func (m *MsgCreateGroupPolicyResponse) Reset() { *m = MsgCreateGroupPolicyResponse{} } +func (m *MsgCreateGroupPolicyResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateGroupPolicyResponse) ProtoMessage() {} +func (*MsgCreateGroupPolicyResponse) Descriptor() ([]byte, []int) { return fileDescriptor_da0de9d603d844fb, []int{9} } -func (m *MsgCreateGroupAccountResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgCreateGroupPolicyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgCreateGroupAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgCreateGroupPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgCreateGroupAccountResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgCreateGroupPolicyResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -548,47 +548,47 @@ func (m *MsgCreateGroupAccountResponse) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *MsgCreateGroupAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateGroupAccountResponse.Merge(m, src) +func (m *MsgCreateGroupPolicyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateGroupPolicyResponse.Merge(m, src) } -func (m *MsgCreateGroupAccountResponse) XXX_Size() int { +func (m *MsgCreateGroupPolicyResponse) XXX_Size() int { return m.Size() } -func (m *MsgCreateGroupAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateGroupAccountResponse.DiscardUnknown(m) +func (m *MsgCreateGroupPolicyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateGroupPolicyResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgCreateGroupAccountResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgCreateGroupPolicyResponse proto.InternalMessageInfo -func (m *MsgCreateGroupAccountResponse) GetAddress() string { +func (m *MsgCreateGroupPolicyResponse) GetAddress() string { if m != nil { return m.Address } return "" } -// MsgUpdateGroupAccountAdmin is the Msg/UpdateGroupAccountAdmin request type. -type MsgUpdateGroupAccountAdmin struct { +// MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. +type MsgUpdateGroupPolicyAdmin struct { // admin is the account address of the group admin. Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // address is the group account address. + // address is the account address of the group policy. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // new_admin is the new group account admin. + // new_admin is the new group policy admin. NewAdmin string `protobuf:"bytes,3,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty"` } -func (m *MsgUpdateGroupAccountAdmin) Reset() { *m = MsgUpdateGroupAccountAdmin{} } -func (m *MsgUpdateGroupAccountAdmin) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateGroupAccountAdmin) ProtoMessage() {} -func (*MsgUpdateGroupAccountAdmin) Descriptor() ([]byte, []int) { +func (m *MsgUpdateGroupPolicyAdmin) Reset() { *m = MsgUpdateGroupPolicyAdmin{} } +func (m *MsgUpdateGroupPolicyAdmin) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupPolicyAdmin) ProtoMessage() {} +func (*MsgUpdateGroupPolicyAdmin) Descriptor() ([]byte, []int) { return fileDescriptor_da0de9d603d844fb, []int{10} } -func (m *MsgUpdateGroupAccountAdmin) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateGroupPolicyAdmin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateGroupAccountAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateGroupPolicyAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateGroupAccountAdmin.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateGroupPolicyAdmin.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -598,55 +598,55 @@ func (m *MsgUpdateGroupAccountAdmin) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *MsgUpdateGroupAccountAdmin) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateGroupAccountAdmin.Merge(m, src) +func (m *MsgUpdateGroupPolicyAdmin) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupPolicyAdmin.Merge(m, src) } -func (m *MsgUpdateGroupAccountAdmin) XXX_Size() int { +func (m *MsgUpdateGroupPolicyAdmin) XXX_Size() int { return m.Size() } -func (m *MsgUpdateGroupAccountAdmin) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateGroupAccountAdmin.DiscardUnknown(m) +func (m *MsgUpdateGroupPolicyAdmin) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupPolicyAdmin.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateGroupAccountAdmin proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateGroupPolicyAdmin proto.InternalMessageInfo -func (m *MsgUpdateGroupAccountAdmin) GetAdmin() string { +func (m *MsgUpdateGroupPolicyAdmin) GetAdmin() string { if m != nil { return m.Admin } return "" } -func (m *MsgUpdateGroupAccountAdmin) GetAddress() string { +func (m *MsgUpdateGroupPolicyAdmin) GetAddress() string { if m != nil { return m.Address } return "" } -func (m *MsgUpdateGroupAccountAdmin) GetNewAdmin() string { +func (m *MsgUpdateGroupPolicyAdmin) GetNewAdmin() string { if m != nil { return m.NewAdmin } return "" } -// MsgUpdateGroupAccountAdminResponse is the Msg/UpdateGroupAccountAdmin response type. -type MsgUpdateGroupAccountAdminResponse struct { +// MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. +type MsgUpdateGroupPolicyAdminResponse struct { } -func (m *MsgUpdateGroupAccountAdminResponse) Reset() { *m = MsgUpdateGroupAccountAdminResponse{} } -func (m *MsgUpdateGroupAccountAdminResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateGroupAccountAdminResponse) ProtoMessage() {} -func (*MsgUpdateGroupAccountAdminResponse) Descriptor() ([]byte, []int) { +func (m *MsgUpdateGroupPolicyAdminResponse) Reset() { *m = MsgUpdateGroupPolicyAdminResponse{} } +func (m *MsgUpdateGroupPolicyAdminResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupPolicyAdminResponse) ProtoMessage() {} +func (*MsgUpdateGroupPolicyAdminResponse) Descriptor() ([]byte, []int) { return fileDescriptor_da0de9d603d844fb, []int{11} } -func (m *MsgUpdateGroupAccountAdminResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateGroupPolicyAdminResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateGroupAccountAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateGroupPolicyAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateGroupAccountAdminResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateGroupPolicyAdminResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -656,40 +656,40 @@ func (m *MsgUpdateGroupAccountAdminResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *MsgUpdateGroupAccountAdminResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateGroupAccountAdminResponse.Merge(m, src) +func (m *MsgUpdateGroupPolicyAdminResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupPolicyAdminResponse.Merge(m, src) } -func (m *MsgUpdateGroupAccountAdminResponse) XXX_Size() int { +func (m *MsgUpdateGroupPolicyAdminResponse) XXX_Size() int { return m.Size() } -func (m *MsgUpdateGroupAccountAdminResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateGroupAccountAdminResponse.DiscardUnknown(m) +func (m *MsgUpdateGroupPolicyAdminResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupPolicyAdminResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateGroupAccountAdminResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateGroupPolicyAdminResponse proto.InternalMessageInfo -// MsgUpdateGroupAccountDecisionPolicy is the Msg/UpdateGroupAccountDecisionPolicy request type. -type MsgUpdateGroupAccountDecisionPolicy struct { +// MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. +type MsgUpdateGroupPolicyDecisionPolicy struct { // admin is the account address of the group admin. Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // address is the group account address. + // address is the account address of group policy. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // decision_policy is the updated group account decision policy. + // 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"` } -func (m *MsgUpdateGroupAccountDecisionPolicy) Reset() { *m = MsgUpdateGroupAccountDecisionPolicy{} } -func (m *MsgUpdateGroupAccountDecisionPolicy) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateGroupAccountDecisionPolicy) ProtoMessage() {} -func (*MsgUpdateGroupAccountDecisionPolicy) Descriptor() ([]byte, []int) { +func (m *MsgUpdateGroupPolicyDecisionPolicy) Reset() { *m = MsgUpdateGroupPolicyDecisionPolicy{} } +func (m *MsgUpdateGroupPolicyDecisionPolicy) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupPolicyDecisionPolicy) ProtoMessage() {} +func (*MsgUpdateGroupPolicyDecisionPolicy) Descriptor() ([]byte, []int) { return fileDescriptor_da0de9d603d844fb, []int{12} } -func (m *MsgUpdateGroupAccountDecisionPolicy) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateGroupPolicyDecisionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateGroupAccountDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateGroupPolicyDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicy.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateGroupPolicyDecisionPolicy.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -699,38 +699,38 @@ func (m *MsgUpdateGroupAccountDecisionPolicy) XXX_Marshal(b []byte, deterministi return b[:n], nil } } -func (m *MsgUpdateGroupAccountDecisionPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicy.Merge(m, src) +func (m *MsgUpdateGroupPolicyDecisionPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupPolicyDecisionPolicy.Merge(m, src) } -func (m *MsgUpdateGroupAccountDecisionPolicy) XXX_Size() int { +func (m *MsgUpdateGroupPolicyDecisionPolicy) XXX_Size() int { return m.Size() } -func (m *MsgUpdateGroupAccountDecisionPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicy.DiscardUnknown(m) +func (m *MsgUpdateGroupPolicyDecisionPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupPolicyDecisionPolicy.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicy proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateGroupPolicyDecisionPolicy proto.InternalMessageInfo -// MsgUpdateGroupAccountDecisionPolicyResponse is the Msg/UpdateGroupAccountDecisionPolicy response type. -type MsgUpdateGroupAccountDecisionPolicyResponse struct { +// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. +type MsgUpdateGroupPolicyDecisionPolicyResponse struct { } -func (m *MsgUpdateGroupAccountDecisionPolicyResponse) Reset() { - *m = MsgUpdateGroupAccountDecisionPolicyResponse{} +func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) Reset() { + *m = MsgUpdateGroupPolicyDecisionPolicyResponse{} } -func (m *MsgUpdateGroupAccountDecisionPolicyResponse) String() string { +func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateGroupAccountDecisionPolicyResponse) ProtoMessage() {} -func (*MsgUpdateGroupAccountDecisionPolicyResponse) Descriptor() ([]byte, []int) { +func (*MsgUpdateGroupPolicyDecisionPolicyResponse) ProtoMessage() {} +func (*MsgUpdateGroupPolicyDecisionPolicyResponse) Descriptor() ([]byte, []int) { return fileDescriptor_da0de9d603d844fb, []int{13} } -func (m *MsgUpdateGroupAccountDecisionPolicyResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateGroupAccountDecisionPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateGroupPolicyDecisionPolicyResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -740,40 +740,40 @@ func (m *MsgUpdateGroupAccountDecisionPolicyResponse) XXX_Marshal(b []byte, dete return b[:n], nil } } -func (m *MsgUpdateGroupAccountDecisionPolicyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyResponse.Merge(m, src) +func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupPolicyDecisionPolicyResponse.Merge(m, src) } -func (m *MsgUpdateGroupAccountDecisionPolicyResponse) XXX_Size() int { +func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) XXX_Size() int { return m.Size() } -func (m *MsgUpdateGroupAccountDecisionPolicyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyResponse.DiscardUnknown(m) +func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupPolicyDecisionPolicyResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateGroupPolicyDecisionPolicyResponse proto.InternalMessageInfo -// MsgUpdateGroupAccountMetadata is the Msg/UpdateGroupAccountMetadata request type. -type MsgUpdateGroupAccountMetadata struct { +// MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. +type MsgUpdateGroupPolicyMetadata struct { // admin is the account address of the group admin. Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - // address is the group account address. + // address is the account address of group policy. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // metadata is the updated group account metadata. + // metadata is the updated group policy metadata. Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` } -func (m *MsgUpdateGroupAccountMetadata) Reset() { *m = MsgUpdateGroupAccountMetadata{} } -func (m *MsgUpdateGroupAccountMetadata) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateGroupAccountMetadata) ProtoMessage() {} -func (*MsgUpdateGroupAccountMetadata) Descriptor() ([]byte, []int) { +func (m *MsgUpdateGroupPolicyMetadata) Reset() { *m = MsgUpdateGroupPolicyMetadata{} } +func (m *MsgUpdateGroupPolicyMetadata) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupPolicyMetadata) ProtoMessage() {} +func (*MsgUpdateGroupPolicyMetadata) Descriptor() ([]byte, []int) { return fileDescriptor_da0de9d603d844fb, []int{14} } -func (m *MsgUpdateGroupAccountMetadata) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateGroupPolicyMetadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateGroupAccountMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateGroupPolicyMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateGroupAccountMetadata.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateGroupPolicyMetadata.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -783,55 +783,55 @@ func (m *MsgUpdateGroupAccountMetadata) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *MsgUpdateGroupAccountMetadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateGroupAccountMetadata.Merge(m, src) +func (m *MsgUpdateGroupPolicyMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupPolicyMetadata.Merge(m, src) } -func (m *MsgUpdateGroupAccountMetadata) XXX_Size() int { +func (m *MsgUpdateGroupPolicyMetadata) XXX_Size() int { return m.Size() } -func (m *MsgUpdateGroupAccountMetadata) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateGroupAccountMetadata.DiscardUnknown(m) +func (m *MsgUpdateGroupPolicyMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupPolicyMetadata.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateGroupAccountMetadata proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateGroupPolicyMetadata proto.InternalMessageInfo -func (m *MsgUpdateGroupAccountMetadata) GetAdmin() string { +func (m *MsgUpdateGroupPolicyMetadata) GetAdmin() string { if m != nil { return m.Admin } return "" } -func (m *MsgUpdateGroupAccountMetadata) GetAddress() string { +func (m *MsgUpdateGroupPolicyMetadata) GetAddress() string { if m != nil { return m.Address } return "" } -func (m *MsgUpdateGroupAccountMetadata) GetMetadata() []byte { +func (m *MsgUpdateGroupPolicyMetadata) GetMetadata() []byte { if m != nil { return m.Metadata } return nil } -// MsgUpdateGroupAccountMetadataResponse is the Msg/UpdateGroupAccountMetadata response type. -type MsgUpdateGroupAccountMetadataResponse struct { +// MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. +type MsgUpdateGroupPolicyMetadataResponse struct { } -func (m *MsgUpdateGroupAccountMetadataResponse) Reset() { *m = MsgUpdateGroupAccountMetadataResponse{} } -func (m *MsgUpdateGroupAccountMetadataResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateGroupAccountMetadataResponse) ProtoMessage() {} -func (*MsgUpdateGroupAccountMetadataResponse) Descriptor() ([]byte, []int) { +func (m *MsgUpdateGroupPolicyMetadataResponse) Reset() { *m = MsgUpdateGroupPolicyMetadataResponse{} } +func (m *MsgUpdateGroupPolicyMetadataResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupPolicyMetadataResponse) ProtoMessage() {} +func (*MsgUpdateGroupPolicyMetadataResponse) Descriptor() ([]byte, []int) { return fileDescriptor_da0de9d603d844fb, []int{15} } -func (m *MsgUpdateGroupAccountMetadataResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateGroupPolicyMetadataResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateGroupAccountMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateGroupPolicyMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateGroupAccountMetadataResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateGroupPolicyMetadataResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -841,21 +841,21 @@ func (m *MsgUpdateGroupAccountMetadataResponse) XXX_Marshal(b []byte, determinis return b[:n], nil } } -func (m *MsgUpdateGroupAccountMetadataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateGroupAccountMetadataResponse.Merge(m, src) +func (m *MsgUpdateGroupPolicyMetadataResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupPolicyMetadataResponse.Merge(m, src) } -func (m *MsgUpdateGroupAccountMetadataResponse) XXX_Size() int { +func (m *MsgUpdateGroupPolicyMetadataResponse) XXX_Size() int { return m.Size() } -func (m *MsgUpdateGroupAccountMetadataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateGroupAccountMetadataResponse.DiscardUnknown(m) +func (m *MsgUpdateGroupPolicyMetadataResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupPolicyMetadataResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateGroupAccountMetadataResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateGroupPolicyMetadataResponse proto.InternalMessageInfo // MsgCreateProposal is the Msg/CreateProposal request type. type MsgCreateProposal struct { - // address is the group account address. + // address is the account address of group policy. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // proposers are the account addresses of the proposers. // Proposers signatures will be counted as yes votes. @@ -1171,14 +1171,14 @@ func init() { proto.RegisterType((*MsgUpdateGroupAdminResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAdminResponse") proto.RegisterType((*MsgUpdateGroupMetadata)(nil), "cosmos.group.v1beta1.MsgUpdateGroupMetadata") proto.RegisterType((*MsgUpdateGroupMetadataResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupMetadataResponse") - proto.RegisterType((*MsgCreateGroupAccount)(nil), "cosmos.group.v1beta1.MsgCreateGroupAccount") - proto.RegisterType((*MsgCreateGroupAccountResponse)(nil), "cosmos.group.v1beta1.MsgCreateGroupAccountResponse") - proto.RegisterType((*MsgUpdateGroupAccountAdmin)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAccountAdmin") - proto.RegisterType((*MsgUpdateGroupAccountAdminResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAccountAdminResponse") - proto.RegisterType((*MsgUpdateGroupAccountDecisionPolicy)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAccountDecisionPolicy") - proto.RegisterType((*MsgUpdateGroupAccountDecisionPolicyResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAccountDecisionPolicyResponse") - proto.RegisterType((*MsgUpdateGroupAccountMetadata)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAccountMetadata") - proto.RegisterType((*MsgUpdateGroupAccountMetadataResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupAccountMetadataResponse") + proto.RegisterType((*MsgCreateGroupPolicy)(nil), "cosmos.group.v1beta1.MsgCreateGroupPolicy") + proto.RegisterType((*MsgCreateGroupPolicyResponse)(nil), "cosmos.group.v1beta1.MsgCreateGroupPolicyResponse") + proto.RegisterType((*MsgUpdateGroupPolicyAdmin)(nil), "cosmos.group.v1beta1.MsgUpdateGroupPolicyAdmin") + proto.RegisterType((*MsgUpdateGroupPolicyAdminResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupPolicyAdminResponse") + proto.RegisterType((*MsgUpdateGroupPolicyDecisionPolicy)(nil), "cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicy") + proto.RegisterType((*MsgUpdateGroupPolicyDecisionPolicyResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupPolicyDecisionPolicyResponse") + proto.RegisterType((*MsgUpdateGroupPolicyMetadata)(nil), "cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadata") + proto.RegisterType((*MsgUpdateGroupPolicyMetadataResponse)(nil), "cosmos.group.v1beta1.MsgUpdateGroupPolicyMetadataResponse") proto.RegisterType((*MsgCreateProposal)(nil), "cosmos.group.v1beta1.MsgCreateProposal") proto.RegisterType((*MsgCreateProposalResponse)(nil), "cosmos.group.v1beta1.MsgCreateProposalResponse") proto.RegisterType((*MsgVote)(nil), "cosmos.group.v1beta1.MsgVote") @@ -1190,70 +1190,70 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/tx.proto", fileDescriptor_da0de9d603d844fb) } var fileDescriptor_da0de9d603d844fb = []byte{ - // 1000 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x5f, 0x6f, 0xdb, 0x54, - 0x14, 0xcf, 0x6d, 0xbc, 0xfe, 0x39, 0x1d, 0x59, 0xe7, 0x15, 0x48, 0xcd, 0x9a, 0x46, 0xa6, 0xd3, - 0xc2, 0xba, 0x3a, 0x6b, 0x3a, 0x24, 0xfe, 0x4c, 0x48, 0x69, 0x17, 0x50, 0x24, 0x82, 0x8a, 0xcb, - 0x10, 0x20, 0xa4, 0xc8, 0xb1, 0x2f, 0x5e, 0xa0, 0xf1, 0xb5, 0x72, 0x9d, 0xae, 0x79, 0xe2, 0x09, - 0x09, 0x5e, 0x10, 0x6f, 0x48, 0xbc, 0xb0, 0x2f, 0xc0, 0xdb, 0x24, 0xbe, 0xc2, 0xc4, 0xd3, 0xc4, - 0x0b, 0x3c, 0x20, 0x04, 0xed, 0x17, 0x99, 0x72, 0xef, 0xf5, 0x5d, 0xdc, 0x3a, 0x8e, 0x13, 0x55, - 0x7d, 0x6a, 0xed, 0xf3, 0x3b, 0xe7, 0xfc, 0x7e, 0xe7, 0x9e, 0xe3, 0x73, 0x03, 0xab, 0x36, 0xa1, - 0x1d, 0x42, 0xcb, 0x6e, 0x97, 0xf4, 0xfc, 0xf2, 0xe1, 0x56, 0x0b, 0x07, 0xd6, 0x56, 0x39, 0x38, - 0x32, 0xfc, 0x2e, 0x09, 0x88, 0xba, 0xcc, 0xcd, 0x06, 0x33, 0x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, 0x2a, 0x29, 0xfe, 0x88, 0x40, 0x4b, 0xd8, 0x75, 0xdb, 0x13, - 0x64, 0x90, 0xcd, 0xf2, 0xee, 0x14, 0x4e, 0x92, 0xd0, 0xd7, 0x90, 0x3b, 0xb5, 0xb0, 0x6e, 0x8e, - 0x69, 0x81, 0x10, 0xa8, 0x95, 0x53, 0x02, 0x65, 0xae, 0x0f, 0x41, 0x61, 0x9f, 0xfe, 0xd5, 0x91, - 0x8e, 0x03, 0xb3, 0x76, 0x23, 0xd1, 0x3c, 0x1c, 0x8d, 0x7d, 0xe9, 0x46, 0x47, 0x1b, 0x98, 0x13, - 0xa2, 0x0d, 0x7f, 0x37, 0x77, 0xde, 0x7b, 0x7a, 0x5c, 0x40, 0xcf, 0x8e, 0x0b, 0xe8, 0xbf, 0xe3, - 0x02, 0xfa, 0xe9, 0xa4, 0x90, 0x79, 0x76, 0x52, 0xc8, 0xfc, 0x7d, 0x52, 0xc8, 0x7c, 0xb1, 0xee, - 0xb6, 0x83, 0x87, 0xbd, 0x96, 0x61, 0x93, 0x8e, 0xf8, 0x65, 0x2c, 0xfe, 0x6c, 0x52, 0xe7, 0x9b, - 0xf2, 0x11, 0xff, 0xf5, 0xdb, 0x9a, 0x65, 0x2b, 0x76, 0xfb, 0x79, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x65, 0x55, 0x6b, 0xa9, 0x95, 0x0f, 0x00, 0x00, + // 995 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x51, 0x6f, 0xdb, 0x54, + 0x14, 0xce, 0x6d, 0xbc, 0xb6, 0x39, 0x1d, 0x59, 0xeb, 0x85, 0x29, 0x35, 0x6d, 0x12, 0x4c, 0x81, + 0x50, 0x5a, 0x9b, 0xa6, 0x43, 0xa0, 0x69, 0x42, 0xb4, 0x5d, 0x40, 0x91, 0x08, 0x2a, 0x1e, 0x43, + 0x80, 0x90,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c5, 0x2b, 0x15, 0x54, 0xcd, 0xd7, 0x94, 0xf8, 0x8d, 0x52, 0x3f, 0xc5, 0x1d, + 0x83, 0xe1, 0x82, 0xd2, 0xde, 0x66, 0xb3, 0x19, 0x95, 0x28, 0xa6, 0xbd, 0x0c, 0x4b, 0x5e, 0xf0, + 0xee, 0xc9, 0xc6, 0x84, 0xf0, 0x55, 0xc3, 0x52, 0xff, 0x42, 0xb0, 0xd0, 0xa4, 0xf6, 0x47, 0xc4, + 0x4f, 0x06, 0x0f, 0xca, 0x7e, 0x42, 0x7c, 0xdc, 0x4b, 0x2c, 0x22, 0x87, 0xc9, 0x37, 0x61, 0xbe, + 0x73, 0x9f, 0x38, 0x1d, 0xcc, 0x0e, 0x25, 0x3f, 0x6e, 0x49, 0x1e, 0x30, 0x8c, 0x11, 0x60, 0x23, + 0x87, 0x29, 0x3d, 0x75, 0x98, 0x53, 0x1e, 0x91, 0xba, 0x02, 0xd7, 0x02, 0x75, 0xa2, 0x27, 0x3e, + 0x63, 0x82, 0x07, 0x98, 0x64, 0xc1, 0xaf, 0xc1, 0x3c, 0x75, 0x6c, 0x37, 0x85, 0xe2, 0x00, 0x17, + 0x24, 0x64, 0x0c, 0x82, 0x84, 0x9b, 0x9b, 0x20, 0xb1, 0x6c, 0x05, 0x58, 0xae, 0x7f, 0x5c, 0x3f, + 0x68, 0xdd, 0x7b, 0xff, 0xee, 0x61, 0xfd, 0xa0, 0xf1, 0x4e, 0xa3, 0x7e, 0x67, 0x39, 0x23, 0x5f, + 0x85, 0x45, 0xf6, 0xf6, 0x43, 0xe3, 0x93, 0x65, 0x54, 0xfb, 0x2f, 0x07, 0xd9, 0x26, 0xb5, 0x65, + 0x13, 0x96, 0x86, 0x6f, 0x66, 0x1b, 0x63, 0x6e, 0x17, 0x91, 0x0f, 0xbd, 0xb2, 0x95, 0x06, 0x25, + 0x5a, 0xe3, 0x04, 0xe4, 0x98, 0xab, 0xd2, 0xab, 0x63, 0x63, 0x8c, 0x82, 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43, 0xba, 0xc1, 0xaf, 0xe0, 0xe0, 0xcf, 0x36, 0xb5, 0xbe, 0xd4, 0x4f, 0xf9, 0x2f, 0xdd, + 0xf6, 0x3c, 0x5b, 0xab, 0xbb, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xf1, 0xe7, 0xd1, 0x30, 0x81, + 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1276,14 +1276,14 @@ type MsgClient interface { 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) - // CreateGroupAccount creates a new group account using given DecisionPolicy. - CreateGroupAccount(ctx context.Context, in *MsgCreateGroupAccount, opts ...grpc.CallOption) (*MsgCreateGroupAccountResponse, error) - // UpdateGroupAccountAdmin updates a group account admin. - UpdateGroupAccountAdmin(ctx context.Context, in *MsgUpdateGroupAccountAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupAccountAdminResponse, error) - // UpdateGroupAccountDecisionPolicy allows a group account decision policy to be updated. - UpdateGroupAccountDecisionPolicy(ctx context.Context, in *MsgUpdateGroupAccountDecisionPolicy, opts ...grpc.CallOption) (*MsgUpdateGroupAccountDecisionPolicyResponse, error) - // UpdateGroupAccountMetadata updates a group account metadata. - UpdateGroupAccountMetadata(ctx context.Context, in *MsgUpdateGroupAccountMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupAccountMetadataResponse, error) + // CreateGroupPolicy creates a new group policy using given DecisionPolicy. + CreateGroupPolicy(ctx context.Context, in *MsgCreateGroupPolicy, opts ...grpc.CallOption) (*MsgCreateGroupPolicyResponse, 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) // CreateProposal submits a new proposal. CreateProposal(ctx context.Context, in *MsgCreateProposal, opts ...grpc.CallOption) (*MsgCreateProposalResponse, error) // Vote allows a voter to vote on a proposal. @@ -1336,36 +1336,36 @@ func (c *msgClient) UpdateGroupMetadata(ctx context.Context, in *MsgUpdateGroupM return out, nil } -func (c *msgClient) CreateGroupAccount(ctx context.Context, in *MsgCreateGroupAccount, opts ...grpc.CallOption) (*MsgCreateGroupAccountResponse, error) { - out := new(MsgCreateGroupAccountResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/CreateGroupAccount", in, out, opts...) +func (c *msgClient) CreateGroupPolicy(ctx context.Context, in *MsgCreateGroupPolicy, opts ...grpc.CallOption) (*MsgCreateGroupPolicyResponse, error) { + out := new(MsgCreateGroupPolicyResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/CreateGroupPolicy", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) UpdateGroupAccountAdmin(ctx context.Context, in *MsgUpdateGroupAccountAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupAccountAdminResponse, error) { - out := new(MsgUpdateGroupAccountAdminResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupAccountAdmin", in, out, opts...) +func (c *msgClient) UpdateGroupPolicyAdmin(ctx context.Context, in *MsgUpdateGroupPolicyAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyAdminResponse, error) { + out := new(MsgUpdateGroupPolicyAdminResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupPolicyAdmin", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) UpdateGroupAccountDecisionPolicy(ctx context.Context, in *MsgUpdateGroupAccountDecisionPolicy, opts ...grpc.CallOption) (*MsgUpdateGroupAccountDecisionPolicyResponse, error) { - out := new(MsgUpdateGroupAccountDecisionPolicyResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupAccountDecisionPolicy", in, out, opts...) +func (c *msgClient) UpdateGroupPolicyDecisionPolicy(ctx context.Context, in *MsgUpdateGroupPolicyDecisionPolicy, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyDecisionPolicyResponse, error) { + out := new(MsgUpdateGroupPolicyDecisionPolicyResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupPolicyDecisionPolicy", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) UpdateGroupAccountMetadata(ctx context.Context, in *MsgUpdateGroupAccountMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupAccountMetadataResponse, error) { - out := new(MsgUpdateGroupAccountMetadataResponse) - err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupAccountMetadata", in, out, opts...) +func (c *msgClient) UpdateGroupPolicyMetadata(ctx context.Context, in *MsgUpdateGroupPolicyMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyMetadataResponse, error) { + out := new(MsgUpdateGroupPolicyMetadataResponse) + err := c.cc.Invoke(ctx, "/cosmos.group.v1beta1.Msg/UpdateGroupPolicyMetadata", in, out, opts...) if err != nil { return nil, err } @@ -1409,14 +1409,14 @@ type MsgServer interface { UpdateGroupAdmin(context.Context, *MsgUpdateGroupAdmin) (*MsgUpdateGroupAdminResponse, error) // UpdateGroupMetadata updates the group metadata with given group id and admin address. UpdateGroupMetadata(context.Context, *MsgUpdateGroupMetadata) (*MsgUpdateGroupMetadataResponse, error) - // CreateGroupAccount creates a new group account using given DecisionPolicy. - CreateGroupAccount(context.Context, *MsgCreateGroupAccount) (*MsgCreateGroupAccountResponse, error) - // UpdateGroupAccountAdmin updates a group account admin. - UpdateGroupAccountAdmin(context.Context, *MsgUpdateGroupAccountAdmin) (*MsgUpdateGroupAccountAdminResponse, error) - // UpdateGroupAccountDecisionPolicy allows a group account decision policy to be updated. - UpdateGroupAccountDecisionPolicy(context.Context, *MsgUpdateGroupAccountDecisionPolicy) (*MsgUpdateGroupAccountDecisionPolicyResponse, error) - // UpdateGroupAccountMetadata updates a group account metadata. - UpdateGroupAccountMetadata(context.Context, *MsgUpdateGroupAccountMetadata) (*MsgUpdateGroupAccountMetadataResponse, error) + // CreateGroupPolicy creates a new group policy using given DecisionPolicy. + CreateGroupPolicy(context.Context, *MsgCreateGroupPolicy) (*MsgCreateGroupPolicyResponse, 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) // CreateProposal submits a new proposal. CreateProposal(context.Context, *MsgCreateProposal) (*MsgCreateProposalResponse, error) // Vote allows a voter to vote on a proposal. @@ -1441,17 +1441,17 @@ func (*UnimplementedMsgServer) UpdateGroupAdmin(ctx context.Context, req *MsgUpd func (*UnimplementedMsgServer) UpdateGroupMetadata(ctx context.Context, req *MsgUpdateGroupMetadata) (*MsgUpdateGroupMetadataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupMetadata not implemented") } -func (*UnimplementedMsgServer) CreateGroupAccount(ctx context.Context, req *MsgCreateGroupAccount) (*MsgCreateGroupAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateGroupAccount not implemented") +func (*UnimplementedMsgServer) CreateGroupPolicy(ctx context.Context, req *MsgCreateGroupPolicy) (*MsgCreateGroupPolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGroupPolicy not implemented") } -func (*UnimplementedMsgServer) UpdateGroupAccountAdmin(ctx context.Context, req *MsgUpdateGroupAccountAdmin) (*MsgUpdateGroupAccountAdminResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupAccountAdmin not implemented") +func (*UnimplementedMsgServer) UpdateGroupPolicyAdmin(ctx context.Context, req *MsgUpdateGroupPolicyAdmin) (*MsgUpdateGroupPolicyAdminResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupPolicyAdmin not implemented") } -func (*UnimplementedMsgServer) UpdateGroupAccountDecisionPolicy(ctx context.Context, req *MsgUpdateGroupAccountDecisionPolicy) (*MsgUpdateGroupAccountDecisionPolicyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupAccountDecisionPolicy not implemented") +func (*UnimplementedMsgServer) UpdateGroupPolicyDecisionPolicy(ctx context.Context, req *MsgUpdateGroupPolicyDecisionPolicy) (*MsgUpdateGroupPolicyDecisionPolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupPolicyDecisionPolicy not implemented") } -func (*UnimplementedMsgServer) UpdateGroupAccountMetadata(ctx context.Context, req *MsgUpdateGroupAccountMetadata) (*MsgUpdateGroupAccountMetadataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupAccountMetadata not implemented") +func (*UnimplementedMsgServer) UpdateGroupPolicyMetadata(ctx context.Context, req *MsgUpdateGroupPolicyMetadata) (*MsgUpdateGroupPolicyMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupPolicyMetadata not implemented") } func (*UnimplementedMsgServer) CreateProposal(ctx context.Context, req *MsgCreateProposal) (*MsgCreateProposalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateProposal not implemented") @@ -1539,74 +1539,74 @@ func _Msg_UpdateGroupMetadata_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Msg_CreateGroupAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateGroupAccount) +func _Msg_CreateGroupPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateGroupPolicy) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).CreateGroupAccount(ctx, in) + return srv.(MsgServer).CreateGroupPolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.group.v1beta1.Msg/CreateGroupAccount", + FullMethod: "/cosmos.group.v1beta1.Msg/CreateGroupPolicy", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateGroupAccount(ctx, req.(*MsgCreateGroupAccount)) + return srv.(MsgServer).CreateGroupPolicy(ctx, req.(*MsgCreateGroupPolicy)) } return interceptor(ctx, in, info, handler) } -func _Msg_UpdateGroupAccountAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateGroupAccountAdmin) +func _Msg_UpdateGroupPolicyAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateGroupPolicyAdmin) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).UpdateGroupAccountAdmin(ctx, in) + return srv.(MsgServer).UpdateGroupPolicyAdmin(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.group.v1beta1.Msg/UpdateGroupAccountAdmin", + FullMethod: "/cosmos.group.v1beta1.Msg/UpdateGroupPolicyAdmin", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateGroupAccountAdmin(ctx, req.(*MsgUpdateGroupAccountAdmin)) + return srv.(MsgServer).UpdateGroupPolicyAdmin(ctx, req.(*MsgUpdateGroupPolicyAdmin)) } return interceptor(ctx, in, info, handler) } -func _Msg_UpdateGroupAccountDecisionPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateGroupAccountDecisionPolicy) +func _Msg_UpdateGroupPolicyDecisionPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateGroupPolicyDecisionPolicy) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).UpdateGroupAccountDecisionPolicy(ctx, in) + return srv.(MsgServer).UpdateGroupPolicyDecisionPolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.group.v1beta1.Msg/UpdateGroupAccountDecisionPolicy", + FullMethod: "/cosmos.group.v1beta1.Msg/UpdateGroupPolicyDecisionPolicy", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateGroupAccountDecisionPolicy(ctx, req.(*MsgUpdateGroupAccountDecisionPolicy)) + return srv.(MsgServer).UpdateGroupPolicyDecisionPolicy(ctx, req.(*MsgUpdateGroupPolicyDecisionPolicy)) } return interceptor(ctx, in, info, handler) } -func _Msg_UpdateGroupAccountMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateGroupAccountMetadata) +func _Msg_UpdateGroupPolicyMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateGroupPolicyMetadata) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).UpdateGroupAccountMetadata(ctx, in) + return srv.(MsgServer).UpdateGroupPolicyMetadata(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.group.v1beta1.Msg/UpdateGroupAccountMetadata", + FullMethod: "/cosmos.group.v1beta1.Msg/UpdateGroupPolicyMetadata", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateGroupAccountMetadata(ctx, req.(*MsgUpdateGroupAccountMetadata)) + return srv.(MsgServer).UpdateGroupPolicyMetadata(ctx, req.(*MsgUpdateGroupPolicyMetadata)) } return interceptor(ctx, in, info, handler) } @@ -1686,20 +1686,20 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_UpdateGroupMetadata_Handler, }, { - MethodName: "CreateGroupAccount", - Handler: _Msg_CreateGroupAccount_Handler, + MethodName: "CreateGroupPolicy", + Handler: _Msg_CreateGroupPolicy_Handler, }, { - MethodName: "UpdateGroupAccountAdmin", - Handler: _Msg_UpdateGroupAccountAdmin_Handler, + MethodName: "UpdateGroupPolicyAdmin", + Handler: _Msg_UpdateGroupPolicyAdmin_Handler, }, { - MethodName: "UpdateGroupAccountDecisionPolicy", - Handler: _Msg_UpdateGroupAccountDecisionPolicy_Handler, + MethodName: "UpdateGroupPolicyDecisionPolicy", + Handler: _Msg_UpdateGroupPolicyDecisionPolicy_Handler, }, { - MethodName: "UpdateGroupAccountMetadata", - Handler: _Msg_UpdateGroupAccountMetadata_Handler, + MethodName: "UpdateGroupPolicyMetadata", + Handler: _Msg_UpdateGroupPolicyMetadata_Handler, }, { MethodName: "CreateProposal", @@ -1999,7 +1999,7 @@ func (m *MsgUpdateGroupMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *MsgCreateGroupAccount) Marshal() (dAtA []byte, err error) { +func (m *MsgCreateGroupPolicy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2009,12 +2009,12 @@ func (m *MsgCreateGroupAccount) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgCreateGroupAccount) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgCreateGroupPolicy) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgCreateGroupAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgCreateGroupPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2053,7 +2053,7 @@ func (m *MsgCreateGroupAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgCreateGroupAccountResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgCreateGroupPolicyResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2063,12 +2063,12 @@ func (m *MsgCreateGroupAccountResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgCreateGroupAccountResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgCreateGroupPolicyResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgCreateGroupAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgCreateGroupPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2083,7 +2083,7 @@ func (m *MsgCreateGroupAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *MsgUpdateGroupAccountAdmin) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateGroupPolicyAdmin) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2093,12 +2093,12 @@ func (m *MsgUpdateGroupAccountAdmin) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateGroupAccountAdmin) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupPolicyAdmin) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateGroupAccountAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupPolicyAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2127,7 +2127,7 @@ func (m *MsgUpdateGroupAccountAdmin) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *MsgUpdateGroupAccountAdminResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateGroupPolicyAdminResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2137,12 +2137,12 @@ func (m *MsgUpdateGroupAccountAdminResponse) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *MsgUpdateGroupAccountAdminResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupPolicyAdminResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateGroupAccountAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupPolicyAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2150,7 +2150,7 @@ func (m *MsgUpdateGroupAccountAdminResponse) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } -func (m *MsgUpdateGroupAccountDecisionPolicy) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateGroupPolicyDecisionPolicy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2160,12 +2160,12 @@ func (m *MsgUpdateGroupAccountDecisionPolicy) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *MsgUpdateGroupAccountDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupPolicyDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateGroupAccountDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupPolicyDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2199,7 +2199,7 @@ func (m *MsgUpdateGroupAccountDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } -func (m *MsgUpdateGroupAccountDecisionPolicyResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2209,12 +2209,12 @@ func (m *MsgUpdateGroupAccountDecisionPolicyResponse) Marshal() (dAtA []byte, er return dAtA[:n], nil } -func (m *MsgUpdateGroupAccountDecisionPolicyResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateGroupAccountDecisionPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2222,7 +2222,7 @@ func (m *MsgUpdateGroupAccountDecisionPolicyResponse) MarshalToSizedBuffer(dAtA return len(dAtA) - i, nil } -func (m *MsgUpdateGroupAccountMetadata) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateGroupPolicyMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2232,12 +2232,12 @@ func (m *MsgUpdateGroupAccountMetadata) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateGroupAccountMetadata) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupPolicyMetadata) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateGroupAccountMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupPolicyMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2266,7 +2266,7 @@ func (m *MsgUpdateGroupAccountMetadata) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *MsgUpdateGroupAccountMetadataResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateGroupPolicyMetadataResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2276,12 +2276,12 @@ func (m *MsgUpdateGroupAccountMetadataResponse) Marshal() (dAtA []byte, err erro return dAtA[:n], nil } -func (m *MsgUpdateGroupAccountMetadataResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupPolicyMetadataResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateGroupAccountMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupPolicyMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2650,7 +2650,7 @@ func (m *MsgUpdateGroupMetadataResponse) Size() (n int) { return n } -func (m *MsgCreateGroupAccount) Size() (n int) { +func (m *MsgCreateGroupPolicy) Size() (n int) { if m == nil { return 0 } @@ -2674,7 +2674,7 @@ func (m *MsgCreateGroupAccount) Size() (n int) { return n } -func (m *MsgCreateGroupAccountResponse) Size() (n int) { +func (m *MsgCreateGroupPolicyResponse) Size() (n int) { if m == nil { return 0 } @@ -2687,7 +2687,7 @@ func (m *MsgCreateGroupAccountResponse) Size() (n int) { return n } -func (m *MsgUpdateGroupAccountAdmin) Size() (n int) { +func (m *MsgUpdateGroupPolicyAdmin) Size() (n int) { if m == nil { return 0 } @@ -2708,7 +2708,7 @@ func (m *MsgUpdateGroupAccountAdmin) Size() (n int) { return n } -func (m *MsgUpdateGroupAccountAdminResponse) Size() (n int) { +func (m *MsgUpdateGroupPolicyAdminResponse) Size() (n int) { if m == nil { return 0 } @@ -2717,7 +2717,7 @@ func (m *MsgUpdateGroupAccountAdminResponse) Size() (n int) { return n } -func (m *MsgUpdateGroupAccountDecisionPolicy) Size() (n int) { +func (m *MsgUpdateGroupPolicyDecisionPolicy) Size() (n int) { if m == nil { return 0 } @@ -2738,7 +2738,7 @@ func (m *MsgUpdateGroupAccountDecisionPolicy) Size() (n int) { return n } -func (m *MsgUpdateGroupAccountDecisionPolicyResponse) Size() (n int) { +func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) Size() (n int) { if m == nil { return 0 } @@ -2747,7 +2747,7 @@ func (m *MsgUpdateGroupAccountDecisionPolicyResponse) Size() (n int) { return n } -func (m *MsgUpdateGroupAccountMetadata) Size() (n int) { +func (m *MsgUpdateGroupPolicyMetadata) Size() (n int) { if m == nil { return 0 } @@ -2768,7 +2768,7 @@ func (m *MsgUpdateGroupAccountMetadata) Size() (n int) { return n } -func (m *MsgUpdateGroupAccountMetadataResponse) Size() (n int) { +func (m *MsgUpdateGroupPolicyMetadataResponse) Size() (n int) { if m == nil { return 0 } @@ -3659,7 +3659,7 @@ func (m *MsgUpdateGroupMetadataResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCreateGroupAccount) Unmarshal(dAtA []byte) error { +func (m *MsgCreateGroupPolicy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3682,10 +3682,10 @@ func (m *MsgCreateGroupAccount) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCreateGroupAccount: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCreateGroupPolicy: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateGroupAccount: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCreateGroupPolicy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3830,7 +3830,7 @@ func (m *MsgCreateGroupAccount) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCreateGroupAccountResponse) Unmarshal(dAtA []byte) error { +func (m *MsgCreateGroupPolicyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3853,10 +3853,10 @@ func (m *MsgCreateGroupAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCreateGroupAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCreateGroupPolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateGroupAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCreateGroupPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3912,7 +3912,7 @@ func (m *MsgCreateGroupAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateGroupAccountAdmin) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateGroupPolicyAdmin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3935,10 +3935,10 @@ func (m *MsgUpdateGroupAccountAdmin) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateGroupAccountAdmin: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateGroupPolicyAdmin: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateGroupAccountAdmin: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateGroupPolicyAdmin: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4058,7 +4058,7 @@ func (m *MsgUpdateGroupAccountAdmin) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateGroupAccountAdminResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateGroupPolicyAdminResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4081,10 +4081,10 @@ func (m *MsgUpdateGroupAccountAdminResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateGroupAccountAdminResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateGroupPolicyAdminResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateGroupAccountAdminResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateGroupPolicyAdminResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4108,7 +4108,7 @@ func (m *MsgUpdateGroupAccountAdminResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateGroupAccountDecisionPolicy) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateGroupPolicyDecisionPolicy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4131,10 +4131,10 @@ func (m *MsgUpdateGroupAccountDecisionPolicy) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateGroupAccountDecisionPolicy: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateGroupPolicyDecisionPolicy: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateGroupAccountDecisionPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateGroupPolicyDecisionPolicy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4258,7 +4258,7 @@ func (m *MsgUpdateGroupAccountDecisionPolicy) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateGroupAccountDecisionPolicyResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateGroupPolicyDecisionPolicyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4281,10 +4281,10 @@ func (m *MsgUpdateGroupAccountDecisionPolicyResponse) Unmarshal(dAtA []byte) err fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateGroupAccountDecisionPolicyResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateGroupPolicyDecisionPolicyResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateGroupAccountDecisionPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateGroupPolicyDecisionPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4308,7 +4308,7 @@ func (m *MsgUpdateGroupAccountDecisionPolicyResponse) Unmarshal(dAtA []byte) err } return nil } -func (m *MsgUpdateGroupAccountMetadata) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateGroupPolicyMetadata) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4331,10 +4331,10 @@ func (m *MsgUpdateGroupAccountMetadata) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateGroupAccountMetadata: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateGroupPolicyMetadata: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateGroupAccountMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateGroupPolicyMetadata: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4456,7 +4456,7 @@ func (m *MsgUpdateGroupAccountMetadata) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateGroupAccountMetadataResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateGroupPolicyMetadataResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4479,10 +4479,10 @@ func (m *MsgUpdateGroupAccountMetadataResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateGroupAccountMetadataResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateGroupPolicyMetadataResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateGroupAccountMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateGroupPolicyMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/x/group/types.go b/x/group/types.go index 942ef2a3e..25553db6e 100644 --- a/x/group/types.go +++ b/x/group/types.go @@ -118,12 +118,12 @@ func (p *ThresholdDecisionPolicy) Validate(g GroupInfo) error { return nil } -var _ orm.Validateable = GroupAccountInfo{} +var _ orm.Validateable = GroupPolicyInfo{} -// NewGroupAccountInfo creates a new GroupAccountInfo instance -func NewGroupAccountInfo(address sdk.AccAddress, group uint64, admin sdk.AccAddress, metadata []byte, - version uint64, decisionPolicy DecisionPolicy) (GroupAccountInfo, error) { - p := GroupAccountInfo{ +// NewGroupPolicyInfo creates a new GroupPolicyInfo instance +func NewGroupPolicyInfo(address sdk.AccAddress, group uint64, admin sdk.AccAddress, metadata []byte, + version uint64, decisionPolicy DecisionPolicy) (GroupPolicyInfo, error) { + p := GroupPolicyInfo{ Address: address.String(), GroupId: group, Admin: admin.String(), @@ -133,13 +133,13 @@ func NewGroupAccountInfo(address sdk.AccAddress, group uint64, admin sdk.AccAddr err := p.SetDecisionPolicy(decisionPolicy) if err != nil { - return GroupAccountInfo{}, err + return GroupPolicyInfo{}, err } return p, nil } -func (g *GroupAccountInfo) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { +func (g *GroupPolicyInfo) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { msg, ok := decisionPolicy.(proto.Message) if !ok { return fmt.Errorf("can't proto marshal %T", msg) @@ -152,7 +152,7 @@ func (g *GroupAccountInfo) SetDecisionPolicy(decisionPolicy DecisionPolicy) erro return nil } -func (g GroupAccountInfo) GetDecisionPolicy() DecisionPolicy { +func (g GroupPolicyInfo) GetDecisionPolicy() DecisionPolicy { decisionPolicy, ok := g.DecisionPolicy.GetCachedValue().(DecisionPolicy) if !ok { return nil @@ -161,12 +161,12 @@ func (g GroupAccountInfo) GetDecisionPolicy() DecisionPolicy { } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (g GroupAccountInfo) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { +func (g GroupPolicyInfo) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { var decisionPolicy DecisionPolicy return unpacker.UnpackAny(g.DecisionPolicy, &decisionPolicy) } -func (g GroupAccountInfo) PrimaryKeyFields() []interface{} { +func (g GroupPolicyInfo) PrimaryKeyFields() []interface{} { addr, err := sdk.AccAddressFromBech32(g.Address) if err != nil { panic(err) @@ -174,7 +174,7 @@ func (g GroupAccountInfo) PrimaryKeyFields() []interface{} { return []interface{}{addr.Bytes()} } -func (g GroupAccountInfo) ValidateBasic() error { +func (g GroupPolicyInfo) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(g.Admin) if err != nil { return sdkerrors.Wrap(err, "admin") @@ -182,7 +182,7 @@ func (g GroupAccountInfo) ValidateBasic() error { _, err = sdk.AccAddressFromBech32(g.Address) if err != nil { - return sdkerrors.Wrap(err, "group account") + return sdkerrors.Wrap(err, "group policy") } if g.GroupId == 0 { @@ -232,16 +232,16 @@ func (v Vote) PrimaryKeyFields() []interface{} { } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (q QueryGroupAccountsByGroupResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - return unpackGroupAccounts(unpacker, q.GroupAccounts) +func (q QueryGroupPoliciesByGroupResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + return unpackGroupPolicies(unpacker, q.GroupPolicies) } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (q QueryGroupAccountsByAdminResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - return unpackGroupAccounts(unpacker, q.GroupAccounts) +func (q QueryGroupPoliciesByAdminResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + return unpackGroupPolicies(unpacker, q.GroupPolicies) } -func unpackGroupAccounts(unpacker codectypes.AnyUnpacker, accs []*GroupAccountInfo) error { +func unpackGroupPolicies(unpacker codectypes.AnyUnpacker, accs []*GroupPolicyInfo) error { for _, g := range accs { err := g.UnpackInterfaces(unpacker) if err != nil { diff --git a/x/group/types.pb.go b/x/group/types.pb.go index d2068bdac..cd28b9650 100644 --- a/x/group/types.pb.go +++ b/x/group/types.pb.go @@ -486,35 +486,35 @@ func (m *GroupMember) GetMember() *Member { return nil } -// GroupAccountInfo represents the high-level on-chain information for a group account. -type GroupAccountInfo struct { - // address is the group account address. +// GroupPolicyInfo represents the high-level on-chain information for a group policy. +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 to attached to the group account. + // metadata is any arbitrary metadata to attached to the group policy. Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` - // version is used to track changes to a group's GroupAccountInfo structure that + // 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 account's decision policy. + // 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"` } -func (m *GroupAccountInfo) Reset() { *m = GroupAccountInfo{} } -func (m *GroupAccountInfo) String() string { return proto.CompactTextString(m) } -func (*GroupAccountInfo) ProtoMessage() {} -func (*GroupAccountInfo) Descriptor() ([]byte, []int) { +func (m *GroupPolicyInfo) Reset() { *m = GroupPolicyInfo{} } +func (m *GroupPolicyInfo) String() string { return proto.CompactTextString(m) } +func (*GroupPolicyInfo) ProtoMessage() {} +func (*GroupPolicyInfo) Descriptor() ([]byte, []int) { return fileDescriptor_e091dfce5c49c8b6, []int{5} } -func (m *GroupAccountInfo) XXX_Unmarshal(b []byte) error { +func (m *GroupPolicyInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GroupAccountInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *GroupPolicyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GroupAccountInfo.Marshal(b, m, deterministic) + return xxx_messageInfo_GroupPolicyInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -524,26 +524,26 @@ func (m *GroupAccountInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *GroupAccountInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupAccountInfo.Merge(m, src) +func (m *GroupPolicyInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupPolicyInfo.Merge(m, src) } -func (m *GroupAccountInfo) XXX_Size() int { +func (m *GroupPolicyInfo) XXX_Size() int { return m.Size() } -func (m *GroupAccountInfo) XXX_DiscardUnknown() { - xxx_messageInfo_GroupAccountInfo.DiscardUnknown(m) +func (m *GroupPolicyInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupPolicyInfo.DiscardUnknown(m) } -var xxx_messageInfo_GroupAccountInfo proto.InternalMessageInfo +var xxx_messageInfo_GroupPolicyInfo proto.InternalMessageInfo // Proposal defines a group proposal. Any member of a group can submit a proposal -// for a group account to decide upon. +// 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. type Proposal struct { // proposal_id is the unique id of the proposal. ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // address is the group account address. + // address is the account address of group policy. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // metadata is any arbitrary metadata to attached to the proposal. Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` @@ -554,9 +554,9 @@ type Proposal struct { // group_version tracks the version of the group that this proposal corresponds to. // When group membership is changed, existing proposals from previous group versions will become invalid. GroupVersion uint64 `protobuf:"varint,6,opt,name=group_version,json=groupVersion,proto3" json:"group_version,omitempty"` - // group_account_version tracks the version of the group account that this proposal corresponds to. + // group_policy_version tracks the version of the group policy that this proposal corresponds to. // When a decision policy is changed, existing proposals from previous policy versions will become invalid. - GroupAccountVersion uint64 `protobuf:"varint,7,opt,name=group_account_version,json=groupAccountVersion,proto3" json:"group_account_version,omitempty"` + 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 Proposal_Status `protobuf:"varint,8,opt,name=status,proto3,enum=cosmos.group.v1beta1.Proposal_Status" json:"status,omitempty"` // result is the final result based on the votes and election rule. Initial value is unfinalized. @@ -744,7 +744,7 @@ func init() { proto.RegisterType((*ThresholdDecisionPolicy)(nil), "cosmos.group.v1beta1.ThresholdDecisionPolicy") proto.RegisterType((*GroupInfo)(nil), "cosmos.group.v1beta1.GroupInfo") proto.RegisterType((*GroupMember)(nil), "cosmos.group.v1beta1.GroupMember") - proto.RegisterType((*GroupAccountInfo)(nil), "cosmos.group.v1beta1.GroupAccountInfo") + proto.RegisterType((*GroupPolicyInfo)(nil), "cosmos.group.v1beta1.GroupPolicyInfo") proto.RegisterType((*Proposal)(nil), "cosmos.group.v1beta1.Proposal") proto.RegisterType((*Tally)(nil), "cosmos.group.v1beta1.Tally") proto.RegisterType((*Vote)(nil), "cosmos.group.v1beta1.Vote") @@ -753,98 +753,97 @@ func init() { func init() { proto.RegisterFile("cosmos/group/v1beta1/types.proto", fileDescriptor_e091dfce5c49c8b6) } var fileDescriptor_e091dfce5c49c8b6 = []byte{ - // 1285 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xf7, 0xda, 0x8e, 0x7f, 0x3c, 0x27, 0x8e, 0x35, 0xdf, 0xb4, 0x75, 0x9c, 0xd6, 0xd9, 0xba, - 0x5f, 0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, 0x08, 0xc5, 0x2f, 0xbf, 0x33, 0xaa, 0xb0, 0x14, 0x1e, 0x2b, 0xde, 0xcb, - 0x5f, 0x1c, 0x0c, 0x16, 0x5e, 0xf7, 0xd6, 0x31, 0x71, 0x2c, 0xcc, 0x92, 0xcb, 0xbf, 0xe8, 0xba, - 0x57, 0x18, 0x46, 0x13, 0xd8, 0x85, 0x57, 0xeb, 0x7f, 0x75, 0x5b, 0xbc, 0x69, 0x43, 0x8a, 0x87, - 0x45, 0xe7, 0x01, 0x29, 0x1f, 0xb6, 0x9b, 0x8a, 0x3a, 0xdb, 0x90, 0x68, 0x05, 0xb2, 0x62, 0xbc, - 0xd5, 0x2e, 0x48, 0x28, 0x0f, 0x20, 0xcc, 0xcf, 0x54, 0xbd, 0x10, 0x47, 0x08, 0xf2, 0xc2, 0xae, - 0x37, 0x74, 0xa3, 0xde, 0x6c, 0x15, 0x12, 0x68, 0x15, 0x72, 0x62, 0xec, 0x48, 0x35, 0xda, 0x85, - 0x64, 0xe3, 0xfa, 0xc3, 0xc7, 0x65, 0xe9, 0xd1, 0xe3, 0xb2, 0xf4, 0xe7, 0xe3, 0xb2, 0x74, 0xef, - 0x49, 0x39, 0xf6, 0xe8, 0x49, 0x39, 0xf6, 0xeb, 0x93, 0x72, 0xec, 0xd6, 0xff, 0xfb, 0x0e, 0x3d, - 0x0e, 0x7a, 0x55, 0x8b, 0x0c, 0xc5, 0x0b, 0x5b, 0xfc, 0x6c, 0xfb, 0xf6, 0x97, 0xb5, 0x3b, 0xfc, - 0xaf, 0x40, 0x2f, 0xc5, 0x0a, 0x7a, 0xfb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x88, 0x0e, - 0x45, 0x21, 0x0c, 0x00, 0x00, + // 1278 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xf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0x85, 0x9d, 0xd6, 0x73, 0xe7, 0x5f, 0x63, + 0x88, 0xca, 0x23, 0x09, 0x52, 0x5c, 0x55, 0xb4, 0x03, 0x48, 0x37, 0xea, 0x46, 0x47, 0xef, 0x76, + 0x5a, 0xfa, 0xa1, 0xaa, 0x34, 0xf7, 0x9b, 0xea, 0x5e, 0x21, 0x56, 0x5a, 0x9f, 0x4c, 0xe5, 0x37, + 0xa2, 0xcc, 0x1c, 0xdb, 0x74, 0x4f, 0xcc, 0x81, 0x63, 0xa3, 0x1d, 0x28, 0x08, 0x8a, 0xde, 0x69, + 0xdc, 0x68, 0x1a, 0x86, 0xba, 0x57, 0x90, 0x4a, 0x1b, 0x93, 0xa9, 0x7c, 0x7e, 0x96, 0xa0, 0x47, + 0xb3, 0x84, 0xde, 0x81, 0x15, 0x41, 0x51, 0x0e, 0xda, 0xba, 0xba, 0x57, 0x88, 0x97, 0x8a, 0x93, + 0xa9, 0xbc, 0x36, 0x8b, 0x57, 0x06, 0xc4, 0xc7, 0x36, 0xda, 0x86, 0xbc, 0x00, 0xd7, 0x1b, 0x6d, + 0x2d, 0x8c, 0x9e, 0x98, 0x57, 0x4e, 0xbd, 0x47, 0x3c, 0x8a, 0xed, 0x52, 0xf2, 0xce, 0xfd, 0x72, + 0xac, 0xf2, 0xbb, 0x04, 0x29, 0xa1, 0xc3, 0x0e, 0x20, 0x4d, 0xd5, 0x3b, 0x07, 0xc6, 0xa2, 0x96, + 0x38, 0x36, 0x6a, 0xe9, 0x83, 0x67, 0x28, 0xfb, 0xcd, 0x56, 0xfd, 0xa0, 0x79, 0x93, 0x35, 0x75, + 0x71, 0x32, 0x95, 0xd7, 0x67, 0x29, 0x1d, 0xf7, 0x96, 0xe3, 0x9a, 0x03, 0xe7, 0x3b, 0x6c, 0xa3, + 0x1a, 0xac, 0x0a, 0x5a, 0x5d, 0x51, 0xd4, 0x43, 0x83, 0x35, 0x56, 0x9a, 0x4c, 0xe5, 0x73, 0xb3, + 0x9c, 0x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73, 0x8b, 0x5a, 0xfe, 0x91, 0x20, 0x79, 0x44, 0x28, 0x3e, + 0xfb, 0xc6, 0xa8, 0xc2, 0x52, 0x78, 0xac, 0x78, 0x67, 0x3f, 0x37, 0x18, 0x2c, 0xbc, 0xeb, 0xad, + 0x63, 0xe2, 0x58, 0x98, 0x15, 0x97, 0x7f, 0xd9, 0x5d, 0xaf, 0x30, 0x8c, 0x26, 0xb0, 0x0b, 0x2f, + 0xd6, 0xff, 0xeb, 0xae, 0x78, 0xdb, 0x86, 0x14, 0x4f, 0x8b, 0xce, 0x01, 0x52, 0x3e, 0x69, 0x37, + 0x15, 0x75, 0x76, 0x20, 0xd1, 0x0a, 0x64, 0xc5, 0x7a, 0xab, 0x5d, 0x90, 0x50, 0x1e, 0x40, 0x98, + 0x5f, 0xaa, 0x7a, 0x21, 0x8e, 0x10, 0xe4, 0x85, 0x5d, 0x6f, 0xe8, 0x46, 0xbd, 0xd9, 0x2a, 0x24, + 0xd0, 0x2a, 0xe4, 0xc4, 0xda, 0x91, 0x6a, 0xb4, 0x0b, 0xc9, 0xc6, 0xb5, 0x87, 0x8f, 0xcb, 0xd2, + 0xa3, 0xc7, 0x65, 0xe9, 0xaf, 0xc7, 0x65, 0xe9, 0xee, 0x93, 0x72, 0xec, 0xd1, 0x93, 0x72, 0xec, + 0xb7, 0x27, 0xe5, 0xd8, 0xcd, 0x37, 0xfb, 0x0e, 0x3d, 0x0e, 0x7a, 0x55, 0x8b, 0x0c, 0xc5, 0xf3, + 0x5a, 0xfc, 0xd9, 0xf6, 0xed, 0x6f, 0x6a, 0xb7, 0xf9, 0xff, 0x01, 0xbd, 0x14, 0x6b, 0xe8, 0xbd, + 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x46, 0x84, 0xac, 0x3a, 0x1e, 0x0c, 0x00, 0x00, } -func (this *GroupAccountInfo) Equal(that interface{}) bool { +func (this *GroupPolicyInfo) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*GroupAccountInfo) + that1, ok := that.(*GroupPolicyInfo) if !ok { - that2, ok := that.(GroupAccountInfo) + that2, ok := that.(GroupPolicyInfo) if ok { that1 = &that2 } else { @@ -1089,7 +1088,7 @@ func (m *GroupMember) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *GroupAccountInfo) Marshal() (dAtA []byte, err error) { +func (m *GroupPolicyInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1099,12 +1098,12 @@ func (m *GroupAccountInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GroupAccountInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *GroupPolicyInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GroupAccountInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GroupPolicyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1222,8 +1221,8 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x40 } - if m.GroupAccountVersion != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.GroupAccountVersion)) + if m.GroupPolicyVersion != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GroupPolicyVersion)) i-- dAtA[i] = 0x38 } @@ -1482,7 +1481,7 @@ func (m *GroupMember) Size() (n int) { return n } -func (m *GroupAccountInfo) Size() (n int) { +func (m *GroupPolicyInfo) Size() (n int) { if m == nil { return 0 } @@ -1541,8 +1540,8 @@ func (m *Proposal) Size() (n int) { if m.GroupVersion != 0 { n += 1 + sovTypes(uint64(m.GroupVersion)) } - if m.GroupAccountVersion != 0 { - n += 1 + sovTypes(uint64(m.GroupAccountVersion)) + if m.GroupPolicyVersion != 0 { + n += 1 + sovTypes(uint64(m.GroupPolicyVersion)) } if m.Status != 0 { n += 1 + sovTypes(uint64(m.Status)) @@ -2260,7 +2259,7 @@ func (m *GroupMember) Unmarshal(dAtA []byte) error { } return nil } -func (m *GroupAccountInfo) Unmarshal(dAtA []byte) error { +func (m *GroupPolicyInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2283,10 +2282,10 @@ func (m *GroupAccountInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GroupAccountInfo: wiretype end group for non-group") + return fmt.Errorf("proto: GroupPolicyInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GroupAccountInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GroupPolicyInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2682,9 +2681,9 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } case 7: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupAccountVersion", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupPolicyVersion", wireType) } - m.GroupAccountVersion = 0 + m.GroupPolicyVersion = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -2694,7 +2693,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.GroupAccountVersion |= uint64(b&0x7F) << shift + m.GroupPolicyVersion |= uint64(b&0x7F) << shift if b < 0x80 { break }