diff --git a/api/cerc/bond/v1/query.pulsar.go b/api/cerc/bond/v1/query.pulsar.go index e4a0a92de..d0bdf20e6 100644 --- a/api/cerc/bond/v1/query.pulsar.go +++ b/api/cerc/bond/v1/query.pulsar.go @@ -3,6 +3,7 @@ package bondv1 import ( v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + v1beta11 "cosmossdk.io/api/cosmos/base/v1beta1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -15,6 +16,797 @@ import ( sync "sync" ) +var ( + md_QueryParamsRequest protoreflect.MessageDescriptor +) + +func init() { + file_cerc_bond_v1_query_proto_init() + md_QueryParamsRequest = File_cerc_bond_v1_query_proto.Messages().ByName("QueryParamsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) + +type fastReflection_QueryParamsRequest QueryParamsRequest + +func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(x) +} + +func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_query_proto_msgTypes[0] + 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_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} + +type fastReflection_QueryParamsRequest_messageType struct{} + +func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(nil) +} +func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} +func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// 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_QueryParamsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryParamsRequest)(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_QueryParamsRequest) 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryParamsRequest 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_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryParamsRequest 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_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryParamsRequest 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_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryParamsRequest 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_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryParamsRequest 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_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryParamsRequest 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_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.QueryParamsRequest", 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsRequest) + 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().(*QueryParamsRequest) + 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().(*QueryParamsRequest) + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: 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_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor +) + +func init() { + file_cerc_bond_v1_query_proto_init() + md_QueryParamsResponse = File_cerc_bond_v1_query_proto.Messages().ByName("QueryParamsResponse") + fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) + +type fastReflection_QueryParamsResponse QueryParamsResponse + +func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(x) +} + +func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_query_proto_msgTypes[1] + 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_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} + +type fastReflection_QueryParamsResponse_messageType struct{} + +func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(nil) +} +func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} +func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// 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_QueryParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryParamsResponse)(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_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryParamsResponse_params, 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_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cerc.bond.v1.QueryParamsResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryParamsResponse 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_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cerc.bond.v1.QueryParamsResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryParamsResponse 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_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cerc.bond.v1.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryParamsResponse 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_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cerc.bond.v1.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryParamsResponse 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_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.QueryParamsResponse.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryParamsResponse 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_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryParamsResponse 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_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.QueryParamsResponse", 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsResponse) + 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.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(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().(*QueryParamsResponse) + 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.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + 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().(*QueryParamsResponse) + 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: 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 Params", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + 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_QueryGetBondsRequest protoreflect.MessageDescriptor fd_QueryGetBondsRequest_pagination protoreflect.FieldDescriptor @@ -35,7 +827,7 @@ func (x *QueryGetBondsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryGetBondsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cerc_bond_v1_query_proto_msgTypes[0] + mi := &file_cerc_bond_v1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -523,7 +1315,7 @@ func (x *QueryGetBondsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryGetBondsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cerc_bond_v1_query_proto_msgTypes[1] + mi := &file_cerc_bond_v1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1023,6 +1815,2783 @@ func (x *fastReflection_QueryGetBondsResponse) ProtoMethods() *protoiface.Method } } +var ( + md_QueryGetBondByIdRequest protoreflect.MessageDescriptor + fd_QueryGetBondByIdRequest_id protoreflect.FieldDescriptor +) + +func init() { + file_cerc_bond_v1_query_proto_init() + md_QueryGetBondByIdRequest = File_cerc_bond_v1_query_proto.Messages().ByName("QueryGetBondByIdRequest") + fd_QueryGetBondByIdRequest_id = md_QueryGetBondByIdRequest.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetBondByIdRequest)(nil) + +type fastReflection_QueryGetBondByIdRequest QueryGetBondByIdRequest + +func (x *QueryGetBondByIdRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetBondByIdRequest)(x) +} + +func (x *QueryGetBondByIdRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_query_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_QueryGetBondByIdRequest_messageType fastReflection_QueryGetBondByIdRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetBondByIdRequest_messageType{} + +type fastReflection_QueryGetBondByIdRequest_messageType struct{} + +func (x fastReflection_QueryGetBondByIdRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetBondByIdRequest)(nil) +} +func (x fastReflection_QueryGetBondByIdRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetBondByIdRequest) +} +func (x fastReflection_QueryGetBondByIdRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetBondByIdRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetBondByIdRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetBondByIdRequest +} + +// 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_QueryGetBondByIdRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryGetBondByIdRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetBondByIdRequest) New() protoreflect.Message { + return new(fastReflection_QueryGetBondByIdRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetBondByIdRequest) Interface() protoreflect.ProtoMessage { + return (*QueryGetBondByIdRequest)(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_QueryGetBondByIdRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_QueryGetBondByIdRequest_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_QueryGetBondByIdRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondByIdRequest.id": + return x.Id != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondByIdRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondByIdRequest 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_QueryGetBondByIdRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondByIdRequest.id": + x.Id = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondByIdRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondByIdRequest 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_QueryGetBondByIdRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cerc.bond.v1.QueryGetBondByIdRequest.id": + value := x.Id + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondByIdRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondByIdRequest 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_QueryGetBondByIdRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondByIdRequest.id": + x.Id = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondByIdRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondByIdRequest 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_QueryGetBondByIdRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondByIdRequest.id": + panic(fmt.Errorf("field id of message cerc.bond.v1.QueryGetBondByIdRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondByIdRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondByIdRequest 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_QueryGetBondByIdRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondByIdRequest.id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondByIdRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondByIdRequest 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_QueryGetBondByIdRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.QueryGetBondByIdRequest", 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_QueryGetBondByIdRequest) 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_QueryGetBondByIdRequest) 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_QueryGetBondByIdRequest) 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_QueryGetBondByIdRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetBondByIdRequest) + 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.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(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().(*QueryGetBondByIdRequest) + 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 len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + 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().(*QueryGetBondByIdRequest) + 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: QueryGetBondByIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetBondByIdRequest: 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 Id", 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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_QueryGetBondByIdResponse protoreflect.MessageDescriptor + fd_QueryGetBondByIdResponse_bond protoreflect.FieldDescriptor +) + +func init() { + file_cerc_bond_v1_query_proto_init() + md_QueryGetBondByIdResponse = File_cerc_bond_v1_query_proto.Messages().ByName("QueryGetBondByIdResponse") + fd_QueryGetBondByIdResponse_bond = md_QueryGetBondByIdResponse.Fields().ByName("bond") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetBondByIdResponse)(nil) + +type fastReflection_QueryGetBondByIdResponse QueryGetBondByIdResponse + +func (x *QueryGetBondByIdResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetBondByIdResponse)(x) +} + +func (x *QueryGetBondByIdResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_query_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_QueryGetBondByIdResponse_messageType fastReflection_QueryGetBondByIdResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetBondByIdResponse_messageType{} + +type fastReflection_QueryGetBondByIdResponse_messageType struct{} + +func (x fastReflection_QueryGetBondByIdResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetBondByIdResponse)(nil) +} +func (x fastReflection_QueryGetBondByIdResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetBondByIdResponse) +} +func (x fastReflection_QueryGetBondByIdResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetBondByIdResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetBondByIdResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetBondByIdResponse +} + +// 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_QueryGetBondByIdResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryGetBondByIdResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetBondByIdResponse) New() protoreflect.Message { + return new(fastReflection_QueryGetBondByIdResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetBondByIdResponse) Interface() protoreflect.ProtoMessage { + return (*QueryGetBondByIdResponse)(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_QueryGetBondByIdResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Bond != nil { + value := protoreflect.ValueOfMessage(x.Bond.ProtoReflect()) + if !f(fd_QueryGetBondByIdResponse_bond, 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_QueryGetBondByIdResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondByIdResponse.bond": + return x.Bond != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondByIdResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondByIdResponse 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_QueryGetBondByIdResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondByIdResponse.bond": + x.Bond = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondByIdResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondByIdResponse 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_QueryGetBondByIdResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cerc.bond.v1.QueryGetBondByIdResponse.bond": + value := x.Bond + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondByIdResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondByIdResponse 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_QueryGetBondByIdResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondByIdResponse.bond": + x.Bond = value.Message().Interface().(*Bond) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondByIdResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondByIdResponse 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_QueryGetBondByIdResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondByIdResponse.bond": + if x.Bond == nil { + x.Bond = new(Bond) + } + return protoreflect.ValueOfMessage(x.Bond.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondByIdResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondByIdResponse 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_QueryGetBondByIdResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondByIdResponse.bond": + m := new(Bond) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondByIdResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondByIdResponse 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_QueryGetBondByIdResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.QueryGetBondByIdResponse", 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_QueryGetBondByIdResponse) 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_QueryGetBondByIdResponse) 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_QueryGetBondByIdResponse) 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_QueryGetBondByIdResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetBondByIdResponse) + 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.Bond != nil { + l = options.Size(x.Bond) + n += 1 + l + runtime.Sov(uint64(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().(*QueryGetBondByIdResponse) + 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.Bond != nil { + encoded, err := options.Marshal(x.Bond) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + 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().(*QueryGetBondByIdResponse) + 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: QueryGetBondByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetBondByIdResponse: 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 Bond", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Bond == nil { + x.Bond = &Bond{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Bond); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + 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_QueryGetBondsByOwnerRequest protoreflect.MessageDescriptor + fd_QueryGetBondsByOwnerRequest_owner protoreflect.FieldDescriptor + fd_QueryGetBondsByOwnerRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_cerc_bond_v1_query_proto_init() + md_QueryGetBondsByOwnerRequest = File_cerc_bond_v1_query_proto.Messages().ByName("QueryGetBondsByOwnerRequest") + fd_QueryGetBondsByOwnerRequest_owner = md_QueryGetBondsByOwnerRequest.Fields().ByName("owner") + fd_QueryGetBondsByOwnerRequest_pagination = md_QueryGetBondsByOwnerRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetBondsByOwnerRequest)(nil) + +type fastReflection_QueryGetBondsByOwnerRequest QueryGetBondsByOwnerRequest + +func (x *QueryGetBondsByOwnerRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetBondsByOwnerRequest)(x) +} + +func (x *QueryGetBondsByOwnerRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_query_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_QueryGetBondsByOwnerRequest_messageType fastReflection_QueryGetBondsByOwnerRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetBondsByOwnerRequest_messageType{} + +type fastReflection_QueryGetBondsByOwnerRequest_messageType struct{} + +func (x fastReflection_QueryGetBondsByOwnerRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetBondsByOwnerRequest)(nil) +} +func (x fastReflection_QueryGetBondsByOwnerRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetBondsByOwnerRequest) +} +func (x fastReflection_QueryGetBondsByOwnerRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetBondsByOwnerRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetBondsByOwnerRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetBondsByOwnerRequest +} + +// 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_QueryGetBondsByOwnerRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryGetBondsByOwnerRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetBondsByOwnerRequest) New() protoreflect.Message { + return new(fastReflection_QueryGetBondsByOwnerRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetBondsByOwnerRequest) Interface() protoreflect.ProtoMessage { + return (*QueryGetBondsByOwnerRequest)(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_QueryGetBondsByOwnerRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Owner != "" { + value := protoreflect.ValueOfString(x.Owner) + if !f(fd_QueryGetBondsByOwnerRequest_owner, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryGetBondsByOwnerRequest_pagination, 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_QueryGetBondsByOwnerRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondsByOwnerRequest.owner": + return x.Owner != "" + case "cerc.bond.v1.QueryGetBondsByOwnerRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondsByOwnerRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondsByOwnerRequest 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_QueryGetBondsByOwnerRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondsByOwnerRequest.owner": + x.Owner = "" + case "cerc.bond.v1.QueryGetBondsByOwnerRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondsByOwnerRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondsByOwnerRequest 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_QueryGetBondsByOwnerRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cerc.bond.v1.QueryGetBondsByOwnerRequest.owner": + value := x.Owner + return protoreflect.ValueOfString(value) + case "cerc.bond.v1.QueryGetBondsByOwnerRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondsByOwnerRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondsByOwnerRequest 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_QueryGetBondsByOwnerRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondsByOwnerRequest.owner": + x.Owner = value.Interface().(string) + case "cerc.bond.v1.QueryGetBondsByOwnerRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondsByOwnerRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondsByOwnerRequest 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_QueryGetBondsByOwnerRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondsByOwnerRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "cerc.bond.v1.QueryGetBondsByOwnerRequest.owner": + panic(fmt.Errorf("field owner of message cerc.bond.v1.QueryGetBondsByOwnerRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondsByOwnerRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondsByOwnerRequest 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_QueryGetBondsByOwnerRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondsByOwnerRequest.owner": + return protoreflect.ValueOfString("") + case "cerc.bond.v1.QueryGetBondsByOwnerRequest.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondsByOwnerRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondsByOwnerRequest 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_QueryGetBondsByOwnerRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.QueryGetBondsByOwnerRequest", 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_QueryGetBondsByOwnerRequest) 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_QueryGetBondsByOwnerRequest) 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_QueryGetBondsByOwnerRequest) 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_QueryGetBondsByOwnerRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetBondsByOwnerRequest) + 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.Owner) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(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().(*QueryGetBondsByOwnerRequest) + 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.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Owner) > 0 { + i -= len(x.Owner) + copy(dAtA[i:], x.Owner) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) + 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().(*QueryGetBondsByOwnerRequest) + 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: QueryGetBondsByOwnerRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetBondsByOwnerRequest: 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 Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + 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 _ protoreflect.List = (*_QueryGetBondsByOwnerResponse_1_list)(nil) + +type _QueryGetBondsByOwnerResponse_1_list struct { + list *[]*Bond +} + +func (x *_QueryGetBondsByOwnerResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryGetBondsByOwnerResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryGetBondsByOwnerResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Bond) + (*x.list)[i] = concreteValue +} + +func (x *_QueryGetBondsByOwnerResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Bond) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryGetBondsByOwnerResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Bond) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryGetBondsByOwnerResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryGetBondsByOwnerResponse_1_list) NewElement() protoreflect.Value { + v := new(Bond) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryGetBondsByOwnerResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryGetBondsByOwnerResponse protoreflect.MessageDescriptor + fd_QueryGetBondsByOwnerResponse_bonds protoreflect.FieldDescriptor + fd_QueryGetBondsByOwnerResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_cerc_bond_v1_query_proto_init() + md_QueryGetBondsByOwnerResponse = File_cerc_bond_v1_query_proto.Messages().ByName("QueryGetBondsByOwnerResponse") + fd_QueryGetBondsByOwnerResponse_bonds = md_QueryGetBondsByOwnerResponse.Fields().ByName("bonds") + fd_QueryGetBondsByOwnerResponse_pagination = md_QueryGetBondsByOwnerResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetBondsByOwnerResponse)(nil) + +type fastReflection_QueryGetBondsByOwnerResponse QueryGetBondsByOwnerResponse + +func (x *QueryGetBondsByOwnerResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetBondsByOwnerResponse)(x) +} + +func (x *QueryGetBondsByOwnerResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_query_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_QueryGetBondsByOwnerResponse_messageType fastReflection_QueryGetBondsByOwnerResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetBondsByOwnerResponse_messageType{} + +type fastReflection_QueryGetBondsByOwnerResponse_messageType struct{} + +func (x fastReflection_QueryGetBondsByOwnerResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetBondsByOwnerResponse)(nil) +} +func (x fastReflection_QueryGetBondsByOwnerResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetBondsByOwnerResponse) +} +func (x fastReflection_QueryGetBondsByOwnerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetBondsByOwnerResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetBondsByOwnerResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetBondsByOwnerResponse +} + +// 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_QueryGetBondsByOwnerResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryGetBondsByOwnerResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetBondsByOwnerResponse) New() protoreflect.Message { + return new(fastReflection_QueryGetBondsByOwnerResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetBondsByOwnerResponse) Interface() protoreflect.ProtoMessage { + return (*QueryGetBondsByOwnerResponse)(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_QueryGetBondsByOwnerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Bonds) != 0 { + value := protoreflect.ValueOfList(&_QueryGetBondsByOwnerResponse_1_list{list: &x.Bonds}) + if !f(fd_QueryGetBondsByOwnerResponse_bonds, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryGetBondsByOwnerResponse_pagination, 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_QueryGetBondsByOwnerResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondsByOwnerResponse.bonds": + return len(x.Bonds) != 0 + case "cerc.bond.v1.QueryGetBondsByOwnerResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondsByOwnerResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondsByOwnerResponse 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_QueryGetBondsByOwnerResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondsByOwnerResponse.bonds": + x.Bonds = nil + case "cerc.bond.v1.QueryGetBondsByOwnerResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondsByOwnerResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondsByOwnerResponse 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_QueryGetBondsByOwnerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cerc.bond.v1.QueryGetBondsByOwnerResponse.bonds": + if len(x.Bonds) == 0 { + return protoreflect.ValueOfList(&_QueryGetBondsByOwnerResponse_1_list{}) + } + listValue := &_QueryGetBondsByOwnerResponse_1_list{list: &x.Bonds} + return protoreflect.ValueOfList(listValue) + case "cerc.bond.v1.QueryGetBondsByOwnerResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondsByOwnerResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondsByOwnerResponse 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_QueryGetBondsByOwnerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondsByOwnerResponse.bonds": + lv := value.List() + clv := lv.(*_QueryGetBondsByOwnerResponse_1_list) + x.Bonds = *clv.list + case "cerc.bond.v1.QueryGetBondsByOwnerResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondsByOwnerResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondsByOwnerResponse 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_QueryGetBondsByOwnerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondsByOwnerResponse.bonds": + if x.Bonds == nil { + x.Bonds = []*Bond{} + } + value := &_QueryGetBondsByOwnerResponse_1_list{list: &x.Bonds} + return protoreflect.ValueOfList(value) + case "cerc.bond.v1.QueryGetBondsByOwnerResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondsByOwnerResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondsByOwnerResponse 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_QueryGetBondsByOwnerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondsByOwnerResponse.bonds": + list := []*Bond{} + return protoreflect.ValueOfList(&_QueryGetBondsByOwnerResponse_1_list{list: &list}) + case "cerc.bond.v1.QueryGetBondsByOwnerResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondsByOwnerResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondsByOwnerResponse 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_QueryGetBondsByOwnerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.QueryGetBondsByOwnerResponse", 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_QueryGetBondsByOwnerResponse) 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_QueryGetBondsByOwnerResponse) 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_QueryGetBondsByOwnerResponse) 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_QueryGetBondsByOwnerResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetBondsByOwnerResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Bonds) > 0 { + for _, e := range x.Bonds { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(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().(*QueryGetBondsByOwnerResponse) + 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.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Bonds) > 0 { + for iNdEx := len(x.Bonds) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Bonds[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + 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().(*QueryGetBondsByOwnerResponse) + 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: QueryGetBondsByOwnerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetBondsByOwnerResponse: 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 Bonds", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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.Bonds = append(x.Bonds, &Bond{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Bonds[len(x.Bonds)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + 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_QueryGetBondModuleBalanceRequest protoreflect.MessageDescriptor +) + +func init() { + file_cerc_bond_v1_query_proto_init() + md_QueryGetBondModuleBalanceRequest = File_cerc_bond_v1_query_proto.Messages().ByName("QueryGetBondModuleBalanceRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetBondModuleBalanceRequest)(nil) + +type fastReflection_QueryGetBondModuleBalanceRequest QueryGetBondModuleBalanceRequest + +func (x *QueryGetBondModuleBalanceRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetBondModuleBalanceRequest)(x) +} + +func (x *QueryGetBondModuleBalanceRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_query_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_QueryGetBondModuleBalanceRequest_messageType fastReflection_QueryGetBondModuleBalanceRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetBondModuleBalanceRequest_messageType{} + +type fastReflection_QueryGetBondModuleBalanceRequest_messageType struct{} + +func (x fastReflection_QueryGetBondModuleBalanceRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetBondModuleBalanceRequest)(nil) +} +func (x fastReflection_QueryGetBondModuleBalanceRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetBondModuleBalanceRequest) +} +func (x fastReflection_QueryGetBondModuleBalanceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetBondModuleBalanceRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetBondModuleBalanceRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetBondModuleBalanceRequest +} + +// 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_QueryGetBondModuleBalanceRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryGetBondModuleBalanceRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetBondModuleBalanceRequest) New() protoreflect.Message { + return new(fastReflection_QueryGetBondModuleBalanceRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetBondModuleBalanceRequest) Interface() protoreflect.ProtoMessage { + return (*QueryGetBondModuleBalanceRequest)(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_QueryGetBondModuleBalanceRequest) 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_QueryGetBondModuleBalanceRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondModuleBalanceRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondModuleBalanceRequest 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_QueryGetBondModuleBalanceRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondModuleBalanceRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondModuleBalanceRequest 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_QueryGetBondModuleBalanceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondModuleBalanceRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondModuleBalanceRequest 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_QueryGetBondModuleBalanceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondModuleBalanceRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondModuleBalanceRequest 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_QueryGetBondModuleBalanceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondModuleBalanceRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondModuleBalanceRequest 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_QueryGetBondModuleBalanceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondModuleBalanceRequest")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondModuleBalanceRequest 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_QueryGetBondModuleBalanceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.QueryGetBondModuleBalanceRequest", 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_QueryGetBondModuleBalanceRequest) 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_QueryGetBondModuleBalanceRequest) 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_QueryGetBondModuleBalanceRequest) 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_QueryGetBondModuleBalanceRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetBondModuleBalanceRequest) + 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().(*QueryGetBondModuleBalanceRequest) + 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().(*QueryGetBondModuleBalanceRequest) + 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: QueryGetBondModuleBalanceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetBondModuleBalanceRequest: 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 _ protoreflect.List = (*_QueryGetBondModuleBalanceResponse_2_list)(nil) + +type _QueryGetBondModuleBalanceResponse_2_list struct { + list *[]*v1beta11.Coin +} + +func (x *_QueryGetBondModuleBalanceResponse_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryGetBondModuleBalanceResponse_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryGetBondModuleBalanceResponse_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta11.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_QueryGetBondModuleBalanceResponse_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta11.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryGetBondModuleBalanceResponse_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta11.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryGetBondModuleBalanceResponse_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryGetBondModuleBalanceResponse_2_list) NewElement() protoreflect.Value { + v := new(v1beta11.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryGetBondModuleBalanceResponse_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryGetBondModuleBalanceResponse protoreflect.MessageDescriptor + fd_QueryGetBondModuleBalanceResponse_balance protoreflect.FieldDescriptor +) + +func init() { + file_cerc_bond_v1_query_proto_init() + md_QueryGetBondModuleBalanceResponse = File_cerc_bond_v1_query_proto.Messages().ByName("QueryGetBondModuleBalanceResponse") + fd_QueryGetBondModuleBalanceResponse_balance = md_QueryGetBondModuleBalanceResponse.Fields().ByName("balance") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetBondModuleBalanceResponse)(nil) + +type fastReflection_QueryGetBondModuleBalanceResponse QueryGetBondModuleBalanceResponse + +func (x *QueryGetBondModuleBalanceResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetBondModuleBalanceResponse)(x) +} + +func (x *QueryGetBondModuleBalanceResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_query_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_QueryGetBondModuleBalanceResponse_messageType fastReflection_QueryGetBondModuleBalanceResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetBondModuleBalanceResponse_messageType{} + +type fastReflection_QueryGetBondModuleBalanceResponse_messageType struct{} + +func (x fastReflection_QueryGetBondModuleBalanceResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetBondModuleBalanceResponse)(nil) +} +func (x fastReflection_QueryGetBondModuleBalanceResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetBondModuleBalanceResponse) +} +func (x fastReflection_QueryGetBondModuleBalanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetBondModuleBalanceResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetBondModuleBalanceResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetBondModuleBalanceResponse +} + +// 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_QueryGetBondModuleBalanceResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryGetBondModuleBalanceResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetBondModuleBalanceResponse) New() protoreflect.Message { + return new(fastReflection_QueryGetBondModuleBalanceResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetBondModuleBalanceResponse) Interface() protoreflect.ProtoMessage { + return (*QueryGetBondModuleBalanceResponse)(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_QueryGetBondModuleBalanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Balance) != 0 { + value := protoreflect.ValueOfList(&_QueryGetBondModuleBalanceResponse_2_list{list: &x.Balance}) + if !f(fd_QueryGetBondModuleBalanceResponse_balance, 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_QueryGetBondModuleBalanceResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondModuleBalanceResponse.balance": + return len(x.Balance) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondModuleBalanceResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondModuleBalanceResponse 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_QueryGetBondModuleBalanceResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondModuleBalanceResponse.balance": + x.Balance = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondModuleBalanceResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondModuleBalanceResponse 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_QueryGetBondModuleBalanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cerc.bond.v1.QueryGetBondModuleBalanceResponse.balance": + if len(x.Balance) == 0 { + return protoreflect.ValueOfList(&_QueryGetBondModuleBalanceResponse_2_list{}) + } + listValue := &_QueryGetBondModuleBalanceResponse_2_list{list: &x.Balance} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondModuleBalanceResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondModuleBalanceResponse 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_QueryGetBondModuleBalanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondModuleBalanceResponse.balance": + lv := value.List() + clv := lv.(*_QueryGetBondModuleBalanceResponse_2_list) + x.Balance = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondModuleBalanceResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondModuleBalanceResponse 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_QueryGetBondModuleBalanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondModuleBalanceResponse.balance": + if x.Balance == nil { + x.Balance = []*v1beta11.Coin{} + } + value := &_QueryGetBondModuleBalanceResponse_2_list{list: &x.Balance} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondModuleBalanceResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondModuleBalanceResponse 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_QueryGetBondModuleBalanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.QueryGetBondModuleBalanceResponse.balance": + list := []*v1beta11.Coin{} + return protoreflect.ValueOfList(&_QueryGetBondModuleBalanceResponse_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.QueryGetBondModuleBalanceResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.QueryGetBondModuleBalanceResponse 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_QueryGetBondModuleBalanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.QueryGetBondModuleBalanceResponse", 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_QueryGetBondModuleBalanceResponse) 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_QueryGetBondModuleBalanceResponse) 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_QueryGetBondModuleBalanceResponse) 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_QueryGetBondModuleBalanceResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetBondModuleBalanceResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Balance) > 0 { + for _, e := range x.Balance { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(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().(*QueryGetBondModuleBalanceResponse) + 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 len(x.Balance) > 0 { + for iNdEx := len(x.Balance) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Balance[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + 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().(*QueryGetBondModuleBalanceResponse) + 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: QueryGetBondModuleBalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetBondModuleBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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.Balance = append(x.Balance, &v1beta11.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Balance[len(x.Balance)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + 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 @@ -1036,6 +4605,69 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// QueryParamsRequest is request for query the bond module params +type QueryParamsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryParamsRequest) Reset() { + *x = QueryParamsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsRequest) ProtoMessage() {} + +// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_query_proto_rawDescGZIP(), []int{0} +} + +// QueryParamsResponse returns response type of bond module params +type QueryParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsResponse) ProtoMessage() {} + +// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryParamsResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + // QueryGetBondById queries a bonds. type QueryGetBondsRequest struct { state protoimpl.MessageState @@ -1049,7 +4681,7 @@ type QueryGetBondsRequest struct { func (x *QueryGetBondsRequest) Reset() { *x = QueryGetBondsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cerc_bond_v1_query_proto_msgTypes[0] + mi := &file_cerc_bond_v1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1063,7 +4695,7 @@ func (*QueryGetBondsRequest) ProtoMessage() {} // Deprecated: Use QueryGetBondsRequest.ProtoReflect.Descriptor instead. func (*QueryGetBondsRequest) Descriptor() ([]byte, []int) { - return file_cerc_bond_v1_query_proto_rawDescGZIP(), []int{0} + return file_cerc_bond_v1_query_proto_rawDescGZIP(), []int{2} } func (x *QueryGetBondsRequest) GetPagination() *v1beta1.PageRequest { @@ -1087,7 +4719,7 @@ type QueryGetBondsResponse struct { func (x *QueryGetBondsResponse) Reset() { *x = QueryGetBondsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cerc_bond_v1_query_proto_msgTypes[1] + mi := &file_cerc_bond_v1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1101,7 +4733,7 @@ func (*QueryGetBondsResponse) ProtoMessage() {} // Deprecated: Use QueryGetBondsResponse.ProtoReflect.Descriptor instead. func (*QueryGetBondsResponse) Descriptor() ([]byte, []int) { - return file_cerc_bond_v1_query_proto_rawDescGZIP(), []int{1} + return file_cerc_bond_v1_query_proto_rawDescGZIP(), []int{3} } func (x *QueryGetBondsResponse) GetBonds() []*Bond { @@ -1118,6 +4750,231 @@ func (x *QueryGetBondsResponse) GetPagination() *v1beta1.PageResponse { return nil } +// QueryGetBondById +type QueryGetBondByIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *QueryGetBondByIdRequest) Reset() { + *x = QueryGetBondByIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetBondByIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetBondByIdRequest) ProtoMessage() {} + +// Deprecated: Use QueryGetBondByIdRequest.ProtoReflect.Descriptor instead. +func (*QueryGetBondByIdRequest) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryGetBondByIdRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// QueryGetBondByIdResponse returns QueryGetBondById query response +type QueryGetBondByIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bond *Bond `protobuf:"bytes,1,opt,name=bond,proto3" json:"bond,omitempty"` +} + +func (x *QueryGetBondByIdResponse) Reset() { + *x = QueryGetBondByIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetBondByIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetBondByIdResponse) ProtoMessage() {} + +// Deprecated: Use QueryGetBondByIdResponse.ProtoReflect.Descriptor instead. +func (*QueryGetBondByIdResponse) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryGetBondByIdResponse) GetBond() *Bond { + if x != nil { + return x.Bond + } + return nil +} + +// QueryGetBondsByOwnerRequest is request type for Query/GetBondsByOwner RPC Method +type QueryGetBondsByOwnerRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // pagination defines the pagination in the response. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryGetBondsByOwnerRequest) Reset() { + *x = QueryGetBondsByOwnerRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetBondsByOwnerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetBondsByOwnerRequest) ProtoMessage() {} + +// Deprecated: Use QueryGetBondsByOwnerRequest.ProtoReflect.Descriptor instead. +func (*QueryGetBondsByOwnerRequest) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryGetBondsByOwnerRequest) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *QueryGetBondsByOwnerRequest) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryGetBondsByOwnerResponse is response type for Query/GetBondsByOwner RPC Method +type QueryGetBondsByOwnerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bonds []*Bond `protobuf:"bytes,1,rep,name=bonds,proto3" json:"bonds,omitempty"` + // pagination defines the pagination in the response. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryGetBondsByOwnerResponse) Reset() { + *x = QueryGetBondsByOwnerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetBondsByOwnerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetBondsByOwnerResponse) ProtoMessage() {} + +// Deprecated: Use QueryGetBondsByOwnerResponse.ProtoReflect.Descriptor instead. +func (*QueryGetBondsByOwnerResponse) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryGetBondsByOwnerResponse) GetBonds() []*Bond { + if x != nil { + return x.Bonds + } + return nil +} + +func (x *QueryGetBondsByOwnerResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryGetBondModuleBalanceRequest is request type for bond module balance rpc method +type QueryGetBondModuleBalanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryGetBondModuleBalanceRequest) Reset() { + *x = QueryGetBondModuleBalanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetBondModuleBalanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetBondModuleBalanceRequest) ProtoMessage() {} + +// Deprecated: Use QueryGetBondModuleBalanceRequest.ProtoReflect.Descriptor instead. +func (*QueryGetBondModuleBalanceRequest) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_query_proto_rawDescGZIP(), []int{8} +} + +// QueryGetBondModuleBalanceResponse is the response type for bond module balance rpc method +type QueryGetBondModuleBalanceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Balance []*v1beta11.Coin `protobuf:"bytes,2,rep,name=balance,proto3" json:"balance,omitempty"` +} + +func (x *QueryGetBondModuleBalanceResponse) Reset() { + *x = QueryGetBondModuleBalanceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetBondModuleBalanceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetBondModuleBalanceResponse) ProtoMessage() {} + +// Deprecated: Use QueryGetBondModuleBalanceResponse.ProtoReflect.Descriptor instead. +func (*QueryGetBondModuleBalanceResponse) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryGetBondModuleBalanceResponse) GetBalance() []*v1beta11.Coin { + if x != nil { + return x.Balance + } + return nil +} + var File_cerc_bond_v1_query_proto protoreflect.FileDescriptor var file_cerc_bond_v1_query_proto_rawDesc = []byte{ @@ -1131,31 +4988,117 @@ var file_cerc_bond_v1_query_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x5e, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, - 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0xa9, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, - 0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x05, 0x62, - 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x65, 0x72, - 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6e, 0x64, 0x42, 0x1d, - 0xf2, 0xde, 0x1f, 0x19, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x62, 0x6f, 0x6e, 0x64, 0x73, 0x22, - 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x52, 0x05, 0x62, - 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x76, 0x0a, - 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6d, 0x0a, 0x05, 0x42, 0x6f, 0x6e, 0x64, 0x73, 0x12, - 0x22, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, - 0x12, 0x13, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x62, 0x6f, 0x6e, 0x64, 0x2f, 0x76, 0x31, 0x2f, - 0x62, 0x6f, 0x6e, 0x64, 0x73, 0x42, 0xa6, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, + 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x64, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x42, 0x1f, 0xf2, 0xde, 0x1f, 0x1b, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x22, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x5e, 0x0a, + 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa9, 0x01, + 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x05, 0x62, 0x6f, 0x6e, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, + 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6e, 0x64, 0x42, 0x1d, 0xf2, 0xde, 0x1f, 0x19, + 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x62, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x62, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x52, 0x05, 0x62, 0x6f, 0x6e, 0x64, 0x73, + 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x42, 0x0a, 0x17, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x69, 0x64, 0x22, 0x20, + 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x69, 0x64, 0x22, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5f, 0x0a, + 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x42, 0x79, 0x49, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x62, 0x6f, 0x6e, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, + 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6e, 0x64, 0x42, 0x1b, 0xf2, 0xde, 0x1f, + 0x17, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x62, 0x6f, 0x6e, 0x64, 0x22, 0x20, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x62, 0x6f, 0x6e, 0x64, 0x22, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x22, 0x7c, + 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x73, 0x42, + 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb4, 0x01, 0x0a, + 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x73, 0x42, 0x79, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, + 0x05, 0x62, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, + 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6e, 0x64, + 0x42, 0x21, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x19, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, + 0x62, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x6f, 0x6e, + 0x64, 0x73, 0x22, 0x52, 0x05, 0x62, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x22, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, + 0x6f, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa8, 0x01, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, + 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x4d, 0xc8, 0xde, 0x1f, 0x00, + 0xf2, 0xde, 0x1f, 0x19, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x22, + 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x22, 0xaa, 0xdf, 0x1f, + 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x32, 0x90, 0x05, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x06, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x20, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, + 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, + 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x62, 0x6f, 0x6e, 0x64, 0x2f, + 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6d, 0x0a, 0x05, 0x42, 0x6f, 0x6e, + 0x64, 0x73, 0x12, 0x22, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, + 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, + 0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x62, 0x6f, 0x6e, 0x64, 0x2f, + 0x76, 0x31, 0x2f, 0x62, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x7e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x42, + 0x6f, 0x6e, 0x64, 0x42, 0x79, 0x49, 0x64, 0x12, 0x25, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, + 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, + 0x6f, 0x6e, 0x64, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, + 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, + 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x62, 0x6f, 0x6e, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6f, + 0x6e, 0x64, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x90, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x42, 0x6f, 0x6e, 0x64, 0x73, 0x42, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x29, 0x2e, 0x63, + 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x73, 0x42, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, + 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, + 0x6f, 0x6e, 0x64, 0x73, 0x42, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x63, 0x65, + 0x72, 0x63, 0x2f, 0x62, 0x6f, 0x6e, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x79, 0x2d, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x15, + 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, 0x64, 0x73, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, + 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6e, + 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, + 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x62, 0x6f, 0x6e, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x42, 0xa6, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, @@ -1181,25 +5124,49 @@ func file_cerc_bond_v1_query_proto_rawDescGZIP() []byte { return file_cerc_bond_v1_query_proto_rawDescData } -var file_cerc_bond_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cerc_bond_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_cerc_bond_v1_query_proto_goTypes = []interface{}{ - (*QueryGetBondsRequest)(nil), // 0: cerc.bond.v1.QueryGetBondsRequest - (*QueryGetBondsResponse)(nil), // 1: cerc.bond.v1.QueryGetBondsResponse - (*v1beta1.PageRequest)(nil), // 2: cosmos.base.query.v1beta1.PageRequest - (*Bond)(nil), // 3: cerc.bond.v1.Bond - (*v1beta1.PageResponse)(nil), // 4: cosmos.base.query.v1beta1.PageResponse + (*QueryParamsRequest)(nil), // 0: cerc.bond.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: cerc.bond.v1.QueryParamsResponse + (*QueryGetBondsRequest)(nil), // 2: cerc.bond.v1.QueryGetBondsRequest + (*QueryGetBondsResponse)(nil), // 3: cerc.bond.v1.QueryGetBondsResponse + (*QueryGetBondByIdRequest)(nil), // 4: cerc.bond.v1.QueryGetBondByIdRequest + (*QueryGetBondByIdResponse)(nil), // 5: cerc.bond.v1.QueryGetBondByIdResponse + (*QueryGetBondsByOwnerRequest)(nil), // 6: cerc.bond.v1.QueryGetBondsByOwnerRequest + (*QueryGetBondsByOwnerResponse)(nil), // 7: cerc.bond.v1.QueryGetBondsByOwnerResponse + (*QueryGetBondModuleBalanceRequest)(nil), // 8: cerc.bond.v1.QueryGetBondModuleBalanceRequest + (*QueryGetBondModuleBalanceResponse)(nil), // 9: cerc.bond.v1.QueryGetBondModuleBalanceResponse + (*Params)(nil), // 10: cerc.bond.v1.Params + (*v1beta1.PageRequest)(nil), // 11: cosmos.base.query.v1beta1.PageRequest + (*Bond)(nil), // 12: cerc.bond.v1.Bond + (*v1beta1.PageResponse)(nil), // 13: cosmos.base.query.v1beta1.PageResponse + (*v1beta11.Coin)(nil), // 14: cosmos.base.v1beta1.Coin } var file_cerc_bond_v1_query_proto_depIdxs = []int32{ - 2, // 0: cerc.bond.v1.QueryGetBondsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 3, // 1: cerc.bond.v1.QueryGetBondsResponse.bonds:type_name -> cerc.bond.v1.Bond - 4, // 2: cerc.bond.v1.QueryGetBondsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 3: cerc.bond.v1.Query.Bonds:input_type -> cerc.bond.v1.QueryGetBondsRequest - 1, // 4: cerc.bond.v1.Query.Bonds:output_type -> cerc.bond.v1.QueryGetBondsResponse - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 10, // 0: cerc.bond.v1.QueryParamsResponse.params:type_name -> cerc.bond.v1.Params + 11, // 1: cerc.bond.v1.QueryGetBondsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 12, // 2: cerc.bond.v1.QueryGetBondsResponse.bonds:type_name -> cerc.bond.v1.Bond + 13, // 3: cerc.bond.v1.QueryGetBondsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 12, // 4: cerc.bond.v1.QueryGetBondByIdResponse.bond:type_name -> cerc.bond.v1.Bond + 13, // 5: cerc.bond.v1.QueryGetBondsByOwnerRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 12, // 6: cerc.bond.v1.QueryGetBondsByOwnerResponse.bonds:type_name -> cerc.bond.v1.Bond + 13, // 7: cerc.bond.v1.QueryGetBondsByOwnerResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 14, // 8: cerc.bond.v1.QueryGetBondModuleBalanceResponse.balance:type_name -> cosmos.base.v1beta1.Coin + 0, // 9: cerc.bond.v1.Query.Params:input_type -> cerc.bond.v1.QueryParamsRequest + 2, // 10: cerc.bond.v1.Query.Bonds:input_type -> cerc.bond.v1.QueryGetBondsRequest + 4, // 11: cerc.bond.v1.Query.GetBondById:input_type -> cerc.bond.v1.QueryGetBondByIdRequest + 6, // 12: cerc.bond.v1.Query.GetBondsByOwner:input_type -> cerc.bond.v1.QueryGetBondsByOwnerRequest + 8, // 13: cerc.bond.v1.Query.GetBondsModuleBalance:input_type -> cerc.bond.v1.QueryGetBondModuleBalanceRequest + 1, // 14: cerc.bond.v1.Query.Params:output_type -> cerc.bond.v1.QueryParamsResponse + 3, // 15: cerc.bond.v1.Query.Bonds:output_type -> cerc.bond.v1.QueryGetBondsResponse + 5, // 16: cerc.bond.v1.Query.GetBondById:output_type -> cerc.bond.v1.QueryGetBondByIdResponse + 7, // 17: cerc.bond.v1.Query.GetBondsByOwner:output_type -> cerc.bond.v1.QueryGetBondsByOwnerResponse + 9, // 18: cerc.bond.v1.Query.GetBondsModuleBalance:output_type -> cerc.bond.v1.QueryGetBondModuleBalanceResponse + 14, // [14:19] is the sub-list for method output_type + 9, // [9:14] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_cerc_bond_v1_query_proto_init() } @@ -1210,7 +5177,7 @@ func file_cerc_bond_v1_query_proto_init() { file_cerc_bond_v1_bond_proto_init() if !protoimpl.UnsafeEnabled { file_cerc_bond_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetBondsRequest); i { + switch v := v.(*QueryParamsRequest); i { case 0: return &v.state case 1: @@ -1222,6 +5189,30 @@ func file_cerc_bond_v1_query_proto_init() { } } file_cerc_bond_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cerc_bond_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetBondsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cerc_bond_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGetBondsResponse); i { case 0: return &v.state @@ -1233,6 +5224,78 @@ func file_cerc_bond_v1_query_proto_init() { return nil } } + file_cerc_bond_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetBondByIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cerc_bond_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetBondByIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cerc_bond_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetBondsByOwnerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cerc_bond_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetBondsByOwnerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cerc_bond_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetBondModuleBalanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cerc_bond_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetBondModuleBalanceResponse); 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{ @@ -1240,7 +5303,7 @@ func file_cerc_bond_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cerc_bond_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cerc/bond/v1/query_grpc.pb.go b/api/cerc/bond/v1/query_grpc.pb.go index 0d7797bd7..bb8378ed9 100644 --- a/api/cerc/bond/v1/query_grpc.pb.go +++ b/api/cerc/bond/v1/query_grpc.pb.go @@ -19,15 +19,27 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Bonds_FullMethodName = "/cerc.bond.v1.Query/Bonds" + Query_Params_FullMethodName = "/cerc.bond.v1.Query/Params" + Query_Bonds_FullMethodName = "/cerc.bond.v1.Query/Bonds" + Query_GetBondById_FullMethodName = "/cerc.bond.v1.Query/GetBondById" + Query_GetBondsByOwner_FullMethodName = "/cerc.bond.v1.Query/GetBondsByOwner" + Query_GetBondsModuleBalance_FullMethodName = "/cerc.bond.v1.Query/GetBondsModuleBalance" ) // QueryClient is the client API for Query service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type QueryClient interface { - // Bonds queries bonds list. + // Params queries bonds module params. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Bonds queries bonds list Bonds(ctx context.Context, in *QueryGetBondsRequest, opts ...grpc.CallOption) (*QueryGetBondsResponse, error) + // GetBondById + GetBondById(ctx context.Context, in *QueryGetBondByIdRequest, opts ...grpc.CallOption) (*QueryGetBondByIdResponse, error) + // Get Bonds list by Owner + GetBondsByOwner(ctx context.Context, in *QueryGetBondsByOwnerRequest, opts ...grpc.CallOption) (*QueryGetBondsByOwnerResponse, error) + // Get Bond module balance + GetBondsModuleBalance(ctx context.Context, in *QueryGetBondModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetBondModuleBalanceResponse, error) } type queryClient struct { @@ -38,6 +50,15 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { return &queryClient{cc} } +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Bonds(ctx context.Context, in *QueryGetBondsRequest, opts ...grpc.CallOption) (*QueryGetBondsResponse, error) { out := new(QueryGetBondsResponse) err := c.cc.Invoke(ctx, Query_Bonds_FullMethodName, in, out, opts...) @@ -47,12 +68,47 @@ func (c *queryClient) Bonds(ctx context.Context, in *QueryGetBondsRequest, opts return out, nil } +func (c *queryClient) GetBondById(ctx context.Context, in *QueryGetBondByIdRequest, opts ...grpc.CallOption) (*QueryGetBondByIdResponse, error) { + out := new(QueryGetBondByIdResponse) + err := c.cc.Invoke(ctx, Query_GetBondById_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetBondsByOwner(ctx context.Context, in *QueryGetBondsByOwnerRequest, opts ...grpc.CallOption) (*QueryGetBondsByOwnerResponse, error) { + out := new(QueryGetBondsByOwnerResponse) + err := c.cc.Invoke(ctx, Query_GetBondsByOwner_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetBondsModuleBalance(ctx context.Context, in *QueryGetBondModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetBondModuleBalanceResponse, error) { + out := new(QueryGetBondModuleBalanceResponse) + err := c.cc.Invoke(ctx, Query_GetBondsModuleBalance_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility type QueryServer interface { - // Bonds queries bonds list. + // Params queries bonds module params. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Bonds queries bonds list Bonds(context.Context, *QueryGetBondsRequest) (*QueryGetBondsResponse, error) + // GetBondById + GetBondById(context.Context, *QueryGetBondByIdRequest) (*QueryGetBondByIdResponse, error) + // Get Bonds list by Owner + GetBondsByOwner(context.Context, *QueryGetBondsByOwnerRequest) (*QueryGetBondsByOwnerResponse, error) + // Get Bond module balance + GetBondsModuleBalance(context.Context, *QueryGetBondModuleBalanceRequest) (*QueryGetBondModuleBalanceResponse, error) mustEmbedUnimplementedQueryServer() } @@ -60,9 +116,21 @@ type QueryServer interface { type UnimplementedQueryServer struct { } +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} func (UnimplementedQueryServer) Bonds(context.Context, *QueryGetBondsRequest) (*QueryGetBondsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Bonds not implemented") } +func (UnimplementedQueryServer) GetBondById(context.Context, *QueryGetBondByIdRequest) (*QueryGetBondByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBondById not implemented") +} +func (UnimplementedQueryServer) GetBondsByOwner(context.Context, *QueryGetBondsByOwnerRequest) (*QueryGetBondsByOwnerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBondsByOwner not implemented") +} +func (UnimplementedQueryServer) GetBondsModuleBalance(context.Context, *QueryGetBondModuleBalanceRequest) (*QueryGetBondModuleBalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBondsModuleBalance not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -76,6 +144,24 @@ func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { s.RegisterService(&Query_ServiceDesc, srv) } +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Bonds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryGetBondsRequest) if err := dec(in); err != nil { @@ -94,6 +180,60 @@ func _Query_Bonds_Handler(srv interface{}, ctx context.Context, dec func(interfa return interceptor(ctx, in, info, handler) } +func _Query_GetBondById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetBondByIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetBondById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_GetBondById_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetBondById(ctx, req.(*QueryGetBondByIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetBondsByOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetBondsByOwnerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetBondsByOwner(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_GetBondsByOwner_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetBondsByOwner(ctx, req.(*QueryGetBondsByOwnerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetBondsModuleBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetBondModuleBalanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetBondsModuleBalance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_GetBondsModuleBalance_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetBondsModuleBalance(ctx, req.(*QueryGetBondModuleBalanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -101,10 +241,26 @@ var Query_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cerc.bond.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, { MethodName: "Bonds", Handler: _Query_Bonds_Handler, }, + { + MethodName: "GetBondById", + Handler: _Query_GetBondById_Handler, + }, + { + MethodName: "GetBondsByOwner", + Handler: _Query_GetBondsByOwner_Handler, + }, + { + MethodName: "GetBondsModuleBalance", + Handler: _Query_GetBondsModuleBalance_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cerc/bond/v1/query.proto", diff --git a/api/cerc/bond/v1/tx.pulsar.go b/api/cerc/bond/v1/tx.pulsar.go index 53501cf5c..abbea6fd5 100644 --- a/api/cerc/bond/v1/tx.pulsar.go +++ b/api/cerc/bond/v1/tx.pulsar.go @@ -994,6 +994,2802 @@ func (x *fastReflection_MsgCreateBondResponse) ProtoMethods() *protoiface.Method } } +var _ protoreflect.List = (*_MsgRefillBond_3_list)(nil) + +type _MsgRefillBond_3_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgRefillBond_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRefillBond_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgRefillBond_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgRefillBond_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRefillBond_3_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgRefillBond_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgRefillBond_3_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgRefillBond_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgRefillBond protoreflect.MessageDescriptor + fd_MsgRefillBond_id protoreflect.FieldDescriptor + fd_MsgRefillBond_signer protoreflect.FieldDescriptor + fd_MsgRefillBond_coins protoreflect.FieldDescriptor +) + +func init() { + file_cerc_bond_v1_tx_proto_init() + md_MsgRefillBond = File_cerc_bond_v1_tx_proto.Messages().ByName("MsgRefillBond") + fd_MsgRefillBond_id = md_MsgRefillBond.Fields().ByName("id") + fd_MsgRefillBond_signer = md_MsgRefillBond.Fields().ByName("signer") + fd_MsgRefillBond_coins = md_MsgRefillBond.Fields().ByName("coins") +} + +var _ protoreflect.Message = (*fastReflection_MsgRefillBond)(nil) + +type fastReflection_MsgRefillBond MsgRefillBond + +func (x *MsgRefillBond) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRefillBond)(x) +} + +func (x *MsgRefillBond) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_tx_proto_msgTypes[2] + 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_MsgRefillBond_messageType fastReflection_MsgRefillBond_messageType +var _ protoreflect.MessageType = fastReflection_MsgRefillBond_messageType{} + +type fastReflection_MsgRefillBond_messageType struct{} + +func (x fastReflection_MsgRefillBond_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRefillBond)(nil) +} +func (x fastReflection_MsgRefillBond_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRefillBond) +} +func (x fastReflection_MsgRefillBond_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRefillBond +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRefillBond) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRefillBond +} + +// 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_MsgRefillBond) Type() protoreflect.MessageType { + return _fastReflection_MsgRefillBond_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRefillBond) New() protoreflect.Message { + return new(fastReflection_MsgRefillBond) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRefillBond) Interface() protoreflect.ProtoMessage { + return (*MsgRefillBond)(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_MsgRefillBond) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_MsgRefillBond_id, value) { + return + } + } + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgRefillBond_signer, value) { + return + } + } + if len(x.Coins) != 0 { + value := protoreflect.ValueOfList(&_MsgRefillBond_3_list{list: &x.Coins}) + if !f(fd_MsgRefillBond_coins, 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_MsgRefillBond) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cerc.bond.v1.MsgRefillBond.id": + return x.Id != "" + case "cerc.bond.v1.MsgRefillBond.signer": + return x.Signer != "" + case "cerc.bond.v1.MsgRefillBond.coins": + return len(x.Coins) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgRefillBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgRefillBond 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_MsgRefillBond) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cerc.bond.v1.MsgRefillBond.id": + x.Id = "" + case "cerc.bond.v1.MsgRefillBond.signer": + x.Signer = "" + case "cerc.bond.v1.MsgRefillBond.coins": + x.Coins = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgRefillBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgRefillBond 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_MsgRefillBond) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cerc.bond.v1.MsgRefillBond.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "cerc.bond.v1.MsgRefillBond.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "cerc.bond.v1.MsgRefillBond.coins": + if len(x.Coins) == 0 { + return protoreflect.ValueOfList(&_MsgRefillBond_3_list{}) + } + listValue := &_MsgRefillBond_3_list{list: &x.Coins} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgRefillBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgRefillBond 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_MsgRefillBond) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cerc.bond.v1.MsgRefillBond.id": + x.Id = value.Interface().(string) + case "cerc.bond.v1.MsgRefillBond.signer": + x.Signer = value.Interface().(string) + case "cerc.bond.v1.MsgRefillBond.coins": + lv := value.List() + clv := lv.(*_MsgRefillBond_3_list) + x.Coins = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgRefillBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgRefillBond 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_MsgRefillBond) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.MsgRefillBond.coins": + if x.Coins == nil { + x.Coins = []*v1beta1.Coin{} + } + value := &_MsgRefillBond_3_list{list: &x.Coins} + return protoreflect.ValueOfList(value) + case "cerc.bond.v1.MsgRefillBond.id": + panic(fmt.Errorf("field id of message cerc.bond.v1.MsgRefillBond is not mutable")) + case "cerc.bond.v1.MsgRefillBond.signer": + panic(fmt.Errorf("field signer of message cerc.bond.v1.MsgRefillBond is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgRefillBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgRefillBond 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_MsgRefillBond) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.MsgRefillBond.id": + return protoreflect.ValueOfString("") + case "cerc.bond.v1.MsgRefillBond.signer": + return protoreflect.ValueOfString("") + case "cerc.bond.v1.MsgRefillBond.coins": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgRefillBond_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgRefillBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgRefillBond 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_MsgRefillBond) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.MsgRefillBond", 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_MsgRefillBond) 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_MsgRefillBond) 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_MsgRefillBond) 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_MsgRefillBond) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRefillBond) + 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.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Coins) > 0 { + for _, e := range x.Coins { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(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().(*MsgRefillBond) + 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 len(x.Coins) > 0 { + for iNdEx := len(x.Coins) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Coins[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + 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().(*MsgRefillBond) + 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: MsgRefillBond: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRefillBond: 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 Id", 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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.Coins = append(x.Coins, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Coins[len(x.Coins)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + 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_MsgRefillBondResponse protoreflect.MessageDescriptor +) + +func init() { + file_cerc_bond_v1_tx_proto_init() + md_MsgRefillBondResponse = File_cerc_bond_v1_tx_proto.Messages().ByName("MsgRefillBondResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgRefillBondResponse)(nil) + +type fastReflection_MsgRefillBondResponse MsgRefillBondResponse + +func (x *MsgRefillBondResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRefillBondResponse)(x) +} + +func (x *MsgRefillBondResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_tx_proto_msgTypes[3] + 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_MsgRefillBondResponse_messageType fastReflection_MsgRefillBondResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRefillBondResponse_messageType{} + +type fastReflection_MsgRefillBondResponse_messageType struct{} + +func (x fastReflection_MsgRefillBondResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRefillBondResponse)(nil) +} +func (x fastReflection_MsgRefillBondResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRefillBondResponse) +} +func (x fastReflection_MsgRefillBondResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRefillBondResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRefillBondResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRefillBondResponse +} + +// 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_MsgRefillBondResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRefillBondResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRefillBondResponse) New() protoreflect.Message { + return new(fastReflection_MsgRefillBondResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRefillBondResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRefillBondResponse)(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_MsgRefillBondResponse) 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_MsgRefillBondResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgRefillBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgRefillBondResponse 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_MsgRefillBondResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgRefillBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgRefillBondResponse 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_MsgRefillBondResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgRefillBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgRefillBondResponse 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_MsgRefillBondResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgRefillBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgRefillBondResponse 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_MsgRefillBondResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgRefillBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgRefillBondResponse 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_MsgRefillBondResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgRefillBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgRefillBondResponse 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_MsgRefillBondResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.MsgRefillBondResponse", 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_MsgRefillBondResponse) 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_MsgRefillBondResponse) 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_MsgRefillBondResponse) 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_MsgRefillBondResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRefillBondResponse) + 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().(*MsgRefillBondResponse) + 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().(*MsgRefillBondResponse) + 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: MsgRefillBondResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRefillBondResponse: 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 _ protoreflect.List = (*_MsgWithdrawBond_3_list)(nil) + +type _MsgWithdrawBond_3_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgWithdrawBond_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgWithdrawBond_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgWithdrawBond_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgWithdrawBond_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgWithdrawBond_3_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawBond_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgWithdrawBond_3_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawBond_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgWithdrawBond protoreflect.MessageDescriptor + fd_MsgWithdrawBond_id protoreflect.FieldDescriptor + fd_MsgWithdrawBond_signer protoreflect.FieldDescriptor + fd_MsgWithdrawBond_coins protoreflect.FieldDescriptor +) + +func init() { + file_cerc_bond_v1_tx_proto_init() + md_MsgWithdrawBond = File_cerc_bond_v1_tx_proto.Messages().ByName("MsgWithdrawBond") + fd_MsgWithdrawBond_id = md_MsgWithdrawBond.Fields().ByName("id") + fd_MsgWithdrawBond_signer = md_MsgWithdrawBond.Fields().ByName("signer") + fd_MsgWithdrawBond_coins = md_MsgWithdrawBond.Fields().ByName("coins") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdrawBond)(nil) + +type fastReflection_MsgWithdrawBond MsgWithdrawBond + +func (x *MsgWithdrawBond) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawBond)(x) +} + +func (x *MsgWithdrawBond) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_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_MsgWithdrawBond_messageType fastReflection_MsgWithdrawBond_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawBond_messageType{} + +type fastReflection_MsgWithdrawBond_messageType struct{} + +func (x fastReflection_MsgWithdrawBond_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawBond)(nil) +} +func (x fastReflection_MsgWithdrawBond_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawBond) +} +func (x fastReflection_MsgWithdrawBond_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawBond +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdrawBond) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawBond +} + +// 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_MsgWithdrawBond) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawBond_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdrawBond) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawBond) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdrawBond) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawBond)(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_MsgWithdrawBond) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_MsgWithdrawBond_id, value) { + return + } + } + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgWithdrawBond_signer, value) { + return + } + } + if len(x.Coins) != 0 { + value := protoreflect.ValueOfList(&_MsgWithdrawBond_3_list{list: &x.Coins}) + if !f(fd_MsgWithdrawBond_coins, 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_MsgWithdrawBond) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cerc.bond.v1.MsgWithdrawBond.id": + return x.Id != "" + case "cerc.bond.v1.MsgWithdrawBond.signer": + return x.Signer != "" + case "cerc.bond.v1.MsgWithdrawBond.coins": + return len(x.Coins) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgWithdrawBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgWithdrawBond 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_MsgWithdrawBond) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cerc.bond.v1.MsgWithdrawBond.id": + x.Id = "" + case "cerc.bond.v1.MsgWithdrawBond.signer": + x.Signer = "" + case "cerc.bond.v1.MsgWithdrawBond.coins": + x.Coins = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgWithdrawBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgWithdrawBond 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_MsgWithdrawBond) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cerc.bond.v1.MsgWithdrawBond.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "cerc.bond.v1.MsgWithdrawBond.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "cerc.bond.v1.MsgWithdrawBond.coins": + if len(x.Coins) == 0 { + return protoreflect.ValueOfList(&_MsgWithdrawBond_3_list{}) + } + listValue := &_MsgWithdrawBond_3_list{list: &x.Coins} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgWithdrawBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgWithdrawBond 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_MsgWithdrawBond) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cerc.bond.v1.MsgWithdrawBond.id": + x.Id = value.Interface().(string) + case "cerc.bond.v1.MsgWithdrawBond.signer": + x.Signer = value.Interface().(string) + case "cerc.bond.v1.MsgWithdrawBond.coins": + lv := value.List() + clv := lv.(*_MsgWithdrawBond_3_list) + x.Coins = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgWithdrawBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgWithdrawBond 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_MsgWithdrawBond) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.MsgWithdrawBond.coins": + if x.Coins == nil { + x.Coins = []*v1beta1.Coin{} + } + value := &_MsgWithdrawBond_3_list{list: &x.Coins} + return protoreflect.ValueOfList(value) + case "cerc.bond.v1.MsgWithdrawBond.id": + panic(fmt.Errorf("field id of message cerc.bond.v1.MsgWithdrawBond is not mutable")) + case "cerc.bond.v1.MsgWithdrawBond.signer": + panic(fmt.Errorf("field signer of message cerc.bond.v1.MsgWithdrawBond is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgWithdrawBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgWithdrawBond 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_MsgWithdrawBond) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.MsgWithdrawBond.id": + return protoreflect.ValueOfString("") + case "cerc.bond.v1.MsgWithdrawBond.signer": + return protoreflect.ValueOfString("") + case "cerc.bond.v1.MsgWithdrawBond.coins": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgWithdrawBond_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgWithdrawBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgWithdrawBond 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_MsgWithdrawBond) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.MsgWithdrawBond", 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_MsgWithdrawBond) 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_MsgWithdrawBond) 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_MsgWithdrawBond) 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_MsgWithdrawBond) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdrawBond) + 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.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Coins) > 0 { + for _, e := range x.Coins { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(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().(*MsgWithdrawBond) + 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 len(x.Coins) > 0 { + for iNdEx := len(x.Coins) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Coins[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + 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().(*MsgWithdrawBond) + 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: MsgWithdrawBond: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawBond: 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 Id", 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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.Coins = append(x.Coins, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Coins[len(x.Coins)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + 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_MsgWithdrawBondResponse protoreflect.MessageDescriptor +) + +func init() { + file_cerc_bond_v1_tx_proto_init() + md_MsgWithdrawBondResponse = File_cerc_bond_v1_tx_proto.Messages().ByName("MsgWithdrawBondResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdrawBondResponse)(nil) + +type fastReflection_MsgWithdrawBondResponse MsgWithdrawBondResponse + +func (x *MsgWithdrawBondResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawBondResponse)(x) +} + +func (x *MsgWithdrawBondResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_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_MsgWithdrawBondResponse_messageType fastReflection_MsgWithdrawBondResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawBondResponse_messageType{} + +type fastReflection_MsgWithdrawBondResponse_messageType struct{} + +func (x fastReflection_MsgWithdrawBondResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawBondResponse)(nil) +} +func (x fastReflection_MsgWithdrawBondResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawBondResponse) +} +func (x fastReflection_MsgWithdrawBondResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawBondResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdrawBondResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawBondResponse +} + +// 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_MsgWithdrawBondResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawBondResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdrawBondResponse) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawBondResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdrawBondResponse) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawBondResponse)(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_MsgWithdrawBondResponse) 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_MsgWithdrawBondResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgWithdrawBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgWithdrawBondResponse 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_MsgWithdrawBondResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgWithdrawBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgWithdrawBondResponse 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_MsgWithdrawBondResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgWithdrawBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgWithdrawBondResponse 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_MsgWithdrawBondResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgWithdrawBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgWithdrawBondResponse 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_MsgWithdrawBondResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgWithdrawBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgWithdrawBondResponse 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_MsgWithdrawBondResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgWithdrawBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgWithdrawBondResponse 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_MsgWithdrawBondResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.MsgWithdrawBondResponse", 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_MsgWithdrawBondResponse) 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_MsgWithdrawBondResponse) 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_MsgWithdrawBondResponse) 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_MsgWithdrawBondResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdrawBondResponse) + 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().(*MsgWithdrawBondResponse) + 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().(*MsgWithdrawBondResponse) + 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: MsgWithdrawBondResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawBondResponse: 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_MsgCancelBond protoreflect.MessageDescriptor + fd_MsgCancelBond_id protoreflect.FieldDescriptor + fd_MsgCancelBond_signer protoreflect.FieldDescriptor +) + +func init() { + file_cerc_bond_v1_tx_proto_init() + md_MsgCancelBond = File_cerc_bond_v1_tx_proto.Messages().ByName("MsgCancelBond") + fd_MsgCancelBond_id = md_MsgCancelBond.Fields().ByName("id") + fd_MsgCancelBond_signer = md_MsgCancelBond.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_MsgCancelBond)(nil) + +type fastReflection_MsgCancelBond MsgCancelBond + +func (x *MsgCancelBond) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCancelBond)(x) +} + +func (x *MsgCancelBond) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_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_MsgCancelBond_messageType fastReflection_MsgCancelBond_messageType +var _ protoreflect.MessageType = fastReflection_MsgCancelBond_messageType{} + +type fastReflection_MsgCancelBond_messageType struct{} + +func (x fastReflection_MsgCancelBond_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCancelBond)(nil) +} +func (x fastReflection_MsgCancelBond_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCancelBond) +} +func (x fastReflection_MsgCancelBond_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelBond +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCancelBond) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelBond +} + +// 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_MsgCancelBond) Type() protoreflect.MessageType { + return _fastReflection_MsgCancelBond_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCancelBond) New() protoreflect.Message { + return new(fastReflection_MsgCancelBond) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCancelBond) Interface() protoreflect.ProtoMessage { + return (*MsgCancelBond)(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_MsgCancelBond) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_MsgCancelBond_id, value) { + return + } + } + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgCancelBond_signer, 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_MsgCancelBond) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cerc.bond.v1.MsgCancelBond.id": + return x.Id != "" + case "cerc.bond.v1.MsgCancelBond.signer": + return x.Signer != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgCancelBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgCancelBond 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_MsgCancelBond) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cerc.bond.v1.MsgCancelBond.id": + x.Id = "" + case "cerc.bond.v1.MsgCancelBond.signer": + x.Signer = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgCancelBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgCancelBond 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_MsgCancelBond) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cerc.bond.v1.MsgCancelBond.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "cerc.bond.v1.MsgCancelBond.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgCancelBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgCancelBond 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_MsgCancelBond) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cerc.bond.v1.MsgCancelBond.id": + x.Id = value.Interface().(string) + case "cerc.bond.v1.MsgCancelBond.signer": + x.Signer = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgCancelBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgCancelBond 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_MsgCancelBond) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.MsgCancelBond.id": + panic(fmt.Errorf("field id of message cerc.bond.v1.MsgCancelBond is not mutable")) + case "cerc.bond.v1.MsgCancelBond.signer": + panic(fmt.Errorf("field signer of message cerc.bond.v1.MsgCancelBond is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgCancelBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgCancelBond 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_MsgCancelBond) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.bond.v1.MsgCancelBond.id": + return protoreflect.ValueOfString("") + case "cerc.bond.v1.MsgCancelBond.signer": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgCancelBond")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgCancelBond 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_MsgCancelBond) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.MsgCancelBond", 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_MsgCancelBond) 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_MsgCancelBond) 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_MsgCancelBond) 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_MsgCancelBond) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCancelBond) + 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.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(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().(*MsgCancelBond) + 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 len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + 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().(*MsgCancelBond) + 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: MsgCancelBond: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelBond: 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 Id", 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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_MsgCancelBondResponse protoreflect.MessageDescriptor +) + +func init() { + file_cerc_bond_v1_tx_proto_init() + md_MsgCancelBondResponse = File_cerc_bond_v1_tx_proto.Messages().ByName("MsgCancelBondResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgCancelBondResponse)(nil) + +type fastReflection_MsgCancelBondResponse MsgCancelBondResponse + +func (x *MsgCancelBondResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCancelBondResponse)(x) +} + +func (x *MsgCancelBondResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_bond_v1_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_MsgCancelBondResponse_messageType fastReflection_MsgCancelBondResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCancelBondResponse_messageType{} + +type fastReflection_MsgCancelBondResponse_messageType struct{} + +func (x fastReflection_MsgCancelBondResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCancelBondResponse)(nil) +} +func (x fastReflection_MsgCancelBondResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCancelBondResponse) +} +func (x fastReflection_MsgCancelBondResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelBondResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCancelBondResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelBondResponse +} + +// 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_MsgCancelBondResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCancelBondResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCancelBondResponse) New() protoreflect.Message { + return new(fastReflection_MsgCancelBondResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCancelBondResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCancelBondResponse)(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_MsgCancelBondResponse) 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_MsgCancelBondResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgCancelBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgCancelBondResponse 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_MsgCancelBondResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgCancelBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgCancelBondResponse 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_MsgCancelBondResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgCancelBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgCancelBondResponse 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_MsgCancelBondResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgCancelBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgCancelBondResponse 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_MsgCancelBondResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgCancelBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgCancelBondResponse 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_MsgCancelBondResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.v1.MsgCancelBondResponse")) + } + panic(fmt.Errorf("message cerc.bond.v1.MsgCancelBondResponse 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_MsgCancelBondResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.bond.v1.MsgCancelBondResponse", 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_MsgCancelBondResponse) 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_MsgCancelBondResponse) 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_MsgCancelBondResponse) 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_MsgCancelBondResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCancelBondResponse) + 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().(*MsgCancelBondResponse) + 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().(*MsgCancelBondResponse) + 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: MsgCancelBondResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelBondResponse: 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 @@ -1087,6 +3883,235 @@ func (x *MsgCreateBondResponse) GetId() string { return "" } +// MsgRefillBond defines a SDK message for refill the amount for bond. +type MsgRefillBond struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` + Coins []*v1beta1.Coin `protobuf:"bytes,3,rep,name=coins,proto3" json:"coins,omitempty"` +} + +func (x *MsgRefillBond) Reset() { + *x = MsgRefillBond{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRefillBond) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRefillBond) ProtoMessage() {} + +// Deprecated: Use MsgRefillBond.ProtoReflect.Descriptor instead. +func (*MsgRefillBond) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgRefillBond) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *MsgRefillBond) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *MsgRefillBond) GetCoins() []*v1beta1.Coin { + if x != nil { + return x.Coins + } + return nil +} + +// MsgRefillBondResponse defines the Msg/RefillBond response type. +type MsgRefillBondResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgRefillBondResponse) Reset() { + *x = MsgRefillBondResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRefillBondResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRefillBondResponse) ProtoMessage() {} + +// Deprecated: Use MsgRefillBondResponse.ProtoReflect.Descriptor instead. +func (*MsgRefillBondResponse) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_tx_proto_rawDescGZIP(), []int{3} +} + +// MsgWithdrawBond defines a SDK message for withdrawing amount from bond. +type MsgWithdrawBond struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` + Coins []*v1beta1.Coin `protobuf:"bytes,3,rep,name=coins,proto3" json:"coins,omitempty"` +} + +func (x *MsgWithdrawBond) Reset() { + *x = MsgWithdrawBond{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdrawBond) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdrawBond) ProtoMessage() {} + +// Deprecated: Use MsgWithdrawBond.ProtoReflect.Descriptor instead. +func (*MsgWithdrawBond) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgWithdrawBond) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *MsgWithdrawBond) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *MsgWithdrawBond) GetCoins() []*v1beta1.Coin { + if x != nil { + return x.Coins + } + return nil +} + +// MsgWithdrawBondResponse defines the Msg/WithdrawBond response type. +type MsgWithdrawBondResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgWithdrawBondResponse) Reset() { + *x = MsgWithdrawBondResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdrawBondResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdrawBondResponse) ProtoMessage() {} + +// Deprecated: Use MsgWithdrawBondResponse.ProtoReflect.Descriptor instead. +func (*MsgWithdrawBondResponse) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_tx_proto_rawDescGZIP(), []int{5} +} + +// MsgCancelBond defines a SDK message for the cancel the bond. +type MsgCancelBond struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (x *MsgCancelBond) Reset() { + *x = MsgCancelBond{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCancelBond) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCancelBond) ProtoMessage() {} + +// Deprecated: Use MsgCancelBond.ProtoReflect.Descriptor instead. +func (*MsgCancelBond) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgCancelBond) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *MsgCancelBond) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +// MsgCancelBondResponse defines the Msg/CancelBond response type. +type MsgCancelBondResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgCancelBondResponse) Reset() { + *x = MsgCancelBondResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_bond_v1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCancelBondResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCancelBondResponse) ProtoMessage() {} + +// Deprecated: Use MsgCancelBondResponse.ProtoReflect.Descriptor instead. +func (*MsgCancelBondResponse) Descriptor() ([]byte, []int) { + return file_cerc_bond_v1_tx_proto_rawDescGZIP(), []int{7} +} + var File_cerc_bond_v1_tx_proto protoreflect.FileDescriptor var file_cerc_bond_v1_tx_proto_rawDesc = []byte{ @@ -1113,26 +4138,82 @@ var file_cerc_bond_v1_tx_proto_rawDesc = []byte{ 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x27, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x32, 0x7f, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x71, 0x0a, 0x0a, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x1b, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, - 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x42, 0x6f, 0x6e, 0x64, 0x1a, 0x23, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6e, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1b, 0x22, 0x19, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x62, 0x6f, 0x6e, 0x64, 0x2f, 0x76, 0x31, - 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x1a, 0x05, 0x80, 0xe7, - 0xb0, 0x2a, 0x01, 0x42, 0xa3, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, - 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, - 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x32, - 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x62, 0x6f, 0x6e, 0x64, 0x2f, - 0x76, 0x31, 0x3b, 0x62, 0x6f, 0x6e, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x58, 0xaa, - 0x02, 0x0c, 0x43, 0x65, 0x72, 0x63, 0x2e, 0x42, 0x6f, 0x6e, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x0c, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x42, 0x6f, 0x6e, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, - 0x43, 0x65, 0x72, 0x63, 0x5c, 0x42, 0x6f, 0x6e, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x43, 0x65, 0x72, 0x63, 0x3a, - 0x3a, 0x42, 0x6f, 0x6e, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x69, 0x64, 0x22, 0xc4, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x66, 0x69, 0x6c, 0x6c, + 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x7e, 0x0a, 0x05, + 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x4d, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x19, + 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x22, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x3a, 0x0b, 0x82, 0xe7, + 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x66, 0x69, 0x6c, 0x6c, 0x42, 0x6f, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x7e, + 0x0a, 0x05, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x4d, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, + 0x1f, 0x19, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x22, 0x20, 0x79, + 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x22, 0xaa, 0xdf, 0x1f, 0x28, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x3a, 0x0b, + 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x19, 0x0a, 0x17, 0x4d, + 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, + 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x17, 0x0a, 0x15, + 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x6f, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe0, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x71, 0x0a, + 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x1b, 0x2e, 0x63, 0x65, + 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6e, 0x64, 0x1a, 0x23, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, + 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x6f, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, 0x19, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x62, 0x6f, 0x6e, + 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x6f, 0x6e, 0x64, + 0x12, 0x71, 0x0a, 0x0a, 0x52, 0x65, 0x66, 0x69, 0x6c, 0x6c, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x1b, + 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x66, 0x69, 0x6c, 0x6c, 0x42, 0x6f, 0x6e, 0x64, 0x1a, 0x23, 0x2e, 0x63, 0x65, + 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x66, 0x69, 0x6c, 0x6c, 0x42, 0x6f, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, 0x19, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, + 0x62, 0x6f, 0x6e, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x62, + 0x6f, 0x6e, 0x64, 0x12, 0x79, 0x0a, 0x0c, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x42, + 0x6f, 0x6e, 0x64, 0x12, 0x1d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x42, 0x6f, + 0x6e, 0x64, 0x1a, 0x25, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x42, 0x6f, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1d, 0x22, 0x1b, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x62, 0x6f, 0x6e, 0x64, 0x2f, 0x76, 0x31, + 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x71, + 0x0a, 0x0a, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x1b, 0x2e, 0x63, + 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x6f, 0x6e, 0x64, 0x1a, 0x23, 0x2e, 0x63, 0x65, 0x72, 0x63, + 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x42, 0x6f, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, 0x19, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x62, 0x6f, + 0x6e, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x62, 0x6f, 0x6e, + 0x64, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xa3, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, + 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, + 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, + 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, + 0x6f, 0x6e, 0x69, 0x63, 0x32, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, + 0x62, 0x6f, 0x6e, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x6f, 0x6e, 0x64, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x43, 0x42, 0x58, 0xaa, 0x02, 0x0c, 0x43, 0x65, 0x72, 0x63, 0x2e, 0x42, 0x6f, 0x6e, 0x64, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x42, 0x6f, 0x6e, 0x64, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x18, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x42, 0x6f, 0x6e, 0x64, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, + 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x42, 0x6f, 0x6e, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1147,21 +4228,35 @@ func file_cerc_bond_v1_tx_proto_rawDescGZIP() []byte { return file_cerc_bond_v1_tx_proto_rawDescData } -var file_cerc_bond_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cerc_bond_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_cerc_bond_v1_tx_proto_goTypes = []interface{}{ - (*MsgCreateBond)(nil), // 0: cerc.bond.v1.MsgCreateBond - (*MsgCreateBondResponse)(nil), // 1: cerc.bond.v1.MsgCreateBondResponse - (*v1beta1.Coin)(nil), // 2: cosmos.base.v1beta1.Coin + (*MsgCreateBond)(nil), // 0: cerc.bond.v1.MsgCreateBond + (*MsgCreateBondResponse)(nil), // 1: cerc.bond.v1.MsgCreateBondResponse + (*MsgRefillBond)(nil), // 2: cerc.bond.v1.MsgRefillBond + (*MsgRefillBondResponse)(nil), // 3: cerc.bond.v1.MsgRefillBondResponse + (*MsgWithdrawBond)(nil), // 4: cerc.bond.v1.MsgWithdrawBond + (*MsgWithdrawBondResponse)(nil), // 5: cerc.bond.v1.MsgWithdrawBondResponse + (*MsgCancelBond)(nil), // 6: cerc.bond.v1.MsgCancelBond + (*MsgCancelBondResponse)(nil), // 7: cerc.bond.v1.MsgCancelBondResponse + (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin } var file_cerc_bond_v1_tx_proto_depIdxs = []int32{ - 2, // 0: cerc.bond.v1.MsgCreateBond.coins:type_name -> cosmos.base.v1beta1.Coin - 0, // 1: cerc.bond.v1.Msg.CreateBond:input_type -> cerc.bond.v1.MsgCreateBond - 1, // 2: cerc.bond.v1.Msg.CreateBond:output_type -> cerc.bond.v1.MsgCreateBondResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] 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 + 8, // 0: cerc.bond.v1.MsgCreateBond.coins:type_name -> cosmos.base.v1beta1.Coin + 8, // 1: cerc.bond.v1.MsgRefillBond.coins:type_name -> cosmos.base.v1beta1.Coin + 8, // 2: cerc.bond.v1.MsgWithdrawBond.coins:type_name -> cosmos.base.v1beta1.Coin + 0, // 3: cerc.bond.v1.Msg.CreateBond:input_type -> cerc.bond.v1.MsgCreateBond + 2, // 4: cerc.bond.v1.Msg.RefillBond:input_type -> cerc.bond.v1.MsgRefillBond + 4, // 5: cerc.bond.v1.Msg.WithdrawBond:input_type -> cerc.bond.v1.MsgWithdrawBond + 6, // 6: cerc.bond.v1.Msg.CancelBond:input_type -> cerc.bond.v1.MsgCancelBond + 1, // 7: cerc.bond.v1.Msg.CreateBond:output_type -> cerc.bond.v1.MsgCreateBondResponse + 3, // 8: cerc.bond.v1.Msg.RefillBond:output_type -> cerc.bond.v1.MsgRefillBondResponse + 5, // 9: cerc.bond.v1.Msg.WithdrawBond:output_type -> cerc.bond.v1.MsgWithdrawBondResponse + 7, // 10: cerc.bond.v1.Msg.CancelBond:output_type -> cerc.bond.v1.MsgCancelBondResponse + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_cerc_bond_v1_tx_proto_init() } @@ -1194,6 +4289,78 @@ func file_cerc_bond_v1_tx_proto_init() { return nil } } + file_cerc_bond_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRefillBond); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cerc_bond_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRefillBondResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cerc_bond_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawBond); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cerc_bond_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawBondResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cerc_bond_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCancelBond); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cerc_bond_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCancelBondResponse); 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{ @@ -1201,7 +4368,7 @@ func file_cerc_bond_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cerc_bond_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cerc/bond/v1/tx_grpc.pb.go b/api/cerc/bond/v1/tx_grpc.pb.go index f0f7592ff..8f8996e48 100644 --- a/api/cerc/bond/v1/tx_grpc.pb.go +++ b/api/cerc/bond/v1/tx_grpc.pb.go @@ -19,7 +19,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_CreateBond_FullMethodName = "/cerc.bond.v1.Msg/CreateBond" + Msg_CreateBond_FullMethodName = "/cerc.bond.v1.Msg/CreateBond" + Msg_RefillBond_FullMethodName = "/cerc.bond.v1.Msg/RefillBond" + Msg_WithdrawBond_FullMethodName = "/cerc.bond.v1.Msg/WithdrawBond" + Msg_CancelBond_FullMethodName = "/cerc.bond.v1.Msg/CancelBond" ) // MsgClient is the client API for Msg service. @@ -28,6 +31,12 @@ const ( type MsgClient interface { // CreateBond defines a method for creating a new bond. CreateBond(ctx context.Context, in *MsgCreateBond, opts ...grpc.CallOption) (*MsgCreateBondResponse, error) + // RefillBond defines a method for refilling amount for bond. + RefillBond(ctx context.Context, in *MsgRefillBond, opts ...grpc.CallOption) (*MsgRefillBondResponse, error) + // WithdrawBond defines a method for withdrawing amount from bond. + WithdrawBond(ctx context.Context, in *MsgWithdrawBond, opts ...grpc.CallOption) (*MsgWithdrawBondResponse, error) + // CancelBond defines a method for cancelling a bond. + CancelBond(ctx context.Context, in *MsgCancelBond, opts ...grpc.CallOption) (*MsgCancelBondResponse, error) } type msgClient struct { @@ -47,12 +56,45 @@ func (c *msgClient) CreateBond(ctx context.Context, in *MsgCreateBond, opts ...g return out, nil } +func (c *msgClient) RefillBond(ctx context.Context, in *MsgRefillBond, opts ...grpc.CallOption) (*MsgRefillBondResponse, error) { + out := new(MsgRefillBondResponse) + err := c.cc.Invoke(ctx, Msg_RefillBond_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawBond(ctx context.Context, in *MsgWithdrawBond, opts ...grpc.CallOption) (*MsgWithdrawBondResponse, error) { + out := new(MsgWithdrawBondResponse) + err := c.cc.Invoke(ctx, Msg_WithdrawBond_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CancelBond(ctx context.Context, in *MsgCancelBond, opts ...grpc.CallOption) (*MsgCancelBondResponse, error) { + out := new(MsgCancelBondResponse) + err := c.cc.Invoke(ctx, Msg_CancelBond_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 type MsgServer interface { // CreateBond defines a method for creating a new bond. CreateBond(context.Context, *MsgCreateBond) (*MsgCreateBondResponse, error) + // RefillBond defines a method for refilling amount for bond. + RefillBond(context.Context, *MsgRefillBond) (*MsgRefillBondResponse, error) + // WithdrawBond defines a method for withdrawing amount from bond. + WithdrawBond(context.Context, *MsgWithdrawBond) (*MsgWithdrawBondResponse, error) + // CancelBond defines a method for cancelling a bond. + CancelBond(context.Context, *MsgCancelBond) (*MsgCancelBondResponse, error) mustEmbedUnimplementedMsgServer() } @@ -63,6 +105,15 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) CreateBond(context.Context, *MsgCreateBond) (*MsgCreateBondResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateBond not implemented") } +func (UnimplementedMsgServer) RefillBond(context.Context, *MsgRefillBond) (*MsgRefillBondResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RefillBond not implemented") +} +func (UnimplementedMsgServer) WithdrawBond(context.Context, *MsgWithdrawBond) (*MsgWithdrawBondResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawBond not implemented") +} +func (UnimplementedMsgServer) CancelBond(context.Context, *MsgCancelBond) (*MsgCancelBondResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelBond not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -94,6 +145,60 @@ func _Msg_CreateBond_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _Msg_RefillBond_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRefillBond) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RefillBond(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_RefillBond_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RefillBond(ctx, req.(*MsgRefillBond)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawBond_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawBond) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawBond(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_WithdrawBond_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawBond(ctx, req.(*MsgWithdrawBond)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CancelBond_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelBond) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CancelBond(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CancelBond_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelBond(ctx, req.(*MsgCancelBond)) + } + 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) @@ -105,6 +210,18 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "CreateBond", Handler: _Msg_CreateBond_Handler, }, + { + MethodName: "RefillBond", + Handler: _Msg_RefillBond_Handler, + }, + { + MethodName: "WithdrawBond", + Handler: _Msg_WithdrawBond_Handler, + }, + { + MethodName: "CancelBond", + Handler: _Msg_CancelBond_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cerc/bond/v1/tx.proto", diff --git a/go.mod b/go.mod index c2d1a241d..3057cc886 100644 --- a/go.mod +++ b/go.mod @@ -15,6 +15,7 @@ replace ( require ( cosmossdk.io/api v0.7.2 cosmossdk.io/client/v2 v2.0.0-beta.1 + cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.11.0 cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.1 @@ -37,7 +38,6 @@ require ( ) require ( - cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/x/tx v0.13.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect diff --git a/proto/cerc/bond/module/v1/module.proto b/proto/cerc/bond/module/v1/module.proto index 9bc15c788..fb868aad9 100644 --- a/proto/cerc/bond/module/v1/module.proto +++ b/proto/cerc/bond/module/v1/module.proto @@ -10,6 +10,4 @@ message Module { option (cosmos.app.v1alpha1.module) = { go_import : "git.vdb.to/cerc-io/laconic2d/x/bond" }; - - // TODO: Setup any config required } diff --git a/proto/cerc/bond/v1/query.proto b/proto/cerc/bond/v1/query.proto index b61e30147..e8fc118c9 100644 --- a/proto/cerc/bond/v1/query.proto +++ b/proto/cerc/bond/v1/query.proto @@ -8,15 +8,45 @@ import "gogoproto/gogo.proto"; import "cerc/bond/v1/bond.proto"; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/base/v1beta1/coin.proto"; // import "cosmos/query/v1/query.proto"; // Query defines the gRPC querier service for bond module service Query { - // Bonds queries bonds list. + // Params queries bonds module params. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cerc/bond/v1/params"; + } + + // Bonds queries bonds list rpc Bonds(QueryGetBondsRequest) returns (QueryGetBondsResponse) { - // option (cosmos.query.v1.module_query_safe) = true; // Add? + // Mark query as module_query_safe? + // option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/cerc/bond/v1/bonds"; } + + // GetBondById + rpc GetBondById(QueryGetBondByIdRequest) returns (QueryGetBondByIdResponse) { + option (google.api.http).get = "/cerc/bond/v1/bonds/{id}"; + } + + // Get Bonds list by Owner + rpc GetBondsByOwner(QueryGetBondsByOwnerRequest) returns (QueryGetBondsByOwnerResponse) { + option (google.api.http).get = "/cerc/bond/v1/by-owner/{owner}"; + } + + // Get Bond module balance + rpc GetBondsModuleBalance(QueryGetBondModuleBalanceRequest) returns (QueryGetBondModuleBalanceResponse) { + option (google.api.http).get = "/cerc/bond/v1/balance"; + } +} + +// QueryParamsRequest is request for query the bond module params +message QueryParamsRequest {} + +// QueryParamsResponse returns response type of bond module params +message QueryParamsResponse { + Params params = 1 [(gogoproto.moretags) = "json:\"params\" yaml:\"params\""]; } // QueryGetBondById queries a bonds. @@ -33,3 +63,39 @@ message QueryGetBondsResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryGetBondById +message QueryGetBondByIdRequest { + string id = 1 [(gogoproto.moretags) = "json:\"id\" yaml:\"id\""]; +} + +// QueryGetBondByIdResponse returns QueryGetBondById query response +message QueryGetBondByIdResponse { + Bond bond = 1 [(gogoproto.moretags) = "json:\"bond\" yaml:\"bond\""]; +} + +// QueryGetBondsByOwnerRequest is request type for Query/GetBondsByOwner RPC Method +message QueryGetBondsByOwnerRequest { + string owner = 1; + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryGetBondsByOwnerResponse is response type for Query/GetBondsByOwner RPC Method +message QueryGetBondsByOwnerResponse { + repeated Bond bonds = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryGetBondModuleBalanceRequest is request type for bond module balance rpc method +message QueryGetBondModuleBalanceRequest {} + +// QueryGetBondModuleBalanceResponse is the response type for bond module balance rpc method +message QueryGetBondModuleBalanceResponse { + repeated cosmos.base.v1beta1.Coin balance = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "json:\"coins\" yaml:\"coins\"" + ]; +} diff --git a/proto/cerc/bond/v1/tx.proto b/proto/cerc/bond/v1/tx.proto index 0ce4c9fc0..d5d892bf8 100644 --- a/proto/cerc/bond/v1/tx.proto +++ b/proto/cerc/bond/v1/tx.proto @@ -9,8 +9,6 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/v1beta1/coin.proto"; -// TODO: Add remaining messages - // Msg defines the bond Msg service. service Msg { option (cosmos.msg.v1.service) = true; @@ -20,6 +18,20 @@ service Msg { option (google.api.http).post = "/cerc/bond/v1/create_bond"; }; + // RefillBond defines a method for refilling amount for bond. + rpc RefillBond(MsgRefillBond) returns (MsgRefillBondResponse) { + option (google.api.http).post = "/cerc/bond/v1/refill_bond"; + }; + + // WithdrawBond defines a method for withdrawing amount from bond. + rpc WithdrawBond(MsgWithdrawBond) returns (MsgWithdrawBondResponse) { + option (google.api.http).post = "/cerc/bond/v1/withdraw_bond"; + }; + + // CancelBond defines a method for cancelling a bond. + rpc CancelBond(MsgCancelBond) returns (MsgCancelBondResponse) { + option (google.api.http).post = "/cerc/bond/v1/cancel_bond"; + }; } // MsgCreateBond defines a SDK message for creating a new bond. @@ -38,3 +50,46 @@ message MsgCreateBond { message MsgCreateBondResponse { string id = 1; } + +// MsgRefillBond defines a SDK message for refill the amount for bond. +message MsgRefillBond { + option (cosmos.msg.v1.signer) = "signer"; + + string id = 1; + string signer = 2; + repeated cosmos.base.v1beta1.Coin coins = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "json:\"coins\" yaml:\"coins\"" + ]; +} + +// MsgRefillBondResponse defines the Msg/RefillBond response type. +message MsgRefillBondResponse {} + +// MsgWithdrawBond defines a SDK message for withdrawing amount from bond. +message MsgWithdrawBond { + option (cosmos.msg.v1.signer) = "signer"; + + string id = 1; + string signer = 2; + repeated cosmos.base.v1beta1.Coin coins = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "json:\"coins\" yaml:\"coins\"" + ]; +} + +// MsgWithdrawBondResponse defines the Msg/WithdrawBond response type. +message MsgWithdrawBondResponse {} + +// MsgCancelBond defines a SDK message for the cancel the bond. +message MsgCancelBond { + option (cosmos.msg.v1.signer) = "signer"; + + string id = 1; + string signer = 2; +} + +// MsgCancelBondResponse defines the Msg/CancelBond response type. +message MsgCancelBondResponse {} diff --git a/x/bond/codec.go b/x/bond/codec.go index eff38a2a2..6d1ba7636 100644 --- a/x/bond/codec.go +++ b/x/bond/codec.go @@ -10,9 +10,9 @@ import ( func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgCreateBond{}, - // &MsgRefillBond{}, - // &MsgCancelBond{}, - // &MsgWithdrawBond{}, + &MsgRefillBond{}, + &MsgCancelBond{}, + &MsgWithdrawBond{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/bond/events.go b/x/bond/events.go index a4dceeefa..ba4848f3c 100644 --- a/x/bond/events.go +++ b/x/bond/events.go @@ -10,6 +10,6 @@ const ( AttributeKeySigner = "signer" AttributeKeyAmount = "amount" - AttributeKeyBondID = "bond_id" + AttributeKeyBondId = "bond_id" AttributeValueCategory = ModuleName ) diff --git a/x/bond/keeper/genesis.go b/x/bond/keeper/genesis.go index b8a97b9b1..07494ca7f 100644 --- a/x/bond/keeper/genesis.go +++ b/x/bond/keeper/genesis.go @@ -7,7 +7,9 @@ import ( // InitGenesis initializes the module state from a genesis state. func (k *Keeper) InitGenesis(ctx sdk.Context, data *bond.GenesisState) error { - k.SetParams(ctx, data.Params) + if err := k.Params.Set(ctx, data.Params); err != nil { + return err + } // Save bonds in store. for _, bond := range data.Bonds { @@ -21,7 +23,10 @@ func (k *Keeper) InitGenesis(ctx sdk.Context, data *bond.GenesisState) error { // ExportGenesis exports the module state to a genesis state. func (k *Keeper) ExportGenesis(ctx sdk.Context) (*bond.GenesisState, error) { - params := k.GetParams(ctx) + params, err := k.Params.Get(ctx) + if err != nil { + return nil, err + } bonds, err := k.ListBonds(ctx) if err != nil { diff --git a/x/bond/keeper/keeper.go b/x/bond/keeper/keeper.go index 2f8bef6f8..e1dd9eb94 100644 --- a/x/bond/keeper/keeper.go +++ b/x/bond/keeper/keeper.go @@ -3,9 +3,11 @@ package keeper import ( "crypto/sha256" "encoding/hex" + "errors" "fmt" "cosmossdk.io/collections" + "cosmossdk.io/collections/indexes" "cosmossdk.io/core/store" errorsmod "cosmossdk.io/errors" @@ -18,6 +20,26 @@ import ( bondtypes "git.vdb.to/cerc-io/laconic2d/x/bond" ) +type BondsIndexes struct { + Owner *indexes.Multi[string, string, bondtypes.Bond] +} + +func (b BondsIndexes) IndexesList() []collections.Index[string, bondtypes.Bond] { + return []collections.Index[string, bondtypes.Bond]{b.Owner} +} + +func newBondIndexes(sb *collections.SchemaBuilder) BondsIndexes { + return BondsIndexes{ + Owner: indexes.NewMulti( + sb, bondtypes.BondOwnerIndexPrefix, "bonds_by_owner", + collections.StringKey, collections.StringKey, + func(_ string, v bondtypes.Bond) (string, error) { + return v.Owner, nil + }, + ), + } +} + type Keeper struct { // Codecs cdc codec.BinaryCodec @@ -29,11 +51,10 @@ type Keeper struct { // Track bond usage in other cosmos-sdk modules (more like a usage tracker). // usageKeepers []types.BondUsageKeeper - // paramSubspace paramtypes.Subspace - // State management Schema collections.Schema - Bonds collections.Map[string, bondtypes.Bond] + Params collections.Item[bondtypes.Params] + Bonds *collections.IndexedMap[string, bondtypes.Bond, BondsIndexes] } // NewKeeper creates new instances of the bond Keeper @@ -43,21 +64,15 @@ func NewKeeper( accountKeeper auth.AccountKeeper, bankKeeper bank.Keeper, // usageKeepers []types.BondUsageKeeper, - // ps paramtypes.Subspace, ) Keeper { - // set KeyTable if it has not already been set - // if !ps.HasKeyTable() { - // ps = ps.WithKeyTable(types.ParamKeyTable()) - // } - sb := collections.NewSchemaBuilder(storeService) k := Keeper{ cdc: cdc, accountKeeper: accountKeeper, bankKeeper: bankKeeper, - Bonds: collections.NewMap(sb, bondtypes.BondsKey, "bonds", collections.StringKey, codec.CollValue[bondtypes.Bond](cdc)), + Params: collections.NewItem(sb, bondtypes.ParamsKeyPrefix, "params", codec.CollValue[bondtypes.Params](cdc)), + Bonds: collections.NewIndexedMap(sb, bondtypes.BondsKeyPrefix, "bonds", collections.StringKey, codec.CollValue[bondtypes.Bond](cdc), newBondIndexes(sb)), // usageKeepers: usageKeepers, - // paramSubspace: ps, } schema, err := sb.Build() @@ -70,58 +85,39 @@ func NewKeeper( return k } -// BondID simplifies generation of bond IDs. -type BondID struct { +// BondId simplifies generation of bond Ids. +type BondId struct { Address sdk.Address AccNum uint64 Sequence uint64 } -// Generate creates the bond ID. -func (bondID BondID) Generate() string { +// Generate creates the bond Id. +func (bondId BondId) Generate() string { hasher := sha256.New() - str := fmt.Sprintf("%s:%d:%d", bondID.Address.String(), bondID.AccNum, bondID.Sequence) + str := fmt.Sprintf("%s:%d:%d", bondId.Address.String(), bondId.AccNum, bondId.Sequence) hasher.Write([]byte(str)) return hex.EncodeToString(hasher.Sum(nil)) } -// CreateBond creates a new bond. -func (k Keeper) CreateBond(ctx sdk.Context, ownerAddress sdk.AccAddress, coins sdk.Coins) (*bondtypes.Bond, error) { - // Check if account has funds. - for _, coin := range coins { - balance := k.bankKeeper.HasBalance(ctx, ownerAddress, coin) - if !balance { - return nil, errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, "failed to create bond; Insufficient funds") - } - } - - // Generate bond ID. - account := k.accountKeeper.GetAccount(ctx, ownerAddress) - bondID := BondID{ - Address: ownerAddress, - AccNum: account.GetAccountNumber(), - Sequence: account.GetSequence(), - }.Generate() - - maxBondAmount := k.getMaxBondAmount(ctx) - - bond := bondtypes.Bond{Id: bondID, Owner: ownerAddress.String(), Balance: coins} - if bond.Balance.IsAnyGT(maxBondAmount) { - return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Max bond amount exceeded.") - } - - // Move funds into the bond account module. - err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, ownerAddress, bondtypes.ModuleName, bond.Balance) +// HasBond - checks if a bond by the given Id exists. +func (k Keeper) HasBond(ctx sdk.Context, id string) (bool, error) { + has, err := k.Bonds.Has(ctx, id) if err != nil { - return nil, err + return false, err } - // Save bond in store. - if err := k.Bonds.Set(ctx, bond.Id, bond); err != nil { - return nil, err - } + return has, nil +} - return &bond, nil +// SaveBond - saves a bond to the store. +func (k Keeper) SaveBond(ctx sdk.Context, bond *bondtypes.Bond) error { + return k.Bonds.Set(ctx, bond.Id, *bond) +} + +// DeleteBond - deletes the bond. +func (k Keeper) DeleteBond(ctx sdk.Context, bond bondtypes.Bond) error { + return k.Bonds.Remove(ctx, bond.Id) } // ListBonds - get all bonds. @@ -145,8 +141,222 @@ func (k Keeper) ListBonds(ctx sdk.Context) ([]*bondtypes.Bond, error) { return bonds, nil } -func (k Keeper) getMaxBondAmount(ctx sdk.Context) sdk.Coins { - params := k.GetParams(ctx) - maxBondAmount := params.MaxBondAmount - return sdk.NewCoins(maxBondAmount) +func (k Keeper) GetBondById(ctx sdk.Context, id string) (bondtypes.Bond, error) { + bond, err := k.Bonds.Get(ctx, id) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return bondtypes.Bond{}, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.") + } + return bondtypes.Bond{}, err + } + + return bond, nil +} + +func (k Keeper) GetBondsByOwner(ctx sdk.Context, owner string) ([]bondtypes.Bond, error) { + iter, err := k.Bonds.Indexes.Owner.MatchExact(ctx, owner) + if err != nil { + return []bondtypes.Bond{}, err + } + + return indexes.CollectValues(ctx, k.Bonds, iter) +} + +// GetBondModuleBalances gets the bond module account(s) balances. +func (k Keeper) GetBondModuleBalances(ctx sdk.Context) sdk.Coins { + moduleAddress := k.accountKeeper.GetModuleAddress(bondtypes.ModuleName) + balances := k.bankKeeper.GetAllBalances(ctx, moduleAddress) + + return balances +} + +// CreateBond creates a new bond. +func (k Keeper) CreateBond(ctx sdk.Context, ownerAddress sdk.AccAddress, coins sdk.Coins) (*bondtypes.Bond, error) { + // Check if account has funds. + for _, coin := range coins { + balance := k.bankKeeper.HasBalance(ctx, ownerAddress, coin) + if !balance { + return nil, errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, "failed to create bond; Insufficient funds") + } + } + + // Generate bond Id. + account := k.accountKeeper.GetAccount(ctx, ownerAddress) + bondId := BondId{ + Address: ownerAddress, + AccNum: account.GetAccountNumber(), + Sequence: account.GetSequence(), + }.Generate() + + maxBondAmount, err := k.getMaxBondAmount(ctx) + if err != nil { + return nil, err + } + + bond := bondtypes.Bond{Id: bondId, Owner: ownerAddress.String(), Balance: coins} + if bond.Balance.IsAnyGT(maxBondAmount) { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Max bond amount exceeded.") + } + + // Move funds into the bond account module. + err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, ownerAddress, bondtypes.ModuleName, bond.Balance) + if err != nil { + return nil, err + } + + // Save bond in store. + err = k.SaveBond(ctx, &bond) + if err != nil { + return nil, err + } + + return &bond, nil +} + +func (k Keeper) RefillBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddress, coins sdk.Coins) (*bondtypes.Bond, error) { + if has, err := k.HasBond(ctx, id); !has { + if err != nil { + return nil, err + } + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.") + } + + bond, err := k.GetBondById(ctx, id) + if err != nil { + return nil, err + } + + if bond.Owner != ownerAddress.String() { + return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.") + } + + // Check if account has funds. + for _, coin := range coins { + if !k.bankKeeper.HasBalance(ctx, ownerAddress, coin) { + return nil, errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient funds.") + } + } + + maxBondAmount, err := k.getMaxBondAmount(ctx) + if err != nil { + return nil, err + } + + updatedBalance := bond.Balance.Add(coins...) + if updatedBalance.IsAnyGT(maxBondAmount) { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Max bond amount exceeded.") + } + + // Move funds into the bond account module. + err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, ownerAddress, bondtypes.ModuleName, coins) + if err != nil { + return nil, err + } + + // Update bond balance and save. + bond.Balance = updatedBalance + err = k.SaveBond(ctx, &bond) + if err != nil { + return nil, err + } + + return &bond, nil +} + +func (k Keeper) WithdrawBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddress, coins sdk.Coins) (*bondtypes.Bond, error) { + if has, err := k.HasBond(ctx, id); !has { + if err != nil { + return nil, err + } + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.") + } + + bond, err := k.GetBondById(ctx, id) + if err != nil { + return nil, err + } + + if bond.Owner != ownerAddress.String() { + return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.") + } + + updatedBalance, isNeg := bond.Balance.SafeSub(coins...) + if isNeg { + return nil, errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient bond balance.") + } + + // Move funds from the bond into the account. + err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, bondtypes.ModuleName, ownerAddress, coins) + if err != nil { + return nil, err + } + + // Update bond balance and save. + bond.Balance = updatedBalance + err = k.SaveBond(ctx, &bond) + if err != nil { + return nil, err + } + + return &bond, nil +} + +func (k Keeper) CancelBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddress) (*bondtypes.Bond, error) { + if has, err := k.HasBond(ctx, id); !has { + if err != nil { + return nil, err + } + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.") + } + + bond, err := k.GetBondById(ctx, id) + if err != nil { + return nil, err + } + + if bond.Owner != ownerAddress.String() { + return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.") + } + + // TODO + // Check if bond is used in other modules. + // for _, usageKeeper := range k.usageKeepers { + // if usageKeeper.UsesBond(ctx, id) { + // return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, fmt.Sprintf("Bond in use by the '%s' module.", usageKeeper.ModuleName())) + // } + // } + + // Move funds from the bond into the account. + err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, bondtypes.ModuleName, ownerAddress, bond.Balance) + if err != nil { + return nil, err + } + + // Remove bond from store. + err = k.DeleteBond(ctx, bond) + if err != nil { + return nil, err + } + + return &bond, nil +} + +// GetParams gets the bond module's parameters. +func (k Keeper) GetParams(ctx sdk.Context) (*bondtypes.Params, error) { + params, err := k.Params.Get(ctx) + if err != nil { + return nil, err + } + + return ¶ms, nil +} + +func (k Keeper) getMaxBondAmount(ctx sdk.Context) (sdk.Coins, error) { + params, err := k.GetParams(ctx) + if err != nil { + return nil, err + } + + maxBondAmount := params.MaxBondAmount + return sdk.NewCoins(maxBondAmount), nil } diff --git a/x/bond/keeper/msg_server.go b/x/bond/keeper/msg_server.go index bbca76b97..c004a191b 100644 --- a/x/bond/keeper/msg_server.go +++ b/x/bond/keeper/msg_server.go @@ -12,7 +12,6 @@ type msgServer struct { k Keeper } -// TODO: Generate types var _ bond.MsgServer = msgServer{} // NewMsgServerImpl returns an implementation of the module MsgServer interface. @@ -20,10 +19,9 @@ func NewMsgServerImpl(keeper Keeper) bond.MsgServer { return &msgServer{k: keeper} } -// TODO: Add remaining write methods - func (ms msgServer) CreateBond(c context.Context, msg *bond.MsgCreateBond) (*bond.MsgCreateBondResponse, error) { ctx := sdk.UnwrapSDKContext(c) + signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { return nil, err @@ -48,3 +46,93 @@ func (ms msgServer) CreateBond(c context.Context, msg *bond.MsgCreateBond) (*bon return &bond.MsgCreateBondResponse{}, nil } + +// RefillBond implements bond.MsgServer. +func (ms msgServer) RefillBond(c context.Context, msg *bond.MsgRefillBond) (*bond.MsgRefillBondResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return nil, err + } + + _, err = ms.k.RefillBond(ctx, msg.Id, signerAddress, msg.Coins) + if err != nil { + return nil, err + } + + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + bond.EventTypeRefillBond, + sdk.NewAttribute(bond.AttributeKeySigner, msg.Signer), + sdk.NewAttribute(bond.AttributeKeyBondId, msg.Id), + sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Coins.String()), + ), + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, bond.AttributeValueCategory), + sdk.NewAttribute(bond.AttributeKeySigner, msg.Signer), + ), + }) + + return &bond.MsgRefillBondResponse{}, nil +} + +// WithdrawBond implements bond.MsgServer. +func (ms msgServer) WithdrawBond(c context.Context, msg *bond.MsgWithdrawBond) (*bond.MsgWithdrawBondResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return nil, err + } + + _, err = ms.k.WithdrawBond(ctx, msg.Id, signerAddress, msg.Coins) + if err != nil { + return nil, err + } + + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + bond.EventTypeWithdrawBond, + sdk.NewAttribute(bond.AttributeKeySigner, msg.Signer), + sdk.NewAttribute(bond.AttributeKeyBondId, msg.Id), + sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Coins.String()), + ), + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, bond.AttributeValueCategory), + sdk.NewAttribute(bond.AttributeKeySigner, msg.Signer), + ), + }) + + return &bond.MsgWithdrawBondResponse{}, nil +} + +// CancelBond implements bond.MsgServer. +func (ms msgServer) CancelBond(c context.Context, msg *bond.MsgCancelBond) (*bond.MsgCancelBondResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return nil, err + } + _, err = ms.k.CancelBond(ctx, msg.Id, signerAddress) + if err != nil { + return nil, err + } + + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + bond.EventTypeCancelBond, + sdk.NewAttribute(bond.AttributeKeySigner, msg.Signer), + sdk.NewAttribute(bond.AttributeKeyBondId, msg.Id), + ), + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, bond.AttributeValueCategory), + sdk.NewAttribute(bond.AttributeKeySigner, msg.Signer), + ), + }) + + return &bond.MsgCancelBondResponse{}, nil +} diff --git a/x/bond/keeper/params.go b/x/bond/keeper/params.go deleted file mode 100644 index ceafa772d..000000000 --- a/x/bond/keeper/params.go +++ /dev/null @@ -1,23 +0,0 @@ -package keeper - -import ( - "git.vdb.to/cerc-io/laconic2d/x/bond" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// GetMaxBondAmount max bond amount -func (k Keeper) GetMaxBondAmount(ctx sdk.Context) (res sdk.Coin) { - // TODO: Implement - return sdk.NewCoin(sdk.DefaultBondDenom, bond.DefaultMaxBondAmountTokens) -} - -// GetParams - Get all parameter as types.Params. -func (k Keeper) GetParams(ctx sdk.Context) (params bond.Params) { - getMaxBondAmount := k.GetMaxBondAmount(ctx) - return bond.Params{MaxBondAmount: getMaxBondAmount} -} - -// SetParams - set the params. -func (k Keeper) SetParams(ctx sdk.Context, params bond.Params) { - // TODO: Implement -} diff --git a/x/bond/keeper/query_server.go b/x/bond/keeper/query_server.go index 79d9498f2..992adbaf0 100644 --- a/x/bond/keeper/query_server.go +++ b/x/bond/keeper/query_server.go @@ -3,24 +3,38 @@ package keeper import ( "context" - "git.vdb.to/cerc-io/laconic2d/x/bond" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" -) + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -// TODO: Add remaining query methods + bondtypes "git.vdb.to/cerc-io/laconic2d/x/bond" +) type queryServer struct { k Keeper } -var _ bond.QueryServer = queryServer{} +var _ bondtypes.QueryServer = queryServer{} // NewQueryServerImpl returns an implementation of the module QueryServer. -func NewQueryServerImpl(k Keeper) bond.QueryServer { +func NewQueryServerImpl(k Keeper) bondtypes.QueryServer { return queryServer{k} } -func (qs queryServer) Bonds(c context.Context, _ *bond.QueryGetBondsRequest) (*bond.QueryGetBondsResponse, error) { +// Params implements bond.QueryServer. +func (qs queryServer) Params(c context.Context, _ *bondtypes.QueryParamsRequest) (*bondtypes.QueryParamsResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + params, err := qs.k.GetParams(ctx) + if err != nil { + return nil, err + } + + return &bondtypes.QueryParamsResponse{Params: params}, nil +} + +// Bonds implements bond.QueryServer. +func (qs queryServer) Bonds(c context.Context, _ *bondtypes.QueryGetBondsRequest) (*bondtypes.QueryGetBondsResponse, error) { ctx := sdk.UnwrapSDKContext(c) resp, err := qs.k.ListBonds(ctx) @@ -28,5 +42,47 @@ func (qs queryServer) Bonds(c context.Context, _ *bond.QueryGetBondsRequest) (*b return nil, err } - return &bond.QueryGetBondsResponse{Bonds: resp}, nil + return &bondtypes.QueryGetBondsResponse{Bonds: resp}, nil +} + +// GetBondById implements bond.QueryServer. +func (qs queryServer) GetBondById(c context.Context, req *bondtypes.QueryGetBondByIdRequest) (*bondtypes.QueryGetBondByIdResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + bondId := req.GetId() + if len(bondId) == 0 { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "bond id required") + } + + bond, err := qs.k.GetBondById(ctx, bondId) + if err != nil { + return nil, err + } + + return &bondtypes.QueryGetBondByIdResponse{Bond: &bond}, nil +} + +// GetBondsByOwner implements bond.QueryServer. +func (qs queryServer) GetBondsByOwner(c context.Context, req *bondtypes.QueryGetBondsByOwnerRequest) (*bondtypes.QueryGetBondsByOwnerResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + owner := req.GetOwner() + if len(owner) == 0 { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "owner required") + } + + bonds, err := qs.k.GetBondsByOwner(ctx, owner) + if err != nil { + return nil, err + } + + return &bondtypes.QueryGetBondsByOwnerResponse{Bonds: bonds}, nil +} + +// GetBondsModuleBalance implements bond.QueryServer. +func (qs queryServer) GetBondsModuleBalance(c context.Context, _ *bondtypes.QueryGetBondModuleBalanceRequest) (*bondtypes.QueryGetBondModuleBalanceResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + balances := qs.k.GetBondModuleBalances(ctx) + + return &bondtypes.QueryGetBondModuleBalanceResponse{Balance: balances}, nil } diff --git a/x/bond/keys.go b/x/bond/keys.go index b1d746b38..ad7e1b5e8 100644 --- a/x/bond/keys.go +++ b/x/bond/keys.go @@ -7,11 +7,13 @@ const ( // StoreKey is the string store representation StoreKey = ModuleName - - // TODO: Add required keys ) // Store prefixes var ( - BondsKey = collections.NewPrefix(0) + // ParamsKey is the prefix for params key + ParamsKeyPrefix = collections.NewPrefix(0) + + BondsKeyPrefix = collections.NewPrefix(1) + BondOwnerIndexPrefix = collections.NewPrefix(2) ) diff --git a/x/bond/module/autocli.go b/x/bond/module/autocli.go index 43c8e473f..0f61dc9dd 100644 --- a/x/bond/module/autocli.go +++ b/x/bond/module/autocli.go @@ -15,12 +15,40 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Query: &autocliv1.ServiceCommandDescriptor{ Service: bondv1.Query_ServiceDesc.ServiceName, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Get the current bond parameters", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{}, + }, { RpcMethod: "Bonds", Use: "list", Short: "List bonds", PositionalArgs: []*autocliv1.PositionalArgDescriptor{}, }, + { + RpcMethod: "GetBondById", + Use: "get [bond-id]", + Short: "Get bond info by bond id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "id"}, + }, + }, + { + RpcMethod: "GetBondsByOwner", + Use: "by-owner [owner-address]", + Short: "Get bonds list by owner address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "owner"}, + }, + }, + { + RpcMethod: "GetBondsModuleBalance", + Use: "balance", + Short: "Get bond module account balances", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{}, + }, }, }, Tx: &autocliv1.ServiceCommandDescriptor{ @@ -34,6 +62,32 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { {ProtoField: "coins"}, }, }, + { + RpcMethod: "RefillBond", + Use: "refill [bond-id] [amount]", + Short: "Refill bond", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "id"}, + {ProtoField: "coins"}, + }, + }, + { + RpcMethod: "WithdrawBond", + Use: "withdraw [bond-id] [amount]", + Short: "Withdraw amount from bond", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "id"}, + {ProtoField: "coins"}, + }, + }, + { + RpcMethod: "CancelBond", + Use: "cancel [bond-id]", + Short: "Cancel bond", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "id"}, + }, + }, }, }, } diff --git a/x/bond/params.go b/x/bond/params.go index dac769e55..f6f3c7104 100644 --- a/x/bond/params.go +++ b/x/bond/params.go @@ -6,32 +6,27 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) -var _ paramtypes.ParamSet = &Params{} - // Default parameter values. var DefaultMaxBondAmountTokens = sdkmath.NewInt(100000000000) -// Parameter keys -var ParamStoreKeyMaxBondAmount = []byte("MaxBondAmount") - func NewParams(maxBondAmount sdk.Coin) Params { return Params{MaxBondAmount: maxBondAmount} } // DefaultParams returns default module parameters -// ExtraEIPs is empty to prevent overriding the latest hard fork instruction set func DefaultParams() Params { return NewParams(sdk.NewCoin(sdk.DefaultBondDenom, DefaultMaxBondAmountTokens)) } -// ParamSetPairs returns the parameter set pairs. -func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair(ParamStoreKeyMaxBondAmount, &p.MaxBondAmount, validateMaxBondAmount), +// Validate checks that the parameters have valid values +func (p Params) Validate() error { + if err := validateMaxBondAmount(p.MaxBondAmount); err != nil { + return err } + + return nil } func validateMaxBondAmount(i interface{}) error { @@ -46,12 +41,3 @@ func validateMaxBondAmount(i interface{}) error { return nil } - -// Validate checks that the parameters have valid values -func (p Params) Validate() error { - if err := validateMaxBondAmount(p.MaxBondAmount); err != nil { - return err - } - - return nil -} diff --git a/x/bond/query.pb.go b/x/bond/query.pb.go index 2911acc93..f6a8fddf8 100644 --- a/x/bond/query.pb.go +++ b/x/bond/query.pb.go @@ -6,6 +6,8 @@ package bond import ( context "context" fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -30,6 +32,88 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// QueryParamsRequest is request for query the bond module params +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d3221677ed35cdfb, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse returns response type of bond module params +type QueryParamsResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty" json:"params" yaml:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d3221677ed35cdfb, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + // QueryGetBondById queries a bonds. type QueryGetBondsRequest struct { // pagination defines an optional pagination for the request. @@ -40,7 +124,7 @@ func (m *QueryGetBondsRequest) Reset() { *m = QueryGetBondsRequest{} } func (m *QueryGetBondsRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetBondsRequest) ProtoMessage() {} func (*QueryGetBondsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d3221677ed35cdfb, []int{0} + return fileDescriptor_d3221677ed35cdfb, []int{2} } func (m *QueryGetBondsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -87,7 +171,7 @@ func (m *QueryGetBondsResponse) Reset() { *m = QueryGetBondsResponse{} } func (m *QueryGetBondsResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetBondsResponse) ProtoMessage() {} func (*QueryGetBondsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d3221677ed35cdfb, []int{1} + return fileDescriptor_d3221677ed35cdfb, []int{3} } func (m *QueryGetBondsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,38 +214,350 @@ func (m *QueryGetBondsResponse) GetPagination() *query.PageResponse { return nil } +// QueryGetBondById +type QueryGetBondByIdRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" json:"id" yaml:"id"` +} + +func (m *QueryGetBondByIdRequest) Reset() { *m = QueryGetBondByIdRequest{} } +func (m *QueryGetBondByIdRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetBondByIdRequest) ProtoMessage() {} +func (*QueryGetBondByIdRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d3221677ed35cdfb, []int{4} +} +func (m *QueryGetBondByIdRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetBondByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetBondByIdRequest.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 *QueryGetBondByIdRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetBondByIdRequest.Merge(m, src) +} +func (m *QueryGetBondByIdRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetBondByIdRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetBondByIdRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetBondByIdRequest proto.InternalMessageInfo + +func (m *QueryGetBondByIdRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +// QueryGetBondByIdResponse returns QueryGetBondById query response +type QueryGetBondByIdResponse struct { + Bond *Bond `protobuf:"bytes,1,opt,name=bond,proto3" json:"bond,omitempty" json:"bond" yaml:"bond"` +} + +func (m *QueryGetBondByIdResponse) Reset() { *m = QueryGetBondByIdResponse{} } +func (m *QueryGetBondByIdResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetBondByIdResponse) ProtoMessage() {} +func (*QueryGetBondByIdResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d3221677ed35cdfb, []int{5} +} +func (m *QueryGetBondByIdResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetBondByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetBondByIdResponse.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 *QueryGetBondByIdResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetBondByIdResponse.Merge(m, src) +} +func (m *QueryGetBondByIdResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetBondByIdResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetBondByIdResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetBondByIdResponse proto.InternalMessageInfo + +func (m *QueryGetBondByIdResponse) GetBond() *Bond { + if m != nil { + return m.Bond + } + return nil +} + +// QueryGetBondsByOwnerRequest is request type for Query/GetBondsByOwner RPC Method +type QueryGetBondsByOwnerRequest struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGetBondsByOwnerRequest) Reset() { *m = QueryGetBondsByOwnerRequest{} } +func (m *QueryGetBondsByOwnerRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetBondsByOwnerRequest) ProtoMessage() {} +func (*QueryGetBondsByOwnerRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d3221677ed35cdfb, []int{6} +} +func (m *QueryGetBondsByOwnerRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetBondsByOwnerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetBondsByOwnerRequest.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 *QueryGetBondsByOwnerRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetBondsByOwnerRequest.Merge(m, src) +} +func (m *QueryGetBondsByOwnerRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetBondsByOwnerRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetBondsByOwnerRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetBondsByOwnerRequest proto.InternalMessageInfo + +func (m *QueryGetBondsByOwnerRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *QueryGetBondsByOwnerRequest) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryGetBondsByOwnerResponse is response type for Query/GetBondsByOwner RPC Method +type QueryGetBondsByOwnerResponse struct { + Bonds []Bond `protobuf:"bytes,1,rep,name=bonds,proto3" json:"bonds" json:"bonds" yaml:"bonds"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGetBondsByOwnerResponse) Reset() { *m = QueryGetBondsByOwnerResponse{} } +func (m *QueryGetBondsByOwnerResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetBondsByOwnerResponse) ProtoMessage() {} +func (*QueryGetBondsByOwnerResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d3221677ed35cdfb, []int{7} +} +func (m *QueryGetBondsByOwnerResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetBondsByOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetBondsByOwnerResponse.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 *QueryGetBondsByOwnerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetBondsByOwnerResponse.Merge(m, src) +} +func (m *QueryGetBondsByOwnerResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetBondsByOwnerResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetBondsByOwnerResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetBondsByOwnerResponse proto.InternalMessageInfo + +func (m *QueryGetBondsByOwnerResponse) GetBonds() []Bond { + if m != nil { + return m.Bonds + } + return nil +} + +func (m *QueryGetBondsByOwnerResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryGetBondModuleBalanceRequest is request type for bond module balance rpc method +type QueryGetBondModuleBalanceRequest struct { +} + +func (m *QueryGetBondModuleBalanceRequest) Reset() { *m = QueryGetBondModuleBalanceRequest{} } +func (m *QueryGetBondModuleBalanceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetBondModuleBalanceRequest) ProtoMessage() {} +func (*QueryGetBondModuleBalanceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d3221677ed35cdfb, []int{8} +} +func (m *QueryGetBondModuleBalanceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetBondModuleBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetBondModuleBalanceRequest.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 *QueryGetBondModuleBalanceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetBondModuleBalanceRequest.Merge(m, src) +} +func (m *QueryGetBondModuleBalanceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetBondModuleBalanceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetBondModuleBalanceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetBondModuleBalanceRequest proto.InternalMessageInfo + +// QueryGetBondModuleBalanceResponse is the response type for bond module balance rpc method +type QueryGetBondModuleBalanceResponse struct { + Balance github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=balance,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balance" json:"coins" yaml:"coins"` +} + +func (m *QueryGetBondModuleBalanceResponse) Reset() { *m = QueryGetBondModuleBalanceResponse{} } +func (m *QueryGetBondModuleBalanceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetBondModuleBalanceResponse) ProtoMessage() {} +func (*QueryGetBondModuleBalanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d3221677ed35cdfb, []int{9} +} +func (m *QueryGetBondModuleBalanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetBondModuleBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetBondModuleBalanceResponse.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 *QueryGetBondModuleBalanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetBondModuleBalanceResponse.Merge(m, src) +} +func (m *QueryGetBondModuleBalanceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetBondModuleBalanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetBondModuleBalanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetBondModuleBalanceResponse proto.InternalMessageInfo + +func (m *QueryGetBondModuleBalanceResponse) GetBalance() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Balance + } + return nil +} + func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "cerc.bond.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cerc.bond.v1.QueryParamsResponse") proto.RegisterType((*QueryGetBondsRequest)(nil), "cerc.bond.v1.QueryGetBondsRequest") proto.RegisterType((*QueryGetBondsResponse)(nil), "cerc.bond.v1.QueryGetBondsResponse") + proto.RegisterType((*QueryGetBondByIdRequest)(nil), "cerc.bond.v1.QueryGetBondByIdRequest") + proto.RegisterType((*QueryGetBondByIdResponse)(nil), "cerc.bond.v1.QueryGetBondByIdResponse") + proto.RegisterType((*QueryGetBondsByOwnerRequest)(nil), "cerc.bond.v1.QueryGetBondsByOwnerRequest") + proto.RegisterType((*QueryGetBondsByOwnerResponse)(nil), "cerc.bond.v1.QueryGetBondsByOwnerResponse") + proto.RegisterType((*QueryGetBondModuleBalanceRequest)(nil), "cerc.bond.v1.QueryGetBondModuleBalanceRequest") + proto.RegisterType((*QueryGetBondModuleBalanceResponse)(nil), "cerc.bond.v1.QueryGetBondModuleBalanceResponse") } func init() { proto.RegisterFile("cerc/bond/v1/query.proto", fileDescriptor_d3221677ed35cdfb) } var fileDescriptor_d3221677ed35cdfb = []byte{ - // 368 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xc1, 0x4a, 0x2b, 0x31, - 0x14, 0x86, 0x3b, 0xbd, 0xf4, 0x2e, 0xd2, 0xbb, 0xca, 0x6d, 0xb9, 0xbd, 0x55, 0xc7, 0x32, 0x05, - 0x2d, 0x82, 0x09, 0x33, 0xee, 0x04, 0x37, 0x5d, 0xd8, 0xad, 0x76, 0xe9, 0x42, 0xc8, 0xcc, 0x84, - 0x30, 0xd2, 0xe6, 0x4c, 0x9b, 0x74, 0xb0, 0x5b, 0x9f, 0x40, 0xf0, 0x29, 0x7c, 0x13, 0x97, 0x05, - 0x37, 0xae, 0x44, 0x5a, 0x9f, 0xc0, 0x27, 0x90, 0x24, 0x15, 0x5b, 0x15, 0xdd, 0xcd, 0xf0, 0x7f, - 0xff, 0x39, 0x5f, 0x12, 0xd4, 0x48, 0xf8, 0x38, 0xa1, 0x31, 0xc8, 0x94, 0x16, 0x21, 0x1d, 0x4d, - 0xf8, 0x78, 0x4a, 0xf2, 0x31, 0x68, 0xc0, 0x7f, 0x4c, 0x42, 0x4c, 0x42, 0x8a, 0xb0, 0x59, 0x13, - 0x20, 0xc0, 0x06, 0xd4, 0x7c, 0x39, 0xa6, 0xf9, 0x6f, 0xad, 0x6d, 0x59, 0x17, 0x6c, 0x0a, 0x00, - 0x31, 0xe0, 0x94, 0xe5, 0x19, 0x65, 0x52, 0x82, 0x66, 0x3a, 0x03, 0xa9, 0x96, 0xe9, 0x5e, 0x02, - 0x6a, 0x08, 0x8a, 0xc6, 0x4c, 0x71, 0xb7, 0x93, 0x16, 0x61, 0xcc, 0x35, 0x0b, 0x69, 0xce, 0x44, - 0x26, 0x2d, 0xec, 0xd8, 0xe0, 0x1c, 0xd5, 0x4e, 0x0d, 0xd1, 0xe3, 0xba, 0x0b, 0x32, 0x55, 0x7d, - 0x3e, 0x9a, 0x70, 0xa5, 0xf1, 0x31, 0x42, 0xef, 0x6c, 0xc3, 0x6b, 0x79, 0x9d, 0x6a, 0xb4, 0x43, - 0xdc, 0x60, 0x62, 0x06, 0x13, 0x77, 0x98, 0xe5, 0x60, 0x72, 0xc2, 0x04, 0x5f, 0x76, 0xfb, 0x2b, - 0xcd, 0xe0, 0xd6, 0x43, 0xf5, 0x0f, 0x0b, 0x54, 0x0e, 0x52, 0x71, 0xdc, 0x43, 0x15, 0x73, 0x22, - 0xd5, 0xf0, 0x5a, 0xbf, 0x3a, 0xd5, 0x08, 0x93, 0xd5, 0x0b, 0x21, 0x86, 0xed, 0x6e, 0xbd, 0x3c, - 0x6e, 0xff, 0xbf, 0x50, 0x20, 0x0f, 0x03, 0x8b, 0x06, 0xad, 0x29, 0x1b, 0x0e, 0xde, 0x7e, 0xfa, - 0xae, 0x8f, 0x7b, 0x6b, 0xaa, 0x65, 0xab, 0xba, 0xfb, 0xa3, 0xaa, 0xb3, 0x58, 0x75, 0x8d, 0x0a, - 0x54, 0xb1, 0xaa, 0x78, 0x88, 0x2a, 0xd6, 0x15, 0x07, 0xeb, 0x52, 0x5f, 0xdd, 0x54, 0xb3, 0xfd, - 0x2d, 0xe3, 0xd6, 0x04, 0x1b, 0x57, 0xf7, 0xcf, 0x37, 0xe5, 0x3a, 0xfe, 0x4b, 0x3f, 0x3d, 0xa9, - 0xea, 0x1e, 0xdd, 0xcd, 0x7d, 0x6f, 0x36, 0xf7, 0xbd, 0xa7, 0xb9, 0xef, 0x5d, 0x2f, 0xfc, 0xd2, - 0x6c, 0xe1, 0x97, 0x1e, 0x16, 0x7e, 0xe9, 0xac, 0x2d, 0x32, 0x4d, 0x8a, 0x34, 0x26, 0x1a, 0x6c, - 0x71, 0x3f, 0x03, 0x3a, 0x60, 0x09, 0xc8, 0x2c, 0x89, 0x52, 0x7a, 0x69, 0xfb, 0xf1, 0x6f, 0xfb, - 0x92, 0x07, 0xaf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x32, 0xed, 0x9c, 0x6c, 0x02, 0x00, 0x00, + // 749 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0x8e, 0x03, 0x29, 0x62, 0x8b, 0x84, 0xb4, 0x4d, 0x48, 0xea, 0xb4, 0x76, 0xba, 0x15, 0x6d, + 0xa9, 0x54, 0xaf, 0x12, 0x6e, 0x48, 0x5c, 0x5c, 0x89, 0x0a, 0xa1, 0x8a, 0xe2, 0x23, 0x07, 0x90, + 0xff, 0x64, 0x96, 0x26, 0xde, 0x34, 0xeb, 0x04, 0xa2, 0x52, 0x0e, 0x7d, 0x82, 0x4a, 0x1c, 0x78, + 0x05, 0xe0, 0xcc, 0x43, 0xf4, 0x58, 0x89, 0x0b, 0xa7, 0x80, 0x5a, 0x9e, 0x20, 0x4f, 0x80, 0xbc, + 0xbb, 0x6e, 0xed, 0x34, 0x4d, 0x7a, 0x40, 0x9c, 0x9c, 0xf5, 0x7c, 0x33, 0xdf, 0xf7, 0x8d, 0x77, + 0x26, 0xa0, 0xe2, 0xfa, 0x1d, 0x17, 0x3b, 0x34, 0xf4, 0x70, 0xaf, 0x8e, 0xf7, 0xba, 0x7e, 0xa7, + 0x6f, 0xb4, 0x3b, 0x34, 0xa2, 0xf0, 0x4e, 0x1c, 0x31, 0xe2, 0x88, 0xd1, 0xab, 0xab, 0xc5, 0x80, + 0x06, 0x94, 0x07, 0x70, 0xfc, 0x4b, 0x60, 0xd4, 0x72, 0x26, 0x9b, 0x63, 0x45, 0x60, 0x21, 0xa0, + 0x34, 0x68, 0xfa, 0xd8, 0x6e, 0x13, 0x6c, 0x87, 0x21, 0x8d, 0xec, 0x88, 0xd0, 0x90, 0xc9, 0xe8, + 0xba, 0x4b, 0x59, 0x8b, 0x32, 0xec, 0xd8, 0xcc, 0x17, 0x9c, 0xb8, 0x57, 0x77, 0xfc, 0xc8, 0xae, + 0xe3, 0xb6, 0x1d, 0x90, 0x90, 0x83, 0x25, 0x56, 0x4b, 0x63, 0x13, 0x94, 0x4b, 0x89, 0x8c, 0xa3, + 0x22, 0x80, 0x2f, 0xe2, 0x0a, 0x3b, 0x76, 0xc7, 0x6e, 0x31, 0xcb, 0xdf, 0xeb, 0xfa, 0x2c, 0x42, + 0x1e, 0x98, 0xcb, 0xbc, 0x65, 0x6d, 0x1a, 0x32, 0x1f, 0x6e, 0x83, 0x99, 0x36, 0x7f, 0x53, 0x51, + 0x6a, 0xca, 0xda, 0x6c, 0xa3, 0x68, 0xa4, 0x4d, 0x1a, 0x02, 0x6d, 0xea, 0xc3, 0x81, 0x5e, 0x7d, + 0xcb, 0x68, 0xf8, 0x08, 0x09, 0x34, 0xaa, 0xf5, 0xed, 0x56, 0xf3, 0xfc, 0x64, 0xc9, 0x22, 0xe8, + 0x15, 0x28, 0x72, 0x96, 0x2d, 0x3f, 0x32, 0x69, 0xe8, 0x25, 0xec, 0xf0, 0x09, 0x00, 0x17, 0x3e, + 0x24, 0xd5, 0x8a, 0x21, 0x8c, 0x18, 0xb1, 0x11, 0x43, 0x34, 0x5a, 0xda, 0x31, 0x76, 0xec, 0xc0, + 0x97, 0xb9, 0x56, 0x2a, 0x13, 0x7d, 0x55, 0x40, 0x69, 0x84, 0x40, 0x1a, 0xd9, 0x02, 0x85, 0x58, + 0x74, 0xec, 0xe3, 0xc6, 0xda, 0x6c, 0x03, 0x66, 0x7d, 0xc4, 0x58, 0x73, 0x71, 0x38, 0xd0, 0xe7, + 0x85, 0x0b, 0x0e, 0x4d, 0x4c, 0x88, 0x83, 0x25, 0xf2, 0xe1, 0x56, 0x46, 0x6a, 0x9e, 0x4b, 0x5d, + 0x9d, 0x2a, 0x55, 0xa8, 0xc8, 0x68, 0x35, 0x41, 0x39, 0x2d, 0xd5, 0xec, 0x3f, 0xf5, 0x92, 0x76, + 0xac, 0x82, 0x3c, 0xf1, 0x78, 0x1b, 0x6e, 0x9b, 0xe5, 0xe1, 0x40, 0x9f, 0x13, 0xaa, 0x88, 0x97, + 0x48, 0x22, 0x1e, 0xb2, 0xf2, 0xc4, 0x43, 0xaf, 0x41, 0xe5, 0x72, 0x0d, 0xe9, 0x78, 0x13, 0xdc, + 0x8c, 0x15, 0xcb, 0x6e, 0x8e, 0x33, 0x5c, 0x1d, 0x0e, 0xf4, 0xf2, 0x85, 0xe1, 0xb4, 0x5f, 0x64, + 0xf1, 0x64, 0xf4, 0x01, 0x54, 0x33, 0xfd, 0x34, 0xfb, 0xcf, 0xdf, 0x85, 0x7e, 0x27, 0x11, 0x5a, + 0x04, 0x05, 0x1a, 0x9f, 0x85, 0x56, 0x4b, 0x1c, 0xfe, 0x5d, 0x8b, 0xbe, 0x2b, 0x60, 0x61, 0x3c, + 0xbd, 0xf4, 0xf8, 0x6c, 0xfa, 0x57, 0x5d, 0x3a, 0x1e, 0xe8, 0xb9, 0xff, 0xfb, 0x65, 0x11, 0xa8, + 0xa5, 0x55, 0x6f, 0x53, 0xaf, 0xdb, 0xf4, 0x4d, 0xbb, 0x69, 0x87, 0x6e, 0x72, 0x6b, 0xd1, 0x17, + 0x05, 0x2c, 0x4d, 0x00, 0x49, 0x7f, 0x87, 0x0a, 0xb8, 0xe5, 0x88, 0x77, 0x95, 0x3c, 0xb7, 0x38, + 0x9f, 0x11, 0x94, 0x48, 0xd9, 0xa4, 0x24, 0x34, 0xb7, 0xb3, 0x4e, 0xe3, 0x91, 0x3f, 0x77, 0x2a, + 0x0e, 0xdf, 0x7e, 0xe9, 0x6b, 0x01, 0x89, 0xde, 0x74, 0x1d, 0xc3, 0xa5, 0x2d, 0x2c, 0x17, 0x85, + 0x78, 0x6c, 0x30, 0x6f, 0x17, 0x47, 0xfd, 0xb6, 0xcf, 0x78, 0x35, 0x66, 0x25, 0xc4, 0x8d, 0xa3, + 0x02, 0x28, 0x70, 0xa9, 0x70, 0x17, 0xcc, 0x88, 0x89, 0x87, 0xb5, 0x6c, 0xa7, 0x2f, 0x2f, 0x14, + 0x75, 0x69, 0x02, 0x42, 0xb8, 0x43, 0x0b, 0x87, 0x3f, 0xfe, 0x7c, 0xca, 0xdf, 0x83, 0x45, 0x9c, + 0xd9, 0x8a, 0x62, 0x57, 0xc0, 0x16, 0x28, 0xf0, 0x6f, 0x0e, 0xd1, 0x98, 0x4a, 0x23, 0x0b, 0x44, + 0x5d, 0x9e, 0x88, 0x91, 0x7c, 0x55, 0xce, 0x57, 0x82, 0x73, 0xf8, 0xd2, 0x16, 0x66, 0xf0, 0x23, + 0x98, 0x4d, 0x4d, 0x11, 0xbc, 0x7f, 0x75, 0xc1, 0xd4, 0xa4, 0xaa, 0x2b, 0xd3, 0x60, 0x92, 0xba, + 0xc6, 0xa9, 0x55, 0x58, 0x19, 0x43, 0x8d, 0xf7, 0x89, 0x77, 0x00, 0x8f, 0x14, 0x70, 0x77, 0xe4, + 0x9a, 0xc3, 0x07, 0x13, 0x5c, 0x65, 0x27, 0x51, 0x5d, 0xbf, 0x0e, 0x54, 0x8a, 0x59, 0xe1, 0x62, + 0x6a, 0x50, 0x1b, 0x11, 0xd3, 0xdf, 0xe0, 0xf3, 0x8b, 0xf7, 0xf9, 0xe3, 0x00, 0x7e, 0x56, 0x40, + 0x29, 0xa9, 0x91, 0xb9, 0x9f, 0xd0, 0xb8, 0x9a, 0x6d, 0xdc, 0x6d, 0x57, 0xf1, 0xb5, 0xf1, 0x52, + 0xe2, 0x22, 0x97, 0x58, 0x86, 0xa5, 0x11, 0x89, 0x02, 0x66, 0x3e, 0x3e, 0x3e, 0xd5, 0x94, 0x93, + 0x53, 0x4d, 0xf9, 0x7d, 0xaa, 0x29, 0x47, 0x67, 0x5a, 0xee, 0xe4, 0x4c, 0xcb, 0xfd, 0x3c, 0xd3, + 0x72, 0x2f, 0x97, 0x03, 0x12, 0x19, 0x3d, 0xcf, 0x31, 0x22, 0xca, 0x53, 0x37, 0x08, 0xc5, 0x4d, + 0xdb, 0xa5, 0x21, 0x71, 0x1b, 0x1e, 0x7e, 0xcf, 0x2b, 0x39, 0x33, 0xfc, 0x9f, 0xf0, 0xe1, 0xdf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x75, 0x13, 0xa2, 0xcc, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -176,8 +572,16 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - // Bonds queries bonds list. + // Params queries bonds module params. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Bonds queries bonds list Bonds(ctx context.Context, in *QueryGetBondsRequest, opts ...grpc.CallOption) (*QueryGetBondsResponse, error) + // GetBondById + GetBondById(ctx context.Context, in *QueryGetBondByIdRequest, opts ...grpc.CallOption) (*QueryGetBondByIdResponse, error) + // Get Bonds list by Owner + GetBondsByOwner(ctx context.Context, in *QueryGetBondsByOwnerRequest, opts ...grpc.CallOption) (*QueryGetBondsByOwnerResponse, error) + // Get Bond module balance + GetBondsModuleBalance(ctx context.Context, in *QueryGetBondModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetBondModuleBalanceResponse, error) } type queryClient struct { @@ -188,6 +592,15 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/cerc.bond.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Bonds(ctx context.Context, in *QueryGetBondsRequest, opts ...grpc.CallOption) (*QueryGetBondsResponse, error) { out := new(QueryGetBondsResponse) err := c.cc.Invoke(ctx, "/cerc.bond.v1.Query/Bonds", in, out, opts...) @@ -197,24 +610,89 @@ func (c *queryClient) Bonds(ctx context.Context, in *QueryGetBondsRequest, opts return out, nil } +func (c *queryClient) GetBondById(ctx context.Context, in *QueryGetBondByIdRequest, opts ...grpc.CallOption) (*QueryGetBondByIdResponse, error) { + out := new(QueryGetBondByIdResponse) + err := c.cc.Invoke(ctx, "/cerc.bond.v1.Query/GetBondById", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetBondsByOwner(ctx context.Context, in *QueryGetBondsByOwnerRequest, opts ...grpc.CallOption) (*QueryGetBondsByOwnerResponse, error) { + out := new(QueryGetBondsByOwnerResponse) + err := c.cc.Invoke(ctx, "/cerc.bond.v1.Query/GetBondsByOwner", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetBondsModuleBalance(ctx context.Context, in *QueryGetBondModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetBondModuleBalanceResponse, error) { + out := new(QueryGetBondModuleBalanceResponse) + err := c.cc.Invoke(ctx, "/cerc.bond.v1.Query/GetBondsModuleBalance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { - // Bonds queries bonds list. + // Params queries bonds module params. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Bonds queries bonds list Bonds(context.Context, *QueryGetBondsRequest) (*QueryGetBondsResponse, error) + // GetBondById + GetBondById(context.Context, *QueryGetBondByIdRequest) (*QueryGetBondByIdResponse, error) + // Get Bonds list by Owner + GetBondsByOwner(context.Context, *QueryGetBondsByOwnerRequest) (*QueryGetBondsByOwnerResponse, error) + // Get Bond module balance + GetBondsModuleBalance(context.Context, *QueryGetBondModuleBalanceRequest) (*QueryGetBondModuleBalanceResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} func (*UnimplementedQueryServer) Bonds(ctx context.Context, req *QueryGetBondsRequest) (*QueryGetBondsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Bonds not implemented") } +func (*UnimplementedQueryServer) GetBondById(ctx context.Context, req *QueryGetBondByIdRequest) (*QueryGetBondByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBondById not implemented") +} +func (*UnimplementedQueryServer) GetBondsByOwner(ctx context.Context, req *QueryGetBondsByOwnerRequest) (*QueryGetBondsByOwnerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBondsByOwner not implemented") +} +func (*UnimplementedQueryServer) GetBondsModuleBalance(ctx context.Context, req *QueryGetBondModuleBalanceRequest) (*QueryGetBondModuleBalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBondsModuleBalance not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cerc.bond.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Bonds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryGetBondsRequest) if err := dec(in); err != nil { @@ -233,19 +711,147 @@ func _Query_Bonds_Handler(srv interface{}, ctx context.Context, dec func(interfa return interceptor(ctx, in, info, handler) } +func _Query_GetBondById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetBondByIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetBondById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cerc.bond.v1.Query/GetBondById", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetBondById(ctx, req.(*QueryGetBondByIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetBondsByOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetBondsByOwnerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetBondsByOwner(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cerc.bond.v1.Query/GetBondsByOwner", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetBondsByOwner(ctx, req.(*QueryGetBondsByOwnerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetBondsModuleBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetBondModuleBalanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetBondsModuleBalance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cerc.bond.v1.Query/GetBondsModuleBalance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetBondsModuleBalance(ctx, req.(*QueryGetBondModuleBalanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cerc.bond.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, { MethodName: "Bonds", Handler: _Query_Bonds_Handler, }, + { + MethodName: "GetBondById", + Handler: _Query_GetBondById_Handler, + }, + { + MethodName: "GetBondsByOwner", + Handler: _Query_GetBondsByOwner_Handler, + }, + { + MethodName: "GetBondsModuleBalance", + Handler: _Query_GetBondsModuleBalance_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cerc/bond/v1/query.proto", } +func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *QueryGetBondsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -330,6 +936,222 @@ func (m *QueryGetBondsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryGetBondByIdRequest) 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 *QueryGetBondByIdRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetBondByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetBondByIdResponse) 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 *QueryGetBondByIdResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetBondByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Bond != nil { + { + size, err := m.Bond.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetBondsByOwnerRequest) 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 *QueryGetBondsByOwnerRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetBondsByOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetBondsByOwnerResponse) 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 *QueryGetBondsByOwnerResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetBondsByOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Bonds) > 0 { + for iNdEx := len(m.Bonds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Bonds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryGetBondModuleBalanceRequest) 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 *QueryGetBondModuleBalanceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetBondModuleBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryGetBondModuleBalanceResponse) 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 *QueryGetBondModuleBalanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetBondModuleBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Balance) > 0 { + for iNdEx := len(m.Balance) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balance[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -341,6 +1163,28 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QueryGetBondsRequest) Size() (n int) { if m == nil { return 0 @@ -373,12 +1217,234 @@ func (m *QueryGetBondsResponse) Size() (n int) { return n } +func (m *QueryGetBondByIdRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetBondByIdResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Bond != nil { + l = m.Bond.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetBondsByOwnerRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetBondsByOwnerResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Bonds) > 0 { + for _, e := range m.Bonds { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetBondModuleBalanceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryGetBondModuleBalanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Balance) > 0 { + for _, e := range m.Balance { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *QueryParamsRequest) 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 ErrIntOverflowQuery + } + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) 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 ErrIntOverflowQuery + } + 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryGetBondsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -585,6 +1651,546 @@ func (m *QueryGetBondsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryGetBondByIdRequest) 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 ErrIntOverflowQuery + } + 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: QueryGetBondByIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetBondByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetBondByIdResponse) 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 ErrIntOverflowQuery + } + 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: QueryGetBondByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetBondByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bond", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Bond == nil { + m.Bond = &Bond{} + } + if err := m.Bond.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetBondsByOwnerRequest) 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 ErrIntOverflowQuery + } + 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: QueryGetBondsByOwnerRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetBondsByOwnerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetBondsByOwnerResponse) 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 ErrIntOverflowQuery + } + 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: QueryGetBondsByOwnerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetBondsByOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bonds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bonds = append(m.Bonds, Bond{}) + if err := m.Bonds[len(m.Bonds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetBondModuleBalanceRequest) 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 ErrIntOverflowQuery + } + 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: QueryGetBondModuleBalanceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetBondModuleBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetBondModuleBalanceResponse) 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 ErrIntOverflowQuery + } + 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: QueryGetBondModuleBalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetBondModuleBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balance = append(m.Balance, types.Coin{}) + if err := m.Balance[len(m.Balance)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/bond/query.pb.gw.go b/x/bond/query.pb.gw.go index 2b52b238d..5b7be5fd9 100644 --- a/x/bond/query.pb.gw.go +++ b/x/bond/query.pb.gw.go @@ -33,6 +33,24 @@ var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage var _ = metadata.Join +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Query_Bonds_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -69,12 +87,179 @@ func local_request_Query_Bonds_0(ctx context.Context, marshaler runtime.Marshale } +func request_Query_GetBondById_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetBondByIdRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetBondById(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetBondById_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetBondByIdRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetBondById(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_GetBondsByOwner_0 = &utilities.DoubleArray{Encoding: map[string]int{"owner": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_GetBondsByOwner_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetBondsByOwnerRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetBondsByOwner_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetBondsByOwner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetBondsByOwner_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetBondsByOwnerRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetBondsByOwner_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetBondsByOwner(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_GetBondsModuleBalance_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetBondModuleBalanceRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetBondsModuleBalance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetBondsModuleBalance_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetBondModuleBalanceRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetBondsModuleBalance(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Bonds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -98,6 +283,75 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_GetBondById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetBondById_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetBondById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetBondsByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetBondsByOwner_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetBondsByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetBondsModuleBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetBondsModuleBalance_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetBondsModuleBalance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -139,6 +393,26 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Bonds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -159,13 +433,89 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_GetBondById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetBondById_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetBondById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetBondsByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetBondsByOwner_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetBondsByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetBondsModuleBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetBondsModuleBalance_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetBondsModuleBalance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "bond", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Bonds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "bond", "v1", "bonds"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GetBondById_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cerc", "bond", "v1", "bonds", "id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GetBondsByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cerc", "bond", "v1", "by-owner", "owner"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GetBondsModuleBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "bond", "v1", "balance"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + forward_Query_Bonds_0 = runtime.ForwardResponseMessage + + forward_Query_GetBondById_0 = runtime.ForwardResponseMessage + + forward_Query_GetBondsByOwner_0 = runtime.ForwardResponseMessage + + forward_Query_GetBondsModuleBalance_0 = runtime.ForwardResponseMessage ) diff --git a/x/bond/tx.pb.go b/x/bond/tx.pb.go index 74a18f8c1..299569cd2 100644 --- a/x/bond/tx.pb.go +++ b/x/bond/tx.pb.go @@ -130,41 +130,342 @@ func (m *MsgCreateBondResponse) GetId() string { return "" } +// MsgRefillBond defines a SDK message for refill the amount for bond. +type MsgRefillBond struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` + Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins" json:"coins" yaml:"coins"` +} + +func (m *MsgRefillBond) Reset() { *m = MsgRefillBond{} } +func (m *MsgRefillBond) String() string { return proto.CompactTextString(m) } +func (*MsgRefillBond) ProtoMessage() {} +func (*MsgRefillBond) Descriptor() ([]byte, []int) { + return fileDescriptor_efb1a132c2c5bd62, []int{2} +} +func (m *MsgRefillBond) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRefillBond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRefillBond.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 *MsgRefillBond) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRefillBond.Merge(m, src) +} +func (m *MsgRefillBond) XXX_Size() int { + return m.Size() +} +func (m *MsgRefillBond) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRefillBond.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRefillBond proto.InternalMessageInfo + +func (m *MsgRefillBond) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *MsgRefillBond) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgRefillBond) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Coins + } + return nil +} + +// MsgRefillBondResponse defines the Msg/RefillBond response type. +type MsgRefillBondResponse struct { +} + +func (m *MsgRefillBondResponse) Reset() { *m = MsgRefillBondResponse{} } +func (m *MsgRefillBondResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRefillBondResponse) ProtoMessage() {} +func (*MsgRefillBondResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_efb1a132c2c5bd62, []int{3} +} +func (m *MsgRefillBondResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRefillBondResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRefillBondResponse.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 *MsgRefillBondResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRefillBondResponse.Merge(m, src) +} +func (m *MsgRefillBondResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRefillBondResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRefillBondResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRefillBondResponse proto.InternalMessageInfo + +// MsgWithdrawBond defines a SDK message for withdrawing amount from bond. +type MsgWithdrawBond struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` + Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins" json:"coins" yaml:"coins"` +} + +func (m *MsgWithdrawBond) Reset() { *m = MsgWithdrawBond{} } +func (m *MsgWithdrawBond) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawBond) ProtoMessage() {} +func (*MsgWithdrawBond) Descriptor() ([]byte, []int) { + return fileDescriptor_efb1a132c2c5bd62, []int{4} +} +func (m *MsgWithdrawBond) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawBond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawBond.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 *MsgWithdrawBond) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawBond.Merge(m, src) +} +func (m *MsgWithdrawBond) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawBond) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawBond.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawBond proto.InternalMessageInfo + +func (m *MsgWithdrawBond) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *MsgWithdrawBond) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgWithdrawBond) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Coins + } + return nil +} + +// MsgWithdrawBondResponse defines the Msg/WithdrawBond response type. +type MsgWithdrawBondResponse struct { +} + +func (m *MsgWithdrawBondResponse) Reset() { *m = MsgWithdrawBondResponse{} } +func (m *MsgWithdrawBondResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawBondResponse) ProtoMessage() {} +func (*MsgWithdrawBondResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_efb1a132c2c5bd62, []int{5} +} +func (m *MsgWithdrawBondResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawBondResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawBondResponse.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 *MsgWithdrawBondResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawBondResponse.Merge(m, src) +} +func (m *MsgWithdrawBondResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawBondResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawBondResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawBondResponse proto.InternalMessageInfo + +// MsgCancelBond defines a SDK message for the cancel the bond. +type MsgCancelBond struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (m *MsgCancelBond) Reset() { *m = MsgCancelBond{} } +func (m *MsgCancelBond) String() string { return proto.CompactTextString(m) } +func (*MsgCancelBond) ProtoMessage() {} +func (*MsgCancelBond) Descriptor() ([]byte, []int) { + return fileDescriptor_efb1a132c2c5bd62, []int{6} +} +func (m *MsgCancelBond) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelBond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelBond.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 *MsgCancelBond) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelBond.Merge(m, src) +} +func (m *MsgCancelBond) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelBond) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelBond.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelBond proto.InternalMessageInfo + +func (m *MsgCancelBond) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *MsgCancelBond) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +// MsgCancelBondResponse defines the Msg/CancelBond response type. +type MsgCancelBondResponse struct { +} + +func (m *MsgCancelBondResponse) Reset() { *m = MsgCancelBondResponse{} } +func (m *MsgCancelBondResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCancelBondResponse) ProtoMessage() {} +func (*MsgCancelBondResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_efb1a132c2c5bd62, []int{7} +} +func (m *MsgCancelBondResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelBondResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelBondResponse.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 *MsgCancelBondResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelBondResponse.Merge(m, src) +} +func (m *MsgCancelBondResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelBondResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelBondResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelBondResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgCreateBond)(nil), "cerc.bond.v1.MsgCreateBond") proto.RegisterType((*MsgCreateBondResponse)(nil), "cerc.bond.v1.MsgCreateBondResponse") + proto.RegisterType((*MsgRefillBond)(nil), "cerc.bond.v1.MsgRefillBond") + proto.RegisterType((*MsgRefillBondResponse)(nil), "cerc.bond.v1.MsgRefillBondResponse") + proto.RegisterType((*MsgWithdrawBond)(nil), "cerc.bond.v1.MsgWithdrawBond") + proto.RegisterType((*MsgWithdrawBondResponse)(nil), "cerc.bond.v1.MsgWithdrawBondResponse") + proto.RegisterType((*MsgCancelBond)(nil), "cerc.bond.v1.MsgCancelBond") + proto.RegisterType((*MsgCancelBondResponse)(nil), "cerc.bond.v1.MsgCancelBondResponse") } func init() { proto.RegisterFile("cerc/bond/v1/tx.proto", fileDescriptor_efb1a132c2c5bd62) } var fileDescriptor_efb1a132c2c5bd62 = []byte{ - // 405 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0x6d, 0x57, 0xad, 0xc4, 0x15, 0x18, 0x2c, 0x0a, 0x8d, 0x8b, 0x9c, 0xe0, 0x0e, 0x44, - 0x95, 0x7a, 0x27, 0x87, 0xad, 0x12, 0x4b, 0x3a, 0x67, 0xc9, 0xc8, 0x82, 0xce, 0xe7, 0xd3, 0x71, - 0x10, 0xdf, 0x33, 0x7e, 0x87, 0xd5, 0x2e, 0x80, 0xfa, 0x17, 0x20, 0xf1, 0x5f, 0x30, 0x75, 0xe0, - 0x8f, 0xe8, 0x18, 0x89, 0x85, 0x29, 0xa0, 0x04, 0x29, 0x3b, 0x7f, 0x01, 0xb2, 0x7d, 0x91, 0x92, - 0x85, 0xc9, 0xef, 0xc7, 0xf7, 0x7d, 0xde, 0xd7, 0xf7, 0xc8, 0x91, 0x90, 0x95, 0x60, 0x19, 0x98, - 0x9c, 0xd5, 0x29, 0xb3, 0x57, 0xb4, 0xac, 0xc0, 0x42, 0x78, 0xbf, 0x29, 0xd3, 0xa6, 0x4c, 0xeb, - 0x34, 0x7a, 0x22, 0x00, 0x0b, 0x40, 0x56, 0xa0, 0x6a, 0x54, 0x05, 0xaa, 0x4e, 0x16, 0x3d, 0x52, - 0xa0, 0xa0, 0x0d, 0x59, 0x13, 0xb9, 0xea, 0x53, 0x05, 0xa0, 0x66, 0x92, 0xf1, 0x52, 0x33, 0x6e, - 0x0c, 0x58, 0x6e, 0x35, 0x18, 0x74, 0xdd, 0xd8, 0xc1, 0x32, 0x8e, 0x92, 0xd5, 0x69, 0x26, 0x2d, - 0x4f, 0x99, 0x00, 0x6d, 0xba, 0x7e, 0xf2, 0xdd, 0x27, 0x0f, 0x26, 0xa8, 0x2e, 0x2b, 0xc9, 0xad, - 0x1c, 0x83, 0xc9, 0xc3, 0xc7, 0xe4, 0x00, 0xb5, 0x32, 0xb2, 0x3a, 0xf6, 0x07, 0xfe, 0xf0, 0xde, - 0xd4, 0x65, 0xe1, 0x47, 0xb2, 0xdf, 0xcc, 0xe1, 0x71, 0x30, 0xd8, 0x1b, 0x1e, 0x8e, 0x7a, 0xb4, - 0x23, 0xd3, 0x86, 0x4c, 0x1d, 0x99, 0x5e, 0x82, 0x36, 0xe3, 0xc9, 0xdd, 0xa2, 0xef, 0xfd, 0x5d, - 0xf4, 0x7b, 0x6f, 0x11, 0xcc, 0x45, 0xd2, 0x4e, 0x25, 0x83, 0x6b, 0x5e, 0xcc, 0x36, 0xc9, 0xb7, - 0x5f, 0xfd, 0xa1, 0xd2, 0xf6, 0xcd, 0x87, 0x8c, 0x0a, 0x28, 0x98, 0xf3, 0xd8, 0x7d, 0xce, 0x31, - 0x7f, 0xc7, 0xec, 0x75, 0x29, 0xb1, 0xa5, 0xe1, 0xb4, 0x5b, 0x7b, 0x71, 0x78, 0xb3, 0xbe, 0x3d, - 0x73, 0x66, 0x92, 0xe7, 0xe4, 0x68, 0xc7, 0xf5, 0x54, 0x62, 0x09, 0x06, 0x65, 0xf8, 0x90, 0x04, - 0x3a, 0x77, 0xce, 0x03, 0x9d, 0x8f, 0x3e, 0x91, 0xbd, 0x09, 0xaa, 0xf0, 0x3d, 0x21, 0x5b, 0xbf, - 0x78, 0x42, 0xb7, 0x1f, 0x9c, 0xee, 0x90, 0xa2, 0xd3, 0xff, 0x34, 0x37, 0x6b, 0x92, 0x67, 0x37, - 0x3f, 0xfe, 0x7c, 0x0d, 0x4e, 0x92, 0x1e, 0xdb, 0xb9, 0xa8, 0x68, 0x95, 0xaf, 0x9b, 0x34, 0xda, - 0xff, 0xbc, 0xbe, 0x3d, 0xf3, 0xc7, 0x2f, 0xef, 0x96, 0xb1, 0x3f, 0x5f, 0xc6, 0xfe, 0xef, 0x65, - 0xec, 0x7f, 0x59, 0xc5, 0xde, 0x7c, 0x15, 0x7b, 0x3f, 0x57, 0xb1, 0xf7, 0xea, 0x54, 0x69, 0x4b, - 0xeb, 0x3c, 0xa3, 0x16, 0x5a, 0xca, 0xb9, 0x06, 0x36, 0xe3, 0x02, 0x8c, 0x16, 0xa3, 0x9c, 0x5d, - 0xb5, 0xd0, 0xec, 0xa0, 0x3d, 0xd3, 0x8b, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbd, 0x7f, 0x1d, - 0xaa, 0x3a, 0x02, 0x00, 0x00, + // 549 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x54, 0x41, 0x6b, 0x13, 0x41, + 0x18, 0xcd, 0x26, 0xb4, 0xe0, 0xb4, 0x2a, 0x04, 0x6b, 0x9b, 0xc4, 0x6e, 0xe2, 0x06, 0x31, 0x14, + 0x3a, 0x43, 0xe2, 0xad, 0xe0, 0x25, 0xf5, 0x9a, 0x4b, 0x2e, 0x82, 0x17, 0x99, 0xdd, 0x1d, 0xa7, + 0xa3, 0xc9, 0x7c, 0x71, 0x67, 0x4c, 0x9b, 0x8b, 0x48, 0x7f, 0x81, 0xe0, 0xbf, 0xf0, 0xd4, 0x83, + 0x3f, 0x41, 0xa4, 0xc7, 0x82, 0x17, 0x4f, 0xb5, 0x24, 0x42, 0xef, 0xfe, 0x02, 0xd9, 0xd9, 0xcd, + 0x66, 0xb7, 0xd9, 0x16, 0xbc, 0xe9, 0x29, 0x3b, 0xf3, 0xde, 0xbc, 0xf7, 0xbd, 0x6f, 0xbe, 0x09, + 0xda, 0xf0, 0x58, 0xe0, 0x11, 0x17, 0xa4, 0x4f, 0xc6, 0x6d, 0xa2, 0x8f, 0xf0, 0x28, 0x00, 0x0d, + 0xe5, 0xf5, 0x70, 0x1b, 0x87, 0xdb, 0x78, 0xdc, 0xae, 0x6e, 0x7a, 0xa0, 0x86, 0xa0, 0xc8, 0x50, + 0xf1, 0x90, 0x35, 0x54, 0x3c, 0xa2, 0x55, 0xef, 0x71, 0xe0, 0x60, 0x3e, 0x49, 0xf8, 0x15, 0xef, + 0x3e, 0xe0, 0x00, 0x7c, 0xc0, 0x08, 0x1d, 0x09, 0x42, 0xa5, 0x04, 0x4d, 0xb5, 0x00, 0xa9, 0x62, + 0xd4, 0x8e, 0xc5, 0x5c, 0xaa, 0x18, 0x19, 0xb7, 0x5d, 0xa6, 0x69, 0x9b, 0x78, 0x20, 0x64, 0x84, + 0x3b, 0x5f, 0x2c, 0x74, 0xbb, 0xa7, 0xf8, 0x7e, 0xc0, 0xa8, 0x66, 0x5d, 0x90, 0x7e, 0xf9, 0x3e, + 0x5a, 0x55, 0x82, 0x4b, 0x16, 0x6c, 0x59, 0x0d, 0xab, 0x75, 0xab, 0x1f, 0xaf, 0xca, 0xef, 0xd1, + 0x4a, 0x78, 0x4e, 0x6d, 0x15, 0x1b, 0xa5, 0xd6, 0x5a, 0xa7, 0x82, 0x23, 0x65, 0x1c, 0x2a, 0xe3, + 0x58, 0x19, 0xef, 0x83, 0x90, 0xdd, 0xde, 0xe9, 0x79, 0xbd, 0xf0, 0xfb, 0xbc, 0x5e, 0x79, 0xad, + 0x40, 0xee, 0x39, 0xe6, 0x94, 0xd3, 0x98, 0xd0, 0xe1, 0x60, 0xbe, 0xf8, 0xfc, 0xb3, 0xde, 0xe2, + 0x42, 0x1f, 0xbc, 0x73, 0xb1, 0x07, 0x43, 0x12, 0xd7, 0x18, 0xfd, 0xec, 0x2a, 0xff, 0x0d, 0xd1, + 0x93, 0x11, 0x53, 0x46, 0x4d, 0xf5, 0x23, 0xdb, 0xbd, 0xb5, 0xe3, 0xcb, 0x93, 0x9d, 0xb8, 0x18, + 0xe7, 0x31, 0xda, 0xc8, 0x54, 0xdd, 0x67, 0x6a, 0x04, 0x52, 0xb1, 0xf2, 0x1d, 0x54, 0x14, 0x7e, + 0x5c, 0x79, 0x51, 0xf8, 0xce, 0xd7, 0x28, 0x5f, 0x9f, 0xbd, 0x12, 0x83, 0x81, 0xc9, 0x77, 0x85, + 0x91, 0xca, 0x5b, 0xcc, 0xcf, 0x5b, 0xfa, 0x07, 0xf2, 0x6e, 0x9a, 0xbc, 0x8b, 0x14, 0xf3, 0xbc, + 0xce, 0x37, 0x0b, 0xdd, 0xed, 0x29, 0xfe, 0x5c, 0xe8, 0x03, 0x3f, 0xa0, 0x87, 0xff, 0x6f, 0xc2, + 0x0a, 0xda, 0xbc, 0x92, 0x23, 0xc9, 0xf8, 0x2c, 0x1a, 0x51, 0x2a, 0x3d, 0xf6, 0x57, 0x57, 0x98, + 0xd7, 0xc2, 0x85, 0xca, 0x5c, 0xbe, 0x73, 0x51, 0x42, 0xa5, 0x9e, 0xe2, 0xe5, 0xb7, 0x08, 0xa5, + 0x9e, 0x41, 0x0d, 0xa7, 0x1f, 0x25, 0xce, 0x4c, 0x5b, 0xb5, 0x79, 0x03, 0x98, 0x94, 0xfd, 0xf0, + 0xf8, 0xfb, 0xaf, 0x4f, 0xc5, 0x9a, 0x53, 0x21, 0x99, 0x57, 0xef, 0x19, 0xe6, 0xcb, 0x70, 0x19, + 0x5a, 0xa6, 0x26, 0x73, 0xd9, 0x72, 0x01, 0xe6, 0x58, 0xe6, 0x4c, 0xc3, 0x35, 0x96, 0x81, 0x61, + 0x46, 0x96, 0x13, 0xb4, 0x9e, 0x19, 0x96, 0xed, 0x25, 0xdd, 0x34, 0x5c, 0x7d, 0x74, 0x23, 0x9c, + 0x18, 0x37, 0x8d, 0xf1, 0xb6, 0x53, 0xcb, 0x1a, 0x1f, 0xc6, 0xdc, 0x24, 0x6d, 0xea, 0x12, 0x73, + 0x1a, 0x9c, 0x80, 0x79, 0x0d, 0x5e, 0xba, 0xb8, 0x6b, 0x1b, 0x6c, 0x98, 0xc6, 0xb2, 0xba, 0xf2, + 0xe1, 0xf2, 0x64, 0xc7, 0xea, 0x3e, 0x3d, 0x9d, 0xda, 0xd6, 0xd9, 0xd4, 0xb6, 0x2e, 0xa6, 0xb6, + 0xf5, 0x71, 0x66, 0x17, 0xce, 0x66, 0x76, 0xe1, 0xc7, 0xcc, 0x2e, 0xbc, 0x68, 0x72, 0xa1, 0xf1, + 0xd8, 0x77, 0xb1, 0x06, 0xa3, 0xb2, 0x2b, 0x80, 0x0c, 0xa8, 0x07, 0x52, 0x78, 0x1d, 0x9f, 0x1c, + 0x19, 0x51, 0x77, 0xd5, 0xfc, 0x57, 0x3e, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0xae, 0x26, 0x06, + 0xd4, 0xbf, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -181,6 +482,12 @@ const _ = grpc.SupportPackageIsVersion4 type MsgClient interface { // CreateBond defines a method for creating a new bond. CreateBond(ctx context.Context, in *MsgCreateBond, opts ...grpc.CallOption) (*MsgCreateBondResponse, error) + // RefillBond defines a method for refilling amount for bond. + RefillBond(ctx context.Context, in *MsgRefillBond, opts ...grpc.CallOption) (*MsgRefillBondResponse, error) + // WithdrawBond defines a method for withdrawing amount from bond. + WithdrawBond(ctx context.Context, in *MsgWithdrawBond, opts ...grpc.CallOption) (*MsgWithdrawBondResponse, error) + // CancelBond defines a method for cancelling a bond. + CancelBond(ctx context.Context, in *MsgCancelBond, opts ...grpc.CallOption) (*MsgCancelBondResponse, error) } type msgClient struct { @@ -200,10 +507,43 @@ func (c *msgClient) CreateBond(ctx context.Context, in *MsgCreateBond, opts ...g return out, nil } +func (c *msgClient) RefillBond(ctx context.Context, in *MsgRefillBond, opts ...grpc.CallOption) (*MsgRefillBondResponse, error) { + out := new(MsgRefillBondResponse) + err := c.cc.Invoke(ctx, "/cerc.bond.v1.Msg/RefillBond", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawBond(ctx context.Context, in *MsgWithdrawBond, opts ...grpc.CallOption) (*MsgWithdrawBondResponse, error) { + out := new(MsgWithdrawBondResponse) + err := c.cc.Invoke(ctx, "/cerc.bond.v1.Msg/WithdrawBond", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CancelBond(ctx context.Context, in *MsgCancelBond, opts ...grpc.CallOption) (*MsgCancelBondResponse, error) { + out := new(MsgCancelBondResponse) + err := c.cc.Invoke(ctx, "/cerc.bond.v1.Msg/CancelBond", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // CreateBond defines a method for creating a new bond. CreateBond(context.Context, *MsgCreateBond) (*MsgCreateBondResponse, error) + // RefillBond defines a method for refilling amount for bond. + RefillBond(context.Context, *MsgRefillBond) (*MsgRefillBondResponse, error) + // WithdrawBond defines a method for withdrawing amount from bond. + WithdrawBond(context.Context, *MsgWithdrawBond) (*MsgWithdrawBondResponse, error) + // CancelBond defines a method for cancelling a bond. + CancelBond(context.Context, *MsgCancelBond) (*MsgCancelBondResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -213,6 +553,15 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) CreateBond(ctx context.Context, req *MsgCreateBond) (*MsgCreateBondResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateBond not implemented") } +func (*UnimplementedMsgServer) RefillBond(ctx context.Context, req *MsgRefillBond) (*MsgRefillBondResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RefillBond not implemented") +} +func (*UnimplementedMsgServer) WithdrawBond(ctx context.Context, req *MsgWithdrawBond) (*MsgWithdrawBondResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawBond not implemented") +} +func (*UnimplementedMsgServer) CancelBond(ctx context.Context, req *MsgCancelBond) (*MsgCancelBondResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelBond not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -236,6 +585,60 @@ func _Msg_CreateBond_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _Msg_RefillBond_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRefillBond) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RefillBond(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cerc.bond.v1.Msg/RefillBond", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RefillBond(ctx, req.(*MsgRefillBond)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawBond_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawBond) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawBond(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cerc.bond.v1.Msg/WithdrawBond", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawBond(ctx, req.(*MsgWithdrawBond)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CancelBond_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelBond) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CancelBond(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cerc.bond.v1.Msg/CancelBond", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelBond(ctx, req.(*MsgCancelBond)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cerc.bond.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -244,6 +647,18 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "CreateBond", Handler: _Msg_CreateBond_Handler, }, + { + MethodName: "RefillBond", + Handler: _Msg_RefillBond_Handler, + }, + { + MethodName: "WithdrawBond", + Handler: _Msg_WithdrawBond_Handler, + }, + { + MethodName: "CancelBond", + Handler: _Msg_CancelBond_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cerc/bond/v1/tx.proto", @@ -323,6 +738,214 @@ func (m *MsgCreateBondResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgRefillBond) 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 *MsgRefillBond) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRefillBond) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Coins) > 0 { + for iNdEx := len(m.Coins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Coins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTx(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRefillBondResponse) 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 *MsgRefillBondResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRefillBondResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawBond) 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 *MsgWithdrawBond) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawBond) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Coins) > 0 { + for iNdEx := len(m.Coins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Coins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTx(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawBondResponse) 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 *MsgWithdrawBondResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawBondResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCancelBond) 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 *MsgCancelBond) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelBond) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTx(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCancelBondResponse) 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 *MsgCancelBondResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelBondResponse) 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 @@ -366,6 +989,96 @@ func (m *MsgCreateBondResponse) Size() (n int) { return n } +func (m *MsgRefillBond) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Coins) > 0 { + for _, e := range m.Coins { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgRefillBondResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgWithdrawBond) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Coins) > 0 { + for _, e := range m.Coins { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgWithdrawBondResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCancelBond) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCancelBondResponse) 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 } @@ -570,6 +1283,566 @@ func (m *MsgCreateBondResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgRefillBond) 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: MsgRefillBond: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRefillBond: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coins", 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 + } + m.Coins = append(m.Coins, types.Coin{}) + if err := m.Coins[len(m.Coins)-1].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 *MsgRefillBondResponse) 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: MsgRefillBondResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRefillBondResponse: 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 *MsgWithdrawBond) 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: MsgWithdrawBond: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawBond: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coins", 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 + } + m.Coins = append(m.Coins, types.Coin{}) + if err := m.Coins[len(m.Coins)-1].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 *MsgWithdrawBondResponse) 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: MsgWithdrawBondResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawBondResponse: 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 *MsgCancelBond) 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: MsgCancelBond: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelBond: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = 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 *MsgCancelBondResponse) 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: MsgCancelBondResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelBondResponse: 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 skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/bond/tx.pb.gw.go b/x/bond/tx.pb.gw.go index 3c5a609b6..3ef6bda25 100644 --- a/x/bond/tx.pb.gw.go +++ b/x/bond/tx.pb.gw.go @@ -69,6 +69,114 @@ func local_request_Msg_CreateBond_0(ctx context.Context, marshaler runtime.Marsh } +var ( + filter_Msg_RefillBond_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_RefillBond_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgRefillBond + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_RefillBond_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RefillBond(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_RefillBond_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgRefillBond + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_RefillBond_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RefillBond(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_WithdrawBond_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_WithdrawBond_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgWithdrawBond + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_WithdrawBond_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.WithdrawBond(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_WithdrawBond_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgWithdrawBond + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_WithdrawBond_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.WithdrawBond(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_CancelBond_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_CancelBond_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgCancelBond + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_CancelBond_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CancelBond(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_CancelBond_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgCancelBond + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_CancelBond_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CancelBond(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". // UnaryRPC :call MsgServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -98,6 +206,75 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server }) + mux.Handle("POST", pattern_Msg_RefillBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_RefillBond_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_RefillBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_WithdrawBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_WithdrawBond_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_WithdrawBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_CancelBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_CancelBond_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_CancelBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -159,13 +336,85 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client }) + mux.Handle("POST", pattern_Msg_RefillBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_RefillBond_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_RefillBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_WithdrawBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_WithdrawBond_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_WithdrawBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_CancelBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_CancelBond_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_CancelBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( pattern_Msg_CreateBond_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "bond", "v1", "create_bond"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Msg_RefillBond_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "bond", "v1", "refill_bond"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Msg_WithdrawBond_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "bond", "v1", "withdraw_bond"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Msg_CancelBond_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "bond", "v1", "cancel_bond"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Msg_CreateBond_0 = runtime.ForwardResponseMessage + + forward_Msg_RefillBond_0 = runtime.ForwardResponseMessage + + forward_Msg_WithdrawBond_0 = runtime.ForwardResponseMessage + + forward_Msg_CancelBond_0 = runtime.ForwardResponseMessage )