diff --git a/api/loan/loan/tx.pulsar.go b/api/loan/loan/tx.pulsar.go index ba63e21..62a2522 100644 --- a/api/loan/loan/tx.pulsar.go +++ b/api/loan/loan/tx.pulsar.go @@ -1904,184 +1904,3756 @@ func (x *fastReflection_MsgRequestLoanResponse) ProtoMethods() *protoiface.Metho } } +var ( + md_MsgApproveLoan protoreflect.MessageDescriptor + fd_MsgApproveLoan_creator protoreflect.FieldDescriptor + fd_MsgApproveLoan_id protoreflect.FieldDescriptor +) + +func init() { + file_loan_loan_tx_proto_init() + md_MsgApproveLoan = File_loan_loan_tx_proto.Messages().ByName("MsgApproveLoan") + fd_MsgApproveLoan_creator = md_MsgApproveLoan.Fields().ByName("creator") + fd_MsgApproveLoan_id = md_MsgApproveLoan.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_MsgApproveLoan)(nil) + +type fastReflection_MsgApproveLoan MsgApproveLoan + +func (x *MsgApproveLoan) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgApproveLoan)(x) +} + +func (x *MsgApproveLoan) slowProtoReflect() protoreflect.Message { + mi := &file_loan_loan_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgApproveLoan_messageType fastReflection_MsgApproveLoan_messageType +var _ protoreflect.MessageType = fastReflection_MsgApproveLoan_messageType{} + +type fastReflection_MsgApproveLoan_messageType struct{} + +func (x fastReflection_MsgApproveLoan_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgApproveLoan)(nil) +} +func (x fastReflection_MsgApproveLoan_messageType) New() protoreflect.Message { + return new(fastReflection_MsgApproveLoan) +} +func (x fastReflection_MsgApproveLoan_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgApproveLoan +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgApproveLoan) Descriptor() protoreflect.MessageDescriptor { + return md_MsgApproveLoan +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgApproveLoan) Type() protoreflect.MessageType { + return _fastReflection_MsgApproveLoan_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgApproveLoan) New() protoreflect.Message { + return new(fastReflection_MsgApproveLoan) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgApproveLoan) Interface() protoreflect.ProtoMessage { + return (*MsgApproveLoan)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgApproveLoan) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgApproveLoan_creator, value) { + return + } + } + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_MsgApproveLoan_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgApproveLoan) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "loan.loan.MsgApproveLoan.creator": + return x.Creator != "" + case "loan.loan.MsgApproveLoan.id": + return x.Id != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgApproveLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgApproveLoan does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgApproveLoan) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "loan.loan.MsgApproveLoan.creator": + x.Creator = "" + case "loan.loan.MsgApproveLoan.id": + x.Id = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgApproveLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgApproveLoan does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgApproveLoan) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "loan.loan.MsgApproveLoan.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + case "loan.loan.MsgApproveLoan.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgApproveLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgApproveLoan does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgApproveLoan) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "loan.loan.MsgApproveLoan.creator": + x.Creator = value.Interface().(string) + case "loan.loan.MsgApproveLoan.id": + x.Id = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgApproveLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgApproveLoan does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgApproveLoan) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "loan.loan.MsgApproveLoan.creator": + panic(fmt.Errorf("field creator of message loan.loan.MsgApproveLoan is not mutable")) + case "loan.loan.MsgApproveLoan.id": + panic(fmt.Errorf("field id of message loan.loan.MsgApproveLoan is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgApproveLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgApproveLoan does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgApproveLoan) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "loan.loan.MsgApproveLoan.creator": + return protoreflect.ValueOfString("") + case "loan.loan.MsgApproveLoan.id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgApproveLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgApproveLoan does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgApproveLoan) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in loan.loan.MsgApproveLoan", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgApproveLoan) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgApproveLoan) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgApproveLoan) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgApproveLoan) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgApproveLoan) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgApproveLoan) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x10 + } + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgApproveLoan) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgApproveLoan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgApproveLoan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgApproveLoanResponse protoreflect.MessageDescriptor +) + +func init() { + file_loan_loan_tx_proto_init() + md_MsgApproveLoanResponse = File_loan_loan_tx_proto.Messages().ByName("MsgApproveLoanResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgApproveLoanResponse)(nil) + +type fastReflection_MsgApproveLoanResponse MsgApproveLoanResponse + +func (x *MsgApproveLoanResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgApproveLoanResponse)(x) +} + +func (x *MsgApproveLoanResponse) slowProtoReflect() protoreflect.Message { + mi := &file_loan_loan_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgApproveLoanResponse_messageType fastReflection_MsgApproveLoanResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgApproveLoanResponse_messageType{} + +type fastReflection_MsgApproveLoanResponse_messageType struct{} + +func (x fastReflection_MsgApproveLoanResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgApproveLoanResponse)(nil) +} +func (x fastReflection_MsgApproveLoanResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgApproveLoanResponse) +} +func (x fastReflection_MsgApproveLoanResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgApproveLoanResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgApproveLoanResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgApproveLoanResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgApproveLoanResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgApproveLoanResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgApproveLoanResponse) New() protoreflect.Message { + return new(fastReflection_MsgApproveLoanResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgApproveLoanResponse) Interface() protoreflect.ProtoMessage { + return (*MsgApproveLoanResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgApproveLoanResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgApproveLoanResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgApproveLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgApproveLoanResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgApproveLoanResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgApproveLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgApproveLoanResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgApproveLoanResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgApproveLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgApproveLoanResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgApproveLoanResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgApproveLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgApproveLoanResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgApproveLoanResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgApproveLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgApproveLoanResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgApproveLoanResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgApproveLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgApproveLoanResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgApproveLoanResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in loan.loan.MsgApproveLoanResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgApproveLoanResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgApproveLoanResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgApproveLoanResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgApproveLoanResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgApproveLoanResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgApproveLoanResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgApproveLoanResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgApproveLoanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgApproveLoanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgCancelLoan protoreflect.MessageDescriptor + fd_MsgCancelLoan_creator protoreflect.FieldDescriptor + fd_MsgCancelLoan_id protoreflect.FieldDescriptor +) + +func init() { + file_loan_loan_tx_proto_init() + md_MsgCancelLoan = File_loan_loan_tx_proto.Messages().ByName("MsgCancelLoan") + fd_MsgCancelLoan_creator = md_MsgCancelLoan.Fields().ByName("creator") + fd_MsgCancelLoan_id = md_MsgCancelLoan.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_MsgCancelLoan)(nil) + +type fastReflection_MsgCancelLoan MsgCancelLoan + +func (x *MsgCancelLoan) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCancelLoan)(x) +} + +func (x *MsgCancelLoan) slowProtoReflect() protoreflect.Message { + mi := &file_loan_loan_tx_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCancelLoan_messageType fastReflection_MsgCancelLoan_messageType +var _ protoreflect.MessageType = fastReflection_MsgCancelLoan_messageType{} + +type fastReflection_MsgCancelLoan_messageType struct{} + +func (x fastReflection_MsgCancelLoan_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCancelLoan)(nil) +} +func (x fastReflection_MsgCancelLoan_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCancelLoan) +} +func (x fastReflection_MsgCancelLoan_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelLoan +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCancelLoan) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelLoan +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgCancelLoan) Type() protoreflect.MessageType { + return _fastReflection_MsgCancelLoan_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCancelLoan) New() protoreflect.Message { + return new(fastReflection_MsgCancelLoan) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCancelLoan) Interface() protoreflect.ProtoMessage { + return (*MsgCancelLoan)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgCancelLoan) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgCancelLoan_creator, value) { + return + } + } + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_MsgCancelLoan_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCancelLoan) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "loan.loan.MsgCancelLoan.creator": + return x.Creator != "" + case "loan.loan.MsgCancelLoan.id": + return x.Id != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgCancelLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgCancelLoan does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCancelLoan) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "loan.loan.MsgCancelLoan.creator": + x.Creator = "" + case "loan.loan.MsgCancelLoan.id": + x.Id = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgCancelLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgCancelLoan does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgCancelLoan) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "loan.loan.MsgCancelLoan.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + case "loan.loan.MsgCancelLoan.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgCancelLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgCancelLoan does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCancelLoan) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "loan.loan.MsgCancelLoan.creator": + x.Creator = value.Interface().(string) + case "loan.loan.MsgCancelLoan.id": + x.Id = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgCancelLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgCancelLoan does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCancelLoan) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "loan.loan.MsgCancelLoan.creator": + panic(fmt.Errorf("field creator of message loan.loan.MsgCancelLoan is not mutable")) + case "loan.loan.MsgCancelLoan.id": + panic(fmt.Errorf("field id of message loan.loan.MsgCancelLoan is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgCancelLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgCancelLoan does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgCancelLoan) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "loan.loan.MsgCancelLoan.creator": + return protoreflect.ValueOfString("") + case "loan.loan.MsgCancelLoan.id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgCancelLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgCancelLoan does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgCancelLoan) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in loan.loan.MsgCancelLoan", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgCancelLoan) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCancelLoan) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgCancelLoan) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgCancelLoan) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCancelLoan) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCancelLoan) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x10 + } + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCancelLoan) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelLoan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelLoan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgCancelLoanResponse protoreflect.MessageDescriptor +) + +func init() { + file_loan_loan_tx_proto_init() + md_MsgCancelLoanResponse = File_loan_loan_tx_proto.Messages().ByName("MsgCancelLoanResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgCancelLoanResponse)(nil) + +type fastReflection_MsgCancelLoanResponse MsgCancelLoanResponse + +func (x *MsgCancelLoanResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCancelLoanResponse)(x) +} + +func (x *MsgCancelLoanResponse) slowProtoReflect() protoreflect.Message { + mi := &file_loan_loan_tx_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCancelLoanResponse_messageType fastReflection_MsgCancelLoanResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCancelLoanResponse_messageType{} + +type fastReflection_MsgCancelLoanResponse_messageType struct{} + +func (x fastReflection_MsgCancelLoanResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCancelLoanResponse)(nil) +} +func (x fastReflection_MsgCancelLoanResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCancelLoanResponse) +} +func (x fastReflection_MsgCancelLoanResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelLoanResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCancelLoanResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelLoanResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgCancelLoanResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCancelLoanResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCancelLoanResponse) New() protoreflect.Message { + return new(fastReflection_MsgCancelLoanResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCancelLoanResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCancelLoanResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgCancelLoanResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCancelLoanResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgCancelLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgCancelLoanResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCancelLoanResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgCancelLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgCancelLoanResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgCancelLoanResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgCancelLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgCancelLoanResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCancelLoanResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgCancelLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgCancelLoanResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCancelLoanResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgCancelLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgCancelLoanResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgCancelLoanResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgCancelLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgCancelLoanResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgCancelLoanResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in loan.loan.MsgCancelLoanResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgCancelLoanResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCancelLoanResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgCancelLoanResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgCancelLoanResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCancelLoanResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCancelLoanResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCancelLoanResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelLoanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelLoanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgRepayLoan protoreflect.MessageDescriptor + fd_MsgRepayLoan_creator protoreflect.FieldDescriptor + fd_MsgRepayLoan_id protoreflect.FieldDescriptor +) + +func init() { + file_loan_loan_tx_proto_init() + md_MsgRepayLoan = File_loan_loan_tx_proto.Messages().ByName("MsgRepayLoan") + fd_MsgRepayLoan_creator = md_MsgRepayLoan.Fields().ByName("creator") + fd_MsgRepayLoan_id = md_MsgRepayLoan.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_MsgRepayLoan)(nil) + +type fastReflection_MsgRepayLoan MsgRepayLoan + +func (x *MsgRepayLoan) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRepayLoan)(x) +} + +func (x *MsgRepayLoan) slowProtoReflect() protoreflect.Message { + mi := &file_loan_loan_tx_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRepayLoan_messageType fastReflection_MsgRepayLoan_messageType +var _ protoreflect.MessageType = fastReflection_MsgRepayLoan_messageType{} + +type fastReflection_MsgRepayLoan_messageType struct{} + +func (x fastReflection_MsgRepayLoan_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRepayLoan)(nil) +} +func (x fastReflection_MsgRepayLoan_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRepayLoan) +} +func (x fastReflection_MsgRepayLoan_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRepayLoan +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRepayLoan) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRepayLoan +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRepayLoan) Type() protoreflect.MessageType { + return _fastReflection_MsgRepayLoan_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRepayLoan) New() protoreflect.Message { + return new(fastReflection_MsgRepayLoan) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRepayLoan) Interface() protoreflect.ProtoMessage { + return (*MsgRepayLoan)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRepayLoan) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgRepayLoan_creator, value) { + return + } + } + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_MsgRepayLoan_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRepayLoan) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "loan.loan.MsgRepayLoan.creator": + return x.Creator != "" + case "loan.loan.MsgRepayLoan.id": + return x.Id != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgRepayLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgRepayLoan does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRepayLoan) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "loan.loan.MsgRepayLoan.creator": + x.Creator = "" + case "loan.loan.MsgRepayLoan.id": + x.Id = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgRepayLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgRepayLoan does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRepayLoan) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "loan.loan.MsgRepayLoan.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + case "loan.loan.MsgRepayLoan.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgRepayLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgRepayLoan does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRepayLoan) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "loan.loan.MsgRepayLoan.creator": + x.Creator = value.Interface().(string) + case "loan.loan.MsgRepayLoan.id": + x.Id = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgRepayLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgRepayLoan does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRepayLoan) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "loan.loan.MsgRepayLoan.creator": + panic(fmt.Errorf("field creator of message loan.loan.MsgRepayLoan is not mutable")) + case "loan.loan.MsgRepayLoan.id": + panic(fmt.Errorf("field id of message loan.loan.MsgRepayLoan is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgRepayLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgRepayLoan does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRepayLoan) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "loan.loan.MsgRepayLoan.creator": + return protoreflect.ValueOfString("") + case "loan.loan.MsgRepayLoan.id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgRepayLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgRepayLoan does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRepayLoan) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in loan.loan.MsgRepayLoan", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRepayLoan) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRepayLoan) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRepayLoan) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRepayLoan) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRepayLoan) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRepayLoan) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x10 + } + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRepayLoan) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRepayLoan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRepayLoan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgRepayLoanResponse protoreflect.MessageDescriptor +) + +func init() { + file_loan_loan_tx_proto_init() + md_MsgRepayLoanResponse = File_loan_loan_tx_proto.Messages().ByName("MsgRepayLoanResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgRepayLoanResponse)(nil) + +type fastReflection_MsgRepayLoanResponse MsgRepayLoanResponse + +func (x *MsgRepayLoanResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRepayLoanResponse)(x) +} + +func (x *MsgRepayLoanResponse) slowProtoReflect() protoreflect.Message { + mi := &file_loan_loan_tx_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRepayLoanResponse_messageType fastReflection_MsgRepayLoanResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRepayLoanResponse_messageType{} + +type fastReflection_MsgRepayLoanResponse_messageType struct{} + +func (x fastReflection_MsgRepayLoanResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRepayLoanResponse)(nil) +} +func (x fastReflection_MsgRepayLoanResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRepayLoanResponse) +} +func (x fastReflection_MsgRepayLoanResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRepayLoanResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRepayLoanResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRepayLoanResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRepayLoanResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRepayLoanResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRepayLoanResponse) New() protoreflect.Message { + return new(fastReflection_MsgRepayLoanResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRepayLoanResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRepayLoanResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRepayLoanResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRepayLoanResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgRepayLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgRepayLoanResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRepayLoanResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgRepayLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgRepayLoanResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRepayLoanResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgRepayLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgRepayLoanResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRepayLoanResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgRepayLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgRepayLoanResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRepayLoanResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgRepayLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgRepayLoanResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRepayLoanResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgRepayLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgRepayLoanResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRepayLoanResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in loan.loan.MsgRepayLoanResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRepayLoanResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRepayLoanResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRepayLoanResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRepayLoanResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRepayLoanResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRepayLoanResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRepayLoanResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRepayLoanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRepayLoanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgLiquidateLoan protoreflect.MessageDescriptor + fd_MsgLiquidateLoan_creator protoreflect.FieldDescriptor + fd_MsgLiquidateLoan_id protoreflect.FieldDescriptor +) + +func init() { + file_loan_loan_tx_proto_init() + md_MsgLiquidateLoan = File_loan_loan_tx_proto.Messages().ByName("MsgLiquidateLoan") + fd_MsgLiquidateLoan_creator = md_MsgLiquidateLoan.Fields().ByName("creator") + fd_MsgLiquidateLoan_id = md_MsgLiquidateLoan.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_MsgLiquidateLoan)(nil) + +type fastReflection_MsgLiquidateLoan MsgLiquidateLoan + +func (x *MsgLiquidateLoan) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgLiquidateLoan)(x) +} + +func (x *MsgLiquidateLoan) slowProtoReflect() protoreflect.Message { + mi := &file_loan_loan_tx_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgLiquidateLoan_messageType fastReflection_MsgLiquidateLoan_messageType +var _ protoreflect.MessageType = fastReflection_MsgLiquidateLoan_messageType{} + +type fastReflection_MsgLiquidateLoan_messageType struct{} + +func (x fastReflection_MsgLiquidateLoan_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgLiquidateLoan)(nil) +} +func (x fastReflection_MsgLiquidateLoan_messageType) New() protoreflect.Message { + return new(fastReflection_MsgLiquidateLoan) +} +func (x fastReflection_MsgLiquidateLoan_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLiquidateLoan +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgLiquidateLoan) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLiquidateLoan +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgLiquidateLoan) Type() protoreflect.MessageType { + return _fastReflection_MsgLiquidateLoan_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgLiquidateLoan) New() protoreflect.Message { + return new(fastReflection_MsgLiquidateLoan) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgLiquidateLoan) Interface() protoreflect.ProtoMessage { + return (*MsgLiquidateLoan)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgLiquidateLoan) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgLiquidateLoan_creator, value) { + return + } + } + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_MsgLiquidateLoan_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgLiquidateLoan) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "loan.loan.MsgLiquidateLoan.creator": + return x.Creator != "" + case "loan.loan.MsgLiquidateLoan.id": + return x.Id != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgLiquidateLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgLiquidateLoan does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLiquidateLoan) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "loan.loan.MsgLiquidateLoan.creator": + x.Creator = "" + case "loan.loan.MsgLiquidateLoan.id": + x.Id = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgLiquidateLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgLiquidateLoan does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgLiquidateLoan) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "loan.loan.MsgLiquidateLoan.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + case "loan.loan.MsgLiquidateLoan.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgLiquidateLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgLiquidateLoan does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLiquidateLoan) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "loan.loan.MsgLiquidateLoan.creator": + x.Creator = value.Interface().(string) + case "loan.loan.MsgLiquidateLoan.id": + x.Id = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgLiquidateLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgLiquidateLoan does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLiquidateLoan) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "loan.loan.MsgLiquidateLoan.creator": + panic(fmt.Errorf("field creator of message loan.loan.MsgLiquidateLoan is not mutable")) + case "loan.loan.MsgLiquidateLoan.id": + panic(fmt.Errorf("field id of message loan.loan.MsgLiquidateLoan is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgLiquidateLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgLiquidateLoan does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgLiquidateLoan) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "loan.loan.MsgLiquidateLoan.creator": + return protoreflect.ValueOfString("") + case "loan.loan.MsgLiquidateLoan.id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgLiquidateLoan")) + } + panic(fmt.Errorf("message loan.loan.MsgLiquidateLoan does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgLiquidateLoan) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in loan.loan.MsgLiquidateLoan", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgLiquidateLoan) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLiquidateLoan) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgLiquidateLoan) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgLiquidateLoan) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgLiquidateLoan) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgLiquidateLoan) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x10 + } + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgLiquidateLoan) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLiquidateLoan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLiquidateLoan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgLiquidateLoanResponse protoreflect.MessageDescriptor +) + +func init() { + file_loan_loan_tx_proto_init() + md_MsgLiquidateLoanResponse = File_loan_loan_tx_proto.Messages().ByName("MsgLiquidateLoanResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgLiquidateLoanResponse)(nil) + +type fastReflection_MsgLiquidateLoanResponse MsgLiquidateLoanResponse + +func (x *MsgLiquidateLoanResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgLiquidateLoanResponse)(x) +} + +func (x *MsgLiquidateLoanResponse) slowProtoReflect() protoreflect.Message { + mi := &file_loan_loan_tx_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgLiquidateLoanResponse_messageType fastReflection_MsgLiquidateLoanResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgLiquidateLoanResponse_messageType{} + +type fastReflection_MsgLiquidateLoanResponse_messageType struct{} + +func (x fastReflection_MsgLiquidateLoanResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgLiquidateLoanResponse)(nil) +} +func (x fastReflection_MsgLiquidateLoanResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgLiquidateLoanResponse) +} +func (x fastReflection_MsgLiquidateLoanResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLiquidateLoanResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgLiquidateLoanResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLiquidateLoanResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgLiquidateLoanResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgLiquidateLoanResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgLiquidateLoanResponse) New() protoreflect.Message { + return new(fastReflection_MsgLiquidateLoanResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgLiquidateLoanResponse) Interface() protoreflect.ProtoMessage { + return (*MsgLiquidateLoanResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgLiquidateLoanResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgLiquidateLoanResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgLiquidateLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgLiquidateLoanResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLiquidateLoanResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgLiquidateLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgLiquidateLoanResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgLiquidateLoanResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgLiquidateLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgLiquidateLoanResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLiquidateLoanResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgLiquidateLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgLiquidateLoanResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLiquidateLoanResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgLiquidateLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgLiquidateLoanResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgLiquidateLoanResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: loan.loan.MsgLiquidateLoanResponse")) + } + panic(fmt.Errorf("message loan.loan.MsgLiquidateLoanResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgLiquidateLoanResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in loan.loan.MsgLiquidateLoanResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgLiquidateLoanResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgLiquidateLoanResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgLiquidateLoanResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgLiquidateLoanResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgLiquidateLoanResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgLiquidateLoanResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgLiquidateLoanResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLiquidateLoanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLiquidateLoanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: loan/loan/tx.proto -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // NOTE: All parameters must be supplied. + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} + if protoimpl.UnsafeEnabled { + mi := &file_loan_loan_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParams) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return file_loan_loan_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgUpdateParams) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpdateParams) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_loan_loan_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_loan_loan_tx_proto_rawDescGZIP(), []int{1} +} + +type MsgRequestLoan struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + Fee string `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee,omitempty"` + Collateral string `protobuf:"bytes,4,opt,name=collateral,proto3" json:"collateral,omitempty"` + Deadline string `protobuf:"bytes,5,opt,name=deadline,proto3" json:"deadline,omitempty"` +} + +func (x *MsgRequestLoan) Reset() { + *x = MsgRequestLoan{} + if protoimpl.UnsafeEnabled { + mi := &file_loan_loan_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRequestLoan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRequestLoan) ProtoMessage() {} + +// Deprecated: Use MsgRequestLoan.ProtoReflect.Descriptor instead. +func (*MsgRequestLoan) Descriptor() ([]byte, []int) { + return file_loan_loan_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgRequestLoan) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgRequestLoan) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *MsgRequestLoan) GetFee() string { + if x != nil { + return x.Fee + } + return "" +} + +func (x *MsgRequestLoan) GetCollateral() string { + if x != nil { + return x.Collateral + } + return "" +} + +func (x *MsgRequestLoan) GetDeadline() string { + if x != nil { + return x.Deadline + } + return "" +} + +type MsgRequestLoanResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} -// MsgUpdateParams is the Msg/UpdateParams request type. -type MsgUpdateParams struct { +func (x *MsgRequestLoanResponse) Reset() { + *x = MsgRequestLoanResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_loan_loan_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRequestLoanResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRequestLoanResponse) ProtoMessage() {} + +// Deprecated: Use MsgRequestLoanResponse.ProtoReflect.Descriptor instead. +func (*MsgRequestLoanResponse) Descriptor() ([]byte, []int) { + return file_loan_loan_tx_proto_rawDescGZIP(), []int{3} +} + +type MsgApproveLoan struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // NOTE: All parameters must be supplied. - Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` } -func (x *MsgUpdateParams) Reset() { - *x = MsgUpdateParams{} +func (x *MsgApproveLoan) Reset() { + *x = MsgApproveLoan{} if protoimpl.UnsafeEnabled { - mi := &file_loan_loan_tx_proto_msgTypes[0] + mi := &file_loan_loan_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgUpdateParams) String() string { +func (x *MsgApproveLoan) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgApproveLoan) ProtoMessage() {} -// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_loan_loan_tx_proto_rawDescGZIP(), []int{0} +// Deprecated: Use MsgApproveLoan.ProtoReflect.Descriptor instead. +func (*MsgApproveLoan) Descriptor() ([]byte, []int) { + return file_loan_loan_tx_proto_rawDescGZIP(), []int{4} } -func (x *MsgUpdateParams) GetAuthority() string { +func (x *MsgApproveLoan) GetCreator() string { if x != nil { - return x.Authority + return x.Creator } return "" } -func (x *MsgUpdateParams) GetParams() *Params { +func (x *MsgApproveLoan) GetId() uint64 { if x != nil { - return x.Params + return x.Id } - return nil + return 0 } -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -type MsgUpdateParamsResponse struct { +type MsgApproveLoanResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *MsgUpdateParamsResponse) Reset() { - *x = MsgUpdateParamsResponse{} +func (x *MsgApproveLoanResponse) Reset() { + *x = MsgApproveLoanResponse{} if protoimpl.UnsafeEnabled { - mi := &file_loan_loan_tx_proto_msgTypes[1] + mi := &file_loan_loan_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgUpdateParamsResponse) String() string { +func (x *MsgApproveLoanResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgApproveLoanResponse) ProtoMessage() {} -// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_loan_loan_tx_proto_rawDescGZIP(), []int{1} +// Deprecated: Use MsgApproveLoanResponse.ProtoReflect.Descriptor instead. +func (*MsgApproveLoanResponse) Descriptor() ([]byte, []int) { + return file_loan_loan_tx_proto_rawDescGZIP(), []int{5} } -type MsgRequestLoan struct { +type MsgCancelLoan struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` - Fee string `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee,omitempty"` - Collateral string `protobuf:"bytes,4,opt,name=collateral,proto3" json:"collateral,omitempty"` - Deadline string `protobuf:"bytes,5,opt,name=deadline,proto3" json:"deadline,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` } -func (x *MsgRequestLoan) Reset() { - *x = MsgRequestLoan{} +func (x *MsgCancelLoan) Reset() { + *x = MsgCancelLoan{} if protoimpl.UnsafeEnabled { - mi := &file_loan_loan_tx_proto_msgTypes[2] + mi := &file_loan_loan_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgRequestLoan) String() string { +func (x *MsgCancelLoan) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgRequestLoan) ProtoMessage() {} +func (*MsgCancelLoan) ProtoMessage() {} -// Deprecated: Use MsgRequestLoan.ProtoReflect.Descriptor instead. -func (*MsgRequestLoan) Descriptor() ([]byte, []int) { - return file_loan_loan_tx_proto_rawDescGZIP(), []int{2} +// Deprecated: Use MsgCancelLoan.ProtoReflect.Descriptor instead. +func (*MsgCancelLoan) Descriptor() ([]byte, []int) { + return file_loan_loan_tx_proto_rawDescGZIP(), []int{6} } -func (x *MsgRequestLoan) GetCreator() string { +func (x *MsgCancelLoan) GetCreator() string { if x != nil { return x.Creator } return "" } -func (x *MsgRequestLoan) GetAmount() string { +func (x *MsgCancelLoan) GetId() uint64 { if x != nil { - return x.Amount + return x.Id } - return "" + return 0 } -func (x *MsgRequestLoan) GetFee() string { +type MsgCancelLoanResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgCancelLoanResponse) Reset() { + *x = MsgCancelLoanResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_loan_loan_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCancelLoanResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCancelLoanResponse) ProtoMessage() {} + +// Deprecated: Use MsgCancelLoanResponse.ProtoReflect.Descriptor instead. +func (*MsgCancelLoanResponse) Descriptor() ([]byte, []int) { + return file_loan_loan_tx_proto_rawDescGZIP(), []int{7} +} + +type MsgRepayLoan struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *MsgRepayLoan) Reset() { + *x = MsgRepayLoan{} + if protoimpl.UnsafeEnabled { + mi := &file_loan_loan_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRepayLoan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRepayLoan) ProtoMessage() {} + +// Deprecated: Use MsgRepayLoan.ProtoReflect.Descriptor instead. +func (*MsgRepayLoan) Descriptor() ([]byte, []int) { + return file_loan_loan_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *MsgRepayLoan) GetCreator() string { if x != nil { - return x.Fee + return x.Creator } return "" } -func (x *MsgRequestLoan) GetCollateral() string { +func (x *MsgRepayLoan) GetId() uint64 { if x != nil { - return x.Collateral + return x.Id } - return "" + return 0 } -func (x *MsgRequestLoan) GetDeadline() string { +type MsgRepayLoanResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgRepayLoanResponse) Reset() { + *x = MsgRepayLoanResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_loan_loan_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRepayLoanResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRepayLoanResponse) ProtoMessage() {} + +// Deprecated: Use MsgRepayLoanResponse.ProtoReflect.Descriptor instead. +func (*MsgRepayLoanResponse) Descriptor() ([]byte, []int) { + return file_loan_loan_tx_proto_rawDescGZIP(), []int{9} +} + +type MsgLiquidateLoan struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *MsgLiquidateLoan) Reset() { + *x = MsgLiquidateLoan{} + if protoimpl.UnsafeEnabled { + mi := &file_loan_loan_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgLiquidateLoan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgLiquidateLoan) ProtoMessage() {} + +// Deprecated: Use MsgLiquidateLoan.ProtoReflect.Descriptor instead. +func (*MsgLiquidateLoan) Descriptor() ([]byte, []int) { + return file_loan_loan_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgLiquidateLoan) GetCreator() string { if x != nil { - return x.Deadline + return x.Creator } return "" } -type MsgRequestLoanResponse struct { +func (x *MsgLiquidateLoan) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +type MsgLiquidateLoanResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *MsgRequestLoanResponse) Reset() { - *x = MsgRequestLoanResponse{} +func (x *MsgLiquidateLoanResponse) Reset() { + *x = MsgLiquidateLoanResponse{} if protoimpl.UnsafeEnabled { - mi := &file_loan_loan_tx_proto_msgTypes[3] + mi := &file_loan_loan_tx_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgRequestLoanResponse) String() string { +func (x *MsgLiquidateLoanResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgRequestLoanResponse) ProtoMessage() {} +func (*MsgLiquidateLoanResponse) ProtoMessage() {} -// Deprecated: Use MsgRequestLoanResponse.ProtoReflect.Descriptor instead. -func (*MsgRequestLoanResponse) Descriptor() ([]byte, []int) { - return file_loan_loan_tx_proto_rawDescGZIP(), []int{3} +// Deprecated: Use MsgLiquidateLoanResponse.ProtoReflect.Descriptor instead. +func (*MsgLiquidateLoanResponse) Descriptor() ([]byte, []int) { + return file_loan_loan_tx_proto_rawDescGZIP(), []int{11} } var File_loan_loan_tx_proto protoreflect.FileDescriptor @@ -2120,26 +5692,70 @@ var file_loan_loan_tx_proto_rawDesc = []byte{ 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa9, 0x01, 0x0a, - 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4e, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, - 0x6f, 0x61, 0x6e, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, - 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x6e, 0x1a, 0x21, - 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x79, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, - 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x6f, 0x61, 0x6e, 0x2f, 0x6c, 0x6f, 0x61, 0x6e, - 0xa2, 0x02, 0x03, 0x4c, 0x4c, 0x58, 0xaa, 0x02, 0x09, 0x4c, 0x6f, 0x61, 0x6e, 0x2e, 0x4c, 0x6f, - 0x61, 0x6e, 0xca, 0x02, 0x09, 0x4c, 0x6f, 0x61, 0x6e, 0x5c, 0x4c, 0x6f, 0x61, 0x6e, 0xe2, 0x02, - 0x15, 0x4c, 0x6f, 0x61, 0x6e, 0x5c, 0x4c, 0x6f, 0x61, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4c, 0x6f, 0x61, 0x6e, 0x3a, 0x3a, 0x4c, - 0x6f, 0x61, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x0a, 0x0e, + 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x4c, 0x6f, 0x61, 0x6e, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, + 0x72, 0x6f, 0x76, 0x65, 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x47, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, 0x61, + 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, + 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x46, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, 0x79, 0x4c, 0x6f, + 0x61, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x0c, 0x82, 0xe7, + 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x16, 0x0a, 0x14, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x70, 0x61, 0x79, 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x4a, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x4c, 0x6f, 0x61, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, + 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1a, + 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x6f, + 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xda, 0x03, 0x0a, 0x03, 0x4d, + 0x73, 0x67, 0x12, 0x4e, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x22, + 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x61, + 0x6e, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x6e, 0x1a, 0x21, 0x2e, 0x6c, + 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4b, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x4c, 0x6f, 0x61, 0x6e, 0x12, 0x19, + 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x65, 0x4c, 0x6f, 0x61, 0x6e, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, + 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0a, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, 0x61, 0x6e, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x61, + 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x4c, 0x6f, 0x61, 0x6e, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x52, 0x65, 0x70, 0x61, 0x79, 0x4c, + 0x6f, 0x61, 0x6e, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, + 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, 0x79, 0x4c, 0x6f, 0x61, 0x6e, 0x1a, 0x1f, 0x2e, 0x6c, + 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, + 0x79, 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, + 0x0d, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x61, 0x6e, 0x12, 0x1b, + 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x61, 0x6e, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, + 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x79, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, + 0x6f, 0x61, 0x6e, 0x2e, 0x6c, 0x6f, 0x61, 0x6e, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x6f, 0x61, 0x6e, 0x2f, 0x6c, 0x6f, 0x61, 0x6e, 0xa2, + 0x02, 0x03, 0x4c, 0x4c, 0x58, 0xaa, 0x02, 0x09, 0x4c, 0x6f, 0x61, 0x6e, 0x2e, 0x4c, 0x6f, 0x61, + 0x6e, 0xca, 0x02, 0x09, 0x4c, 0x6f, 0x61, 0x6e, 0x5c, 0x4c, 0x6f, 0x61, 0x6e, 0xe2, 0x02, 0x15, + 0x4c, 0x6f, 0x61, 0x6e, 0x5c, 0x4c, 0x6f, 0x61, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4c, 0x6f, 0x61, 0x6e, 0x3a, 0x3a, 0x4c, 0x6f, + 0x61, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2154,25 +5770,41 @@ func file_loan_loan_tx_proto_rawDescGZIP() []byte { return file_loan_loan_tx_proto_rawDescData } -var file_loan_loan_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_loan_loan_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_loan_loan_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: loan.loan.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: loan.loan.MsgUpdateParamsResponse - (*MsgRequestLoan)(nil), // 2: loan.loan.MsgRequestLoan - (*MsgRequestLoanResponse)(nil), // 3: loan.loan.MsgRequestLoanResponse - (*Params)(nil), // 4: loan.loan.Params + (*MsgUpdateParams)(nil), // 0: loan.loan.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: loan.loan.MsgUpdateParamsResponse + (*MsgRequestLoan)(nil), // 2: loan.loan.MsgRequestLoan + (*MsgRequestLoanResponse)(nil), // 3: loan.loan.MsgRequestLoanResponse + (*MsgApproveLoan)(nil), // 4: loan.loan.MsgApproveLoan + (*MsgApproveLoanResponse)(nil), // 5: loan.loan.MsgApproveLoanResponse + (*MsgCancelLoan)(nil), // 6: loan.loan.MsgCancelLoan + (*MsgCancelLoanResponse)(nil), // 7: loan.loan.MsgCancelLoanResponse + (*MsgRepayLoan)(nil), // 8: loan.loan.MsgRepayLoan + (*MsgRepayLoanResponse)(nil), // 9: loan.loan.MsgRepayLoanResponse + (*MsgLiquidateLoan)(nil), // 10: loan.loan.MsgLiquidateLoan + (*MsgLiquidateLoanResponse)(nil), // 11: loan.loan.MsgLiquidateLoanResponse + (*Params)(nil), // 12: loan.loan.Params } var file_loan_loan_tx_proto_depIdxs = []int32{ - 4, // 0: loan.loan.MsgUpdateParams.params:type_name -> loan.loan.Params - 0, // 1: loan.loan.Msg.UpdateParams:input_type -> loan.loan.MsgUpdateParams - 2, // 2: loan.loan.Msg.RequestLoan:input_type -> loan.loan.MsgRequestLoan - 1, // 3: loan.loan.Msg.UpdateParams:output_type -> loan.loan.MsgUpdateParamsResponse - 3, // 4: loan.loan.Msg.RequestLoan:output_type -> loan.loan.MsgRequestLoanResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 12, // 0: loan.loan.MsgUpdateParams.params:type_name -> loan.loan.Params + 0, // 1: loan.loan.Msg.UpdateParams:input_type -> loan.loan.MsgUpdateParams + 2, // 2: loan.loan.Msg.RequestLoan:input_type -> loan.loan.MsgRequestLoan + 4, // 3: loan.loan.Msg.ApproveLoan:input_type -> loan.loan.MsgApproveLoan + 6, // 4: loan.loan.Msg.CancelLoan:input_type -> loan.loan.MsgCancelLoan + 8, // 5: loan.loan.Msg.RepayLoan:input_type -> loan.loan.MsgRepayLoan + 10, // 6: loan.loan.Msg.LiquidateLoan:input_type -> loan.loan.MsgLiquidateLoan + 1, // 7: loan.loan.Msg.UpdateParams:output_type -> loan.loan.MsgUpdateParamsResponse + 3, // 8: loan.loan.Msg.RequestLoan:output_type -> loan.loan.MsgRequestLoanResponse + 5, // 9: loan.loan.Msg.ApproveLoan:output_type -> loan.loan.MsgApproveLoanResponse + 7, // 10: loan.loan.Msg.CancelLoan:output_type -> loan.loan.MsgCancelLoanResponse + 9, // 11: loan.loan.Msg.RepayLoan:output_type -> loan.loan.MsgRepayLoanResponse + 11, // 12: loan.loan.Msg.LiquidateLoan:output_type -> loan.loan.MsgLiquidateLoanResponse + 7, // [7:13] is the sub-list for method output_type + 1, // [1:7] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_loan_loan_tx_proto_init() } @@ -2230,6 +5862,102 @@ func file_loan_loan_tx_proto_init() { return nil } } + file_loan_loan_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgApproveLoan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loan_loan_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgApproveLoanResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loan_loan_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCancelLoan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loan_loan_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCancelLoanResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loan_loan_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRepayLoan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loan_loan_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRepayLoanResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loan_loan_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgLiquidateLoan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loan_loan_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgLiquidateLoanResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2237,7 +5965,7 @@ func file_loan_loan_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_loan_loan_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/api/loan/loan/tx_grpc.pb.go b/api/loan/loan/tx_grpc.pb.go index 6f4dbc2..10a0418 100644 --- a/api/loan/loan/tx_grpc.pb.go +++ b/api/loan/loan/tx_grpc.pb.go @@ -20,8 +20,12 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_UpdateParams_FullMethodName = "/loan.loan.Msg/UpdateParams" - Msg_RequestLoan_FullMethodName = "/loan.loan.Msg/RequestLoan" + Msg_UpdateParams_FullMethodName = "/loan.loan.Msg/UpdateParams" + Msg_RequestLoan_FullMethodName = "/loan.loan.Msg/RequestLoan" + Msg_ApproveLoan_FullMethodName = "/loan.loan.Msg/ApproveLoan" + Msg_CancelLoan_FullMethodName = "/loan.loan.Msg/CancelLoan" + Msg_RepayLoan_FullMethodName = "/loan.loan.Msg/RepayLoan" + Msg_LiquidateLoan_FullMethodName = "/loan.loan.Msg/LiquidateLoan" ) // MsgClient is the client API for Msg service. @@ -32,6 +36,10 @@ type MsgClient interface { // parameters. The authority defaults to the x/gov module account. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) RequestLoan(ctx context.Context, in *MsgRequestLoan, opts ...grpc.CallOption) (*MsgRequestLoanResponse, error) + ApproveLoan(ctx context.Context, in *MsgApproveLoan, opts ...grpc.CallOption) (*MsgApproveLoanResponse, error) + CancelLoan(ctx context.Context, in *MsgCancelLoan, opts ...grpc.CallOption) (*MsgCancelLoanResponse, error) + RepayLoan(ctx context.Context, in *MsgRepayLoan, opts ...grpc.CallOption) (*MsgRepayLoanResponse, error) + LiquidateLoan(ctx context.Context, in *MsgLiquidateLoan, opts ...grpc.CallOption) (*MsgLiquidateLoanResponse, error) } type msgClient struct { @@ -60,6 +68,42 @@ func (c *msgClient) RequestLoan(ctx context.Context, in *MsgRequestLoan, opts .. return out, nil } +func (c *msgClient) ApproveLoan(ctx context.Context, in *MsgApproveLoan, opts ...grpc.CallOption) (*MsgApproveLoanResponse, error) { + out := new(MsgApproveLoanResponse) + err := c.cc.Invoke(ctx, Msg_ApproveLoan_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CancelLoan(ctx context.Context, in *MsgCancelLoan, opts ...grpc.CallOption) (*MsgCancelLoanResponse, error) { + out := new(MsgCancelLoanResponse) + err := c.cc.Invoke(ctx, Msg_CancelLoan_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RepayLoan(ctx context.Context, in *MsgRepayLoan, opts ...grpc.CallOption) (*MsgRepayLoanResponse, error) { + out := new(MsgRepayLoanResponse) + err := c.cc.Invoke(ctx, Msg_RepayLoan_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) LiquidateLoan(ctx context.Context, in *MsgLiquidateLoan, opts ...grpc.CallOption) (*MsgLiquidateLoanResponse, error) { + out := new(MsgLiquidateLoanResponse) + err := c.cc.Invoke(ctx, Msg_LiquidateLoan_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -68,6 +112,10 @@ type MsgServer interface { // parameters. The authority defaults to the x/gov module account. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) RequestLoan(context.Context, *MsgRequestLoan) (*MsgRequestLoanResponse, error) + ApproveLoan(context.Context, *MsgApproveLoan) (*MsgApproveLoanResponse, error) + CancelLoan(context.Context, *MsgCancelLoan) (*MsgCancelLoanResponse, error) + RepayLoan(context.Context, *MsgRepayLoan) (*MsgRepayLoanResponse, error) + LiquidateLoan(context.Context, *MsgLiquidateLoan) (*MsgLiquidateLoanResponse, error) mustEmbedUnimplementedMsgServer() } @@ -81,6 +129,18 @@ func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (* func (UnimplementedMsgServer) RequestLoan(context.Context, *MsgRequestLoan) (*MsgRequestLoanResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RequestLoan not implemented") } +func (UnimplementedMsgServer) ApproveLoan(context.Context, *MsgApproveLoan) (*MsgApproveLoanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ApproveLoan not implemented") +} +func (UnimplementedMsgServer) CancelLoan(context.Context, *MsgCancelLoan) (*MsgCancelLoanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelLoan not implemented") +} +func (UnimplementedMsgServer) RepayLoan(context.Context, *MsgRepayLoan) (*MsgRepayLoanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RepayLoan not implemented") +} +func (UnimplementedMsgServer) LiquidateLoan(context.Context, *MsgLiquidateLoan) (*MsgLiquidateLoanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LiquidateLoan not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -130,6 +190,78 @@ func _Msg_RequestLoan_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Msg_ApproveLoan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgApproveLoan) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ApproveLoan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_ApproveLoan_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ApproveLoan(ctx, req.(*MsgApproveLoan)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CancelLoan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelLoan) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CancelLoan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CancelLoan_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelLoan(ctx, req.(*MsgCancelLoan)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RepayLoan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRepayLoan) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RepayLoan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_RepayLoan_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RepayLoan(ctx, req.(*MsgRepayLoan)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_LiquidateLoan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgLiquidateLoan) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).LiquidateLoan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_LiquidateLoan_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).LiquidateLoan(ctx, req.(*MsgLiquidateLoan)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -145,6 +277,22 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "RequestLoan", Handler: _Msg_RequestLoan_Handler, }, + { + MethodName: "ApproveLoan", + Handler: _Msg_ApproveLoan_Handler, + }, + { + MethodName: "CancelLoan", + Handler: _Msg_CancelLoan_Handler, + }, + { + MethodName: "RepayLoan", + Handler: _Msg_RepayLoan_Handler, + }, + { + MethodName: "LiquidateLoan", + Handler: _Msg_LiquidateLoan_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "loan/loan/tx.proto", diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 16201ff..de4545c 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -16447,6 +16447,166 @@ paths: additionalProperties: {} tags: - Query + /loan.loan.Msg/ApproveLoan: + post: + operationId: LoanLoanMsg_ApproveLoan + responses: + '200': + description: A successful response. + schema: + type: object + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: body + in: body + required: true + schema: + type: object + properties: + creator: + type: string + id: + type: string + format: uint64 + tags: + - Msg + /loan.loan.Msg/CancelLoan: + post: + operationId: LoanLoanMsg_CancelLoan + responses: + '200': + description: A successful response. + schema: + type: object + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: body + in: body + required: true + schema: + type: object + properties: + creator: + type: string + id: + type: string + format: uint64 + tags: + - Msg + /loan.loan.Msg/LiquidateLoan: + post: + operationId: LoanLoanMsg_LiquidateLoan + responses: + '200': + description: A successful response. + schema: + type: object + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: body + in: body + required: true + schema: + type: object + properties: + creator: + type: string + id: + type: string + format: uint64 + tags: + - Msg + /loan.loan.Msg/RepayLoan: + post: + operationId: LoanLoanMsg_RepayLoan + responses: + '200': + description: A successful response. + schema: + type: object + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: body + in: body + required: true + schema: + type: object + properties: + creator: + type: string + id: + type: string + format: uint64 + tags: + - Msg /loan.loan.Msg/RequestLoan: post: operationId: LoanLoanMsg_RequestLoan @@ -23378,6 +23538,46 @@ definitions: description: params holds all the parameters of this module. type: object description: QueryParamsResponse is response type for the Query/Params RPC method. + loan.loan.MsgApproveLoan: + type: object + properties: + creator: + type: string + id: + type: string + format: uint64 + loan.loan.MsgApproveLoanResponse: + type: object + loan.loan.MsgCancelLoan: + type: object + properties: + creator: + type: string + id: + type: string + format: uint64 + loan.loan.MsgCancelLoanResponse: + type: object + loan.loan.MsgLiquidateLoan: + type: object + properties: + creator: + type: string + id: + type: string + format: uint64 + loan.loan.MsgLiquidateLoanResponse: + type: object + loan.loan.MsgRepayLoan: + type: object + properties: + creator: + type: string + id: + type: string + format: uint64 + loan.loan.MsgRepayLoanResponse: + type: object loan.loan.MsgRequestLoan: type: object properties: diff --git a/proto/loan/loan/tx.proto b/proto/loan/loan/tx.proto index 625c838..7cc3568 100644 --- a/proto/loan/loan/tx.proto +++ b/proto/loan/loan/tx.proto @@ -16,8 +16,12 @@ service Msg { // UpdateParams defines a (governance) operation for updating the module // parameters. The authority defaults to the x/gov module account. - rpc UpdateParams (MsgUpdateParams) returns (MsgUpdateParamsResponse); - rpc RequestLoan (MsgRequestLoan ) returns (MsgRequestLoanResponse ); + rpc UpdateParams (MsgUpdateParams ) returns (MsgUpdateParamsResponse ); + rpc RequestLoan (MsgRequestLoan ) returns (MsgRequestLoanResponse ); + rpc ApproveLoan (MsgApproveLoan ) returns (MsgApproveLoanResponse ); + rpc CancelLoan (MsgCancelLoan ) returns (MsgCancelLoanResponse ); + rpc RepayLoan (MsgRepayLoan ) returns (MsgRepayLoanResponse ); + rpc LiquidateLoan (MsgLiquidateLoan) returns (MsgLiquidateLoanResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { @@ -48,3 +52,35 @@ message MsgRequestLoan { message MsgRequestLoanResponse {} +message MsgApproveLoan { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + uint64 id = 2; +} + +message MsgApproveLoanResponse {} + +message MsgCancelLoan { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + uint64 id = 2; +} + +message MsgCancelLoanResponse {} + +message MsgRepayLoan { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + uint64 id = 2; +} + +message MsgRepayLoanResponse {} + +message MsgLiquidateLoan { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + uint64 id = 2; +} + +message MsgLiquidateLoanResponse {} + diff --git a/x/loan/keeper/msg_server_approve_loan.go b/x/loan/keeper/msg_server_approve_loan.go new file mode 100644 index 0000000..a496f34 --- /dev/null +++ b/x/loan/keeper/msg_server_approve_loan.go @@ -0,0 +1,18 @@ +package keeper + +import ( + "context" + + "loan/x/loan/types" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k msgServer) ApproveLoan(goCtx context.Context, msg *types.MsgApproveLoan) (*types.MsgApproveLoanResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // TODO: Handling the message + _ = ctx + + return &types.MsgApproveLoanResponse{}, nil +} diff --git a/x/loan/keeper/msg_server_cancel_loan.go b/x/loan/keeper/msg_server_cancel_loan.go new file mode 100644 index 0000000..e003ed8 --- /dev/null +++ b/x/loan/keeper/msg_server_cancel_loan.go @@ -0,0 +1,18 @@ +package keeper + +import ( + "context" + + "loan/x/loan/types" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k msgServer) CancelLoan(goCtx context.Context, msg *types.MsgCancelLoan) (*types.MsgCancelLoanResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // TODO: Handling the message + _ = ctx + + return &types.MsgCancelLoanResponse{}, nil +} diff --git a/x/loan/keeper/msg_server_liquidate_loan.go b/x/loan/keeper/msg_server_liquidate_loan.go new file mode 100644 index 0000000..a417cf1 --- /dev/null +++ b/x/loan/keeper/msg_server_liquidate_loan.go @@ -0,0 +1,18 @@ +package keeper + +import ( + "context" + + "loan/x/loan/types" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k msgServer) LiquidateLoan(goCtx context.Context, msg *types.MsgLiquidateLoan) (*types.MsgLiquidateLoanResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // TODO: Handling the message + _ = ctx + + return &types.MsgLiquidateLoanResponse{}, nil +} diff --git a/x/loan/keeper/msg_server_repay_loan.go b/x/loan/keeper/msg_server_repay_loan.go new file mode 100644 index 0000000..77140a9 --- /dev/null +++ b/x/loan/keeper/msg_server_repay_loan.go @@ -0,0 +1,18 @@ +package keeper + +import ( + "context" + + "loan/x/loan/types" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k msgServer) RepayLoan(goCtx context.Context, msg *types.MsgRepayLoan) (*types.MsgRepayLoanResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // TODO: Handling the message + _ = ctx + + return &types.MsgRepayLoanResponse{}, nil +} diff --git a/x/loan/module/autocli.go b/x/loan/module/autocli.go index b013a4c..8f5f917 100644 --- a/x/loan/module/autocli.go +++ b/x/loan/module/autocli.go @@ -45,6 +45,30 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Short: "Send a request-loan tx", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "amount"}, {ProtoField: "fee"}, {ProtoField: "collateral"}, {ProtoField: "deadline"}}, }, + { + RpcMethod: "ApproveLoan", + Use: "approve-loan [id]", + Short: "Send a approve-loan tx", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}}, + }, + { + RpcMethod: "CancelLoan", + Use: "cancel-loan [id]", + Short: "Send a cancel-loan tx", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}}, + }, + { + RpcMethod: "RepayLoan", + Use: "repay-loan [id]", + Short: "Send a repay-loan tx", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}}, + }, + { + RpcMethod: "LiquidateLoan", + Use: "liquidate-loan [id]", + Short: "Send a liquidate-loan tx", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}}, + }, // this line is used by ignite scaffolding # autocli/tx }, }, diff --git a/x/loan/module/simulation.go b/x/loan/module/simulation.go index 44f22fd..1909ab9 100644 --- a/x/loan/module/simulation.go +++ b/x/loan/module/simulation.go @@ -27,6 +27,22 @@ const ( // TODO: Determine the simulation weight value defaultWeightMsgRequestLoan int = 100 + opWeightMsgApproveLoan = "op_weight_msg_approve_loan" + // TODO: Determine the simulation weight value + defaultWeightMsgApproveLoan int = 100 + + opWeightMsgCancelLoan = "op_weight_msg_cancel_loan" + // TODO: Determine the simulation weight value + defaultWeightMsgCancelLoan int = 100 + + opWeightMsgRepayLoan = "op_weight_msg_repay_loan" + // TODO: Determine the simulation weight value + defaultWeightMsgRepayLoan int = 100 + + opWeightMsgLiquidateLoan = "op_weight_msg_liquidate_loan" + // TODO: Determine the simulation weight value + defaultWeightMsgLiquidateLoan int = 100 + // this line is used by starport scaffolding # simapp/module/const ) @@ -61,6 +77,50 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp loansimulation.SimulateMsgRequestLoan(am.accountKeeper, am.bankKeeper, am.keeper), )) + var weightMsgApproveLoan int + simState.AppParams.GetOrGenerate(opWeightMsgApproveLoan, &weightMsgApproveLoan, nil, + func(_ *rand.Rand) { + weightMsgApproveLoan = defaultWeightMsgApproveLoan + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgApproveLoan, + loansimulation.SimulateMsgApproveLoan(am.accountKeeper, am.bankKeeper, am.keeper), + )) + + var weightMsgCancelLoan int + simState.AppParams.GetOrGenerate(opWeightMsgCancelLoan, &weightMsgCancelLoan, nil, + func(_ *rand.Rand) { + weightMsgCancelLoan = defaultWeightMsgCancelLoan + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgCancelLoan, + loansimulation.SimulateMsgCancelLoan(am.accountKeeper, am.bankKeeper, am.keeper), + )) + + var weightMsgRepayLoan int + simState.AppParams.GetOrGenerate(opWeightMsgRepayLoan, &weightMsgRepayLoan, nil, + func(_ *rand.Rand) { + weightMsgRepayLoan = defaultWeightMsgRepayLoan + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgRepayLoan, + loansimulation.SimulateMsgRepayLoan(am.accountKeeper, am.bankKeeper, am.keeper), + )) + + var weightMsgLiquidateLoan int + simState.AppParams.GetOrGenerate(opWeightMsgLiquidateLoan, &weightMsgLiquidateLoan, nil, + func(_ *rand.Rand) { + weightMsgLiquidateLoan = defaultWeightMsgLiquidateLoan + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgLiquidateLoan, + loansimulation.SimulateMsgLiquidateLoan(am.accountKeeper, am.bankKeeper, am.keeper), + )) + // this line is used by starport scaffolding # simapp/module/operation return operations @@ -77,6 +137,38 @@ func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.Wei return nil }, ), + simulation.NewWeightedProposalMsg( + opWeightMsgApproveLoan, + defaultWeightMsgApproveLoan, + func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { + loansimulation.SimulateMsgApproveLoan(am.accountKeeper, am.bankKeeper, am.keeper) + return nil + }, + ), + simulation.NewWeightedProposalMsg( + opWeightMsgCancelLoan, + defaultWeightMsgCancelLoan, + func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { + loansimulation.SimulateMsgCancelLoan(am.accountKeeper, am.bankKeeper, am.keeper) + return nil + }, + ), + simulation.NewWeightedProposalMsg( + opWeightMsgRepayLoan, + defaultWeightMsgRepayLoan, + func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { + loansimulation.SimulateMsgRepayLoan(am.accountKeeper, am.bankKeeper, am.keeper) + return nil + }, + ), + simulation.NewWeightedProposalMsg( + opWeightMsgLiquidateLoan, + defaultWeightMsgLiquidateLoan, + func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { + loansimulation.SimulateMsgLiquidateLoan(am.accountKeeper, am.bankKeeper, am.keeper) + return nil + }, + ), // this line is used by starport scaffolding # simapp/module/OpMsg } } diff --git a/x/loan/simulation/approve_loan.go b/x/loan/simulation/approve_loan.go new file mode 100644 index 0000000..7b2cbf0 --- /dev/null +++ b/x/loan/simulation/approve_loan.go @@ -0,0 +1,30 @@ +package simulation + +import ( + "math/rand" + + "loan/x/loan/keeper" + "loan/x/loan/types" + + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" +) + +func SimulateMsgApproveLoan( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, +) simtypes.Operation { + return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + simAccount, _ := simtypes.RandomAcc(r, accs) + msg := &types.MsgApproveLoan{ + Creator: simAccount.Address.String(), + } + + // TODO: Handling the ApproveLoan simulation + + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "ApproveLoan simulation not implemented"), nil, nil + } +} diff --git a/x/loan/simulation/cancel_loan.go b/x/loan/simulation/cancel_loan.go new file mode 100644 index 0000000..d581c3d --- /dev/null +++ b/x/loan/simulation/cancel_loan.go @@ -0,0 +1,30 @@ +package simulation + +import ( + "math/rand" + + "loan/x/loan/keeper" + "loan/x/loan/types" + + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" +) + +func SimulateMsgCancelLoan( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, +) simtypes.Operation { + return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + simAccount, _ := simtypes.RandomAcc(r, accs) + msg := &types.MsgCancelLoan{ + Creator: simAccount.Address.String(), + } + + // TODO: Handling the CancelLoan simulation + + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "CancelLoan simulation not implemented"), nil, nil + } +} diff --git a/x/loan/simulation/liquidate_loan.go b/x/loan/simulation/liquidate_loan.go new file mode 100644 index 0000000..23bb0b4 --- /dev/null +++ b/x/loan/simulation/liquidate_loan.go @@ -0,0 +1,30 @@ +package simulation + +import ( + "math/rand" + + "loan/x/loan/keeper" + "loan/x/loan/types" + + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" +) + +func SimulateMsgLiquidateLoan( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, +) simtypes.Operation { + return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + simAccount, _ := simtypes.RandomAcc(r, accs) + msg := &types.MsgLiquidateLoan{ + Creator: simAccount.Address.String(), + } + + // TODO: Handling the LiquidateLoan simulation + + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "LiquidateLoan simulation not implemented"), nil, nil + } +} diff --git a/x/loan/simulation/repay_loan.go b/x/loan/simulation/repay_loan.go new file mode 100644 index 0000000..fa64215 --- /dev/null +++ b/x/loan/simulation/repay_loan.go @@ -0,0 +1,30 @@ +package simulation + +import ( + "math/rand" + + "loan/x/loan/keeper" + "loan/x/loan/types" + + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" +) + +func SimulateMsgRepayLoan( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, +) simtypes.Operation { + return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + simAccount, _ := simtypes.RandomAcc(r, accs) + msg := &types.MsgRepayLoan{ + Creator: simAccount.Address.String(), + } + + // TODO: Handling the RepayLoan simulation + + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "RepayLoan simulation not implemented"), nil, nil + } +} diff --git a/x/loan/types/codec.go b/x/loan/types/codec.go index b7ae191..9acf105 100644 --- a/x/loan/types/codec.go +++ b/x/loan/types/codec.go @@ -11,6 +11,18 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgRequestLoan{}, ) + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgApproveLoan{}, + ) + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCancelLoan{}, + ) + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgRepayLoan{}, + ) + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgLiquidateLoan{}, + ) // this line is used by starport scaffolding # 3 registry.RegisterImplementations((*sdk.Msg)(nil), diff --git a/x/loan/types/message_approve_loan.go b/x/loan/types/message_approve_loan.go new file mode 100644 index 0000000..dc8b86e --- /dev/null +++ b/x/loan/types/message_approve_loan.go @@ -0,0 +1,24 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgApproveLoan{} + +func NewMsgApproveLoan(creator string, id uint64) *MsgApproveLoan { + return &MsgApproveLoan{ + Creator: creator, + Id: id, + } +} + +func (msg *MsgApproveLoan) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + return nil +} diff --git a/x/loan/types/message_approve_loan_test.go b/x/loan/types/message_approve_loan_test.go new file mode 100644 index 0000000..3fa9dd1 --- /dev/null +++ b/x/loan/types/message_approve_loan_test.go @@ -0,0 +1,41 @@ +package types + +import ( + "testing" + + "loan/testutil/sample" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" +) + +func TestMsgApproveLoan_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgApproveLoan + err error + }{ + { + name: "invalid address", + msg: MsgApproveLoan{ + Creator: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgApproveLoan{ + Creator: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/loan/types/message_cancel_loan.go b/x/loan/types/message_cancel_loan.go new file mode 100644 index 0000000..346eba8 --- /dev/null +++ b/x/loan/types/message_cancel_loan.go @@ -0,0 +1,24 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgCancelLoan{} + +func NewMsgCancelLoan(creator string, id uint64) *MsgCancelLoan { + return &MsgCancelLoan{ + Creator: creator, + Id: id, + } +} + +func (msg *MsgCancelLoan) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + return nil +} diff --git a/x/loan/types/message_cancel_loan_test.go b/x/loan/types/message_cancel_loan_test.go new file mode 100644 index 0000000..2bb1d05 --- /dev/null +++ b/x/loan/types/message_cancel_loan_test.go @@ -0,0 +1,41 @@ +package types + +import ( + "testing" + + "loan/testutil/sample" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" +) + +func TestMsgCancelLoan_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgCancelLoan + err error + }{ + { + name: "invalid address", + msg: MsgCancelLoan{ + Creator: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgCancelLoan{ + Creator: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/loan/types/message_liquidate_loan.go b/x/loan/types/message_liquidate_loan.go new file mode 100644 index 0000000..bb54344 --- /dev/null +++ b/x/loan/types/message_liquidate_loan.go @@ -0,0 +1,24 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgLiquidateLoan{} + +func NewMsgLiquidateLoan(creator string, id uint64) *MsgLiquidateLoan { + return &MsgLiquidateLoan{ + Creator: creator, + Id: id, + } +} + +func (msg *MsgLiquidateLoan) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + return nil +} diff --git a/x/loan/types/message_liquidate_loan_test.go b/x/loan/types/message_liquidate_loan_test.go new file mode 100644 index 0000000..a770117 --- /dev/null +++ b/x/loan/types/message_liquidate_loan_test.go @@ -0,0 +1,41 @@ +package types + +import ( + "testing" + + "loan/testutil/sample" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" +) + +func TestMsgLiquidateLoan_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgLiquidateLoan + err error + }{ + { + name: "invalid address", + msg: MsgLiquidateLoan{ + Creator: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgLiquidateLoan{ + Creator: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/loan/types/message_repay_loan.go b/x/loan/types/message_repay_loan.go new file mode 100644 index 0000000..45f07a5 --- /dev/null +++ b/x/loan/types/message_repay_loan.go @@ -0,0 +1,24 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgRepayLoan{} + +func NewMsgRepayLoan(creator string, id uint64) *MsgRepayLoan { + return &MsgRepayLoan{ + Creator: creator, + Id: id, + } +} + +func (msg *MsgRepayLoan) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + return nil +} diff --git a/x/loan/types/message_repay_loan_test.go b/x/loan/types/message_repay_loan_test.go new file mode 100644 index 0000000..2e934d1 --- /dev/null +++ b/x/loan/types/message_repay_loan_test.go @@ -0,0 +1,41 @@ +package types + +import ( + "testing" + + "loan/testutil/sample" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" +) + +func TestMsgRepayLoan_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgRepayLoan + err error + }{ + { + name: "invalid address", + msg: MsgRepayLoan{ + Creator: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgRepayLoan{ + Creator: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/loan/types/tx.pb.go b/x/loan/types/tx.pb.go index 3ebcad6..afd6a04 100644 --- a/x/loan/types/tx.pb.go +++ b/x/loan/types/tx.pb.go @@ -237,45 +237,414 @@ func (m *MsgRequestLoanResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRequestLoanResponse proto.InternalMessageInfo +type MsgApproveLoan struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *MsgApproveLoan) Reset() { *m = MsgApproveLoan{} } +func (m *MsgApproveLoan) String() string { return proto.CompactTextString(m) } +func (*MsgApproveLoan) ProtoMessage() {} +func (*MsgApproveLoan) Descriptor() ([]byte, []int) { + return fileDescriptor_a914cc78de7d0204, []int{4} +} +func (m *MsgApproveLoan) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgApproveLoan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgApproveLoan.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 *MsgApproveLoan) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgApproveLoan.Merge(m, src) +} +func (m *MsgApproveLoan) XXX_Size() int { + return m.Size() +} +func (m *MsgApproveLoan) XXX_DiscardUnknown() { + xxx_messageInfo_MsgApproveLoan.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgApproveLoan proto.InternalMessageInfo + +func (m *MsgApproveLoan) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgApproveLoan) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +type MsgApproveLoanResponse struct { +} + +func (m *MsgApproveLoanResponse) Reset() { *m = MsgApproveLoanResponse{} } +func (m *MsgApproveLoanResponse) String() string { return proto.CompactTextString(m) } +func (*MsgApproveLoanResponse) ProtoMessage() {} +func (*MsgApproveLoanResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a914cc78de7d0204, []int{5} +} +func (m *MsgApproveLoanResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgApproveLoanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgApproveLoanResponse.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 *MsgApproveLoanResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgApproveLoanResponse.Merge(m, src) +} +func (m *MsgApproveLoanResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgApproveLoanResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgApproveLoanResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgApproveLoanResponse proto.InternalMessageInfo + +type MsgCancelLoan struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *MsgCancelLoan) Reset() { *m = MsgCancelLoan{} } +func (m *MsgCancelLoan) String() string { return proto.CompactTextString(m) } +func (*MsgCancelLoan) ProtoMessage() {} +func (*MsgCancelLoan) Descriptor() ([]byte, []int) { + return fileDescriptor_a914cc78de7d0204, []int{6} +} +func (m *MsgCancelLoan) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelLoan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelLoan.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 *MsgCancelLoan) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelLoan.Merge(m, src) +} +func (m *MsgCancelLoan) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelLoan) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelLoan.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelLoan proto.InternalMessageInfo + +func (m *MsgCancelLoan) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgCancelLoan) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +type MsgCancelLoanResponse struct { +} + +func (m *MsgCancelLoanResponse) Reset() { *m = MsgCancelLoanResponse{} } +func (m *MsgCancelLoanResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCancelLoanResponse) ProtoMessage() {} +func (*MsgCancelLoanResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a914cc78de7d0204, []int{7} +} +func (m *MsgCancelLoanResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelLoanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelLoanResponse.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 *MsgCancelLoanResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelLoanResponse.Merge(m, src) +} +func (m *MsgCancelLoanResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelLoanResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelLoanResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelLoanResponse proto.InternalMessageInfo + +type MsgRepayLoan struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *MsgRepayLoan) Reset() { *m = MsgRepayLoan{} } +func (m *MsgRepayLoan) String() string { return proto.CompactTextString(m) } +func (*MsgRepayLoan) ProtoMessage() {} +func (*MsgRepayLoan) Descriptor() ([]byte, []int) { + return fileDescriptor_a914cc78de7d0204, []int{8} +} +func (m *MsgRepayLoan) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRepayLoan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRepayLoan.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 *MsgRepayLoan) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRepayLoan.Merge(m, src) +} +func (m *MsgRepayLoan) XXX_Size() int { + return m.Size() +} +func (m *MsgRepayLoan) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRepayLoan.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRepayLoan proto.InternalMessageInfo + +func (m *MsgRepayLoan) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgRepayLoan) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +type MsgRepayLoanResponse struct { +} + +func (m *MsgRepayLoanResponse) Reset() { *m = MsgRepayLoanResponse{} } +func (m *MsgRepayLoanResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRepayLoanResponse) ProtoMessage() {} +func (*MsgRepayLoanResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a914cc78de7d0204, []int{9} +} +func (m *MsgRepayLoanResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRepayLoanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRepayLoanResponse.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 *MsgRepayLoanResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRepayLoanResponse.Merge(m, src) +} +func (m *MsgRepayLoanResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRepayLoanResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRepayLoanResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRepayLoanResponse proto.InternalMessageInfo + +type MsgLiquidateLoan struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *MsgLiquidateLoan) Reset() { *m = MsgLiquidateLoan{} } +func (m *MsgLiquidateLoan) String() string { return proto.CompactTextString(m) } +func (*MsgLiquidateLoan) ProtoMessage() {} +func (*MsgLiquidateLoan) Descriptor() ([]byte, []int) { + return fileDescriptor_a914cc78de7d0204, []int{10} +} +func (m *MsgLiquidateLoan) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLiquidateLoan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLiquidateLoan.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 *MsgLiquidateLoan) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLiquidateLoan.Merge(m, src) +} +func (m *MsgLiquidateLoan) XXX_Size() int { + return m.Size() +} +func (m *MsgLiquidateLoan) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLiquidateLoan.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLiquidateLoan proto.InternalMessageInfo + +func (m *MsgLiquidateLoan) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgLiquidateLoan) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +type MsgLiquidateLoanResponse struct { +} + +func (m *MsgLiquidateLoanResponse) Reset() { *m = MsgLiquidateLoanResponse{} } +func (m *MsgLiquidateLoanResponse) String() string { return proto.CompactTextString(m) } +func (*MsgLiquidateLoanResponse) ProtoMessage() {} +func (*MsgLiquidateLoanResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a914cc78de7d0204, []int{11} +} +func (m *MsgLiquidateLoanResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLiquidateLoanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLiquidateLoanResponse.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 *MsgLiquidateLoanResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLiquidateLoanResponse.Merge(m, src) +} +func (m *MsgLiquidateLoanResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgLiquidateLoanResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLiquidateLoanResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLiquidateLoanResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "loan.loan.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "loan.loan.MsgUpdateParamsResponse") proto.RegisterType((*MsgRequestLoan)(nil), "loan.loan.MsgRequestLoan") proto.RegisterType((*MsgRequestLoanResponse)(nil), "loan.loan.MsgRequestLoanResponse") + proto.RegisterType((*MsgApproveLoan)(nil), "loan.loan.MsgApproveLoan") + proto.RegisterType((*MsgApproveLoanResponse)(nil), "loan.loan.MsgApproveLoanResponse") + proto.RegisterType((*MsgCancelLoan)(nil), "loan.loan.MsgCancelLoan") + proto.RegisterType((*MsgCancelLoanResponse)(nil), "loan.loan.MsgCancelLoanResponse") + proto.RegisterType((*MsgRepayLoan)(nil), "loan.loan.MsgRepayLoan") + proto.RegisterType((*MsgRepayLoanResponse)(nil), "loan.loan.MsgRepayLoanResponse") + proto.RegisterType((*MsgLiquidateLoan)(nil), "loan.loan.MsgLiquidateLoan") + proto.RegisterType((*MsgLiquidateLoanResponse)(nil), "loan.loan.MsgLiquidateLoanResponse") } func init() { proto.RegisterFile("loan/loan/tx.proto", fileDescriptor_a914cc78de7d0204) } var fileDescriptor_a914cc78de7d0204 = []byte{ - // 440 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0x31, 0x8f, 0xd3, 0x30, - 0x14, 0x8e, 0x29, 0x57, 0xc8, 0xbb, 0x13, 0x50, 0xeb, 0xd4, 0x73, 0x83, 0x14, 0x8e, 0x4c, 0xa7, - 0x22, 0x12, 0x71, 0x20, 0x86, 0xdb, 0xe8, 0x0a, 0x45, 0x28, 0x88, 0x85, 0x05, 0x99, 0xc6, 0x84, - 0x48, 0x49, 0x1c, 0x6c, 0x17, 0x5d, 0x37, 0xc4, 0xc8, 0xc4, 0x2f, 0x60, 0x86, 0x89, 0x0e, 0xfc, - 0x88, 0x8e, 0x15, 0x13, 0x13, 0x42, 0xed, 0xd0, 0xbf, 0x81, 0x62, 0x27, 0x6d, 0x5a, 0xa9, 0xcb, - 0x8b, 0xbf, 0xf7, 0xbd, 0x7c, 0xef, 0x7b, 0x7e, 0x06, 0x9c, 0x72, 0x9a, 0x07, 0x3a, 0xa8, 0x4b, - 0xbf, 0x10, 0x5c, 0x71, 0x6c, 0x97, 0xd0, 0x2f, 0x83, 0xd3, 0xa1, 0x59, 0x92, 0xf3, 0x40, 0x47, - 0xc3, 0x3a, 0x27, 0x23, 0x2e, 0x33, 0x2e, 0x83, 0x4c, 0xc6, 0xc1, 0xc7, 0x07, 0xe5, 0xa7, 0x22, - 0x7a, 0x86, 0x78, 0xa3, 0x51, 0x60, 0x40, 0x45, 0x1d, 0xc7, 0x3c, 0xe6, 0x26, 0x5f, 0x9e, 0xaa, - 0x6c, 0x77, 0xd3, 0xbb, 0xa0, 0x82, 0x66, 0x55, 0xb5, 0xf7, 0x13, 0xc1, 0xcd, 0xa1, 0x8c, 0x5f, - 0x15, 0x11, 0x55, 0xec, 0x85, 0x66, 0xf0, 0x63, 0xb0, 0xe9, 0x58, 0xbd, 0xe7, 0x22, 0x51, 0x13, - 0x82, 0x4e, 0xd1, 0x99, 0x3d, 0x20, 0xbf, 0x7f, 0xdd, 0x3f, 0xae, 0xda, 0x3c, 0x89, 0x22, 0xc1, - 0xa4, 0x7c, 0xa9, 0x44, 0x92, 0xc7, 0xe1, 0xa6, 0x14, 0x3f, 0x82, 0xb6, 0xd1, 0x26, 0x57, 0x4e, - 0xd1, 0xd9, 0xe1, 0x79, 0xc7, 0x5f, 0x0f, 0xe7, 0x1b, 0xe9, 0x81, 0x3d, 0xfb, 0x7b, 0xc7, 0xfa, - 0xbe, 0x9a, 0xf6, 0x51, 0x58, 0xd5, 0x5e, 0xf8, 0x9f, 0x57, 0xd3, 0xfe, 0x46, 0xe5, 0xcb, 0x6a, - 0xda, 0xbf, 0xad, 0x7d, 0x5e, 0x1a, 0xbb, 0x3b, 0xee, 0xbc, 0x1e, 0x9c, 0xec, 0xa4, 0x42, 0x26, - 0x0b, 0x9e, 0x4b, 0xe6, 0x7d, 0x43, 0x70, 0x63, 0x28, 0xe3, 0x90, 0x7d, 0x18, 0x33, 0xa9, 0x9e, - 0x71, 0x9a, 0x63, 0x02, 0xd7, 0x46, 0x82, 0x51, 0xc5, 0x85, 0x99, 0x24, 0xac, 0x21, 0xee, 0x42, - 0x9b, 0x66, 0x7c, 0x9c, 0x2b, 0xed, 0xd6, 0x0e, 0x2b, 0x84, 0x6f, 0x41, 0xeb, 0x1d, 0x63, 0xa4, - 0xa5, 0x93, 0xe5, 0x11, 0xbb, 0x00, 0x23, 0x9e, 0xa6, 0x54, 0x31, 0x41, 0x53, 0x72, 0x55, 0x13, - 0x8d, 0x0c, 0x76, 0xe0, 0x7a, 0xc4, 0x68, 0x94, 0x26, 0x39, 0x23, 0x07, 0x9a, 0x5d, 0xe3, 0x8b, - 0xa3, 0x72, 0xba, 0xba, 0xa7, 0x47, 0xa0, 0xbb, 0xed, 0xaf, 0xb6, 0x7e, 0xfe, 0x03, 0x41, 0x6b, - 0x28, 0x63, 0xfc, 0x1c, 0x8e, 0xb6, 0x76, 0xe1, 0x34, 0xee, 0x70, 0x67, 0x6c, 0xc7, 0xdb, 0xcf, - 0xd5, 0xba, 0xf8, 0x29, 0x1c, 0x36, 0xaf, 0xa3, 0xb7, 0xfd, 0x4b, 0x83, 0x72, 0xee, 0xee, 0xa5, - 0x6a, 0x31, 0xe7, 0xe0, 0x53, 0xb9, 0xb9, 0xc1, 0xbd, 0xd9, 0xc2, 0x45, 0xf3, 0x85, 0x8b, 0xfe, - 0x2d, 0x5c, 0xf4, 0x75, 0xe9, 0x5a, 0xf3, 0xa5, 0x6b, 0xfd, 0x59, 0xba, 0xd6, 0xeb, 0x4e, 0x73, - 0x71, 0x6a, 0x52, 0x30, 0xf9, 0xb6, 0xad, 0xdf, 0xd9, 0xc3, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, - 0xf8, 0x1c, 0x39, 0x55, 0xfd, 0x02, 0x00, 0x00, + // 585 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0xe3, 0xa4, 0x0d, 0xf8, 0x35, 0x2d, 0xcd, 0x29, 0x24, 0x8e, 0x2b, 0xb9, 0x21, 0x2c, + 0x55, 0x10, 0x89, 0x28, 0x88, 0xa1, 0x5b, 0x83, 0x80, 0x0a, 0x1a, 0x04, 0x46, 0x2c, 0x2c, 0xe8, + 0x88, 0x0f, 0x63, 0xc9, 0xf1, 0xb9, 0xbe, 0x4b, 0xd5, 0x6c, 0x88, 0x91, 0x89, 0x4f, 0xc0, 0xcc, + 0x46, 0x06, 0x3e, 0x44, 0xc7, 0x8a, 0x09, 0x31, 0x20, 0x94, 0x0c, 0xf9, 0x1a, 0xc8, 0x67, 0xc7, + 0x39, 0x5b, 0x0d, 0x0c, 0x59, 0x2e, 0x7e, 0xef, 0x77, 0xf7, 0xff, 0xbf, 0xa7, 0x7b, 0x39, 0x40, + 0x2e, 0xc5, 0x5e, 0x47, 0x2c, 0xfc, 0xac, 0xed, 0x07, 0x94, 0x53, 0xa4, 0x86, 0x61, 0x3b, 0x5c, + 0xf4, 0x32, 0x1e, 0x38, 0x1e, 0xed, 0x88, 0x35, 0xa2, 0x7a, 0xad, 0x4f, 0xd9, 0x80, 0xb2, 0xce, + 0x80, 0xd9, 0x9d, 0xd3, 0x3b, 0xe1, 0x4f, 0x0c, 0xea, 0x11, 0x78, 0x23, 0xa2, 0x4e, 0x14, 0xc4, + 0xa8, 0x62, 0x53, 0x9b, 0x46, 0xf9, 0xf0, 0x2b, 0xce, 0x56, 0x17, 0xde, 0x3e, 0x0e, 0xf0, 0x20, + 0xde, 0xdd, 0xfc, 0xa6, 0xc0, 0xb5, 0x1e, 0xb3, 0x5f, 0xf9, 0x16, 0xe6, 0xe4, 0xb9, 0x20, 0xe8, + 0x3e, 0xa8, 0x78, 0xc8, 0xdf, 0xd3, 0xc0, 0xe1, 0x23, 0x4d, 0x69, 0x28, 0x7b, 0x6a, 0x57, 0xfb, + 0xf1, 0xfd, 0x76, 0x25, 0xb6, 0x39, 0xb4, 0xac, 0x80, 0x30, 0xf6, 0x92, 0x07, 0x8e, 0x67, 0x9b, + 0x8b, 0xad, 0xe8, 0x1e, 0x14, 0x23, 0x6d, 0x2d, 0xdf, 0x50, 0xf6, 0x36, 0xf6, 0xcb, 0xed, 0xa4, + 0xb9, 0x76, 0x24, 0xdd, 0x55, 0xcf, 0x7f, 0xef, 0xe6, 0xbe, 0xce, 0xc6, 0x2d, 0xc5, 0x8c, 0xf7, + 0x1e, 0xb4, 0x3f, 0xce, 0xc6, 0xad, 0x85, 0xca, 0xa7, 0xd9, 0xb8, 0xb5, 0x23, 0xea, 0x3c, 0x8b, + 0xca, 0xcd, 0x54, 0xd7, 0xac, 0x43, 0x2d, 0x93, 0x32, 0x09, 0xf3, 0xa9, 0xc7, 0x48, 0xf3, 0x8b, + 0x02, 0x5b, 0x3d, 0x66, 0x9b, 0xe4, 0x64, 0x48, 0x18, 0x3f, 0xa6, 0xd8, 0x43, 0x1a, 0x5c, 0xe9, + 0x07, 0x04, 0x73, 0x1a, 0x44, 0x9d, 0x98, 0xf3, 0x10, 0x55, 0xa1, 0x88, 0x07, 0x74, 0xe8, 0x71, + 0x51, 0xad, 0x6a, 0xc6, 0x11, 0xda, 0x86, 0xc2, 0x3b, 0x42, 0xb4, 0x82, 0x48, 0x86, 0x9f, 0xc8, + 0x00, 0xe8, 0x53, 0xd7, 0xc5, 0x9c, 0x04, 0xd8, 0xd5, 0xd6, 0x04, 0x90, 0x32, 0x48, 0x87, 0xab, + 0x16, 0xc1, 0x96, 0xeb, 0x78, 0x44, 0x5b, 0x17, 0x34, 0x89, 0x0f, 0x4a, 0x61, 0x77, 0x73, 0xcf, + 0xa6, 0x06, 0xd5, 0x74, 0x7d, 0x49, 0xe9, 0x47, 0xa2, 0xf2, 0x43, 0xdf, 0x0f, 0xe8, 0x29, 0xf9, + 0x4f, 0xe5, 0x5b, 0x90, 0x77, 0x2c, 0x51, 0xf5, 0x9a, 0x99, 0x77, 0xac, 0x4b, 0x3d, 0x24, 0xa5, + 0xc4, 0xe3, 0x31, 0x6c, 0xf6, 0x98, 0xfd, 0x00, 0x7b, 0x7d, 0xe2, 0xae, 0x64, 0x51, 0x83, 0xeb, + 0x29, 0xa1, 0xc4, 0xe1, 0x11, 0x94, 0x44, 0x7f, 0x3e, 0x1e, 0xad, 0x64, 0x50, 0x85, 0x8a, 0xac, + 0x93, 0xe8, 0x3f, 0x81, 0xed, 0x1e, 0xb3, 0x8f, 0x9d, 0x93, 0xa1, 0x13, 0x5e, 0xff, 0x4a, 0x1e, + 0x3a, 0x68, 0x59, 0xad, 0xb9, 0xcf, 0xfe, 0xaf, 0x02, 0x14, 0x7a, 0xcc, 0x46, 0xcf, 0xa0, 0x94, + 0xfa, 0x67, 0xe8, 0xd2, 0x44, 0x67, 0x86, 0x50, 0x6f, 0x2e, 0x67, 0x73, 0x5d, 0xf4, 0x14, 0x36, + 0xe4, 0xe1, 0xac, 0xa7, 0x8f, 0x48, 0x48, 0xbf, 0xb1, 0x14, 0xc9, 0x62, 0xf2, 0xbc, 0x64, 0xc4, + 0x24, 0x94, 0x15, 0xbb, 0x64, 0x36, 0xd0, 0x11, 0x80, 0x3c, 0x18, 0xe9, 0x03, 0x0b, 0xa2, 0x37, + 0x96, 0x91, 0x44, 0xe9, 0x21, 0xa8, 0x8b, 0x01, 0xa8, 0x65, 0xdb, 0x88, 0x81, 0xbe, 0xbb, 0x04, + 0x24, 0x32, 0x2f, 0x60, 0x33, 0x7d, 0xcf, 0x3b, 0xe9, 0x13, 0x29, 0xa8, 0xdf, 0xfc, 0x07, 0x9c, + 0x4b, 0xea, 0xeb, 0x1f, 0xc2, 0x87, 0xa7, 0x7b, 0xeb, 0x7c, 0x62, 0x28, 0x17, 0x13, 0x43, 0xf9, + 0x33, 0x31, 0x94, 0xcf, 0x53, 0x23, 0x77, 0x31, 0x35, 0x72, 0x3f, 0xa7, 0x46, 0xee, 0x75, 0x59, + 0x7e, 0x77, 0xf8, 0xc8, 0x27, 0xec, 0x6d, 0x51, 0x3c, 0x93, 0x77, 0xff, 0x06, 0x00, 0x00, 0xff, + 0xff, 0x6b, 0x76, 0x1e, 0x0d, 0xbc, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -294,6 +663,10 @@ type MsgClient interface { // parameters. The authority defaults to the x/gov module account. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) RequestLoan(ctx context.Context, in *MsgRequestLoan, opts ...grpc.CallOption) (*MsgRequestLoanResponse, error) + ApproveLoan(ctx context.Context, in *MsgApproveLoan, opts ...grpc.CallOption) (*MsgApproveLoanResponse, error) + CancelLoan(ctx context.Context, in *MsgCancelLoan, opts ...grpc.CallOption) (*MsgCancelLoanResponse, error) + RepayLoan(ctx context.Context, in *MsgRepayLoan, opts ...grpc.CallOption) (*MsgRepayLoanResponse, error) + LiquidateLoan(ctx context.Context, in *MsgLiquidateLoan, opts ...grpc.CallOption) (*MsgLiquidateLoanResponse, error) } type msgClient struct { @@ -322,12 +695,52 @@ func (c *msgClient) RequestLoan(ctx context.Context, in *MsgRequestLoan, opts .. return out, nil } +func (c *msgClient) ApproveLoan(ctx context.Context, in *MsgApproveLoan, opts ...grpc.CallOption) (*MsgApproveLoanResponse, error) { + out := new(MsgApproveLoanResponse) + err := c.cc.Invoke(ctx, "/loan.loan.Msg/ApproveLoan", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CancelLoan(ctx context.Context, in *MsgCancelLoan, opts ...grpc.CallOption) (*MsgCancelLoanResponse, error) { + out := new(MsgCancelLoanResponse) + err := c.cc.Invoke(ctx, "/loan.loan.Msg/CancelLoan", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RepayLoan(ctx context.Context, in *MsgRepayLoan, opts ...grpc.CallOption) (*MsgRepayLoanResponse, error) { + out := new(MsgRepayLoanResponse) + err := c.cc.Invoke(ctx, "/loan.loan.Msg/RepayLoan", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) LiquidateLoan(ctx context.Context, in *MsgLiquidateLoan, opts ...grpc.CallOption) (*MsgLiquidateLoanResponse, error) { + out := new(MsgLiquidateLoanResponse) + err := c.cc.Invoke(ctx, "/loan.loan.Msg/LiquidateLoan", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // UpdateParams defines a (governance) operation for updating the module // parameters. The authority defaults to the x/gov module account. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) RequestLoan(context.Context, *MsgRequestLoan) (*MsgRequestLoanResponse, error) + ApproveLoan(context.Context, *MsgApproveLoan) (*MsgApproveLoanResponse, error) + CancelLoan(context.Context, *MsgCancelLoan) (*MsgCancelLoanResponse, error) + RepayLoan(context.Context, *MsgRepayLoan) (*MsgRepayLoanResponse, error) + LiquidateLoan(context.Context, *MsgLiquidateLoan) (*MsgLiquidateLoanResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -340,6 +753,18 @@ func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateP func (*UnimplementedMsgServer) RequestLoan(ctx context.Context, req *MsgRequestLoan) (*MsgRequestLoanResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RequestLoan not implemented") } +func (*UnimplementedMsgServer) ApproveLoan(ctx context.Context, req *MsgApproveLoan) (*MsgApproveLoanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ApproveLoan not implemented") +} +func (*UnimplementedMsgServer) CancelLoan(ctx context.Context, req *MsgCancelLoan) (*MsgCancelLoanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelLoan not implemented") +} +func (*UnimplementedMsgServer) RepayLoan(ctx context.Context, req *MsgRepayLoan) (*MsgRepayLoanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RepayLoan not implemented") +} +func (*UnimplementedMsgServer) LiquidateLoan(ctx context.Context, req *MsgLiquidateLoan) (*MsgLiquidateLoanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LiquidateLoan not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -381,26 +806,114 @@ func _Msg_RequestLoan_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "loan.loan.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, - { - MethodName: "RequestLoan", - Handler: _Msg_RequestLoan_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "loan/loan/tx.proto", -} - -func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) +func _Msg_ApproveLoan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgApproveLoan) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ApproveLoan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/loan.loan.Msg/ApproveLoan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ApproveLoan(ctx, req.(*MsgApproveLoan)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CancelLoan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelLoan) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CancelLoan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/loan.loan.Msg/CancelLoan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelLoan(ctx, req.(*MsgCancelLoan)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RepayLoan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRepayLoan) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RepayLoan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/loan.loan.Msg/RepayLoan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RepayLoan(ctx, req.(*MsgRepayLoan)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_LiquidateLoan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgLiquidateLoan) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).LiquidateLoan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/loan.loan.Msg/LiquidateLoan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).LiquidateLoan(ctx, req.(*MsgLiquidateLoan)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "loan.loan.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "RequestLoan", + Handler: _Msg_RequestLoan_Handler, + }, + { + MethodName: "ApproveLoan", + Handler: _Msg_ApproveLoan_Handler, + }, + { + MethodName: "CancelLoan", + Handler: _Msg_CancelLoan_Handler, + }, + { + MethodName: "RepayLoan", + Handler: _Msg_RepayLoan_Handler, + }, + { + MethodName: "LiquidateLoan", + Handler: _Msg_LiquidateLoan_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "loan/loan/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err @@ -542,86 +1055,994 @@ func (m *MsgRequestLoanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *MsgApproveLoan) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *MsgUpdateParams) Size() (n int) { - if m == nil { - return 0 + +func (m *MsgApproveLoan) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgApproveLoan) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgApproveLoanResponse) 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 *MsgApproveLoanResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgApproveLoanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCancelLoan) 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 *MsgCancelLoan) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelLoan) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if m.Id != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 } - l = m.Params.Size() - n += 1 + l + sovTx(uint64(l)) - return n + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 +func (m *MsgCancelLoanResponse) 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 *MsgCancelLoanResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelLoanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - return n + return len(dAtA) - i, nil } -func (m *MsgRequestLoan) Size() (n int) { - if m == nil { - return 0 +func (m *MsgRepayLoan) 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 *MsgRepayLoan) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRepayLoan) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if m.Id != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 } - l = len(m.Amount) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa } - l = len(m.Fee) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *MsgRepayLoanResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - l = len(m.Collateral) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + return dAtA[:n], nil +} + +func (m *MsgRepayLoanResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRepayLoanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgLiquidateLoan) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - l = len(m.Deadline) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + return dAtA[:n], nil +} + +func (m *MsgLiquidateLoan) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLiquidateLoan) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgLiquidateLoanResponse) 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 *MsgLiquidateLoanResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLiquidateLoanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRequestLoan) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Fee) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Collateral) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Deadline) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRequestLoanResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgApproveLoan) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovTx(uint64(m.Id)) + } + return n +} + +func (m *MsgApproveLoanResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCancelLoan) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovTx(uint64(m.Id)) + } + return n +} + +func (m *MsgCancelLoanResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRepayLoan) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovTx(uint64(m.Id)) + } + return n +} + +func (m *MsgRepayLoanResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgLiquidateLoan) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovTx(uint64(m.Id)) + } + return n +} + +func (m *MsgLiquidateLoanResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) 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 ErrIntOverflowTx + } + 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: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) 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 ErrIntOverflowTx + } + 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: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRequestLoan) 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 ErrIntOverflowTx + } + 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: MsgRequestLoan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRequestLoan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Fee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Collateral", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Collateral = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deadline", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Deadline = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRequestLoanResponse) 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 ErrIntOverflowTx + } + 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: MsgRequestLoanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRequestLoanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgApproveLoan) 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 ErrIntOverflowTx + } + 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: MsgApproveLoan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgApproveLoan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - return n -} -func (m *MsgRequestLoanResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - return n + return nil } +func (m *MsgApproveLoanResponse) 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 ErrIntOverflowTx + } + 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: MsgApproveLoanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgApproveLoanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { +func (m *MsgCancelLoan) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -644,15 +2065,15 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCancelLoan: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCancelLoan: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -680,13 +2101,13 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Authority = string(dAtA[iNdEx:postIndex]) + m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var msglen int + m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -696,25 +2117,11 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -736,7 +2143,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { +func (m *MsgCancelLoanResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -759,10 +2166,10 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCancelLoanResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCancelLoanResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -786,7 +2193,7 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRequestLoan) Unmarshal(dAtA []byte) error { +func (m *MsgRepayLoan) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -809,10 +2216,10 @@ func (m *MsgRequestLoan) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRequestLoan: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRepayLoan: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRequestLoan: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRepayLoan: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -848,10 +2255,10 @@ func (m *MsgRequestLoan) Unmarshal(dAtA []byte) error { m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var stringLen uint64 + m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -861,59 +2268,114 @@ func (m *MsgRequestLoan) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTx } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRepayLoanResponse) 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 ErrIntOverflowTx } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRepayLoanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRepayLoanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTx } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Fee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgLiquidateLoan) 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 ErrIntOverflowTx + } + 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: MsgLiquidateLoan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgLiquidateLoan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Collateral", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -941,13 +2403,13 @@ func (m *MsgRequestLoan) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Collateral = string(dAtA[iNdEx:postIndex]) + m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deadline", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var stringLen uint64 + m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -957,24 +2419,11 @@ func (m *MsgRequestLoan) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Deadline = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -996,7 +2445,7 @@ func (m *MsgRequestLoan) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRequestLoanResponse) Unmarshal(dAtA []byte) error { +func (m *MsgLiquidateLoanResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1019,10 +2468,10 @@ func (m *MsgRequestLoanResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRequestLoanResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgLiquidateLoanResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRequestLoanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgLiquidateLoanResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: