// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: wormhole/events.proto

package types

import (
	fmt "fmt"
	proto "github.com/gogo/protobuf/proto"
	io "io"
	math "math"
	math_bits "math/bits"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// 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

type EventGuardianSetUpdate struct {
	OldIndex uint32 `protobuf:"varint,1,opt,name=old_index,json=oldIndex,proto3" json:"old_index,omitempty"`
	NewIndex uint32 `protobuf:"varint,2,opt,name=new_index,json=newIndex,proto3" json:"new_index,omitempty"`
}

func (m *EventGuardianSetUpdate) Reset()         { *m = EventGuardianSetUpdate{} }
func (m *EventGuardianSetUpdate) String() string { return proto.CompactTextString(m) }
func (*EventGuardianSetUpdate) ProtoMessage()    {}
func (*EventGuardianSetUpdate) Descriptor() ([]byte, []int) {
	return fileDescriptor_486bfc4df1202b88, []int{0}
}
func (m *EventGuardianSetUpdate) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *EventGuardianSetUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_EventGuardianSetUpdate.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 *EventGuardianSetUpdate) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EventGuardianSetUpdate.Merge(m, src)
}
func (m *EventGuardianSetUpdate) XXX_Size() int {
	return m.Size()
}
func (m *EventGuardianSetUpdate) XXX_DiscardUnknown() {
	xxx_messageInfo_EventGuardianSetUpdate.DiscardUnknown(m)
}

var xxx_messageInfo_EventGuardianSetUpdate proto.InternalMessageInfo

func (m *EventGuardianSetUpdate) GetOldIndex() uint32 {
	if m != nil {
		return m.OldIndex
	}
	return 0
}

func (m *EventGuardianSetUpdate) GetNewIndex() uint32 {
	if m != nil {
		return m.NewIndex
	}
	return 0
}

type EventPostedMessage struct {
	Emitter  []byte `protobuf:"bytes,1,opt,name=emitter,proto3" json:"emitter,omitempty"`
	Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
	Nonce    uint32 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
	Time     uint64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"`
	Payload  []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"`
}

func (m *EventPostedMessage) Reset()         { *m = EventPostedMessage{} }
func (m *EventPostedMessage) String() string { return proto.CompactTextString(m) }
func (*EventPostedMessage) ProtoMessage()    {}
func (*EventPostedMessage) Descriptor() ([]byte, []int) {
	return fileDescriptor_486bfc4df1202b88, []int{1}
}
func (m *EventPostedMessage) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *EventPostedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_EventPostedMessage.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 *EventPostedMessage) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EventPostedMessage.Merge(m, src)
}
func (m *EventPostedMessage) XXX_Size() int {
	return m.Size()
}
func (m *EventPostedMessage) XXX_DiscardUnknown() {
	xxx_messageInfo_EventPostedMessage.DiscardUnknown(m)
}

var xxx_messageInfo_EventPostedMessage proto.InternalMessageInfo

func (m *EventPostedMessage) GetEmitter() []byte {
	if m != nil {
		return m.Emitter
	}
	return nil
}

func (m *EventPostedMessage) GetSequence() uint64 {
	if m != nil {
		return m.Sequence
	}
	return 0
}

func (m *EventPostedMessage) GetNonce() uint32 {
	if m != nil {
		return m.Nonce
	}
	return 0
}

func (m *EventPostedMessage) GetTime() uint64 {
	if m != nil {
		return m.Time
	}
	return 0
}

func (m *EventPostedMessage) GetPayload() []byte {
	if m != nil {
		return m.Payload
	}
	return nil
}

type EventGuardianRegistered struct {
	GuardianKey  []byte `protobuf:"bytes,1,opt,name=guardian_key,json=guardianKey,proto3" json:"guardian_key,omitempty"`
	ValidatorKey []byte `protobuf:"bytes,2,opt,name=validator_key,json=validatorKey,proto3" json:"validator_key,omitempty"`
}

func (m *EventGuardianRegistered) Reset()         { *m = EventGuardianRegistered{} }
func (m *EventGuardianRegistered) String() string { return proto.CompactTextString(m) }
func (*EventGuardianRegistered) ProtoMessage()    {}
func (*EventGuardianRegistered) Descriptor() ([]byte, []int) {
	return fileDescriptor_486bfc4df1202b88, []int{2}
}
func (m *EventGuardianRegistered) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *EventGuardianRegistered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_EventGuardianRegistered.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 *EventGuardianRegistered) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EventGuardianRegistered.Merge(m, src)
}
func (m *EventGuardianRegistered) XXX_Size() int {
	return m.Size()
}
func (m *EventGuardianRegistered) XXX_DiscardUnknown() {
	xxx_messageInfo_EventGuardianRegistered.DiscardUnknown(m)
}

