// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: provenance/flatfees/v1/flatfees.proto

package types

import (
	fmt "fmt"
	_ "github.com/cosmos/cosmos-proto"
	github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
	types "github.com/cosmos/cosmos-sdk/types"
	_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
	_ "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

// Params defines the set of params for the flatfees module.
type Params struct {
	// default_cost is the amount a msg costs when there is no specific msg-fee defined for it.
	// The denom used here should be the same as used to define the specific msg costs.
	// The recommended denom is musd.
	DefaultCost types.Coin `protobuf:"bytes,1,opt,name=default_cost,json=defaultCost,proto3" json:"default_cost"`
	// conversion_factor is the ratio used to convert the msg-fees from their defined amounts into the fee denomination.
	// The definition_amount should have the same denom as the default cost.
	// The denom of the converted amount should be the denom that fees are paid in, e.g. nhash.
	ConversionFactor ConversionFactor `protobuf:"bytes,3,opt,name=conversion_factor,json=conversionFactor,proto3" json:"conversion_factor"`
	// oracle_addresses is the list of addresses allowed to update the conversion factor without governance.
	OracleAddresses []string `protobuf:"bytes,4,rep,name=oracle_addresses,json=oracleAddresses,proto3" json:"oracle_addresses,omitempty"`
}

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

var xxx_messageInfo_Params proto.InternalMessageInfo

func (m *Params) GetDefaultCost() types.Coin {
	if m != nil {
		return m.DefaultCost
	}
	return types.Coin{}
}

func (m *Params) GetConversionFactor() ConversionFactor {
	if m != nil {
		return m.ConversionFactor
	}
	return ConversionFactor{}
}

func (m *Params) GetOracleAddresses() []string {
	if m != nil {
		return m.OracleAddresses
	}
	return nil
}

// ConversionFactor equates the values of two coins in different denominations.
// It is used to determine how much of the fee denomination is due.
// actual cost = defined cost * converted_amount / definition_amount (truncated to an integer).
type ConversionFactor struct {
	// definition_amount is an amount (in the denomination used to define fees) that is equal to the converted_amount.
	// This cannot have an amount of zero.
	// If this has the same denomination as the converted_amount, then the amounts must also be equal.
	// The denom of this field should be the same as the default cost, e.g. musd.
	DefinitionAmount types.Coin `protobuf:"bytes,1,opt,name=definition_amount,json=definitionAmount,proto3" json:"definition_amount"`
	// converted_amount is an amount in the fee denomination equal to the definition_amount.
	// If this is zero, all msgs will be free.
	// If this has the same denomination as the definition_amount, then the amounts must also be equal.
	// The denom of this field should be the fee denom, e.g. nhash.
	ConvertedAmount types.Coin `protobuf:"bytes,2,opt,name=converted_amount,json=convertedAmount,proto3" json:"converted_amount"`
}

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

var xxx_messageInfo_ConversionFactor proto.InternalMessageInfo

func (m *ConversionFactor) GetDefinitionAmount() types.Coin {
	if m != nil {
		return m.DefinitionAmount
	}
	return types.Coin{}
}

func (m *ConversionFactor) GetConvertedAmount() types.Coin {
	if m != nil {
		return m.ConvertedAmount
	}
	return types.Coin{}
}

// MsgFee defines the cost to use a specific message type.
type MsgFee struct {
	// msg_type_url is the type-url of the message, e.g. "/cosmos.bank.v1beta1.MsgSend".
	MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
	// cost is the Tx fee required for this msg_type_url.
	// It should have the same denomination as the default cost and as the conversion factor's
	// definition_amount, e.g. musdc. Any other denomination will be charged as defined.
	Cost github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=cost,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"cost"`
}

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

var xxx_messageInfo_MsgFee proto.InternalMessageInfo

func (m *MsgFee) GetMsgTypeUrl() string {
	if m != nil {
		return m.MsgTypeUrl
	}
	return ""
}

func (m *MsgFee) GetCost() github_com_cosmos_cosmos_sdk_types.Coins {
	if m != nil {
		return m.Cost
	}
	return nil
}

func init() {
	proto.RegisterType((*Params)(nil), "provenance.flatfees.v1.Params")
	proto.RegisterType((*ConversionFactor)(nil), "provenance.flatfees.v1.ConversionFactor")
	proto.RegisterType((*MsgFee)(nil), "provenance.flatfees.v1.MsgFee")
}

func init() {
	proto.RegisterFile("provenance/flatfees/v1/flatfees.proto", fileDescriptor_5f072ef45f916c39)
}

var fileDescriptor_5f072ef45f916c39 = []byte{
	// 501 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x4f, 0x6b, 0xdb, 0x3c,
	0x18, 0x8f, 0x9a, 0x10, 0xa8, 0x1a, 0x68, 0x62, 0xca, 0x4b, 0xd2, 0x83, 0x13, 0x0a, 0x2f, 0x84,
	0x42, 0x6c, 0xb2, 0xed, 0xd4, 0x5b, 0x12, 0xc8, 0x61, 0x6c, 0x50, 0xb2, 0xed, 0xb2, 0x1d, 0x8c,
	0x22, 0xcb, 0x9e, 0xa8, 0xad, 0x27, 0x48, 0xb2, 0x59, 0xbe, 0xc5, 0x8e, 0x63, 0xa7, 0xdd, 0x36,
	0x76, 0x2a, 0x63, 0x1f, 0xa2, 0xc7, 0xb2, 0xd3, 0x4e, 0xdb, 0x48, 0x0e, 0xdd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b, 0x7e, 0xac, 0x5c, 0xf4,
	0x7a, 0xed, 0x56, 0x2e, 0xd7, 0x6e, 0xe5, 0xeb, 0xda, 0xad, 0xe0, 0x0e, 0x87, 0xbf, 0xcc, 0xc1,
	0x29, 0x7a, 0xfe, 0xe0, 0x46, 0x84, 0x2d, 0x68, 0xc0, 0xe1, 0xc6, 0xca, 0x7f, 0xb5, 0xbd, 0x4a,
	0x26, 0xd4, 0xbc, 0x6e, 0x26, 0xf9, 0xfe, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x2e, 0xa2,
	0x95, 0x6e, 0x03, 0x00, 0x00,
}

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

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.OracleAddresses) > 0 {
		for iNdEx := len(m.OracleAddresses) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.OracleAddresses[iNdEx])
			copy(dAtA[i:], m.OracleAddresses[iNdEx])
			i = encodeVarintFlatfees(dAtA, i, uint64(len(m.OracleAddresses[iNdEx])))
			i--
			dAtA[i] = 0x22
		}
	}
	{
		size, err := m.ConversionFactor.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintFlatfees(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x1a
	{
		size, err := m.DefaultCost.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintFlatfees(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *ConversionFactor) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.ConvertedAmount.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintFlatfees(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x12
	{
		size, err := m.DefinitionAmount.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintFlatfees(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *MsgFee) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Cost) > 0 {
		for iNdEx := len(m.Cost) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.Cost[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintFlatfees(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x12
		}
	}
	if len(m.MsgTypeUrl) > 0 {
		i -= len(m.MsgTypeUrl)
		copy(dAtA[i:], m.MsgTypeUrl)
		i = encodeVarintFlatfees(dAtA, i, uint64(len(m.MsgTypeUrl)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func encodeVarintFlatfees(dAtA []byte, offset int, v uint64) int {
	offset -= sovFlatfees(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *Params) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.DefaultCost.Size()
	n += 1 + l + sovFlatfees(uint64(l))
	l = m.ConversionFactor.Size()
	n += 1 + l + sovFlatfees(uint64(l))
	if len(m.OracleAddresses) > 0 {
		for _, s := range m.OracleAddresses {
			l = len(s)
			n += 1 + l + sovFlatfees(uint64(l))
		}
	}
	return n
}

func (m *ConversionFactor) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.DefinitionAmount.Size()
	n += 1 + l + sovFlatfees(uint64(l))
	l = m.ConvertedAmount.Size()
	n += 1 + l + sovFlatfees(uint64(l))
	return n
}

func (m *MsgFee) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.MsgTypeUrl)
	if l > 0 {
		n += 1 + l + sovFlatfees(uint64(l))
	}
	if len(m.Cost) > 0 {
		for _, e := range m.Cost {
			l = e.Size()
			n += 1 + l + sovFlatfees(uint64(l))
		}
	}
	return n
}

func sovFlatfees(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozFlatfees(x uint64) (n int) {
	return sovFlatfees(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Params) 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 ErrIntOverflowFlatfees
			}
			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: Params: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field DefaultCost", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowFlatfees
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthFlatfees
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthFlatfees
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.DefaultCost.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ConversionFactor", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowFlatfees
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthFlatfees
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthFlatfees
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.ConversionFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field OracleAddresses", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowFlatfees
				}
				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 ErrInvalidLengthFlatfees
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthFlatfees
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.OracleAddresses = append(m.OracleAddresses, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipFlatfees(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthFlatfees
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *MsgFee) 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 ErrIntOverflowFlatfees
			}
			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: MsgFee: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MsgFee: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowFlatfees
				}
				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 ErrInvalidLengthFlatfees
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthFlatfees
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.MsgTypeUrl = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Cost", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowFlatfees
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthFlatfees
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthFlatfees
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Cost = append(m.Cost, types.Coin{})
			if err := m.Cost[len(m.Cost)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipFlatfees(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthFlatfees
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

var (
	ErrInvalidLengthFlatfees        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFlatfees          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupFlatfees = fmt.Errorf("proto: unexpected end of group")
)
