// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: junction/rollup/ledger_entry.proto

package types

import (
	fmt "fmt"
	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

type LedgerEntry struct {
	CreatorAddress string `protobuf:"bytes,1,opt,name=creatorAddress,proto3" json:"creatorAddress,omitempty"`
	AmountStaked   uint64 `protobuf:"varint,2,opt,name=amountStaked,proto3" json:"amountStaked,omitempty"`
	Denom          string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"`
	RollupId       string `protobuf:"bytes,4,opt,name=rollupId,proto3" json:"rollupId,omitempty"`
	Timestamp      string `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	BlockHeight    uint64 `protobuf:"varint,6,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"`
}

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

var xxx_messageInfo_LedgerEntry proto.InternalMessageInfo

func (m *LedgerEntry) GetCreatorAddress() string {
	if m != nil {
		return m.CreatorAddress
	}
	return ""
}

func (m *LedgerEntry) GetAmountStaked() uint64 {
	if m != nil {
		return m.AmountStaked
	}
	return 0
}

func (m *LedgerEntry) GetDenom() string {
	if m != nil {
		return m.Denom
	}
	return ""
}

func (m *LedgerEntry) GetRollupId() string {
	if m != nil {
		return m.RollupId
	}
	return ""
}

func (m *LedgerEntry) GetTimestamp() string {
	if m != nil {
		return m.Timestamp
	}
	return ""
}

func (m *LedgerEntry) GetBlockHeight() uint64 {
	if m != nil {
		return m.BlockHeight
	}
	return 0
}

func init() {
	proto.RegisterType((*LedgerEntry)(nil), "junction.rollup.LedgerEntry")
}

func init() {
	proto.RegisterFile("junction/rollup/ledger_entry.proto", fileDescriptor_c6b5497eef11e0aa)
}

var fileDescriptor_c6b5497eef11e0aa = []byte{
	// 272 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xcf, 0x4a, 0xf3, 0x40,
	0x14, 0xc5, 0x3b, 0xdf, 0xd7, 0x16, 0x3b, 0x15, 0x85, 0xc1, 0xc5, 0x20, 0x32, 0x84, 0x2c, 0xa4,
	0x1b, 0x93, 0x85, 0xbe, 0x80, 0x82, 0xa0, 0x20, 0x2e, 0xea, 0xce, 0x8d, 0x4c, 0x32, 0x97, 0x64,
	0x4c, 0x32, 0x13, 0x26, 0x37, 0x68, 0xdf, 0xc2, 0xc7, 0x12, 0xdc, 0x74, 0xe9, 0x52, 0x92, 0x17,
	0x11, 0x27, 0xb4, 0xfe, 0x59, 0xde, 0xdf, 0xf9, 0x71, 0x0f, 0x1c, 0x1a, 0x3e, 0xb6, 0x26, 0x45,
	0x6d,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ff, 0xe6, 0x81, 0xd5, 0x7e, 0x5b, 0x01, 0x00, 0x00,
}

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

func (m *LedgerEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.BlockHeight != 0 {
		i = encodeVarintLedgerEntry(dAtA, i, uint64(m.BlockHeight))
		i--
		dAtA[i] = 0x30
	}
	if len(m.Timestamp) > 0 {
		i -= len(m.Timestamp)
		copy(dAtA[i:], m.Timestamp)
		i = encodeVarintLedgerEntry(dAtA, i, uint64(len(m.Timestamp)))
		i--
		dAtA[i] = 0x2a
	}
	if len(m.RollupId) > 0 {
		i -= len(m.RollupId)
		copy(dAtA[i:], m.RollupId)
		i = encodeVarintLedgerEntry(dAtA, i, uint64(len(m.RollupId)))
		i--
		dAtA[i] = 0x22
	}
	if len(m.Denom) > 0 {
		i -= len(m.Denom)
		copy(dAtA[i:], m.Denom)
		i = encodeVarintLedgerEntry(dAtA, i, uint64(len(m.Denom)))
		i--
		dAtA[i] = 0x1a
	}
	if m.AmountStaked != 0 {
		i = encodeVarintLedgerEntry(dAtA, i, uint64(m.AmountStaked))
		i--
		dAtA[i] = 0x10
	}
	if len(m.CreatorAddress) > 0 {
		i -= len(m.CreatorAddress)
		copy(dAtA[i:], m.CreatorAddress)
		i = encodeVarintLedgerEntry(dAtA, i, uint64(len(m.CreatorAddress)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func encodeVarintLedgerEntry(dAtA []byte, offset int, v uint64) int {
	offset -= sovLedgerEntry(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *LedgerEntry) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.CreatorAddress)
	if l > 0 {
		n += 1 + l + sovLedgerEntry(uint64(l))
	}
	if m.AmountStaked != 0 {
		n += 1 + sovLedgerEntry(uint64(m.AmountStaked))
	}
	l = len(m.Denom)
	if l > 0 {
		n += 1 + l + sovLedgerEntry(uint64(l))
	}
	l = len(m.RollupId)
	if l > 0 {
		n += 1 + l + sovLedgerEntry(uint64(l))
	}
	l = len(m.Timestamp)
	if l > 0 {
		n += 1 + l + sovLedgerEntry(uint64(l))
	}
	if m.BlockHeight != 0 {
		n += 1 + sovLedgerEntry(uint64(m.BlockHeight))
	}
	return n
}

func sovLedgerEntry(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozLedgerEntry(x uint64) (n int) {
	return sovLedgerEntry(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *LedgerEntry) 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 ErrIntOverflowLedgerEntry
			}
			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: LedgerEntry: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: LedgerEntry: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CreatorAddress", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowLedgerEntry
				}
				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 ErrInvalidLengthLedgerEntry
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthLedgerEntry
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.CreatorAddress = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field AmountStaked", wireType)
			}
			m.AmountStaked = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowLedgerEntry
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.AmountStaked |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowLedgerEntry
				}
				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 ErrInvalidLengthLedgerEntry
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthLedgerEntry
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Denom = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RollupId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowLedgerEntry
				}
				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 ErrInvalidLengthLedgerEntry
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthLedgerEntry
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.RollupId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowLedgerEntry
				}
				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 ErrInvalidLengthLedgerEntry
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthLedgerEntry
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Timestamp = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 6:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType)
			}
			m.BlockHeight = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowLedgerEntry
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.BlockHeight |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipLedgerEntry(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthLedgerEntry
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

var (
	ErrInvalidLengthLedgerEntry        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLedgerEntry          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLedgerEntry = fmt.Errorf("proto: unexpected end of group")
)