var xxx_messageInfo_EventGuardianRegistered proto.InternalMessageInfo

func (m *EventGuardianRegistered) GetGuardianKey() []byte {
	if m != nil {
		return m.GuardianKey
	}
	return nil
}

func (m *EventGuardianRegistered) GetValidatorKey() []byte {
	if m != nil {
		return m.ValidatorKey
	}
	return nil
}

type EventConsensusSetUpdate struct {
	OldIndex uint32 `protobuf:"varint,1,opt,name=old_index,json=oldIndex,proto3" json:"old_index,omitempty"`
	NewIndex uint32 `protobuf:"varint,2,opt,name=new_index,json=newIndex,proto3" json:"new_index,omitempty"`
}

func (m *EventConsensusSetUpdate) Reset()         { *m = EventConsensusSetUpdate{} }
func (m *EventConsensusSetUpdate) String() string { return proto.CompactTextString(m) }
func (*EventConsensusSetUpdate) ProtoMessage()    {}
func (*EventConsensusSetUpdate) Descriptor() ([]byte, []int) {
	return fileDescriptor_486bfc4df1202b88, []int{3}
}
func (m *EventConsensusSetUpdate) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *EventConsensusSetUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_EventConsensusSetUpdate.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 *EventConsensusSetUpdate) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EventConsensusSetUpdate.Merge(m, src)
}
func (m *EventConsensusSetUpdate) XXX_Size() int {
	return m.Size()
}
func (m *EventConsensusSetUpdate) XXX_DiscardUnknown() {
	xxx_messageInfo_EventConsensusSetUpdate.DiscardUnknown(m)
}

var xxx_messageInfo_EventConsensusSetUpdate proto.InternalMessageInfo

func (m *EventConsensusSetUpdate) GetOldIndex() uint32 {
	if m != nil {
		return m.OldIndex
	}
	return 0
}

func (m *EventConsensusSetUpdate) GetNewIndex() uint32 {
	if m != nil {
		return m.NewIndex
	}
	return 0
}

func init() {
	proto.RegisterType((*EventGuardianSetUpdate)(nil), "wormhole_foundation.wormchain.wormhole.EventGuardianSetUpdate")
	proto.RegisterType((*EventPostedMessage)(nil), "wormhole_foundation.wormchain.wormhole.EventPostedMessage")
	proto.RegisterType((*EventGuardianRegistered)(nil), "wormhole_foundation.wormchain.wormhole.EventGuardianRegistered")
	proto.RegisterType((*EventConsensusSetUpdate)(nil), "wormhole_foundation.wormchain.wormhole.EventConsensusSetUpdate")
}

func init() { proto.RegisterFile("wormhole/events.proto", fileDescriptor_486bfc4df1202b88) }

