3380 lines
86 KiB
Go
3380 lines
86 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: cosmos/group/v1beta1/types.proto
|
|
|
|
package group
|
|
|
|
import (
|
|
bytes "bytes"
|
|
fmt "fmt"
|
|
types "github.com/cosmos/cosmos-sdk/codec/types"
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
|
_ "github.com/regen-network/cosmos-proto"
|
|
_ "google.golang.org/protobuf/types/known/durationpb"
|
|
_ "google.golang.org/protobuf/types/known/timestamppb"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
time "time"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
var _ = time.Kitchen
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// Choice defines available types of choices for voting.
|
|
type Choice int32
|
|
|
|
const (
|
|
// CHOICE_UNSPECIFIED defines a no-op voting choice.
|
|
Choice_CHOICE_UNSPECIFIED Choice = 0
|
|
// CHOICE_NO defines a no voting choice.
|
|
Choice_CHOICE_NO Choice = 1
|
|
// CHOICE_YES defines a yes voting choice.
|
|
Choice_CHOICE_YES Choice = 2
|
|
// CHOICE_ABSTAIN defines an abstaining voting choice.
|
|
Choice_CHOICE_ABSTAIN Choice = 3
|
|
// CHOICE_VETO defines a voting choice with veto.
|
|
Choice_CHOICE_VETO Choice = 4
|
|
)
|
|
|
|
var Choice_name = map[int32]string{
|
|
0: "CHOICE_UNSPECIFIED",
|
|
1: "CHOICE_NO",
|
|
2: "CHOICE_YES",
|
|
3: "CHOICE_ABSTAIN",
|
|
4: "CHOICE_VETO",
|
|
}
|
|
|
|
var Choice_value = map[string]int32{
|
|
"CHOICE_UNSPECIFIED": 0,
|
|
"CHOICE_NO": 1,
|
|
"CHOICE_YES": 2,
|
|
"CHOICE_ABSTAIN": 3,
|
|
"CHOICE_VETO": 4,
|
|
}
|
|
|
|
func (x Choice) String() string {
|
|
return proto.EnumName(Choice_name, int32(x))
|
|
}
|
|
|
|
func (Choice) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_e091dfce5c49c8b6, []int{0}
|
|
}
|
|
|
|
// Status defines proposal statuses.
|
|
type Proposal_Status int32
|
|
|
|
const (
|
|
// An empty value is invalid and not allowed.
|
|
ProposalStatusInvalid Proposal_Status = 0
|
|
// Initial status of a proposal when persisted.
|
|
ProposalStatusSubmitted Proposal_Status = 1
|
|
// Final status of a proposal when the final tally was executed.
|
|
ProposalStatusClosed Proposal_Status = 2
|
|
// Final status of a proposal when the group was modified before the final tally.
|
|
ProposalStatusAborted Proposal_Status = 3
|
|
)
|
|
|
|
var Proposal_Status_name = map[int32]string{
|
|
0: "STATUS_UNSPECIFIED",
|
|
1: "STATUS_SUBMITTED",
|
|
2: "STATUS_CLOSED",
|
|
3: "STATUS_ABORTED",
|
|
}
|
|
|
|
var Proposal_Status_value = map[string]int32{
|
|
"STATUS_UNSPECIFIED": 0,
|
|
"STATUS_SUBMITTED": 1,
|
|
"STATUS_CLOSED": 2,
|
|
"STATUS_ABORTED": 3,
|
|
}
|
|
|
|
func (x Proposal_Status) String() string {
|
|
return proto.EnumName(Proposal_Status_name, int32(x))
|
|
}
|
|
|
|
func (Proposal_Status) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_e091dfce5c49c8b6, []int{6, 0}
|
|
}
|
|
|
|
// Result defines types of proposal results.
|
|
type Proposal_Result int32
|
|
|
|
const (
|
|
// An empty value is invalid and not allowed
|
|
ProposalResultInvalid Proposal_Result = 0
|
|
// Until a final tally has happened the status is unfinalized
|
|
ProposalResultUnfinalized Proposal_Result = 1
|
|
// Final result of the tally
|
|
ProposalResultAccepted Proposal_Result = 2
|
|
// Final result of the tally
|
|
ProposalResultRejected Proposal_Result = 3
|
|
)
|
|
|
|
var Proposal_Result_name = map[int32]string{
|
|
0: "RESULT_UNSPECIFIED",
|
|
1: "RESULT_UNFINALIZED",
|
|
2: "RESULT_ACCEPTED",
|
|
3: "RESULT_REJECTED",
|
|
}
|
|
|
|
var Proposal_Result_value = map[string]int32{
|
|
"RESULT_UNSPECIFIED": 0,
|
|
"RESULT_UNFINALIZED": 1,
|
|
"RESULT_ACCEPTED": 2,
|
|
"RESULT_REJECTED": 3,
|
|
}
|
|
|
|
func (x Proposal_Result) String() string {
|
|
return proto.EnumName(Proposal_Result_name, int32(x))
|
|
}
|
|
|
|
func (Proposal_Result) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_e091dfce5c49c8b6, []int{6, 1}
|
|
}
|
|
|
|
// ExecutorResult defines types of proposal executor results.
|
|
type Proposal_ExecutorResult int32
|
|
|
|
const (
|
|
// An empty value is not allowed.
|
|
ProposalExecutorResultInvalid Proposal_ExecutorResult = 0
|
|
// We have not yet run the executor.
|
|
ProposalExecutorResultNotRun Proposal_ExecutorResult = 1
|
|
// The executor was successful and proposed action updated state.
|
|
ProposalExecutorResultSuccess Proposal_ExecutorResult = 2
|
|
// The executor returned an error and proposed action didn't update state.
|
|
ProposalExecutorResultFailure Proposal_ExecutorResult = 3
|
|
)
|
|
|
|
var Proposal_ExecutorResult_name = map[int32]string{
|
|
0: "EXECUTOR_RESULT_UNSPECIFIED",
|
|
1: "EXECUTOR_RESULT_NOT_RUN",
|
|
2: "EXECUTOR_RESULT_SUCCESS",
|
|
3: "EXECUTOR_RESULT_FAILURE",
|
|
}
|
|
|
|
var Proposal_ExecutorResult_value = map[string]int32{
|
|
"EXECUTOR_RESULT_UNSPECIFIED": 0,
|
|
"EXECUTOR_RESULT_NOT_RUN": 1,
|
|
"EXECUTOR_RESULT_SUCCESS": 2,
|
|
"EXECUTOR_RESULT_FAILURE": 3,
|
|
}
|
|
|
|
func (x Proposal_ExecutorResult) String() string {
|
|
return proto.EnumName(Proposal_ExecutorResult_name, int32(x))
|
|
}
|
|
|
|
func (Proposal_ExecutorResult) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_e091dfce5c49c8b6, []int{6, 2}
|
|
}
|
|
|
|
// Member represents a group member with an account address,
|
|
// non-zero weight and metadata.
|
|
type Member struct {
|
|
// address is the member's account address.
|
|
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
|
// weight is the member's voting weight that should be greater than 0.
|
|
Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"`
|
|
// metadata is any arbitrary metadata to attached to the member.
|
|
Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
|
}
|
|
|
|
func (m *Member) Reset() { *m = Member{} }
|
|
func (m *Member) String() string { return proto.CompactTextString(m) }
|
|
func (*Member) ProtoMessage() {}
|
|
func (*Member) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e091dfce5c49c8b6, []int{0}
|
|
}
|
|
func (m *Member) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Member) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Member.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Member) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Member.Merge(m, src)
|
|
}
|
|
func (m *Member) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Member) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Member.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Member proto.InternalMessageInfo
|
|
|
|
func (m *Member) GetAddress() string {
|
|
if m != nil {
|
|
return m.Address
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Member) GetWeight() string {
|
|
if m != nil {
|
|
return m.Weight
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Member) GetMetadata() []byte {
|
|
if m != nil {
|
|
return m.Metadata
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Members defines a repeated slice of Member objects.
|
|
type Members struct {
|
|
// members is the list of members.
|
|
Members []Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members"`
|
|
}
|
|
|
|
func (m *Members) Reset() { *m = Members{} }
|
|
func (m *Members) String() string { return proto.CompactTextString(m) }
|
|
func (*Members) ProtoMessage() {}
|
|
func (*Members) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e091dfce5c49c8b6, []int{1}
|
|
}
|
|
func (m *Members) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Members) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Members.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Members) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Members.Merge(m, src)
|
|
}
|
|
func (m *Members) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Members) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Members.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Members proto.InternalMessageInfo
|
|
|
|
func (m *Members) GetMembers() []Member {
|
|
if m != nil {
|
|
return m.Members
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// ThresholdDecisionPolicy implements the DecisionPolicy interface
|
|
type ThresholdDecisionPolicy struct {
|
|
// threshold is the minimum weighted sum of yes votes that must be met or exceeded for a proposal to succeed.
|
|
Threshold string `protobuf:"bytes,1,opt,name=threshold,proto3" json:"threshold,omitempty"`
|
|
// timeout is the duration from submission of a proposal to the end of voting period
|
|
// Within this times votes and exec messages can be submitted.
|
|
Timeout time.Duration `protobuf:"bytes,2,opt,name=timeout,proto3,stdduration" json:"timeout"`
|
|
}
|
|
|
|
func (m *ThresholdDecisionPolicy) Reset() { *m = ThresholdDecisionPolicy{} }
|
|
func (m *ThresholdDecisionPolicy) String() string { return proto.CompactTextString(m) }
|
|
func (*ThresholdDecisionPolicy) ProtoMessage() {}
|
|
func (*ThresholdDecisionPolicy) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e091dfce5c49c8b6, []int{2}
|
|
}
|
|
func (m *ThresholdDecisionPolicy) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ThresholdDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ThresholdDecisionPolicy.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ThresholdDecisionPolicy) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ThresholdDecisionPolicy.Merge(m, src)
|
|
}
|
|
func (m *ThresholdDecisionPolicy) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ThresholdDecisionPolicy) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ThresholdDecisionPolicy.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ThresholdDecisionPolicy proto.InternalMessageInfo
|
|
|
|
func (m *ThresholdDecisionPolicy) GetThreshold() string {
|
|
if m != nil {
|
|
return m.Threshold
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ThresholdDecisionPolicy) GetTimeout() time.Duration {
|
|
if m != nil {
|
|
return m.Timeout
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// GroupInfo represents the high-level on-chain information for a group.
|
|
type GroupInfo struct {
|
|
// group_id is the unique ID of the group.
|
|
GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
|
|
// admin is the account address of the group's admin.
|
|
Admin string `protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty"`
|
|
// metadata is any arbitrary metadata to attached to the group.
|
|
Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
|
// version is used to track changes to a group's membership structure that
|
|
// would break existing proposals. Whenever any members weight is changed,
|
|
// or any member is added or removed this version is incremented and will
|
|
// cause proposals based on older versions of this group to fail
|
|
Version uint64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"`
|
|
// total_weight is the sum of the group members' weights.
|
|
TotalWeight string `protobuf:"bytes,5,opt,name=total_weight,json=totalWeight,proto3" json:"total_weight,omitempty"`
|
|
}
|
|
|
|
func (m *GroupInfo) Reset() { *m = GroupInfo{} }
|
|
func (m *GroupInfo) String() string { return proto.CompactTextString(m) }
|
|
func (*GroupInfo) ProtoMessage() {}
|
|
func (*GroupInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e091dfce5c49c8b6, []int{3}
|
|
}
|
|
func (m *GroupInfo) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *GroupInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_GroupInfo.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *GroupInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GroupInfo.Merge(m, src)
|
|
}
|
|
func (m *GroupInfo) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *GroupInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GroupInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GroupInfo proto.InternalMessageInfo
|
|
|
|
func (m *GroupInfo) GetGroupId() uint64 {
|
|
if m != nil {
|
|
return m.GroupId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *GroupInfo) GetAdmin() string {
|
|
if m != nil {
|
|
return m.Admin
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *GroupInfo) GetMetadata() []byte {
|
|
if m != nil {
|
|
return m.Metadata
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *GroupInfo) GetVersion() uint64 {
|
|
if m != nil {
|
|
return m.Version
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *GroupInfo) GetTotalWeight() string {
|
|
if m != nil {
|
|
return m.TotalWeight
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// GroupMember represents the relationship between a group and a member.
|
|
type GroupMember struct {
|
|
// group_id is the unique ID of the group.
|
|
GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
|
|
// member is the member data.
|
|
Member *Member `protobuf:"bytes,2,opt,name=member,proto3" json:"member,omitempty"`
|
|
}
|
|
|
|
func (m *GroupMember) Reset() { *m = GroupMember{} }
|
|
func (m *GroupMember) String() string { return proto.CompactTextString(m) }
|
|
func (*GroupMember) ProtoMessage() {}
|
|
func (*GroupMember) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e091dfce5c49c8b6, []int{4}
|
|
}
|
|
func (m *GroupMember) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *GroupMember) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_GroupMember.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *GroupMember) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GroupMember.Merge(m, src)
|
|
}
|
|
func (m *GroupMember) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *GroupMember) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GroupMember.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GroupMember proto.InternalMessageInfo
|
|
|
|
func (m *GroupMember) GetGroupId() uint64 {
|
|
if m != nil {
|
|
return m.GroupId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *GroupMember) GetMember() *Member {
|
|
if m != nil {
|
|
return m.Member
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// GroupAccountInfo represents the high-level on-chain information for a group account.
|
|
type GroupAccountInfo struct {
|
|
// address is the group account address.
|
|
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
|
// group_id is the unique ID of the group.
|
|
GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
|
|
// admin is the account address of the group admin.
|
|
Admin string `protobuf:"bytes,3,opt,name=admin,proto3" json:"admin,omitempty"`
|
|
// metadata is any arbitrary metadata to attached to the group account.
|
|
Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
|
// version is used to track changes to a group's GroupAccountInfo structure that
|
|
// would create a different result on a running proposal.
|
|
Version uint64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
|
|
// decision_policy specifies the group account's decision policy.
|
|
DecisionPolicy *types.Any `protobuf:"bytes,6,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"`
|
|
// derivation_key is the "derivation" key of the group account,
|
|
// which is needed to derive the group root module key and execute proposals.
|
|
DerivationKey []byte `protobuf:"bytes,7,opt,name=derivation_key,json=derivationKey,proto3" json:"derivation_key,omitempty"`
|
|
}
|
|
|
|
func (m *GroupAccountInfo) Reset() { *m = GroupAccountInfo{} }
|
|
func (m *GroupAccountInfo) String() string { return proto.CompactTextString(m) }
|
|
func (*GroupAccountInfo) ProtoMessage() {}
|
|
func (*GroupAccountInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e091dfce5c49c8b6, []int{5}
|
|
}
|
|
func (m *GroupAccountInfo) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *GroupAccountInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_GroupAccountInfo.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *GroupAccountInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GroupAccountInfo.Merge(m, src)
|
|
}
|
|
func (m *GroupAccountInfo) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *GroupAccountInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GroupAccountInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GroupAccountInfo proto.InternalMessageInfo
|
|
|
|
// Proposal defines a group proposal. Any member of a group can submit a proposal
|
|
// for a group account to decide upon.
|
|
// A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal
|
|
// passes as well as some optional metadata associated with the proposal.
|
|
type Proposal struct {
|
|
// proposal_id is the unique id of the proposal.
|
|
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
|
|
// address is the group account address.
|
|
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
|
|
// metadata is any arbitrary metadata to attached to the proposal.
|
|
Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
|
// proposers are the account addresses of the proposers.
|
|
Proposers []string `protobuf:"bytes,4,rep,name=proposers,proto3" json:"proposers,omitempty"`
|
|
// submitted_at is a timestamp specifying when a proposal was submitted.
|
|
SubmittedAt time.Time `protobuf:"bytes,5,opt,name=submitted_at,json=submittedAt,proto3,stdtime" json:"submitted_at"`
|
|
// group_version tracks the version of the group that this proposal corresponds to.
|
|
// When group membership is changed, existing proposals from previous group versions will become invalid.
|
|
GroupVersion uint64 `protobuf:"varint,6,opt,name=group_version,json=groupVersion,proto3" json:"group_version,omitempty"`
|
|
// group_account_version tracks the version of the group account that this proposal corresponds to.
|
|
// When a decision policy is changed, existing proposals from previous policy versions will become invalid.
|
|
GroupAccountVersion uint64 `protobuf:"varint,7,opt,name=group_account_version,json=groupAccountVersion,proto3" json:"group_account_version,omitempty"`
|
|
// Status represents the high level position in the life cycle of the proposal. Initial value is Submitted.
|
|
Status Proposal_Status `protobuf:"varint,8,opt,name=status,proto3,enum=cosmos.group.v1beta1.Proposal_Status" json:"status,omitempty"`
|
|
// result is the final result based on the votes and election rule. Initial value is unfinalized.
|
|
// The result is persisted so that clients can always rely on this state and not have to replicate the logic.
|
|
Result Proposal_Result `protobuf:"varint,9,opt,name=result,proto3,enum=cosmos.group.v1beta1.Proposal_Result" json:"result,omitempty"`
|
|
// vote_state contains the sums of all weighted votes for this proposal.
|
|
VoteState Tally `protobuf:"bytes,10,opt,name=vote_state,json=voteState,proto3" json:"vote_state"`
|
|
// timeout is the timestamp of the block where the proposal execution times out. Header times of the votes and execution messages
|
|
// must be before this end time to be included in the election. After the timeout timestamp the proposal can not be
|
|
// executed anymore and should be considered pending delete.
|
|
Timeout time.Time `protobuf:"bytes,11,opt,name=timeout,proto3,stdtime" json:"timeout"`
|
|
// executor_result is the final result based on the votes and election rule. Initial value is NotRun.
|
|
ExecutorResult Proposal_ExecutorResult `protobuf:"varint,12,opt,name=executor_result,json=executorResult,proto3,enum=cosmos.group.v1beta1.Proposal_ExecutorResult" json:"executor_result,omitempty"`
|
|
// msgs is a list of Msgs that will be executed if the proposal passes.
|
|
Msgs []*types.Any `protobuf:"bytes,13,rep,name=msgs,proto3" json:"msgs,omitempty"`
|
|
}
|
|
|
|
func (m *Proposal) Reset() { *m = Proposal{} }
|
|
func (m *Proposal) String() string { return proto.CompactTextString(m) }
|
|
func (*Proposal) ProtoMessage() {}
|
|
func (*Proposal) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e091dfce5c49c8b6, []int{6}
|
|
}
|
|
func (m *Proposal) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Proposal.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Proposal) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Proposal.Merge(m, src)
|
|
}
|
|
func (m *Proposal) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Proposal) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Proposal.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Proposal proto.InternalMessageInfo
|
|
|
|
// Tally represents the sum of weighted votes.
|
|
type Tally struct {
|
|
// yes_count is the weighted sum of yes votes.
|
|
YesCount string `protobuf:"bytes,1,opt,name=yes_count,json=yesCount,proto3" json:"yes_count,omitempty"`
|
|
// no_count is the weighted sum of no votes.
|
|
NoCount string `protobuf:"bytes,2,opt,name=no_count,json=noCount,proto3" json:"no_count,omitempty"`
|
|
// abstain_count is the weighted sum of abstainers
|
|
AbstainCount string `protobuf:"bytes,3,opt,name=abstain_count,json=abstainCount,proto3" json:"abstain_count,omitempty"`
|
|
// veto_count is the weighted sum of vetoes.
|
|
VetoCount string `protobuf:"bytes,4,opt,name=veto_count,json=vetoCount,proto3" json:"veto_count,omitempty"`
|
|
}
|
|
|
|
func (m *Tally) Reset() { *m = Tally{} }
|
|
func (m *Tally) String() string { return proto.CompactTextString(m) }
|
|
func (*Tally) ProtoMessage() {}
|
|
func (*Tally) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e091dfce5c49c8b6, []int{7}
|
|
}
|
|
func (m *Tally) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Tally) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Tally.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Tally) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Tally.Merge(m, src)
|
|
}
|
|
func (m *Tally) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Tally) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Tally.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Tally proto.InternalMessageInfo
|
|
|
|
// Vote represents a vote for a proposal.
|
|
type Vote struct {
|
|
// proposal is the unique ID of the proposal.
|
|
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
|
|
// voter is the account address of the voter.
|
|
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
|
|
// choice is the voter's choice on the proposal.
|
|
Choice Choice `protobuf:"varint,3,opt,name=choice,proto3,enum=cosmos.group.v1beta1.Choice" json:"choice,omitempty"`
|
|
// metadata is any arbitrary metadata to attached to the vote.
|
|
Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
|
// submitted_at is the timestamp when the vote was submitted.
|
|
SubmittedAt time.Time `protobuf:"bytes,5,opt,name=submitted_at,json=submittedAt,proto3,stdtime" json:"submitted_at"`
|
|
}
|
|
|
|
func (m *Vote) Reset() { *m = Vote{} }
|
|
func (m *Vote) String() string { return proto.CompactTextString(m) }
|
|
func (*Vote) ProtoMessage() {}
|
|
func (*Vote) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e091dfce5c49c8b6, []int{8}
|
|
}
|
|
func (m *Vote) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Vote.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Vote) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Vote.Merge(m, src)
|
|
}
|
|
func (m *Vote) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Vote) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Vote.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Vote proto.InternalMessageInfo
|
|
|
|
func (m *Vote) GetProposalId() uint64 {
|
|
if m != nil {
|
|
return m.ProposalId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Vote) GetVoter() string {
|
|
if m != nil {
|
|
return m.Voter
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Vote) GetChoice() Choice {
|
|
if m != nil {
|
|
return m.Choice
|
|
}
|
|
return Choice_CHOICE_UNSPECIFIED
|
|
}
|
|
|
|
func (m *Vote) GetMetadata() []byte {
|
|
if m != nil {
|
|
return m.Metadata
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Vote) GetSubmittedAt() time.Time {
|
|
if m != nil {
|
|
return m.SubmittedAt
|
|
}
|
|
return time.Time{}
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterEnum("cosmos.group.v1beta1.Choice", Choice_name, Choice_value)
|
|
proto.RegisterEnum("cosmos.group.v1beta1.Proposal_Status", Proposal_Status_name, Proposal_Status_value)
|
|
proto.RegisterEnum("cosmos.group.v1beta1.Proposal_Result", Proposal_Result_name, Proposal_Result_value)
|
|
proto.RegisterEnum("cosmos.group.v1beta1.Proposal_ExecutorResult", Proposal_ExecutorResult_name, Proposal_ExecutorResult_value)
|
|
proto.RegisterType((*Member)(nil), "cosmos.group.v1beta1.Member")
|
|
proto.RegisterType((*Members)(nil), "cosmos.group.v1beta1.Members")
|
|
proto.RegisterType((*ThresholdDecisionPolicy)(nil), "cosmos.group.v1beta1.ThresholdDecisionPolicy")
|
|
proto.RegisterType((*GroupInfo)(nil), "cosmos.group.v1beta1.GroupInfo")
|
|
proto.RegisterType((*GroupMember)(nil), "cosmos.group.v1beta1.GroupMember")
|
|
proto.RegisterType((*GroupAccountInfo)(nil), "cosmos.group.v1beta1.GroupAccountInfo")
|
|
proto.RegisterType((*Proposal)(nil), "cosmos.group.v1beta1.Proposal")
|
|
proto.RegisterType((*Tally)(nil), "cosmos.group.v1beta1.Tally")
|
|
proto.RegisterType((*Vote)(nil), "cosmos.group.v1beta1.Vote")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("cosmos/group/v1beta1/types.proto", fileDescriptor_e091dfce5c49c8b6) }
|
|
|
|
var fileDescriptor_e091dfce5c49c8b6 = []byte{
|
|
// 1281 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x1b, 0xc5,
|
|
0x1b, 0xf6, 0xda, 0x8e, 0xff, 0xbc, 0x4e, 0x1c, 0x6b, 0x7e, 0x69, 0xeb, 0x38, 0xa9,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d, 0xbd, 0xf3, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa6, 0x1c, 0xbf, 0x87, 0x92, 0x0b, 0x00,
|
|
0x00,
|
|
}
|
|
|
|
func (this *GroupAccountInfo) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*GroupAccountInfo)
|
|
if !ok {
|
|
that2, ok := that.(GroupAccountInfo)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.Address != that1.Address {
|
|
return false
|
|
}
|
|
if this.GroupId != that1.GroupId {
|
|
return false
|
|
}
|
|
if this.Admin != that1.Admin {
|
|
return false
|
|
}
|
|
if !bytes.Equal(this.Metadata, that1.Metadata) {
|
|
return false
|
|
}
|
|
if this.Version != that1.Version {
|
|
return false
|
|
}
|
|
if !this.DecisionPolicy.Equal(that1.DecisionPolicy) {
|
|
return false
|
|
}
|
|
if !bytes.Equal(this.DerivationKey, that1.DerivationKey) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (m *Member) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Member) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Metadata) > 0 {
|
|
i -= len(m.Metadata)
|
|
copy(dAtA[i:], m.Metadata)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Weight) > 0 {
|
|
i -= len(m.Weight)
|
|
copy(dAtA[i:], m.Weight)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Weight)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Address) > 0 {
|
|
i -= len(m.Address)
|
|
copy(dAtA[i:], m.Address)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Members) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Members) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Members) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Members) > 0 {
|
|
for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ThresholdDecisionPolicy) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ThresholdDecisionPolicy) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ThresholdDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Timeout, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout):])
|
|
if err1 != nil {
|
|
return 0, err1
|
|
}
|
|
i -= n1
|
|
i = encodeVarintTypes(dAtA, i, uint64(n1))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
if len(m.Threshold) > 0 {
|
|
i -= len(m.Threshold)
|
|
copy(dAtA[i:], m.Threshold)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Threshold)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *GroupInfo) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *GroupInfo) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *GroupInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.TotalWeight) > 0 {
|
|
i -= len(m.TotalWeight)
|
|
copy(dAtA[i:], m.TotalWeight)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.TotalWeight)))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
if m.Version != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.Version))
|
|
i--
|
|
dAtA[i] = 0x20
|
|
}
|
|
if len(m.Metadata) > 0 {
|
|
i -= len(m.Metadata)
|
|
copy(dAtA[i:], m.Metadata)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Admin) > 0 {
|
|
i -= len(m.Admin)
|
|
copy(dAtA[i:], m.Admin)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.GroupId != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.GroupId))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *GroupMember) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *GroupMember) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *GroupMember) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Member != nil {
|
|
{
|
|
size, err := m.Member.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.GroupId != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.GroupId))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *GroupAccountInfo) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *GroupAccountInfo) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *GroupAccountInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.DerivationKey) > 0 {
|
|
i -= len(m.DerivationKey)
|
|
copy(dAtA[i:], m.DerivationKey)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.DerivationKey)))
|
|
i--
|
|
dAtA[i] = 0x3a
|
|
}
|
|
if m.DecisionPolicy != nil {
|
|
{
|
|
size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x32
|
|
}
|
|
if m.Version != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.Version))
|
|
i--
|
|
dAtA[i] = 0x28
|
|
}
|
|
if len(m.Metadata) > 0 {
|
|
i -= len(m.Metadata)
|
|
copy(dAtA[i:], m.Metadata)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if len(m.Admin) > 0 {
|
|
i -= len(m.Admin)
|
|
copy(dAtA[i:], m.Admin)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.GroupId != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.GroupId))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if len(m.Address) > 0 {
|
|
i -= len(m.Address)
|
|
copy(dAtA[i:], m.Address)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Proposal) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Proposal) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Msgs) > 0 {
|
|
for iNdEx := len(m.Msgs) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Msgs[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x6a
|
|
}
|
|
}
|
|
if m.ExecutorResult != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.ExecutorResult))
|
|
i--
|
|
dAtA[i] = 0x60
|
|
}
|
|
n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timeout, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timeout):])
|
|
if err4 != nil {
|
|
return 0, err4
|
|
}
|
|
i -= n4
|
|
i = encodeVarintTypes(dAtA, i, uint64(n4))
|
|
i--
|
|
dAtA[i] = 0x5a
|
|
{
|
|
size, err := m.VoteState.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x52
|
|
if m.Result != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.Result))
|
|
i--
|
|
dAtA[i] = 0x48
|
|
}
|
|
if m.Status != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.Status))
|
|
i--
|
|
dAtA[i] = 0x40
|
|
}
|
|
if m.GroupAccountVersion != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.GroupAccountVersion))
|
|
i--
|
|
dAtA[i] = 0x38
|
|
}
|
|
if m.GroupVersion != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.GroupVersion))
|
|
i--
|
|
dAtA[i] = 0x30
|
|
}
|
|
n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SubmittedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmittedAt):])
|
|
if err6 != nil {
|
|
return 0, err6
|
|
}
|
|
i -= n6
|
|
i = encodeVarintTypes(dAtA, i, uint64(n6))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
if len(m.Proposers) > 0 {
|
|
for iNdEx := len(m.Proposers) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.Proposers[iNdEx])
|
|
copy(dAtA[i:], m.Proposers[iNdEx])
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Proposers[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
}
|
|
if len(m.Metadata) > 0 {
|
|
i -= len(m.Metadata)
|
|
copy(dAtA[i:], m.Metadata)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Address) > 0 {
|
|
i -= len(m.Address)
|
|
copy(dAtA[i:], m.Address)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.ProposalId != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.ProposalId))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Tally) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Tally) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Tally) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.VetoCount) > 0 {
|
|
i -= len(m.VetoCount)
|
|
copy(dAtA[i:], m.VetoCount)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.VetoCount)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if len(m.AbstainCount) > 0 {
|
|
i -= len(m.AbstainCount)
|
|
copy(dAtA[i:], m.AbstainCount)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.AbstainCount)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.NoCount) > 0 {
|
|
i -= len(m.NoCount)
|
|
copy(dAtA[i:], m.NoCount)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.NoCount)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.YesCount) > 0 {
|
|
i -= len(m.YesCount)
|
|
copy(dAtA[i:], m.YesCount)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.YesCount)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Vote) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Vote) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SubmittedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmittedAt):])
|
|
if err7 != nil {
|
|
return 0, err7
|
|
}
|
|
i -= n7
|
|
i = encodeVarintTypes(dAtA, i, uint64(n7))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
if len(m.Metadata) > 0 {
|
|
i -= len(m.Metadata)
|
|
copy(dAtA[i:], m.Metadata)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if m.Choice != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.Choice))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if len(m.Voter) > 0 {
|
|
i -= len(m.Voter)
|
|
copy(dAtA[i:], m.Voter)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Voter)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.ProposalId != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.ProposalId))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovTypes(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *Member) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Address)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
l = len(m.Weight)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
l = len(m.Metadata)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Members) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Members) > 0 {
|
|
for _, e := range m.Members {
|
|
l = e.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ThresholdDecisionPolicy) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Threshold)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout)
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
return n
|
|
}
|
|
|
|
func (m *GroupInfo) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.GroupId != 0 {
|
|
n += 1 + sovTypes(uint64(m.GroupId))
|
|
}
|
|
l = len(m.Admin)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
l = len(m.Metadata)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
if m.Version != 0 {
|
|
n += 1 + sovTypes(uint64(m.Version))
|
|
}
|
|
l = len(m.TotalWeight)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GroupMember) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.GroupId != 0 {
|
|
n += 1 + sovTypes(uint64(m.GroupId))
|
|
}
|
|
if m.Member != nil {
|
|
l = m.Member.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GroupAccountInfo) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Address)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
if m.GroupId != 0 {
|
|
n += 1 + sovTypes(uint64(m.GroupId))
|
|
}
|
|
l = len(m.Admin)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
l = len(m.Metadata)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
if m.Version != 0 {
|
|
n += 1 + sovTypes(uint64(m.Version))
|
|
}
|
|
if m.DecisionPolicy != nil {
|
|
l = m.DecisionPolicy.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
l = len(m.DerivationKey)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Proposal) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.ProposalId != 0 {
|
|
n += 1 + sovTypes(uint64(m.ProposalId))
|
|
}
|
|
l = len(m.Address)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
l = len(m.Metadata)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
if len(m.Proposers) > 0 {
|
|
for _, s := range m.Proposers {
|
|
l = len(s)
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
}
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmittedAt)
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
if m.GroupVersion != 0 {
|
|
n += 1 + sovTypes(uint64(m.GroupVersion))
|
|
}
|
|
if m.GroupAccountVersion != 0 {
|
|
n += 1 + sovTypes(uint64(m.GroupAccountVersion))
|
|
}
|
|
if m.Status != 0 {
|
|
n += 1 + sovTypes(uint64(m.Status))
|
|
}
|
|
if m.Result != 0 {
|
|
n += 1 + sovTypes(uint64(m.Result))
|
|
}
|
|
l = m.VoteState.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timeout)
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
if m.ExecutorResult != 0 {
|
|
n += 1 + sovTypes(uint64(m.ExecutorResult))
|
|
}
|
|
if len(m.Msgs) > 0 {
|
|
for _, e := range m.Msgs {
|
|
l = e.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Tally) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.YesCount)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
l = len(m.NoCount)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
l = len(m.AbstainCount)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
l = len(m.VetoCount)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Vote) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.ProposalId != 0 {
|
|
n += 1 + sovTypes(uint64(m.ProposalId))
|
|
}
|
|
l = len(m.Voter)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
if m.Choice != 0 {
|
|
n += 1 + sovTypes(uint64(m.Choice))
|
|
}
|
|
l = len(m.Metadata)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmittedAt)
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
return n
|
|
}
|
|
|
|
func sovTypes(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozTypes(x uint64) (n int) {
|
|
return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *Member) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Member: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Member: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Address = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Weight = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Metadata == nil {
|
|
m.Metadata = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Members) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Members: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Members: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Members = append(m.Members, Member{})
|
|
if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ThresholdDecisionPolicy) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ThresholdDecisionPolicy: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ThresholdDecisionPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Threshold = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Timeout, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GroupInfo) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: GroupInfo: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GroupInfo: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType)
|
|
}
|
|
m.GroupId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.GroupId |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Admin = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Metadata == nil {
|
|
m.Metadata = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
|
|
}
|
|
m.Version = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Version |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field TotalWeight", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.TotalWeight = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GroupMember) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: GroupMember: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GroupMember: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType)
|
|
}
|
|
m.GroupId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.GroupId |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Member", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Member == nil {
|
|
m.Member = &Member{}
|
|
}
|
|
if err := m.Member.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GroupAccountInfo) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: GroupAccountInfo: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GroupAccountInfo: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Address = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType)
|
|
}
|
|
m.GroupId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.GroupId |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Admin = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Metadata == nil {
|
|
m.Metadata = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
|
|
}
|
|
m.Version = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Version |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 6:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.DecisionPolicy == nil {
|
|
m.DecisionPolicy = &types.Any{}
|
|
}
|
|
if err := m.DecisionPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 7:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field DerivationKey", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.DerivationKey = append(m.DerivationKey[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.DerivationKey == nil {
|
|
m.DerivationKey = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Proposal) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Proposal: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType)
|
|
}
|
|
m.ProposalId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.ProposalId |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Address = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Metadata == nil {
|
|
m.Metadata = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Proposers", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Proposers = append(m.Proposers, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SubmittedAt", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.SubmittedAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GroupVersion", wireType)
|
|
}
|
|
m.GroupVersion = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.GroupVersion |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 7:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GroupAccountVersion", wireType)
|
|
}
|
|
m.GroupAccountVersion = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.GroupAccountVersion |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 8:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
|
|
}
|
|
m.Status = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Status |= Proposal_Status(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 9:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
|
|
}
|
|
m.Result = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Result |= Proposal_Result(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 10:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field VoteState", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := m.VoteState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 11:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timeout, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 12:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ExecutorResult", wireType)
|
|
}
|
|
m.ExecutorResult = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.ExecutorResult |= Proposal_ExecutorResult(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 13:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Msgs", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Msgs = append(m.Msgs, &types.Any{})
|
|
if err := m.Msgs[len(m.Msgs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Tally) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Tally: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Tally: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field YesCount", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.YesCount = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NoCount", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NoCount = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AbstainCount", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.AbstainCount = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field VetoCount", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.VetoCount = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Vote) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Vote: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType)
|
|
}
|
|
m.ProposalId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.ProposalId |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Voter = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Choice", wireType)
|
|
}
|
|
m.Choice = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Choice |= Choice(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Metadata == nil {
|
|
m.Metadata = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SubmittedAt", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.SubmittedAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipTypes(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthTypes
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupTypes
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthTypes
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
|
|
)
|