// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: terra/wasm/v1beta1/wasm.proto

package legacy

import (
	bytes "bytes"
	encoding_json "encoding/json"
	fmt "fmt"
	_ "github.com/cosmos/gogoproto/gogoproto"
	proto "github.com/cosmos/gogoproto/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

// CodeInfo is data for the uploaded contract WASM code
type LegacyCodeInfo struct {
	// CodeID is the sequentially increasing unique identifier
	CodeID uint64 `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty" yaml:"code_id"`
	// CodeHash is the unique identifier created by wasmvm
	CodeHash []byte `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty" yaml:"code_hash"`
	// Creator address who initially stored the code
	Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
}

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

var xxx_messageInfo_LegacyCodeInfo proto.InternalMessageInfo

func (m *LegacyCodeInfo) GetCodeID() uint64 {
	if m != nil {
		return m.CodeID
	}
	return 0
}

func (m *LegacyCodeInfo) GetCodeHash() []byte {
	if m != nil {
		return m.CodeHash
	}
	return nil
}

func (m *LegacyCodeInfo) GetCreator() string {
	if m != nil {
		return m.Creator
	}
	return ""
}

// ContractInfo stores a WASM contract instance
type LegacyContractInfo struct {
	// Address is the address of the contract
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	// Creator is the contract creator address
	Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
	// Admin is who can execute the contract migration
	Admin string `protobuf:"bytes,3,opt,name=admin,proto3" json:"admin,omitempty" yaml:"admin"`
	// CodeID is the reference to the stored Wasm code
	CodeID uint64 `protobuf:"varint,4,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty" yaml:"code_id"`
	// InitMsg is the raw message used when instantiating a contract
	InitMsg encoding_json.RawMessage `protobuf:"bytes,5,opt,name=init_msg,json=initMsg,proto3,casttype=encoding/json.RawMessage" json:"init_msg,omitempty" yaml:"init_msg"`
}

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

var xxx_messageInfo_LegacyContractInfo proto.InternalMessageInfo

func (m *LegacyContractInfo) GetAddress() string {
	if m != nil {
		return m.Address
	}
	return ""
}

func (m *LegacyContractInfo) GetCreator() string {
	if m != nil {
		return m.Creator
	}
	return ""
}

func (m *LegacyContractInfo) GetAdmin() string {
	if m != nil {
		return m.Admin
	}
	return ""
}

func (m *LegacyContractInfo) GetCodeID() uint64 {
	if m != nil {
		return m.CodeID
	}
	return 0
}

func (m *LegacyContractInfo) GetInitMsg() encoding_json.RawMessage {
	if m != nil {
		return m.InitMsg
	}
	return nil
}

func init() {
	proto.RegisterType((*LegacyCodeInfo)(nil), "terra.wasm.v1beta1.LegacyCodeInfo")
	proto.RegisterType((*LegacyContractInfo)(nil), "terra.wasm.v1beta1.LegacyContractInfo")
}

func init() { proto.RegisterFile("terra/wasm/v1beta1/wasm.proto", fileDescriptor_2bd5d0123068c880) }

var fileDescriptor_2bd5d0123068c880 = []byte{
	// 407 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x31, 0x6f, 0xd4, 0x30,
	0x14, 0xc7, 0xcf, 0xc7, 0xf5, 0xae, 0xb5, 0xaa, 0x52, 0x59, 0x1d, 0x22, 0x04, 0xc9, 0xc9, 0x03,
	0xba, 0xa1, 0x9c, 0x75, 0xaa, 0x18, 0xe8, 0x18, 0x18, 0x28, 0xa2, 0x4b, 0xd8, 0x58, 0x2a, 0x9f,
	0x6d, 0x1c, 0xa3, 0x8b, 0x5d, 0xd9, 0x6e, 0xab, 0xfb, 0x16, 0x7c, 0x04, 0xd8, 0xf8, 0x28, 0x8c,
	0x1d, 0x99, 0x22, 0x94, 0x5b, 0x98, 0x33, 0x32, 0xa1, 0x38, 0x89, 0x14, 0x26, 0xd4, 0xed, 0xd9,
	0xbf, 0x9f, 0xde, 0x7b, 0xfa, 0xeb, 0xc1, 0x67, 0x5e, 0x58, 0x4b, 0xc9, 0x1d, 0x75, 0x05, 0xb9,
	0x5d, 0xad, 0x85, 0xa7, 0xab, 0xf0, 0x58, 0x5e, 0x5b, 0xe3, 0x0d, 0x42, 0x01, 0x2f, 0xc3, 0x4f,
	0x87, 0x9f, 0x9c, 0x48, 0x23, 0x4d, 0xc0, 0xa4, 0xa9, 0x5a, 0x13, 0x7f, 0x07, 0xf0, 0xe8, 0xbd,
	0x90, 0x94, 0x6d, 0x5f, 0x1b, 0x2e, 0x2e, 0xf4, 0x27, 0x83, 0x5e, 0xc2, 0x19, 0x33, 0x5c, 0x5c,
	0x29, 0x1e, 0x81, 0x39, 0x58, 0x4c, 0xd2, 0xa7, 0x55, 0x99, 0x4c, 0x03, 0x7e, 0x53, 0x97, 0xc9,
	0xd1, 0x96, 0x16, 0x9b, 0x73, 0xdc, 0x29, 0x38, 0x9b, 0x36, 0xd5, 0x05, 0x47, 0x2b, 0x78, 0x10,
	0xfe, 0x72, 0xea, 0xf2, 0x68, 0x3c, 0x07, 0x8b, 0xc3, 0xf4, 0xa4, 0x2e, 0x93, 0xe3, 0x81, 0xde,
	0x20, 0x9c, 0xed, 0x37, 0xf5, 0x5b, 0xea, 0x72, 0x74, 0x0a, 0x67, 0xcc, 0x0a, 0xea, 0x8d, 0x8d,
	0x1e, 0xcd, 0xc1, 0xe2, 0x20, 0x45, 0x83, 0xfe, 0x2d, 0xc0, 0x59, 0xaf, 0xe0, 0x6f, 0x63, 0x88,
	0xfa, 0x55, 0xb5, 0xb7, 0x94, 0xf9, 0xb0, 0xee, 0x29, 0x9c, 0x51, 0xce, 0xad, 0x70, 0x2e, 0xac,
	0xfb, 0x4f, 0x93, 0x0e, 0xe0, 0xac, 0x57, 0x86, 0x23, 0xc7, 0xff, 0x1d, 0x89, 0x9e, 0xc3, 0x3d,
	0xca, 0x0b, 0xa5, 0xbb, 0xf5, 0x8e, 0xeb, 0x32, 0x39, 0xec, 0x3b, 0x17, 0x4a, 0xe3, 0xac, 0xc5,
	0xc3, 0xc8, 0x26, 0x0f, 0x88, 0xec, 0x1d, 0xdc, 0x57, 0x5a, 0xf9, 0xab, 0xc2, 0xc9, 0x68, 0x2f,
	0x24, 0x46, 0xea, 0x32, 0x79, 0xdc, 0xda, 0x3d, 0xc1, 0x7f, 0xca, 0x24, 0x12, 0x9a, 0x19, 0xae,
	0xb4, 0x24, 0x9f, 0x9d, 0xd1, 0xcb, 0x8c, 0xde, 0x5d, 0x0a, 0xe7, 0xa8, 0x14, 0xd9, 0xac, 0xd1,
	0x2e, 0x9d, 0x3c, 0x9f, 0xfc, 0xfe, 0x9a, 0x80, 0xf4, 0xc3, 0x8f, 0x2a, 0x06, 0xf7, 0x55, 0x0c,
	0x7e, 0x55, 0x31, 0xf8, 0xb2, 0x8b, 0x47, 0xf7, 0xbb, 0x78, 0xf4, 0x73, 0x17, 0x8f, 0x3e, 0xbe,
	0x92, 0xca, 0xe7, 0x37, 0xeb, 0x25, 0x33, 0x05, 0x61, 0x1b, 0xea, 0x9c, 0x62, 0x2f, 0xda, 0x23,
	0x62, 0xc6, 0x0a, 0x72, 0x7b, 0x46, 0xd8, 0x8d, 0xf3, 0xa6, 0x68, 0x6f, 0xca, 0x6f, 0xaf, 0x85,
	0x23, 0x9b, 0x90, 0xf6, 0x7a, 0x1a, 0x4e, 0xe5, 0xec, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdb,
	0x0f, 0xfc, 0xd7, 0x75, 0x02, 0x00, 0x00,
}

func (this *LegacyContractInfo) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*LegacyContractInfo)
	if !ok {
		that2, ok := that.(LegacyContractInfo)
		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.Creator != that1.Creator {
		return false
	}
	if this.Admin != that1.Admin {
		return false
	}
	if this.CodeID != that1.CodeID {
		return false
	}
	if !bytes.Equal(this.InitMsg, that1.InitMsg) {
		return false
	}
	return true
}
func (m *LegacyCodeInfo) 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 *LegacyCodeInfo) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LegacyCodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Creator) > 0 {
		i -= len(m.Creator)
		copy(dAtA[i:], m.Creator)
		i = encodeVarintWasm(dAtA, i, uint64(len(m.Creator)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.CodeHash) > 0 {
		i -= len(m.CodeHash)
		copy(dAtA[i:], m.CodeHash)
		i = encodeVarintWasm(dAtA, i, uint64(len(m.CodeHash)))
		i--
		dAtA[i] = 0x12
	}
	if m.CodeID != 0 {
		i = encodeVarintWasm(dAtA, i, uint64(m.CodeID))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

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

func (m *LegacyContractInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.InitMsg) > 0 {
		i -= len(m.InitMsg)
		copy(dAtA[i:], m.InitMsg)
		i = encodeVarintWasm(dAtA, i, uint64(len(m.InitMsg)))
		i--
		dAtA[i] = 0x2a
	}
	if m.CodeID != 0 {
		i = encodeVarintWasm(dAtA, i, uint64(m.CodeID))
		i--
		dAtA[i] = 0x20
	}
	if len(m.Admin) > 0 {
		i -= len(m.Admin)
		copy(dAtA[i:], m.Admin)
		i = encodeVarintWasm(dAtA, i, uint64(len(m.Admin)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.Creator) > 0 {
		i -= len(m.Creator)
		copy(dAtA[i:], m.Creator)
		i = encodeVarintWasm(dAtA, i, uint64(len(m.Creator)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Address) > 0 {
		i -= len(m.Address)
		copy(dAtA[i:], m.Address)
		i = encodeVarintWasm(dAtA, i, uint64(len(m.Address)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func encodeVarintWasm(dAtA []byte, offset int, v uint64) int {
	offset -= sovWasm(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *LegacyCodeInfo) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.CodeID != 0 {
		n += 1 + sovWasm(uint64(m.CodeID))
	}
	l = len(m.CodeHash)
	if l > 0 {
		n += 1 + l + sovWasm(uint64(l))
	}
	l = len(m.Creator)
	if l > 0 {
		n += 1 + l + sovWasm(uint64(l))
	}
	return n
}

func (m *LegacyContractInfo) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Address)
	if l > 0 {
		n += 1 + l + sovWasm(uint64(l))
	}
	l = len(m.Creator)
	if l > 0 {
		n += 1 + l + sovWasm(uint64(l))
	}
	l = len(m.Admin)
	if l > 0 {
		n += 1 + l + sovWasm(uint64(l))
	}
	if m.CodeID != 0 {
		n += 1 + sovWasm(uint64(m.CodeID))
	}
	l = len(m.InitMsg)
	if l > 0 {
		n += 1 + l + sovWasm(uint64(l))
	}
	return n
}

func sovWasm(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozWasm(x uint64) (n int) {
	return sovWasm(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *LegacyCodeInfo) 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 ErrIntOverflowWasm
			}
			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: LegacyCodeInfo: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: LegacyCodeInfo: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType)
			}
			m.CodeID = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowWasm
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.CodeID |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowWasm
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthWasm
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthWasm
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.CodeHash = append(m.CodeHash[:0], dAtA[iNdEx:postIndex]...)
			if m.CodeHash == nil {
				m.CodeHash = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowWasm
				}
				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 ErrInvalidLengthWasm
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthWasm
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Creator = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipWasm(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthWasm
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *LegacyContractInfo) 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 ErrIntOverflowWasm
			}
			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: LegacyContractInfo: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: LegacyContractInfo: 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 ErrIntOverflowWasm
				}
				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 ErrInvalidLengthWasm
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthWasm
			}
			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 Creator", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowWasm
				}
				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 ErrInvalidLengthWasm
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthWasm
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Creator = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		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 ErrIntOverflowWasm
				}
				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 ErrInvalidLengthWasm
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthWasm
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Admin = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType)
			}
			m.CodeID = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowWasm
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.CodeID |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field InitMsg", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowWasm
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthWasm
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthWasm
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.InitMsg = append(m.InitMsg[:0], dAtA[iNdEx:postIndex]...)
			if m.InitMsg == nil {
				m.InitMsg = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipWasm(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthWasm
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

var (
	ErrInvalidLengthWasm        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowWasm          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupWasm = fmt.Errorf("proto: unexpected end of group")
)