var fileDescriptor_486bfc4df1202b88 = []byte{
	// 353 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xbf, 0x4e, 0xc3, 0x30,
	0x10, 0xc6, 0x9b, 0xd2, 0x42, 0x31, 0xed, 0x62, 0xf1, 0x27, 0x02, 0x29, 0x82, 0x20, 0x21, 0x16,
	0x9a, 0x81, 0x89, 0x15, 0x84, 0x10, 0xaa, 0x90, 0x50, 0x2a, 0x16, 0x96, 0xca, 0xad, 0x8f, 0xd4,
	0x22, 0xf1, 0x85, 0xd8, 0x69, 0x9b, 0x97, 0x40, 0x3c, 0x16, 0x63, 0x47, 0x46, 0xd4, 0xbe, 0x08,
	0x8a, 0xf3, 0x07, 0xb1, 0xb3, 0xdd, 0xf7, 0xfd, 0x2e, 0xdf, 0xc5, 0x3e, 0x93, 0xbd, 0x39, 0x26,
	0xd1, 0x14, 0x43, 0xf0, 0x60, 0x06, 0x52, 0xab, 0x7e, 0x9c, 0xa0, 0x46, 0x7a, 0x56, 0xd9, 0xa3,
	0x17, 0x4c, 0x25, 0x67, 0x5a, 0xa0, 0xec, 0xe7, 0xde, 0x64, 0xca, 0x44, 0x51, 0xe5, 0xd4, 0xf5,
	0xc9, 0xfe, 0x6d, 0xfe, 0xdd, 0x5d, 0xca, 0x12, 0x2e, 0x98, 0x1c, 0x82, 0x7e, 0x8a, 0x39, 0xd3,
	0x40, 0x8f, 0xc8, 0x36, 0x86, 0x7c, 0x24, 0x24, 0x87, 0x85, 0x6d, 0x1d, 0x5b, 0xe7, 0x3d, 0xbf,
	0x83, 0x21, 0xbf, 0xcf, 0x75, 0x0e, 0x25, 0xcc, 0x4b, 0xd8, 0x2c, 0xa0, 0x84, 0xb9, 0x81, 0xee,
	0xbb, 0x45, 0xa8, 0x09, 0x7d, 0x44, 0xa5, 0x81, 0x3f, 0x80, 0x52, 0x2c, 0x00, 0x6a, 0x93, 0x2d,
	0x88, 0x84, 0xd6, 0x90, 0x98, 0xb8, 0xae, 0x5f, 0x49, 0x7a, 0x48, 0x3a, 0x0a, 0xde, 0x52, 0x90,
	0x13, 0x30, 0x61, 0x2d, 0xbf, 0xd6, 0x74, 0x97, 0xb4, 0x25, 0xe6, 0x60, 0xc3, 0x4c, 0x29, 0x04,
	0xa5, 0xa4, 0xa5, 0x45, 0x04, 0x76, 0xcb, 0x74, 0x9b, 0x3a, 0xcf, 0x8f, 0x59, 0x16, 0x22, 0xe3,
	0x76, 0xbb, 0xc8, 0x2f, 0xa5, 0xcb, 0xc8, 0xc1, 0x9f, 0x43, 0xfa, 0x10, 0x08, 0xa5, 0x21, 0x01,
	0x4e, 0x4f, 0x48, 0x37, 0x28, 0xdd, 0xd1, 0x2b, 0x64, 0xe5, 0x9f, 0xed, 0x54, 0xde, 0x00, 0x32,
	0x7a, 0x4a, 0x7a, 0x33, 0x16, 0x0a, 0xce, 0x34, 0x26, 0xa6, 0xa7, 0x69, 0x7a, 0xba, 0xb5, 0x39,
	0x80, 0xcc, 0x1d, 0x96, 0x23, 0x6e, 0x50, 0x2a, 0x90, 0x2a, 0x55, 0xff, 0x70, 0x91, 0xd7, 0xc3,
	0xcf, 0x95, 0x63, 0x2d, 0x57, 0x8e, 0xf5, 0xbd, 0x72, 0xac, 0x8f, 0xb5, 0xd3, 0x58, 0xae, 0x9d,
	0xc6, 0xd7, 0xda, 0x69, 0x3c, 0x5f, 0x05, 0x42, 0x4f, 0xd3, 0x71, 0x7f, 0x82, 0x91, 0x57, 0xed,
	0xf2, 0xe2, 0x77, 0xd3, 0x5e, 0xbd, 0x69, 0x6f, 0x51, 0x73, 0x4f, 0x67, 0x31, 0xa8, 0xf1, 0xa6,
	0x79, 0x20, 0x97, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc1, 0xe4, 0xc3, 0xee, 0x39, 0x02, 0x00,
	0x00,
}

func (m *EventGuardianSetUpdate) 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 *EventGuardianSetUpdate) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *EventGuardianSetUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.NewIndex != 0 {
		i = encodeVarintEvents(dAtA, i, uint64(m.NewIndex))
		i--
		dAtA[i] = 0x10
	}
	if m.OldIndex != 0 {
		i = encodeVarintEvents(dAtA, i, uint64(m.OldIndex))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *EventPostedMessage) 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 *EventPostedMessage) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *EventPostedMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Payload) > 0 {
		i -= len(m.Payload)
		copy(dAtA[i:], m.Payload)
		i = encodeVarintEvents(dAtA, i, uint64(len(m.Payload)))
		i--
		dAtA[i] = 0x2a
	}
	if m.Time != 0 {
		i = encodeVarintEvents(dAtA, i, uint64(m.Time))
		i--
		dAtA[i] = 0x20
	}
	if m.Nonce != 0 {
		i = encodeVarintEvents(dAtA, i, uint64(m.Nonce))
		i--
		dAtA[i] = 0x18
	}
	if m.Sequence != 0 {
		i = encodeVarintEvents(dAtA, i, uint64(m.Sequence))
		i--
		dAtA[i] = 0x10
	}
	if len(m.Emitter) > 0 {
		i -= len(m.Emitter)
		copy(dAtA[i:], m.Emitter)
		i = encodeVarintEvents(dAtA, i, uint64(len(m.Emitter)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *EventGuardianRegistered) 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 *EventGuardianRegistered) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *EventGuardianRegistered) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.ValidatorKey) > 0 {
		i -= len(m.ValidatorKey)
		copy(dAtA[i:], m.ValidatorKey)
		i = encodeVarintEvents(dAtA, i, uint64(len(m.ValidatorKey)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.GuardianKey) > 0 {
		i -= len(m.GuardianKey)
		copy(dAtA[i:], m.GuardianKey)
		i = encodeVarintEvents(dAtA, i, uint64(len(m.GuardianKey)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *EventConsensusSetUpdate) 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 *EventConsensusSetUpdate) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *EventConsensusSetUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.NewIndex != 0 {
		i = encodeVarintEvents(dAtA, i, uint64(m.NewIndex))
		i--
		dAtA[i] = 0x10
	}
	if m.OldIndex != 0 {
		i = encodeVarintEvents(dAtA, i, uint64(m.OldIndex))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func encodeVarintEvents(dAtA []byte, offset int, v uint64) int {
	offset -= sovEvents(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *EventGuardianSetUpdate) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.OldIndex != 0 {
		n += 1 + sovEvents(uint64(m.OldIndex))
	}
	if m.NewIndex != 0 {
		n += 1 + sovEvents(uint64(m.NewIndex))
	}
	return n
}

func (m *EventPostedMessage) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Emitter)
	if l > 0 {
		n += 1 + l + sovEvents(uint64(l))
	}
	if m.Sequence != 0 {
		n += 1 + sovEvents(uint64(m.Sequence))
	}
	if m.Nonce != 0 {
		n += 1 + sovEvents(uint64(m.Nonce))
	}
	if m.Time != 0 {
		n += 1 + sovEvents(uint64(m.Time))
	}
	l = len(m.Payload)
	if l > 0 {
		n += 1 + l + sovEvents(uint64(l))
	}
	return n
}

func (m *EventGuardianRegistered) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.GuardianKey)
	if l > 0 {
		n += 1 + l + sovEvents(uint64(l))
	}
	l = len(m.ValidatorKey)
	if l > 0 {
		n += 1 + l + sovEvents(uint64(l))
	}
	return n
}

func (m *EventConsensusSetUpdate) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.OldIndex != 0 {
		n += 1 + sovEvents(uint64(m.OldIndex))
	}
	if m.NewIndex != 0 {
		n += 1 + sovEvents(uint64(m.NewIndex))
	}
	return n
}

func sovEvents(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozEvents(x uint64) (n int) {
	return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *EventGuardianSetUpdate) 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 ErrIntOverflowEvents
			}
			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: EventGuardianSetUpdate: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: EventGuardianSetUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field OldIndex", wireType)
			}
			m.OldIndex = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowEvents
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.OldIndex |= uint32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field NewIndex", wireType)
			}
			m.NewIndex = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowEvents
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.NewIndex |= uint32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipEvents(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthEvents
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *EventPostedMessage) 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 ErrIntOverflowEvents
			}
			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: EventPostedMessage: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: EventPostedMessage: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Emitter", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowEvents
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthEvents
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthEvents
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Emitter = append(m.Emitter[:0], dAtA[iNdEx:postIndex]...)
			if m.Emitter == nil {
				m.Emitter = []byte{}
			}
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
			}
			m.Sequence = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowEvents
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Sequence |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType)
			}
			m.Nonce = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowEvents
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Nonce |= uint32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
			}
			m.Time = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowEvents
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Time |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowEvents
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthEvents
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthEvents
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...)
			if m.Payload == nil {
				m.Payload = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipEvents(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthEvents
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *EventGuardianRegistered) 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 ErrIntOverflowEvents
			}
			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: EventGuardianRegistered: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: EventGuardianRegistered: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field GuardianKey", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowEvents
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthEvents
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthEvents
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.GuardianKey = append(m.GuardianKey[:0], dAtA[iNdEx:postIndex]...)
			if m.GuardianKey == nil {
				m.GuardianKey = []byte{}
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ValidatorKey", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowEvents
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthEvents
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthEvents
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ValidatorKey = append(m.ValidatorKey[:0], dAtA[iNdEx:postIndex]...)
			if m.ValidatorKey == nil {
				m.ValidatorKey = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipEvents(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthEvents
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *EventConsensusSetUpdate) 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 ErrIntOverflowEvents
			}
			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: EventConsensusSetUpdate: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: EventConsensusSetUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field OldIndex", wireType)
			}
			m.OldIndex = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowEvents
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.OldIndex |= uint32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field NewIndex", wireType)
			}
			m.NewIndex = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowEvents
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.NewIndex |= uint32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipEvents(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthEvents
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipEvents(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, ErrIntOverflowEvents
			}
			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, ErrIntOverflowEvents
				}
				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, ErrIntOverflowEvents
				}
				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, ErrInvalidLengthEvents
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupEvents
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthEvents
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
