diff --git a/Makefile b/Makefile index 3fbcd94..80cafc9 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ lint: BUF_VERSION=1.42 BUILDER_VERSION=0.15.1 -proto-all: proto-format proto-lint proto-breaking proto-gen +proto-all: proto-format proto-lint proto-gen proto-format: @echo "🤖 Running protobuf formatter..." @@ -58,12 +58,6 @@ proto-lint: bufbuild/buf:$(BUF_VERSION) lint @echo "✅ Completed protobuf linting!" -proto-breaking: - @echo "🤖 Running protobuf breaking checks..." - @docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \ - bufbuild/buf:$(BUF_VERSION) breaking --against "https://github.com/noble-assets/halo.git#branch=v1.0.1" - @echo "✅ Completed protobuf breaking checks!" - ############################################################################### ### Testing ### ############################################################################### diff --git a/api/aggregator/v1/query.pulsar.go b/api/aggregator/v1/query.pulsar.go deleted file mode 100644 index e77e08e..0000000 --- a/api/aggregator/v1/query.pulsar.go +++ /dev/null @@ -1,5071 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package aggregatorv1 - -import ( - _ "cosmossdk.io/api/amino" - _ "cosmossdk.io/api/cosmos/query/v1" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryOwner protoreflect.MessageDescriptor -) - -func init() { - file_halo_aggregator_v1_query_proto_init() - md_QueryOwner = File_halo_aggregator_v1_query_proto.Messages().ByName("QueryOwner") -} - -var _ protoreflect.Message = (*fastReflection_QueryOwner)(nil) - -type fastReflection_QueryOwner QueryOwner - -func (x *QueryOwner) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryOwner)(x) -} - -func (x *QueryOwner) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_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_QueryOwner_messageType fastReflection_QueryOwner_messageType -var _ protoreflect.MessageType = fastReflection_QueryOwner_messageType{} - -type fastReflection_QueryOwner_messageType struct{} - -func (x fastReflection_QueryOwner_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryOwner)(nil) -} -func (x fastReflection_QueryOwner_messageType) New() protoreflect.Message { - return new(fastReflection_QueryOwner) -} -func (x fastReflection_QueryOwner_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryOwner -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryOwner) Descriptor() protoreflect.MessageDescriptor { - return md_QueryOwner -} - -// 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_QueryOwner) Type() protoreflect.MessageType { - return _fastReflection_QueryOwner_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryOwner) New() protoreflect.Message { - return new(fastReflection_QueryOwner) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryOwner) Interface() protoreflect.ProtoMessage { - return (*QueryOwner)(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_QueryOwner) 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_QueryOwner) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryOwner")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryOwner 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_QueryOwner) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryOwner")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryOwner 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_QueryOwner) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryOwner")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryOwner 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_QueryOwner) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryOwner")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryOwner 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_QueryOwner) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryOwner")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryOwner 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_QueryOwner) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryOwner")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryOwner 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_QueryOwner) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.QueryOwner", 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_QueryOwner) 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_QueryOwner) 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_QueryOwner) 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_QueryOwner) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryOwner) - 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().(*QueryOwner) - 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().(*QueryOwner) - 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: QueryOwner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryOwner: 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_QueryOwnerResponse protoreflect.MessageDescriptor - fd_QueryOwnerResponse_owner protoreflect.FieldDescriptor -) - -func init() { - file_halo_aggregator_v1_query_proto_init() - md_QueryOwnerResponse = File_halo_aggregator_v1_query_proto.Messages().ByName("QueryOwnerResponse") - fd_QueryOwnerResponse_owner = md_QueryOwnerResponse.Fields().ByName("owner") -} - -var _ protoreflect.Message = (*fastReflection_QueryOwnerResponse)(nil) - -type fastReflection_QueryOwnerResponse QueryOwnerResponse - -func (x *QueryOwnerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryOwnerResponse)(x) -} - -func (x *QueryOwnerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_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_QueryOwnerResponse_messageType fastReflection_QueryOwnerResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryOwnerResponse_messageType{} - -type fastReflection_QueryOwnerResponse_messageType struct{} - -func (x fastReflection_QueryOwnerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryOwnerResponse)(nil) -} -func (x fastReflection_QueryOwnerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryOwnerResponse) -} -func (x fastReflection_QueryOwnerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryOwnerResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryOwnerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryOwnerResponse -} - -// 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_QueryOwnerResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryOwnerResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryOwnerResponse) New() protoreflect.Message { - return new(fastReflection_QueryOwnerResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryOwnerResponse) Interface() protoreflect.ProtoMessage { - return (*QueryOwnerResponse)(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_QueryOwnerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Owner != "" { - value := protoreflect.ValueOfString(x.Owner) - if !f(fd_QueryOwnerResponse_owner, 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_QueryOwnerResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "halo.aggregator.v1.QueryOwnerResponse.owner": - return x.Owner != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryOwnerResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryOwnerResponse 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_QueryOwnerResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "halo.aggregator.v1.QueryOwnerResponse.owner": - x.Owner = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryOwnerResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryOwnerResponse 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_QueryOwnerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "halo.aggregator.v1.QueryOwnerResponse.owner": - value := x.Owner - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryOwnerResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryOwnerResponse 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_QueryOwnerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "halo.aggregator.v1.QueryOwnerResponse.owner": - x.Owner = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryOwnerResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryOwnerResponse 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_QueryOwnerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "halo.aggregator.v1.QueryOwnerResponse.owner": - panic(fmt.Errorf("field owner of message halo.aggregator.v1.QueryOwnerResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryOwnerResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryOwnerResponse 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_QueryOwnerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "halo.aggregator.v1.QueryOwnerResponse.owner": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryOwnerResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryOwnerResponse 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_QueryOwnerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.QueryOwnerResponse", 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_QueryOwnerResponse) 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_QueryOwnerResponse) 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_QueryOwnerResponse) 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_QueryOwnerResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryOwnerResponse) - 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.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().(*QueryOwnerResponse) - 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.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().(*QueryOwnerResponse) - 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: QueryOwnerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryOwnerResponse: 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 - 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_QueryNextPrice protoreflect.MessageDescriptor -) - -func init() { - file_halo_aggregator_v1_query_proto_init() - md_QueryNextPrice = File_halo_aggregator_v1_query_proto.Messages().ByName("QueryNextPrice") -} - -var _ protoreflect.Message = (*fastReflection_QueryNextPrice)(nil) - -type fastReflection_QueryNextPrice QueryNextPrice - -func (x *QueryNextPrice) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryNextPrice)(x) -} - -func (x *QueryNextPrice) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_v1_query_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_QueryNextPrice_messageType fastReflection_QueryNextPrice_messageType -var _ protoreflect.MessageType = fastReflection_QueryNextPrice_messageType{} - -type fastReflection_QueryNextPrice_messageType struct{} - -func (x fastReflection_QueryNextPrice_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryNextPrice)(nil) -} -func (x fastReflection_QueryNextPrice_messageType) New() protoreflect.Message { - return new(fastReflection_QueryNextPrice) -} -func (x fastReflection_QueryNextPrice_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryNextPrice -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryNextPrice) Descriptor() protoreflect.MessageDescriptor { - return md_QueryNextPrice -} - -// 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_QueryNextPrice) Type() protoreflect.MessageType { - return _fastReflection_QueryNextPrice_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryNextPrice) New() protoreflect.Message { - return new(fastReflection_QueryNextPrice) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryNextPrice) Interface() protoreflect.ProtoMessage { - return (*QueryNextPrice)(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_QueryNextPrice) 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_QueryNextPrice) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryNextPrice")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryNextPrice 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_QueryNextPrice) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryNextPrice")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryNextPrice 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_QueryNextPrice) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryNextPrice")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryNextPrice 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_QueryNextPrice) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryNextPrice")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryNextPrice 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_QueryNextPrice) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryNextPrice")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryNextPrice 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_QueryNextPrice) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryNextPrice")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryNextPrice 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_QueryNextPrice) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.QueryNextPrice", 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_QueryNextPrice) 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_QueryNextPrice) 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_QueryNextPrice) 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_QueryNextPrice) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryNextPrice) - 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().(*QueryNextPrice) - 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().(*QueryNextPrice) - 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: QueryNextPrice: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNextPrice: 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_QueryNextPriceResponse protoreflect.MessageDescriptor - fd_QueryNextPriceResponse_next_price protoreflect.FieldDescriptor -) - -func init() { - file_halo_aggregator_v1_query_proto_init() - md_QueryNextPriceResponse = File_halo_aggregator_v1_query_proto.Messages().ByName("QueryNextPriceResponse") - fd_QueryNextPriceResponse_next_price = md_QueryNextPriceResponse.Fields().ByName("next_price") -} - -var _ protoreflect.Message = (*fastReflection_QueryNextPriceResponse)(nil) - -type fastReflection_QueryNextPriceResponse QueryNextPriceResponse - -func (x *QueryNextPriceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryNextPriceResponse)(x) -} - -func (x *QueryNextPriceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_v1_query_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_QueryNextPriceResponse_messageType fastReflection_QueryNextPriceResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryNextPriceResponse_messageType{} - -type fastReflection_QueryNextPriceResponse_messageType struct{} - -func (x fastReflection_QueryNextPriceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryNextPriceResponse)(nil) -} -func (x fastReflection_QueryNextPriceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryNextPriceResponse) -} -func (x fastReflection_QueryNextPriceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryNextPriceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryNextPriceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryNextPriceResponse -} - -// 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_QueryNextPriceResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryNextPriceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryNextPriceResponse) New() protoreflect.Message { - return new(fastReflection_QueryNextPriceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryNextPriceResponse) Interface() protoreflect.ProtoMessage { - return (*QueryNextPriceResponse)(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_QueryNextPriceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.NextPrice != "" { - value := protoreflect.ValueOfString(x.NextPrice) - if !f(fd_QueryNextPriceResponse_next_price, 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_QueryNextPriceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "halo.aggregator.v1.QueryNextPriceResponse.next_price": - return x.NextPrice != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryNextPriceResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryNextPriceResponse 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_QueryNextPriceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "halo.aggregator.v1.QueryNextPriceResponse.next_price": - x.NextPrice = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryNextPriceResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryNextPriceResponse 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_QueryNextPriceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "halo.aggregator.v1.QueryNextPriceResponse.next_price": - value := x.NextPrice - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryNextPriceResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryNextPriceResponse 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_QueryNextPriceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "halo.aggregator.v1.QueryNextPriceResponse.next_price": - x.NextPrice = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryNextPriceResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryNextPriceResponse 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_QueryNextPriceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "halo.aggregator.v1.QueryNextPriceResponse.next_price": - panic(fmt.Errorf("field next_price of message halo.aggregator.v1.QueryNextPriceResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryNextPriceResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryNextPriceResponse 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_QueryNextPriceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "halo.aggregator.v1.QueryNextPriceResponse.next_price": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryNextPriceResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryNextPriceResponse 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_QueryNextPriceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.QueryNextPriceResponse", 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_QueryNextPriceResponse) 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_QueryNextPriceResponse) 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_QueryNextPriceResponse) 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_QueryNextPriceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryNextPriceResponse) - 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.NextPrice) - 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().(*QueryNextPriceResponse) - 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.NextPrice) > 0 { - i -= len(x.NextPrice) - copy(dAtA[i:], x.NextPrice) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NextPrice))) - 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().(*QueryNextPriceResponse) - 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: QueryNextPriceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryNextPriceResponse: 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 NextPrice", 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.NextPrice = 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_QueryRoundData protoreflect.MessageDescriptor - fd_QueryRoundData_round_id protoreflect.FieldDescriptor -) - -func init() { - file_halo_aggregator_v1_query_proto_init() - md_QueryRoundData = File_halo_aggregator_v1_query_proto.Messages().ByName("QueryRoundData") - fd_QueryRoundData_round_id = md_QueryRoundData.Fields().ByName("round_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryRoundData)(nil) - -type fastReflection_QueryRoundData QueryRoundData - -func (x *QueryRoundData) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryRoundData)(x) -} - -func (x *QueryRoundData) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_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_QueryRoundData_messageType fastReflection_QueryRoundData_messageType -var _ protoreflect.MessageType = fastReflection_QueryRoundData_messageType{} - -type fastReflection_QueryRoundData_messageType struct{} - -func (x fastReflection_QueryRoundData_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryRoundData)(nil) -} -func (x fastReflection_QueryRoundData_messageType) New() protoreflect.Message { - return new(fastReflection_QueryRoundData) -} -func (x fastReflection_QueryRoundData_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRoundData -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryRoundData) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRoundData -} - -// 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_QueryRoundData) Type() protoreflect.MessageType { - return _fastReflection_QueryRoundData_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryRoundData) New() protoreflect.Message { - return new(fastReflection_QueryRoundData) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryRoundData) Interface() protoreflect.ProtoMessage { - return (*QueryRoundData)(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_QueryRoundData) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.RoundId != uint64(0) { - value := protoreflect.ValueOfUint64(x.RoundId) - if !f(fd_QueryRoundData_round_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_QueryRoundData) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundData.round_id": - return x.RoundId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundData")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundData 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_QueryRoundData) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundData.round_id": - x.RoundId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundData")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundData 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_QueryRoundData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "halo.aggregator.v1.QueryRoundData.round_id": - value := x.RoundId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundData")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundData 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_QueryRoundData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundData.round_id": - x.RoundId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundData")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundData 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_QueryRoundData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundData.round_id": - panic(fmt.Errorf("field round_id of message halo.aggregator.v1.QueryRoundData is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundData")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundData 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_QueryRoundData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundData.round_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundData")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundData 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_QueryRoundData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.QueryRoundData", 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_QueryRoundData) 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_QueryRoundData) 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_QueryRoundData) 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_QueryRoundData) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryRoundData) - 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.RoundId != 0 { - n += 1 + runtime.Sov(uint64(x.RoundId)) - } - 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().(*QueryRoundData) - 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.RoundId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.RoundId)) - i-- - dAtA[i] = 0x8 - } - 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().(*QueryRoundData) - 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: QueryRoundData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRoundData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) - } - x.RoundId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.RoundId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryLatestRoundData protoreflect.MessageDescriptor -) - -func init() { - file_halo_aggregator_v1_query_proto_init() - md_QueryLatestRoundData = File_halo_aggregator_v1_query_proto.Messages().ByName("QueryLatestRoundData") -} - -var _ protoreflect.Message = (*fastReflection_QueryLatestRoundData)(nil) - -type fastReflection_QueryLatestRoundData QueryLatestRoundData - -func (x *QueryLatestRoundData) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLatestRoundData)(x) -} - -func (x *QueryLatestRoundData) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_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_QueryLatestRoundData_messageType fastReflection_QueryLatestRoundData_messageType -var _ protoreflect.MessageType = fastReflection_QueryLatestRoundData_messageType{} - -type fastReflection_QueryLatestRoundData_messageType struct{} - -func (x fastReflection_QueryLatestRoundData_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLatestRoundData)(nil) -} -func (x fastReflection_QueryLatestRoundData_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLatestRoundData) -} -func (x fastReflection_QueryLatestRoundData_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLatestRoundData -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryLatestRoundData) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLatestRoundData -} - -// 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_QueryLatestRoundData) Type() protoreflect.MessageType { - return _fastReflection_QueryLatestRoundData_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLatestRoundData) New() protoreflect.Message { - return new(fastReflection_QueryLatestRoundData) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLatestRoundData) Interface() protoreflect.ProtoMessage { - return (*QueryLatestRoundData)(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_QueryLatestRoundData) 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_QueryLatestRoundData) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryLatestRoundData")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryLatestRoundData 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_QueryLatestRoundData) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryLatestRoundData")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryLatestRoundData 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_QueryLatestRoundData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryLatestRoundData")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryLatestRoundData 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_QueryLatestRoundData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryLatestRoundData")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryLatestRoundData 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_QueryLatestRoundData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryLatestRoundData")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryLatestRoundData 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_QueryLatestRoundData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryLatestRoundData")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryLatestRoundData 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_QueryLatestRoundData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.QueryLatestRoundData", 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_QueryLatestRoundData) 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_QueryLatestRoundData) 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_QueryLatestRoundData) 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_QueryLatestRoundData) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLatestRoundData) - 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().(*QueryLatestRoundData) - 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().(*QueryLatestRoundData) - 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: QueryLatestRoundData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLatestRoundData: 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_QueryRoundDataResponse protoreflect.MessageDescriptor - fd_QueryRoundDataResponse_round_id protoreflect.FieldDescriptor - fd_QueryRoundDataResponse_answer protoreflect.FieldDescriptor - fd_QueryRoundDataResponse_started_at protoreflect.FieldDescriptor - fd_QueryRoundDataResponse_updated_at protoreflect.FieldDescriptor - fd_QueryRoundDataResponse_answered_in_round protoreflect.FieldDescriptor -) - -func init() { - file_halo_aggregator_v1_query_proto_init() - md_QueryRoundDataResponse = File_halo_aggregator_v1_query_proto.Messages().ByName("QueryRoundDataResponse") - fd_QueryRoundDataResponse_round_id = md_QueryRoundDataResponse.Fields().ByName("round_id") - fd_QueryRoundDataResponse_answer = md_QueryRoundDataResponse.Fields().ByName("answer") - fd_QueryRoundDataResponse_started_at = md_QueryRoundDataResponse.Fields().ByName("started_at") - fd_QueryRoundDataResponse_updated_at = md_QueryRoundDataResponse.Fields().ByName("updated_at") - fd_QueryRoundDataResponse_answered_in_round = md_QueryRoundDataResponse.Fields().ByName("answered_in_round") -} - -var _ protoreflect.Message = (*fastReflection_QueryRoundDataResponse)(nil) - -type fastReflection_QueryRoundDataResponse QueryRoundDataResponse - -func (x *QueryRoundDataResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryRoundDataResponse)(x) -} - -func (x *QueryRoundDataResponse) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_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_QueryRoundDataResponse_messageType fastReflection_QueryRoundDataResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryRoundDataResponse_messageType{} - -type fastReflection_QueryRoundDataResponse_messageType struct{} - -func (x fastReflection_QueryRoundDataResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryRoundDataResponse)(nil) -} -func (x fastReflection_QueryRoundDataResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryRoundDataResponse) -} -func (x fastReflection_QueryRoundDataResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRoundDataResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryRoundDataResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRoundDataResponse -} - -// 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_QueryRoundDataResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryRoundDataResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryRoundDataResponse) New() protoreflect.Message { - return new(fastReflection_QueryRoundDataResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryRoundDataResponse) Interface() protoreflect.ProtoMessage { - return (*QueryRoundDataResponse)(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_QueryRoundDataResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.RoundId != uint64(0) { - value := protoreflect.ValueOfUint64(x.RoundId) - if !f(fd_QueryRoundDataResponse_round_id, value) { - return - } - } - if x.Answer != "" { - value := protoreflect.ValueOfString(x.Answer) - if !f(fd_QueryRoundDataResponse_answer, value) { - return - } - } - if x.StartedAt != int64(0) { - value := protoreflect.ValueOfInt64(x.StartedAt) - if !f(fd_QueryRoundDataResponse_started_at, value) { - return - } - } - if x.UpdatedAt != int64(0) { - value := protoreflect.ValueOfInt64(x.UpdatedAt) - if !f(fd_QueryRoundDataResponse_updated_at, value) { - return - } - } - if x.AnsweredInRound != uint64(0) { - value := protoreflect.ValueOfUint64(x.AnsweredInRound) - if !f(fd_QueryRoundDataResponse_answered_in_round, 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_QueryRoundDataResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDataResponse.round_id": - return x.RoundId != uint64(0) - case "halo.aggregator.v1.QueryRoundDataResponse.answer": - return x.Answer != "" - case "halo.aggregator.v1.QueryRoundDataResponse.started_at": - return x.StartedAt != int64(0) - case "halo.aggregator.v1.QueryRoundDataResponse.updated_at": - return x.UpdatedAt != int64(0) - case "halo.aggregator.v1.QueryRoundDataResponse.answered_in_round": - return x.AnsweredInRound != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDataResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDataResponse 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_QueryRoundDataResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDataResponse.round_id": - x.RoundId = uint64(0) - case "halo.aggregator.v1.QueryRoundDataResponse.answer": - x.Answer = "" - case "halo.aggregator.v1.QueryRoundDataResponse.started_at": - x.StartedAt = int64(0) - case "halo.aggregator.v1.QueryRoundDataResponse.updated_at": - x.UpdatedAt = int64(0) - case "halo.aggregator.v1.QueryRoundDataResponse.answered_in_round": - x.AnsweredInRound = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDataResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDataResponse 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_QueryRoundDataResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "halo.aggregator.v1.QueryRoundDataResponse.round_id": - value := x.RoundId - return protoreflect.ValueOfUint64(value) - case "halo.aggregator.v1.QueryRoundDataResponse.answer": - value := x.Answer - return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.QueryRoundDataResponse.started_at": - value := x.StartedAt - return protoreflect.ValueOfInt64(value) - case "halo.aggregator.v1.QueryRoundDataResponse.updated_at": - value := x.UpdatedAt - return protoreflect.ValueOfInt64(value) - case "halo.aggregator.v1.QueryRoundDataResponse.answered_in_round": - value := x.AnsweredInRound - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDataResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDataResponse 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_QueryRoundDataResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDataResponse.round_id": - x.RoundId = value.Uint() - case "halo.aggregator.v1.QueryRoundDataResponse.answer": - x.Answer = value.Interface().(string) - case "halo.aggregator.v1.QueryRoundDataResponse.started_at": - x.StartedAt = value.Int() - case "halo.aggregator.v1.QueryRoundDataResponse.updated_at": - x.UpdatedAt = value.Int() - case "halo.aggregator.v1.QueryRoundDataResponse.answered_in_round": - x.AnsweredInRound = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDataResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDataResponse 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_QueryRoundDataResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDataResponse.round_id": - panic(fmt.Errorf("field round_id of message halo.aggregator.v1.QueryRoundDataResponse is not mutable")) - case "halo.aggregator.v1.QueryRoundDataResponse.answer": - panic(fmt.Errorf("field answer of message halo.aggregator.v1.QueryRoundDataResponse is not mutable")) - case "halo.aggregator.v1.QueryRoundDataResponse.started_at": - panic(fmt.Errorf("field started_at of message halo.aggregator.v1.QueryRoundDataResponse is not mutable")) - case "halo.aggregator.v1.QueryRoundDataResponse.updated_at": - panic(fmt.Errorf("field updated_at of message halo.aggregator.v1.QueryRoundDataResponse is not mutable")) - case "halo.aggregator.v1.QueryRoundDataResponse.answered_in_round": - panic(fmt.Errorf("field answered_in_round of message halo.aggregator.v1.QueryRoundDataResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDataResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDataResponse 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_QueryRoundDataResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDataResponse.round_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "halo.aggregator.v1.QueryRoundDataResponse.answer": - return protoreflect.ValueOfString("") - case "halo.aggregator.v1.QueryRoundDataResponse.started_at": - return protoreflect.ValueOfInt64(int64(0)) - case "halo.aggregator.v1.QueryRoundDataResponse.updated_at": - return protoreflect.ValueOfInt64(int64(0)) - case "halo.aggregator.v1.QueryRoundDataResponse.answered_in_round": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDataResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDataResponse 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_QueryRoundDataResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.QueryRoundDataResponse", 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_QueryRoundDataResponse) 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_QueryRoundDataResponse) 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_QueryRoundDataResponse) 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_QueryRoundDataResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryRoundDataResponse) - 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.RoundId != 0 { - n += 1 + runtime.Sov(uint64(x.RoundId)) - } - l = len(x.Answer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.StartedAt != 0 { - n += 1 + runtime.Sov(uint64(x.StartedAt)) - } - if x.UpdatedAt != 0 { - n += 1 + runtime.Sov(uint64(x.UpdatedAt)) - } - if x.AnsweredInRound != 0 { - n += 1 + runtime.Sov(uint64(x.AnsweredInRound)) - } - 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().(*QueryRoundDataResponse) - 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.AnsweredInRound != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AnsweredInRound)) - i-- - dAtA[i] = 0x28 - } - if x.UpdatedAt != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.UpdatedAt)) - i-- - dAtA[i] = 0x20 - } - if x.StartedAt != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.StartedAt)) - i-- - dAtA[i] = 0x18 - } - if len(x.Answer) > 0 { - i -= len(x.Answer) - copy(dAtA[i:], x.Answer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Answer))) - i-- - dAtA[i] = 0x12 - } - if x.RoundId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.RoundId)) - i-- - dAtA[i] = 0x8 - } - 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().(*QueryRoundDataResponse) - 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: QueryRoundDataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRoundDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) - } - x.RoundId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.RoundId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Answer", 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.Answer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) - } - x.StartedAt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.StartedAt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) - } - x.UpdatedAt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.UpdatedAt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AnsweredInRound", wireType) - } - x.AnsweredInRound = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.AnsweredInRound |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryRoundDetails protoreflect.MessageDescriptor - fd_QueryRoundDetails_round_id protoreflect.FieldDescriptor -) - -func init() { - file_halo_aggregator_v1_query_proto_init() - md_QueryRoundDetails = File_halo_aggregator_v1_query_proto.Messages().ByName("QueryRoundDetails") - fd_QueryRoundDetails_round_id = md_QueryRoundDetails.Fields().ByName("round_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryRoundDetails)(nil) - -type fastReflection_QueryRoundDetails QueryRoundDetails - -func (x *QueryRoundDetails) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryRoundDetails)(x) -} - -func (x *QueryRoundDetails) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_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_QueryRoundDetails_messageType fastReflection_QueryRoundDetails_messageType -var _ protoreflect.MessageType = fastReflection_QueryRoundDetails_messageType{} - -type fastReflection_QueryRoundDetails_messageType struct{} - -func (x fastReflection_QueryRoundDetails_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryRoundDetails)(nil) -} -func (x fastReflection_QueryRoundDetails_messageType) New() protoreflect.Message { - return new(fastReflection_QueryRoundDetails) -} -func (x fastReflection_QueryRoundDetails_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRoundDetails -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryRoundDetails) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRoundDetails -} - -// 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_QueryRoundDetails) Type() protoreflect.MessageType { - return _fastReflection_QueryRoundDetails_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryRoundDetails) New() protoreflect.Message { - return new(fastReflection_QueryRoundDetails) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryRoundDetails) Interface() protoreflect.ProtoMessage { - return (*QueryRoundDetails)(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_QueryRoundDetails) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.RoundId != uint64(0) { - value := protoreflect.ValueOfUint64(x.RoundId) - if !f(fd_QueryRoundDetails_round_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_QueryRoundDetails) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDetails.round_id": - return x.RoundId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDetails")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDetails 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_QueryRoundDetails) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDetails.round_id": - x.RoundId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDetails")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDetails 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_QueryRoundDetails) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "halo.aggregator.v1.QueryRoundDetails.round_id": - value := x.RoundId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDetails")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDetails 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_QueryRoundDetails) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDetails.round_id": - x.RoundId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDetails")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDetails 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_QueryRoundDetails) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDetails.round_id": - panic(fmt.Errorf("field round_id of message halo.aggregator.v1.QueryRoundDetails is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDetails")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDetails 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_QueryRoundDetails) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDetails.round_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDetails")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDetails 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_QueryRoundDetails) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.QueryRoundDetails", 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_QueryRoundDetails) 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_QueryRoundDetails) 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_QueryRoundDetails) 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_QueryRoundDetails) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryRoundDetails) - 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.RoundId != 0 { - n += 1 + runtime.Sov(uint64(x.RoundId)) - } - 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().(*QueryRoundDetails) - 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.RoundId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.RoundId)) - i-- - dAtA[i] = 0x8 - } - 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().(*QueryRoundDetails) - 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: QueryRoundDetails: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRoundDetails: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) - } - x.RoundId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.RoundId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryLatestRoundDetails protoreflect.MessageDescriptor -) - -func init() { - file_halo_aggregator_v1_query_proto_init() - md_QueryLatestRoundDetails = File_halo_aggregator_v1_query_proto.Messages().ByName("QueryLatestRoundDetails") -} - -var _ protoreflect.Message = (*fastReflection_QueryLatestRoundDetails)(nil) - -type fastReflection_QueryLatestRoundDetails QueryLatestRoundDetails - -func (x *QueryLatestRoundDetails) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLatestRoundDetails)(x) -} - -func (x *QueryLatestRoundDetails) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_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_QueryLatestRoundDetails_messageType fastReflection_QueryLatestRoundDetails_messageType -var _ protoreflect.MessageType = fastReflection_QueryLatestRoundDetails_messageType{} - -type fastReflection_QueryLatestRoundDetails_messageType struct{} - -func (x fastReflection_QueryLatestRoundDetails_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLatestRoundDetails)(nil) -} -func (x fastReflection_QueryLatestRoundDetails_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLatestRoundDetails) -} -func (x fastReflection_QueryLatestRoundDetails_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLatestRoundDetails -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryLatestRoundDetails) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLatestRoundDetails -} - -// 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_QueryLatestRoundDetails) Type() protoreflect.MessageType { - return _fastReflection_QueryLatestRoundDetails_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLatestRoundDetails) New() protoreflect.Message { - return new(fastReflection_QueryLatestRoundDetails) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLatestRoundDetails) Interface() protoreflect.ProtoMessage { - return (*QueryLatestRoundDetails)(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_QueryLatestRoundDetails) 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_QueryLatestRoundDetails) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryLatestRoundDetails")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryLatestRoundDetails 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_QueryLatestRoundDetails) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryLatestRoundDetails")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryLatestRoundDetails 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_QueryLatestRoundDetails) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryLatestRoundDetails")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryLatestRoundDetails 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_QueryLatestRoundDetails) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryLatestRoundDetails")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryLatestRoundDetails 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_QueryLatestRoundDetails) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryLatestRoundDetails")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryLatestRoundDetails 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_QueryLatestRoundDetails) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryLatestRoundDetails")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryLatestRoundDetails 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_QueryLatestRoundDetails) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.QueryLatestRoundDetails", 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_QueryLatestRoundDetails) 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_QueryLatestRoundDetails) 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_QueryLatestRoundDetails) 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_QueryLatestRoundDetails) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLatestRoundDetails) - 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().(*QueryLatestRoundDetails) - 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().(*QueryLatestRoundDetails) - 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: QueryLatestRoundDetails: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLatestRoundDetails: 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_QueryRoundDetailsResponse protoreflect.MessageDescriptor - fd_QueryRoundDetailsResponse_round_id protoreflect.FieldDescriptor - fd_QueryRoundDetailsResponse_balance protoreflect.FieldDescriptor - fd_QueryRoundDetailsResponse_interest protoreflect.FieldDescriptor - fd_QueryRoundDetailsResponse_total_supply protoreflect.FieldDescriptor - fd_QueryRoundDetailsResponse_updated_at protoreflect.FieldDescriptor -) - -func init() { - file_halo_aggregator_v1_query_proto_init() - md_QueryRoundDetailsResponse = File_halo_aggregator_v1_query_proto.Messages().ByName("QueryRoundDetailsResponse") - fd_QueryRoundDetailsResponse_round_id = md_QueryRoundDetailsResponse.Fields().ByName("round_id") - fd_QueryRoundDetailsResponse_balance = md_QueryRoundDetailsResponse.Fields().ByName("balance") - fd_QueryRoundDetailsResponse_interest = md_QueryRoundDetailsResponse.Fields().ByName("interest") - fd_QueryRoundDetailsResponse_total_supply = md_QueryRoundDetailsResponse.Fields().ByName("total_supply") - fd_QueryRoundDetailsResponse_updated_at = md_QueryRoundDetailsResponse.Fields().ByName("updated_at") -} - -var _ protoreflect.Message = (*fastReflection_QueryRoundDetailsResponse)(nil) - -type fastReflection_QueryRoundDetailsResponse QueryRoundDetailsResponse - -func (x *QueryRoundDetailsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryRoundDetailsResponse)(x) -} - -func (x *QueryRoundDetailsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_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_QueryRoundDetailsResponse_messageType fastReflection_QueryRoundDetailsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryRoundDetailsResponse_messageType{} - -type fastReflection_QueryRoundDetailsResponse_messageType struct{} - -func (x fastReflection_QueryRoundDetailsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryRoundDetailsResponse)(nil) -} -func (x fastReflection_QueryRoundDetailsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryRoundDetailsResponse) -} -func (x fastReflection_QueryRoundDetailsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRoundDetailsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryRoundDetailsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRoundDetailsResponse -} - -// 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_QueryRoundDetailsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryRoundDetailsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryRoundDetailsResponse) New() protoreflect.Message { - return new(fastReflection_QueryRoundDetailsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryRoundDetailsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryRoundDetailsResponse)(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_QueryRoundDetailsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.RoundId != uint64(0) { - value := protoreflect.ValueOfUint64(x.RoundId) - if !f(fd_QueryRoundDetailsResponse_round_id, value) { - return - } - } - if x.Balance != "" { - value := protoreflect.ValueOfString(x.Balance) - if !f(fd_QueryRoundDetailsResponse_balance, value) { - return - } - } - if x.Interest != "" { - value := protoreflect.ValueOfString(x.Interest) - if !f(fd_QueryRoundDetailsResponse_interest, value) { - return - } - } - if x.TotalSupply != "" { - value := protoreflect.ValueOfString(x.TotalSupply) - if !f(fd_QueryRoundDetailsResponse_total_supply, value) { - return - } - } - if x.UpdatedAt != int64(0) { - value := protoreflect.ValueOfInt64(x.UpdatedAt) - if !f(fd_QueryRoundDetailsResponse_updated_at, 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_QueryRoundDetailsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDetailsResponse.round_id": - return x.RoundId != uint64(0) - case "halo.aggregator.v1.QueryRoundDetailsResponse.balance": - return x.Balance != "" - case "halo.aggregator.v1.QueryRoundDetailsResponse.interest": - return x.Interest != "" - case "halo.aggregator.v1.QueryRoundDetailsResponse.total_supply": - return x.TotalSupply != "" - case "halo.aggregator.v1.QueryRoundDetailsResponse.updated_at": - return x.UpdatedAt != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDetailsResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDetailsResponse 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_QueryRoundDetailsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDetailsResponse.round_id": - x.RoundId = uint64(0) - case "halo.aggregator.v1.QueryRoundDetailsResponse.balance": - x.Balance = "" - case "halo.aggregator.v1.QueryRoundDetailsResponse.interest": - x.Interest = "" - case "halo.aggregator.v1.QueryRoundDetailsResponse.total_supply": - x.TotalSupply = "" - case "halo.aggregator.v1.QueryRoundDetailsResponse.updated_at": - x.UpdatedAt = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDetailsResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDetailsResponse 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_QueryRoundDetailsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "halo.aggregator.v1.QueryRoundDetailsResponse.round_id": - value := x.RoundId - return protoreflect.ValueOfUint64(value) - case "halo.aggregator.v1.QueryRoundDetailsResponse.balance": - value := x.Balance - return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.QueryRoundDetailsResponse.interest": - value := x.Interest - return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.QueryRoundDetailsResponse.total_supply": - value := x.TotalSupply - return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.QueryRoundDetailsResponse.updated_at": - value := x.UpdatedAt - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDetailsResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDetailsResponse 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_QueryRoundDetailsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDetailsResponse.round_id": - x.RoundId = value.Uint() - case "halo.aggregator.v1.QueryRoundDetailsResponse.balance": - x.Balance = value.Interface().(string) - case "halo.aggregator.v1.QueryRoundDetailsResponse.interest": - x.Interest = value.Interface().(string) - case "halo.aggregator.v1.QueryRoundDetailsResponse.total_supply": - x.TotalSupply = value.Interface().(string) - case "halo.aggregator.v1.QueryRoundDetailsResponse.updated_at": - x.UpdatedAt = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDetailsResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDetailsResponse 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_QueryRoundDetailsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDetailsResponse.round_id": - panic(fmt.Errorf("field round_id of message halo.aggregator.v1.QueryRoundDetailsResponse is not mutable")) - case "halo.aggregator.v1.QueryRoundDetailsResponse.balance": - panic(fmt.Errorf("field balance of message halo.aggregator.v1.QueryRoundDetailsResponse is not mutable")) - case "halo.aggregator.v1.QueryRoundDetailsResponse.interest": - panic(fmt.Errorf("field interest of message halo.aggregator.v1.QueryRoundDetailsResponse is not mutable")) - case "halo.aggregator.v1.QueryRoundDetailsResponse.total_supply": - panic(fmt.Errorf("field total_supply of message halo.aggregator.v1.QueryRoundDetailsResponse is not mutable")) - case "halo.aggregator.v1.QueryRoundDetailsResponse.updated_at": - panic(fmt.Errorf("field updated_at of message halo.aggregator.v1.QueryRoundDetailsResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDetailsResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDetailsResponse 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_QueryRoundDetailsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "halo.aggregator.v1.QueryRoundDetailsResponse.round_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "halo.aggregator.v1.QueryRoundDetailsResponse.balance": - return protoreflect.ValueOfString("") - case "halo.aggregator.v1.QueryRoundDetailsResponse.interest": - return protoreflect.ValueOfString("") - case "halo.aggregator.v1.QueryRoundDetailsResponse.total_supply": - return protoreflect.ValueOfString("") - case "halo.aggregator.v1.QueryRoundDetailsResponse.updated_at": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.QueryRoundDetailsResponse")) - } - panic(fmt.Errorf("message halo.aggregator.v1.QueryRoundDetailsResponse 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_QueryRoundDetailsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.QueryRoundDetailsResponse", 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_QueryRoundDetailsResponse) 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_QueryRoundDetailsResponse) 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_QueryRoundDetailsResponse) 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_QueryRoundDetailsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryRoundDetailsResponse) - 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.RoundId != 0 { - n += 1 + runtime.Sov(uint64(x.RoundId)) - } - l = len(x.Balance) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Interest) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.TotalSupply) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.UpdatedAt != 0 { - n += 1 + runtime.Sov(uint64(x.UpdatedAt)) - } - 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().(*QueryRoundDetailsResponse) - 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.UpdatedAt != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.UpdatedAt)) - i-- - dAtA[i] = 0x28 - } - if len(x.TotalSupply) > 0 { - i -= len(x.TotalSupply) - copy(dAtA[i:], x.TotalSupply) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TotalSupply))) - i-- - dAtA[i] = 0x22 - } - if len(x.Interest) > 0 { - i -= len(x.Interest) - copy(dAtA[i:], x.Interest) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Interest))) - i-- - dAtA[i] = 0x1a - } - if len(x.Balance) > 0 { - i -= len(x.Balance) - copy(dAtA[i:], x.Balance) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Balance))) - i-- - dAtA[i] = 0x12 - } - if x.RoundId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.RoundId)) - i-- - dAtA[i] = 0x8 - } - 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().(*QueryRoundDetailsResponse) - 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: QueryRoundDetailsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRoundDetailsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) - } - x.RoundId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.RoundId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 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.Balance = 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 Interest", 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.Interest = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalSupply", 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.TotalSupply = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) - } - x.UpdatedAt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.UpdatedAt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: halo/aggregator/v1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type QueryOwner struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryOwner) Reset() { - *x = QueryOwner{} - if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryOwner) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryOwner) ProtoMessage() {} - -// Deprecated: Use QueryOwner.ProtoReflect.Descriptor instead. -func (*QueryOwner) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_query_proto_rawDescGZIP(), []int{0} -} - -type QueryOwnerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` -} - -func (x *QueryOwnerResponse) Reset() { - *x = QueryOwnerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryOwnerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryOwnerResponse) ProtoMessage() {} - -// Deprecated: Use QueryOwnerResponse.ProtoReflect.Descriptor instead. -func (*QueryOwnerResponse) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryOwnerResponse) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -type QueryNextPrice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryNextPrice) Reset() { - *x = QueryNextPrice{} - if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryNextPrice) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryNextPrice) ProtoMessage() {} - -// Deprecated: Use QueryNextPrice.ProtoReflect.Descriptor instead. -func (*QueryNextPrice) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_query_proto_rawDescGZIP(), []int{2} -} - -type QueryNextPriceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NextPrice string `protobuf:"bytes,1,opt,name=next_price,json=nextPrice,proto3" json:"next_price,omitempty"` -} - -func (x *QueryNextPriceResponse) Reset() { - *x = QueryNextPriceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryNextPriceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryNextPriceResponse) ProtoMessage() {} - -// Deprecated: Use QueryNextPriceResponse.ProtoReflect.Descriptor instead. -func (*QueryNextPriceResponse) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryNextPriceResponse) GetNextPrice() string { - if x != nil { - return x.NextPrice - } - return "" -} - -type QueryRoundData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` -} - -func (x *QueryRoundData) Reset() { - *x = QueryRoundData{} - if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryRoundData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryRoundData) ProtoMessage() {} - -// Deprecated: Use QueryRoundData.ProtoReflect.Descriptor instead. -func (*QueryRoundData) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryRoundData) GetRoundId() uint64 { - if x != nil { - return x.RoundId - } - return 0 -} - -type QueryLatestRoundData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryLatestRoundData) Reset() { - *x = QueryLatestRoundData{} - if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryLatestRoundData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryLatestRoundData) ProtoMessage() {} - -// Deprecated: Use QueryLatestRoundData.ProtoReflect.Descriptor instead. -func (*QueryLatestRoundData) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_query_proto_rawDescGZIP(), []int{5} -} - -type QueryRoundDataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` - Answer string `protobuf:"bytes,2,opt,name=answer,proto3" json:"answer,omitempty"` - StartedAt int64 `protobuf:"varint,3,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` - UpdatedAt int64 `protobuf:"varint,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - AnsweredInRound uint64 `protobuf:"varint,5,opt,name=answered_in_round,json=answeredInRound,proto3" json:"answered_in_round,omitempty"` -} - -func (x *QueryRoundDataResponse) Reset() { - *x = QueryRoundDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryRoundDataResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryRoundDataResponse) ProtoMessage() {} - -// Deprecated: Use QueryRoundDataResponse.ProtoReflect.Descriptor instead. -func (*QueryRoundDataResponse) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryRoundDataResponse) GetRoundId() uint64 { - if x != nil { - return x.RoundId - } - return 0 -} - -func (x *QueryRoundDataResponse) GetAnswer() string { - if x != nil { - return x.Answer - } - return "" -} - -func (x *QueryRoundDataResponse) GetStartedAt() int64 { - if x != nil { - return x.StartedAt - } - return 0 -} - -func (x *QueryRoundDataResponse) GetUpdatedAt() int64 { - if x != nil { - return x.UpdatedAt - } - return 0 -} - -func (x *QueryRoundDataResponse) GetAnsweredInRound() uint64 { - if x != nil { - return x.AnsweredInRound - } - return 0 -} - -type QueryRoundDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` -} - -func (x *QueryRoundDetails) Reset() { - *x = QueryRoundDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryRoundDetails) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryRoundDetails) ProtoMessage() {} - -// Deprecated: Use QueryRoundDetails.ProtoReflect.Descriptor instead. -func (*QueryRoundDetails) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryRoundDetails) GetRoundId() uint64 { - if x != nil { - return x.RoundId - } - return 0 -} - -type QueryLatestRoundDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryLatestRoundDetails) Reset() { - *x = QueryLatestRoundDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryLatestRoundDetails) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryLatestRoundDetails) ProtoMessage() {} - -// Deprecated: Use QueryLatestRoundDetails.ProtoReflect.Descriptor instead. -func (*QueryLatestRoundDetails) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_query_proto_rawDescGZIP(), []int{8} -} - -type QueryRoundDetailsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` - Balance string `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` - Interest string `protobuf:"bytes,3,opt,name=interest,proto3" json:"interest,omitempty"` - TotalSupply string `protobuf:"bytes,4,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"` - UpdatedAt int64 `protobuf:"varint,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *QueryRoundDetailsResponse) Reset() { - *x = QueryRoundDetailsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryRoundDetailsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryRoundDetailsResponse) ProtoMessage() {} - -// Deprecated: Use QueryRoundDetailsResponse.ProtoReflect.Descriptor instead. -func (*QueryRoundDetailsResponse) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryRoundDetailsResponse) GetRoundId() uint64 { - if x != nil { - return x.RoundId - } - return 0 -} - -func (x *QueryRoundDetailsResponse) GetBalance() string { - if x != nil { - return x.Balance - } - return "" -} - -func (x *QueryRoundDetailsResponse) GetInterest() string { - if x != nil { - return x.Interest - } - return "" -} - -func (x *QueryRoundDetailsResponse) GetTotalSupply() string { - if x != nil { - return x.TotalSupply - } - return "" -} - -func (x *QueryRoundDetailsResponse) GetUpdatedAt() int64 { - if x != nil { - return x.UpdatedAt - } - return 0 -} - -var File_halo_aggregator_v1_query_proto protoreflect.FileDescriptor - -var file_halo_aggregator_v1_query_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x12, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x0c, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65, - 0x72, 0x22, 0x2a, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x10, 0x0a, - 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, - 0x69, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0a, 0x6e, 0x65, 0x78, - 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, - 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x09, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x2b, 0x0a, 0x0e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x22, - 0xe7, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, - 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x72, 0x6f, - 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, - 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, - 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2a, 0x0a, - 0x11, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x72, 0x6f, 0x75, - 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, - 0x65, 0x64, 0x49, 0x6e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x2e, 0x0a, 0x11, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x19, - 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x22, 0xc4, 0x02, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, - 0x75, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x4a, 0x0a, - 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, - 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, - 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x08, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, - 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, - 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x1d, 0x0a, 0x0a, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x32, 0xfd, 0x06, 0x0a, 0x05, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x77, 0x0a, 0x05, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, - 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x1a, 0x26, - 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x88, - 0x01, 0x0a, 0x09, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x68, - 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x1a, 0x2a, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x65, 0x78, 0x74, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x88, 0xe7, - 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x68, 0x61, 0x6c, 0x6f, - 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x6e, - 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x09, 0x52, 0x6f, - 0x75, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x2a, 0x2e, 0x68, 0x61, - 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, - 0x64, 0x61, 0x74, 0x61, 0x2f, 0x7b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x7d, 0x12, - 0x94, 0x01, 0x0a, 0x0f, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x28, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x61, - 0x74, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x2a, 0x2e, - 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x88, 0xe7, 0xb0, 0x2a, 0x01, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, - 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x12, 0x9f, 0x01, 0x0a, 0x0c, 0x52, 0x6f, 0x75, 0x6e, 0x64, - 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x25, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x2d, - 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x88, - 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x68, 0x61, 0x6c, - 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x7b, 0x72, - 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa0, 0x01, 0x0a, 0x12, 0x4c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, - 0x2b, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, - 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x2d, 0x2e, 0x68, - 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x88, 0xe7, 0xb0, - 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, - 0x75, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0xd3, 0x01, 0x0a, 0x16, - 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2d, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x68, 0x61, - 0x6c, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x41, 0x58, 0xaa, - 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, 0x5c, 0x41, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x48, 0x61, 0x6c, 0x6f, - 0x5c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x48, 0x61, 0x6c, - 0x6f, 0x3a, 0x3a, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_halo_aggregator_v1_query_proto_rawDescOnce sync.Once - file_halo_aggregator_v1_query_proto_rawDescData = file_halo_aggregator_v1_query_proto_rawDesc -) - -func file_halo_aggregator_v1_query_proto_rawDescGZIP() []byte { - file_halo_aggregator_v1_query_proto_rawDescOnce.Do(func() { - file_halo_aggregator_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_halo_aggregator_v1_query_proto_rawDescData) - }) - return file_halo_aggregator_v1_query_proto_rawDescData -} - -var file_halo_aggregator_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_halo_aggregator_v1_query_proto_goTypes = []interface{}{ - (*QueryOwner)(nil), // 0: halo.aggregator.v1.QueryOwner - (*QueryOwnerResponse)(nil), // 1: halo.aggregator.v1.QueryOwnerResponse - (*QueryNextPrice)(nil), // 2: halo.aggregator.v1.QueryNextPrice - (*QueryNextPriceResponse)(nil), // 3: halo.aggregator.v1.QueryNextPriceResponse - (*QueryRoundData)(nil), // 4: halo.aggregator.v1.QueryRoundData - (*QueryLatestRoundData)(nil), // 5: halo.aggregator.v1.QueryLatestRoundData - (*QueryRoundDataResponse)(nil), // 6: halo.aggregator.v1.QueryRoundDataResponse - (*QueryRoundDetails)(nil), // 7: halo.aggregator.v1.QueryRoundDetails - (*QueryLatestRoundDetails)(nil), // 8: halo.aggregator.v1.QueryLatestRoundDetails - (*QueryRoundDetailsResponse)(nil), // 9: halo.aggregator.v1.QueryRoundDetailsResponse -} -var file_halo_aggregator_v1_query_proto_depIdxs = []int32{ - 0, // 0: halo.aggregator.v1.Query.Owner:input_type -> halo.aggregator.v1.QueryOwner - 2, // 1: halo.aggregator.v1.Query.NextPrice:input_type -> halo.aggregator.v1.QueryNextPrice - 4, // 2: halo.aggregator.v1.Query.RoundData:input_type -> halo.aggregator.v1.QueryRoundData - 5, // 3: halo.aggregator.v1.Query.LatestRoundData:input_type -> halo.aggregator.v1.QueryLatestRoundData - 7, // 4: halo.aggregator.v1.Query.RoundDetails:input_type -> halo.aggregator.v1.QueryRoundDetails - 8, // 5: halo.aggregator.v1.Query.LatestRoundDetails:input_type -> halo.aggregator.v1.QueryLatestRoundDetails - 1, // 6: halo.aggregator.v1.Query.Owner:output_type -> halo.aggregator.v1.QueryOwnerResponse - 3, // 7: halo.aggregator.v1.Query.NextPrice:output_type -> halo.aggregator.v1.QueryNextPriceResponse - 6, // 8: halo.aggregator.v1.Query.RoundData:output_type -> halo.aggregator.v1.QueryRoundDataResponse - 6, // 9: halo.aggregator.v1.Query.LatestRoundData:output_type -> halo.aggregator.v1.QueryRoundDataResponse - 9, // 10: halo.aggregator.v1.Query.RoundDetails:output_type -> halo.aggregator.v1.QueryRoundDetailsResponse - 9, // 11: halo.aggregator.v1.Query.LatestRoundDetails:output_type -> halo.aggregator.v1.QueryRoundDetailsResponse - 6, // [6:12] is the sub-list for method output_type - 0, // [0:6] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_halo_aggregator_v1_query_proto_init() } -func file_halo_aggregator_v1_query_proto_init() { - if File_halo_aggregator_v1_query_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_halo_aggregator_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryOwner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_halo_aggregator_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryOwnerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_halo_aggregator_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryNextPrice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_halo_aggregator_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryNextPriceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_halo_aggregator_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryRoundData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_halo_aggregator_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryLatestRoundData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_halo_aggregator_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryRoundDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_halo_aggregator_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryRoundDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_halo_aggregator_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryLatestRoundDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_halo_aggregator_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryRoundDetailsResponse); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_halo_aggregator_v1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_halo_aggregator_v1_query_proto_goTypes, - DependencyIndexes: file_halo_aggregator_v1_query_proto_depIdxs, - MessageInfos: file_halo_aggregator_v1_query_proto_msgTypes, - }.Build() - File_halo_aggregator_v1_query_proto = out.File - file_halo_aggregator_v1_query_proto_rawDesc = nil - file_halo_aggregator_v1_query_proto_goTypes = nil - file_halo_aggregator_v1_query_proto_depIdxs = nil -} diff --git a/api/aggregator/v1/query_grpc.pb.go b/api/aggregator/v1/query_grpc.pb.go deleted file mode 100644 index d6451de..0000000 --- a/api/aggregator/v1/query_grpc.pb.go +++ /dev/null @@ -1,311 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: halo/aggregator/v1/query.proto - -package aggregatorv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Query_Owner_FullMethodName = "/halo.aggregator.v1.Query/Owner" - Query_NextPrice_FullMethodName = "/halo.aggregator.v1.Query/NextPrice" - Query_RoundData_FullMethodName = "/halo.aggregator.v1.Query/RoundData" - Query_LatestRoundData_FullMethodName = "/halo.aggregator.v1.Query/LatestRoundData" - Query_RoundDetails_FullMethodName = "/halo.aggregator.v1.Query/RoundDetails" - Query_LatestRoundDetails_FullMethodName = "/halo.aggregator.v1.Query/LatestRoundDetails" -) - -// 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 { - Owner(ctx context.Context, in *QueryOwner, opts ...grpc.CallOption) (*QueryOwnerResponse, error) - NextPrice(ctx context.Context, in *QueryNextPrice, opts ...grpc.CallOption) (*QueryNextPriceResponse, error) - RoundData(ctx context.Context, in *QueryRoundData, opts ...grpc.CallOption) (*QueryRoundDataResponse, error) - LatestRoundData(ctx context.Context, in *QueryLatestRoundData, opts ...grpc.CallOption) (*QueryRoundDataResponse, error) - RoundDetails(ctx context.Context, in *QueryRoundDetails, opts ...grpc.CallOption) (*QueryRoundDetailsResponse, error) - LatestRoundDetails(ctx context.Context, in *QueryLatestRoundDetails, opts ...grpc.CallOption) (*QueryRoundDetailsResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Owner(ctx context.Context, in *QueryOwner, opts ...grpc.CallOption) (*QueryOwnerResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryOwnerResponse) - err := c.cc.Invoke(ctx, Query_Owner_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) NextPrice(ctx context.Context, in *QueryNextPrice, opts ...grpc.CallOption) (*QueryNextPriceResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryNextPriceResponse) - err := c.cc.Invoke(ctx, Query_NextPrice_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) RoundData(ctx context.Context, in *QueryRoundData, opts ...grpc.CallOption) (*QueryRoundDataResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryRoundDataResponse) - err := c.cc.Invoke(ctx, Query_RoundData_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) LatestRoundData(ctx context.Context, in *QueryLatestRoundData, opts ...grpc.CallOption) (*QueryRoundDataResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryRoundDataResponse) - err := c.cc.Invoke(ctx, Query_LatestRoundData_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) RoundDetails(ctx context.Context, in *QueryRoundDetails, opts ...grpc.CallOption) (*QueryRoundDetailsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryRoundDetailsResponse) - err := c.cc.Invoke(ctx, Query_RoundDetails_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) LatestRoundDetails(ctx context.Context, in *QueryLatestRoundDetails, opts ...grpc.CallOption) (*QueryRoundDetailsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryRoundDetailsResponse) - err := c.cc.Invoke(ctx, Query_LatestRoundDetails_FullMethodName, in, out, cOpts...) - 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 { - Owner(context.Context, *QueryOwner) (*QueryOwnerResponse, error) - NextPrice(context.Context, *QueryNextPrice) (*QueryNextPriceResponse, error) - RoundData(context.Context, *QueryRoundData) (*QueryRoundDataResponse, error) - LatestRoundData(context.Context, *QueryLatestRoundData) (*QueryRoundDataResponse, error) - RoundDetails(context.Context, *QueryRoundDetails) (*QueryRoundDetailsResponse, error) - LatestRoundDetails(context.Context, *QueryLatestRoundDetails) (*QueryRoundDetailsResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedQueryServer struct{} - -func (UnimplementedQueryServer) Owner(context.Context, *QueryOwner) (*QueryOwnerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Owner not implemented") -} -func (UnimplementedQueryServer) NextPrice(context.Context, *QueryNextPrice) (*QueryNextPriceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NextPrice not implemented") -} -func (UnimplementedQueryServer) RoundData(context.Context, *QueryRoundData) (*QueryRoundDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RoundData not implemented") -} -func (UnimplementedQueryServer) LatestRoundData(context.Context, *QueryLatestRoundData) (*QueryRoundDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LatestRoundData not implemented") -} -func (UnimplementedQueryServer) RoundDetails(context.Context, *QueryRoundDetails) (*QueryRoundDetailsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RoundDetails not implemented") -} -func (UnimplementedQueryServer) LatestRoundDetails(context.Context, *QueryLatestRoundDetails) (*QueryRoundDetailsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LatestRoundDetails not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} -func (UnimplementedQueryServer) testEmbeddedByValue() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - // If the following call pancis, it indicates UnimplementedQueryServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Owner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryOwner) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Owner(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_Owner_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Owner(ctx, req.(*QueryOwner)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_NextPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryNextPrice) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).NextPrice(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_NextPrice_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).NextPrice(ctx, req.(*QueryNextPrice)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_RoundData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRoundData) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).RoundData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_RoundData_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).RoundData(ctx, req.(*QueryRoundData)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_LatestRoundData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLatestRoundData) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LatestRoundData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_LatestRoundData_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LatestRoundData(ctx, req.(*QueryLatestRoundData)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_RoundDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRoundDetails) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).RoundDetails(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_RoundDetails_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).RoundDetails(ctx, req.(*QueryRoundDetails)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_LatestRoundDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLatestRoundDetails) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LatestRoundDetails(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_LatestRoundDetails_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LatestRoundDetails(ctx, req.(*QueryLatestRoundDetails)) - } - 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) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "halo.aggregator.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Owner", - Handler: _Query_Owner_Handler, - }, - { - MethodName: "NextPrice", - Handler: _Query_NextPrice_Handler, - }, - { - MethodName: "RoundData", - Handler: _Query_RoundData_Handler, - }, - { - MethodName: "LatestRoundData", - Handler: _Query_LatestRoundData_Handler, - }, - { - MethodName: "RoundDetails", - Handler: _Query_RoundDetails_Handler, - }, - { - MethodName: "LatestRoundDetails", - Handler: _Query_LatestRoundDetails_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "halo/aggregator/v1/query.proto", -} diff --git a/api/aggregator/v2/aggregator.pulsar.go b/api/aggregator/v2/aggregator.pulsar.go new file mode 100644 index 0000000..543f58b --- /dev/null +++ b/api/aggregator/v2/aggregator.pulsar.go @@ -0,0 +1,638 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package aggregatorv2 + +import ( + _ "cosmossdk.io/api/amino" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_RoundData protoreflect.MessageDescriptor + fd_RoundData_answer protoreflect.FieldDescriptor + fd_RoundData_updated_at protoreflect.FieldDescriptor +) + +func init() { + file_halo_aggregator_v2_aggregator_proto_init() + md_RoundData = File_halo_aggregator_v2_aggregator_proto.Messages().ByName("RoundData") + fd_RoundData_answer = md_RoundData.Fields().ByName("answer") + fd_RoundData_updated_at = md_RoundData.Fields().ByName("updated_at") +} + +var _ protoreflect.Message = (*fastReflection_RoundData)(nil) + +type fastReflection_RoundData RoundData + +func (x *RoundData) ProtoReflect() protoreflect.Message { + return (*fastReflection_RoundData)(x) +} + +func (x *RoundData) slowProtoReflect() protoreflect.Message { + mi := &file_halo_aggregator_v2_aggregator_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_RoundData_messageType fastReflection_RoundData_messageType +var _ protoreflect.MessageType = fastReflection_RoundData_messageType{} + +type fastReflection_RoundData_messageType struct{} + +func (x fastReflection_RoundData_messageType) Zero() protoreflect.Message { + return (*fastReflection_RoundData)(nil) +} +func (x fastReflection_RoundData_messageType) New() protoreflect.Message { + return new(fastReflection_RoundData) +} +func (x fastReflection_RoundData_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_RoundData +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_RoundData) Descriptor() protoreflect.MessageDescriptor { + return md_RoundData +} + +// 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_RoundData) Type() protoreflect.MessageType { + return _fastReflection_RoundData_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_RoundData) New() protoreflect.Message { + return new(fastReflection_RoundData) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_RoundData) Interface() protoreflect.ProtoMessage { + return (*RoundData)(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_RoundData) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Answer != "" { + value := protoreflect.ValueOfString(x.Answer) + if !f(fd_RoundData_answer, value) { + return + } + } + if x.UpdatedAt != uint32(0) { + value := protoreflect.ValueOfUint32(x.UpdatedAt) + if !f(fd_RoundData_updated_at, 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_RoundData) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "halo.aggregator.v2.RoundData.answer": + return x.Answer != "" + case "halo.aggregator.v2.RoundData.updated_at": + return x.UpdatedAt != uint32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.RoundData")) + } + panic(fmt.Errorf("message halo.aggregator.v2.RoundData 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_RoundData) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "halo.aggregator.v2.RoundData.answer": + x.Answer = "" + case "halo.aggregator.v2.RoundData.updated_at": + x.UpdatedAt = uint32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.RoundData")) + } + panic(fmt.Errorf("message halo.aggregator.v2.RoundData 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_RoundData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "halo.aggregator.v2.RoundData.answer": + value := x.Answer + return protoreflect.ValueOfString(value) + case "halo.aggregator.v2.RoundData.updated_at": + value := x.UpdatedAt + return protoreflect.ValueOfUint32(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.RoundData")) + } + panic(fmt.Errorf("message halo.aggregator.v2.RoundData 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_RoundData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "halo.aggregator.v2.RoundData.answer": + x.Answer = value.Interface().(string) + case "halo.aggregator.v2.RoundData.updated_at": + x.UpdatedAt = uint32(value.Uint()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.RoundData")) + } + panic(fmt.Errorf("message halo.aggregator.v2.RoundData 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_RoundData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "halo.aggregator.v2.RoundData.answer": + panic(fmt.Errorf("field answer of message halo.aggregator.v2.RoundData is not mutable")) + case "halo.aggregator.v2.RoundData.updated_at": + panic(fmt.Errorf("field updated_at of message halo.aggregator.v2.RoundData is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.RoundData")) + } + panic(fmt.Errorf("message halo.aggregator.v2.RoundData 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_RoundData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "halo.aggregator.v2.RoundData.answer": + return protoreflect.ValueOfString("") + case "halo.aggregator.v2.RoundData.updated_at": + return protoreflect.ValueOfUint32(uint32(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.RoundData")) + } + panic(fmt.Errorf("message halo.aggregator.v2.RoundData 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_RoundData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v2.RoundData", 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_RoundData) 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_RoundData) 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_RoundData) 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_RoundData) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*RoundData) + 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.Answer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.UpdatedAt != 0 { + n += 1 + runtime.Sov(uint64(x.UpdatedAt)) + } + 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().(*RoundData) + 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.UpdatedAt != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.UpdatedAt)) + i-- + dAtA[i] = 0x10 + } + if len(x.Answer) > 0 { + i -= len(x.Answer) + copy(dAtA[i:], x.Answer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Answer))) + 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().(*RoundData) + 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: RoundData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RoundData: 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 Answer", 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.Answer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) + } + x.UpdatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.UpdatedAt |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: halo/aggregator/v2/aggregator.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RoundData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Answer string `protobuf:"bytes,1,opt,name=answer,proto3" json:"answer,omitempty"` + UpdatedAt uint32 `protobuf:"varint,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *RoundData) Reset() { + *x = RoundData{} + if protoimpl.UnsafeEnabled { + mi := &file_halo_aggregator_v2_aggregator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RoundData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RoundData) ProtoMessage() {} + +// Deprecated: Use RoundData.ProtoReflect.Descriptor instead. +func (*RoundData) Descriptor() ([]byte, []int) { + return file_halo_aggregator_v2_aggregator_proto_rawDescGZIP(), []int{0} +} + +func (x *RoundData) GetAnswer() string { + if x != nil { + return x.Answer + } + return "" +} + +func (x *RoundData) GetUpdatedAt() uint32 { + if x != nil { + return x.UpdatedAt + } + return 0 +} + +var File_halo_aggregator_v2_aggregator_proto protoreflect.FileDescriptor + +var file_halo_aggregator_v2_aggregator_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, + 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, 0x0a, + 0x09, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x48, 0x0a, 0x06, 0x61, 0x6e, + 0x73, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, + 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6e, + 0x73, 0x77, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x42, 0xd8, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x6c, 0x6f, + 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x0f, + 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x6f, + 0x62, 0x6c, 0x65, 0x2d, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, + 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x48, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x48, + 0x61, 0x6c, 0x6f, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, + 0x32, 0xca, 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, 0x5c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x1e, 0x48, 0x61, 0x6c, 0x6f, 0x5c, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x48, 0x61, 0x6c, 0x6f, 0x3a, 0x3a, + 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_halo_aggregator_v2_aggregator_proto_rawDescOnce sync.Once + file_halo_aggregator_v2_aggregator_proto_rawDescData = file_halo_aggregator_v2_aggregator_proto_rawDesc +) + +func file_halo_aggregator_v2_aggregator_proto_rawDescGZIP() []byte { + file_halo_aggregator_v2_aggregator_proto_rawDescOnce.Do(func() { + file_halo_aggregator_v2_aggregator_proto_rawDescData = protoimpl.X.CompressGZIP(file_halo_aggregator_v2_aggregator_proto_rawDescData) + }) + return file_halo_aggregator_v2_aggregator_proto_rawDescData +} + +var file_halo_aggregator_v2_aggregator_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_halo_aggregator_v2_aggregator_proto_goTypes = []interface{}{ + (*RoundData)(nil), // 0: halo.aggregator.v2.RoundData +} +var file_halo_aggregator_v2_aggregator_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_halo_aggregator_v2_aggregator_proto_init() } +func file_halo_aggregator_v2_aggregator_proto_init() { + if File_halo_aggregator_v2_aggregator_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_halo_aggregator_v2_aggregator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RoundData); 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_halo_aggregator_v2_aggregator_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_halo_aggregator_v2_aggregator_proto_goTypes, + DependencyIndexes: file_halo_aggregator_v2_aggregator_proto_depIdxs, + MessageInfos: file_halo_aggregator_v2_aggregator_proto_msgTypes, + }.Build() + File_halo_aggregator_v2_aggregator_proto = out.File + file_halo_aggregator_v2_aggregator_proto_rawDesc = nil + file_halo_aggregator_v2_aggregator_proto_goTypes = nil + file_halo_aggregator_v2_aggregator_proto_depIdxs = nil +} diff --git a/api/aggregator/v1/events.pulsar.go b/api/aggregator/v2/events.pulsar.go similarity index 66% rename from api/aggregator/v1/events.pulsar.go rename to api/aggregator/v2/events.pulsar.go index dc457e5..ac7bb5b 100644 --- a/api/aggregator/v1/events.pulsar.go +++ b/api/aggregator/v2/events.pulsar.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package aggregatorv1 +package aggregatorv2 import ( _ "cosmossdk.io/api/amino" @@ -16,34 +16,30 @@ import ( ) var ( - md_BalanceReported protoreflect.MessageDescriptor - fd_BalanceReported_round_id protoreflect.FieldDescriptor - fd_BalanceReported_balance protoreflect.FieldDescriptor - fd_BalanceReported_interest protoreflect.FieldDescriptor - fd_BalanceReported_price protoreflect.FieldDescriptor - fd_BalanceReported_updated_at protoreflect.FieldDescriptor + md_AnswerUpdated protoreflect.MessageDescriptor + fd_AnswerUpdated_current protoreflect.FieldDescriptor + fd_AnswerUpdated_round_id protoreflect.FieldDescriptor + fd_AnswerUpdated_updated_at protoreflect.FieldDescriptor ) func init() { - file_halo_aggregator_v1_events_proto_init() - md_BalanceReported = File_halo_aggregator_v1_events_proto.Messages().ByName("BalanceReported") - fd_BalanceReported_round_id = md_BalanceReported.Fields().ByName("round_id") - fd_BalanceReported_balance = md_BalanceReported.Fields().ByName("balance") - fd_BalanceReported_interest = md_BalanceReported.Fields().ByName("interest") - fd_BalanceReported_price = md_BalanceReported.Fields().ByName("price") - fd_BalanceReported_updated_at = md_BalanceReported.Fields().ByName("updated_at") + file_halo_aggregator_v2_events_proto_init() + md_AnswerUpdated = File_halo_aggregator_v2_events_proto.Messages().ByName("AnswerUpdated") + fd_AnswerUpdated_current = md_AnswerUpdated.Fields().ByName("current") + fd_AnswerUpdated_round_id = md_AnswerUpdated.Fields().ByName("round_id") + fd_AnswerUpdated_updated_at = md_AnswerUpdated.Fields().ByName("updated_at") } -var _ protoreflect.Message = (*fastReflection_BalanceReported)(nil) +var _ protoreflect.Message = (*fastReflection_AnswerUpdated)(nil) -type fastReflection_BalanceReported BalanceReported +type fastReflection_AnswerUpdated AnswerUpdated -func (x *BalanceReported) ProtoReflect() protoreflect.Message { - return (*fastReflection_BalanceReported)(x) +func (x *AnswerUpdated) ProtoReflect() protoreflect.Message { + return (*fastReflection_AnswerUpdated)(x) } -func (x *BalanceReported) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_v1_events_proto_msgTypes[0] +func (x *AnswerUpdated) slowProtoReflect() protoreflect.Message { + mi := &file_halo_aggregator_v2_events_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -54,43 +50,43 @@ func (x *BalanceReported) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_BalanceReported_messageType fastReflection_BalanceReported_messageType -var _ protoreflect.MessageType = fastReflection_BalanceReported_messageType{} +var _fastReflection_AnswerUpdated_messageType fastReflection_AnswerUpdated_messageType +var _ protoreflect.MessageType = fastReflection_AnswerUpdated_messageType{} -type fastReflection_BalanceReported_messageType struct{} +type fastReflection_AnswerUpdated_messageType struct{} -func (x fastReflection_BalanceReported_messageType) Zero() protoreflect.Message { - return (*fastReflection_BalanceReported)(nil) +func (x fastReflection_AnswerUpdated_messageType) Zero() protoreflect.Message { + return (*fastReflection_AnswerUpdated)(nil) } -func (x fastReflection_BalanceReported_messageType) New() protoreflect.Message { - return new(fastReflection_BalanceReported) +func (x fastReflection_AnswerUpdated_messageType) New() protoreflect.Message { + return new(fastReflection_AnswerUpdated) } -func (x fastReflection_BalanceReported_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BalanceReported +func (x fastReflection_AnswerUpdated_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AnswerUpdated } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_BalanceReported) Descriptor() protoreflect.MessageDescriptor { - return md_BalanceReported +func (x *fastReflection_AnswerUpdated) Descriptor() protoreflect.MessageDescriptor { + return md_AnswerUpdated } // 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_BalanceReported) Type() protoreflect.MessageType { - return _fastReflection_BalanceReported_messageType +func (x *fastReflection_AnswerUpdated) Type() protoreflect.MessageType { + return _fastReflection_AnswerUpdated_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_BalanceReported) New() protoreflect.Message { - return new(fastReflection_BalanceReported) +func (x *fastReflection_AnswerUpdated) New() protoreflect.Message { + return new(fastReflection_AnswerUpdated) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_BalanceReported) Interface() protoreflect.ProtoMessage { - return (*BalanceReported)(x) +func (x *fastReflection_AnswerUpdated) Interface() protoreflect.ProtoMessage { + return (*AnswerUpdated)(x) } // Range iterates over every populated field in an undefined order, @@ -98,34 +94,22 @@ func (x *fastReflection_BalanceReported) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_BalanceReported) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.RoundId != uint64(0) { - value := protoreflect.ValueOfUint64(x.RoundId) - if !f(fd_BalanceReported_round_id, value) { - return - } - } - if x.Balance != "" { - value := protoreflect.ValueOfString(x.Balance) - if !f(fd_BalanceReported_balance, value) { +func (x *fastReflection_AnswerUpdated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Current != "" { + value := protoreflect.ValueOfString(x.Current) + if !f(fd_AnswerUpdated_current, value) { return } } - if x.Interest != "" { - value := protoreflect.ValueOfString(x.Interest) - if !f(fd_BalanceReported_interest, value) { - return - } - } - if x.Price != "" { - value := protoreflect.ValueOfString(x.Price) - if !f(fd_BalanceReported_price, value) { + if x.RoundId != uint64(0) { + value := protoreflect.ValueOfUint64(x.RoundId) + if !f(fd_AnswerUpdated_round_id, value) { return } } - if x.UpdatedAt != int64(0) { - value := protoreflect.ValueOfInt64(x.UpdatedAt) - if !f(fd_BalanceReported_updated_at, value) { + if x.UpdatedAt != uint32(0) { + value := protoreflect.ValueOfUint32(x.UpdatedAt) + if !f(fd_AnswerUpdated_updated_at, value) { return } } @@ -142,23 +126,19 @@ func (x *fastReflection_BalanceReported) Range(f func(protoreflect.FieldDescript // 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_BalanceReported) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_AnswerUpdated) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "halo.aggregator.v1.BalanceReported.round_id": + case "halo.aggregator.v2.AnswerUpdated.current": + return x.Current != "" + case "halo.aggregator.v2.AnswerUpdated.round_id": return x.RoundId != uint64(0) - case "halo.aggregator.v1.BalanceReported.balance": - return x.Balance != "" - case "halo.aggregator.v1.BalanceReported.interest": - return x.Interest != "" - case "halo.aggregator.v1.BalanceReported.price": - return x.Price != "" - case "halo.aggregator.v1.BalanceReported.updated_at": - return x.UpdatedAt != int64(0) + case "halo.aggregator.v2.AnswerUpdated.updated_at": + return x.UpdatedAt != uint32(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.BalanceReported")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.AnswerUpdated")) } - panic(fmt.Errorf("message halo.aggregator.v1.BalanceReported does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.AnswerUpdated does not contain field %s", fd.FullName())) } } @@ -168,23 +148,19 @@ func (x *fastReflection_BalanceReported) Has(fd protoreflect.FieldDescriptor) bo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BalanceReported) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_AnswerUpdated) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "halo.aggregator.v1.BalanceReported.round_id": + case "halo.aggregator.v2.AnswerUpdated.current": + x.Current = "" + case "halo.aggregator.v2.AnswerUpdated.round_id": x.RoundId = uint64(0) - case "halo.aggregator.v1.BalanceReported.balance": - x.Balance = "" - case "halo.aggregator.v1.BalanceReported.interest": - x.Interest = "" - case "halo.aggregator.v1.BalanceReported.price": - x.Price = "" - case "halo.aggregator.v1.BalanceReported.updated_at": - x.UpdatedAt = int64(0) + case "halo.aggregator.v2.AnswerUpdated.updated_at": + x.UpdatedAt = uint32(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.BalanceReported")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.AnswerUpdated")) } - panic(fmt.Errorf("message halo.aggregator.v1.BalanceReported does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.AnswerUpdated does not contain field %s", fd.FullName())) } } @@ -194,28 +170,22 @@ func (x *fastReflection_BalanceReported) Clear(fd protoreflect.FieldDescriptor) // 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_BalanceReported) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_AnswerUpdated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "halo.aggregator.v1.BalanceReported.round_id": + case "halo.aggregator.v2.AnswerUpdated.current": + value := x.Current + return protoreflect.ValueOfString(value) + case "halo.aggregator.v2.AnswerUpdated.round_id": value := x.RoundId return protoreflect.ValueOfUint64(value) - case "halo.aggregator.v1.BalanceReported.balance": - value := x.Balance - return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.BalanceReported.interest": - value := x.Interest - return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.BalanceReported.price": - value := x.Price - return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.BalanceReported.updated_at": + case "halo.aggregator.v2.AnswerUpdated.updated_at": value := x.UpdatedAt - return protoreflect.ValueOfInt64(value) + return protoreflect.ValueOfUint32(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.BalanceReported")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.AnswerUpdated")) } - panic(fmt.Errorf("message halo.aggregator.v1.BalanceReported does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.AnswerUpdated does not contain field %s", descriptor.FullName())) } } @@ -229,23 +199,19 @@ func (x *fastReflection_BalanceReported) Get(descriptor protoreflect.FieldDescri // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BalanceReported) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_AnswerUpdated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "halo.aggregator.v1.BalanceReported.round_id": + case "halo.aggregator.v2.AnswerUpdated.current": + x.Current = value.Interface().(string) + case "halo.aggregator.v2.AnswerUpdated.round_id": x.RoundId = value.Uint() - case "halo.aggregator.v1.BalanceReported.balance": - x.Balance = value.Interface().(string) - case "halo.aggregator.v1.BalanceReported.interest": - x.Interest = value.Interface().(string) - case "halo.aggregator.v1.BalanceReported.price": - x.Price = value.Interface().(string) - case "halo.aggregator.v1.BalanceReported.updated_at": - x.UpdatedAt = value.Int() + case "halo.aggregator.v2.AnswerUpdated.updated_at": + x.UpdatedAt = uint32(value.Uint()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.BalanceReported")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.AnswerUpdated")) } - panic(fmt.Errorf("message halo.aggregator.v1.BalanceReported does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.AnswerUpdated does not contain field %s", fd.FullName())) } } @@ -259,56 +225,48 @@ func (x *fastReflection_BalanceReported) Set(fd protoreflect.FieldDescriptor, va // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BalanceReported) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_AnswerUpdated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.BalanceReported.round_id": - panic(fmt.Errorf("field round_id of message halo.aggregator.v1.BalanceReported is not mutable")) - case "halo.aggregator.v1.BalanceReported.balance": - panic(fmt.Errorf("field balance of message halo.aggregator.v1.BalanceReported is not mutable")) - case "halo.aggregator.v1.BalanceReported.interest": - panic(fmt.Errorf("field interest of message halo.aggregator.v1.BalanceReported is not mutable")) - case "halo.aggregator.v1.BalanceReported.price": - panic(fmt.Errorf("field price of message halo.aggregator.v1.BalanceReported is not mutable")) - case "halo.aggregator.v1.BalanceReported.updated_at": - panic(fmt.Errorf("field updated_at of message halo.aggregator.v1.BalanceReported is not mutable")) + case "halo.aggregator.v2.AnswerUpdated.current": + panic(fmt.Errorf("field current of message halo.aggregator.v2.AnswerUpdated is not mutable")) + case "halo.aggregator.v2.AnswerUpdated.round_id": + panic(fmt.Errorf("field round_id of message halo.aggregator.v2.AnswerUpdated is not mutable")) + case "halo.aggregator.v2.AnswerUpdated.updated_at": + panic(fmt.Errorf("field updated_at of message halo.aggregator.v2.AnswerUpdated is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.BalanceReported")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.AnswerUpdated")) } - panic(fmt.Errorf("message halo.aggregator.v1.BalanceReported does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.AnswerUpdated 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_BalanceReported) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_AnswerUpdated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.BalanceReported.round_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "halo.aggregator.v1.BalanceReported.balance": - return protoreflect.ValueOfString("") - case "halo.aggregator.v1.BalanceReported.interest": - return protoreflect.ValueOfString("") - case "halo.aggregator.v1.BalanceReported.price": + case "halo.aggregator.v2.AnswerUpdated.current": return protoreflect.ValueOfString("") - case "halo.aggregator.v1.BalanceReported.updated_at": - return protoreflect.ValueOfInt64(int64(0)) + case "halo.aggregator.v2.AnswerUpdated.round_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "halo.aggregator.v2.AnswerUpdated.updated_at": + return protoreflect.ValueOfUint32(uint32(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.BalanceReported")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.AnswerUpdated")) } - panic(fmt.Errorf("message halo.aggregator.v1.BalanceReported does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.AnswerUpdated 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_BalanceReported) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_AnswerUpdated) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.BalanceReported", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v2.AnswerUpdated", d.FullName())) } panic("unreachable") } @@ -316,7 +274,7 @@ func (x *fastReflection_BalanceReported) WhichOneof(d protoreflect.OneofDescript // 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_BalanceReported) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_AnswerUpdated) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -327,7 +285,7 @@ func (x *fastReflection_BalanceReported) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BalanceReported) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_AnswerUpdated) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -339,7 +297,7 @@ func (x *fastReflection_BalanceReported) SetUnknown(fields protoreflect.RawField // 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_BalanceReported) IsValid() bool { +func (x *fastReflection_AnswerUpdated) IsValid() bool { return x != nil } @@ -349,9 +307,9 @@ func (x *fastReflection_BalanceReported) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_BalanceReported) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_AnswerUpdated) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BalanceReported) + x := input.Message.Interface().(*AnswerUpdated) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -363,20 +321,12 @@ func (x *fastReflection_BalanceReported) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.RoundId != 0 { - n += 1 + runtime.Sov(uint64(x.RoundId)) - } - l = len(x.Balance) + l = len(x.Current) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Interest) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Price) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.RoundId != 0 { + n += 1 + runtime.Sov(uint64(x.RoundId)) } if x.UpdatedAt != 0 { n += 1 + runtime.Sov(uint64(x.UpdatedAt)) @@ -391,7 +341,7 @@ func (x *fastReflection_BalanceReported) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*BalanceReported) + x := input.Message.Interface().(*AnswerUpdated) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -413,33 +363,19 @@ func (x *fastReflection_BalanceReported) ProtoMethods() *protoiface.Methods { if x.UpdatedAt != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.UpdatedAt)) i-- - dAtA[i] = 0x28 - } - if len(x.Price) > 0 { - i -= len(x.Price) - copy(dAtA[i:], x.Price) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Price))) - i-- - dAtA[i] = 0x22 - } - if len(x.Interest) > 0 { - i -= len(x.Interest) - copy(dAtA[i:], x.Interest) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Interest))) - i-- - dAtA[i] = 0x1a - } - if len(x.Balance) > 0 { - i -= len(x.Balance) - copy(dAtA[i:], x.Balance) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Balance))) - i-- - dAtA[i] = 0x12 + dAtA[i] = 0x18 } if x.RoundId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.RoundId)) i-- - dAtA[i] = 0x8 + dAtA[i] = 0x10 + } + if len(x.Current) > 0 { + i -= len(x.Current) + copy(dAtA[i:], x.Current) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Current))) + i-- + dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -452,7 +388,7 @@ func (x *fastReflection_BalanceReported) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BalanceReported) + x := input.Message.Interface().(*AnswerUpdated) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -484,34 +420,15 @@ func (x *fastReflection_BalanceReported) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BalanceReported: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AnswerUpdated: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BalanceReported: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AnswerUpdated: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) - } - x.RoundId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.RoundId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Current", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -539,45 +456,13 @@ func (x *fastReflection_BalanceReported) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Balance = string(dAtA[iNdEx:postIndex]) + x.Current = 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 Interest", 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.Interest = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) } - var stringLen uint64 + x.RoundId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -587,25 +472,12 @@ func (x *fastReflection_BalanceReported) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + x.RoundId |= 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.Price = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: + case 3: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } @@ -619,7 +491,7 @@ func (x *fastReflection_BalanceReported) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.UpdatedAt |= int64(b&0x7F) << shift + x.UpdatedAt |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -660,14 +532,16 @@ func (x *fastReflection_BalanceReported) ProtoMethods() *protoiface.Methods { } var ( - md_NextPriceReported protoreflect.MessageDescriptor - fd_NextPriceReported_price protoreflect.FieldDescriptor + md_NextPriceReported protoreflect.MessageDescriptor + fd_NextPriceReported_round_id protoreflect.FieldDescriptor + fd_NextPriceReported_next_price protoreflect.FieldDescriptor ) func init() { - file_halo_aggregator_v1_events_proto_init() - md_NextPriceReported = File_halo_aggregator_v1_events_proto.Messages().ByName("NextPriceReported") - fd_NextPriceReported_price = md_NextPriceReported.Fields().ByName("price") + file_halo_aggregator_v2_events_proto_init() + md_NextPriceReported = File_halo_aggregator_v2_events_proto.Messages().ByName("NextPriceReported") + fd_NextPriceReported_round_id = md_NextPriceReported.Fields().ByName("round_id") + fd_NextPriceReported_next_price = md_NextPriceReported.Fields().ByName("next_price") } var _ protoreflect.Message = (*fastReflection_NextPriceReported)(nil) @@ -679,7 +553,7 @@ func (x *NextPriceReported) ProtoReflect() protoreflect.Message { } func (x *NextPriceReported) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_v1_events_proto_msgTypes[1] + mi := &file_halo_aggregator_v2_events_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -735,9 +609,15 @@ func (x *fastReflection_NextPriceReported) Interface() protoreflect.ProtoMessage // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_NextPriceReported) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Price != "" { - value := protoreflect.ValueOfString(x.Price) - if !f(fd_NextPriceReported_price, value) { + if x.RoundId != uint64(0) { + value := protoreflect.ValueOfUint64(x.RoundId) + if !f(fd_NextPriceReported_round_id, value) { + return + } + } + if x.NextPrice != "" { + value := protoreflect.ValueOfString(x.NextPrice) + if !f(fd_NextPriceReported_next_price, value) { return } } @@ -756,13 +636,15 @@ func (x *fastReflection_NextPriceReported) Range(f func(protoreflect.FieldDescri // a repeated field is populated if it is non-empty. func (x *fastReflection_NextPriceReported) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "halo.aggregator.v1.NextPriceReported.price": - return x.Price != "" + case "halo.aggregator.v2.NextPriceReported.round_id": + return x.RoundId != uint64(0) + case "halo.aggregator.v2.NextPriceReported.next_price": + return x.NextPrice != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.NextPriceReported")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.NextPriceReported")) } - panic(fmt.Errorf("message halo.aggregator.v1.NextPriceReported does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.NextPriceReported does not contain field %s", fd.FullName())) } } @@ -774,13 +656,15 @@ func (x *fastReflection_NextPriceReported) Has(fd protoreflect.FieldDescriptor) // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_NextPriceReported) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "halo.aggregator.v1.NextPriceReported.price": - x.Price = "" + case "halo.aggregator.v2.NextPriceReported.round_id": + x.RoundId = uint64(0) + case "halo.aggregator.v2.NextPriceReported.next_price": + x.NextPrice = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.NextPriceReported")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.NextPriceReported")) } - panic(fmt.Errorf("message halo.aggregator.v1.NextPriceReported does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.NextPriceReported does not contain field %s", fd.FullName())) } } @@ -792,14 +676,17 @@ func (x *fastReflection_NextPriceReported) Clear(fd protoreflect.FieldDescriptor // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_NextPriceReported) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "halo.aggregator.v1.NextPriceReported.price": - value := x.Price + case "halo.aggregator.v2.NextPriceReported.round_id": + value := x.RoundId + return protoreflect.ValueOfUint64(value) + case "halo.aggregator.v2.NextPriceReported.next_price": + value := x.NextPrice return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.NextPriceReported")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.NextPriceReported")) } - panic(fmt.Errorf("message halo.aggregator.v1.NextPriceReported does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.NextPriceReported does not contain field %s", descriptor.FullName())) } } @@ -815,13 +702,15 @@ func (x *fastReflection_NextPriceReported) Get(descriptor protoreflect.FieldDesc // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_NextPriceReported) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "halo.aggregator.v1.NextPriceReported.price": - x.Price = value.Interface().(string) + case "halo.aggregator.v2.NextPriceReported.round_id": + x.RoundId = value.Uint() + case "halo.aggregator.v2.NextPriceReported.next_price": + x.NextPrice = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.NextPriceReported")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.NextPriceReported")) } - panic(fmt.Errorf("message halo.aggregator.v1.NextPriceReported does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.NextPriceReported does not contain field %s", fd.FullName())) } } @@ -837,13 +726,15 @@ func (x *fastReflection_NextPriceReported) Set(fd protoreflect.FieldDescriptor, // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_NextPriceReported) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.NextPriceReported.price": - panic(fmt.Errorf("field price of message halo.aggregator.v1.NextPriceReported is not mutable")) + case "halo.aggregator.v2.NextPriceReported.round_id": + panic(fmt.Errorf("field round_id of message halo.aggregator.v2.NextPriceReported is not mutable")) + case "halo.aggregator.v2.NextPriceReported.next_price": + panic(fmt.Errorf("field next_price of message halo.aggregator.v2.NextPriceReported is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.NextPriceReported")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.NextPriceReported")) } - panic(fmt.Errorf("message halo.aggregator.v1.NextPriceReported does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.NextPriceReported does not contain field %s", fd.FullName())) } } @@ -852,13 +743,15 @@ func (x *fastReflection_NextPriceReported) Mutable(fd protoreflect.FieldDescript // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_NextPriceReported) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.NextPriceReported.price": + case "halo.aggregator.v2.NextPriceReported.round_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "halo.aggregator.v2.NextPriceReported.next_price": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.NextPriceReported")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.NextPriceReported")) } - panic(fmt.Errorf("message halo.aggregator.v1.NextPriceReported does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.NextPriceReported does not contain field %s", fd.FullName())) } } @@ -868,7 +761,7 @@ func (x *fastReflection_NextPriceReported) NewField(fd protoreflect.FieldDescrip func (x *fastReflection_NextPriceReported) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.NextPriceReported", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v2.NextPriceReported", d.FullName())) } panic("unreachable") } @@ -923,7 +816,10 @@ func (x *fastReflection_NextPriceReported) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Price) + if x.RoundId != 0 { + n += 1 + runtime.Sov(uint64(x.RoundId)) + } + l = len(x.NextPrice) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -956,12 +852,17 @@ func (x *fastReflection_NextPriceReported) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Price) > 0 { - i -= len(x.Price) - copy(dAtA[i:], x.Price) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Price))) + if len(x.NextPrice) > 0 { + i -= len(x.NextPrice) + copy(dAtA[i:], x.NextPrice) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NextPrice))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + } + if x.RoundId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.RoundId)) + i-- + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -1013,8 +914,27 @@ func (x *fastReflection_NextPriceReported) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) + } + x.RoundId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.RoundId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NextPrice", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1042,7 +962,7 @@ func (x *fastReflection_NextPriceReported) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Price = string(dAtA[iNdEx:postIndex]) + x.NextPrice = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1080,16 +1000,16 @@ func (x *fastReflection_NextPriceReported) ProtoMethods() *protoiface.Methods { } var ( - md_OwnershipTransferred protoreflect.MessageDescriptor - fd_OwnershipTransferred_previous_owner protoreflect.FieldDescriptor - fd_OwnershipTransferred_new_owner protoreflect.FieldDescriptor + md_OwnershipTransferred protoreflect.MessageDescriptor + fd_OwnershipTransferred_previous_reporter protoreflect.FieldDescriptor + fd_OwnershipTransferred_new_reporter protoreflect.FieldDescriptor ) func init() { - file_halo_aggregator_v1_events_proto_init() - md_OwnershipTransferred = File_halo_aggregator_v1_events_proto.Messages().ByName("OwnershipTransferred") - fd_OwnershipTransferred_previous_owner = md_OwnershipTransferred.Fields().ByName("previous_owner") - fd_OwnershipTransferred_new_owner = md_OwnershipTransferred.Fields().ByName("new_owner") + file_halo_aggregator_v2_events_proto_init() + md_OwnershipTransferred = File_halo_aggregator_v2_events_proto.Messages().ByName("OwnershipTransferred") + fd_OwnershipTransferred_previous_reporter = md_OwnershipTransferred.Fields().ByName("previous_reporter") + fd_OwnershipTransferred_new_reporter = md_OwnershipTransferred.Fields().ByName("new_reporter") } var _ protoreflect.Message = (*fastReflection_OwnershipTransferred)(nil) @@ -1101,7 +1021,7 @@ func (x *OwnershipTransferred) ProtoReflect() protoreflect.Message { } func (x *OwnershipTransferred) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_v1_events_proto_msgTypes[2] + mi := &file_halo_aggregator_v2_events_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1157,15 +1077,15 @@ func (x *fastReflection_OwnershipTransferred) Interface() protoreflect.ProtoMess // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_OwnershipTransferred) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.PreviousOwner != "" { - value := protoreflect.ValueOfString(x.PreviousOwner) - if !f(fd_OwnershipTransferred_previous_owner, value) { + if x.PreviousReporter != "" { + value := protoreflect.ValueOfString(x.PreviousReporter) + if !f(fd_OwnershipTransferred_previous_reporter, value) { return } } - if x.NewOwner != "" { - value := protoreflect.ValueOfString(x.NewOwner) - if !f(fd_OwnershipTransferred_new_owner, value) { + if x.NewReporter != "" { + value := protoreflect.ValueOfString(x.NewReporter) + if !f(fd_OwnershipTransferred_new_reporter, value) { return } } @@ -1184,15 +1104,15 @@ func (x *fastReflection_OwnershipTransferred) Range(f func(protoreflect.FieldDes // a repeated field is populated if it is non-empty. func (x *fastReflection_OwnershipTransferred) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "halo.aggregator.v1.OwnershipTransferred.previous_owner": - return x.PreviousOwner != "" - case "halo.aggregator.v1.OwnershipTransferred.new_owner": - return x.NewOwner != "" + case "halo.aggregator.v2.OwnershipTransferred.previous_reporter": + return x.PreviousReporter != "" + case "halo.aggregator.v2.OwnershipTransferred.new_reporter": + return x.NewReporter != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.OwnershipTransferred")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.OwnershipTransferred")) } - panic(fmt.Errorf("message halo.aggregator.v1.OwnershipTransferred does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.OwnershipTransferred does not contain field %s", fd.FullName())) } } @@ -1204,15 +1124,15 @@ func (x *fastReflection_OwnershipTransferred) Has(fd protoreflect.FieldDescripto // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_OwnershipTransferred) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "halo.aggregator.v1.OwnershipTransferred.previous_owner": - x.PreviousOwner = "" - case "halo.aggregator.v1.OwnershipTransferred.new_owner": - x.NewOwner = "" + case "halo.aggregator.v2.OwnershipTransferred.previous_reporter": + x.PreviousReporter = "" + case "halo.aggregator.v2.OwnershipTransferred.new_reporter": + x.NewReporter = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.OwnershipTransferred")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.OwnershipTransferred")) } - panic(fmt.Errorf("message halo.aggregator.v1.OwnershipTransferred does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.OwnershipTransferred does not contain field %s", fd.FullName())) } } @@ -1224,17 +1144,17 @@ func (x *fastReflection_OwnershipTransferred) Clear(fd protoreflect.FieldDescrip // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_OwnershipTransferred) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "halo.aggregator.v1.OwnershipTransferred.previous_owner": - value := x.PreviousOwner + case "halo.aggregator.v2.OwnershipTransferred.previous_reporter": + value := x.PreviousReporter return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.OwnershipTransferred.new_owner": - value := x.NewOwner + case "halo.aggregator.v2.OwnershipTransferred.new_reporter": + value := x.NewReporter return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.OwnershipTransferred")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.OwnershipTransferred")) } - panic(fmt.Errorf("message halo.aggregator.v1.OwnershipTransferred does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.OwnershipTransferred does not contain field %s", descriptor.FullName())) } } @@ -1250,15 +1170,15 @@ func (x *fastReflection_OwnershipTransferred) Get(descriptor protoreflect.FieldD // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_OwnershipTransferred) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "halo.aggregator.v1.OwnershipTransferred.previous_owner": - x.PreviousOwner = value.Interface().(string) - case "halo.aggregator.v1.OwnershipTransferred.new_owner": - x.NewOwner = value.Interface().(string) + case "halo.aggregator.v2.OwnershipTransferred.previous_reporter": + x.PreviousReporter = value.Interface().(string) + case "halo.aggregator.v2.OwnershipTransferred.new_reporter": + x.NewReporter = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.OwnershipTransferred")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.OwnershipTransferred")) } - panic(fmt.Errorf("message halo.aggregator.v1.OwnershipTransferred does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.OwnershipTransferred does not contain field %s", fd.FullName())) } } @@ -1274,15 +1194,15 @@ func (x *fastReflection_OwnershipTransferred) Set(fd protoreflect.FieldDescripto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_OwnershipTransferred) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.OwnershipTransferred.previous_owner": - panic(fmt.Errorf("field previous_owner of message halo.aggregator.v1.OwnershipTransferred is not mutable")) - case "halo.aggregator.v1.OwnershipTransferred.new_owner": - panic(fmt.Errorf("field new_owner of message halo.aggregator.v1.OwnershipTransferred is not mutable")) + case "halo.aggregator.v2.OwnershipTransferred.previous_reporter": + panic(fmt.Errorf("field previous_reporter of message halo.aggregator.v2.OwnershipTransferred is not mutable")) + case "halo.aggregator.v2.OwnershipTransferred.new_reporter": + panic(fmt.Errorf("field new_reporter of message halo.aggregator.v2.OwnershipTransferred is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.OwnershipTransferred")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.OwnershipTransferred")) } - panic(fmt.Errorf("message halo.aggregator.v1.OwnershipTransferred does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.OwnershipTransferred does not contain field %s", fd.FullName())) } } @@ -1291,15 +1211,15 @@ func (x *fastReflection_OwnershipTransferred) Mutable(fd protoreflect.FieldDescr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_OwnershipTransferred) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.OwnershipTransferred.previous_owner": + case "halo.aggregator.v2.OwnershipTransferred.previous_reporter": return protoreflect.ValueOfString("") - case "halo.aggregator.v1.OwnershipTransferred.new_owner": + case "halo.aggregator.v2.OwnershipTransferred.new_reporter": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.OwnershipTransferred")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.OwnershipTransferred")) } - panic(fmt.Errorf("message halo.aggregator.v1.OwnershipTransferred does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.OwnershipTransferred does not contain field %s", fd.FullName())) } } @@ -1309,7 +1229,7 @@ func (x *fastReflection_OwnershipTransferred) NewField(fd protoreflect.FieldDesc func (x *fastReflection_OwnershipTransferred) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.OwnershipTransferred", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v2.OwnershipTransferred", d.FullName())) } panic("unreachable") } @@ -1364,11 +1284,11 @@ func (x *fastReflection_OwnershipTransferred) ProtoMethods() *protoiface.Methods var n int var l int _ = l - l = len(x.PreviousOwner) + l = len(x.PreviousReporter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.NewOwner) + l = len(x.NewReporter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -1401,17 +1321,17 @@ func (x *fastReflection_OwnershipTransferred) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.NewOwner) > 0 { - i -= len(x.NewOwner) - copy(dAtA[i:], x.NewOwner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewOwner))) + if len(x.NewReporter) > 0 { + i -= len(x.NewReporter) + copy(dAtA[i:], x.NewReporter) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewReporter))) i-- dAtA[i] = 0x12 } - if len(x.PreviousOwner) > 0 { - i -= len(x.PreviousOwner) - copy(dAtA[i:], x.PreviousOwner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PreviousOwner))) + if len(x.PreviousReporter) > 0 { + i -= len(x.PreviousReporter) + copy(dAtA[i:], x.PreviousReporter) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PreviousReporter))) i-- dAtA[i] = 0xa } @@ -1466,7 +1386,7 @@ func (x *fastReflection_OwnershipTransferred) ProtoMethods() *protoiface.Methods switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PreviousOwner", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PreviousReporter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1494,11 +1414,11 @@ func (x *fastReflection_OwnershipTransferred) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.PreviousOwner = string(dAtA[iNdEx:postIndex]) + x.PreviousReporter = 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 NewOwner", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewReporter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1526,7 +1446,7 @@ func (x *fastReflection_OwnershipTransferred) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.NewOwner = string(dAtA[iNdEx:postIndex]) + x.NewReporter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1567,7 +1487,7 @@ func (x *fastReflection_OwnershipTransferred) ProtoMethods() *protoiface.Methods // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: halo/aggregator/v1/events.proto +// source: halo/aggregator/v2/events.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -1576,67 +1496,51 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type BalanceReported struct { +type AnswerUpdated struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` - Balance string `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` - Interest string `protobuf:"bytes,3,opt,name=interest,proto3" json:"interest,omitempty"` - Price string `protobuf:"bytes,4,opt,name=price,proto3" json:"price,omitempty"` - UpdatedAt int64 `protobuf:"varint,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Current string `protobuf:"bytes,1,opt,name=current,proto3" json:"current,omitempty"` + RoundId uint64 `protobuf:"varint,2,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` + UpdatedAt uint32 `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } -func (x *BalanceReported) Reset() { - *x = BalanceReported{} +func (x *AnswerUpdated) Reset() { + *x = AnswerUpdated{} if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_events_proto_msgTypes[0] + mi := &file_halo_aggregator_v2_events_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BalanceReported) String() string { +func (x *AnswerUpdated) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BalanceReported) ProtoMessage() {} +func (*AnswerUpdated) ProtoMessage() {} -// Deprecated: Use BalanceReported.ProtoReflect.Descriptor instead. -func (*BalanceReported) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_events_proto_rawDescGZIP(), []int{0} +// Deprecated: Use AnswerUpdated.ProtoReflect.Descriptor instead. +func (*AnswerUpdated) Descriptor() ([]byte, []int) { + return file_halo_aggregator_v2_events_proto_rawDescGZIP(), []int{0} } -func (x *BalanceReported) GetRoundId() uint64 { +func (x *AnswerUpdated) GetCurrent() string { if x != nil { - return x.RoundId - } - return 0 -} - -func (x *BalanceReported) GetBalance() string { - if x != nil { - return x.Balance - } - return "" -} - -func (x *BalanceReported) GetInterest() string { - if x != nil { - return x.Interest + return x.Current } return "" } -func (x *BalanceReported) GetPrice() string { +func (x *AnswerUpdated) GetRoundId() uint64 { if x != nil { - return x.Price + return x.RoundId } - return "" + return 0 } -func (x *BalanceReported) GetUpdatedAt() int64 { +func (x *AnswerUpdated) GetUpdatedAt() uint32 { if x != nil { return x.UpdatedAt } @@ -1648,13 +1552,14 @@ type NextPriceReported struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Price string `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` + RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` + NextPrice string `protobuf:"bytes,2,opt,name=next_price,json=nextPrice,proto3" json:"next_price,omitempty"` } func (x *NextPriceReported) Reset() { *x = NextPriceReported{} if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_events_proto_msgTypes[1] + mi := &file_halo_aggregator_v2_events_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1668,12 +1573,19 @@ func (*NextPriceReported) ProtoMessage() {} // Deprecated: Use NextPriceReported.ProtoReflect.Descriptor instead. func (*NextPriceReported) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_events_proto_rawDescGZIP(), []int{1} + return file_halo_aggregator_v2_events_proto_rawDescGZIP(), []int{1} +} + +func (x *NextPriceReported) GetRoundId() uint64 { + if x != nil { + return x.RoundId + } + return 0 } -func (x *NextPriceReported) GetPrice() string { +func (x *NextPriceReported) GetNextPrice() string { if x != nil { - return x.Price + return x.NextPrice } return "" } @@ -1683,14 +1595,14 @@ type OwnershipTransferred struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PreviousOwner string `protobuf:"bytes,1,opt,name=previous_owner,json=previousOwner,proto3" json:"previous_owner,omitempty"` - NewOwner string `protobuf:"bytes,2,opt,name=new_owner,json=newOwner,proto3" json:"new_owner,omitempty"` + PreviousReporter string `protobuf:"bytes,1,opt,name=previous_reporter,json=previousReporter,proto3" json:"previous_reporter,omitempty"` + NewReporter string `protobuf:"bytes,2,opt,name=new_reporter,json=newReporter,proto3" json:"new_reporter,omitempty"` } func (x *OwnershipTransferred) Reset() { *x = OwnershipTransferred{} if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_events_proto_msgTypes[2] + mi := &file_halo_aggregator_v2_events_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1704,100 +1616,93 @@ func (*OwnershipTransferred) ProtoMessage() {} // Deprecated: Use OwnershipTransferred.ProtoReflect.Descriptor instead. func (*OwnershipTransferred) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_events_proto_rawDescGZIP(), []int{2} + return file_halo_aggregator_v2_events_proto_rawDescGZIP(), []int{2} } -func (x *OwnershipTransferred) GetPreviousOwner() string { +func (x *OwnershipTransferred) GetPreviousReporter() string { if x != nil { - return x.PreviousOwner + return x.PreviousReporter } return "" } -func (x *OwnershipTransferred) GetNewOwner() string { +func (x *OwnershipTransferred) GetNewReporter() string { if x != nil { - return x.NewOwner + return x.NewReporter } return "" } -var File_halo_aggregator_v1_events_proto protoreflect.FileDescriptor +var File_halo_aggregator_v2_events_proto protoreflect.FileDescriptor -var file_halo_aggregator_v1_events_proto_rawDesc = []byte{ +var file_halo_aggregator_v2_events_proto_rawDesc = []byte{ 0x0a, 0x1f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x02, 0x0a, 0x0f, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, - 0x08, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x07, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, - 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x62, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, - 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, - 0x73, 0x74, 0x12, 0x46, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x5b, 0x0a, 0x11, 0x4e, 0x65, 0x78, - 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x46, - 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, - 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0x5a, 0x0a, 0x14, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, - 0x68, 0x69, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x12, 0x25, - 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, - 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2d, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x48, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, 0x2e, 0x41, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x48, - 0x61, 0x6c, 0x6f, 0x5c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1e, 0x48, 0x61, 0x6c, 0x6f, 0x5c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x14, 0x48, 0x61, 0x6c, 0x6f, 0x3a, 0x3a, 0x41, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x01, 0x0a, 0x0d, 0x41, 0x6e, + 0x73, 0x77, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x4a, 0x0a, 0x07, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, + 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x22, 0x7f, 0x0a, 0x11, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x49, + 0x64, 0x12, 0x4f, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, + 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, + 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x22, 0x66, 0x0a, 0x14, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, + 0x65, 0x77, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, + 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2d, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x68, 0x61, + 0x6c, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x48, 0x41, 0x58, 0xaa, + 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, 0x5c, 0x41, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x1e, 0x48, 0x61, 0x6c, 0x6f, + 0x5c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x32, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x48, 0x61, 0x6c, + 0x6f, 0x3a, 0x3a, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, + 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_halo_aggregator_v1_events_proto_rawDescOnce sync.Once - file_halo_aggregator_v1_events_proto_rawDescData = file_halo_aggregator_v1_events_proto_rawDesc + file_halo_aggregator_v2_events_proto_rawDescOnce sync.Once + file_halo_aggregator_v2_events_proto_rawDescData = file_halo_aggregator_v2_events_proto_rawDesc ) -func file_halo_aggregator_v1_events_proto_rawDescGZIP() []byte { - file_halo_aggregator_v1_events_proto_rawDescOnce.Do(func() { - file_halo_aggregator_v1_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_halo_aggregator_v1_events_proto_rawDescData) +func file_halo_aggregator_v2_events_proto_rawDescGZIP() []byte { + file_halo_aggregator_v2_events_proto_rawDescOnce.Do(func() { + file_halo_aggregator_v2_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_halo_aggregator_v2_events_proto_rawDescData) }) - return file_halo_aggregator_v1_events_proto_rawDescData + return file_halo_aggregator_v2_events_proto_rawDescData } -var file_halo_aggregator_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_halo_aggregator_v1_events_proto_goTypes = []interface{}{ - (*BalanceReported)(nil), // 0: halo.aggregator.v1.BalanceReported - (*NextPriceReported)(nil), // 1: halo.aggregator.v1.NextPriceReported - (*OwnershipTransferred)(nil), // 2: halo.aggregator.v1.OwnershipTransferred +var file_halo_aggregator_v2_events_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_halo_aggregator_v2_events_proto_goTypes = []interface{}{ + (*AnswerUpdated)(nil), // 0: halo.aggregator.v2.AnswerUpdated + (*NextPriceReported)(nil), // 1: halo.aggregator.v2.NextPriceReported + (*OwnershipTransferred)(nil), // 2: halo.aggregator.v2.OwnershipTransferred } -var file_halo_aggregator_v1_events_proto_depIdxs = []int32{ +var file_halo_aggregator_v2_events_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -1805,14 +1710,14 @@ var file_halo_aggregator_v1_events_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_halo_aggregator_v1_events_proto_init() } -func file_halo_aggregator_v1_events_proto_init() { - if File_halo_aggregator_v1_events_proto != nil { +func init() { file_halo_aggregator_v2_events_proto_init() } +func file_halo_aggregator_v2_events_proto_init() { + if File_halo_aggregator_v2_events_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_halo_aggregator_v1_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BalanceReported); i { + file_halo_aggregator_v2_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnswerUpdated); i { case 0: return &v.state case 1: @@ -1823,7 +1728,7 @@ func file_halo_aggregator_v1_events_proto_init() { return nil } } - file_halo_aggregator_v1_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_halo_aggregator_v2_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NextPriceReported); i { case 0: return &v.state @@ -1835,7 +1740,7 @@ func file_halo_aggregator_v1_events_proto_init() { return nil } } - file_halo_aggregator_v1_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_halo_aggregator_v2_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OwnershipTransferred); i { case 0: return &v.state @@ -1852,18 +1757,18 @@ func file_halo_aggregator_v1_events_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_halo_aggregator_v1_events_proto_rawDesc, + RawDescriptor: file_halo_aggregator_v2_events_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_halo_aggregator_v1_events_proto_goTypes, - DependencyIndexes: file_halo_aggregator_v1_events_proto_depIdxs, - MessageInfos: file_halo_aggregator_v1_events_proto_msgTypes, + GoTypes: file_halo_aggregator_v2_events_proto_goTypes, + DependencyIndexes: file_halo_aggregator_v2_events_proto_depIdxs, + MessageInfos: file_halo_aggregator_v2_events_proto_msgTypes, }.Build() - File_halo_aggregator_v1_events_proto = out.File - file_halo_aggregator_v1_events_proto_rawDesc = nil - file_halo_aggregator_v1_events_proto_goTypes = nil - file_halo_aggregator_v1_events_proto_depIdxs = nil + File_halo_aggregator_v2_events_proto = out.File + file_halo_aggregator_v2_events_proto_rawDesc = nil + file_halo_aggregator_v2_events_proto_goTypes = nil + file_halo_aggregator_v2_events_proto_depIdxs = nil } diff --git a/api/aggregator/v1/genesis.pulsar.go b/api/aggregator/v2/genesis.pulsar.go similarity index 61% rename from api/aggregator/v1/genesis.pulsar.go rename to api/aggregator/v2/genesis.pulsar.go index 95eb700..6f7b959 100644 --- a/api/aggregator/v1/genesis.pulsar.go +++ b/api/aggregator/v2/genesis.pulsar.go @@ -1,8 +1,7 @@ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package aggregatorv1 +package aggregatorv2 import ( - _ "cosmossdk.io/api/amino" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" @@ -16,20 +15,20 @@ import ( sync "sync" ) -var _ protoreflect.Map = (*_GenesisState_4_map)(nil) +var _ protoreflect.Map = (*_GenesisState_3_map)(nil) -type _GenesisState_4_map struct { +type _GenesisState_3_map struct { m *map[uint64]*RoundData } -func (x *_GenesisState_4_map) Len() int { +func (x *_GenesisState_3_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } -func (x *_GenesisState_4_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { +func (x *_GenesisState_3_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } @@ -42,7 +41,7 @@ func (x *_GenesisState_4_map) Range(f func(protoreflect.MapKey, protoreflect.Val } } -func (x *_GenesisState_4_map) Has(key protoreflect.MapKey) bool { +func (x *_GenesisState_3_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } @@ -52,7 +51,7 @@ func (x *_GenesisState_4_map) Has(key protoreflect.MapKey) bool { return ok } -func (x *_GenesisState_4_map) Clear(key protoreflect.MapKey) { +func (x *_GenesisState_3_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } @@ -61,7 +60,7 @@ func (x *_GenesisState_4_map) Clear(key protoreflect.MapKey) { delete(*x.m, concreteKey) } -func (x *_GenesisState_4_map) Get(key protoreflect.MapKey) protoreflect.Value { +func (x *_GenesisState_3_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } @@ -74,7 +73,7 @@ func (x *_GenesisState_4_map) Get(key protoreflect.MapKey) protoreflect.Value { return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_GenesisState_4_map) Set(key protoreflect.MapKey, value protoreflect.Value) { +func (x *_GenesisState_3_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } @@ -85,7 +84,7 @@ func (x *_GenesisState_4_map) Set(key protoreflect.MapKey, value protoreflect.Va (*x.m)[concreteKey] = concreteValue } -func (x *_GenesisState_4_map) Mutable(key protoreflect.MapKey) protoreflect.Value { +func (x *_GenesisState_3_map) Mutable(key protoreflect.MapKey) protoreflect.Value { keyUnwrapped := key.Uint() concreteKey := keyUnwrapped v, ok := (*x.m)[concreteKey] @@ -97,30 +96,112 @@ func (x *_GenesisState_4_map) Mutable(key protoreflect.MapKey) protoreflect.Valu return protoreflect.ValueOfMessage(newValue.ProtoReflect()) } -func (x *_GenesisState_4_map) NewValue() protoreflect.Value { +func (x *_GenesisState_3_map) NewValue() protoreflect.Value { v := new(RoundData) return protoreflect.ValueOfMessage(v.ProtoReflect()) } +func (x *_GenesisState_3_map) IsValid() bool { + return x.m != nil +} + +var _ protoreflect.Map = (*_GenesisState_4_map)(nil) + +type _GenesisState_4_map struct { + m *map[uint64]string +} + +func (x *_GenesisState_4_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_GenesisState_4_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfUint64(k)) + mapValue := protoreflect.ValueOfString(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_GenesisState_4_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.Uint() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_GenesisState_4_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.Uint() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_GenesisState_4_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.Uint() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfString(v) +} + +func (x *_GenesisState_4_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.Uint() + concreteKey := keyUnwrapped + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_GenesisState_4_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") +} + +func (x *_GenesisState_4_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + func (x *_GenesisState_4_map) IsValid() bool { return x.m != nil } var ( md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_owner protoreflect.FieldDescriptor + fd_GenesisState_reporter protoreflect.FieldDescriptor fd_GenesisState_last_round_id protoreflect.FieldDescriptor - fd_GenesisState_next_price protoreflect.FieldDescriptor fd_GenesisState_rounds protoreflect.FieldDescriptor + fd_GenesisState_next_prices protoreflect.FieldDescriptor ) func init() { - file_halo_aggregator_v1_genesis_proto_init() - md_GenesisState = File_halo_aggregator_v1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_owner = md_GenesisState.Fields().ByName("owner") + file_halo_aggregator_v2_genesis_proto_init() + md_GenesisState = File_halo_aggregator_v2_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_reporter = md_GenesisState.Fields().ByName("reporter") fd_GenesisState_last_round_id = md_GenesisState.Fields().ByName("last_round_id") - fd_GenesisState_next_price = md_GenesisState.Fields().ByName("next_price") fd_GenesisState_rounds = md_GenesisState.Fields().ByName("rounds") + fd_GenesisState_next_prices = md_GenesisState.Fields().ByName("next_prices") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -132,7 +213,7 @@ func (x *GenesisState) ProtoReflect() protoreflect.Message { } func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_v1_genesis_proto_msgTypes[0] + mi := &file_halo_aggregator_v2_genesis_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -188,9 +269,9 @@ func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Owner != "" { - value := protoreflect.ValueOfString(x.Owner) - if !f(fd_GenesisState_owner, value) { + if x.Reporter != "" { + value := protoreflect.ValueOfString(x.Reporter) + if !f(fd_GenesisState_reporter, value) { return } } @@ -200,15 +281,15 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } - if x.NextPrice != "" { - value := protoreflect.ValueOfString(x.NextPrice) - if !f(fd_GenesisState_next_price, value) { + if len(x.Rounds) != 0 { + value := protoreflect.ValueOfMap(&_GenesisState_3_map{m: &x.Rounds}) + if !f(fd_GenesisState_rounds, value) { return } } - if len(x.Rounds) != 0 { - value := protoreflect.ValueOfMap(&_GenesisState_4_map{m: &x.Rounds}) - if !f(fd_GenesisState_rounds, value) { + if len(x.NextPrices) != 0 { + value := protoreflect.ValueOfMap(&_GenesisState_4_map{m: &x.NextPrices}) + if !f(fd_GenesisState_next_prices, value) { return } } @@ -227,19 +308,19 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "halo.aggregator.v1.GenesisState.owner": - return x.Owner != "" - case "halo.aggregator.v1.GenesisState.last_round_id": + case "halo.aggregator.v2.GenesisState.reporter": + return x.Reporter != "" + case "halo.aggregator.v2.GenesisState.last_round_id": return x.LastRoundId != uint64(0) - case "halo.aggregator.v1.GenesisState.next_price": - return x.NextPrice != "" - case "halo.aggregator.v1.GenesisState.rounds": + case "halo.aggregator.v2.GenesisState.rounds": return len(x.Rounds) != 0 + case "halo.aggregator.v2.GenesisState.next_prices": + return len(x.NextPrices) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.GenesisState")) } - panic(fmt.Errorf("message halo.aggregator.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.GenesisState does not contain field %s", fd.FullName())) } } @@ -251,19 +332,19 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "halo.aggregator.v1.GenesisState.owner": - x.Owner = "" - case "halo.aggregator.v1.GenesisState.last_round_id": + case "halo.aggregator.v2.GenesisState.reporter": + x.Reporter = "" + case "halo.aggregator.v2.GenesisState.last_round_id": x.LastRoundId = uint64(0) - case "halo.aggregator.v1.GenesisState.next_price": - x.NextPrice = "" - case "halo.aggregator.v1.GenesisState.rounds": + case "halo.aggregator.v2.GenesisState.rounds": x.Rounds = nil + case "halo.aggregator.v2.GenesisState.next_prices": + x.NextPrices = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.GenesisState")) } - panic(fmt.Errorf("message halo.aggregator.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.GenesisState does not contain field %s", fd.FullName())) } } @@ -275,26 +356,29 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "halo.aggregator.v1.GenesisState.owner": - value := x.Owner + case "halo.aggregator.v2.GenesisState.reporter": + value := x.Reporter return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.GenesisState.last_round_id": + case "halo.aggregator.v2.GenesisState.last_round_id": value := x.LastRoundId return protoreflect.ValueOfUint64(value) - case "halo.aggregator.v1.GenesisState.next_price": - value := x.NextPrice - return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.GenesisState.rounds": + case "halo.aggregator.v2.GenesisState.rounds": if len(x.Rounds) == 0 { + return protoreflect.ValueOfMap(&_GenesisState_3_map{}) + } + mapValue := &_GenesisState_3_map{m: &x.Rounds} + return protoreflect.ValueOfMap(mapValue) + case "halo.aggregator.v2.GenesisState.next_prices": + if len(x.NextPrices) == 0 { return protoreflect.ValueOfMap(&_GenesisState_4_map{}) } - mapValue := &_GenesisState_4_map{m: &x.Rounds} + mapValue := &_GenesisState_4_map{m: &x.NextPrices} return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.GenesisState")) } - panic(fmt.Errorf("message halo.aggregator.v1.GenesisState does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.GenesisState does not contain field %s", descriptor.FullName())) } } @@ -310,21 +394,23 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "halo.aggregator.v1.GenesisState.owner": - x.Owner = value.Interface().(string) - case "halo.aggregator.v1.GenesisState.last_round_id": + case "halo.aggregator.v2.GenesisState.reporter": + x.Reporter = value.Interface().(string) + case "halo.aggregator.v2.GenesisState.last_round_id": x.LastRoundId = value.Uint() - case "halo.aggregator.v1.GenesisState.next_price": - x.NextPrice = value.Interface().(string) - case "halo.aggregator.v1.GenesisState.rounds": + case "halo.aggregator.v2.GenesisState.rounds": mv := value.Map() - cmv := mv.(*_GenesisState_4_map) + cmv := mv.(*_GenesisState_3_map) x.Rounds = *cmv.m + case "halo.aggregator.v2.GenesisState.next_prices": + mv := value.Map() + cmv := mv.(*_GenesisState_4_map) + x.NextPrices = *cmv.m default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.GenesisState")) } - panic(fmt.Errorf("message halo.aggregator.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.GenesisState does not contain field %s", fd.FullName())) } } @@ -340,23 +426,27 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.GenesisState.rounds": + case "halo.aggregator.v2.GenesisState.rounds": if x.Rounds == nil { x.Rounds = make(map[uint64]*RoundData) } - value := &_GenesisState_4_map{m: &x.Rounds} + value := &_GenesisState_3_map{m: &x.Rounds} + return protoreflect.ValueOfMap(value) + case "halo.aggregator.v2.GenesisState.next_prices": + if x.NextPrices == nil { + x.NextPrices = make(map[uint64]string) + } + value := &_GenesisState_4_map{m: &x.NextPrices} return protoreflect.ValueOfMap(value) - case "halo.aggregator.v1.GenesisState.owner": - panic(fmt.Errorf("field owner of message halo.aggregator.v1.GenesisState is not mutable")) - case "halo.aggregator.v1.GenesisState.last_round_id": - panic(fmt.Errorf("field last_round_id of message halo.aggregator.v1.GenesisState is not mutable")) - case "halo.aggregator.v1.GenesisState.next_price": - panic(fmt.Errorf("field next_price of message halo.aggregator.v1.GenesisState is not mutable")) + case "halo.aggregator.v2.GenesisState.reporter": + panic(fmt.Errorf("field reporter of message halo.aggregator.v2.GenesisState is not mutable")) + case "halo.aggregator.v2.GenesisState.last_round_id": + panic(fmt.Errorf("field last_round_id of message halo.aggregator.v2.GenesisState is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.GenesisState")) } - panic(fmt.Errorf("message halo.aggregator.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.GenesisState does not contain field %s", fd.FullName())) } } @@ -365,20 +455,21 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.GenesisState.owner": + case "halo.aggregator.v2.GenesisState.reporter": return protoreflect.ValueOfString("") - case "halo.aggregator.v1.GenesisState.last_round_id": + case "halo.aggregator.v2.GenesisState.last_round_id": return protoreflect.ValueOfUint64(uint64(0)) - case "halo.aggregator.v1.GenesisState.next_price": - return protoreflect.ValueOfString("") - case "halo.aggregator.v1.GenesisState.rounds": + case "halo.aggregator.v2.GenesisState.rounds": m := make(map[uint64]*RoundData) + return protoreflect.ValueOfMap(&_GenesisState_3_map{m: &m}) + case "halo.aggregator.v2.GenesisState.next_prices": + m := make(map[uint64]string) return protoreflect.ValueOfMap(&_GenesisState_4_map{m: &m}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.GenesisState")) } - panic(fmt.Errorf("message halo.aggregator.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.GenesisState does not contain field %s", fd.FullName())) } } @@ -388,7 +479,7 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.GenesisState", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v2.GenesisState", d.FullName())) } panic("unreachable") } @@ -443,17 +534,13 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Owner) + l = len(x.Reporter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.LastRoundId != 0 { n += 1 + runtime.Sov(uint64(x.LastRoundId)) } - l = len(x.NextPrice) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if len(x.Rounds) > 0 { SiZeMaP := func(k uint64, v *RoundData) { l := 0 @@ -482,6 +569,29 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } } } + if len(x.NextPrices) > 0 { + SiZeMaP := func(k uint64, v string) { + mapEntrySize := 1 + runtime.Sov(uint64(k)) + 1 + len(v) + runtime.Sov(uint64(len(v))) + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]uint64, 0, len(x.NextPrices)) + for k := range x.NextPrices { + sortme = append(sortme, k) + } + sort.Slice(sortme, func(i, j int) bool { + return sortme[i] < sortme[j] + }) + for _, k := range sortme { + v := x.NextPrices[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.NextPrices { + SiZeMaP(k, v) + } + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -511,6 +621,47 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.NextPrices) > 0 { + MaRsHaLmAp := func(k uint64, v string) (protoiface.MarshalOutput, error) { + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i = runtime.EncodeVarint(dAtA, i, uint64(k)) + i-- + dAtA[i] = 0x8 + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x22 + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForNextPrices := make([]uint64, 0, len(x.NextPrices)) + for k := range x.NextPrices { + keysForNextPrices = append(keysForNextPrices, uint64(k)) + } + sort.Slice(keysForNextPrices, func(i, j int) bool { + return keysForNextPrices[i] < keysForNextPrices[j] + }) + for iNdEx := len(keysForNextPrices) - 1; iNdEx >= 0; iNdEx-- { + v := x.NextPrices[uint64(keysForNextPrices[iNdEx])] + out, err := MaRsHaLmAp(keysForNextPrices[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.NextPrices { + v := x.NextPrices[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } if len(x.Rounds) > 0 { MaRsHaLmAp := func(k uint64, v *RoundData) (protoiface.MarshalOutput, error) { baseI := i @@ -531,7 +682,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { dAtA[i] = 0x8 i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a return protoiface.MarshalOutput{}, nil } if options.Deterministic { @@ -559,22 +710,15 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } } } - if len(x.NextPrice) > 0 { - i -= len(x.NextPrice) - copy(dAtA[i:], x.NextPrice) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NextPrice))) - i-- - dAtA[i] = 0x1a - } if x.LastRoundId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.LastRoundId)) i-- dAtA[i] = 0x10 } - if len(x.Owner) > 0 { - i -= len(x.Owner) - copy(dAtA[i:], x.Owner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) + if len(x.Reporter) > 0 { + i -= len(x.Reporter) + copy(dAtA[i:], x.Reporter) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Reporter))) i-- dAtA[i] = 0xa } @@ -629,7 +773,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { 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) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Reporter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -657,7 +801,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Owner = string(dAtA[iNdEx:postIndex]) + x.Reporter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { @@ -680,9 +824,9 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NextPrice", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rounds", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -692,27 +836,110 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.NextPrice = string(dAtA[iNdEx:postIndex]) + if x.Rounds == nil { + x.Rounds = make(map[uint64]*RoundData) + } + var mapkey uint64 + var mapvalue *RoundData + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + 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++ + mapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen 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++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postmsgIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = &RoundData{} + if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + 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) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.Rounds[mapkey] = mapvalue iNdEx = postIndex case 4: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rounds", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NextPrices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -739,11 +966,11 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Rounds == nil { - x.Rounds = make(map[uint64]*RoundData) + if x.NextPrices == nil { + x.NextPrices = make(map[uint64]string) } var mapkey uint64 - var mapvalue *RoundData + var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -778,7 +1005,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } } } else if fieldNum == 2 { - var mapmsglen int + var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -788,26 +1015,24 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - mapmsglen |= int(b&0x7F) << shift + stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if mapmsglen < 0 { + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - if postmsgIndex > l { + if postStringIndexmapvalue > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - mapvalue = &RoundData{} - if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postmsgIndex + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -823,7 +1048,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { iNdEx += skippy } } - x.Rounds[mapkey] = mapvalue + x.NextPrices[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -864,7 +1089,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: halo/aggregator/v1/genesis.proto +// source: halo/aggregator/v2/genesis.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -878,16 +1103,16 @@ type GenesisState struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + Reporter string `protobuf:"bytes,1,opt,name=reporter,proto3" json:"reporter,omitempty"` LastRoundId uint64 `protobuf:"varint,2,opt,name=last_round_id,json=lastRoundId,proto3" json:"last_round_id,omitempty"` - NextPrice string `protobuf:"bytes,3,opt,name=next_price,json=nextPrice,proto3" json:"next_price,omitempty"` - Rounds map[uint64]*RoundData `protobuf:"bytes,4,rep,name=rounds,proto3" json:"rounds,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Rounds map[uint64]*RoundData `protobuf:"bytes,3,rep,name=rounds,proto3" json:"rounds,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NextPrices map[uint64]string `protobuf:"bytes,4,rep,name=next_prices,json=nextPrices,proto3" json:"next_prices,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *GenesisState) Reset() { *x = GenesisState{} if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_genesis_proto_msgTypes[0] + mi := &file_halo_aggregator_v2_genesis_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -901,12 +1126,12 @@ func (*GenesisState) ProtoMessage() {} // Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. func (*GenesisState) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_genesis_proto_rawDescGZIP(), []int{0} + return file_halo_aggregator_v2_genesis_proto_rawDescGZIP(), []int{0} } -func (x *GenesisState) GetOwner() string { +func (x *GenesisState) GetReporter() string { if x != nil { - return x.Owner + return x.Reporter } return "" } @@ -918,107 +1143,112 @@ func (x *GenesisState) GetLastRoundId() uint64 { return 0 } -func (x *GenesisState) GetNextPrice() string { +func (x *GenesisState) GetRounds() map[uint64]*RoundData { if x != nil { - return x.NextPrice + return x.Rounds } - return "" + return nil } -func (x *GenesisState) GetRounds() map[uint64]*RoundData { +func (x *GenesisState) GetNextPrices() map[uint64]string { if x != nil { - return x.Rounds + return x.NextPrices } return nil } -var File_halo_aggregator_v1_genesis_proto protoreflect.FileDescriptor +var File_halo_aggregator_v2_genesis_proto protoreflect.FileDescriptor -var file_halo_aggregator_v1_genesis_proto_rawDesc = []byte{ +var file_halo_aggregator_v2_genesis_proto_rawDesc = []byte{ 0x0a, 0x20, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, - 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x68, 0x61, 0x6c, 0x6f, - 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xd9, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x2e, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x03, 0x0a, + 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, + 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x12, 0x22, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x6f, 0x75, - 0x6e, 0x64, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, - 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, - 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x6e, 0x64, - 0x73, 0x1a, 0x58, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xd5, 0x01, 0x0a, 0x16, - 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2d, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, - 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x61, 0x6c, 0x6f, - 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x41, - 0x58, 0xaa, 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, 0x5c, 0x41, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x48, 0x61, - 0x6c, 0x6f, 0x5c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x48, - 0x61, 0x6c, 0x6f, 0x3a, 0x3a, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, + 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x6e, + 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x73, 0x12, 0x51, 0x0a, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x58, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x75, 0x6e, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0x3d, 0x0a, 0x0f, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, + 0xd5, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, + 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2d, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, + 0x76, 0x32, 0x3b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x32, 0xa2, + 0x02, 0x03, 0x48, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, 0x2e, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x12, 0x48, 0x61, 0x6c, + 0x6f, 0x5c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x32, 0xe2, + 0x02, 0x1e, 0x48, 0x61, 0x6c, 0x6f, 0x5c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x14, 0x48, 0x61, 0x6c, 0x6f, 0x3a, 0x3a, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_halo_aggregator_v1_genesis_proto_rawDescOnce sync.Once - file_halo_aggregator_v1_genesis_proto_rawDescData = file_halo_aggregator_v1_genesis_proto_rawDesc + file_halo_aggregator_v2_genesis_proto_rawDescOnce sync.Once + file_halo_aggregator_v2_genesis_proto_rawDescData = file_halo_aggregator_v2_genesis_proto_rawDesc ) -func file_halo_aggregator_v1_genesis_proto_rawDescGZIP() []byte { - file_halo_aggregator_v1_genesis_proto_rawDescOnce.Do(func() { - file_halo_aggregator_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_halo_aggregator_v1_genesis_proto_rawDescData) +func file_halo_aggregator_v2_genesis_proto_rawDescGZIP() []byte { + file_halo_aggregator_v2_genesis_proto_rawDescOnce.Do(func() { + file_halo_aggregator_v2_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_halo_aggregator_v2_genesis_proto_rawDescData) }) - return file_halo_aggregator_v1_genesis_proto_rawDescData + return file_halo_aggregator_v2_genesis_proto_rawDescData } -var file_halo_aggregator_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_halo_aggregator_v1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: halo.aggregator.v1.GenesisState - nil, // 1: halo.aggregator.v1.GenesisState.RoundsEntry - (*RoundData)(nil), // 2: halo.aggregator.v1.RoundData +var file_halo_aggregator_v2_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_halo_aggregator_v2_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: halo.aggregator.v2.GenesisState + nil, // 1: halo.aggregator.v2.GenesisState.RoundsEntry + nil, // 2: halo.aggregator.v2.GenesisState.NextPricesEntry + (*RoundData)(nil), // 3: halo.aggregator.v2.RoundData } -var file_halo_aggregator_v1_genesis_proto_depIdxs = []int32{ - 1, // 0: halo.aggregator.v1.GenesisState.rounds:type_name -> halo.aggregator.v1.GenesisState.RoundsEntry - 2, // 1: halo.aggregator.v1.GenesisState.RoundsEntry.value:type_name -> halo.aggregator.v1.RoundData - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name +var file_halo_aggregator_v2_genesis_proto_depIdxs = []int32{ + 1, // 0: halo.aggregator.v2.GenesisState.rounds:type_name -> halo.aggregator.v2.GenesisState.RoundsEntry + 2, // 1: halo.aggregator.v2.GenesisState.next_prices:type_name -> halo.aggregator.v2.GenesisState.NextPricesEntry + 3, // 2: halo.aggregator.v2.GenesisState.RoundsEntry.value:type_name -> halo.aggregator.v2.RoundData + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] 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_halo_aggregator_v1_genesis_proto_init() } -func file_halo_aggregator_v1_genesis_proto_init() { - if File_halo_aggregator_v1_genesis_proto != nil { +func init() { file_halo_aggregator_v2_genesis_proto_init() } +func file_halo_aggregator_v2_genesis_proto_init() { + if File_halo_aggregator_v2_genesis_proto != nil { return } - file_halo_aggregator_v1_aggregator_proto_init() + file_halo_aggregator_v2_aggregator_proto_init() if !protoimpl.UnsafeEnabled { - file_halo_aggregator_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_halo_aggregator_v2_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { case 0: return &v.state @@ -1035,18 +1265,18 @@ func file_halo_aggregator_v1_genesis_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_halo_aggregator_v1_genesis_proto_rawDesc, + RawDescriptor: file_halo_aggregator_v2_genesis_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_halo_aggregator_v1_genesis_proto_goTypes, - DependencyIndexes: file_halo_aggregator_v1_genesis_proto_depIdxs, - MessageInfos: file_halo_aggregator_v1_genesis_proto_msgTypes, + GoTypes: file_halo_aggregator_v2_genesis_proto_goTypes, + DependencyIndexes: file_halo_aggregator_v2_genesis_proto_depIdxs, + MessageInfos: file_halo_aggregator_v2_genesis_proto_msgTypes, }.Build() - File_halo_aggregator_v1_genesis_proto = out.File - file_halo_aggregator_v1_genesis_proto_rawDesc = nil - file_halo_aggregator_v1_genesis_proto_goTypes = nil - file_halo_aggregator_v1_genesis_proto_depIdxs = nil + File_halo_aggregator_v2_genesis_proto = out.File + file_halo_aggregator_v2_genesis_proto_rawDesc = nil + file_halo_aggregator_v2_genesis_proto_goTypes = nil + file_halo_aggregator_v2_genesis_proto_depIdxs = nil } diff --git a/api/aggregator/v2/query.pulsar.go b/api/aggregator/v2/query.pulsar.go new file mode 100644 index 0000000..059661c --- /dev/null +++ b/api/aggregator/v2/query.pulsar.go @@ -0,0 +1,984 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package aggregatorv2 + +import ( + _ "cosmossdk.io/api/cosmos/query/v1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryReporter protoreflect.MessageDescriptor +) + +func init() { + file_halo_aggregator_v2_query_proto_init() + md_QueryReporter = File_halo_aggregator_v2_query_proto.Messages().ByName("QueryReporter") +} + +var _ protoreflect.Message = (*fastReflection_QueryReporter)(nil) + +type fastReflection_QueryReporter QueryReporter + +func (x *QueryReporter) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryReporter)(x) +} + +func (x *QueryReporter) slowProtoReflect() protoreflect.Message { + mi := &file_halo_aggregator_v2_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_QueryReporter_messageType fastReflection_QueryReporter_messageType +var _ protoreflect.MessageType = fastReflection_QueryReporter_messageType{} + +type fastReflection_QueryReporter_messageType struct{} + +func (x fastReflection_QueryReporter_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryReporter)(nil) +} +func (x fastReflection_QueryReporter_messageType) New() protoreflect.Message { + return new(fastReflection_QueryReporter) +} +func (x fastReflection_QueryReporter_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryReporter +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryReporter) Descriptor() protoreflect.MessageDescriptor { + return md_QueryReporter +} + +// 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_QueryReporter) Type() protoreflect.MessageType { + return _fastReflection_QueryReporter_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryReporter) New() protoreflect.Message { + return new(fastReflection_QueryReporter) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryReporter) Interface() protoreflect.ProtoMessage { + return (*QueryReporter)(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_QueryReporter) 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_QueryReporter) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.QueryReporter")) + } + panic(fmt.Errorf("message halo.aggregator.v2.QueryReporter 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_QueryReporter) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.QueryReporter")) + } + panic(fmt.Errorf("message halo.aggregator.v2.QueryReporter 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_QueryReporter) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.QueryReporter")) + } + panic(fmt.Errorf("message halo.aggregator.v2.QueryReporter 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_QueryReporter) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.QueryReporter")) + } + panic(fmt.Errorf("message halo.aggregator.v2.QueryReporter 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_QueryReporter) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.QueryReporter")) + } + panic(fmt.Errorf("message halo.aggregator.v2.QueryReporter 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_QueryReporter) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.QueryReporter")) + } + panic(fmt.Errorf("message halo.aggregator.v2.QueryReporter 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_QueryReporter) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v2.QueryReporter", 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_QueryReporter) 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_QueryReporter) 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_QueryReporter) 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_QueryReporter) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryReporter) + 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().(*QueryReporter) + 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().(*QueryReporter) + 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: QueryReporter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryReporter: 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_QueryReporterResponse protoreflect.MessageDescriptor + fd_QueryReporterResponse_reporter protoreflect.FieldDescriptor +) + +func init() { + file_halo_aggregator_v2_query_proto_init() + md_QueryReporterResponse = File_halo_aggregator_v2_query_proto.Messages().ByName("QueryReporterResponse") + fd_QueryReporterResponse_reporter = md_QueryReporterResponse.Fields().ByName("reporter") +} + +var _ protoreflect.Message = (*fastReflection_QueryReporterResponse)(nil) + +type fastReflection_QueryReporterResponse QueryReporterResponse + +func (x *QueryReporterResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryReporterResponse)(x) +} + +func (x *QueryReporterResponse) slowProtoReflect() protoreflect.Message { + mi := &file_halo_aggregator_v2_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_QueryReporterResponse_messageType fastReflection_QueryReporterResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryReporterResponse_messageType{} + +type fastReflection_QueryReporterResponse_messageType struct{} + +func (x fastReflection_QueryReporterResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryReporterResponse)(nil) +} +func (x fastReflection_QueryReporterResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryReporterResponse) +} +func (x fastReflection_QueryReporterResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryReporterResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryReporterResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryReporterResponse +} + +// 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_QueryReporterResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryReporterResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryReporterResponse) New() protoreflect.Message { + return new(fastReflection_QueryReporterResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryReporterResponse) Interface() protoreflect.ProtoMessage { + return (*QueryReporterResponse)(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_QueryReporterResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Reporter != "" { + value := protoreflect.ValueOfString(x.Reporter) + if !f(fd_QueryReporterResponse_reporter, 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_QueryReporterResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "halo.aggregator.v2.QueryReporterResponse.reporter": + return x.Reporter != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.QueryReporterResponse")) + } + panic(fmt.Errorf("message halo.aggregator.v2.QueryReporterResponse 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_QueryReporterResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "halo.aggregator.v2.QueryReporterResponse.reporter": + x.Reporter = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.QueryReporterResponse")) + } + panic(fmt.Errorf("message halo.aggregator.v2.QueryReporterResponse 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_QueryReporterResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "halo.aggregator.v2.QueryReporterResponse.reporter": + value := x.Reporter + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.QueryReporterResponse")) + } + panic(fmt.Errorf("message halo.aggregator.v2.QueryReporterResponse 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_QueryReporterResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "halo.aggregator.v2.QueryReporterResponse.reporter": + x.Reporter = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.QueryReporterResponse")) + } + panic(fmt.Errorf("message halo.aggregator.v2.QueryReporterResponse 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_QueryReporterResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "halo.aggregator.v2.QueryReporterResponse.reporter": + panic(fmt.Errorf("field reporter of message halo.aggregator.v2.QueryReporterResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.QueryReporterResponse")) + } + panic(fmt.Errorf("message halo.aggregator.v2.QueryReporterResponse 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_QueryReporterResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "halo.aggregator.v2.QueryReporterResponse.reporter": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.QueryReporterResponse")) + } + panic(fmt.Errorf("message halo.aggregator.v2.QueryReporterResponse 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_QueryReporterResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v2.QueryReporterResponse", 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_QueryReporterResponse) 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_QueryReporterResponse) 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_QueryReporterResponse) 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_QueryReporterResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryReporterResponse) + 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.Reporter) + 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().(*QueryReporterResponse) + 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.Reporter) > 0 { + i -= len(x.Reporter) + copy(dAtA[i:], x.Reporter) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Reporter))) + 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().(*QueryReporterResponse) + 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: QueryReporterResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryReporterResponse: 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 Reporter", 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.Reporter = 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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: halo/aggregator/v2/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type QueryReporter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryReporter) Reset() { + *x = QueryReporter{} + if protoimpl.UnsafeEnabled { + mi := &file_halo_aggregator_v2_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryReporter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryReporter) ProtoMessage() {} + +// Deprecated: Use QueryReporter.ProtoReflect.Descriptor instead. +func (*QueryReporter) Descriptor() ([]byte, []int) { + return file_halo_aggregator_v2_query_proto_rawDescGZIP(), []int{0} +} + +type QueryReporterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reporter string `protobuf:"bytes,1,opt,name=reporter,proto3" json:"reporter,omitempty"` +} + +func (x *QueryReporterResponse) Reset() { + *x = QueryReporterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_halo_aggregator_v2_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryReporterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryReporterResponse) ProtoMessage() {} + +// Deprecated: Use QueryReporterResponse.ProtoReflect.Descriptor instead. +func (*QueryReporterResponse) Descriptor() ([]byte, []int) { + return file_halo_aggregator_v2_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryReporterResponse) GetReporter() string { + if x != nil { + return x.Reporter + } + return "" +} + +var File_halo_aggregator_v2_query_proto protoreflect.FileDescriptor + +var file_halo_aggregator_v2_query_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x12, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x0f, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x22, 0x33, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x32, 0xaa, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, + 0xa0, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x68, + 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x1a, + 0x29, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x88, 0xe7, 0xb0, 0x2a, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x5a, 0x1b, 0x12, 0x19, 0x2f, 0x68, 0x61, 0x6c, 0x6f, + 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x72, 0x42, 0xd3, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2d, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x32, + 0xa2, 0x02, 0x03, 0x48, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, 0x2e, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x12, 0x48, 0x61, + 0x6c, 0x6f, 0x5c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x32, + 0xe2, 0x02, 0x1e, 0x48, 0x61, 0x6c, 0x6f, 0x5c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x14, 0x48, 0x61, 0x6c, 0x6f, 0x3a, 0x3a, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_halo_aggregator_v2_query_proto_rawDescOnce sync.Once + file_halo_aggregator_v2_query_proto_rawDescData = file_halo_aggregator_v2_query_proto_rawDesc +) + +func file_halo_aggregator_v2_query_proto_rawDescGZIP() []byte { + file_halo_aggregator_v2_query_proto_rawDescOnce.Do(func() { + file_halo_aggregator_v2_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_halo_aggregator_v2_query_proto_rawDescData) + }) + return file_halo_aggregator_v2_query_proto_rawDescData +} + +var file_halo_aggregator_v2_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_halo_aggregator_v2_query_proto_goTypes = []interface{}{ + (*QueryReporter)(nil), // 0: halo.aggregator.v2.QueryReporter + (*QueryReporterResponse)(nil), // 1: halo.aggregator.v2.QueryReporterResponse +} +var file_halo_aggregator_v2_query_proto_depIdxs = []int32{ + 0, // 0: halo.aggregator.v2.Query.Reporter:input_type -> halo.aggregator.v2.QueryReporter + 1, // 1: halo.aggregator.v2.Query.Reporter:output_type -> halo.aggregator.v2.QueryReporterResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_halo_aggregator_v2_query_proto_init() } +func file_halo_aggregator_v2_query_proto_init() { + if File_halo_aggregator_v2_query_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_halo_aggregator_v2_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryReporter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_halo_aggregator_v2_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryReporterResponse); 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_halo_aggregator_v2_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_halo_aggregator_v2_query_proto_goTypes, + DependencyIndexes: file_halo_aggregator_v2_query_proto_depIdxs, + MessageInfos: file_halo_aggregator_v2_query_proto_msgTypes, + }.Build() + File_halo_aggregator_v2_query_proto = out.File + file_halo_aggregator_v2_query_proto_rawDesc = nil + file_halo_aggregator_v2_query_proto_goTypes = nil + file_halo_aggregator_v2_query_proto_depIdxs = nil +} diff --git a/api/aggregator/v2/query_grpc.pb.go b/api/aggregator/v2/query_grpc.pb.go new file mode 100644 index 0000000..0f20ce6 --- /dev/null +++ b/api/aggregator/v2/query_grpc.pb.go @@ -0,0 +1,121 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: halo/aggregator/v2/query.proto + +package aggregatorv2 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Query_Reporter_FullMethodName = "/halo.aggregator.v2.Query/Reporter" +) + +// 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 { + Reporter(ctx context.Context, in *QueryReporter, opts ...grpc.CallOption) (*QueryReporterResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Reporter(ctx context.Context, in *QueryReporter, opts ...grpc.CallOption) (*QueryReporterResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryReporterResponse) + err := c.cc.Invoke(ctx, Query_Reporter_FullMethodName, in, out, cOpts...) + 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 { + Reporter(context.Context, *QueryReporter) (*QueryReporterResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedQueryServer struct{} + +func (UnimplementedQueryServer) Reporter(context.Context, *QueryReporter) (*QueryReporterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Reporter not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} +func (UnimplementedQueryServer) testEmbeddedByValue() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + // If the following call pancis, it indicates UnimplementedQueryServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Reporter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryReporter) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Reporter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Reporter_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Reporter(ctx, req.(*QueryReporter)) + } + 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) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "halo.aggregator.v2.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Reporter", + Handler: _Query_Reporter_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "halo/aggregator/v2/query.proto", +} diff --git a/api/aggregator/v1/tx.pulsar.go b/api/aggregator/v2/tx.pulsar.go similarity index 70% rename from api/aggregator/v1/tx.pulsar.go rename to api/aggregator/v2/tx.pulsar.go index 3f8c22c..357b8a1 100644 --- a/api/aggregator/v1/tx.pulsar.go +++ b/api/aggregator/v2/tx.pulsar.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package aggregatorv1 +package aggregatorv2 import ( _ "cosmossdk.io/api/amino" @@ -17,34 +17,30 @@ import ( ) var ( - md_MsgReportBalance protoreflect.MessageDescriptor - fd_MsgReportBalance_signer protoreflect.FieldDescriptor - fd_MsgReportBalance_principal protoreflect.FieldDescriptor - fd_MsgReportBalance_interest protoreflect.FieldDescriptor - fd_MsgReportBalance_total_supply protoreflect.FieldDescriptor - fd_MsgReportBalance_next_price protoreflect.FieldDescriptor + md_MsgTransmit protoreflect.MessageDescriptor + fd_MsgTransmit_signer protoreflect.FieldDescriptor + fd_MsgTransmit_answer protoreflect.FieldDescriptor + fd_MsgTransmit_updated_at protoreflect.FieldDescriptor ) func init() { - file_halo_aggregator_v1_tx_proto_init() - md_MsgReportBalance = File_halo_aggregator_v1_tx_proto.Messages().ByName("MsgReportBalance") - fd_MsgReportBalance_signer = md_MsgReportBalance.Fields().ByName("signer") - fd_MsgReportBalance_principal = md_MsgReportBalance.Fields().ByName("principal") - fd_MsgReportBalance_interest = md_MsgReportBalance.Fields().ByName("interest") - fd_MsgReportBalance_total_supply = md_MsgReportBalance.Fields().ByName("total_supply") - fd_MsgReportBalance_next_price = md_MsgReportBalance.Fields().ByName("next_price") + file_halo_aggregator_v2_tx_proto_init() + md_MsgTransmit = File_halo_aggregator_v2_tx_proto.Messages().ByName("MsgTransmit") + fd_MsgTransmit_signer = md_MsgTransmit.Fields().ByName("signer") + fd_MsgTransmit_answer = md_MsgTransmit.Fields().ByName("answer") + fd_MsgTransmit_updated_at = md_MsgTransmit.Fields().ByName("updated_at") } -var _ protoreflect.Message = (*fastReflection_MsgReportBalance)(nil) +var _ protoreflect.Message = (*fastReflection_MsgTransmit)(nil) -type fastReflection_MsgReportBalance MsgReportBalance +type fastReflection_MsgTransmit MsgTransmit -func (x *MsgReportBalance) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgReportBalance)(x) +func (x *MsgTransmit) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgTransmit)(x) } -func (x *MsgReportBalance) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_v1_tx_proto_msgTypes[0] +func (x *MsgTransmit) slowProtoReflect() protoreflect.Message { + mi := &file_halo_aggregator_v2_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55,43 +51,43 @@ func (x *MsgReportBalance) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgReportBalance_messageType fastReflection_MsgReportBalance_messageType -var _ protoreflect.MessageType = fastReflection_MsgReportBalance_messageType{} +var _fastReflection_MsgTransmit_messageType fastReflection_MsgTransmit_messageType +var _ protoreflect.MessageType = fastReflection_MsgTransmit_messageType{} -type fastReflection_MsgReportBalance_messageType struct{} +type fastReflection_MsgTransmit_messageType struct{} -func (x fastReflection_MsgReportBalance_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgReportBalance)(nil) +func (x fastReflection_MsgTransmit_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgTransmit)(nil) } -func (x fastReflection_MsgReportBalance_messageType) New() protoreflect.Message { - return new(fastReflection_MsgReportBalance) +func (x fastReflection_MsgTransmit_messageType) New() protoreflect.Message { + return new(fastReflection_MsgTransmit) } -func (x fastReflection_MsgReportBalance_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgReportBalance +func (x fastReflection_MsgTransmit_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTransmit } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgReportBalance) Descriptor() protoreflect.MessageDescriptor { - return md_MsgReportBalance +func (x *fastReflection_MsgTransmit) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTransmit } // 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_MsgReportBalance) Type() protoreflect.MessageType { - return _fastReflection_MsgReportBalance_messageType +func (x *fastReflection_MsgTransmit) Type() protoreflect.MessageType { + return _fastReflection_MsgTransmit_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgReportBalance) New() protoreflect.Message { - return new(fastReflection_MsgReportBalance) +func (x *fastReflection_MsgTransmit) New() protoreflect.Message { + return new(fastReflection_MsgTransmit) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgReportBalance) Interface() protoreflect.ProtoMessage { - return (*MsgReportBalance)(x) +func (x *fastReflection_MsgTransmit) Interface() protoreflect.ProtoMessage { + return (*MsgTransmit)(x) } // Range iterates over every populated field in an undefined order, @@ -99,34 +95,22 @@ func (x *fastReflection_MsgReportBalance) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgReportBalance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgTransmit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Signer != "" { value := protoreflect.ValueOfString(x.Signer) - if !f(fd_MsgReportBalance_signer, value) { + if !f(fd_MsgTransmit_signer, value) { return } } - if x.Principal != "" { - value := protoreflect.ValueOfString(x.Principal) - if !f(fd_MsgReportBalance_principal, value) { + if x.Answer != "" { + value := protoreflect.ValueOfString(x.Answer) + if !f(fd_MsgTransmit_answer, value) { return } } - if x.Interest != "" { - value := protoreflect.ValueOfString(x.Interest) - if !f(fd_MsgReportBalance_interest, value) { - return - } - } - if x.TotalSupply != "" { - value := protoreflect.ValueOfString(x.TotalSupply) - if !f(fd_MsgReportBalance_total_supply, value) { - return - } - } - if x.NextPrice != "" { - value := protoreflect.ValueOfString(x.NextPrice) - if !f(fd_MsgReportBalance_next_price, value) { + if x.UpdatedAt != uint32(0) { + value := protoreflect.ValueOfUint32(x.UpdatedAt) + if !f(fd_MsgTransmit_updated_at, value) { return } } @@ -143,23 +127,19 @@ func (x *fastReflection_MsgReportBalance) Range(f func(protoreflect.FieldDescrip // 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_MsgReportBalance) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgTransmit) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "halo.aggregator.v1.MsgReportBalance.signer": + case "halo.aggregator.v2.MsgTransmit.signer": return x.Signer != "" - case "halo.aggregator.v1.MsgReportBalance.principal": - return x.Principal != "" - case "halo.aggregator.v1.MsgReportBalance.interest": - return x.Interest != "" - case "halo.aggregator.v1.MsgReportBalance.total_supply": - return x.TotalSupply != "" - case "halo.aggregator.v1.MsgReportBalance.next_price": - return x.NextPrice != "" + case "halo.aggregator.v2.MsgTransmit.answer": + return x.Answer != "" + case "halo.aggregator.v2.MsgTransmit.updated_at": + return x.UpdatedAt != uint32(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgReportBalance")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransmit")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgReportBalance does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransmit does not contain field %s", fd.FullName())) } } @@ -169,23 +149,19 @@ func (x *fastReflection_MsgReportBalance) Has(fd protoreflect.FieldDescriptor) b // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgReportBalance) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgTransmit) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "halo.aggregator.v1.MsgReportBalance.signer": + case "halo.aggregator.v2.MsgTransmit.signer": x.Signer = "" - case "halo.aggregator.v1.MsgReportBalance.principal": - x.Principal = "" - case "halo.aggregator.v1.MsgReportBalance.interest": - x.Interest = "" - case "halo.aggregator.v1.MsgReportBalance.total_supply": - x.TotalSupply = "" - case "halo.aggregator.v1.MsgReportBalance.next_price": - x.NextPrice = "" + case "halo.aggregator.v2.MsgTransmit.answer": + x.Answer = "" + case "halo.aggregator.v2.MsgTransmit.updated_at": + x.UpdatedAt = uint32(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgReportBalance")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransmit")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgReportBalance does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransmit does not contain field %s", fd.FullName())) } } @@ -195,28 +171,22 @@ func (x *fastReflection_MsgReportBalance) Clear(fd protoreflect.FieldDescriptor) // 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_MsgReportBalance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgTransmit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "halo.aggregator.v1.MsgReportBalance.signer": + case "halo.aggregator.v2.MsgTransmit.signer": value := x.Signer return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.MsgReportBalance.principal": - value := x.Principal - return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.MsgReportBalance.interest": - value := x.Interest - return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.MsgReportBalance.total_supply": - value := x.TotalSupply - return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.MsgReportBalance.next_price": - value := x.NextPrice + case "halo.aggregator.v2.MsgTransmit.answer": + value := x.Answer return protoreflect.ValueOfString(value) + case "halo.aggregator.v2.MsgTransmit.updated_at": + value := x.UpdatedAt + return protoreflect.ValueOfUint32(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgReportBalance")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransmit")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgReportBalance does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransmit does not contain field %s", descriptor.FullName())) } } @@ -230,23 +200,19 @@ func (x *fastReflection_MsgReportBalance) Get(descriptor protoreflect.FieldDescr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgReportBalance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgTransmit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "halo.aggregator.v1.MsgReportBalance.signer": + case "halo.aggregator.v2.MsgTransmit.signer": x.Signer = value.Interface().(string) - case "halo.aggregator.v1.MsgReportBalance.principal": - x.Principal = value.Interface().(string) - case "halo.aggregator.v1.MsgReportBalance.interest": - x.Interest = value.Interface().(string) - case "halo.aggregator.v1.MsgReportBalance.total_supply": - x.TotalSupply = value.Interface().(string) - case "halo.aggregator.v1.MsgReportBalance.next_price": - x.NextPrice = value.Interface().(string) + case "halo.aggregator.v2.MsgTransmit.answer": + x.Answer = value.Interface().(string) + case "halo.aggregator.v2.MsgTransmit.updated_at": + x.UpdatedAt = uint32(value.Uint()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgReportBalance")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransmit")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgReportBalance does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransmit does not contain field %s", fd.FullName())) } } @@ -260,56 +226,48 @@ func (x *fastReflection_MsgReportBalance) Set(fd protoreflect.FieldDescriptor, v // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgReportBalance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgTransmit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.MsgReportBalance.signer": - panic(fmt.Errorf("field signer of message halo.aggregator.v1.MsgReportBalance is not mutable")) - case "halo.aggregator.v1.MsgReportBalance.principal": - panic(fmt.Errorf("field principal of message halo.aggregator.v1.MsgReportBalance is not mutable")) - case "halo.aggregator.v1.MsgReportBalance.interest": - panic(fmt.Errorf("field interest of message halo.aggregator.v1.MsgReportBalance is not mutable")) - case "halo.aggregator.v1.MsgReportBalance.total_supply": - panic(fmt.Errorf("field total_supply of message halo.aggregator.v1.MsgReportBalance is not mutable")) - case "halo.aggregator.v1.MsgReportBalance.next_price": - panic(fmt.Errorf("field next_price of message halo.aggregator.v1.MsgReportBalance is not mutable")) + case "halo.aggregator.v2.MsgTransmit.signer": + panic(fmt.Errorf("field signer of message halo.aggregator.v2.MsgTransmit is not mutable")) + case "halo.aggregator.v2.MsgTransmit.answer": + panic(fmt.Errorf("field answer of message halo.aggregator.v2.MsgTransmit is not mutable")) + case "halo.aggregator.v2.MsgTransmit.updated_at": + panic(fmt.Errorf("field updated_at of message halo.aggregator.v2.MsgTransmit is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgReportBalance")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransmit")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgReportBalance does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransmit 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_MsgReportBalance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgTransmit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.MsgReportBalance.signer": - return protoreflect.ValueOfString("") - case "halo.aggregator.v1.MsgReportBalance.principal": - return protoreflect.ValueOfString("") - case "halo.aggregator.v1.MsgReportBalance.interest": + case "halo.aggregator.v2.MsgTransmit.signer": return protoreflect.ValueOfString("") - case "halo.aggregator.v1.MsgReportBalance.total_supply": - return protoreflect.ValueOfString("") - case "halo.aggregator.v1.MsgReportBalance.next_price": + case "halo.aggregator.v2.MsgTransmit.answer": return protoreflect.ValueOfString("") + case "halo.aggregator.v2.MsgTransmit.updated_at": + return protoreflect.ValueOfUint32(uint32(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgReportBalance")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransmit")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgReportBalance does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransmit 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_MsgReportBalance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgTransmit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.MsgReportBalance", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v2.MsgTransmit", d.FullName())) } panic("unreachable") } @@ -317,7 +275,7 @@ func (x *fastReflection_MsgReportBalance) WhichOneof(d protoreflect.OneofDescrip // 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_MsgReportBalance) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgTransmit) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -328,7 +286,7 @@ func (x *fastReflection_MsgReportBalance) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgReportBalance) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgTransmit) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -340,7 +298,7 @@ func (x *fastReflection_MsgReportBalance) SetUnknown(fields protoreflect.RawFiel // 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_MsgReportBalance) IsValid() bool { +func (x *fastReflection_MsgTransmit) IsValid() bool { return x != nil } @@ -350,9 +308,9 @@ func (x *fastReflection_MsgReportBalance) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgReportBalance) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgTransmit) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgReportBalance) + x := input.Message.Interface().(*MsgTransmit) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -368,21 +326,12 @@ func (x *fastReflection_MsgReportBalance) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Principal) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Interest) + l = len(x.Answer) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.TotalSupply) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NextPrice) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.UpdatedAt != 0 { + n += 1 + runtime.Sov(uint64(x.UpdatedAt)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -394,7 +343,7 @@ func (x *fastReflection_MsgReportBalance) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgReportBalance) + x := input.Message.Interface().(*MsgTransmit) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -413,31 +362,15 @@ func (x *fastReflection_MsgReportBalance) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.NextPrice) > 0 { - i -= len(x.NextPrice) - copy(dAtA[i:], x.NextPrice) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NextPrice))) - i-- - dAtA[i] = 0x2a - } - if len(x.TotalSupply) > 0 { - i -= len(x.TotalSupply) - copy(dAtA[i:], x.TotalSupply) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TotalSupply))) + if x.UpdatedAt != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.UpdatedAt)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x18 } - if len(x.Interest) > 0 { - i -= len(x.Interest) - copy(dAtA[i:], x.Interest) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Interest))) - i-- - dAtA[i] = 0x1a - } - if len(x.Principal) > 0 { - i -= len(x.Principal) - copy(dAtA[i:], x.Principal) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Principal))) + if len(x.Answer) > 0 { + i -= len(x.Answer) + copy(dAtA[i:], x.Answer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Answer))) i-- dAtA[i] = 0x12 } @@ -459,7 +392,7 @@ func (x *fastReflection_MsgReportBalance) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgReportBalance) + x := input.Message.Interface().(*MsgTransmit) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -491,10 +424,10 @@ func (x *fastReflection_MsgReportBalance) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgReportBalance: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTransmit: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgReportBalance: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTransmit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -531,7 +464,7 @@ func (x *fastReflection_MsgReportBalance) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Answer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -559,77 +492,13 @@ func (x *fastReflection_MsgReportBalance) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Principal = string(dAtA[iNdEx:postIndex]) + x.Answer = 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 Interest", 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.Interest = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalSupply", 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.TotalSupply = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NextPrice", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } - var stringLen uint64 + x.UpdatedAt = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -639,24 +508,11 @@ func (x *fastReflection_MsgReportBalance) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + x.UpdatedAt |= uint32(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.NextPrice = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -693,26 +549,26 @@ func (x *fastReflection_MsgReportBalance) ProtoMethods() *protoiface.Methods { } var ( - md_MsgReportBalanceResponse protoreflect.MessageDescriptor - fd_MsgReportBalanceResponse_round_id protoreflect.FieldDescriptor + md_MsgTransmitResponse protoreflect.MessageDescriptor + fd_MsgTransmitResponse_round_id protoreflect.FieldDescriptor ) func init() { - file_halo_aggregator_v1_tx_proto_init() - md_MsgReportBalanceResponse = File_halo_aggregator_v1_tx_proto.Messages().ByName("MsgReportBalanceResponse") - fd_MsgReportBalanceResponse_round_id = md_MsgReportBalanceResponse.Fields().ByName("round_id") + file_halo_aggregator_v2_tx_proto_init() + md_MsgTransmitResponse = File_halo_aggregator_v2_tx_proto.Messages().ByName("MsgTransmitResponse") + fd_MsgTransmitResponse_round_id = md_MsgTransmitResponse.Fields().ByName("round_id") } -var _ protoreflect.Message = (*fastReflection_MsgReportBalanceResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgTransmitResponse)(nil) -type fastReflection_MsgReportBalanceResponse MsgReportBalanceResponse +type fastReflection_MsgTransmitResponse MsgTransmitResponse -func (x *MsgReportBalanceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgReportBalanceResponse)(x) +func (x *MsgTransmitResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgTransmitResponse)(x) } -func (x *MsgReportBalanceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_v1_tx_proto_msgTypes[1] +func (x *MsgTransmitResponse) slowProtoReflect() protoreflect.Message { + mi := &file_halo_aggregator_v2_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -723,43 +579,43 @@ func (x *MsgReportBalanceResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgReportBalanceResponse_messageType fastReflection_MsgReportBalanceResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgReportBalanceResponse_messageType{} +var _fastReflection_MsgTransmitResponse_messageType fastReflection_MsgTransmitResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgTransmitResponse_messageType{} -type fastReflection_MsgReportBalanceResponse_messageType struct{} +type fastReflection_MsgTransmitResponse_messageType struct{} -func (x fastReflection_MsgReportBalanceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgReportBalanceResponse)(nil) +func (x fastReflection_MsgTransmitResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgTransmitResponse)(nil) } -func (x fastReflection_MsgReportBalanceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgReportBalanceResponse) +func (x fastReflection_MsgTransmitResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgTransmitResponse) } -func (x fastReflection_MsgReportBalanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgReportBalanceResponse +func (x fastReflection_MsgTransmitResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTransmitResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgReportBalanceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgReportBalanceResponse +func (x *fastReflection_MsgTransmitResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTransmitResponse } // 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_MsgReportBalanceResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgReportBalanceResponse_messageType +func (x *fastReflection_MsgTransmitResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgTransmitResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgReportBalanceResponse) New() protoreflect.Message { - return new(fastReflection_MsgReportBalanceResponse) +func (x *fastReflection_MsgTransmitResponse) New() protoreflect.Message { + return new(fastReflection_MsgTransmitResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgReportBalanceResponse) Interface() protoreflect.ProtoMessage { - return (*MsgReportBalanceResponse)(x) +func (x *fastReflection_MsgTransmitResponse) Interface() protoreflect.ProtoMessage { + return (*MsgTransmitResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -767,10 +623,10 @@ func (x *fastReflection_MsgReportBalanceResponse) Interface() protoreflect.Proto // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgReportBalanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgTransmitResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.RoundId != uint64(0) { value := protoreflect.ValueOfUint64(x.RoundId) - if !f(fd_MsgReportBalanceResponse_round_id, value) { + if !f(fd_MsgTransmitResponse_round_id, value) { return } } @@ -787,15 +643,15 @@ func (x *fastReflection_MsgReportBalanceResponse) Range(f func(protoreflect.Fiel // 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_MsgReportBalanceResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgTransmitResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "halo.aggregator.v1.MsgReportBalanceResponse.round_id": + case "halo.aggregator.v2.MsgTransmitResponse.round_id": return x.RoundId != uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgReportBalanceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransmitResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgReportBalanceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransmitResponse does not contain field %s", fd.FullName())) } } @@ -805,15 +661,15 @@ func (x *fastReflection_MsgReportBalanceResponse) Has(fd protoreflect.FieldDescr // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgReportBalanceResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgTransmitResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "halo.aggregator.v1.MsgReportBalanceResponse.round_id": + case "halo.aggregator.v2.MsgTransmitResponse.round_id": x.RoundId = uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgReportBalanceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransmitResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgReportBalanceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransmitResponse does not contain field %s", fd.FullName())) } } @@ -823,16 +679,16 @@ func (x *fastReflection_MsgReportBalanceResponse) Clear(fd protoreflect.FieldDes // 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_MsgReportBalanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgTransmitResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "halo.aggregator.v1.MsgReportBalanceResponse.round_id": + case "halo.aggregator.v2.MsgTransmitResponse.round_id": value := x.RoundId return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgReportBalanceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransmitResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgReportBalanceResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransmitResponse does not contain field %s", descriptor.FullName())) } } @@ -846,15 +702,15 @@ func (x *fastReflection_MsgReportBalanceResponse) Get(descriptor protoreflect.Fi // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgReportBalanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgTransmitResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "halo.aggregator.v1.MsgReportBalanceResponse.round_id": + case "halo.aggregator.v2.MsgTransmitResponse.round_id": x.RoundId = value.Uint() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgReportBalanceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransmitResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgReportBalanceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransmitResponse does not contain field %s", fd.FullName())) } } @@ -868,40 +724,40 @@ func (x *fastReflection_MsgReportBalanceResponse) Set(fd protoreflect.FieldDescr // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgReportBalanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgTransmitResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.MsgReportBalanceResponse.round_id": - panic(fmt.Errorf("field round_id of message halo.aggregator.v1.MsgReportBalanceResponse is not mutable")) + case "halo.aggregator.v2.MsgTransmitResponse.round_id": + panic(fmt.Errorf("field round_id of message halo.aggregator.v2.MsgTransmitResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgReportBalanceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransmitResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgReportBalanceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransmitResponse 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_MsgReportBalanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgTransmitResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.MsgReportBalanceResponse.round_id": + case "halo.aggregator.v2.MsgTransmitResponse.round_id": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgReportBalanceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransmitResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgReportBalanceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransmitResponse 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_MsgReportBalanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgTransmitResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.MsgReportBalanceResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v2.MsgTransmitResponse", d.FullName())) } panic("unreachable") } @@ -909,7 +765,7 @@ func (x *fastReflection_MsgReportBalanceResponse) WhichOneof(d protoreflect.Oneo // 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_MsgReportBalanceResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgTransmitResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -920,7 +776,7 @@ func (x *fastReflection_MsgReportBalanceResponse) GetUnknown() protoreflect.RawF // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgReportBalanceResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgTransmitResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -932,7 +788,7 @@ func (x *fastReflection_MsgReportBalanceResponse) SetUnknown(fields protoreflect // 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_MsgReportBalanceResponse) IsValid() bool { +func (x *fastReflection_MsgTransmitResponse) IsValid() bool { return x != nil } @@ -942,9 +798,9 @@ func (x *fastReflection_MsgReportBalanceResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgReportBalanceResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgTransmitResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgReportBalanceResponse) + x := input.Message.Interface().(*MsgTransmitResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -969,7 +825,7 @@ func (x *fastReflection_MsgReportBalanceResponse) ProtoMethods() *protoiface.Met } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgReportBalanceResponse) + x := input.Message.Interface().(*MsgTransmitResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1004,7 +860,7 @@ func (x *fastReflection_MsgReportBalanceResponse) ProtoMethods() *protoiface.Met }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgReportBalanceResponse) + x := input.Message.Interface().(*MsgTransmitResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1036,10 +892,10 @@ func (x *fastReflection_MsgReportBalanceResponse) ProtoMethods() *protoiface.Met fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgReportBalanceResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTransmitResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgReportBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTransmitResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1103,8 +959,8 @@ var ( ) func init() { - file_halo_aggregator_v1_tx_proto_init() - md_MsgSetNextPrice = File_halo_aggregator_v1_tx_proto.Messages().ByName("MsgSetNextPrice") + file_halo_aggregator_v2_tx_proto_init() + md_MsgSetNextPrice = File_halo_aggregator_v2_tx_proto.Messages().ByName("MsgSetNextPrice") fd_MsgSetNextPrice_signer = md_MsgSetNextPrice.Fields().ByName("signer") fd_MsgSetNextPrice_next_price = md_MsgSetNextPrice.Fields().ByName("next_price") } @@ -1118,7 +974,7 @@ func (x *MsgSetNextPrice) ProtoReflect() protoreflect.Message { } func (x *MsgSetNextPrice) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_v1_tx_proto_msgTypes[2] + mi := &file_halo_aggregator_v2_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1201,15 +1057,15 @@ func (x *fastReflection_MsgSetNextPrice) Range(f func(protoreflect.FieldDescript // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgSetNextPrice) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "halo.aggregator.v1.MsgSetNextPrice.signer": + case "halo.aggregator.v2.MsgSetNextPrice.signer": return x.Signer != "" - case "halo.aggregator.v1.MsgSetNextPrice.next_price": + case "halo.aggregator.v2.MsgSetNextPrice.next_price": return x.NextPrice != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgSetNextPrice")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgSetNextPrice")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgSetNextPrice does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgSetNextPrice does not contain field %s", fd.FullName())) } } @@ -1221,15 +1077,15 @@ func (x *fastReflection_MsgSetNextPrice) Has(fd protoreflect.FieldDescriptor) bo // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgSetNextPrice) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "halo.aggregator.v1.MsgSetNextPrice.signer": + case "halo.aggregator.v2.MsgSetNextPrice.signer": x.Signer = "" - case "halo.aggregator.v1.MsgSetNextPrice.next_price": + case "halo.aggregator.v2.MsgSetNextPrice.next_price": x.NextPrice = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgSetNextPrice")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgSetNextPrice")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgSetNextPrice does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgSetNextPrice does not contain field %s", fd.FullName())) } } @@ -1241,17 +1097,17 @@ func (x *fastReflection_MsgSetNextPrice) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgSetNextPrice) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "halo.aggregator.v1.MsgSetNextPrice.signer": + case "halo.aggregator.v2.MsgSetNextPrice.signer": value := x.Signer return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.MsgSetNextPrice.next_price": + case "halo.aggregator.v2.MsgSetNextPrice.next_price": value := x.NextPrice return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgSetNextPrice")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgSetNextPrice")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgSetNextPrice does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgSetNextPrice does not contain field %s", descriptor.FullName())) } } @@ -1267,15 +1123,15 @@ func (x *fastReflection_MsgSetNextPrice) Get(descriptor protoreflect.FieldDescri // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgSetNextPrice) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "halo.aggregator.v1.MsgSetNextPrice.signer": + case "halo.aggregator.v2.MsgSetNextPrice.signer": x.Signer = value.Interface().(string) - case "halo.aggregator.v1.MsgSetNextPrice.next_price": + case "halo.aggregator.v2.MsgSetNextPrice.next_price": x.NextPrice = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgSetNextPrice")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgSetNextPrice")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgSetNextPrice does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgSetNextPrice does not contain field %s", fd.FullName())) } } @@ -1291,15 +1147,15 @@ func (x *fastReflection_MsgSetNextPrice) Set(fd protoreflect.FieldDescriptor, va // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgSetNextPrice) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.MsgSetNextPrice.signer": - panic(fmt.Errorf("field signer of message halo.aggregator.v1.MsgSetNextPrice is not mutable")) - case "halo.aggregator.v1.MsgSetNextPrice.next_price": - panic(fmt.Errorf("field next_price of message halo.aggregator.v1.MsgSetNextPrice is not mutable")) + case "halo.aggregator.v2.MsgSetNextPrice.signer": + panic(fmt.Errorf("field signer of message halo.aggregator.v2.MsgSetNextPrice is not mutable")) + case "halo.aggregator.v2.MsgSetNextPrice.next_price": + panic(fmt.Errorf("field next_price of message halo.aggregator.v2.MsgSetNextPrice is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgSetNextPrice")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgSetNextPrice")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgSetNextPrice does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgSetNextPrice does not contain field %s", fd.FullName())) } } @@ -1308,15 +1164,15 @@ func (x *fastReflection_MsgSetNextPrice) Mutable(fd protoreflect.FieldDescriptor // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgSetNextPrice) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.MsgSetNextPrice.signer": + case "halo.aggregator.v2.MsgSetNextPrice.signer": return protoreflect.ValueOfString("") - case "halo.aggregator.v1.MsgSetNextPrice.next_price": + case "halo.aggregator.v2.MsgSetNextPrice.next_price": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgSetNextPrice")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgSetNextPrice")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgSetNextPrice does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgSetNextPrice does not contain field %s", fd.FullName())) } } @@ -1326,7 +1182,7 @@ func (x *fastReflection_MsgSetNextPrice) NewField(fd protoreflect.FieldDescripto func (x *fastReflection_MsgSetNextPrice) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.MsgSetNextPrice", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v2.MsgSetNextPrice", d.FullName())) } panic("unreachable") } @@ -1585,8 +1441,8 @@ var ( ) func init() { - file_halo_aggregator_v1_tx_proto_init() - md_MsgSetNextPriceResponse = File_halo_aggregator_v1_tx_proto.Messages().ByName("MsgSetNextPriceResponse") + file_halo_aggregator_v2_tx_proto_init() + md_MsgSetNextPriceResponse = File_halo_aggregator_v2_tx_proto.Messages().ByName("MsgSetNextPriceResponse") } var _ protoreflect.Message = (*fastReflection_MsgSetNextPriceResponse)(nil) @@ -1598,7 +1454,7 @@ func (x *MsgSetNextPriceResponse) ProtoReflect() protoreflect.Message { } func (x *MsgSetNextPriceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_v1_tx_proto_msgTypes[3] + mi := &file_halo_aggregator_v2_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1671,9 +1527,9 @@ func (x *fastReflection_MsgSetNextPriceResponse) Has(fd protoreflect.FieldDescri switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgSetNextPriceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgSetNextPriceResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgSetNextPriceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgSetNextPriceResponse does not contain field %s", fd.FullName())) } } @@ -1687,9 +1543,9 @@ func (x *fastReflection_MsgSetNextPriceResponse) Clear(fd protoreflect.FieldDesc switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgSetNextPriceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgSetNextPriceResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgSetNextPriceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgSetNextPriceResponse does not contain field %s", fd.FullName())) } } @@ -1703,9 +1559,9 @@ func (x *fastReflection_MsgSetNextPriceResponse) Get(descriptor protoreflect.Fie switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgSetNextPriceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgSetNextPriceResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgSetNextPriceResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgSetNextPriceResponse does not contain field %s", descriptor.FullName())) } } @@ -1723,9 +1579,9 @@ func (x *fastReflection_MsgSetNextPriceResponse) Set(fd protoreflect.FieldDescri switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgSetNextPriceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgSetNextPriceResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgSetNextPriceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgSetNextPriceResponse does not contain field %s", fd.FullName())) } } @@ -1743,9 +1599,9 @@ func (x *fastReflection_MsgSetNextPriceResponse) Mutable(fd protoreflect.FieldDe switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgSetNextPriceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgSetNextPriceResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgSetNextPriceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgSetNextPriceResponse does not contain field %s", fd.FullName())) } } @@ -1756,9 +1612,9 @@ func (x *fastReflection_MsgSetNextPriceResponse) NewField(fd protoreflect.FieldD switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgSetNextPriceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgSetNextPriceResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgSetNextPriceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgSetNextPriceResponse does not contain field %s", fd.FullName())) } } @@ -1768,7 +1624,7 @@ func (x *fastReflection_MsgSetNextPriceResponse) NewField(fd protoreflect.FieldD func (x *fastReflection_MsgSetNextPriceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.MsgSetNextPriceResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v2.MsgSetNextPriceResponse", d.FullName())) } panic("unreachable") } @@ -1937,16 +1793,16 @@ func (x *fastReflection_MsgSetNextPriceResponse) ProtoMethods() *protoiface.Meth } var ( - md_MsgTransferOwnership protoreflect.MessageDescriptor - fd_MsgTransferOwnership_signer protoreflect.FieldDescriptor - fd_MsgTransferOwnership_new_owner protoreflect.FieldDescriptor + md_MsgTransferOwnership protoreflect.MessageDescriptor + fd_MsgTransferOwnership_signer protoreflect.FieldDescriptor + fd_MsgTransferOwnership_new_reporter protoreflect.FieldDescriptor ) func init() { - file_halo_aggregator_v1_tx_proto_init() - md_MsgTransferOwnership = File_halo_aggregator_v1_tx_proto.Messages().ByName("MsgTransferOwnership") + file_halo_aggregator_v2_tx_proto_init() + md_MsgTransferOwnership = File_halo_aggregator_v2_tx_proto.Messages().ByName("MsgTransferOwnership") fd_MsgTransferOwnership_signer = md_MsgTransferOwnership.Fields().ByName("signer") - fd_MsgTransferOwnership_new_owner = md_MsgTransferOwnership.Fields().ByName("new_owner") + fd_MsgTransferOwnership_new_reporter = md_MsgTransferOwnership.Fields().ByName("new_reporter") } var _ protoreflect.Message = (*fastReflection_MsgTransferOwnership)(nil) @@ -1958,7 +1814,7 @@ func (x *MsgTransferOwnership) ProtoReflect() protoreflect.Message { } func (x *MsgTransferOwnership) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_v1_tx_proto_msgTypes[4] + mi := &file_halo_aggregator_v2_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2020,9 +1876,9 @@ func (x *fastReflection_MsgTransferOwnership) Range(f func(protoreflect.FieldDes return } } - if x.NewOwner != "" { - value := protoreflect.ValueOfString(x.NewOwner) - if !f(fd_MsgTransferOwnership_new_owner, value) { + if x.NewReporter != "" { + value := protoreflect.ValueOfString(x.NewReporter) + if !f(fd_MsgTransferOwnership_new_reporter, value) { return } } @@ -2041,15 +1897,15 @@ func (x *fastReflection_MsgTransferOwnership) Range(f func(protoreflect.FieldDes // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgTransferOwnership) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "halo.aggregator.v1.MsgTransferOwnership.signer": + case "halo.aggregator.v2.MsgTransferOwnership.signer": return x.Signer != "" - case "halo.aggregator.v1.MsgTransferOwnership.new_owner": - return x.NewOwner != "" + case "halo.aggregator.v2.MsgTransferOwnership.new_reporter": + return x.NewReporter != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgTransferOwnership")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransferOwnership")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgTransferOwnership does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransferOwnership does not contain field %s", fd.FullName())) } } @@ -2061,15 +1917,15 @@ func (x *fastReflection_MsgTransferOwnership) Has(fd protoreflect.FieldDescripto // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgTransferOwnership) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "halo.aggregator.v1.MsgTransferOwnership.signer": + case "halo.aggregator.v2.MsgTransferOwnership.signer": x.Signer = "" - case "halo.aggregator.v1.MsgTransferOwnership.new_owner": - x.NewOwner = "" + case "halo.aggregator.v2.MsgTransferOwnership.new_reporter": + x.NewReporter = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgTransferOwnership")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransferOwnership")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgTransferOwnership does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransferOwnership does not contain field %s", fd.FullName())) } } @@ -2081,17 +1937,17 @@ func (x *fastReflection_MsgTransferOwnership) Clear(fd protoreflect.FieldDescrip // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgTransferOwnership) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "halo.aggregator.v1.MsgTransferOwnership.signer": + case "halo.aggregator.v2.MsgTransferOwnership.signer": value := x.Signer return protoreflect.ValueOfString(value) - case "halo.aggregator.v1.MsgTransferOwnership.new_owner": - value := x.NewOwner + case "halo.aggregator.v2.MsgTransferOwnership.new_reporter": + value := x.NewReporter return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgTransferOwnership")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransferOwnership")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgTransferOwnership does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransferOwnership does not contain field %s", descriptor.FullName())) } } @@ -2107,15 +1963,15 @@ func (x *fastReflection_MsgTransferOwnership) Get(descriptor protoreflect.FieldD // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgTransferOwnership) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "halo.aggregator.v1.MsgTransferOwnership.signer": + case "halo.aggregator.v2.MsgTransferOwnership.signer": x.Signer = value.Interface().(string) - case "halo.aggregator.v1.MsgTransferOwnership.new_owner": - x.NewOwner = value.Interface().(string) + case "halo.aggregator.v2.MsgTransferOwnership.new_reporter": + x.NewReporter = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgTransferOwnership")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransferOwnership")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgTransferOwnership does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransferOwnership does not contain field %s", fd.FullName())) } } @@ -2131,15 +1987,15 @@ func (x *fastReflection_MsgTransferOwnership) Set(fd protoreflect.FieldDescripto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgTransferOwnership) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.MsgTransferOwnership.signer": - panic(fmt.Errorf("field signer of message halo.aggregator.v1.MsgTransferOwnership is not mutable")) - case "halo.aggregator.v1.MsgTransferOwnership.new_owner": - panic(fmt.Errorf("field new_owner of message halo.aggregator.v1.MsgTransferOwnership is not mutable")) + case "halo.aggregator.v2.MsgTransferOwnership.signer": + panic(fmt.Errorf("field signer of message halo.aggregator.v2.MsgTransferOwnership is not mutable")) + case "halo.aggregator.v2.MsgTransferOwnership.new_reporter": + panic(fmt.Errorf("field new_reporter of message halo.aggregator.v2.MsgTransferOwnership is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgTransferOwnership")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransferOwnership")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgTransferOwnership does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransferOwnership does not contain field %s", fd.FullName())) } } @@ -2148,15 +2004,15 @@ func (x *fastReflection_MsgTransferOwnership) Mutable(fd protoreflect.FieldDescr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgTransferOwnership) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "halo.aggregator.v1.MsgTransferOwnership.signer": + case "halo.aggregator.v2.MsgTransferOwnership.signer": return protoreflect.ValueOfString("") - case "halo.aggregator.v1.MsgTransferOwnership.new_owner": + case "halo.aggregator.v2.MsgTransferOwnership.new_reporter": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgTransferOwnership")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransferOwnership")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgTransferOwnership does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransferOwnership does not contain field %s", fd.FullName())) } } @@ -2166,7 +2022,7 @@ func (x *fastReflection_MsgTransferOwnership) NewField(fd protoreflect.FieldDesc func (x *fastReflection_MsgTransferOwnership) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.MsgTransferOwnership", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v2.MsgTransferOwnership", d.FullName())) } panic("unreachable") } @@ -2225,7 +2081,7 @@ func (x *fastReflection_MsgTransferOwnership) ProtoMethods() *protoiface.Methods if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.NewOwner) + l = len(x.NewReporter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -2258,10 +2114,10 @@ func (x *fastReflection_MsgTransferOwnership) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.NewOwner) > 0 { - i -= len(x.NewOwner) - copy(dAtA[i:], x.NewOwner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewOwner))) + if len(x.NewReporter) > 0 { + i -= len(x.NewReporter) + copy(dAtA[i:], x.NewReporter) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewReporter))) i-- dAtA[i] = 0x12 } @@ -2355,7 +2211,7 @@ func (x *fastReflection_MsgTransferOwnership) ProtoMethods() *protoiface.Methods iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewOwner", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewReporter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2383,7 +2239,7 @@ func (x *fastReflection_MsgTransferOwnership) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.NewOwner = string(dAtA[iNdEx:postIndex]) + x.NewReporter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2425,8 +2281,8 @@ var ( ) func init() { - file_halo_aggregator_v1_tx_proto_init() - md_MsgTransferOwnershipResponse = File_halo_aggregator_v1_tx_proto.Messages().ByName("MsgTransferOwnershipResponse") + file_halo_aggregator_v2_tx_proto_init() + md_MsgTransferOwnershipResponse = File_halo_aggregator_v2_tx_proto.Messages().ByName("MsgTransferOwnershipResponse") } var _ protoreflect.Message = (*fastReflection_MsgTransferOwnershipResponse)(nil) @@ -2438,7 +2294,7 @@ func (x *MsgTransferOwnershipResponse) ProtoReflect() protoreflect.Message { } func (x *MsgTransferOwnershipResponse) slowProtoReflect() protoreflect.Message { - mi := &file_halo_aggregator_v1_tx_proto_msgTypes[5] + mi := &file_halo_aggregator_v2_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2511,9 +2367,9 @@ func (x *fastReflection_MsgTransferOwnershipResponse) Has(fd protoreflect.FieldD switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgTransferOwnershipResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransferOwnershipResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgTransferOwnershipResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransferOwnershipResponse does not contain field %s", fd.FullName())) } } @@ -2527,9 +2383,9 @@ func (x *fastReflection_MsgTransferOwnershipResponse) Clear(fd protoreflect.Fiel switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgTransferOwnershipResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransferOwnershipResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgTransferOwnershipResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransferOwnershipResponse does not contain field %s", fd.FullName())) } } @@ -2543,9 +2399,9 @@ func (x *fastReflection_MsgTransferOwnershipResponse) Get(descriptor protoreflec switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgTransferOwnershipResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransferOwnershipResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgTransferOwnershipResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransferOwnershipResponse does not contain field %s", descriptor.FullName())) } } @@ -2563,9 +2419,9 @@ func (x *fastReflection_MsgTransferOwnershipResponse) Set(fd protoreflect.FieldD switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgTransferOwnershipResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransferOwnershipResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgTransferOwnershipResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransferOwnershipResponse does not contain field %s", fd.FullName())) } } @@ -2583,9 +2439,9 @@ func (x *fastReflection_MsgTransferOwnershipResponse) Mutable(fd protoreflect.Fi switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgTransferOwnershipResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransferOwnershipResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgTransferOwnershipResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransferOwnershipResponse does not contain field %s", fd.FullName())) } } @@ -2596,9 +2452,9 @@ func (x *fastReflection_MsgTransferOwnershipResponse) NewField(fd protoreflect.F switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v1.MsgTransferOwnershipResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: halo.aggregator.v2.MsgTransferOwnershipResponse")) } - panic(fmt.Errorf("message halo.aggregator.v1.MsgTransferOwnershipResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message halo.aggregator.v2.MsgTransferOwnershipResponse does not contain field %s", fd.FullName())) } } @@ -2608,7 +2464,7 @@ func (x *fastReflection_MsgTransferOwnershipResponse) NewField(fd protoreflect.F func (x *fastReflection_MsgTransferOwnershipResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v1.MsgTransferOwnershipResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in halo.aggregator.v2.MsgTransferOwnershipResponse", d.FullName())) } panic("unreachable") } @@ -2780,7 +2636,7 @@ func (x *fastReflection_MsgTransferOwnershipResponse) ProtoMethods() *protoiface // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: halo/aggregator/v1/tx.proto +// source: halo/aggregator/v2/tx.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -2789,76 +2645,60 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// MsgReportBalance implements the reportBalance (0x0b50ece9) method. -type MsgReportBalance struct { +// MsgTransmit implements the transmit (0xTODO) method. +type MsgTransmit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - Principal string `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"` - Interest string `protobuf:"bytes,3,opt,name=interest,proto3" json:"interest,omitempty"` - TotalSupply string `protobuf:"bytes,4,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"` - NextPrice string `protobuf:"bytes,5,opt,name=next_price,json=nextPrice,proto3" json:"next_price,omitempty"` + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + Answer string `protobuf:"bytes,2,opt,name=answer,proto3" json:"answer,omitempty"` + UpdatedAt uint32 `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } -func (x *MsgReportBalance) Reset() { - *x = MsgReportBalance{} +func (x *MsgTransmit) Reset() { + *x = MsgTransmit{} if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_tx_proto_msgTypes[0] + mi := &file_halo_aggregator_v2_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgReportBalance) String() string { +func (x *MsgTransmit) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgReportBalance) ProtoMessage() {} +func (*MsgTransmit) ProtoMessage() {} -// Deprecated: Use MsgReportBalance.ProtoReflect.Descriptor instead. -func (*MsgReportBalance) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_tx_proto_rawDescGZIP(), []int{0} +// Deprecated: Use MsgTransmit.ProtoReflect.Descriptor instead. +func (*MsgTransmit) Descriptor() ([]byte, []int) { + return file_halo_aggregator_v2_tx_proto_rawDescGZIP(), []int{0} } -func (x *MsgReportBalance) GetSigner() string { +func (x *MsgTransmit) GetSigner() string { if x != nil { return x.Signer } return "" } -func (x *MsgReportBalance) GetPrincipal() string { - if x != nil { - return x.Principal - } - return "" -} - -func (x *MsgReportBalance) GetInterest() string { - if x != nil { - return x.Interest - } - return "" -} - -func (x *MsgReportBalance) GetTotalSupply() string { +func (x *MsgTransmit) GetAnswer() string { if x != nil { - return x.TotalSupply + return x.Answer } return "" } -func (x *MsgReportBalance) GetNextPrice() string { +func (x *MsgTransmit) GetUpdatedAt() uint32 { if x != nil { - return x.NextPrice + return x.UpdatedAt } - return "" + return 0 } -// MsgReportBalanceResponse ... -type MsgReportBalanceResponse struct { +// MsgTransmitResponse ... +type MsgTransmitResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -2866,27 +2706,27 @@ type MsgReportBalanceResponse struct { RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` } -func (x *MsgReportBalanceResponse) Reset() { - *x = MsgReportBalanceResponse{} +func (x *MsgTransmitResponse) Reset() { + *x = MsgTransmitResponse{} if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_tx_proto_msgTypes[1] + mi := &file_halo_aggregator_v2_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgReportBalanceResponse) String() string { +func (x *MsgTransmitResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgReportBalanceResponse) ProtoMessage() {} +func (*MsgTransmitResponse) ProtoMessage() {} -// Deprecated: Use MsgReportBalanceResponse.ProtoReflect.Descriptor instead. -func (*MsgReportBalanceResponse) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_tx_proto_rawDescGZIP(), []int{1} +// Deprecated: Use MsgTransmitResponse.ProtoReflect.Descriptor instead. +func (*MsgTransmitResponse) Descriptor() ([]byte, []int) { + return file_halo_aggregator_v2_tx_proto_rawDescGZIP(), []int{1} } -func (x *MsgReportBalanceResponse) GetRoundId() uint64 { +func (x *MsgTransmitResponse) GetRoundId() uint64 { if x != nil { return x.RoundId } @@ -2906,7 +2746,7 @@ type MsgSetNextPrice struct { func (x *MsgSetNextPrice) Reset() { *x = MsgSetNextPrice{} if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_tx_proto_msgTypes[2] + mi := &file_halo_aggregator_v2_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2920,7 +2760,7 @@ func (*MsgSetNextPrice) ProtoMessage() {} // Deprecated: Use MsgSetNextPrice.ProtoReflect.Descriptor instead. func (*MsgSetNextPrice) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_tx_proto_rawDescGZIP(), []int{2} + return file_halo_aggregator_v2_tx_proto_rawDescGZIP(), []int{2} } func (x *MsgSetNextPrice) GetSigner() string { @@ -2947,7 +2787,7 @@ type MsgSetNextPriceResponse struct { func (x *MsgSetNextPriceResponse) Reset() { *x = MsgSetNextPriceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_tx_proto_msgTypes[3] + mi := &file_halo_aggregator_v2_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2961,7 +2801,7 @@ func (*MsgSetNextPriceResponse) ProtoMessage() {} // Deprecated: Use MsgSetNextPriceResponse.ProtoReflect.Descriptor instead. func (*MsgSetNextPriceResponse) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_tx_proto_rawDescGZIP(), []int{3} + return file_halo_aggregator_v2_tx_proto_rawDescGZIP(), []int{3} } // MsgTransferOwnership implements the transferOwnership (0xf2fde38b) method. @@ -2970,14 +2810,14 @@ type MsgTransferOwnership struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - NewOwner string `protobuf:"bytes,2,opt,name=new_owner,json=newOwner,proto3" json:"new_owner,omitempty"` + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + NewReporter string `protobuf:"bytes,2,opt,name=new_reporter,json=newReporter,proto3" json:"new_reporter,omitempty"` } func (x *MsgTransferOwnership) Reset() { *x = MsgTransferOwnership{} if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_tx_proto_msgTypes[4] + mi := &file_halo_aggregator_v2_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2991,7 +2831,7 @@ func (*MsgTransferOwnership) ProtoMessage() {} // Deprecated: Use MsgTransferOwnership.ProtoReflect.Descriptor instead. func (*MsgTransferOwnership) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_tx_proto_rawDescGZIP(), []int{4} + return file_halo_aggregator_v2_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgTransferOwnership) GetSigner() string { @@ -3001,9 +2841,9 @@ func (x *MsgTransferOwnership) GetSigner() string { return "" } -func (x *MsgTransferOwnership) GetNewOwner() string { +func (x *MsgTransferOwnership) GetNewReporter() string { if x != nil { - return x.NewOwner + return x.NewReporter } return "" } @@ -3018,7 +2858,7 @@ type MsgTransferOwnershipResponse struct { func (x *MsgTransferOwnershipResponse) Reset() { *x = MsgTransferOwnershipResponse{} if protoimpl.UnsafeEnabled { - mi := &file_halo_aggregator_v1_tx_proto_msgTypes[5] + mi := &file_halo_aggregator_v2_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3032,145 +2872,130 @@ func (*MsgTransferOwnershipResponse) ProtoMessage() {} // Deprecated: Use MsgTransferOwnershipResponse.ProtoReflect.Descriptor instead. func (*MsgTransferOwnershipResponse) Descriptor() ([]byte, []int) { - return file_halo_aggregator_v1_tx_proto_rawDescGZIP(), []int{5} + return file_halo_aggregator_v2_tx_proto_rawDescGZIP(), []int{5} } -var File_halo_aggregator_v1_tx_proto protoreflect.FileDescriptor +var File_halo_aggregator_v2_tx_proto protoreflect.FileDescriptor -var file_halo_aggregator_v1_tx_proto_rawDesc = []byte{ +var file_halo_aggregator_v2_tx_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x68, + 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, + 0x32, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbf, - 0x03, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, - 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, - 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, - 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, - 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x4c, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, + 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x12, 0x30, + 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x12, 0x48, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x3a, 0x30, 0x88, 0xa0, 0x1f, 0x00, 0xe8, + 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, + 0xb0, 0x2a, 0x18, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x2f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x22, 0x30, 0x0a, 0x13, 0x4d, + 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x22, 0xca, 0x01, + 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x70, - 0x70, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, - 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x4f, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, - 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, - 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, - 0x6e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x3a, 0x35, 0x88, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, - 0xb0, 0x2a, 0x1d, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x2f, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x22, 0x35, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x22, 0xca, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x53, - 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x4f, 0x0a, - 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x3a, 0x34, - 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x4e, 0x65, - 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xba, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, - 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x09, 0x6e, 0x65, - 0x77, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x4f, 0x77, 0x6e, 0x65, - 0x72, 0x3a, 0x39, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x21, 0x68, 0x61, 0x6c, 0x6f, 0x2f, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x22, 0x1e, 0x0a, 0x1c, - 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, - 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc4, 0x02, 0x0a, - 0x03, 0x4d, 0x73, 0x67, 0x12, 0x63, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x2c, 0x2e, 0x68, 0x61, - 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0c, 0x53, 0x65, 0x74, - 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x68, 0x61, 0x6c, 0x6f, - 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, 0x2b, - 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x11, 0x54, + 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x3a, 0x34, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, + 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x68, 0x61, + 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x53, 0x65, + 0x74, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, + 0x67, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x30, + 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x12, 0x3b, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x3a, 0x39, 0x88, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x21, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, + 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, - 0x12, 0x28, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x1a, 0x30, 0x2e, 0x68, 0x61, 0x6c, - 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, - 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, - 0xb0, 0x2a, 0x01, 0x42, 0xd0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x6c, 0x6f, - 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, - 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2d, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x2f, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, - 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, - 0x31, 0x3b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x48, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, 0x2e, 0x41, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, - 0x5c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x1e, 0x48, 0x61, 0x6c, 0x6f, 0x5c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x14, 0x48, 0x61, 0x6c, 0x6f, 0x3a, 0x3a, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb5, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, + 0x12, 0x54, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x2e, 0x68, + 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x1a, 0x27, 0x2e, + 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x78, + 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x73, 0x67, 0x53, + 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, 0x2b, 0x2e, 0x68, 0x61, + 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x28, 0x2e, + 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, + 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x1a, 0x30, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x73, 0x67, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, + 0x42, 0xd0, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x07, 0x54, 0x78, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2d, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, + 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x61, 0x6c, 0x6f, + 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x48, 0x41, + 0x58, 0xaa, 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x12, 0x48, 0x61, 0x6c, 0x6f, 0x5c, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x1e, 0x48, 0x61, + 0x6c, 0x6f, 0x5c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x32, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x48, + 0x61, 0x6c, 0x6f, 0x3a, 0x3a, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x3a, + 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_halo_aggregator_v1_tx_proto_rawDescOnce sync.Once - file_halo_aggregator_v1_tx_proto_rawDescData = file_halo_aggregator_v1_tx_proto_rawDesc + file_halo_aggregator_v2_tx_proto_rawDescOnce sync.Once + file_halo_aggregator_v2_tx_proto_rawDescData = file_halo_aggregator_v2_tx_proto_rawDesc ) -func file_halo_aggregator_v1_tx_proto_rawDescGZIP() []byte { - file_halo_aggregator_v1_tx_proto_rawDescOnce.Do(func() { - file_halo_aggregator_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_halo_aggregator_v1_tx_proto_rawDescData) +func file_halo_aggregator_v2_tx_proto_rawDescGZIP() []byte { + file_halo_aggregator_v2_tx_proto_rawDescOnce.Do(func() { + file_halo_aggregator_v2_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_halo_aggregator_v2_tx_proto_rawDescData) }) - return file_halo_aggregator_v1_tx_proto_rawDescData -} - -var file_halo_aggregator_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_halo_aggregator_v1_tx_proto_goTypes = []interface{}{ - (*MsgReportBalance)(nil), // 0: halo.aggregator.v1.MsgReportBalance - (*MsgReportBalanceResponse)(nil), // 1: halo.aggregator.v1.MsgReportBalanceResponse - (*MsgSetNextPrice)(nil), // 2: halo.aggregator.v1.MsgSetNextPrice - (*MsgSetNextPriceResponse)(nil), // 3: halo.aggregator.v1.MsgSetNextPriceResponse - (*MsgTransferOwnership)(nil), // 4: halo.aggregator.v1.MsgTransferOwnership - (*MsgTransferOwnershipResponse)(nil), // 5: halo.aggregator.v1.MsgTransferOwnershipResponse -} -var file_halo_aggregator_v1_tx_proto_depIdxs = []int32{ - 0, // 0: halo.aggregator.v1.Msg.ReportBalance:input_type -> halo.aggregator.v1.MsgReportBalance - 2, // 1: halo.aggregator.v1.Msg.SetNextPrice:input_type -> halo.aggregator.v1.MsgSetNextPrice - 4, // 2: halo.aggregator.v1.Msg.TransferOwnership:input_type -> halo.aggregator.v1.MsgTransferOwnership - 1, // 3: halo.aggregator.v1.Msg.ReportBalance:output_type -> halo.aggregator.v1.MsgReportBalanceResponse - 3, // 4: halo.aggregator.v1.Msg.SetNextPrice:output_type -> halo.aggregator.v1.MsgSetNextPriceResponse - 5, // 5: halo.aggregator.v1.Msg.TransferOwnership:output_type -> halo.aggregator.v1.MsgTransferOwnershipResponse + return file_halo_aggregator_v2_tx_proto_rawDescData +} + +var file_halo_aggregator_v2_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_halo_aggregator_v2_tx_proto_goTypes = []interface{}{ + (*MsgTransmit)(nil), // 0: halo.aggregator.v2.MsgTransmit + (*MsgTransmitResponse)(nil), // 1: halo.aggregator.v2.MsgTransmitResponse + (*MsgSetNextPrice)(nil), // 2: halo.aggregator.v2.MsgSetNextPrice + (*MsgSetNextPriceResponse)(nil), // 3: halo.aggregator.v2.MsgSetNextPriceResponse + (*MsgTransferOwnership)(nil), // 4: halo.aggregator.v2.MsgTransferOwnership + (*MsgTransferOwnershipResponse)(nil), // 5: halo.aggregator.v2.MsgTransferOwnershipResponse +} +var file_halo_aggregator_v2_tx_proto_depIdxs = []int32{ + 0, // 0: halo.aggregator.v2.Msg.Transmit:input_type -> halo.aggregator.v2.MsgTransmit + 2, // 1: halo.aggregator.v2.Msg.SetNextPrice:input_type -> halo.aggregator.v2.MsgSetNextPrice + 4, // 2: halo.aggregator.v2.Msg.TransferOwnership:input_type -> halo.aggregator.v2.MsgTransferOwnership + 1, // 3: halo.aggregator.v2.Msg.Transmit:output_type -> halo.aggregator.v2.MsgTransmitResponse + 3, // 4: halo.aggregator.v2.Msg.SetNextPrice:output_type -> halo.aggregator.v2.MsgSetNextPriceResponse + 5, // 5: halo.aggregator.v2.Msg.TransferOwnership:output_type -> halo.aggregator.v2.MsgTransferOwnershipResponse 3, // [3:6] is the sub-list for method output_type 0, // [0:3] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -3178,14 +3003,14 @@ var file_halo_aggregator_v1_tx_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_halo_aggregator_v1_tx_proto_init() } -func file_halo_aggregator_v1_tx_proto_init() { - if File_halo_aggregator_v1_tx_proto != nil { +func init() { file_halo_aggregator_v2_tx_proto_init() } +func file_halo_aggregator_v2_tx_proto_init() { + if File_halo_aggregator_v2_tx_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_halo_aggregator_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgReportBalance); i { + file_halo_aggregator_v2_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgTransmit); i { case 0: return &v.state case 1: @@ -3196,8 +3021,8 @@ func file_halo_aggregator_v1_tx_proto_init() { return nil } } - file_halo_aggregator_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgReportBalanceResponse); i { + file_halo_aggregator_v2_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgTransmitResponse); i { case 0: return &v.state case 1: @@ -3208,7 +3033,7 @@ func file_halo_aggregator_v1_tx_proto_init() { return nil } } - file_halo_aggregator_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_halo_aggregator_v2_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgSetNextPrice); i { case 0: return &v.state @@ -3220,7 +3045,7 @@ func file_halo_aggregator_v1_tx_proto_init() { return nil } } - file_halo_aggregator_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_halo_aggregator_v2_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgSetNextPriceResponse); i { case 0: return &v.state @@ -3232,7 +3057,7 @@ func file_halo_aggregator_v1_tx_proto_init() { return nil } } - file_halo_aggregator_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_halo_aggregator_v2_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgTransferOwnership); i { case 0: return &v.state @@ -3244,7 +3069,7 @@ func file_halo_aggregator_v1_tx_proto_init() { return nil } } - file_halo_aggregator_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_halo_aggregator_v2_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgTransferOwnershipResponse); i { case 0: return &v.state @@ -3261,18 +3086,18 @@ func file_halo_aggregator_v1_tx_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_halo_aggregator_v1_tx_proto_rawDesc, + RawDescriptor: file_halo_aggregator_v2_tx_proto_rawDesc, NumEnums: 0, NumMessages: 6, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_halo_aggregator_v1_tx_proto_goTypes, - DependencyIndexes: file_halo_aggregator_v1_tx_proto_depIdxs, - MessageInfos: file_halo_aggregator_v1_tx_proto_msgTypes, + GoTypes: file_halo_aggregator_v2_tx_proto_goTypes, + DependencyIndexes: file_halo_aggregator_v2_tx_proto_depIdxs, + MessageInfos: file_halo_aggregator_v2_tx_proto_msgTypes, }.Build() - File_halo_aggregator_v1_tx_proto = out.File - file_halo_aggregator_v1_tx_proto_rawDesc = nil - file_halo_aggregator_v1_tx_proto_goTypes = nil - file_halo_aggregator_v1_tx_proto_depIdxs = nil + File_halo_aggregator_v2_tx_proto = out.File + file_halo_aggregator_v2_tx_proto_rawDesc = nil + file_halo_aggregator_v2_tx_proto_goTypes = nil + file_halo_aggregator_v2_tx_proto_depIdxs = nil } diff --git a/api/aggregator/v1/tx_grpc.pb.go b/api/aggregator/v2/tx_grpc.pb.go similarity index 80% rename from api/aggregator/v1/tx_grpc.pb.go rename to api/aggregator/v2/tx_grpc.pb.go index 147b692..0855e6a 100644 --- a/api/aggregator/v1/tx_grpc.pb.go +++ b/api/aggregator/v2/tx_grpc.pb.go @@ -2,9 +2,9 @@ // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) -// source: halo/aggregator/v1/tx.proto +// source: halo/aggregator/v2/tx.proto -package aggregatorv1 +package aggregatorv2 import ( context "context" @@ -19,16 +19,16 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - Msg_ReportBalance_FullMethodName = "/halo.aggregator.v1.Msg/ReportBalance" - Msg_SetNextPrice_FullMethodName = "/halo.aggregator.v1.Msg/SetNextPrice" - Msg_TransferOwnership_FullMethodName = "/halo.aggregator.v1.Msg/TransferOwnership" + Msg_Transmit_FullMethodName = "/halo.aggregator.v2.Msg/Transmit" + Msg_SetNextPrice_FullMethodName = "/halo.aggregator.v2.Msg/SetNextPrice" + Msg_TransferOwnership_FullMethodName = "/halo.aggregator.v2.Msg/TransferOwnership" ) // MsgClient is the client API for Msg 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 MsgClient interface { - ReportBalance(ctx context.Context, in *MsgReportBalance, opts ...grpc.CallOption) (*MsgReportBalanceResponse, error) + Transmit(ctx context.Context, in *MsgTransmit, opts ...grpc.CallOption) (*MsgTransmitResponse, error) SetNextPrice(ctx context.Context, in *MsgSetNextPrice, opts ...grpc.CallOption) (*MsgSetNextPriceResponse, error) TransferOwnership(ctx context.Context, in *MsgTransferOwnership, opts ...grpc.CallOption) (*MsgTransferOwnershipResponse, error) } @@ -41,10 +41,10 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { return &msgClient{cc} } -func (c *msgClient) ReportBalance(ctx context.Context, in *MsgReportBalance, opts ...grpc.CallOption) (*MsgReportBalanceResponse, error) { +func (c *msgClient) Transmit(ctx context.Context, in *MsgTransmit, opts ...grpc.CallOption) (*MsgTransmitResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgReportBalanceResponse) - err := c.cc.Invoke(ctx, Msg_ReportBalance_FullMethodName, in, out, cOpts...) + out := new(MsgTransmitResponse) + err := c.cc.Invoke(ctx, Msg_Transmit_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -75,7 +75,7 @@ func (c *msgClient) TransferOwnership(ctx context.Context, in *MsgTransferOwners // All implementations must embed UnimplementedMsgServer // for forward compatibility. type MsgServer interface { - ReportBalance(context.Context, *MsgReportBalance) (*MsgReportBalanceResponse, error) + Transmit(context.Context, *MsgTransmit) (*MsgTransmitResponse, error) SetNextPrice(context.Context, *MsgSetNextPrice) (*MsgSetNextPriceResponse, error) TransferOwnership(context.Context, *MsgTransferOwnership) (*MsgTransferOwnershipResponse, error) mustEmbedUnimplementedMsgServer() @@ -88,8 +88,8 @@ type MsgServer interface { // pointer dereference when methods are called. type UnimplementedMsgServer struct{} -func (UnimplementedMsgServer) ReportBalance(context.Context, *MsgReportBalance) (*MsgReportBalanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReportBalance not implemented") +func (UnimplementedMsgServer) Transmit(context.Context, *MsgTransmit) (*MsgTransmitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Transmit not implemented") } func (UnimplementedMsgServer) SetNextPrice(context.Context, *MsgSetNextPrice) (*MsgSetNextPriceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetNextPrice not implemented") @@ -118,20 +118,20 @@ func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { s.RegisterService(&Msg_ServiceDesc, srv) } -func _Msg_ReportBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgReportBalance) +func _Msg_Transmit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTransmit) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).ReportBalance(ctx, in) + return srv.(MsgServer).Transmit(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_ReportBalance_FullMethodName, + FullMethod: Msg_Transmit_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ReportBalance(ctx, req.(*MsgReportBalance)) + return srv.(MsgServer).Transmit(ctx, req.(*MsgTransmit)) } return interceptor(ctx, in, info, handler) } @@ -176,12 +176,12 @@ func _Msg_TransferOwnership_Handler(srv interface{}, ctx context.Context, dec fu // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "halo.aggregator.v1.Msg", + ServiceName: "halo.aggregator.v2.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "ReportBalance", - Handler: _Msg_ReportBalance_Handler, + MethodName: "Transmit", + Handler: _Msg_Transmit_Handler, }, { MethodName: "SetNextPrice", @@ -193,5 +193,5 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "halo/aggregator/v1/tx.proto", + Metadata: "halo/aggregator/v2/tx.proto", } diff --git a/api/v1/genesis.pulsar.go b/api/v1/genesis.pulsar.go index 4b7782a..25eabea 100644 --- a/api/v1/genesis.pulsar.go +++ b/api/v1/genesis.pulsar.go @@ -6,8 +6,8 @@ import ( _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" - v1 "github.com/noble-assets/halo/v2/api/aggregator/v1" - v11 "github.com/noble-assets/halo/v2/api/entitlements/v1" + v2 "github.com/noble-assets/halo/v2/api/aggregator/v2" + v1 "github.com/noble-assets/halo/v2/api/entitlements/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -304,9 +304,9 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "halo.v1.GenesisState.aggregator_state": - x.AggregatorState = value.Message().Interface().(*v1.GenesisState) + x.AggregatorState = value.Message().Interface().(*v2.GenesisState) case "halo.v1.GenesisState.entitlements_state": - x.EntitlementsState = value.Message().Interface().(*v11.GenesisState) + x.EntitlementsState = value.Message().Interface().(*v1.GenesisState) case "halo.v1.GenesisState.owner": x.Owner = value.Interface().(string) case "halo.v1.GenesisState.nonces": @@ -335,12 +335,12 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p switch fd.FullName() { case "halo.v1.GenesisState.aggregator_state": if x.AggregatorState == nil { - x.AggregatorState = new(v1.GenesisState) + x.AggregatorState = new(v2.GenesisState) } return protoreflect.ValueOfMessage(x.AggregatorState.ProtoReflect()) case "halo.v1.GenesisState.entitlements_state": if x.EntitlementsState == nil { - x.EntitlementsState = new(v11.GenesisState) + x.EntitlementsState = new(v1.GenesisState) } return protoreflect.ValueOfMessage(x.EntitlementsState.ProtoReflect()) case "halo.v1.GenesisState.nonces": @@ -365,10 +365,10 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "halo.v1.GenesisState.aggregator_state": - m := new(v1.GenesisState) + m := new(v2.GenesisState) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "halo.v1.GenesisState.entitlements_state": - m := new(v11.GenesisState) + m := new(v1.GenesisState) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "halo.v1.GenesisState.owner": return protoreflect.ValueOfString("") @@ -661,7 +661,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.AggregatorState == nil { - x.AggregatorState = &v1.GenesisState{} + x.AggregatorState = &v2.GenesisState{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AggregatorState); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err @@ -697,7 +697,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.EntitlementsState == nil { - x.EntitlementsState = &v11.GenesisState{} + x.EntitlementsState = &v1.GenesisState{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EntitlementsState); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err @@ -902,9 +902,9 @@ type GenesisState struct { unknownFields protoimpl.UnknownFields // aggregator_state is the genesis state of the aggregator submodule. - AggregatorState *v1.GenesisState `protobuf:"bytes,1,opt,name=aggregator_state,json=aggregatorState,proto3" json:"aggregator_state,omitempty"` + AggregatorState *v2.GenesisState `protobuf:"bytes,1,opt,name=aggregator_state,json=aggregatorState,proto3" json:"aggregator_state,omitempty"` // entitlements_state is the genesis state of the entitlements submodule. - EntitlementsState *v11.GenesisState `protobuf:"bytes,2,opt,name=entitlements_state,json=entitlementsState,proto3" json:"entitlements_state,omitempty"` + EntitlementsState *v1.GenesisState `protobuf:"bytes,2,opt,name=entitlements_state,json=entitlementsState,proto3" json:"entitlements_state,omitempty"` // owner is the address that can control this module. Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` // nonces contains the withdrawal nonce per user. @@ -931,14 +931,14 @@ func (*GenesisState) Descriptor() ([]byte, []int) { return file_halo_v1_genesis_proto_rawDescGZIP(), []int{0} } -func (x *GenesisState) GetAggregatorState() *v1.GenesisState { +func (x *GenesisState) GetAggregatorState() *v2.GenesisState { if x != nil { return x.AggregatorState } return nil } -func (x *GenesisState) GetEntitlementsState() *v11.GenesisState { +func (x *GenesisState) GetEntitlementsState() *v1.GenesisState { if x != nil { return x.EntitlementsState } @@ -968,14 +968,14 @@ var file_halo_v1_genesis_proto_rawDesc = []byte{ 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x68, 0x61, 0x6c, 0x6f, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe0, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x51, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x68, 0x61, 0x6c, 0x6f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x57, 0x0a, 0x12, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, @@ -1020,13 +1020,13 @@ func file_halo_v1_genesis_proto_rawDescGZIP() []byte { var file_halo_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_halo_v1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: halo.v1.GenesisState - nil, // 1: halo.v1.GenesisState.NoncesEntry - (*v1.GenesisState)(nil), // 2: halo.aggregator.v1.GenesisState - (*v11.GenesisState)(nil), // 3: halo.entitlements.v1.GenesisState + (*GenesisState)(nil), // 0: halo.v1.GenesisState + nil, // 1: halo.v1.GenesisState.NoncesEntry + (*v2.GenesisState)(nil), // 2: halo.aggregator.v2.GenesisState + (*v1.GenesisState)(nil), // 3: halo.entitlements.v1.GenesisState } var file_halo_v1_genesis_proto_depIdxs = []int32{ - 2, // 0: halo.v1.GenesisState.aggregator_state:type_name -> halo.aggregator.v1.GenesisState + 2, // 0: halo.v1.GenesisState.aggregator_state:type_name -> halo.aggregator.v2.GenesisState 3, // 1: halo.v1.GenesisState.entitlements_state:type_name -> halo.entitlements.v1.GenesisState 1, // 2: halo.v1.GenesisState.nonces:type_name -> halo.v1.GenesisState.NoncesEntry 3, // [3:3] is the sub-list for method output_type diff --git a/buf.yaml b/buf.yaml index bf004c2..d8e95d6 100644 --- a/buf.yaml +++ b/buf.yaml @@ -13,6 +13,3 @@ lint: - RPC_REQUEST_STANDARD_NAME - RPC_RESPONSE_STANDARD_NAME - RPC_REQUEST_RESPONSE_UNIQUE -breaking: - except: - - FILE_SAME_GO_PACKAGE diff --git a/client/cli/query_aggregator.go b/client/cli/query_aggregator.go index 822037d..d28ae36 100644 --- a/client/cli/query_aggregator.go +++ b/client/cli/query_aggregator.go @@ -8,11 +8,9 @@ package cli import ( "context" - "strconv" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/gogoproto/proto" "github.com/noble-assets/halo/v2/types/aggregator" "github.com/spf13/cobra" ) @@ -26,123 +24,21 @@ func GetAggregatorQueryCmd() *cobra.Command { RunE: client.ValidateCmd, } - cmd.AddCommand(QueryAggregatorOwner()) - cmd.AddCommand(QueryNextPrice()) - cmd.AddCommand(QueryRoundData()) - cmd.AddCommand(QueryRoundDetails()) + cmd.AddCommand(QueryReporter()) return cmd } -func QueryAggregatorOwner() *cobra.Command { +func QueryReporter() *cobra.Command { cmd := &cobra.Command{ - Use: "owner", - Short: "Query the submodule's owner", + Use: "reporter", + Short: "Query the aggregator reporter", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) queryClient := aggregator.NewQueryClient(clientCtx) - res, err := queryClient.Owner(context.Background(), &aggregator.QueryOwner{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func QueryNextPrice() *cobra.Command { - cmd := &cobra.Command{ - Use: "next-price", - Short: "Query the next price", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - queryClient := aggregator.NewQueryClient(clientCtx) - - res, err := queryClient.NextPrice(context.Background(), &aggregator.QueryNextPrice{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func QueryRoundData() *cobra.Command { - cmd := &cobra.Command{ - Use: "round-data (id)", - Short: "Query the data of a the latest or a specific round", - Args: cobra.MaximumNArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - queryClient := aggregator.NewQueryClient(clientCtx) - - var res proto.Message - var err error - - if len(args) == 1 { - id, parseErr := strconv.ParseUint(args[0], 10, 64) - if parseErr != nil { - return parseErr - } - - res, err = queryClient.RoundData(context.Background(), &aggregator.QueryRoundData{ - RoundId: id, - }) - } else { - res, err = queryClient.LatestRoundData(context.Background(), &aggregator.QueryLatestRoundData{}) - } - - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func QueryRoundDetails() *cobra.Command { - cmd := &cobra.Command{ - Use: "round-details (id)", - Short: "Query the details of a the latest or a specific round", - Args: cobra.MaximumNArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - queryClient := aggregator.NewQueryClient(clientCtx) - - var res proto.Message - var err error - - if len(args) == 1 { - id, parseErr := strconv.ParseUint(args[0], 10, 64) - if parseErr != nil { - return parseErr - } - - res, err = queryClient.RoundDetails(context.Background(), &aggregator.QueryRoundDetails{ - RoundId: id, - }) - } else { - res, err = queryClient.LatestRoundDetails(context.Background(), &aggregator.QueryLatestRoundDetails{}) - } - + res, err := queryClient.Reporter(context.Background(), &aggregator.QueryReporter{}) if err != nil { return err } diff --git a/client/cli/tx_aggregator.go b/client/cli/tx_aggregator.go index 2ff7ae5..5f5d97f 100644 --- a/client/cli/tx_aggregator.go +++ b/client/cli/tx_aggregator.go @@ -8,6 +8,7 @@ package cli import ( "errors" + "strconv" "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" @@ -26,50 +27,37 @@ func GetAggregatorTxCmd() *cobra.Command { RunE: client.ValidateCmd, } - cmd.AddCommand(TxReportBalance()) + cmd.AddCommand(TxTransmit()) cmd.AddCommand(TxSetNextPrice()) cmd.AddCommand(TxAggregatorTransferOwnership()) return cmd } -func TxReportBalance() *cobra.Command { +func TxTransmit() *cobra.Command { cmd := &cobra.Command{ - Use: "report-balance [principal] [interest] [total-supply] [next-price]", - Short: "Transfer ownership of submodule", - Args: cobra.ExactArgs(4), + Use: "transmit [answer] [updated-at]", + Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } - principal, ok := math.NewIntFromString(args[0]) - if !ok { - return errors.New("invalid principal") - } - - interest, ok := math.NewIntFromString(args[1]) + answer, ok := math.NewIntFromString(args[0]) if !ok { - return errors.New("invalid interest") + return errors.New("invalid answer") } - totalSupply, ok := math.NewIntFromString(args[2]) - if !ok { - return errors.New("invalid total supply") - } - - nextPrice, ok := math.NewIntFromString(args[3]) - if !ok { - return errors.New("invalid next price") + updatedAt, err := strconv.Atoi(args[1]) + if err != nil { + return errors.New("invalid updated-at") } - msg := &aggregator.MsgReportBalance{ - Signer: clientCtx.GetFromAddress().String(), - Principal: principal, - Interest: interest, - TotalSupply: totalSupply, - NextPrice: nextPrice, + msg := &aggregator.MsgTransmit{ + Signer: clientCtx.GetFromAddress().String(), + Answer: answer, + UpdatedAt: uint32(updatedAt), } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) @@ -83,9 +71,8 @@ func TxReportBalance() *cobra.Command { func TxSetNextPrice() *cobra.Command { cmd := &cobra.Command{ - Use: "set-next-price [next-price]", - Short: "Transfer ownership of submodule", - Args: cobra.ExactArgs(1), + Use: "set-next-price [next-price]", + Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { @@ -113,7 +100,7 @@ func TxSetNextPrice() *cobra.Command { func TxAggregatorTransferOwnership() *cobra.Command { cmd := &cobra.Command{ - Use: "transfer-ownership [new-owner]", + Use: "transfer-ownership [new-reporter]", Short: "Transfer ownership of submodule", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { @@ -123,8 +110,8 @@ func TxAggregatorTransferOwnership() *cobra.Command { } msg := &aggregator.MsgTransferOwnership{ - Signer: clientCtx.GetFromAddress().String(), - NewOwner: args[0], + Signer: clientCtx.GetFromAddress().String(), + NewReporter: args[0], } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) diff --git a/genesis.go b/genesis.go index 432c73a..49cd541 100644 --- a/genesis.go +++ b/genesis.go @@ -16,20 +16,18 @@ import ( ) func InitGenesis(ctx sdk.Context, k *keeper.Keeper, cdc address.Codec, genesis types.GenesisState) { - if err := k.SetAggregatorOwner(ctx, genesis.AggregatorState.Owner); err != nil { + if err := k.Reporter.Set(ctx, genesis.AggregatorState.Reporter); err != nil { panic(err) } if err := k.SetLastRoundId(ctx, genesis.AggregatorState.LastRoundId); err != nil { panic(err) } - if err := k.SetNextPrice(ctx, genesis.AggregatorState.NextPrice); err != nil { - panic(err) - } for id, round := range genesis.AggregatorState.Rounds { - if err := k.SetRound(ctx, id, round); err != nil { + if err := k.Rounds.Set(ctx, id, round); err != nil { panic(err) } } + // TODO: NextPrices if err := k.SetEntitlementsOwner(ctx, genesis.EntitlementsState.Owner); err != nil { panic(err) @@ -63,12 +61,14 @@ func InitGenesis(ctx sdk.Context, k *keeper.Keeper, cdc address.Codec, genesis t } func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { + reporter, _ := k.Reporter.Get(ctx) + return &types.GenesisState{ AggregatorState: aggregator.GenesisState{ - Owner: k.GetAggregatorOwner(ctx), + Reporter: reporter, LastRoundId: k.GetLastRoundId(ctx), - NextPrice: k.GetNextPrice(ctx), Rounds: k.GetRounds(ctx), + // TODO: NextPrices }, EntitlementsState: entitlements.GenesisState{ Owner: k.GetEntitlementsOwner(ctx), diff --git a/keeper/keeper.go b/keeper/keeper.go index 9640d90..e78e704 100644 --- a/keeper/keeper.go +++ b/keeper/keeper.go @@ -38,10 +38,10 @@ type Keeper struct { Owner collections.Item[string] Nonces collections.Map[[]byte, uint64] - AggregatorOwner collections.Item[string] - LastRoundId collections.Sequence - NextPrice collections.Item[math.Int] - Rounds collections.Map[uint64, aggregator.RoundData] + Reporter collections.Item[string] + LastRoundId collections.Sequence + Rounds collections.Map[uint64, aggregator.RoundData] + NextPrices collections.Map[uint64, math.Int] EntitlementsOwner collections.Item[string] Paused collections.Item[bool] @@ -81,10 +81,10 @@ func NewKeeper( Owner: collections.NewItem(builder, types.OwnerKey, "owner", collections.StringValue), Nonces: collections.NewMap(builder, types.NoncePrefix, "nonces", collections.BytesKey, collections.Uint64Value), - AggregatorOwner: collections.NewItem(builder, aggregator.OwnerKey, "aggregator_owner", collections.StringValue), - LastRoundId: collections.NewSequence(builder, aggregator.LastRoundIDKey, "aggregator_last_round_id"), - NextPrice: collections.NewItem(builder, aggregator.NextPriceKey, "aggregator_next_price", sdk.IntValue), - Rounds: collections.NewMap(builder, aggregator.RoundPrefix, "aggregator_rounds", collections.Uint64Key, codec.CollValue[aggregator.RoundData](cdc)), + Reporter: collections.NewItem(builder, aggregator.ReporterKey, "aggregator_reporter", collections.StringValue), + LastRoundId: collections.NewSequence(builder, aggregator.LastRoundIDKey, "aggregator_last_round_id"), + Rounds: collections.NewMap(builder, aggregator.RoundPrefix, "aggregator_rounds", collections.Uint64Key, codec.CollValue[aggregator.RoundData](cdc)), + NextPrices: collections.NewMap(builder, aggregator.NextPricePrefix, "aggregator_next_prices", collections.Uint64Key, sdk.IntValue), EntitlementsOwner: collections.NewItem(builder, entitlements.OwnerKey, "entitlements_owner", collections.StringValue), Paused: collections.NewItem(builder, entitlements.PausedKey, "entitlements_paused", collections.BoolValue), @@ -192,8 +192,8 @@ func (k *Keeper) mintCoins(ctx context.Context, recipient sdk.AccAddress, coins // depositFor is an internal helper function to deposit. func (k *Keeper) depositFor(ctx context.Context, signer sdk.AccAddress, recipient sdk.AccAddress, underlying math.Int) (amount math.Int, err error) { lastRoundId := k.GetLastRoundId(ctx) - round, found := k.GetRound(ctx, lastRoundId) - if !found { + round, err := k.Rounds.Get(ctx, lastRoundId) + if err != nil { return math.Int{}, fmt.Errorf("round %d not found", lastRoundId) } amount = underlying.QuoRaw(10000).MulRaw(10000) @@ -219,8 +219,8 @@ func (k *Keeper) depositFor(ctx context.Context, signer sdk.AccAddress, recipien // withdrawTo is an internal helper function to withdraw. func (k *Keeper) withdrawTo(ctx context.Context, signer sdk.AccAddress, recipient sdk.AccAddress, amount math.Int) (underlying math.Int, err error) { lastRoundId := k.GetLastRoundId(ctx) - round, found := k.GetRound(ctx, lastRoundId) - if !found { + round, err := k.Rounds.Get(ctx, lastRoundId) + if err != nil { return math.Int{}, fmt.Errorf("round %d not found", lastRoundId) } underlying = amount.Mul(round.Answer).QuoRaw(100000000) diff --git a/keeper/msg_server_aggregator.go b/keeper/msg_server_aggregator.go index cc68c8f..ecfa7a2 100644 --- a/keeper/msg_server_aggregator.go +++ b/keeper/msg_server_aggregator.go @@ -23,109 +23,87 @@ func NewAggregatorMsgServer(keeper *Keeper) aggregator.MsgServer { return &aggregatorMsgServer{Keeper: keeper} } -func (k aggregatorMsgServer) ReportBalance(ctx context.Context, msg *aggregator.MsgReportBalance) (*aggregator.MsgReportBalanceResponse, error) { - _, err := k.EnsureOwner(ctx, msg.Signer) +func (k aggregatorMsgServer) Transmit(ctx context.Context, msg *aggregator.MsgTransmit) (*aggregator.MsgTransmitResponse, error) { + _, err := k.EnsureReporter(ctx, msg.Signer) if err != nil { return nil, err } - balance := msg.Principal.Add(msg.Interest) - - id, err := k.IncrementLastRoundId(ctx) + id, err := k.LastRoundId.Next(ctx) if err != nil { return nil, err } - round, found := k.GetRound(ctx, id) - if found && round.Balance.Equal(balance) && round.Interest.Equal(msg.Interest) && round.Supply.Equal(msg.TotalSupply) { - return nil, aggregator.ErrAlreadyReported - } - id += 1 - if _, found := k.GetRound(ctx, id); found { - return nil, aggregator.ErrAlreadyReported + round := aggregator.RoundData{ + Answer: msg.Answer, + UpdatedAt: msg.UpdatedAt, } - answer := balance.MulRaw(1_000_000_000_000).Quo(msg.TotalSupply) - round = aggregator.RoundData{ - Answer: answer, - Balance: balance, - Interest: msg.Interest, - Supply: msg.TotalSupply, - UpdatedAt: k.headerService.GetHeaderInfo(ctx).Time.Unix(), - } - if err = k.SetRound(ctx, id, round); err != nil { - return nil, err - } - - if !msg.NextPrice.IsPositive() || msg.NextPrice.LTE(answer) { - return nil, aggregator.ErrInvalidNextPrice - } - if err = k.Keeper.SetNextPrice(ctx, msg.NextPrice); err != nil { + if err = k.Rounds.Set(ctx, id, round); err != nil { return nil, err } - _ = k.eventService.EventManager(ctx).Emit(ctx, &aggregator.BalanceReported{ + return &aggregator.MsgTransmitResponse{RoundId: id}, k.eventService.EventManager(ctx).Emit(ctx, &aggregator.AnswerUpdated{ + Current: msg.Answer, RoundId: id, - Balance: balance, - Interest: msg.Interest, - Price: answer, - UpdatedAt: k.headerService.GetHeaderInfo(ctx).Time.Unix(), + UpdatedAt: msg.UpdatedAt, }) - _ = k.eventService.EventManager(ctx).Emit(ctx, &aggregator.NextPriceReported{Price: msg.NextPrice}) - - return &aggregator.MsgReportBalanceResponse{ - RoundId: id, - }, nil } func (k aggregatorMsgServer) SetNextPrice(ctx context.Context, msg *aggregator.MsgSetNextPrice) (*aggregator.MsgSetNextPriceResponse, error) { - _, err := k.EnsureOwner(ctx, msg.Signer) + _, err := k.EnsureReporter(ctx, msg.Signer) if err != nil { return nil, err } - if !msg.NextPrice.IsPositive() { + if msg.NextPrice.IsZero() { return nil, aggregator.ErrInvalidNextPrice } - if err = k.Keeper.SetNextPrice(ctx, msg.NextPrice); err != nil { + id, err := k.LastRoundId.Peek(ctx) + if err != nil { + return nil, err + } + + if err = k.NextPrices.Set(ctx, id, msg.NextPrice); err != nil { return nil, err } return &aggregator.MsgSetNextPriceResponse{}, k.eventService.EventManager(ctx).Emit(ctx, &aggregator.NextPriceReported{ - Price: msg.NextPrice, + RoundId: id, + NextPrice: msg.NextPrice, }) } func (k aggregatorMsgServer) TransferOwnership(ctx context.Context, msg *aggregator.MsgTransferOwnership) (*aggregator.MsgTransferOwnershipResponse, error) { - owner, err := k.EnsureOwner(ctx, msg.Signer) + reporter, err := k.EnsureReporter(ctx, msg.Signer) if err != nil { return nil, err } - if msg.NewOwner == owner { - return nil, aggregator.ErrSameOwner + if msg.NewReporter == reporter { + return nil, aggregator.ErrSameReporter } - if err = k.SetAggregatorOwner(ctx, msg.NewOwner); err != nil { + if err = k.Reporter.Set(ctx, msg.NewReporter); err != nil { return nil, err } return &aggregator.MsgTransferOwnershipResponse{}, k.eventService.EventManager(ctx).Emit(ctx, &aggregator.OwnershipTransferred{ - PreviousOwner: owner, - NewOwner: msg.NewOwner, + PreviousReporter: reporter, + NewReporter: msg.NewReporter, }) } // -func (k aggregatorMsgServer) EnsureOwner(ctx context.Context, signer string) (string, error) { - owner := k.GetAggregatorOwner(ctx) - if owner == "" { - return "", aggregator.ErrNoOwner +func (k aggregatorMsgServer) EnsureReporter(ctx context.Context, signer string) (string, error) { + reporter, _ := k.Reporter.Get(ctx) + if reporter == "" { + return "", aggregator.ErrNoReporter } - if signer != owner { - return "", errors.Wrapf(aggregator.ErrInvalidOwner, "expected %s, got %s", owner, signer) + if signer != reporter { + return "", errors.Wrapf(aggregator.ErrInvalidReporter, "expected %s, got %s", reporter, signer) } - return owner, nil + return reporter, nil } diff --git a/keeper/msg_server_aggregator_test.go b/keeper/msg_server_aggregator_test.go index b9694bd..4be4d2f 100644 --- a/keeper/msg_server_aggregator_test.go +++ b/keeper/msg_server_aggregator_test.go @@ -10,263 +10,69 @@ import ( "testing" "cosmossdk.io/collections" - "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/noble-assets/halo/v2/keeper" "github.com/noble-assets/halo/v2/types" "github.com/noble-assets/halo/v2/types/aggregator" "github.com/noble-assets/halo/v2/utils" - "github.com/noble-assets/halo/v2/utils/data" "github.com/noble-assets/halo/v2/utils/mocks" "github.com/stretchr/testify/require" ) -func TestReportBalance(t *testing.T) { - k, ctx := mocks.HaloKeeper(t) - server := keeper.NewAggregatorMsgServer(k) - - // ACT: Attempt to report balance with no owner set. - _, err := server.ReportBalance(ctx, &aggregator.MsgReportBalance{}) - // ASSERT: The action should've failed due to no owner set. - require.ErrorContains(t, err, "there is no owner") - - // ARRANGE: Set aggregator owner in state. - owner := utils.TestAccount() - err = k.SetAggregatorOwner(ctx, owner.Address) - require.NoError(t, err) - - // ARRANGE: Save the original LastRoundIDKey and reset it to an empty byte slice. - tmpLastRoundIDKey := aggregator.LastRoundIDKey - aggregator.LastRoundIDKey = []byte("") - - // ACT: Verify the LastRoundIDKey is set to zero when the key is reset to an empty slice. - require.Equal(t, k.GetLastRoundId(ctx), uint64(0)) - - // ARRANGE: Restore the original LastRoundIDKey to its previous value. - aggregator.LastRoundIDKey = tmpLastRoundIDKey - - // ACT: Attempt to report balance with invalid signer. - _, err = server.ReportBalance(ctx, &aggregator.MsgReportBalance{ - Signer: utils.TestAccount().Address, - }) - // ASSERT: The action should've failed due to invalid signer. - require.ErrorContains(t, err, aggregator.ErrInvalidOwner.Error()) - - // - for _, testCase := range data.EthereumRounds { - // ACT: Attempt to report balance. - testCase.Msg.Signer = owner.Address - res, err := server.ReportBalance(ctx, &testCase.Msg) - - // ASSERT: The action should've succeeded. - require.NoError(t, err) - _, found := k.GetRound(ctx, res.RoundId) - require.True(t, found) - } - - // ASSERT: All rounds can be retrieved. - rounds := k.GetRounds(ctx) - require.Len(t, rounds, 10) - - // ACT: Attempt to report balance with identical round. - msg := data.EthereumRounds[len(data.EthereumRounds)-1].Msg - msg.Signer = owner.Address - _, err = server.ReportBalance(ctx, &msg) - // ASSERT: The action should've failed due to identical round. - require.ErrorContains(t, err, aggregator.ErrAlreadyReported.Error()) - - // ACT: Attempt to report balance with a negative next price. - msg = aggregator.MsgReportBalance{ - Signer: owner.Address, - Principal: utils.MustParseInt("4600092531"), - Interest: utils.MustParseInt("658502"), - TotalSupply: utils.MustParseInt("44285046691709"), - NextPrice: utils.MustParseInt("-1"), - } - _, err = server.ReportBalance(ctx, &msg) - // ASSERT: The action should've failed due to invalid next price. - require.ErrorContains(t, err, aggregator.ErrInvalidNextPrice.Error()) - - // ACT: Attempt to report balance with invalid next price. - // https://etherscan.io/tx/0xe8154863cf89175c9ec361999ec7ddeebf7c29297ee62325f777067409071303 - msg = aggregator.MsgReportBalance{ - Signer: owner.Address, - Principal: utils.MustParseInt("4600092532"), - Interest: utils.MustParseInt("658503"), - TotalSupply: utils.MustParseInt("44285046691710"), - NextPrice: math.ZeroInt(), - } - _, err = server.ReportBalance(ctx, &msg) - // ASSERT: The action should've failed due to invalid next price. - require.ErrorContains(t, err, aggregator.ErrInvalidNextPrice.Error()) - - // ARRANGE: Set the next round in state. - err = k.SetRound(ctx, k.GetLastRoundId(ctx)+1, aggregator.RoundData{}) - require.NoError(t, err) - - // ACT: Attempt to report balance with existing next round. - // https://etherscan.io/tx/0x1a628856cb74de37357a35c29ec22509b72b1fc826ac7bb1020c73a99f9f80fc - msg = aggregator.MsgReportBalance{ - Signer: owner.Address, - Principal: utils.MustParseInt("4600751035"), - Interest: utils.MustParseInt("657348"), - TotalSupply: utils.MustParseInt("44285680550257"), - NextPrice: utils.MustParseInt("103914726"), - } - _, err = server.ReportBalance(ctx, &msg) - // ASSERT: The action should've failed due to existing round. - require.ErrorContains(t, err, aggregator.ErrAlreadyReported.Error()) - - // ARRANGE: Set up a failing collection store for the attribute setter. - tmpRounds := k.Rounds - k.Rounds = collections.NewMap( - collections.NewSchemaBuilder(mocks.FailingStore(mocks.Set, utils.GetKVStore(ctx, types.ModuleName))), - aggregator.RoundPrefix, "aggregator_rounds", collections.Uint64Key, codec.CollValue[aggregator.RoundData]( - mocks.MakeTestEncodingConfig("noble").Codec, - ), - ) - - // ACT: Attempt to report balance with failing Rounds store. - _, err = server.ReportBalance(ctx, &msg) - // ASSERT: The action should've failed due to collection store setter error. - require.Error(t, err, mocks.ErrorStoreAccess) - k.Rounds = tmpRounds - - // ARRANGE: Set up a failing collection store for the attribute setter. - tmpLastRoundId := k.LastRoundId - k.LastRoundId = collections.NewSequence( - collections.NewSchemaBuilder(mocks.FailingStore(mocks.Set, utils.GetKVStore(ctx, types.ModuleName))), - aggregator.LastRoundIDKey, "aggregator_last_round_id", - ) - - // ACT: Attempt to report balance with failing LastRoundId store. - _, err = server.ReportBalance(ctx, &msg) - // ASSERT: The action should've failed due to collection store setter error. - require.Error(t, err, mocks.ErrorStoreAccess) - k.LastRoundId = tmpLastRoundId - - // ARRANGE: Set up a failing collection store for the attribute setter. - k.NextPrice = collections.NewItem( - collections.NewSchemaBuilder(mocks.FailingStore(mocks.Set, utils.GetKVStore(ctx, types.ModuleName))), - aggregator.NextPriceKey, "aggregator_next_price", sdk.IntValue, - ) - - // ACT: Attempt to report balance with failing NextPrice store. - _, err = server.ReportBalance(ctx, &msg) - // ASSERT: The action should've failed due to collection store setter error. - require.Error(t, err, mocks.ErrorStoreAccess) -} - -func TestSetNextPrice(t *testing.T) { - k, ctx := mocks.HaloKeeper(t) - server := keeper.NewAggregatorMsgServer(k) - - // ACT: Attempt to set next price with no owner set. - _, err := server.SetNextPrice(ctx, &aggregator.MsgSetNextPrice{}) - // ASSERT: The action should've failed due to no owner set. - require.ErrorContains(t, err, "there is no owner") - - // ARRANGE: Set aggregator owner in state. - owner := utils.TestAccount() - err = k.SetAggregatorOwner(ctx, owner.Address) - require.NoError(t, err) - - // ACT: Attempt to set next price with invalid signer. - _, err = server.SetNextPrice(ctx, &aggregator.MsgSetNextPrice{ - Signer: utils.TestAccount().Address, - }) - // ASSERT: The action should've failed due to invalid signer. - require.ErrorContains(t, err, aggregator.ErrInvalidOwner.Error()) - - // ACT: Attempt to set next price with invalid price. - _, err = server.SetNextPrice(ctx, &aggregator.MsgSetNextPrice{ - Signer: owner.Address, - NextPrice: math.ZeroInt(), - }) - // ASSERT: The action should've failed due to invalid price. - require.ErrorContains(t, err, aggregator.ErrInvalidNextPrice.Error()) - - // ACT: Attempt to set next price. - // https://etherscan.io/tx/0xfd21979418ce5e6686c624841f48d11ed241b387b08eb60e2bd361de5ed1a061 - price := utils.MustParseInt("103780600") - _, err = server.SetNextPrice(ctx, &aggregator.MsgSetNextPrice{ - Signer: owner.Address, - NextPrice: price, - }) - // ASSERT: The action should've succeeded, and set next price in state. - require.NoError(t, err) - require.Equal(t, price, k.GetNextPrice(ctx)) - - // ARRANGE: Set up a failing collection store for the attribute setter. - k.NextPrice = collections.NewItem( - collections.NewSchemaBuilder(mocks.FailingStore(mocks.Set, utils.GetKVStore(ctx, types.ModuleName))), - aggregator.NextPriceKey, "aggregator_next_price", sdk.IntValue, - ) - - // ACT: Attempt to set next price. - _, err = server.SetNextPrice(ctx, &aggregator.MsgSetNextPrice{ - Signer: owner.Address, - NextPrice: price, - }) - // ASSERT: The action should've failed due to collection store setter error. - require.Error(t, err, mocks.ErrorStoreAccess) -} - func TestAggregatorTransferOwnership(t *testing.T) { k, ctx := mocks.HaloKeeper(t) server := keeper.NewAggregatorMsgServer(k) - // ACT: Attempt to transfer ownership with no owner set. + // ACT: Attempt to transfer ownership with no reporter set. _, err := server.TransferOwnership(ctx, &aggregator.MsgTransferOwnership{}) - // ASSERT: The action should've failed due to no owner set. - require.ErrorContains(t, err, "there is no owner") + // ASSERT: The action should've failed due to no reporter set. + require.ErrorContains(t, err, "there is no reporter") - // ARRANGE: Set aggregator owner in state. - owner := utils.TestAccount() - err = k.SetAggregatorOwner(ctx, owner.Address) - require.NoError(t, err) + // ARRANGE: Set reporter in state. + reporter := utils.TestAccount() + require.NoError(t, k.Reporter.Set(ctx, reporter.Address)) // ACT: Attempt to transfer ownership with invalid signer. _, err = server.TransferOwnership(ctx, &aggregator.MsgTransferOwnership{ Signer: utils.TestAccount().Address, }) // ASSERT: The action should've failed due to invalid signer. - require.ErrorContains(t, err, aggregator.ErrInvalidOwner.Error()) + require.ErrorContains(t, err, aggregator.ErrInvalidReporter.Error()) // ACT: Attempt to transfer ownership to same address. _, err = server.TransferOwnership(ctx, &aggregator.MsgTransferOwnership{ - Signer: owner.Address, - NewOwner: owner.Address, + Signer: reporter.Address, + NewReporter: reporter.Address, }) // ASSERT: The action should've failed due to same address. - require.ErrorContains(t, err, aggregator.ErrSameOwner.Error()) + require.ErrorContains(t, err, aggregator.ErrSameReporter.Error()) - // ARRANGE: Generate a new owner account. - newOwner := utils.TestAccount() + // ARRANGE: Generate a new reporter account. + newReporter := utils.TestAccount() // ARRANGE: Set up a failing collection store for the attribute setter. - tmp := k.AggregatorOwner - k.AggregatorOwner = collections.NewItem( + tmp := k.Reporter + k.Reporter = collections.NewItem( collections.NewSchemaBuilder(mocks.FailingStore(mocks.Set, utils.GetKVStore(ctx, types.ModuleName))), - aggregator.OwnerKey, "aggregator_owner", collections.StringValue, + aggregator.ReporterKey, "aggregator_reporter", collections.StringValue, ) // ACT: Attempt to transfer ownership. _, err = server.TransferOwnership(ctx, &aggregator.MsgTransferOwnership{ - Signer: owner.Address, - NewOwner: newOwner.Address, + Signer: reporter.Address, + NewReporter: newReporter.Address, }) // ASSERT: The action should've failed due to collection store setter error. require.Error(t, err, mocks.ErrorStoreAccess) - k.AggregatorOwner = tmp + k.Reporter = tmp // ACT: Attempt to transfer ownership. _, err = server.TransferOwnership(ctx, &aggregator.MsgTransferOwnership{ - Signer: owner.Address, - NewOwner: newOwner.Address, + Signer: reporter.Address, + NewReporter: newReporter.Address, }) - // ASSERT: The action should've succeeded, and set owner in state. + // ASSERT: The action should've succeeded, and set reporter in state. + require.NoError(t, err) + res, err := k.Reporter.Get(ctx) require.NoError(t, err) - require.Equal(t, newOwner.Address, k.GetAggregatorOwner(ctx)) + require.Equal(t, newReporter.Address, res) } diff --git a/keeper/msg_server_test.go b/keeper/msg_server_test.go index cc0199a..42e7282 100644 --- a/keeper/msg_server_test.go +++ b/keeper/msg_server_test.go @@ -60,11 +60,8 @@ func TestDeposit(t *testing.T) { require.NoError(t, err) // ARRANGE: Report Ethereum Round #229. // https://etherscan.io/tx/0xcff68ffc6f79afadf835f559f8a51ed7092bc679d2a4f34cd153ef321d6bc8ec - err = k.SetRound(ctx, 229, aggregator.RoundData{ + err = k.Rounds.Set(ctx, 229, aggregator.RoundData{ Answer: math.NewInt(104572478), - Balance: math.NewInt(7016169453), - Interest: math.NewInt(1005815), - Supply: math.NewInt(67093843285741), UpdatedAt: 1717153499, }) require.NoError(t, err) @@ -165,11 +162,8 @@ func TestDepositFor(t *testing.T) { // ARRANGE: Report Ethereum Round #229. // https://etherscan.io/tx/0xcff68ffc6f79afadf835f559f8a51ed7092bc679d2a4f34cd153ef321d6bc8ec - err = k.SetRound(ctx, 229, aggregator.RoundData{ + err = k.Rounds.Set(ctx, 229, aggregator.RoundData{ Answer: math.NewInt(104572478), - Balance: math.NewInt(7016169453), - Interest: math.NewInt(1005815), - Supply: math.NewInt(67093843285741), UpdatedAt: 1717153499, }) require.NoError(t, err) @@ -232,11 +226,8 @@ func TestDepositForWithRestrictions(t *testing.T) { // ARRANGE: Report Ethereum Round #229. // https://etherscan.io/tx/0xcff68ffc6f79afadf835f559f8a51ed7092bc679d2a4f34cd153ef321d6bc8ec - err = k.SetRound(ctx, 229, aggregator.RoundData{ + err = k.Rounds.Set(ctx, 229, aggregator.RoundData{ Answer: math.NewInt(104572478), - Balance: math.NewInt(7016169453), - Interest: math.NewInt(1005815), - Supply: math.NewInt(67093843285741), UpdatedAt: 1717153499, }) require.NoError(t, err) @@ -333,11 +324,8 @@ func TestWithdraw(t *testing.T) { require.NoError(t, err) // ARRANGE: Report Ethereum Round #139. // https://etherscan.io/tx/0x9095266d81856a28b80c4500228ab994197652fc4ad1c05cd4345d1454fccfd7 - err = k.SetRound(ctx, 139, aggregator.RoundData{ + err = k.Rounds.Set(ctx, 139, aggregator.RoundData{ Answer: math.NewInt(102847997), - Balance: math.NewInt(4986480452), - Interest: math.NewInt(708258), - Supply: math.NewInt(48483293336746), UpdatedAt: 1706011979, }) require.NoError(t, err) @@ -529,11 +517,8 @@ func TestWithdrawTo(t *testing.T) { // ARRANGE: Report Ethereum Round #139. // https://etherscan.io/tx/0x9095266d81856a28b80c4500228ab994197652fc4ad1c05cd4345d1454fccfd7 - err = k.SetRound(ctx, 139, aggregator.RoundData{ + err = k.Rounds.Set(ctx, 139, aggregator.RoundData{ Answer: math.NewInt(102847997), - Balance: math.NewInt(4986480452), - Interest: math.NewInt(708258), - Supply: math.NewInt(48483293336746), UpdatedAt: 1706011979, }) require.NoError(t, err) @@ -662,11 +647,8 @@ func TestWithdrawToAdmin(t *testing.T) { // ARRANGE: Report Ethereum Round #139. // https://etherscan.io/tx/0x9095266d81856a28b80c4500228ab994197652fc4ad1c05cd4345d1454fccfd7 - err = k.SetRound(ctx, 139, aggregator.RoundData{ + err = k.Rounds.Set(ctx, 139, aggregator.RoundData{ Answer: math.NewInt(102847997), - Balance: math.NewInt(4986480452), - Interest: math.NewInt(708258), - Supply: math.NewInt(48483293336746), UpdatedAt: 1706011979, }) require.NoError(t, err) diff --git a/keeper/query_server_aggregator.go b/keeper/query_server_aggregator.go index da56003..03ef921 100644 --- a/keeper/query_server_aggregator.go +++ b/keeper/query_server_aggregator.go @@ -8,7 +8,6 @@ package keeper import ( "context" - "fmt" "github.com/cosmos/cosmos-sdk/types/errors" "github.com/noble-assets/halo/v2/types/aggregator" @@ -24,94 +23,11 @@ func NewAggregatorQueryServer(keeper *Keeper) aggregator.QueryServer { return &aggregatorQueryServer{Keeper: keeper} } -func (k aggregatorQueryServer) Owner(ctx context.Context, req *aggregator.QueryOwner) (*aggregator.QueryOwnerResponse, error) { +func (k aggregatorQueryServer) Reporter(ctx context.Context, req *aggregator.QueryReporter) (*aggregator.QueryReporterResponse, error) { if req == nil { return nil, errors.ErrInvalidRequest } - return &aggregator.QueryOwnerResponse{ - Owner: k.GetAggregatorOwner(ctx), - }, nil -} - -func (k aggregatorQueryServer) NextPrice(ctx context.Context, req *aggregator.QueryNextPrice) (*aggregator.QueryNextPriceResponse, error) { - if req == nil { - return nil, errors.ErrInvalidRequest - } - - return &aggregator.QueryNextPriceResponse{ - NextPrice: k.GetNextPrice(ctx), - }, nil -} - -func (k aggregatorQueryServer) RoundData(ctx context.Context, req *aggregator.QueryRoundData) (*aggregator.QueryRoundDataResponse, error) { - if req == nil { - return nil, errors.ErrInvalidRequest - } - - round, found := k.Keeper.GetRound(ctx, req.RoundId) - if !found { - return nil, fmt.Errorf("unknown round %d", req.RoundId) - } - - return &aggregator.QueryRoundDataResponse{ - RoundId: req.RoundId, - Answer: round.Answer, - StartedAt: round.UpdatedAt, - UpdatedAt: round.UpdatedAt, - AnsweredInRound: req.RoundId, - }, nil -} - -func (k aggregatorQueryServer) LatestRoundData(ctx context.Context, req *aggregator.QueryLatestRoundData) (*aggregator.QueryRoundDataResponse, error) { - if req == nil { - return nil, errors.ErrInvalidRequest - } - - id := k.GetLastRoundId(ctx) - round, _ := k.GetRound(ctx, id) - - return &aggregator.QueryRoundDataResponse{ - RoundId: id, - Answer: round.Answer, - StartedAt: round.UpdatedAt, - UpdatedAt: round.UpdatedAt, - AnsweredInRound: id, - }, nil -} - -func (k aggregatorQueryServer) RoundDetails(ctx context.Context, req *aggregator.QueryRoundDetails) (*aggregator.QueryRoundDetailsResponse, error) { - if req == nil { - return nil, errors.ErrInvalidRequest - } - - round, found := k.Keeper.GetRound(ctx, req.RoundId) - if !found { - return nil, fmt.Errorf("unknown round %d", req.RoundId) - } - - return &aggregator.QueryRoundDetailsResponse{ - RoundId: req.RoundId, - Balance: round.Balance, - Interest: round.Interest, - TotalSupply: round.Supply, - UpdatedAt: round.UpdatedAt, - }, nil -} - -func (k aggregatorQueryServer) LatestRoundDetails(ctx context.Context, req *aggregator.QueryLatestRoundDetails) (*aggregator.QueryRoundDetailsResponse, error) { - if req == nil { - return nil, errors.ErrInvalidRequest - } - - id := k.GetLastRoundId(ctx) - round, _ := k.Keeper.GetRound(ctx, id) - - return &aggregator.QueryRoundDetailsResponse{ - RoundId: id, - Balance: round.Balance, - Interest: round.Interest, - TotalSupply: round.Supply, - UpdatedAt: round.UpdatedAt, - }, nil + reporter, err := k.Keeper.Reporter.Get(ctx) + return &aggregator.QueryReporterResponse{Reporter: reporter}, err } diff --git a/keeper/query_server_aggregator_test.go b/keeper/query_server_aggregator_test.go index 213d3db..a48927f 100644 --- a/keeper/query_server_aggregator_test.go +++ b/keeper/query_server_aggregator_test.go @@ -9,7 +9,6 @@ package keeper_test import ( "testing" - "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/types/errors" "github.com/noble-assets/halo/v2/keeper" "github.com/noble-assets/halo/v2/types/aggregator" @@ -18,189 +17,22 @@ import ( "github.com/stretchr/testify/require" ) -func TestAggregatorOwnerQuery(t *testing.T) { +func TestReporterQuery(t *testing.T) { k, ctx := mocks.HaloKeeper(t) server := keeper.NewAggregatorQueryServer(k) - // ACT: Attempt to query aggregator owner with invalid request. - _, err := server.Owner(ctx, nil) + // ACT: Attempt to reporter with invalid request. + _, err := server.Reporter(ctx, nil) // ASSERT: The query should've failed due to invalid request. require.ErrorContains(t, err, errors.ErrInvalidRequest.Error()) - // ARRANGE: Set aggregator owner in state. - owner := utils.TestAccount() - err = k.SetAggregatorOwner(ctx, owner.Address) - require.NoError(t, err) - - // ACT: Attempt to query aggregator owner. - res, err := server.Owner(ctx, &aggregator.QueryOwner{}) - // ASSERT: The query should've succeeded. - require.NoError(t, err) - require.Equal(t, owner.Address, res.Owner) -} - -func TestNextPriceQuery(t *testing.T) { - k, ctx := mocks.HaloKeeper(t) - server := keeper.NewAggregatorQueryServer(k) + // ARRANGE: Set reporter in state. + reporter := utils.TestAccount() + require.NoError(t, k.Reporter.Set(ctx, reporter.Address)) - // ACT: Attempt to query next price with invalid request. - _, err := server.NextPrice(ctx, nil) - // ASSERT: The query should've failed due to invalid request. - require.ErrorContains(t, err, errors.ErrInvalidRequest.Error()) - - // ACT: Attempt to query next price with no state. - res, err := server.NextPrice(ctx, &aggregator.QueryNextPrice{}) - // ASSERT: The query should've succeeded, and returned nothing. - require.NoError(t, err) - require.True(t, res.NextPrice.IsZero()) - - // ARRANGE: Set next price in state. - // https://etherscan.io/tx/0xfd21979418ce5e6686c624841f48d11ed241b387b08eb60e2bd361de5ed1a061 - expected := math.NewInt(103780600) - err = k.SetNextPrice(ctx, expected) - require.NoError(t, err) - - // ACT: Attempt to query next price with state. - res, err = server.NextPrice(ctx, &aggregator.QueryNextPrice{}) + // ACT: Attempt to query reporter. + res, err := server.Reporter(ctx, &aggregator.QueryReporter{}) // ASSERT: The query should've succeeded. require.NoError(t, err) - require.Equal(t, expected, res.NextPrice) -} - -func TestRoundDataQuery(t *testing.T) { - k, ctx := mocks.HaloKeeper(t) - server := keeper.NewAggregatorQueryServer(k) - - // ACT: Attempt to query round data with invalid request. - _, err := server.RoundData(ctx, nil) - // ASSERT: The query should've failed due to invalid request. - require.ErrorContains(t, err, errors.ErrInvalidRequest.Error()) - - // ARRANGE: Set a round in state. - // https://etherscan.io/tx/0xbcba4db502a72e51a05b378d2e5867be4c60936585cedaf5aad90002f0599428 - err = k.SetRound(ctx, 187, aggregator.RoundData{ - Answer: math.NewInt(103780685), - Balance: math.NewInt(4791541000), - Interest: math.NewInt(701123), - Supply: math.NewInt(46169872257060), - UpdatedAt: 1712071487, - }) - require.NoError(t, err) - - // ACT: Attempt to query round data of unknown round. - _, err = server.RoundData(ctx, &aggregator.QueryRoundData{RoundId: 0}) - // ASSERT: The query should've failed due to unknown round. - require.ErrorContains(t, err, "unknown round") - - // ACT: Attempt to query round data. - res, err := server.RoundData(ctx, &aggregator.QueryRoundData{RoundId: 187}) - // ASSERT: The query should've successfully returned round data. - require.NoError(t, err) - require.Equal(t, uint64(187), res.RoundId) - require.Equal(t, math.NewInt(103780685), res.Answer) - require.Equal(t, int64(1712071487), res.StartedAt) - require.Equal(t, int64(1712071487), res.UpdatedAt) - require.Equal(t, uint64(187), res.AnsweredInRound) -} - -func TestLatestRoundDataQuery(t *testing.T) { - k, ctx := mocks.HaloKeeper(t) - server := keeper.NewAggregatorQueryServer(k) - - // ACT: Attempt to query latest round data with invalid request. - _, err := server.LatestRoundData(ctx, nil) - // ASSERT: The query should've failed due to invalid request. - require.ErrorContains(t, err, errors.ErrInvalidRequest.Error()) - - // ARRANGE: Set a round in state. - // https://etherscan.io/tx/0xbcba4db502a72e51a05b378d2e5867be4c60936585cedaf5aad90002f0599428 - err = k.SetRound(ctx, 187, aggregator.RoundData{ - Answer: math.NewInt(103780685), - Balance: math.NewInt(4791541000), - Interest: math.NewInt(701123), - Supply: math.NewInt(46169872257060), - UpdatedAt: 1712071487, - }) - require.NoError(t, err) - err = k.SetLastRoundId(ctx, 187) - require.NoError(t, err) - - // ACT: Attempt to query latest round details. - res, err := server.LatestRoundData(ctx, &aggregator.QueryLatestRoundData{}) - // ASSERT: The query should've successfully returned round data. - require.NoError(t, err) - require.Equal(t, uint64(187), res.RoundId) - require.Equal(t, math.NewInt(103780685), res.Answer) - require.Equal(t, int64(1712071487), res.StartedAt) - require.Equal(t, int64(1712071487), res.UpdatedAt) - require.Equal(t, uint64(187), res.AnsweredInRound) -} - -func TestRoundDetailsQuery(t *testing.T) { - k, ctx := mocks.HaloKeeper(t) - server := keeper.NewAggregatorQueryServer(k) - - // ACT: Attempt to query round details with invalid request. - _, err := server.RoundDetails(ctx, nil) - // ASSERT: The query should've failed due to invalid request. - require.ErrorContains(t, err, errors.ErrInvalidRequest.Error()) - - // ARRANGE: Set a round in state. - // https://etherscan.io/tx/0xbcba4db502a72e51a05b378d2e5867be4c60936585cedaf5aad90002f0599428 - err = k.SetRound(ctx, 187, aggregator.RoundData{ - Answer: math.NewInt(103780685), - Balance: math.NewInt(4791541000), - Interest: math.NewInt(701123), - Supply: math.NewInt(46169872257060), - UpdatedAt: 1712071487, - }) - require.NoError(t, err) - - // ACT: Attempt to query round details of unknown round. - _, err = server.RoundDetails(ctx, &aggregator.QueryRoundDetails{RoundId: 0}) - // ASSERT: The query should've failed due to unknown round. - require.ErrorContains(t, err, "unknown round") - - // ACT: Attempt to query round details. - res, err := server.RoundDetails(ctx, &aggregator.QueryRoundDetails{RoundId: 187}) - // ASSERT: The query should've successfully returned round details. - require.NoError(t, err) - require.Equal(t, uint64(187), res.RoundId) - require.Equal(t, math.NewInt(4791541000), res.Balance) - require.Equal(t, math.NewInt(701123), res.Interest) - require.Equal(t, math.NewInt(46169872257060), res.TotalSupply) - require.Equal(t, int64(1712071487), res.UpdatedAt) -} - -func TestLatestRoundDetailsQuery(t *testing.T) { - k, ctx := mocks.HaloKeeper(t) - server := keeper.NewAggregatorQueryServer(k) - - // ACT: Attempt to query latest round details with invalid request. - _, err := server.LatestRoundDetails(ctx, nil) - // ASSERT: The query should've failed due to invalid request. - require.ErrorContains(t, err, errors.ErrInvalidRequest.Error()) - - // ARRANGE: Set a round in state. - // https://etherscan.io/tx/0xbcba4db502a72e51a05b378d2e5867be4c60936585cedaf5aad90002f0599428 - err = k.SetRound(ctx, 187, aggregator.RoundData{ - Answer: math.NewInt(103780685), - Balance: math.NewInt(4791541000), - Interest: math.NewInt(701123), - Supply: math.NewInt(46169872257060), - UpdatedAt: 1712071487, - }) - require.NoError(t, err) - err = k.SetLastRoundId(ctx, 187) - require.NoError(t, err) - - // ACT: Attempt to query latest round details. - res, err := server.LatestRoundDetails(ctx, &aggregator.QueryLatestRoundDetails{}) - // ASSERT: The query should've successfully returned round details. - require.NoError(t, err) - require.Equal(t, uint64(187), res.RoundId) - require.Equal(t, math.NewInt(4791541000), res.Balance) - require.Equal(t, math.NewInt(701123), res.Interest) - require.Equal(t, math.NewInt(46169872257060), res.TotalSupply) - require.Equal(t, int64(1712071487), res.UpdatedAt) + require.Equal(t, reporter.Address, res.Reporter) } diff --git a/keeper/state_aggregator.go b/keeper/state_aggregator.go index 7a24c84..8417a5e 100644 --- a/keeper/state_aggregator.go +++ b/keeper/state_aggregator.go @@ -9,58 +9,22 @@ package keeper import ( "context" - "cosmossdk.io/math" "github.com/noble-assets/halo/v2/types/aggregator" ) // -func (k *Keeper) GetAggregatorOwner(ctx context.Context) string { - owner, _ := k.AggregatorOwner.Get(ctx) - return owner -} - -func (k *Keeper) SetAggregatorOwner(ctx context.Context, owner string) error { - return k.AggregatorOwner.Set(ctx, owner) -} - -// - func (k *Keeper) GetLastRoundId(ctx context.Context) uint64 { id, _ := k.LastRoundId.Peek(ctx) return id } -func (k *Keeper) IncrementLastRoundId(ctx context.Context) (uint64, error) { - return k.LastRoundId.Next(ctx) -} - func (k *Keeper) SetLastRoundId(ctx context.Context, id uint64) error { return k.LastRoundId.Set(ctx, id) } // -func (k *Keeper) GetNextPrice(ctx context.Context) math.Int { - price, _ := k.NextPrice.Get(ctx) - return price -} - -func (k *Keeper) SetNextPrice(ctx context.Context, price math.Int) error { - return k.NextPrice.Set(ctx, price) -} - -// - -func (k *Keeper) GetRound(ctx context.Context, id uint64) (aggregator.RoundData, bool) { - round, err := k.Rounds.Get(ctx, id) - if err != nil { - return aggregator.RoundData{}, false - } - - return round, true -} - func (k *Keeper) GetRounds(ctx context.Context) map[uint64]aggregator.RoundData { rounds := make(map[uint64]aggregator.RoundData) @@ -71,7 +35,3 @@ func (k *Keeper) GetRounds(ctx context.Context) map[uint64]aggregator.RoundData return rounds } - -func (k *Keeper) SetRound(ctx context.Context, id uint64, round aggregator.RoundData) error { - return k.Rounds.Set(ctx, id, round) -} diff --git a/local.sh b/local.sh index 27c8c6f..6b0fd53 100644 --- a/local.sh +++ b/local.sh @@ -17,10 +17,10 @@ if ! [ -f .halo/data/priv_validator_state.json ]; then halod genesis add-genesis-account validator 1000000ustake --home .halo --keyring-backend test OWNER=$(halod keys add owner --home .halo --keyring-backend test --output json | jq .address) halod genesis add-genesis-account owner 10000000uusdc --home .halo --keyring-backend test - AGGREGATOR_OWNER=$(halod keys add aggregator-owner --home .halo --keyring-backend test --output json | jq .address) - halod genesis add-genesis-account aggregator-owner 10000000uusdc --home .halo --keyring-backend test - halod keys add aggregator-pending-owner --home .halo --keyring-backend test &> /dev/null - halod genesis add-genesis-account aggregator-pending-owner 10000000uusdc --home .halo --keyring-backend test + REPORTER=$(halod keys add reporter --home .halo --keyring-backend test --output json | jq .address) + halod genesis add-genesis-account reporter 10000000uusdc --home .halo --keyring-backend test + halod keys add pending-reporter --home .halo --keyring-backend test &> /dev/null + halod genesis add-genesis-account pending-reporter 10000000uusdc --home .halo --keyring-backend test ENTITLEMENTS_OWNER=$(halod keys add entitlements-owner --home .halo --keyring-backend test --output json | jq .address) halod genesis add-genesis-account entitlements-owner 10000000uusdc --home .halo --keyring-backend test halod keys add entitlements-pending-owner --home .halo --keyring-backend test &> /dev/null @@ -28,7 +28,7 @@ if ! [ -f .halo/data/priv_validator_state.json ]; then TEMP=.halo/genesis.json touch $TEMP && jq '.app_state.staking.params.bond_denom = "ustake"' .halo/config/genesis.json > $TEMP && mv $TEMP .halo/config/genesis.json - touch $TEMP && jq '.app_state.halo.aggregator_state.owner = '$AGGREGATOR_OWNER'' .halo/config/genesis.json > $TEMP && mv $TEMP .halo/config/genesis.json + touch $TEMP && jq '.app_state.halo.aggregator_state.reporter = '$REPORTER'' .halo/config/genesis.json > $TEMP && mv $TEMP .halo/config/genesis.json touch $TEMP && jq '.app_state.halo.entitlements_state.owner = '$ENTITLEMENTS_OWNER'' .halo/config/genesis.json > $TEMP && mv $TEMP .halo/config/genesis.json touch $TEMP && jq '.app_state.halo.owner = '$OWNER'' .halo/config/genesis.json > $TEMP && mv $TEMP .halo/config/genesis.json diff --git a/migrations.go b/migrations.go new file mode 100644 index 0000000..357e6b9 --- /dev/null +++ b/migrations.go @@ -0,0 +1,65 @@ +// Copyright 2024 NASD Inc. +// +// Use of this source code is governed by a BSL-style +// license that can be found in the LICENSE file or at +// https://mariadb.com/bsl11. + +package halo + +import ( + "cosmossdk.io/collections" + "cosmossdk.io/core/store" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/noble-assets/halo/v2/keeper" + "github.com/noble-assets/halo/v2/types/aggregator" + aggregatorv1 "github.com/noble-assets/halo/v2/types/aggregator/v1" +) + +// Migrator is a struct for handling in-place store migrations. +type Migrator struct { + keeper *keeper.Keeper + + v1Rounds collections.Map[uint64, aggregatorv1.RoundData] +} + +// NewMigrator returns a new Migrator. +func NewMigrator(keeper *keeper.Keeper, service store.KVStoreService, cdc codec.Codec) Migrator { + builder := collections.NewSchemaBuilder(service) + + migrator := Migrator{ + keeper: keeper, + + v1Rounds: collections.NewMap(builder, aggregator.RoundPrefix, "aggregator_rounds", collections.Uint64Key, codec.CollValue[aggregatorv1.RoundData](cdc)), + } + + if _, err := builder.Build(); err != nil { + panic(err) + } + + return migrator +} + +// Migrate1to2 migrates from version 1 to 2. +func (m Migrator) Migrate1to2(ctx sdk.Context) error { + rounds := make(map[uint64]aggregator.RoundData) + err := m.v1Rounds.Walk(ctx, nil, func(id uint64, round aggregatorv1.RoundData) (stop bool, err error) { + rounds[id] = aggregator.RoundData{ + Answer: round.Answer, + UpdatedAt: uint32(round.UpdatedAt), + } + + return false, nil + }) + if err != nil { + return err + } + + for id, round := range rounds { + if err = m.keeper.Rounds.Set(ctx, id, round); err != nil { + return err + } + } + + return nil +} diff --git a/module.go b/module.go index c199f00..c19cb9d 100644 --- a/module.go +++ b/module.go @@ -33,8 +33,8 @@ import ( "github.com/spf13/cobra" ) -// ConsensusVersion defines the current x/halo module consensus version. -const ConsensusVersion = 1 +// ConsensusVersion defines the current Halo module consensus version. +const ConsensusVersion = 2 var ( _ module.AppModuleBasic = AppModule{} @@ -97,13 +97,17 @@ func (b AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncoding type AppModule struct { AppModuleBasic - keeper *keeper.Keeper + keeper *keeper.Keeper + storeService store.KVStoreService + cdc codec.Codec } -func NewAppModule(keeper *keeper.Keeper, addressCodec address.Codec) AppModule { +func NewAppModule(keeper *keeper.Keeper, addressCodec address.Codec, storeService store.KVStoreService, cdc codec.Codec) AppModule { return AppModule{ AppModuleBasic: NewAppModuleBasic(addressCodec), keeper: keeper, + storeService: storeService, + cdc: cdc, } } @@ -134,6 +138,11 @@ func (m AppModule) RegisterServices(cfg module.Configurator) { entitlements.RegisterMsgServer(cfg.MsgServer(), keeper.NewEntitlementsMsgServer(m.keeper)) entitlements.RegisterQueryServer(cfg.QueryServer(), keeper.NewEntitlementsQueryServer(m.keeper)) + + migrator := NewMigrator(m.keeper, m.storeService, m.cdc) + if err := cfg.RegisterMigration(types.ModuleName, 1, migrator.Migrate1to2); err != nil { + panic(fmt.Sprintf("failed to migrate Halo from version 1 to 2: %v", err)) + } } // @@ -190,7 +199,7 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { in.BankKeeper, in.InterfaceRegistry, ) - m := NewAppModule(k, in.AddressCodec) + m := NewAppModule(k, in.AddressCodec, in.StoreService, in.Cdc) return ModuleOutputs{Keeper: k, Module: m, Restrictions: k.SendRestrictionFn} } diff --git a/proto/halo/aggregator/v1/aggregator.proto b/proto/halo/aggregator/v1/aggregator.proto index d426bef..4fe6ed9 100644 --- a/proto/halo/aggregator/v1/aggregator.proto +++ b/proto/halo/aggregator/v1/aggregator.proto @@ -6,7 +6,7 @@ import "amino/amino.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/noble-assets/halo/v2/types/aggregator"; +option go_package = "github.com/noble-assets/halo/v2/types/aggregator/v1"; message RoundData { string answer = 1 [ diff --git a/proto/halo/aggregator/v1/query.proto b/proto/halo/aggregator/v1/query.proto deleted file mode 100644 index 2d018ce..0000000 --- a/proto/halo/aggregator/v1/query.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; - -package halo.aggregator.v1; - -import "amino/amino.proto"; -import "cosmos/query/v1/query.proto"; -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; - -option go_package = "github.com/noble-assets/halo/v2/types/aggregator"; - -service Query { - rpc Owner(QueryOwner) returns (QueryOwnerResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/halo/aggregator/v1/owner"; - } - - rpc NextPrice(QueryNextPrice) returns (QueryNextPriceResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/halo/aggregator/v1/next_price"; - } - - rpc RoundData(QueryRoundData) returns (QueryRoundDataResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/halo/aggregator/v1/round_data/{round_id}"; - } - rpc LatestRoundData(QueryLatestRoundData) returns (QueryRoundDataResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/halo/aggregator/v1/round_data"; - } - - rpc RoundDetails(QueryRoundDetails) returns (QueryRoundDetailsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/halo/aggregator/v1/round_details/{round_id}"; - } - rpc LatestRoundDetails(QueryLatestRoundDetails) returns (QueryRoundDetailsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/halo/aggregator/v1/round_details"; - } -} - -// - -message QueryOwner {} - -message QueryOwnerResponse { - string owner = 1; -} - -message QueryNextPrice {} - -message QueryNextPriceResponse { - string next_price = 1 [ - (amino.dont_omitempty) = true, - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} - -message QueryRoundData { - uint64 round_id = 1; -} - -message QueryLatestRoundData {} - -message QueryRoundDataResponse { - uint64 round_id = 1; - string answer = 2 [ - (amino.dont_omitempty) = true, - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - int64 started_at = 3; - int64 updated_at = 4; - uint64 answered_in_round = 5; -} - -message QueryRoundDetails { - uint64 round_id = 1; -} - -message QueryLatestRoundDetails {} - -message QueryRoundDetailsResponse { - uint64 round_id = 1; - string balance = 2 [ - (amino.dont_omitempty) = true, - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string interest = 3 [ - (amino.dont_omitempty) = true, - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string total_supply = 4 [ - (amino.dont_omitempty) = true, - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - int64 updated_at = 5; -} diff --git a/proto/halo/aggregator/v1/genesis.proto b/proto/halo/aggregator/v2/aggregator.proto similarity index 55% rename from proto/halo/aggregator/v1/genesis.proto rename to proto/halo/aggregator/v2/aggregator.proto index 4595f17..0362ea6 100644 --- a/proto/halo/aggregator/v1/genesis.proto +++ b/proto/halo/aggregator/v2/aggregator.proto @@ -1,22 +1,19 @@ syntax = "proto3"; -package halo.aggregator.v1; +package halo.aggregator.v2; import "amino/amino.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; -import "halo/aggregator/v1/aggregator.proto"; option go_package = "github.com/noble-assets/halo/v2/types/aggregator"; -message GenesisState { - string owner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - uint64 last_round_id = 2; - string next_price = 3 [ +message RoundData { + string answer = 1 [ (amino.dont_omitempty) = true, (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; - map rounds = 4 [(gogoproto.nullable) = false]; + uint32 updated_at = 2; } diff --git a/proto/halo/aggregator/v1/events.proto b/proto/halo/aggregator/v2/events.proto similarity index 52% rename from proto/halo/aggregator/v1/events.proto rename to proto/halo/aggregator/v2/events.proto index 791e690..eb6df76 100644 --- a/proto/halo/aggregator/v1/events.proto +++ b/proto/halo/aggregator/v2/events.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package halo.aggregator.v1; +package halo.aggregator.v2; import "amino/amino.proto"; import "cosmos_proto/cosmos.proto"; @@ -8,31 +8,20 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/noble-assets/halo/v2/types/aggregator"; -message BalanceReported { - uint64 round_id = 1; - string balance = 2 [ - (amino.dont_omitempty) = true, - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string interest = 3 [ +message AnswerUpdated { + string current = 1 [ (amino.dont_omitempty) = true, (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; - string price = 4 [ - (amino.dont_omitempty) = true, - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - int64 updated_at = 5; + uint64 round_id = 2; + uint32 updated_at = 3; } message NextPriceReported { - string price = 1 [ + uint64 round_id = 1; + string next_price = 2 [ (amino.dont_omitempty) = true, (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", @@ -41,6 +30,6 @@ message NextPriceReported { } message OwnershipTransferred { - string previous_owner = 1; - string new_owner = 2; + string previous_reporter = 1; + string new_reporter = 2; } diff --git a/proto/halo/aggregator/v2/genesis.proto b/proto/halo/aggregator/v2/genesis.proto new file mode 100644 index 0000000..4be5075 --- /dev/null +++ b/proto/halo/aggregator/v2/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package halo.aggregator.v2; + +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "halo/aggregator/v2/aggregator.proto"; + +option go_package = "github.com/noble-assets/halo/v2/types/aggregator"; + +message GenesisState { + string reporter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + uint64 last_round_id = 2; + map rounds = 3 [(gogoproto.nullable) = false]; + map next_prices = 4; +} diff --git a/proto/halo/aggregator/v2/query.proto b/proto/halo/aggregator/v2/query.proto new file mode 100644 index 0000000..65bfdef --- /dev/null +++ b/proto/halo/aggregator/v2/query.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package halo.aggregator.v2; + +import "cosmos/query/v1/query.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/noble-assets/halo/v2/types/aggregator"; + +service Query { + rpc Reporter(QueryReporter) returns (QueryReporterResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = "/halo/aggregator/v2/reporter"; + option (google.api.http).additional_bindings = {get: "/halo/aggregator/v1/owner"}; + } + + // TODO: Additional queries! +} + +// + +message QueryReporter {} + +message QueryReporterResponse { + string reporter = 1; +} diff --git a/proto/halo/aggregator/v1/tx.proto b/proto/halo/aggregator/v2/tx.proto similarity index 65% rename from proto/halo/aggregator/v1/tx.proto rename to proto/halo/aggregator/v2/tx.proto index ab9bae1..cd4298d 100644 --- a/proto/halo/aggregator/v1/tx.proto +++ b/proto/halo/aggregator/v2/tx.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package halo.aggregator.v1; +package halo.aggregator.v2; import "amino/amino.proto"; import "cosmos/msg/v1/msg.proto"; @@ -12,48 +12,31 @@ option go_package = "github.com/noble-assets/halo/v2/types/aggregator"; service Msg { option (cosmos.msg.v1.service) = true; - rpc ReportBalance(MsgReportBalance) returns (MsgReportBalanceResponse); + rpc Transmit(MsgTransmit) returns (MsgTransmitResponse); rpc SetNextPrice(MsgSetNextPrice) returns (MsgSetNextPriceResponse); rpc TransferOwnership(MsgTransferOwnership) returns (MsgTransferOwnershipResponse); } -// MsgReportBalance implements the reportBalance (0x0b50ece9) method. -message MsgReportBalance { +// MsgTransmit implements the transmit (0xTODO) method. +message MsgTransmit { option (cosmos.msg.v1.signer) = "signer"; - option (amino.name) = "halo/aggregator/ReportBalance"; + option (amino.name) = "halo/aggregator/Transmit"; option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string principal = 2 [ - (amino.dont_omitempty) = true, - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string interest = 3 [ - (amino.dont_omitempty) = true, - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string total_supply = 4 [ - (amino.dont_omitempty) = true, - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string next_price = 5 [ + string answer = 2 [ (amino.dont_omitempty) = true, (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; + uint32 updated_at = 3; } -// MsgReportBalanceResponse ... -message MsgReportBalanceResponse { +// MsgTransmitResponse ... +message MsgTransmitResponse { uint64 round_id = 1; } @@ -86,7 +69,7 @@ message MsgTransferOwnership { option (gogoproto.goproto_getters) = false; string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string new_owner = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string new_reporter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgTransferOwnershipResponse ... diff --git a/proto/halo/v1/genesis.proto b/proto/halo/v1/genesis.proto index 7537cf6..fb069fc 100644 --- a/proto/halo/v1/genesis.proto +++ b/proto/halo/v1/genesis.proto @@ -4,14 +4,14 @@ package halo.v1; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; -import "halo/aggregator/v1/genesis.proto"; +import "halo/aggregator/v2/genesis.proto"; import "halo/entitlements/v1/genesis.proto"; option go_package = "github.com/noble-assets/halo/v2/types"; message GenesisState { // aggregator_state is the genesis state of the aggregator submodule. - aggregator.v1.GenesisState aggregator_state = 1 [(gogoproto.nullable) = false]; + aggregator.v2.GenesisState aggregator_state = 1 [(gogoproto.nullable) = false]; // entitlements_state is the genesis state of the entitlements submodule. entitlements.v1.GenesisState entitlements_state = 2 [(gogoproto.nullable) = false]; diff --git a/types/aggregator/aggregator.pb.go b/types/aggregator/aggregator.pb.go index cc06ca3..9c4e856 100644 --- a/types/aggregator/aggregator.pb.go +++ b/types/aggregator/aggregator.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: halo/aggregator/v1/aggregator.proto +// source: halo/aggregator/v2/aggregator.proto package aggregator @@ -28,17 +28,14 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type RoundData struct { Answer cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=answer,proto3,customtype=cosmossdk.io/math.Int" json:"answer"` - Balance cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=balance,proto3,customtype=cosmossdk.io/math.Int" json:"balance"` - Interest cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=interest,proto3,customtype=cosmossdk.io/math.Int" json:"interest"` - Supply cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=supply,proto3,customtype=cosmossdk.io/math.Int" json:"supply"` - UpdatedAt int64 `protobuf:"varint,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + UpdatedAt uint32 `protobuf:"varint,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (m *RoundData) Reset() { *m = RoundData{} } func (m *RoundData) String() string { return proto.CompactTextString(m) } func (*RoundData) ProtoMessage() {} func (*RoundData) Descriptor() ([]byte, []int) { - return fileDescriptor_dab90eca84edcf6d, []int{0} + return fileDescriptor_06dc4360e248047a, []int{0} } func (m *RoundData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -67,7 +64,7 @@ func (m *RoundData) XXX_DiscardUnknown() { var xxx_messageInfo_RoundData proto.InternalMessageInfo -func (m *RoundData) GetUpdatedAt() int64 { +func (m *RoundData) GetUpdatedAt() uint32 { if m != nil { return m.UpdatedAt } @@ -75,36 +72,32 @@ func (m *RoundData) GetUpdatedAt() int64 { } func init() { - proto.RegisterType((*RoundData)(nil), "halo.aggregator.v1.RoundData") + proto.RegisterType((*RoundData)(nil), "halo.aggregator.v2.RoundData") } func init() { - proto.RegisterFile("halo/aggregator/v1/aggregator.proto", fileDescriptor_dab90eca84edcf6d) + proto.RegisterFile("halo/aggregator/v2/aggregator.proto", fileDescriptor_06dc4360e248047a) } -var fileDescriptor_dab90eca84edcf6d = []byte{ - // 321 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xc1, 0x4e, 0xc2, 0x40, - 0x10, 0x86, 0xbb, 0xa0, 0x28, 0x7b, 0xb3, 0xd1, 0xa4, 0x92, 0x58, 0x88, 0x5e, 0x88, 0x09, 0x5d, - 0xd0, 0x27, 0x90, 0x78, 0x10, 0xe2, 0x89, 0xa3, 0x17, 0x32, 0xa5, 0x9b, 0xd2, 0xd8, 0xee, 0x34, - 0xdd, 0x29, 0x86, 0xb7, 0xf0, 0x31, 0x3c, 0x7a, 0xf0, 0x21, 0x38, 0x12, 0x4f, 0xc4, 0x03, 0x31, - 0x70, 0xf0, 0x35, 0x0c, 0x6d, 0x35, 0x9c, 0x7b, 0xd9, 0xec, 0xff, 0xef, 0xcc, 0xb7, 0x99, 0xcc, - 0xcf, 0xaf, 0xa6, 0x10, 0xa2, 0x00, 0xdf, 0x4f, 0xa4, 0x0f, 0x84, 0x89, 0x98, 0xf5, 0xf6, 0x94, - 0x13, 0x27, 0x48, 0x68, 0x9a, 0xbb, 0x22, 0x67, 0xcf, 0x9e, 0xf5, 0x1a, 0x27, 0x10, 0x05, 0x0a, - 0x45, 0x76, 0xe6, 0x65, 0x8d, 0xf3, 0x09, 0xea, 0x08, 0xf5, 0x38, 0x53, 0x22, 0x17, 0xc5, 0xd3, - 0xa9, 0x8f, 0x3e, 0xe6, 0xfe, 0xee, 0x96, 0xbb, 0x97, 0xab, 0x0a, 0xaf, 0x8f, 0x30, 0x55, 0xde, - 0x3d, 0x10, 0x98, 0x0f, 0xbc, 0x06, 0x4a, 0xbf, 0xc8, 0xc4, 0x62, 0x2d, 0xd6, 0xae, 0xf7, 0xbb, - 0x8b, 0x75, 0xd3, 0xf8, 0x5a, 0x37, 0xcf, 0x72, 0x92, 0xf6, 0x9e, 0x9d, 0x00, 0x45, 0x04, 0x34, - 0x75, 0x06, 0x8a, 0x3e, 0x3f, 0x3a, 0xbc, 0xf8, 0x62, 0xa0, 0xe8, 0xed, 0xe7, 0xfd, 0x9a, 0x8d, - 0x8a, 0x7e, 0x73, 0xc8, 0x8f, 0x5c, 0x08, 0x41, 0x4d, 0xa4, 0x55, 0x29, 0x89, 0xfa, 0x03, 0x98, - 0x8f, 0xfc, 0x38, 0x50, 0x24, 0x13, 0xa9, 0xc9, 0xaa, 0x96, 0x84, 0xfd, 0x13, 0x76, 0x33, 0xea, - 0x34, 0x8e, 0xc3, 0xb9, 0x75, 0x50, 0x76, 0xc6, 0xbc, 0xdf, 0xbc, 0xe0, 0x3c, 0x8d, 0x3d, 0x20, - 0xe9, 0x8d, 0x81, 0xac, 0xc3, 0x16, 0x6b, 0x57, 0x47, 0xf5, 0xc2, 0xb9, 0xa3, 0xfe, 0x70, 0xb1, - 0xb1, 0xd9, 0x72, 0x63, 0xb3, 0xef, 0x8d, 0xcd, 0x5e, 0xb7, 0xb6, 0xb1, 0xdc, 0xda, 0xc6, 0x6a, - 0x6b, 0x1b, 0x4f, 0x5d, 0x3f, 0xa0, 0x69, 0xea, 0x3a, 0x13, 0x8c, 0x84, 0x42, 0x37, 0x94, 0x1d, - 0xd0, 0x5a, 0x92, 0x16, 0x59, 0x12, 0x66, 0x37, 0x82, 0xe6, 0xb1, 0xd4, 0x7b, 0x21, 0x70, 0x6b, - 0xd9, 0xb6, 0x6e, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x2d, 0xff, 0xdd, 0xc6, 0x2c, 0x02, 0x00, - 0x00, +var fileDescriptor_06dc4360e248047a = []byte{ + // 270 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xce, 0x48, 0xcc, 0xc9, + 0xd7, 0x4f, 0x4c, 0x4f, 0x2f, 0x4a, 0x4d, 0x4f, 0x2c, 0xc9, 0x2f, 0xd2, 0x2f, 0x33, 0x42, 0xe2, + 0xe9, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x81, 0x14, 0xe9, 0x21, 0x09, 0x97, 0x19, 0x49, + 0x09, 0x26, 0xe6, 0x66, 0xe6, 0xe5, 0xeb, 0x83, 0x49, 0x88, 0x32, 0x29, 0xc9, 0xe4, 0xfc, 0xe2, + 0xdc, 0xfc, 0xe2, 0x78, 0x30, 0x4f, 0x1f, 0xc2, 0x81, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x43, + 0xc4, 0x41, 0x2c, 0x88, 0xa8, 0x52, 0x09, 0x17, 0x67, 0x50, 0x7e, 0x69, 0x5e, 0x8a, 0x4b, 0x62, + 0x49, 0xa2, 0x90, 0x07, 0x17, 0x5b, 0x62, 0x5e, 0x71, 0x79, 0x6a, 0x91, 0x04, 0xa3, 0x02, 0xa3, + 0x06, 0xa7, 0x93, 0xc1, 0x89, 0x7b, 0xf2, 0x0c, 0xb7, 0xee, 0xc9, 0x8b, 0x42, 0x0c, 0x2a, 0x4e, + 0xc9, 0xd6, 0xcb, 0xcc, 0xd7, 0xcf, 0x4d, 0x2c, 0xc9, 0xd0, 0xf3, 0xcc, 0x2b, 0xb9, 0xb4, 0x45, + 0x97, 0x0b, 0x6a, 0x83, 0x67, 0x5e, 0xc9, 0x8a, 0xe7, 0x1b, 0xb4, 0x18, 0x83, 0xa0, 0xfa, 0x85, + 0x64, 0xb9, 0xb8, 0x4a, 0x0b, 0x52, 0x12, 0x4b, 0x52, 0x53, 0xe2, 0x13, 0x4b, 0x24, 0x98, 0x14, + 0x18, 0x35, 0x78, 0x83, 0x38, 0xa1, 0x22, 0x8e, 0x25, 0x4e, 0x5e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, + 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, + 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x90, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, + 0xab, 0x9f, 0x97, 0x9f, 0x94, 0x93, 0xaa, 0x9b, 0x58, 0x5c, 0x9c, 0x5a, 0x52, 0xac, 0x0f, 0x0e, + 0xa4, 0x32, 0x23, 0xfd, 0x92, 0xca, 0x82, 0xd4, 0x62, 0xa4, 0xf0, 0x49, 0x62, 0x03, 0x7b, 0xc4, + 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xee, 0x1a, 0xe3, 0xa2, 0x47, 0x01, 0x00, 0x00, } func (m *RoundData) Marshal() (dAtA []byte, err error) { @@ -130,38 +123,8 @@ func (m *RoundData) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.UpdatedAt != 0 { i = encodeVarintAggregator(dAtA, i, uint64(m.UpdatedAt)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x10 } - { - size := m.Supply.Size() - i -= size - if _, err := m.Supply.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintAggregator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.Interest.Size() - i -= size - if _, err := m.Interest.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintAggregator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size := m.Balance.Size() - i -= size - if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintAggregator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 { size := m.Answer.Size() i -= size @@ -194,12 +157,6 @@ func (m *RoundData) Size() (n int) { _ = l l = m.Answer.Size() n += 1 + l + sovAggregator(uint64(l)) - l = m.Balance.Size() - n += 1 + l + sovAggregator(uint64(l)) - l = m.Interest.Size() - n += 1 + l + sovAggregator(uint64(l)) - l = m.Supply.Size() - n += 1 + l + sovAggregator(uint64(l)) if m.UpdatedAt != 0 { n += 1 + sovAggregator(uint64(m.UpdatedAt)) } @@ -276,108 +233,6 @@ func (m *RoundData) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAggregator - } - 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 ErrInvalidLengthAggregator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAggregator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interest", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAggregator - } - 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 ErrInvalidLengthAggregator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAggregator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Interest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Supply", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAggregator - } - 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 ErrInvalidLengthAggregator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAggregator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Supply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } @@ -391,7 +246,7 @@ func (m *RoundData) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.UpdatedAt |= int64(b&0x7F) << shift + m.UpdatedAt |= uint32(b&0x7F) << shift if b < 0x80 { break } diff --git a/types/aggregator/codec.go b/types/aggregator/codec.go index ea5638d..b1e26b4 100644 --- a/types/aggregator/codec.go +++ b/types/aggregator/codec.go @@ -14,13 +14,13 @@ import ( ) func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgReportBalance{}, "halo/aggregator/ReportBalance", nil) + cdc.RegisterConcrete(&MsgTransmit{}, "halo/aggregator/Transmit", nil) cdc.RegisterConcrete(&MsgSetNextPrice{}, "halo/aggregator/SetNextPrice", nil) cdc.RegisterConcrete(&MsgTransferOwnership{}, "halo/aggregator/TransferOwnership", nil) } func RegisterInterfaces(registry codectypes.InterfaceRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), &MsgReportBalance{}) + registry.RegisterImplementations((*sdk.Msg)(nil), &MsgTransmit{}) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgSetNextPrice{}) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgTransferOwnership{}) diff --git a/types/aggregator/errors.go b/types/aggregator/errors.go index 89625e4..01d20e9 100644 --- a/types/aggregator/errors.go +++ b/types/aggregator/errors.go @@ -11,9 +11,9 @@ import "cosmossdk.io/errors" var ( Codespace = "halo/aggregator" - ErrNoOwner = errors.Register(Codespace, 1, "there is no owner") - ErrInvalidOwner = errors.Register(Codespace, 2, "signer is not owner") - ErrSameOwner = errors.Register(Codespace, 3, "provided owner is the current owner") + ErrNoReporter = errors.Register(Codespace, 1, "there is no reporter") + ErrInvalidReporter = errors.Register(Codespace, 2, "signer is not reporter") + ErrSameReporter = errors.Register(Codespace, 3, "provided reporter is the current reporter") ErrAlreadyReported = errors.Register(Codespace, 4, "round already reported") ErrInvalidNextPrice = errors.Register(Codespace, 5, "next price is invalid") diff --git a/types/aggregator/events.pb.go b/types/aggregator/events.pb.go index bc1a127..bfc8b51 100644 --- a/types/aggregator/events.pb.go +++ b/types/aggregator/events.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: halo/aggregator/v1/events.proto +// source: halo/aggregator/v2/events.proto package aggregator @@ -26,26 +26,24 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type BalanceReported struct { - RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` - Balance cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=balance,proto3,customtype=cosmossdk.io/math.Int" json:"balance"` - Interest cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=interest,proto3,customtype=cosmossdk.io/math.Int" json:"interest"` - Price cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=price,proto3,customtype=cosmossdk.io/math.Int" json:"price"` - UpdatedAt int64 `protobuf:"varint,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +type AnswerUpdated struct { + Current cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=current,proto3,customtype=cosmossdk.io/math.Int" json:"current"` + RoundId uint64 `protobuf:"varint,2,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` + UpdatedAt uint32 `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } -func (m *BalanceReported) Reset() { *m = BalanceReported{} } -func (m *BalanceReported) String() string { return proto.CompactTextString(m) } -func (*BalanceReported) ProtoMessage() {} -func (*BalanceReported) Descriptor() ([]byte, []int) { - return fileDescriptor_e99cf58ab66c6cf7, []int{0} +func (m *AnswerUpdated) Reset() { *m = AnswerUpdated{} } +func (m *AnswerUpdated) String() string { return proto.CompactTextString(m) } +func (*AnswerUpdated) ProtoMessage() {} +func (*AnswerUpdated) Descriptor() ([]byte, []int) { + return fileDescriptor_2d16d10149c1b217, []int{0} } -func (m *BalanceReported) XXX_Unmarshal(b []byte) error { +func (m *AnswerUpdated) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *BalanceReported) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *AnswerUpdated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_BalanceReported.Marshal(b, m, deterministic) + return xxx_messageInfo_AnswerUpdated.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -55,26 +53,26 @@ func (m *BalanceReported) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *BalanceReported) XXX_Merge(src proto.Message) { - xxx_messageInfo_BalanceReported.Merge(m, src) +func (m *AnswerUpdated) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnswerUpdated.Merge(m, src) } -func (m *BalanceReported) XXX_Size() int { +func (m *AnswerUpdated) XXX_Size() int { return m.Size() } -func (m *BalanceReported) XXX_DiscardUnknown() { - xxx_messageInfo_BalanceReported.DiscardUnknown(m) +func (m *AnswerUpdated) XXX_DiscardUnknown() { + xxx_messageInfo_AnswerUpdated.DiscardUnknown(m) } -var xxx_messageInfo_BalanceReported proto.InternalMessageInfo +var xxx_messageInfo_AnswerUpdated proto.InternalMessageInfo -func (m *BalanceReported) GetRoundId() uint64 { +func (m *AnswerUpdated) GetRoundId() uint64 { if m != nil { return m.RoundId } return 0 } -func (m *BalanceReported) GetUpdatedAt() int64 { +func (m *AnswerUpdated) GetUpdatedAt() uint32 { if m != nil { return m.UpdatedAt } @@ -82,14 +80,15 @@ func (m *BalanceReported) GetUpdatedAt() int64 { } type NextPriceReported struct { - Price cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.Int" json:"price"` + RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` + NextPrice cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=next_price,json=nextPrice,proto3,customtype=cosmossdk.io/math.Int" json:"next_price"` } func (m *NextPriceReported) Reset() { *m = NextPriceReported{} } func (m *NextPriceReported) String() string { return proto.CompactTextString(m) } func (*NextPriceReported) ProtoMessage() {} func (*NextPriceReported) Descriptor() ([]byte, []int) { - return fileDescriptor_e99cf58ab66c6cf7, []int{1} + return fileDescriptor_2d16d10149c1b217, []int{1} } func (m *NextPriceReported) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -118,16 +117,23 @@ func (m *NextPriceReported) XXX_DiscardUnknown() { var xxx_messageInfo_NextPriceReported proto.InternalMessageInfo +func (m *NextPriceReported) GetRoundId() uint64 { + if m != nil { + return m.RoundId + } + return 0 +} + type OwnershipTransferred struct { - PreviousOwner string `protobuf:"bytes,1,opt,name=previous_owner,json=previousOwner,proto3" json:"previous_owner,omitempty"` - NewOwner string `protobuf:"bytes,2,opt,name=new_owner,json=newOwner,proto3" json:"new_owner,omitempty"` + PreviousReporter string `protobuf:"bytes,1,opt,name=previous_reporter,json=previousReporter,proto3" json:"previous_reporter,omitempty"` + NewReporter string `protobuf:"bytes,2,opt,name=new_reporter,json=newReporter,proto3" json:"new_reporter,omitempty"` } func (m *OwnershipTransferred) Reset() { *m = OwnershipTransferred{} } func (m *OwnershipTransferred) String() string { return proto.CompactTextString(m) } func (*OwnershipTransferred) ProtoMessage() {} func (*OwnershipTransferred) Descriptor() ([]byte, []int) { - return fileDescriptor_e99cf58ab66c6cf7, []int{2} + return fileDescriptor_2d16d10149c1b217, []int{2} } func (m *OwnershipTransferred) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -156,59 +162,59 @@ func (m *OwnershipTransferred) XXX_DiscardUnknown() { var xxx_messageInfo_OwnershipTransferred proto.InternalMessageInfo -func (m *OwnershipTransferred) GetPreviousOwner() string { +func (m *OwnershipTransferred) GetPreviousReporter() string { if m != nil { - return m.PreviousOwner + return m.PreviousReporter } return "" } -func (m *OwnershipTransferred) GetNewOwner() string { +func (m *OwnershipTransferred) GetNewReporter() string { if m != nil { - return m.NewOwner + return m.NewReporter } return "" } func init() { - proto.RegisterType((*BalanceReported)(nil), "halo.aggregator.v1.BalanceReported") - proto.RegisterType((*NextPriceReported)(nil), "halo.aggregator.v1.NextPriceReported") - proto.RegisterType((*OwnershipTransferred)(nil), "halo.aggregator.v1.OwnershipTransferred") -} - -func init() { proto.RegisterFile("halo/aggregator/v1/events.proto", fileDescriptor_e99cf58ab66c6cf7) } - -var fileDescriptor_e99cf58ab66c6cf7 = []byte{ - // 412 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xcf, 0x6a, 0x53, 0x41, - 0x14, 0xc6, 0x33, 0xfd, 0x63, 0x93, 0x01, 0x95, 0x0e, 0x15, 0x6e, 0x2b, 0xde, 0x84, 0x80, 0x10, - 0x84, 0xde, 0x69, 0xf5, 0x09, 0xcc, 0x42, 0x48, 0x11, 0x95, 0x8b, 0xab, 0xba, 0x08, 0x93, 0xcc, - 0xf1, 0x66, 0x30, 0x99, 0x73, 0x99, 0x39, 0xb9, 0xd1, 0xb7, 0xf0, 0x31, 0xdc, 0x08, 0x2e, 0x7c, - 0x88, 0x2e, 0x8b, 0x2b, 0x71, 0x51, 0x24, 0x59, 0xf8, 0x1a, 0x92, 0x99, 0xdb, 0xe8, 0xba, 0xdd, - 0x5c, 0xee, 0xf9, 0xce, 0xef, 0x7c, 0xdf, 0x30, 0x73, 0x78, 0x7b, 0xa2, 0xa6, 0x28, 0x55, 0x51, - 0x38, 0x28, 0x14, 0xa1, 0x93, 0xd5, 0xa9, 0x84, 0x0a, 0x2c, 0xf9, 0xac, 0x74, 0x48, 0x28, 0xc4, - 0x1a, 0xc8, 0xfe, 0x01, 0x59, 0x75, 0x7a, 0xb4, 0xaf, 0x66, 0xc6, 0xa2, 0x0c, 0xdf, 0x88, 0x1d, - 0x1d, 0x8e, 0xd1, 0xcf, 0xd0, 0x0f, 0x43, 0x25, 0x63, 0x51, 0xb7, 0x0e, 0x0a, 0x2c, 0x30, 0xea, - 0xeb, 0xbf, 0xa8, 0x76, 0xbf, 0x6e, 0xf1, 0xfb, 0x7d, 0x35, 0x55, 0x76, 0x0c, 0x39, 0x94, 0xe8, - 0x08, 0xb4, 0x38, 0xe4, 0x4d, 0x87, 0x73, 0xab, 0x87, 0x46, 0x27, 0xac, 0xc3, 0x7a, 0x3b, 0xf9, - 0x5e, 0xa8, 0x07, 0x5a, 0x9c, 0xf1, 0xbd, 0x51, 0xa4, 0x93, 0xad, 0x0e, 0xeb, 0xb5, 0xfa, 0x27, - 0x17, 0x57, 0xed, 0xc6, 0xaf, 0xab, 0xf6, 0x83, 0x98, 0xe5, 0xf5, 0x87, 0xcc, 0xa0, 0x9c, 0x29, - 0x9a, 0x64, 0x03, 0x4b, 0x3f, 0xbe, 0x1f, 0xf3, 0xfa, 0x10, 0x03, 0x4b, 0x5f, 0xfe, 0x7c, 0x7b, - 0xc2, 0xf2, 0x6b, 0x03, 0xf1, 0x92, 0x37, 0x8d, 0x25, 0x70, 0xe0, 0x29, 0xd9, 0xbe, 0xa1, 0xd9, - 0xc6, 0x41, 0xbc, 0xe0, 0xbb, 0xa5, 0x33, 0x63, 0x48, 0x76, 0x6e, 0x68, 0x15, 0xc7, 0xc5, 0x23, - 0xce, 0xe7, 0xa5, 0x56, 0x04, 0x7a, 0xa8, 0x28, 0xd9, 0xed, 0xb0, 0xde, 0x76, 0xde, 0xaa, 0x95, - 0xe7, 0xd4, 0x7d, 0xc7, 0xf7, 0x5f, 0xc1, 0x47, 0x7a, 0xb3, 0x66, 0x37, 0x17, 0xb6, 0xc9, 0x66, - 0xb7, 0xca, 0xee, 0x9e, 0xf3, 0x83, 0xd7, 0x0b, 0x0b, 0xce, 0x4f, 0x4c, 0xf9, 0xd6, 0x29, 0xeb, - 0xdf, 0x83, 0x73, 0xa0, 0xc5, 0x63, 0x7e, 0xaf, 0x74, 0x50, 0x19, 0x9c, 0xfb, 0x21, 0xae, 0x81, - 0x18, 0x94, 0xdf, 0xbd, 0x56, 0xc3, 0x94, 0x78, 0xc8, 0x5b, 0x16, 0x16, 0x35, 0x11, 0x9e, 0x27, - 0x6f, 0x5a, 0x58, 0x84, 0x66, 0xff, 0xec, 0x62, 0x99, 0xb2, 0xcb, 0x65, 0xca, 0x7e, 0x2f, 0x53, - 0xf6, 0x79, 0x95, 0x36, 0x2e, 0x57, 0x69, 0xe3, 0xe7, 0x2a, 0x6d, 0x9c, 0x9f, 0x14, 0x86, 0x26, - 0xf3, 0x51, 0x36, 0xc6, 0x99, 0xb4, 0x38, 0x9a, 0xc2, 0xb1, 0xf2, 0x1e, 0xc8, 0xcb, 0xb0, 0x93, - 0xd5, 0x53, 0x49, 0x9f, 0x4a, 0xf0, 0xff, 0x2d, 0xe7, 0xe8, 0x4e, 0xd8, 0x9d, 0x67, 0x7f, 0x03, - 0x00, 0x00, 0xff, 0xff, 0xc1, 0x28, 0x0e, 0xc9, 0xb6, 0x02, 0x00, 0x00, -} - -func (m *BalanceReported) Marshal() (dAtA []byte, err error) { + proto.RegisterType((*AnswerUpdated)(nil), "halo.aggregator.v2.AnswerUpdated") + proto.RegisterType((*NextPriceReported)(nil), "halo.aggregator.v2.NextPriceReported") + proto.RegisterType((*OwnershipTransferred)(nil), "halo.aggregator.v2.OwnershipTransferred") +} + +func init() { proto.RegisterFile("halo/aggregator/v2/events.proto", fileDescriptor_2d16d10149c1b217) } + +var fileDescriptor_2d16d10149c1b217 = []byte{ + // 402 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0xb1, 0x8e, 0xd3, 0x40, + 0x14, 0xf4, 0x02, 0xe2, 0xc8, 0xc2, 0x49, 0xc4, 0x3a, 0xa4, 0xdc, 0x49, 0x38, 0x21, 0x55, 0x04, + 0x3a, 0xef, 0x29, 0x7c, 0xc1, 0xa5, 0x4b, 0x0a, 0x82, 0x2c, 0x68, 0x68, 0xac, 0x8d, 0xfd, 0x62, + 0x5b, 0xc4, 0xbb, 0xd6, 0xdb, 0xb5, 0x1d, 0x2a, 0x7e, 0x81, 0x86, 0x7f, 0xa0, 0xa4, 0xe0, 0x23, + 0x52, 0x46, 0x54, 0x88, 0x22, 0x42, 0x49, 0xc1, 0x6f, 0x20, 0x7b, 0x6d, 0x25, 0xb4, 0xd7, 0x58, + 0x9e, 0x79, 0xb3, 0x33, 0xa3, 0xdd, 0x47, 0xfb, 0x31, 0x5f, 0x49, 0xc6, 0xa3, 0x08, 0x21, 0xe2, + 0x5a, 0x22, 0x2b, 0xc6, 0x0c, 0x0a, 0x10, 0x5a, 0xb9, 0x19, 0x4a, 0x2d, 0x6d, 0xbb, 0x12, 0xb8, + 0x47, 0x81, 0x5b, 0x8c, 0xaf, 0xba, 0x3c, 0x4d, 0x84, 0x64, 0xf5, 0xd7, 0xc8, 0xae, 0x2e, 0x03, + 0xa9, 0x52, 0xa9, 0xfc, 0x1a, 0x31, 0x03, 0x9a, 0xd1, 0x45, 0x24, 0x23, 0x69, 0xf8, 0xea, 0xcf, + 0xb0, 0xc3, 0xaf, 0x84, 0x9e, 0xdf, 0x0a, 0x55, 0x02, 0xbe, 0xcf, 0x42, 0xae, 0x21, 0xb4, 0x67, + 0xf4, 0x2c, 0xc8, 0x11, 0x41, 0xe8, 0x1e, 0x19, 0x90, 0x51, 0x67, 0x72, 0xb3, 0xd9, 0xf5, 0xad, + 0xdf, 0xbb, 0xfe, 0x33, 0x63, 0xa7, 0xc2, 0x8f, 0x6e, 0x22, 0x59, 0xca, 0x75, 0xec, 0x4e, 0x85, + 0xfe, 0xf9, 0xe3, 0x9a, 0x36, 0x39, 0x53, 0xa1, 0xbf, 0xfd, 0xfd, 0xfe, 0x92, 0x78, 0xad, 0x81, + 0x7d, 0x49, 0x1f, 0xa1, 0xcc, 0x45, 0xe8, 0x27, 0x61, 0xef, 0xde, 0x80, 0x8c, 0x1e, 0x78, 0x67, + 0x35, 0x9e, 0x86, 0xf6, 0x73, 0x4a, 0x73, 0x93, 0xe8, 0x73, 0xdd, 0xbb, 0x3f, 0x20, 0xa3, 0x73, + 0xaf, 0xd3, 0x30, 0xb7, 0x7a, 0xf8, 0x99, 0x76, 0xdf, 0xc0, 0x5a, 0xbf, 0xc5, 0x24, 0x00, 0x0f, + 0x32, 0x89, 0x55, 0xb5, 0x53, 0x3b, 0xf2, 0xbf, 0xdd, 0x9c, 0x52, 0x01, 0x6b, 0xed, 0x67, 0xd5, + 0x81, 0x3a, 0xeb, 0x2e, 0xc5, 0x3b, 0xa2, 0xcd, 0x1c, 0x2e, 0xe9, 0xc5, 0xbc, 0x14, 0x80, 0x2a, + 0x4e, 0xb2, 0x77, 0xc8, 0x85, 0x5a, 0x02, 0x22, 0x84, 0xf6, 0x2b, 0xda, 0xcd, 0x10, 0x8a, 0x44, + 0xe6, 0xca, 0x47, 0x53, 0x0c, 0xcd, 0x45, 0x79, 0x4f, 0xdb, 0x41, 0x53, 0x18, 0xed, 0x17, 0xf4, + 0x89, 0x80, 0xf2, 0xa8, 0xab, 0x7b, 0x79, 0x8f, 0x05, 0x94, 0xad, 0x64, 0x32, 0xdb, 0xec, 0x1d, + 0xb2, 0xdd, 0x3b, 0xe4, 0xcf, 0xde, 0x21, 0x5f, 0x0e, 0x8e, 0xb5, 0x3d, 0x38, 0xd6, 0xaf, 0x83, + 0x63, 0x7d, 0xb8, 0x89, 0x12, 0x1d, 0xe7, 0x0b, 0x37, 0x90, 0x29, 0x13, 0x72, 0xb1, 0x82, 0x6b, + 0xae, 0x14, 0x68, 0xc5, 0xea, 0x5d, 0x29, 0xc6, 0x4c, 0x7f, 0xca, 0x40, 0x9d, 0x2c, 0xcd, 0xe2, + 0x61, 0xfd, 0xa6, 0xaf, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xed, 0xaa, 0x4a, 0x7f, 0x4e, 0x02, + 0x00, 0x00, +} + +func (m *AnswerUpdated) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -218,12 +224,12 @@ func (m *BalanceReported) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *BalanceReported) MarshalTo(dAtA []byte) (int, error) { +func (m *AnswerUpdated) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *BalanceReported) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *AnswerUpdated) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -231,43 +237,23 @@ func (m *BalanceReported) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.UpdatedAt != 0 { i = encodeVarintEvents(dAtA, i, uint64(m.UpdatedAt)) i-- - dAtA[i] = 0x28 - } - { - size := m.Price.Size() - i -= size - if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvents(dAtA, i, uint64(size)) + dAtA[i] = 0x18 } - i-- - dAtA[i] = 0x22 - { - size := m.Interest.Size() - i -= size - if _, err := m.Interest.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintEvents(dAtA, i, uint64(size)) + if m.RoundId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.RoundId)) + i-- + dAtA[i] = 0x10 } - i-- - dAtA[i] = 0x1a { - size := m.Balance.Size() + size := m.Current.Size() i -= size - if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.Current.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintEvents(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - if m.RoundId != 0 { - i = encodeVarintEvents(dAtA, i, uint64(m.RoundId)) - i-- - dAtA[i] = 0x8 - } + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -292,15 +278,20 @@ func (m *NextPriceReported) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l { - size := m.Price.Size() + size := m.NextPrice.Size() i -= size - if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.NextPrice.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintEvents(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + if m.RoundId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.RoundId)) + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } @@ -324,17 +315,17 @@ func (m *OwnershipTransferred) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.NewOwner) > 0 { - i -= len(m.NewOwner) - copy(dAtA[i:], m.NewOwner) - i = encodeVarintEvents(dAtA, i, uint64(len(m.NewOwner))) + if len(m.NewReporter) > 0 { + i -= len(m.NewReporter) + copy(dAtA[i:], m.NewReporter) + i = encodeVarintEvents(dAtA, i, uint64(len(m.NewReporter))) i-- dAtA[i] = 0x12 } - if len(m.PreviousOwner) > 0 { - i -= len(m.PreviousOwner) - copy(dAtA[i:], m.PreviousOwner) - i = encodeVarintEvents(dAtA, i, uint64(len(m.PreviousOwner))) + if len(m.PreviousReporter) > 0 { + i -= len(m.PreviousReporter) + copy(dAtA[i:], m.PreviousReporter) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PreviousReporter))) i-- dAtA[i] = 0xa } @@ -352,21 +343,17 @@ func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *BalanceReported) Size() (n int) { +func (m *AnswerUpdated) Size() (n int) { if m == nil { return 0 } var l int _ = l + l = m.Current.Size() + n += 1 + l + sovEvents(uint64(l)) if m.RoundId != 0 { n += 1 + sovEvents(uint64(m.RoundId)) } - l = m.Balance.Size() - n += 1 + l + sovEvents(uint64(l)) - l = m.Interest.Size() - n += 1 + l + sovEvents(uint64(l)) - l = m.Price.Size() - n += 1 + l + sovEvents(uint64(l)) if m.UpdatedAt != 0 { n += 1 + sovEvents(uint64(m.UpdatedAt)) } @@ -379,7 +366,10 @@ func (m *NextPriceReported) Size() (n int) { } var l int _ = l - l = m.Price.Size() + if m.RoundId != 0 { + n += 1 + sovEvents(uint64(m.RoundId)) + } + l = m.NextPrice.Size() n += 1 + l + sovEvents(uint64(l)) return n } @@ -390,11 +380,11 @@ func (m *OwnershipTransferred) Size() (n int) { } var l int _ = l - l = len(m.PreviousOwner) + l = len(m.PreviousReporter) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - l = len(m.NewOwner) + l = len(m.NewReporter) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } @@ -407,7 +397,7 @@ func sovEvents(x uint64) (n int) { func sozEvents(x uint64) (n int) { return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *BalanceReported) Unmarshal(dAtA []byte) error { +func (m *AnswerUpdated) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -430,68 +420,15 @@ func (m *BalanceReported) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BalanceReported: wiretype end group for non-group") + return fmt.Errorf("proto: AnswerUpdated: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BalanceReported: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AnswerUpdated: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) - } - m.RoundId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RoundId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interest", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Current", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -519,15 +456,15 @@ func (m *BalanceReported) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Interest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Current.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) } - var stringLen uint64 + m.RoundId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents @@ -537,27 +474,12 @@ func (m *BalanceReported) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.RoundId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: + case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } @@ -571,7 +493,7 @@ func (m *BalanceReported) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.UpdatedAt |= int64(b&0x7F) << shift + m.UpdatedAt |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -627,8 +549,27 @@ func (m *NextPriceReported) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) + } + m.RoundId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RoundId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NextPrice", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -656,7 +597,7 @@ func (m *NextPriceReported) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.NextPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -712,7 +653,7 @@ func (m *OwnershipTransferred) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousOwner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PreviousReporter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -740,11 +681,11 @@ func (m *OwnershipTransferred) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PreviousOwner = string(dAtA[iNdEx:postIndex]) + m.PreviousReporter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewOwner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NewReporter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -772,7 +713,7 @@ func (m *OwnershipTransferred) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NewOwner = string(dAtA[iNdEx:postIndex]) + m.NewReporter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/types/aggregator/genesis.go b/types/aggregator/genesis.go index e4c3878..a0c82d2 100644 --- a/types/aggregator/genesis.go +++ b/types/aggregator/genesis.go @@ -17,9 +17,9 @@ func DefaultGenesisState() GenesisState { } func (gs *GenesisState) Validate(cdc address.Codec) error { - if gs.Owner != "" { - if _, err := cdc.StringToBytes(gs.Owner); err != nil { - return fmt.Errorf("invalid aggregator owner address (%s): %s", gs.Owner, err) + if gs.Reporter != "" { + if _, err := cdc.StringToBytes(gs.Reporter); err != nil { + return fmt.Errorf("invalid reporter address (%s): %s", gs.Reporter, err) } } diff --git a/types/aggregator/genesis.pb.go b/types/aggregator/genesis.pb.go index aec255d..68c46ed 100644 --- a/types/aggregator/genesis.pb.go +++ b/types/aggregator/genesis.pb.go @@ -1,13 +1,11 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: halo/aggregator/v1/genesis.proto +// source: halo/aggregator/v2/genesis.proto package aggregator import ( - cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -27,17 +25,17 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type GenesisState struct { - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - LastRoundId uint64 `protobuf:"varint,2,opt,name=last_round_id,json=lastRoundId,proto3" json:"last_round_id,omitempty"` - NextPrice cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=next_price,json=nextPrice,proto3,customtype=cosmossdk.io/math.Int" json:"next_price"` - Rounds map[uint64]RoundData `protobuf:"bytes,4,rep,name=rounds,proto3" json:"rounds" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Reporter string `protobuf:"bytes,1,opt,name=reporter,proto3" json:"reporter,omitempty"` + LastRoundId uint64 `protobuf:"varint,2,opt,name=last_round_id,json=lastRoundId,proto3" json:"last_round_id,omitempty"` + Rounds map[uint64]RoundData `protobuf:"bytes,3,rep,name=rounds,proto3" json:"rounds" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NextPrices map[uint64]string `protobuf:"bytes,4,rep,name=next_prices,json=nextPrices,proto3" json:"next_prices,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_3882f0774280089a, []int{0} + return fileDescriptor_a33eee5332a28301, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -66,9 +64,9 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetOwner() string { +func (m *GenesisState) GetReporter() string { if m != nil { - return m.Owner + return m.Reporter } return "" } @@ -87,41 +85,48 @@ func (m *GenesisState) GetRounds() map[uint64]RoundData { return nil } +func (m *GenesisState) GetNextPrices() map[uint64]string { + if m != nil { + return m.NextPrices + } + return nil +} + func init() { - proto.RegisterType((*GenesisState)(nil), "halo.aggregator.v1.GenesisState") - proto.RegisterMapType((map[uint64]RoundData)(nil), "halo.aggregator.v1.GenesisState.RoundsEntry") + proto.RegisterType((*GenesisState)(nil), "halo.aggregator.v2.GenesisState") + proto.RegisterMapType((map[uint64]string)(nil), "halo.aggregator.v2.GenesisState.NextPricesEntry") + proto.RegisterMapType((map[uint64]RoundData)(nil), "halo.aggregator.v2.GenesisState.RoundsEntry") } -func init() { proto.RegisterFile("halo/aggregator/v1/genesis.proto", fileDescriptor_3882f0774280089a) } +func init() { proto.RegisterFile("halo/aggregator/v2/genesis.proto", fileDescriptor_a33eee5332a28301) } -var fileDescriptor_3882f0774280089a = []byte{ - // 413 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x41, 0x8b, 0xd3, 0x40, - 0x14, 0xc7, 0x33, 0x6d, 0x76, 0x61, 0x27, 0x0a, 0x3a, 0xac, 0x10, 0x0b, 0x66, 0xc3, 0x7a, 0x29, - 0x62, 0x67, 0x76, 0xbb, 0x17, 0xf1, 0x66, 0x51, 0xa4, 0x7b, 0x51, 0xb2, 0x17, 0xf1, 0x12, 0xa6, - 0xcd, 0x30, 0x0d, 0x9b, 0xcc, 0x94, 0x99, 0x69, 0xb4, 0xdf, 0xc2, 0x8f, 0xe1, 0xd1, 0xc3, 0x7e, - 0x88, 0x1e, 0x4b, 0x4f, 0xea, 0xa1, 0x48, 0x7b, 0xf0, 0x6b, 0xc8, 0x4c, 0x02, 0x06, 0xb6, 0x97, - 0x30, 0xef, 0xff, 0xfe, 0xfc, 0x7f, 0xef, 0xe5, 0xc1, 0x78, 0x46, 0x0b, 0x49, 0x28, 0xe7, 0x8a, - 0x71, 0x6a, 0xa4, 0x22, 0xd5, 0x25, 0xe1, 0x4c, 0x30, 0x9d, 0x6b, 0x3c, 0x57, 0xd2, 0x48, 0x84, - 0xac, 0x03, 0xff, 0x77, 0xe0, 0xea, 0xb2, 0xf7, 0x98, 0x96, 0xb9, 0x90, 0xc4, 0x7d, 0x6b, 0x5b, - 0xef, 0xe9, 0x54, 0xea, 0x52, 0xea, 0xd4, 0x55, 0xa4, 0x2e, 0x9a, 0xd6, 0x29, 0x97, 0x5c, 0xd6, - 0xba, 0x7d, 0x35, 0xea, 0xf3, 0x03, 0xe4, 0x16, 0xc5, 0x99, 0xce, 0x7f, 0x75, 0xe0, 0x83, 0xf7, - 0xf5, 0x38, 0x37, 0x86, 0x1a, 0x86, 0x30, 0x3c, 0x92, 0x5f, 0x04, 0x53, 0x21, 0x88, 0x41, 0xff, - 0x64, 0x14, 0x6e, 0xee, 0x06, 0xa7, 0x0d, 0xec, 0x4d, 0x96, 0x29, 0xa6, 0xf5, 0x8d, 0x51, 0xb9, - 0xe0, 0x49, 0x6d, 0x43, 0xe7, 0xf0, 0x61, 0x41, 0xb5, 0x49, 0x95, 0x5c, 0x88, 0x2c, 0xcd, 0xb3, - 0xb0, 0x13, 0x83, 0xbe, 0x9f, 0x04, 0x56, 0x4c, 0xac, 0x36, 0xce, 0xd0, 0x07, 0x08, 0x05, 0xfb, - 0x6a, 0xd2, 0xb9, 0xca, 0xa7, 0x2c, 0xec, 0xba, 0xe0, 0x8b, 0xd5, 0xf6, 0xcc, 0xfb, 0xbd, 0x3d, - 0x7b, 0x52, 0x87, 0xeb, 0xec, 0x16, 0xe7, 0x92, 0x94, 0xd4, 0xcc, 0xf0, 0x58, 0x98, 0xcd, 0xdd, - 0x00, 0x36, 0xd4, 0xb1, 0x30, 0xdf, 0xff, 0xfe, 0x78, 0x01, 0x92, 0x13, 0x9b, 0xf1, 0xd1, 0x46, - 0xa0, 0x6b, 0x78, 0xec, 0x78, 0x3a, 0xf4, 0xe3, 0x6e, 0x3f, 0x18, 0xbe, 0xc4, 0xf7, 0xff, 0x21, - 0x6e, 0xaf, 0x85, 0xdd, 0x28, 0xfa, 0x9d, 0x30, 0x6a, 0x39, 0xf2, 0x2d, 0x3a, 0x69, 0x12, 0x7a, - 0x9f, 0x60, 0xd0, 0x6a, 0xa2, 0x47, 0xb0, 0x7b, 0xcb, 0x96, 0x6e, 0x7b, 0x3f, 0xb1, 0x4f, 0x74, - 0x05, 0x8f, 0x2a, 0x5a, 0x2c, 0x98, 0xdb, 0x2c, 0x18, 0x3e, 0x3b, 0xc4, 0x72, 0x09, 0x6f, 0xa9, - 0xa1, 0x49, 0xed, 0x7d, 0xdd, 0x79, 0x05, 0x46, 0xd7, 0xab, 0x5d, 0x04, 0xd6, 0xbb, 0x08, 0xfc, - 0xd9, 0x45, 0xe0, 0xdb, 0x3e, 0xf2, 0xd6, 0xfb, 0xc8, 0xfb, 0xb9, 0x8f, 0xbc, 0xcf, 0x17, 0x3c, - 0x37, 0xb3, 0xc5, 0x04, 0x4f, 0x65, 0x49, 0x84, 0x9c, 0x14, 0x6c, 0x40, 0xb5, 0x66, 0x46, 0x13, - 0x77, 0xb2, 0x6a, 0x48, 0xcc, 0x72, 0xce, 0x74, 0xeb, 0x5a, 0x93, 0x63, 0x77, 0xae, 0xab, 0x7f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x85, 0x70, 0x46, 0x81, 0x4f, 0x02, 0x00, 0x00, +var fileDescriptor_a33eee5332a28301 = []byte{ + // 396 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x41, 0x6a, 0xe3, 0x30, + 0x14, 0x86, 0xed, 0xd8, 0x13, 0x26, 0xf2, 0x0c, 0x33, 0x88, 0x2c, 0x3c, 0x86, 0xf1, 0x98, 0xcc, + 0x26, 0x8b, 0x89, 0x1d, 0x9c, 0x59, 0x94, 0x42, 0x17, 0x0d, 0x2d, 0xa5, 0x59, 0x94, 0xd6, 0xd9, + 0x94, 0x6e, 0x8c, 0x12, 0x0b, 0xc5, 0xd4, 0xb1, 0x8c, 0xa4, 0x98, 0xe4, 0x16, 0x3d, 0x42, 0x0f, + 0xd1, 0x43, 0x64, 0x19, 0xba, 0xea, 0xaa, 0x94, 0xe4, 0x22, 0xc5, 0x72, 0x48, 0x4d, 0x1b, 0xe8, + 0xee, 0xe9, 0xd7, 0xff, 0xbe, 0x5f, 0x4f, 0x0f, 0x38, 0x13, 0x94, 0x50, 0x0f, 0x11, 0xc2, 0x30, + 0x41, 0x82, 0x32, 0x2f, 0xf7, 0x3d, 0x82, 0x53, 0xcc, 0x63, 0xee, 0x66, 0x8c, 0x0a, 0x0a, 0x61, + 0xe1, 0x70, 0xdf, 0x1c, 0x6e, 0xee, 0x5b, 0xbf, 0xc6, 0x94, 0x4f, 0x29, 0x0f, 0xa5, 0xc3, 0x2b, + 0x0f, 0xa5, 0xdd, 0x6a, 0x12, 0x4a, 0x68, 0xa9, 0x17, 0xd5, 0x56, 0xfd, 0xbb, 0x27, 0xa6, 0x82, + 0x94, 0xa6, 0xd6, 0xbd, 0x06, 0xbe, 0x9d, 0x95, 0xd9, 0x43, 0x81, 0x04, 0x86, 0xff, 0xc1, 0x57, + 0x86, 0x33, 0xca, 0x04, 0x66, 0xa6, 0xea, 0xa8, 0xed, 0x46, 0xdf, 0x7c, 0x7c, 0xe8, 0x34, 0xb7, + 0x79, 0xc7, 0x51, 0xc4, 0x30, 0xe7, 0x43, 0xc1, 0xe2, 0x94, 0x04, 0x3b, 0x27, 0x6c, 0x81, 0xef, + 0x09, 0xe2, 0x22, 0x64, 0x74, 0x96, 0x46, 0x61, 0x1c, 0x99, 0x35, 0x47, 0x6d, 0xeb, 0x81, 0x51, + 0x88, 0x41, 0xa1, 0x9d, 0x47, 0x70, 0x00, 0xea, 0xf2, 0x9a, 0x9b, 0x9a, 0xa3, 0xb5, 0x0d, 0xff, + 0x9f, 0xfb, 0x71, 0x4a, 0xb7, 0xfa, 0x16, 0x57, 0x76, 0xf2, 0xd3, 0x54, 0xb0, 0x45, 0x5f, 0x5f, + 0x3e, 0xff, 0x51, 0x82, 0x2d, 0x01, 0x5e, 0x01, 0x23, 0xc5, 0x73, 0x11, 0x66, 0x2c, 0x1e, 0x63, + 0x6e, 0xea, 0x12, 0xd8, 0xfd, 0x14, 0x78, 0x81, 0xe7, 0xe2, 0x52, 0xb6, 0x48, 0x68, 0x00, 0xd2, + 0x9d, 0x60, 0x5d, 0x03, 0xa3, 0x92, 0x07, 0x7f, 0x02, 0xed, 0x16, 0x2f, 0xe4, 0x17, 0xe8, 0x41, + 0x51, 0xc2, 0x1e, 0xf8, 0x92, 0xa3, 0x64, 0x86, 0xe5, 0x6c, 0x86, 0xff, 0x7b, 0x5f, 0x9a, 0x24, + 0x9c, 0x20, 0x81, 0x82, 0xd2, 0x7b, 0x58, 0x3b, 0x50, 0xad, 0x23, 0xf0, 0xe3, 0x5d, 0xf0, 0x1e, + 0x7a, 0xb3, 0x4a, 0x6f, 0x54, 0xda, 0xfb, 0x83, 0xe5, 0xda, 0x56, 0x57, 0x6b, 0x5b, 0x7d, 0x59, + 0xdb, 0xea, 0xdd, 0xc6, 0x56, 0x56, 0x1b, 0x5b, 0x79, 0xda, 0xd8, 0xca, 0x4d, 0x97, 0xc4, 0x62, + 0x32, 0x1b, 0xb9, 0x63, 0x3a, 0xf5, 0x52, 0x3a, 0x4a, 0x70, 0x07, 0x71, 0x8e, 0x05, 0xf7, 0xe4, + 0xe6, 0x73, 0xdf, 0x13, 0x8b, 0x0c, 0xf3, 0xca, 0xd2, 0x47, 0x75, 0xb9, 0xf5, 0xde, 0x6b, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xd8, 0x68, 0x7b, 0x2a, 0x83, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -144,6 +149,23 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.NextPrices) > 0 { + for k := range m.NextPrices { + v := m.NextPrices[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenesis(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i = encodeVarintGenesis(dAtA, i, uint64(k)) + i-- + dAtA[i] = 0x8 + i = encodeVarintGenesis(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x22 + } + } if len(m.Rounds) > 0 { for k := range m.Rounds { v := m.Rounds[k] @@ -163,28 +185,18 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x8 i = encodeVarintGenesis(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } } - { - size := m.NextPrice.Size() - i -= size - if _, err := m.NextPrice.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a if m.LastRoundId != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.LastRoundId)) i-- dAtA[i] = 0x10 } - if len(m.Owner) > 0 { - i -= len(m.Owner) - copy(dAtA[i:], m.Owner) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Owner))) + if len(m.Reporter) > 0 { + i -= len(m.Reporter) + copy(dAtA[i:], m.Reporter) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Reporter))) i-- dAtA[i] = 0xa } @@ -208,15 +220,13 @@ func (m *GenesisState) Size() (n int) { } var l int _ = l - l = len(m.Owner) + l = len(m.Reporter) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } if m.LastRoundId != 0 { n += 1 + sovGenesis(uint64(m.LastRoundId)) } - l = m.NextPrice.Size() - n += 1 + l + sovGenesis(uint64(l)) if len(m.Rounds) > 0 { for k, v := range m.Rounds { _ = k @@ -226,6 +236,14 @@ func (m *GenesisState) Size() (n int) { n += mapEntrySize + 1 + sovGenesis(uint64(mapEntrySize)) } } + if len(m.NextPrices) > 0 { + for k, v := range m.NextPrices { + _ = k + _ = v + mapEntrySize := 1 + sovGenesis(uint64(k)) + 1 + len(v) + sovGenesis(uint64(len(v))) + n += mapEntrySize + 1 + sovGenesis(uint64(mapEntrySize)) + } + } return n } @@ -266,7 +284,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Reporter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -294,7 +312,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Owner = string(dAtA[iNdEx:postIndex]) + m.Reporter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { @@ -317,9 +335,9 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPrice", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Rounds", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -329,29 +347,110 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.NextPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if m.Rounds == nil { + m.Rounds = make(map[uint64]RoundData) } + var mapkey uint64 + mapvalue := &RoundData{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenesis + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthGenesis + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &RoundData{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Rounds[mapkey] = *mapvalue iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rounds", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NextPrices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -378,11 +477,11 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Rounds == nil { - m.Rounds = make(map[uint64]RoundData) + if m.NextPrices == nil { + m.NextPrices = make(map[uint64]string) } var mapkey uint64 - mapvalue := &RoundData{} + var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -417,7 +516,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } } } else if fieldNum == 2 { - var mapmsglen int + var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -427,26 +526,24 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapmsglen |= int(b&0x7F) << shift + stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if mapmsglen < 0 { + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { return ErrInvalidLengthGenesis } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { return ErrInvalidLengthGenesis } - if postmsgIndex > l { + if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } - mapvalue = &RoundData{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipGenesis(dAtA[iNdEx:]) @@ -462,7 +559,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Rounds[mapkey] = *mapvalue + m.NextPrices[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex diff --git a/types/aggregator/keys.go b/types/aggregator/keys.go index b9c3d70..127b386 100644 --- a/types/aggregator/keys.go +++ b/types/aggregator/keys.go @@ -7,8 +7,8 @@ package aggregator var ( - OwnerKey = []byte("aggregator/owner") - LastRoundIDKey = []byte("aggregator/last_round_id") - NextPriceKey = []byte("aggregator/next_price") - RoundPrefix = []byte("aggregator/round/") + ReporterKey = []byte("aggregator/reporter") + LastRoundIDKey = []byte("aggregator/last_round_id") + NextPricePrefix = []byte("aggregator/next_price/") + RoundPrefix = []byte("aggregator/round/") ) diff --git a/types/aggregator/query.pb.go b/types/aggregator/query.pb.go index 881f333..e31abc3 100644 --- a/types/aggregator/query.pb.go +++ b/types/aggregator/query.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: halo/aggregator/v1/query.proto +// source: halo/aggregator/v2/query.proto package aggregator import ( context "context" - cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -33,21 +29,21 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type QueryOwner struct { +type QueryReporter struct { } -func (m *QueryOwner) Reset() { *m = QueryOwner{} } -func (m *QueryOwner) String() string { return proto.CompactTextString(m) } -func (*QueryOwner) ProtoMessage() {} -func (*QueryOwner) Descriptor() ([]byte, []int) { - return fileDescriptor_97f98e48b118c150, []int{0} +func (m *QueryReporter) Reset() { *m = QueryReporter{} } +func (m *QueryReporter) String() string { return proto.CompactTextString(m) } +func (*QueryReporter) ProtoMessage() {} +func (*QueryReporter) Descriptor() ([]byte, []int) { + return fileDescriptor_916e86725120406f, []int{0} } -func (m *QueryOwner) XXX_Unmarshal(b []byte) error { +func (m *QueryReporter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryOwner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryReporter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryOwner.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryReporter.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -57,34 +53,34 @@ func (m *QueryOwner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *QueryOwner) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryOwner.Merge(m, src) +func (m *QueryReporter) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryReporter.Merge(m, src) } -func (m *QueryOwner) XXX_Size() int { +func (m *QueryReporter) XXX_Size() int { return m.Size() } -func (m *QueryOwner) XXX_DiscardUnknown() { - xxx_messageInfo_QueryOwner.DiscardUnknown(m) +func (m *QueryReporter) XXX_DiscardUnknown() { + xxx_messageInfo_QueryReporter.DiscardUnknown(m) } -var xxx_messageInfo_QueryOwner proto.InternalMessageInfo +var xxx_messageInfo_QueryReporter proto.InternalMessageInfo -type QueryOwnerResponse struct { - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` +type QueryReporterResponse struct { + Reporter string `protobuf:"bytes,1,opt,name=reporter,proto3" json:"reporter,omitempty"` } -func (m *QueryOwnerResponse) Reset() { *m = QueryOwnerResponse{} } -func (m *QueryOwnerResponse) String() string { return proto.CompactTextString(m) } -func (*QueryOwnerResponse) ProtoMessage() {} -func (*QueryOwnerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_97f98e48b118c150, []int{1} +func (m *QueryReporterResponse) Reset() { *m = QueryReporterResponse{} } +func (m *QueryReporterResponse) String() string { return proto.CompactTextString(m) } +func (*QueryReporterResponse) ProtoMessage() {} +func (*QueryReporterResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_916e86725120406f, []int{1} } -func (m *QueryOwnerResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryReporterResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryReporterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryOwnerResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryReporterResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -94,445 +90,52 @@ func (m *QueryOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueryOwnerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryOwnerResponse.Merge(m, src) +func (m *QueryReporterResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryReporterResponse.Merge(m, src) } -func (m *QueryOwnerResponse) XXX_Size() int { +func (m *QueryReporterResponse) XXX_Size() int { return m.Size() } -func (m *QueryOwnerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryOwnerResponse.DiscardUnknown(m) +func (m *QueryReporterResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryReporterResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryOwnerResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryReporterResponse proto.InternalMessageInfo -func (m *QueryOwnerResponse) GetOwner() string { +func (m *QueryReporterResponse) GetReporter() string { if m != nil { - return m.Owner + return m.Reporter } return "" } -type QueryNextPrice struct { -} - -func (m *QueryNextPrice) Reset() { *m = QueryNextPrice{} } -func (m *QueryNextPrice) String() string { return proto.CompactTextString(m) } -func (*QueryNextPrice) ProtoMessage() {} -func (*QueryNextPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_97f98e48b118c150, []int{2} -} -func (m *QueryNextPrice) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryNextPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryNextPrice.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 *QueryNextPrice) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryNextPrice.Merge(m, src) -} -func (m *QueryNextPrice) XXX_Size() int { - return m.Size() -} -func (m *QueryNextPrice) XXX_DiscardUnknown() { - xxx_messageInfo_QueryNextPrice.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryNextPrice proto.InternalMessageInfo - -type QueryNextPriceResponse struct { - NextPrice cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=next_price,json=nextPrice,proto3,customtype=cosmossdk.io/math.Int" json:"next_price"` -} - -func (m *QueryNextPriceResponse) Reset() { *m = QueryNextPriceResponse{} } -func (m *QueryNextPriceResponse) String() string { return proto.CompactTextString(m) } -func (*QueryNextPriceResponse) ProtoMessage() {} -func (*QueryNextPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_97f98e48b118c150, []int{3} -} -func (m *QueryNextPriceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryNextPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryNextPriceResponse.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 *QueryNextPriceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryNextPriceResponse.Merge(m, src) -} -func (m *QueryNextPriceResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryNextPriceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryNextPriceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryNextPriceResponse proto.InternalMessageInfo - -type QueryRoundData struct { - RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` -} - -func (m *QueryRoundData) Reset() { *m = QueryRoundData{} } -func (m *QueryRoundData) String() string { return proto.CompactTextString(m) } -func (*QueryRoundData) ProtoMessage() {} -func (*QueryRoundData) Descriptor() ([]byte, []int) { - return fileDescriptor_97f98e48b118c150, []int{4} -} -func (m *QueryRoundData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryRoundData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRoundData.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 *QueryRoundData) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRoundData.Merge(m, src) -} -func (m *QueryRoundData) XXX_Size() int { - return m.Size() -} -func (m *QueryRoundData) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRoundData.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRoundData proto.InternalMessageInfo - -func (m *QueryRoundData) GetRoundId() uint64 { - if m != nil { - return m.RoundId - } - return 0 -} - -type QueryLatestRoundData struct { -} - -func (m *QueryLatestRoundData) Reset() { *m = QueryLatestRoundData{} } -func (m *QueryLatestRoundData) String() string { return proto.CompactTextString(m) } -func (*QueryLatestRoundData) ProtoMessage() {} -func (*QueryLatestRoundData) Descriptor() ([]byte, []int) { - return fileDescriptor_97f98e48b118c150, []int{5} -} -func (m *QueryLatestRoundData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryLatestRoundData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryLatestRoundData.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 *QueryLatestRoundData) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLatestRoundData.Merge(m, src) -} -func (m *QueryLatestRoundData) XXX_Size() int { - return m.Size() -} -func (m *QueryLatestRoundData) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLatestRoundData.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryLatestRoundData proto.InternalMessageInfo - -type QueryRoundDataResponse struct { - RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` - Answer cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=answer,proto3,customtype=cosmossdk.io/math.Int" json:"answer"` - StartedAt int64 `protobuf:"varint,3,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` - UpdatedAt int64 `protobuf:"varint,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - AnsweredInRound uint64 `protobuf:"varint,5,opt,name=answered_in_round,json=answeredInRound,proto3" json:"answered_in_round,omitempty"` -} - -func (m *QueryRoundDataResponse) Reset() { *m = QueryRoundDataResponse{} } -func (m *QueryRoundDataResponse) String() string { return proto.CompactTextString(m) } -func (*QueryRoundDataResponse) ProtoMessage() {} -func (*QueryRoundDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_97f98e48b118c150, []int{6} -} -func (m *QueryRoundDataResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryRoundDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRoundDataResponse.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 *QueryRoundDataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRoundDataResponse.Merge(m, src) -} -func (m *QueryRoundDataResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryRoundDataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRoundDataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRoundDataResponse proto.InternalMessageInfo - -func (m *QueryRoundDataResponse) GetRoundId() uint64 { - if m != nil { - return m.RoundId - } - return 0 -} - -func (m *QueryRoundDataResponse) GetStartedAt() int64 { - if m != nil { - return m.StartedAt - } - return 0 -} - -func (m *QueryRoundDataResponse) GetUpdatedAt() int64 { - if m != nil { - return m.UpdatedAt - } - return 0 -} - -func (m *QueryRoundDataResponse) GetAnsweredInRound() uint64 { - if m != nil { - return m.AnsweredInRound - } - return 0 -} - -type QueryRoundDetails struct { - RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` -} - -func (m *QueryRoundDetails) Reset() { *m = QueryRoundDetails{} } -func (m *QueryRoundDetails) String() string { return proto.CompactTextString(m) } -func (*QueryRoundDetails) ProtoMessage() {} -func (*QueryRoundDetails) Descriptor() ([]byte, []int) { - return fileDescriptor_97f98e48b118c150, []int{7} -} -func (m *QueryRoundDetails) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryRoundDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRoundDetails.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 *QueryRoundDetails) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRoundDetails.Merge(m, src) -} -func (m *QueryRoundDetails) XXX_Size() int { - return m.Size() -} -func (m *QueryRoundDetails) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRoundDetails.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRoundDetails proto.InternalMessageInfo - -func (m *QueryRoundDetails) GetRoundId() uint64 { - if m != nil { - return m.RoundId - } - return 0 -} - -type QueryLatestRoundDetails struct { -} - -func (m *QueryLatestRoundDetails) Reset() { *m = QueryLatestRoundDetails{} } -func (m *QueryLatestRoundDetails) String() string { return proto.CompactTextString(m) } -func (*QueryLatestRoundDetails) ProtoMessage() {} -func (*QueryLatestRoundDetails) Descriptor() ([]byte, []int) { - return fileDescriptor_97f98e48b118c150, []int{8} -} -func (m *QueryLatestRoundDetails) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryLatestRoundDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryLatestRoundDetails.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 *QueryLatestRoundDetails) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLatestRoundDetails.Merge(m, src) -} -func (m *QueryLatestRoundDetails) XXX_Size() int { - return m.Size() -} -func (m *QueryLatestRoundDetails) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLatestRoundDetails.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryLatestRoundDetails proto.InternalMessageInfo - -type QueryRoundDetailsResponse struct { - RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` - Balance cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=balance,proto3,customtype=cosmossdk.io/math.Int" json:"balance"` - Interest cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=interest,proto3,customtype=cosmossdk.io/math.Int" json:"interest"` - TotalSupply cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=total_supply,json=totalSupply,proto3,customtype=cosmossdk.io/math.Int" json:"total_supply"` - UpdatedAt int64 `protobuf:"varint,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (m *QueryRoundDetailsResponse) Reset() { *m = QueryRoundDetailsResponse{} } -func (m *QueryRoundDetailsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryRoundDetailsResponse) ProtoMessage() {} -func (*QueryRoundDetailsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_97f98e48b118c150, []int{9} -} -func (m *QueryRoundDetailsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryRoundDetailsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRoundDetailsResponse.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 *QueryRoundDetailsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRoundDetailsResponse.Merge(m, src) -} -func (m *QueryRoundDetailsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryRoundDetailsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRoundDetailsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRoundDetailsResponse proto.InternalMessageInfo - -func (m *QueryRoundDetailsResponse) GetRoundId() uint64 { - if m != nil { - return m.RoundId - } - return 0 -} - -func (m *QueryRoundDetailsResponse) GetUpdatedAt() int64 { - if m != nil { - return m.UpdatedAt - } - return 0 -} - func init() { - proto.RegisterType((*QueryOwner)(nil), "halo.aggregator.v1.QueryOwner") - proto.RegisterType((*QueryOwnerResponse)(nil), "halo.aggregator.v1.QueryOwnerResponse") - proto.RegisterType((*QueryNextPrice)(nil), "halo.aggregator.v1.QueryNextPrice") - proto.RegisterType((*QueryNextPriceResponse)(nil), "halo.aggregator.v1.QueryNextPriceResponse") - proto.RegisterType((*QueryRoundData)(nil), "halo.aggregator.v1.QueryRoundData") - proto.RegisterType((*QueryLatestRoundData)(nil), "halo.aggregator.v1.QueryLatestRoundData") - proto.RegisterType((*QueryRoundDataResponse)(nil), "halo.aggregator.v1.QueryRoundDataResponse") - proto.RegisterType((*QueryRoundDetails)(nil), "halo.aggregator.v1.QueryRoundDetails") - proto.RegisterType((*QueryLatestRoundDetails)(nil), "halo.aggregator.v1.QueryLatestRoundDetails") - proto.RegisterType((*QueryRoundDetailsResponse)(nil), "halo.aggregator.v1.QueryRoundDetailsResponse") -} - -func init() { proto.RegisterFile("halo/aggregator/v1/query.proto", fileDescriptor_97f98e48b118c150) } - -var fileDescriptor_97f98e48b118c150 = []byte{ - // 724 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x95, 0x4f, 0x4f, 0x13, 0x4f, - 0x18, 0xc7, 0xbb, 0x40, 0x81, 0x3e, 0x3f, 0xf2, 0x43, 0x26, 0x88, 0x6d, 0xd1, 0x05, 0xd7, 0x48, - 0xb0, 0x95, 0x5d, 0xc0, 0xc4, 0xc4, 0x23, 0xc4, 0x83, 0x25, 0x44, 0xb4, 0xdc, 0xbc, 0x34, 0xd3, - 0xee, 0x64, 0xd9, 0xb8, 0x9d, 0x59, 0x77, 0xa6, 0xfc, 0x89, 0xf1, 0xe2, 0x89, 0xa3, 0x09, 0xde, - 0xf5, 0xe8, 0xd1, 0x83, 0x2f, 0xc1, 0x03, 0x47, 0xa2, 0x17, 0xe3, 0x81, 0x18, 0x30, 0xe1, 0x55, - 0x98, 0x98, 0x9d, 0xd9, 0xee, 0x42, 0x4b, 0x5b, 0xec, 0x85, 0xf0, 0xfc, 0xfb, 0xce, 0x67, 0x9e, - 0xd9, 0xe7, 0x29, 0xe8, 0x5b, 0xd8, 0x63, 0x16, 0x76, 0x9c, 0x80, 0x38, 0x58, 0xb0, 0xc0, 0xda, - 0x5e, 0xb2, 0x5e, 0x35, 0x48, 0xb0, 0x67, 0xfa, 0x01, 0x13, 0x0c, 0xa1, 0x30, 0x6e, 0x26, 0x71, - 0x73, 0x7b, 0x29, 0x3f, 0x81, 0xeb, 0x2e, 0x65, 0x96, 0xfc, 0xab, 0xd2, 0xf2, 0xd3, 0x35, 0xc6, - 0xeb, 0x8c, 0xab, 0xd2, 0x16, 0x8d, 0x7c, 0x4e, 0x05, 0x2b, 0xd2, 0xb2, 0x94, 0x11, 0x85, 0x26, - 0x1d, 0xe6, 0x30, 0xe5, 0x0f, 0xff, 0x8b, 0xbc, 0x37, 0x1d, 0xc6, 0x1c, 0x8f, 0x58, 0xd8, 0x77, - 0x2d, 0x4c, 0x29, 0x13, 0x58, 0xb8, 0x8c, 0x46, 0x35, 0xc6, 0x18, 0xc0, 0xf3, 0x50, 0x7d, 0x63, - 0x87, 0x92, 0xc0, 0x28, 0x00, 0x4a, 0xac, 0x32, 0xe1, 0x3e, 0xa3, 0x9c, 0xa0, 0x49, 0x48, 0xb3, - 0xd0, 0x91, 0xd5, 0x66, 0xb5, 0xf9, 0x4c, 0x59, 0x19, 0xc6, 0x35, 0xf8, 0x5f, 0xe6, 0x3e, 0x25, - 0xbb, 0xe2, 0x59, 0xe0, 0xd6, 0x88, 0xe1, 0xc2, 0xd4, 0x45, 0x4f, 0xac, 0xb0, 0x01, 0x40, 0xc9, - 0xae, 0xa8, 0xf8, 0xa1, 0x57, 0xc9, 0xac, 0x2e, 0x1e, 0x1e, 0xcf, 0xa4, 0x7e, 0x1e, 0xcf, 0x5c, - 0x57, 0x77, 0xe0, 0xf6, 0x4b, 0xd3, 0x65, 0x56, 0x1d, 0x8b, 0x2d, 0xb3, 0x44, 0xc5, 0xb7, 0x2f, - 0x0b, 0x10, 0x5d, 0xae, 0x44, 0xc5, 0xa7, 0xb3, 0xcf, 0x05, 0xad, 0x9c, 0xa1, 0xf1, 0x51, 0xc5, - 0xe8, 0xf0, 0x32, 0x6b, 0x50, 0xfb, 0x31, 0x16, 0x18, 0xe5, 0x60, 0x34, 0x08, 0x8d, 0x8a, 0x6b, - 0xcb, 0x03, 0x86, 0xca, 0x23, 0xd2, 0x2e, 0xd9, 0xc6, 0x14, 0x4c, 0xca, 0xe4, 0x75, 0x2c, 0x08, - 0x17, 0x71, 0x89, 0x71, 0xa6, 0x45, 0xc0, 0xb1, 0x2b, 0x06, 0xee, 0xac, 0x86, 0x9e, 0xc0, 0x30, - 0xa6, 0x7c, 0x87, 0x04, 0xd9, 0x81, 0x3e, 0xef, 0x11, 0xd5, 0xa3, 0x5b, 0x00, 0x5c, 0xe0, 0x40, - 0x10, 0xbb, 0x82, 0x45, 0x76, 0x70, 0x56, 0x9b, 0x1f, 0x2c, 0x67, 0x22, 0xcf, 0x8a, 0x08, 0xc3, - 0x0d, 0xdf, 0xc6, 0x51, 0x78, 0x48, 0x85, 0x23, 0xcf, 0x8a, 0x40, 0x05, 0x98, 0x50, 0x3a, 0xc4, - 0xae, 0xb8, 0xb4, 0x22, 0xf1, 0xb2, 0x69, 0xc9, 0x3a, 0xde, 0x0c, 0x94, 0xa8, 0xbc, 0x9a, 0x61, - 0xc2, 0xc4, 0xb9, 0x8b, 0x12, 0x81, 0x5d, 0x8f, 0x77, 0xeb, 0x58, 0x0e, 0x6e, 0xb4, 0x75, 0x4c, - 0x55, 0x19, 0x5f, 0x07, 0x20, 0xd7, 0xa6, 0x75, 0x95, 0xbe, 0xad, 0xc1, 0x48, 0x15, 0x7b, 0x98, - 0xd6, 0x48, 0xdf, 0x8d, 0x6b, 0x0a, 0xa0, 0x75, 0x18, 0x75, 0xa9, 0x20, 0x01, 0xe1, 0xaa, 0x6f, - 0xfd, 0x88, 0xc5, 0x0a, 0x68, 0x13, 0xc6, 0x04, 0x13, 0xd8, 0xab, 0xf0, 0x86, 0xef, 0x7b, 0x7b, - 0xb2, 0xd5, 0xfd, 0x28, 0xfe, 0x27, 0x55, 0x36, 0xa5, 0x48, 0xcb, 0xeb, 0xa5, 0x5b, 0x5e, 0x6f, - 0xf9, 0xcf, 0x30, 0xa4, 0x65, 0x1b, 0xd1, 0x0e, 0xa4, 0xe5, 0xb8, 0x21, 0xdd, 0x6c, 0x5f, 0x0f, - 0x66, 0x32, 0x8e, 0xf9, 0xb9, 0xee, 0xf1, 0xe6, 0x1b, 0x18, 0x73, 0xfb, 0x21, 0xcd, 0xdb, 0xef, - 0xbf, 0x0f, 0x06, 0xa6, 0x51, 0xce, 0xba, 0x64, 0x27, 0xc9, 0x01, 0x46, 0xfb, 0x1a, 0x64, 0xe2, - 0x51, 0x45, 0x46, 0x47, 0xf5, 0x38, 0x27, 0x5f, 0xe8, 0x9d, 0x13, 0x53, 0x14, 0x13, 0x8a, 0x59, - 0xa4, 0x5f, 0x46, 0x91, 0x6c, 0x04, 0x74, 0xa0, 0x41, 0x26, 0x19, 0xe5, 0xce, 0x28, 0x71, 0x4e, - 0x17, 0x94, 0xb6, 0x61, 0x36, 0x1e, 0x26, 0x28, 0x45, 0x74, 0xef, 0x32, 0x14, 0xf5, 0xcd, 0xda, - 0x58, 0x60, 0xeb, 0x75, 0xf3, 0xfb, 0x7d, 0x83, 0xde, 0x6b, 0x30, 0xde, 0xb2, 0x33, 0xd0, 0x7c, - 0xc7, 0x73, 0x5b, 0x32, 0xff, 0x89, 0xb0, 0x77, 0xb3, 0x12, 0x42, 0xf4, 0x41, 0x83, 0xb1, 0x0b, - 0x83, 0x7c, 0xb7, 0xc7, 0x49, 0x2a, 0x2d, 0xbf, 0x70, 0xa5, 0xb4, 0x98, 0xe9, 0x51, 0xc2, 0x64, - 0xa2, 0xfb, 0x5d, 0x98, 0x54, 0xdd, 0xf9, 0xc6, 0x7d, 0xd4, 0x00, 0xb5, 0xaf, 0x0e, 0x54, 0xbc, - 0x52, 0xef, 0xfa, 0xa3, 0x35, 0x13, 0xda, 0x3b, 0xe8, 0x76, 0x4f, 0xda, 0xd5, 0xb5, 0xc3, 0x13, - 0x5d, 0x3b, 0x3a, 0xd1, 0xb5, 0x5f, 0x27, 0xba, 0xf6, 0xee, 0x54, 0x4f, 0x1d, 0x9d, 0xea, 0xa9, - 0x1f, 0xa7, 0x7a, 0xea, 0xc5, 0xa2, 0xe3, 0x8a, 0xad, 0x46, 0xd5, 0xac, 0xb1, 0xba, 0x45, 0x59, - 0xd5, 0x23, 0x0b, 0x98, 0x73, 0x22, 0xb8, 0xd2, 0xdc, 0x5e, 0xb6, 0xc4, 0x9e, 0x4f, 0xf8, 0x39, - 0xf1, 0xea, 0xb0, 0xfc, 0x29, 0x7d, 0xf0, 0x37, 0x00, 0x00, 0xff, 0xff, 0x07, 0xa3, 0x02, 0x22, - 0xff, 0x07, 0x00, 0x00, + proto.RegisterType((*QueryReporter)(nil), "halo.aggregator.v2.QueryReporter") + proto.RegisterType((*QueryReporterResponse)(nil), "halo.aggregator.v2.QueryReporterResponse") +} + +func init() { proto.RegisterFile("halo/aggregator/v2/query.proto", fileDescriptor_916e86725120406f) } + +var fileDescriptor_916e86725120406f = []byte{ + // 287 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0x48, 0xcc, 0xc9, + 0xd7, 0x4f, 0x4c, 0x4f, 0x2f, 0x4a, 0x4d, 0x4f, 0x2c, 0xc9, 0x2f, 0xd2, 0x2f, 0x33, 0xd2, 0x2f, + 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, 0xc9, 0xeb, 0x21, + 0xe4, 0xf5, 0xca, 0x8c, 0xa4, 0xa4, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0x21, 0xea, 0xf4, 0xcb, + 0x0c, 0x91, 0x35, 0x48, 0xc9, 0xa4, 0xe7, 0xe7, 0xa7, 0xe7, 0xa4, 0xea, 0x27, 0x16, 0x64, 0xea, + 0x27, 0xe6, 0xe5, 0xe5, 0x97, 0x24, 0x96, 0x64, 0xe6, 0xe7, 0x15, 0x43, 0x64, 0x95, 0xf8, 0xb9, + 0x78, 0x03, 0x41, 0x8a, 0x83, 0x52, 0x0b, 0xf2, 0x8b, 0x4a, 0x52, 0x8b, 0x94, 0x8c, 0xb9, 0x44, + 0x51, 0x04, 0x82, 0x52, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0xa4, 0xb8, 0x38, 0x8a, 0xa0, + 0x62, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x70, 0xbe, 0xd1, 0x2a, 0x46, 0x2e, 0x56, 0xb0, + 0x2e, 0xa1, 0x05, 0x8c, 0x5c, 0x1c, 0x30, 0xad, 0x42, 0x8a, 0x7a, 0x98, 0x8e, 0xd5, 0x43, 0x31, + 0x5d, 0x4a, 0x93, 0xa0, 0x12, 0x98, 0x03, 0x94, 0xdc, 0x3a, 0x9e, 0x6f, 0xd0, 0x62, 0x6c, 0xba, + 0xfc, 0x64, 0x32, 0x93, 0x75, 0x94, 0xb4, 0x90, 0xa4, 0x3e, 0x46, 0x48, 0x19, 0xea, 0xe7, 0x97, + 0xe7, 0xa5, 0x16, 0x09, 0xc9, 0xe8, 0x63, 0x09, 0x44, 0x98, 0x63, 0x9d, 0xbc, 0x4e, 0x3c, 0x92, + 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, + 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x20, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, + 0x39, 0x3f, 0x57, 0x3f, 0x2f, 0x3f, 0x29, 0x27, 0x55, 0x37, 0xb1, 0xb8, 0x38, 0xb5, 0xa4, 0x18, + 0x62, 0x5c, 0x99, 0x91, 0x7e, 0x49, 0x65, 0x41, 0x6a, 0x31, 0x92, 0xb9, 0x49, 0x6c, 0xe0, 0x50, + 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x65, 0xe9, 0x0c, 0xb6, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -547,12 +150,7 @@ 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 { - Owner(ctx context.Context, in *QueryOwner, opts ...grpc.CallOption) (*QueryOwnerResponse, error) - NextPrice(ctx context.Context, in *QueryNextPrice, opts ...grpc.CallOption) (*QueryNextPriceResponse, error) - RoundData(ctx context.Context, in *QueryRoundData, opts ...grpc.CallOption) (*QueryRoundDataResponse, error) - LatestRoundData(ctx context.Context, in *QueryLatestRoundData, opts ...grpc.CallOption) (*QueryRoundDataResponse, error) - RoundDetails(ctx context.Context, in *QueryRoundDetails, opts ...grpc.CallOption) (*QueryRoundDetailsResponse, error) - LatestRoundDetails(ctx context.Context, in *QueryLatestRoundDetails, opts ...grpc.CallOption) (*QueryRoundDetailsResponse, error) + Reporter(ctx context.Context, in *QueryReporter, opts ...grpc.CallOption) (*QueryReporterResponse, error) } type queryClient struct { @@ -563,54 +161,9 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } -func (c *queryClient) Owner(ctx context.Context, in *QueryOwner, opts ...grpc.CallOption) (*QueryOwnerResponse, error) { - out := new(QueryOwnerResponse) - err := c.cc.Invoke(ctx, "/halo.aggregator.v1.Query/Owner", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) NextPrice(ctx context.Context, in *QueryNextPrice, opts ...grpc.CallOption) (*QueryNextPriceResponse, error) { - out := new(QueryNextPriceResponse) - err := c.cc.Invoke(ctx, "/halo.aggregator.v1.Query/NextPrice", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) RoundData(ctx context.Context, in *QueryRoundData, opts ...grpc.CallOption) (*QueryRoundDataResponse, error) { - out := new(QueryRoundDataResponse) - err := c.cc.Invoke(ctx, "/halo.aggregator.v1.Query/RoundData", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) LatestRoundData(ctx context.Context, in *QueryLatestRoundData, opts ...grpc.CallOption) (*QueryRoundDataResponse, error) { - out := new(QueryRoundDataResponse) - err := c.cc.Invoke(ctx, "/halo.aggregator.v1.Query/LatestRoundData", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) RoundDetails(ctx context.Context, in *QueryRoundDetails, opts ...grpc.CallOption) (*QueryRoundDetailsResponse, error) { - out := new(QueryRoundDetailsResponse) - err := c.cc.Invoke(ctx, "/halo.aggregator.v1.Query/RoundDetails", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) LatestRoundDetails(ctx context.Context, in *QueryLatestRoundDetails, opts ...grpc.CallOption) (*QueryRoundDetailsResponse, error) { - out := new(QueryRoundDetailsResponse) - err := c.cc.Invoke(ctx, "/halo.aggregator.v1.Query/LatestRoundDetails", in, out, opts...) +func (c *queryClient) Reporter(ctx context.Context, in *QueryReporter, opts ...grpc.CallOption) (*QueryReporterResponse, error) { + out := new(QueryReporterResponse) + err := c.cc.Invoke(ctx, "/halo.aggregator.v2.Query/Reporter", in, out, opts...) if err != nil { return nil, err } @@ -619,1270 +172,146 @@ func (c *queryClient) LatestRoundDetails(ctx context.Context, in *QueryLatestRou // QueryServer is the server API for Query service. type QueryServer interface { - Owner(context.Context, *QueryOwner) (*QueryOwnerResponse, error) - NextPrice(context.Context, *QueryNextPrice) (*QueryNextPriceResponse, error) - RoundData(context.Context, *QueryRoundData) (*QueryRoundDataResponse, error) - LatestRoundData(context.Context, *QueryLatestRoundData) (*QueryRoundDataResponse, error) - RoundDetails(context.Context, *QueryRoundDetails) (*QueryRoundDetailsResponse, error) - LatestRoundDetails(context.Context, *QueryLatestRoundDetails) (*QueryRoundDetailsResponse, error) + Reporter(context.Context, *QueryReporter) (*QueryReporterResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) Owner(ctx context.Context, req *QueryOwner) (*QueryOwnerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Owner not implemented") -} -func (*UnimplementedQueryServer) NextPrice(ctx context.Context, req *QueryNextPrice) (*QueryNextPriceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NextPrice not implemented") -} -func (*UnimplementedQueryServer) RoundData(ctx context.Context, req *QueryRoundData) (*QueryRoundDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RoundData not implemented") -} -func (*UnimplementedQueryServer) LatestRoundData(ctx context.Context, req *QueryLatestRoundData) (*QueryRoundDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LatestRoundData not implemented") -} -func (*UnimplementedQueryServer) RoundDetails(ctx context.Context, req *QueryRoundDetails) (*QueryRoundDetailsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RoundDetails not implemented") -} -func (*UnimplementedQueryServer) LatestRoundDetails(ctx context.Context, req *QueryLatestRoundDetails) (*QueryRoundDetailsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LatestRoundDetails not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Owner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryOwner) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Owner(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/halo.aggregator.v1.Query/Owner", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Owner(ctx, req.(*QueryOwner)) - } - return interceptor(ctx, in, info, handler) +func (*UnimplementedQueryServer) Reporter(ctx context.Context, req *QueryReporter) (*QueryReporterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Reporter not implemented") } - -func _Query_NextPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryNextPrice) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).NextPrice(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/halo.aggregator.v1.Query/NextPrice", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).NextPrice(ctx, req.(*QueryNextPrice)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_RoundData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRoundData) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).RoundData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/halo.aggregator.v1.Query/RoundData", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).RoundData(ctx, req.(*QueryRoundData)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_LatestRoundData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLatestRoundData) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LatestRoundData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/halo.aggregator.v1.Query/LatestRoundData", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LatestRoundData(ctx, req.(*QueryLatestRoundData)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_RoundDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRoundDetails) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).RoundDetails(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/halo.aggregator.v1.Query/RoundDetails", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).RoundDetails(ctx, req.(*QueryRoundDetails)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_LatestRoundDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLatestRoundDetails) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LatestRoundDetails(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/halo.aggregator.v1.Query/LatestRoundDetails", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LatestRoundDetails(ctx, req.(*QueryLatestRoundDetails)) - } - return interceptor(ctx, in, info, handler) -} - -var Query_serviceDesc = _Query_serviceDesc -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "halo.aggregator.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Owner", - Handler: _Query_Owner_Handler, - }, - { - MethodName: "NextPrice", - Handler: _Query_NextPrice_Handler, - }, - { - MethodName: "RoundData", - Handler: _Query_RoundData_Handler, - }, - { - MethodName: "LatestRoundData", - Handler: _Query_LatestRoundData_Handler, - }, - { - MethodName: "RoundDetails", - Handler: _Query_RoundDetails_Handler, - }, - { - MethodName: "LatestRoundDetails", - Handler: _Query_LatestRoundDetails_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "halo/aggregator/v1/query.proto", -} - -func (m *QueryOwner) 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 *QueryOwner) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryOwner) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryOwnerResponse) 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 *QueryOwnerResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - 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 *QueryNextPrice) 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 *QueryNextPrice) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryNextPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryNextPriceResponse) 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 *QueryNextPriceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryNextPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.NextPrice.Size() - i -= size - if _, err := m.NextPrice.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryRoundData) 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 *QueryRoundData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRoundData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RoundId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.RoundId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryLatestRoundData) 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 *QueryLatestRoundData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryLatestRoundData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryRoundDataResponse) 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 *QueryRoundDataResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRoundDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AnsweredInRound != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.AnsweredInRound)) - i-- - dAtA[i] = 0x28 - } - if m.UpdatedAt != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.UpdatedAt)) - i-- - dAtA[i] = 0x20 - } - if m.StartedAt != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.StartedAt)) - i-- - dAtA[i] = 0x18 - } - { - size := m.Answer.Size() - i -= size - if _, err := m.Answer.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if m.RoundId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.RoundId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryRoundDetails) 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 *QueryRoundDetails) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRoundDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RoundId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.RoundId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryLatestRoundDetails) 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 *QueryLatestRoundDetails) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryLatestRoundDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryRoundDetailsResponse) 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 *QueryRoundDetailsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRoundDetailsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UpdatedAt != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.UpdatedAt)) - i-- - dAtA[i] = 0x28 - } - { - size := m.TotalSupply.Size() - i -= size - if _, err := m.TotalSupply.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.Interest.Size() - i -= size - if _, err := m.Interest.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size := m.Balance.Size() - i -= size - if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if m.RoundId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.RoundId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryOwner) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryOwnerResponse) 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)) - } - return n -} - -func (m *QueryNextPrice) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryNextPriceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.NextPrice.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryRoundData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RoundId != 0 { - n += 1 + sovQuery(uint64(m.RoundId)) - } - return n -} - -func (m *QueryLatestRoundData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryRoundDataResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RoundId != 0 { - n += 1 + sovQuery(uint64(m.RoundId)) - } - l = m.Answer.Size() - n += 1 + l + sovQuery(uint64(l)) - if m.StartedAt != 0 { - n += 1 + sovQuery(uint64(m.StartedAt)) - } - if m.UpdatedAt != 0 { - n += 1 + sovQuery(uint64(m.UpdatedAt)) - } - if m.AnsweredInRound != 0 { - n += 1 + sovQuery(uint64(m.AnsweredInRound)) - } - return n -} - -func (m *QueryRoundDetails) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RoundId != 0 { - n += 1 + sovQuery(uint64(m.RoundId)) - } - return n -} - -func (m *QueryLatestRoundDetails) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryRoundDetailsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RoundId != 0 { - n += 1 + sovQuery(uint64(m.RoundId)) - } - l = m.Balance.Size() - n += 1 + l + sovQuery(uint64(l)) - l = m.Interest.Size() - n += 1 + l + sovQuery(uint64(l)) - l = m.TotalSupply.Size() - n += 1 + l + sovQuery(uint64(l)) - if m.UpdatedAt != 0 { - n += 1 + sovQuery(uint64(m.UpdatedAt)) - } - 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 *QueryOwner) 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: QueryOwner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOwner: 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 *QueryOwnerResponse) 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: QueryOwnerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOwnerResponse: 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 - 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 *QueryNextPrice) 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: QueryNextPrice: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryNextPrice: 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 *QueryNextPriceResponse) 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: QueryNextPriceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryNextPriceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPrice", 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 - } - if err := m.NextPrice.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 *QueryRoundData) 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: QueryRoundData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRoundData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) - } - m.RoundId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RoundId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 *QueryLatestRoundData) 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: QueryLatestRoundData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLatestRoundData: 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 *QueryRoundDataResponse) 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: QueryRoundDataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRoundDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) - } - m.RoundId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RoundId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Answer", 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 - } - if err := m.Answer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) - } - m.StartedAt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartedAt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) - } - m.UpdatedAt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UpdatedAt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AnsweredInRound", wireType) - } - m.AnsweredInRound = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AnsweredInRound |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 - } + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Reporter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryReporter) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Reporter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/halo.aggregator.v2.Query/Reporter", } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Reporter(ctx, req.(*QueryReporter)) + } + return interceptor(ctx, in, info, handler) +} - if iNdEx > l { - return io.ErrUnexpectedEOF +var Query_serviceDesc = _Query_serviceDesc +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "halo.aggregator.v2.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Reporter", + Handler: _Query_Reporter_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "halo/aggregator/v2/query.proto", +} + +func (m *QueryReporter) 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 nil + return dAtA[:n], nil } -func (m *QueryRoundDetails) 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: QueryRoundDetails: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRoundDetails: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) - } - m.RoundId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RoundId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 - } + +func (m *QueryReporter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryReporter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryReporterResponse) 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 +} - if iNdEx > l { - return io.ErrUnexpectedEOF +func (m *QueryReporterResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryReporterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Reporter) > 0 { + i -= len(m.Reporter) + copy(dAtA[i:], m.Reporter) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Reporter))) + i-- + dAtA[i] = 0xa } - return nil + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryReporter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryReporterResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Reporter) + if l > 0 { + 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 *QueryLatestRoundDetails) Unmarshal(dAtA []byte) error { +func (m *QueryReporter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1905,10 +334,10 @@ func (m *QueryLatestRoundDetails) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLatestRoundDetails: wiretype end group for non-group") + return fmt.Errorf("proto: QueryReporter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLatestRoundDetails: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryReporter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1932,7 +361,7 @@ func (m *QueryLatestRoundDetails) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryRoundDetailsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryReporterResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1955,102 +384,15 @@ func (m *QueryRoundDetailsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryRoundDetailsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryReporterResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRoundDetailsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryReporterResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RoundId", wireType) - } - m.RoundId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RoundId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", 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 - } - if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interest", 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 - } - if err := m.Interest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalSupply", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Reporter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2078,29 +420,8 @@ func (m *QueryRoundDetailsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.TotalSupply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Reporter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) - } - m.UpdatedAt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UpdatedAt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/types/aggregator/query.pb.gw.go b/types/aggregator/query.pb.gw.go index cea7762..d81f37a 100644 --- a/types/aggregator/query.pb.gw.go +++ b/types/aggregator/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: halo/aggregator/v1/query.proto +// source: halo/aggregator/v2/query.proto /* Package aggregator is a reverse proxy. @@ -33,182 +33,38 @@ var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage var _ = metadata.Join -func request_Query_Owner_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryOwner +func request_Query_Reporter_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryReporter var metadata runtime.ServerMetadata - msg, err := client.Owner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Reporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_Owner_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryOwner +func local_request_Query_Reporter_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryReporter var metadata runtime.ServerMetadata - msg, err := server.Owner(ctx, &protoReq) + msg, err := server.Reporter(ctx, &protoReq) return msg, metadata, err } -func request_Query_NextPrice_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryNextPrice +func request_Query_Reporter_1(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryReporter var metadata runtime.ServerMetadata - msg, err := client.NextPrice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Reporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_NextPrice_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryNextPrice +func local_request_Query_Reporter_1(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryReporter var metadata runtime.ServerMetadata - msg, err := server.NextPrice(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_RoundData_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRoundData - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["round_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "round_id") - } - - protoReq.RoundId, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "round_id", err) - } - - msg, err := client.RoundData(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_RoundData_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRoundData - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["round_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "round_id") - } - - protoReq.RoundId, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "round_id", err) - } - - msg, err := server.RoundData(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_LatestRoundData_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLatestRoundData - var metadata runtime.ServerMetadata - - msg, err := client.LatestRoundData(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_LatestRoundData_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLatestRoundData - var metadata runtime.ServerMetadata - - msg, err := server.LatestRoundData(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_RoundDetails_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRoundDetails - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["round_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "round_id") - } - - protoReq.RoundId, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "round_id", err) - } - - msg, err := client.RoundDetails(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_RoundDetails_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRoundDetails - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["round_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "round_id") - } - - protoReq.RoundId, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "round_id", err) - } - - msg, err := server.RoundDetails(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_LatestRoundDetails_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLatestRoundDetails - var metadata runtime.ServerMetadata - - msg, err := client.LatestRoundDetails(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_LatestRoundDetails_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLatestRoundDetails - var metadata runtime.ServerMetadata - - msg, err := server.LatestRoundDetails(ctx, &protoReq) + msg, err := server.Reporter(ctx, &protoReq) return msg, metadata, err } @@ -219,53 +75,7 @@ func local_request_Query_LatestRoundDetails_0(ctx context.Context, marshaler run // 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_Owner_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_Owner_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_Owner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_NextPrice_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_NextPrice_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_NextPrice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_RoundData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Reporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -276,7 +86,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_RoundData_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Reporter_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 { @@ -284,11 +94,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_RoundData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Reporter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_LatestRoundData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Reporter_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -299,7 +109,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_LatestRoundData_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Reporter_1(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 { @@ -307,53 +117,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_LatestRoundData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_RoundDetails_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_RoundDetails_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_RoundDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_LatestRoundDetails_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_LatestRoundDetails_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_LatestRoundDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Reporter_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -398,67 +162,7 @@ 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_Owner_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_Owner_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_Owner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_NextPrice_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_NextPrice_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_NextPrice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_RoundData_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_RoundData_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_RoundData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_LatestRoundData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Reporter_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) @@ -467,18 +171,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_LatestRoundData_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Reporter_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_LatestRoundData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Reporter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_RoundDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Reporter_1, 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) @@ -487,34 +191,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_RoundDetails_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Reporter_1(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_RoundDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_LatestRoundDetails_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_LatestRoundDetails_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_LatestRoundDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Reporter_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -522,29 +206,13 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Owner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"halo", "aggregator", "v1", "owner"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_NextPrice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"halo", "aggregator", "v1", "next_price"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Reporter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"halo", "aggregator", "v2", "reporter"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_RoundData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"halo", "aggregator", "v1", "round_data", "round_id"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_LatestRoundData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"halo", "aggregator", "v1", "round_data"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_RoundDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"halo", "aggregator", "v1", "round_details", "round_id"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_LatestRoundDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"halo", "aggregator", "v1", "round_details"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Reporter_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"halo", "aggregator", "v1", "owner"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( - forward_Query_Owner_0 = runtime.ForwardResponseMessage - - forward_Query_NextPrice_0 = runtime.ForwardResponseMessage - - forward_Query_RoundData_0 = runtime.ForwardResponseMessage - - forward_Query_LatestRoundData_0 = runtime.ForwardResponseMessage - - forward_Query_RoundDetails_0 = runtime.ForwardResponseMessage + forward_Query_Reporter_0 = runtime.ForwardResponseMessage - forward_Query_LatestRoundDetails_0 = runtime.ForwardResponseMessage + forward_Query_Reporter_1 = runtime.ForwardResponseMessage ) diff --git a/types/aggregator/tx.pb.go b/types/aggregator/tx.pb.go index 1d903ac..bb4dbc2 100644 --- a/types/aggregator/tx.pb.go +++ b/types/aggregator/tx.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: halo/aggregator/v1/tx.proto +// source: halo/aggregator/v2/tx.proto package aggregator @@ -32,27 +32,25 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgReportBalance implements the reportBalance (0x0b50ece9) method. -type MsgReportBalance struct { - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - Principal cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=principal,proto3,customtype=cosmossdk.io/math.Int" json:"principal"` - Interest cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=interest,proto3,customtype=cosmossdk.io/math.Int" json:"interest"` - TotalSupply cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=total_supply,json=totalSupply,proto3,customtype=cosmossdk.io/math.Int" json:"total_supply"` - NextPrice cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=next_price,json=nextPrice,proto3,customtype=cosmossdk.io/math.Int" json:"next_price"` +// MsgTransmit implements the transmit (0xTODO) method. +type MsgTransmit struct { + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + Answer cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=answer,proto3,customtype=cosmossdk.io/math.Int" json:"answer"` + UpdatedAt uint32 `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } -func (m *MsgReportBalance) Reset() { *m = MsgReportBalance{} } -func (m *MsgReportBalance) String() string { return proto.CompactTextString(m) } -func (*MsgReportBalance) ProtoMessage() {} -func (*MsgReportBalance) Descriptor() ([]byte, []int) { - return fileDescriptor_d2fa22171bb4d415, []int{0} +func (m *MsgTransmit) Reset() { *m = MsgTransmit{} } +func (m *MsgTransmit) String() string { return proto.CompactTextString(m) } +func (*MsgTransmit) ProtoMessage() {} +func (*MsgTransmit) Descriptor() ([]byte, []int) { + return fileDescriptor_d54c0eebbffa764b, []int{0} } -func (m *MsgReportBalance) XXX_Unmarshal(b []byte) error { +func (m *MsgTransmit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgReportBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgTransmit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgReportBalance.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgTransmit.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -62,35 +60,35 @@ func (m *MsgReportBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *MsgReportBalance) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgReportBalance.Merge(m, src) +func (m *MsgTransmit) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransmit.Merge(m, src) } -func (m *MsgReportBalance) XXX_Size() int { +func (m *MsgTransmit) XXX_Size() int { return m.Size() } -func (m *MsgReportBalance) XXX_DiscardUnknown() { - xxx_messageInfo_MsgReportBalance.DiscardUnknown(m) +func (m *MsgTransmit) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransmit.DiscardUnknown(m) } -var xxx_messageInfo_MsgReportBalance proto.InternalMessageInfo +var xxx_messageInfo_MsgTransmit proto.InternalMessageInfo -// MsgReportBalanceResponse ... -type MsgReportBalanceResponse struct { +// MsgTransmitResponse ... +type MsgTransmitResponse struct { RoundId uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` } -func (m *MsgReportBalanceResponse) Reset() { *m = MsgReportBalanceResponse{} } -func (m *MsgReportBalanceResponse) String() string { return proto.CompactTextString(m) } -func (*MsgReportBalanceResponse) ProtoMessage() {} -func (*MsgReportBalanceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d2fa22171bb4d415, []int{1} +func (m *MsgTransmitResponse) Reset() { *m = MsgTransmitResponse{} } +func (m *MsgTransmitResponse) String() string { return proto.CompactTextString(m) } +func (*MsgTransmitResponse) ProtoMessage() {} +func (*MsgTransmitResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d54c0eebbffa764b, []int{1} } -func (m *MsgReportBalanceResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgTransmitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgReportBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgTransmitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgReportBalanceResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgTransmitResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -100,19 +98,19 @@ func (m *MsgReportBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *MsgReportBalanceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgReportBalanceResponse.Merge(m, src) +func (m *MsgTransmitResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransmitResponse.Merge(m, src) } -func (m *MsgReportBalanceResponse) XXX_Size() int { +func (m *MsgTransmitResponse) XXX_Size() int { return m.Size() } -func (m *MsgReportBalanceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgReportBalanceResponse.DiscardUnknown(m) +func (m *MsgTransmitResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransmitResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgReportBalanceResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgTransmitResponse proto.InternalMessageInfo -func (m *MsgReportBalanceResponse) GetRoundId() uint64 { +func (m *MsgTransmitResponse) GetRoundId() uint64 { if m != nil { return m.RoundId } @@ -129,7 +127,7 @@ func (m *MsgSetNextPrice) Reset() { *m = MsgSetNextPrice{} } func (m *MsgSetNextPrice) String() string { return proto.CompactTextString(m) } func (*MsgSetNextPrice) ProtoMessage() {} func (*MsgSetNextPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_d2fa22171bb4d415, []int{2} + return fileDescriptor_d54c0eebbffa764b, []int{2} } func (m *MsgSetNextPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -166,7 +164,7 @@ func (m *MsgSetNextPriceResponse) Reset() { *m = MsgSetNextPriceResponse func (m *MsgSetNextPriceResponse) String() string { return proto.CompactTextString(m) } func (*MsgSetNextPriceResponse) ProtoMessage() {} func (*MsgSetNextPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d2fa22171bb4d415, []int{3} + return fileDescriptor_d54c0eebbffa764b, []int{3} } func (m *MsgSetNextPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -197,15 +195,15 @@ var xxx_messageInfo_MsgSetNextPriceResponse proto.InternalMessageInfo // MsgTransferOwnership implements the transferOwnership (0xf2fde38b) method. type MsgTransferOwnership struct { - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - NewOwner string `protobuf:"bytes,2,opt,name=new_owner,json=newOwner,proto3" json:"new_owner,omitempty"` + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + NewReporter string `protobuf:"bytes,2,opt,name=new_reporter,json=newReporter,proto3" json:"new_reporter,omitempty"` } func (m *MsgTransferOwnership) Reset() { *m = MsgTransferOwnership{} } func (m *MsgTransferOwnership) String() string { return proto.CompactTextString(m) } func (*MsgTransferOwnership) ProtoMessage() {} func (*MsgTransferOwnership) Descriptor() ([]byte, []int) { - return fileDescriptor_d2fa22171bb4d415, []int{4} + return fileDescriptor_d54c0eebbffa764b, []int{4} } func (m *MsgTransferOwnership) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +240,7 @@ func (m *MsgTransferOwnershipResponse) Reset() { *m = MsgTransferOwnersh func (m *MsgTransferOwnershipResponse) String() string { return proto.CompactTextString(m) } func (*MsgTransferOwnershipResponse) ProtoMessage() {} func (*MsgTransferOwnershipResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d2fa22171bb4d415, []int{5} + return fileDescriptor_d54c0eebbffa764b, []int{5} } func (m *MsgTransferOwnershipResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -272,56 +270,54 @@ func (m *MsgTransferOwnershipResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgTransferOwnershipResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgReportBalance)(nil), "halo.aggregator.v1.MsgReportBalance") - proto.RegisterType((*MsgReportBalanceResponse)(nil), "halo.aggregator.v1.MsgReportBalanceResponse") - proto.RegisterType((*MsgSetNextPrice)(nil), "halo.aggregator.v1.MsgSetNextPrice") - proto.RegisterType((*MsgSetNextPriceResponse)(nil), "halo.aggregator.v1.MsgSetNextPriceResponse") - proto.RegisterType((*MsgTransferOwnership)(nil), "halo.aggregator.v1.MsgTransferOwnership") - proto.RegisterType((*MsgTransferOwnershipResponse)(nil), "halo.aggregator.v1.MsgTransferOwnershipResponse") -} - -func init() { proto.RegisterFile("halo/aggregator/v1/tx.proto", fileDescriptor_d2fa22171bb4d415) } - -var fileDescriptor_d2fa22171bb4d415 = []byte{ - // 602 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xbf, 0x6f, 0xd3, 0x4e, - 0x14, 0xb7, 0xfb, 0xeb, 0xdb, 0xdc, 0xb7, 0x08, 0x6a, 0x05, 0xd5, 0x31, 0xc5, 0x01, 0xc3, 0x50, - 0x05, 0x62, 0xa7, 0x85, 0x0c, 0x74, 0x23, 0x5b, 0x10, 0x69, 0x51, 0xc2, 0xc4, 0x12, 0x1c, 0xfb, - 0xb8, 0x58, 0xd8, 0x77, 0xd6, 0xdd, 0x25, 0x69, 0x37, 0xc4, 0x84, 0x98, 0xf8, 0x13, 0x3a, 0x32, - 0x66, 0xe8, 0xc4, 0xc2, 0xc2, 0x50, 0x31, 0x55, 0x9d, 0x10, 0x43, 0x85, 0x92, 0x21, 0xfc, 0x19, - 0xc8, 0x3f, 0x92, 0x26, 0x0e, 0x91, 0xa2, 0xb0, 0x44, 0xb9, 0x7b, 0x9f, 0xf7, 0x79, 0xef, 0xf3, - 0x3e, 0xcf, 0x07, 0x6e, 0x35, 0x4d, 0x97, 0x18, 0x26, 0x42, 0x14, 0x22, 0x93, 0x13, 0x6a, 0xb4, - 0x77, 0x0d, 0x7e, 0xa4, 0xfb, 0x94, 0x70, 0x22, 0x49, 0x41, 0x50, 0xbf, 0x0a, 0xea, 0xed, 0x5d, - 0x65, 0xd3, 0xf4, 0x1c, 0x4c, 0x8c, 0xf0, 0x37, 0x82, 0x29, 0x5b, 0x16, 0x61, 0x1e, 0x61, 0x86, - 0xc7, 0x50, 0x90, 0xee, 0x31, 0x14, 0x07, 0x32, 0x51, 0xa0, 0x1e, 0x9e, 0x8c, 0xe8, 0x10, 0x87, - 0xd2, 0x88, 0x20, 0x12, 0xdd, 0x07, 0xff, 0xa2, 0x5b, 0xed, 0xeb, 0x32, 0xb8, 0x51, 0x61, 0xa8, - 0x0a, 0x7d, 0x42, 0x79, 0xc9, 0x74, 0x4d, 0x6c, 0x41, 0xa9, 0x00, 0xd6, 0x98, 0x83, 0x30, 0xa4, - 0xb2, 0x78, 0x47, 0xdc, 0x49, 0x95, 0xe4, 0x8b, 0xd3, 0x7c, 0x3a, 0x26, 0x7b, 0x6a, 0xdb, 0x14, - 0x32, 0x56, 0xe3, 0xd4, 0xc1, 0xa8, 0x1a, 0xe3, 0xa4, 0x03, 0x90, 0xf2, 0xa9, 0x83, 0x2d, 0xc7, - 0x37, 0x5d, 0x79, 0x29, 0x4c, 0x2a, 0x9c, 0x5d, 0x66, 0x85, 0x9f, 0x97, 0xd9, 0x9b, 0x51, 0x22, - 0xb3, 0xdf, 0xea, 0x0e, 0x31, 0x3c, 0x93, 0x37, 0xf5, 0x32, 0xe6, 0x17, 0xa7, 0x79, 0x10, 0x33, - 0x96, 0x31, 0xff, 0x3c, 0xe8, 0xe6, 0xc4, 0xea, 0x15, 0x85, 0xf4, 0x1c, 0xac, 0x3b, 0x98, 0x43, - 0x0a, 0x19, 0x97, 0x97, 0x17, 0xa4, 0x1b, 0x31, 0x48, 0x35, 0xb0, 0xc1, 0x09, 0x37, 0xdd, 0x3a, - 0x6b, 0xf9, 0xbe, 0x7b, 0x2c, 0xaf, 0x2c, 0xc8, 0xf8, 0x7f, 0xc8, 0x52, 0x0b, 0x49, 0xa4, 0x43, - 0x00, 0x30, 0x3c, 0xe2, 0x75, 0x9f, 0x3a, 0x16, 0x94, 0x57, 0x17, 0xd5, 0x1c, 0x70, 0xbc, 0x08, - 0x28, 0xf6, 0x8b, 0x1f, 0x4e, 0xb2, 0xc2, 0xef, 0x93, 0xac, 0xf0, 0x7e, 0xd0, 0xcd, 0xc5, 0x83, - 0xfd, 0x38, 0xe8, 0xe6, 0x6e, 0x27, 0x17, 0x66, 0xc2, 0x2c, 0xad, 0x08, 0xe4, 0xa4, 0x81, 0x55, - 0xc8, 0x7c, 0x82, 0x19, 0x94, 0x32, 0x60, 0x9d, 0x92, 0x16, 0xb6, 0xeb, 0x8e, 0x1d, 0x5a, 0xb9, - 0x52, 0xfd, 0x2f, 0x3c, 0x97, 0x6d, 0xed, 0xbb, 0x08, 0xae, 0x57, 0x18, 0xaa, 0x41, 0x7e, 0x30, - 0xec, 0x60, 0x01, 0xdf, 0x27, 0x87, 0xb0, 0xf4, 0xef, 0x43, 0x78, 0x3c, 0x63, 0x08, 0xdb, 0xc9, - 0x21, 0x8c, 0x37, 0xae, 0x65, 0xc0, 0x56, 0x42, 0xcb, 0x70, 0x04, 0xda, 0x17, 0x11, 0xa4, 0x2b, - 0x0c, 0xbd, 0xa4, 0x26, 0x66, 0x6f, 0x20, 0x3d, 0xec, 0x60, 0x48, 0x59, 0xd3, 0xf1, 0x17, 0x10, - 0x5b, 0x04, 0x29, 0x0c, 0x3b, 0x75, 0x12, 0x50, 0xc4, 0x5a, 0x67, 0x27, 0xad, 0x63, 0xd8, 0x09, - 0x8b, 0xed, 0x3f, 0x99, 0x21, 0xe9, 0x6e, 0x52, 0xd2, 0x54, 0x8f, 0x9a, 0x0a, 0xb6, 0xff, 0xd6, - 0xfb, 0x50, 0xdc, 0xde, 0xb7, 0x25, 0xb0, 0x5c, 0x61, 0x48, 0xb2, 0xc0, 0xb5, 0xc9, 0x2f, 0xf8, - 0xbe, 0x3e, 0xfd, 0x90, 0xe8, 0xc9, 0x35, 0x51, 0x1e, 0xce, 0x83, 0x1a, 0x2d, 0xd3, 0x6b, 0xb0, - 0x31, 0xb1, 0x2d, 0xf7, 0x66, 0x64, 0x8f, 0x83, 0x94, 0x07, 0x73, 0x80, 0x46, 0x15, 0x08, 0xd8, - 0x9c, 0xf6, 0x69, 0x67, 0x06, 0xc3, 0x14, 0x52, 0x29, 0xcc, 0x8b, 0x1c, 0x16, 0x54, 0x56, 0xdf, - 0x05, 0xfb, 0x57, 0x7a, 0x76, 0xd6, 0x53, 0xc5, 0xf3, 0x9e, 0x2a, 0xfe, 0xea, 0xa9, 0xe2, 0xa7, - 0xbe, 0x2a, 0x9c, 0xf7, 0x55, 0xe1, 0x47, 0x5f, 0x15, 0x5e, 0x15, 0x90, 0xc3, 0x9b, 0xad, 0x86, - 0x6e, 0x11, 0xcf, 0xc0, 0xa4, 0xe1, 0xc2, 0xbc, 0xc9, 0x18, 0xe4, 0xcc, 0x08, 0xbd, 0x6b, 0xef, - 0x19, 0xfc, 0xd8, 0x87, 0x6c, 0xcc, 0xc4, 0xc6, 0x5a, 0xf8, 0xae, 0x3e, 0xfa, 0x13, 0x00, 0x00, - 0xff, 0xff, 0xcf, 0xde, 0x29, 0xa7, 0xe7, 0x05, 0x00, 0x00, + proto.RegisterType((*MsgTransmit)(nil), "halo.aggregator.v2.MsgTransmit") + proto.RegisterType((*MsgTransmitResponse)(nil), "halo.aggregator.v2.MsgTransmitResponse") + proto.RegisterType((*MsgSetNextPrice)(nil), "halo.aggregator.v2.MsgSetNextPrice") + proto.RegisterType((*MsgSetNextPriceResponse)(nil), "halo.aggregator.v2.MsgSetNextPriceResponse") + proto.RegisterType((*MsgTransferOwnership)(nil), "halo.aggregator.v2.MsgTransferOwnership") + proto.RegisterType((*MsgTransferOwnershipResponse)(nil), "halo.aggregator.v2.MsgTransferOwnershipResponse") +} + +func init() { proto.RegisterFile("halo/aggregator/v2/tx.proto", fileDescriptor_d54c0eebbffa764b) } + +var fileDescriptor_d54c0eebbffa764b = []byte{ + // 567 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xb6, 0x5b, 0x28, 0xcd, 0xb5, 0x08, 0xd5, 0x04, 0x35, 0x31, 0xc5, 0x29, 0x66, 0x20, 0x0a, + 0x8a, 0x6d, 0x02, 0x0b, 0x61, 0x6a, 0x27, 0x82, 0x14, 0x8a, 0xdc, 0x4e, 0x2c, 0xe1, 0x12, 0x1f, + 0x17, 0x8b, 0xfa, 0xce, 0xba, 0xbb, 0xfc, 0x60, 0x43, 0x4c, 0x88, 0x89, 0x3f, 0xa1, 0x23, 0x63, + 0x86, 0xb2, 0x33, 0x56, 0x4c, 0x55, 0x27, 0xd4, 0xa1, 0x42, 0xc9, 0x10, 0xfe, 0x0c, 0xe4, 0x5f, + 0xc1, 0xa4, 0x0d, 0x54, 0x59, 0x6c, 0xdf, 0xbd, 0xef, 0xbb, 0xf7, 0xbe, 0xf7, 0x3e, 0x1f, 0xb8, + 0xdd, 0x86, 0xfb, 0xd4, 0x84, 0x18, 0x33, 0x84, 0xa1, 0xa0, 0xcc, 0xec, 0x56, 0x4c, 0xd1, 0x37, + 0x7c, 0x46, 0x05, 0x55, 0x94, 0x20, 0x68, 0xfc, 0x09, 0x1a, 0xdd, 0x8a, 0xba, 0x06, 0x3d, 0x97, + 0x50, 0x33, 0x7c, 0x46, 0x30, 0x75, 0xbd, 0x45, 0xb9, 0x47, 0xb9, 0xe9, 0x71, 0x6c, 0x76, 0x1f, + 0x06, 0xaf, 0x38, 0x90, 0x8f, 0x02, 0x8d, 0x70, 0x65, 0x46, 0x8b, 0x38, 0x94, 0xc5, 0x14, 0xd3, + 0x68, 0x3f, 0xf8, 0x8a, 0x76, 0xf5, 0x53, 0x19, 0xac, 0xd4, 0x39, 0xde, 0x63, 0x90, 0x70, 0xcf, + 0x15, 0x8a, 0x05, 0x96, 0xb8, 0x8b, 0x09, 0x62, 0x39, 0x79, 0x53, 0x2e, 0x66, 0xb6, 0x73, 0x27, + 0x87, 0xe5, 0x6c, 0x7c, 0xce, 0x96, 0xe3, 0x30, 0xc4, 0xf9, 0xae, 0x60, 0x2e, 0xc1, 0x76, 0x8c, + 0x53, 0x9e, 0x81, 0x25, 0x48, 0x78, 0x0f, 0xb1, 0xdc, 0x42, 0xc8, 0xb0, 0x8e, 0xce, 0x0a, 0xd2, + 0xe9, 0x59, 0xe1, 0x56, 0xc4, 0xe2, 0xce, 0x5b, 0xc3, 0xa5, 0xa6, 0x07, 0x45, 0xdb, 0xa8, 0x11, + 0x71, 0x72, 0x58, 0x06, 0xf1, 0x71, 0x35, 0x22, 0xbe, 0x8c, 0x07, 0x25, 0xd9, 0x8e, 0xf9, 0xca, + 0x1d, 0x00, 0x3a, 0xbe, 0x03, 0x05, 0x72, 0x1a, 0x50, 0xe4, 0x16, 0x37, 0xe5, 0xe2, 0x75, 0x3b, + 0x13, 0xef, 0x6c, 0x89, 0xaa, 0xf5, 0xf1, 0xa0, 0x20, 0xfd, 0x3a, 0x28, 0x48, 0x1f, 0xc6, 0x83, + 0x52, 0x9c, 0xfd, 0xd3, 0x78, 0x50, 0xca, 0x4d, 0x37, 0x34, 0x11, 0xa3, 0x5b, 0xe0, 0x66, 0x4a, + 0x9b, 0x8d, 0xb8, 0x4f, 0x09, 0x47, 0x4a, 0x1e, 0x2c, 0x33, 0xda, 0x21, 0x4e, 0xc3, 0x75, 0x42, + 0x95, 0x57, 0xec, 0x6b, 0xe1, 0xba, 0xe6, 0xe8, 0xdf, 0x65, 0x70, 0xa3, 0xce, 0xf1, 0x2e, 0x12, + 0x2f, 0x50, 0x5f, 0xbc, 0x64, 0x6e, 0x0b, 0xcd, 0xd1, 0x92, 0x1d, 0x00, 0x08, 0xea, 0x8b, 0x86, + 0x1f, 0xf0, 0xe7, 0x6e, 0x4b, 0x86, 0x24, 0x25, 0x54, 0x1f, 0xcf, 0x90, 0xbe, 0x31, 0x2d, 0x3d, + 0x5d, 0xb8, 0x9e, 0x07, 0xeb, 0x53, 0x5a, 0x92, 0x16, 0xe8, 0xdf, 0x64, 0x90, 0x4d, 0x5a, 0xf3, + 0x06, 0xb1, 0x9d, 0x1e, 0x41, 0x8c, 0xb7, 0x5d, 0x7f, 0x0e, 0xb1, 0x4f, 0xc1, 0x2a, 0x41, 0xbd, + 0x06, 0x43, 0x3e, 0x65, 0x62, 0xe2, 0x82, 0xd9, 0xbc, 0x15, 0x82, 0x7a, 0x76, 0x0c, 0xae, 0x3e, + 0x99, 0x21, 0xec, 0xee, 0x85, 0x33, 0x4d, 0x57, 0xaa, 0x6b, 0x60, 0xe3, 0x22, 0x05, 0x89, 0xc4, + 0xca, 0xd7, 0x05, 0xb0, 0x58, 0xe7, 0x58, 0xd9, 0x03, 0xcb, 0x13, 0x77, 0x17, 0x8c, 0xf3, 0xff, + 0x97, 0x91, 0xb2, 0x88, 0x7a, 0xff, 0x3f, 0x80, 0x89, 0x87, 0x5e, 0x83, 0xd5, 0xbf, 0x4c, 0x72, + 0x6f, 0x06, 0x31, 0x0d, 0x52, 0x1f, 0x5c, 0x02, 0x34, 0xc9, 0x40, 0xc1, 0xda, 0xf9, 0xf1, 0x14, + 0xff, 0x55, 0x5f, 0x1a, 0xa9, 0x5a, 0x97, 0x45, 0x26, 0x09, 0xd5, 0xab, 0xef, 0x03, 0xdb, 0x6d, + 0x3f, 0x3f, 0x1a, 0x6a, 0xf2, 0xf1, 0x50, 0x93, 0x7f, 0x0e, 0x35, 0xf9, 0xf3, 0x48, 0x93, 0x8e, + 0x47, 0x9a, 0xf4, 0x63, 0xa4, 0x49, 0xaf, 0x2c, 0xec, 0x8a, 0x76, 0xa7, 0x69, 0xb4, 0xa8, 0x67, + 0x12, 0xda, 0xdc, 0x47, 0x65, 0xc8, 0x39, 0x12, 0xdc, 0x0c, 0x87, 0x15, 0x5c, 0x63, 0xef, 0x7c, + 0xc4, 0x53, 0x53, 0x6b, 0x2e, 0x85, 0x97, 0xcc, 0xa3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x82, + 0xf6, 0xce, 0x3a, 0xf4, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -336,7 +332,7 @@ 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 MsgClient interface { - ReportBalance(ctx context.Context, in *MsgReportBalance, opts ...grpc.CallOption) (*MsgReportBalanceResponse, error) + Transmit(ctx context.Context, in *MsgTransmit, opts ...grpc.CallOption) (*MsgTransmitResponse, error) SetNextPrice(ctx context.Context, in *MsgSetNextPrice, opts ...grpc.CallOption) (*MsgSetNextPriceResponse, error) TransferOwnership(ctx context.Context, in *MsgTransferOwnership, opts ...grpc.CallOption) (*MsgTransferOwnershipResponse, error) } @@ -349,9 +345,9 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) ReportBalance(ctx context.Context, in *MsgReportBalance, opts ...grpc.CallOption) (*MsgReportBalanceResponse, error) { - out := new(MsgReportBalanceResponse) - err := c.cc.Invoke(ctx, "/halo.aggregator.v1.Msg/ReportBalance", in, out, opts...) +func (c *msgClient) Transmit(ctx context.Context, in *MsgTransmit, opts ...grpc.CallOption) (*MsgTransmitResponse, error) { + out := new(MsgTransmitResponse) + err := c.cc.Invoke(ctx, "/halo.aggregator.v2.Msg/Transmit", in, out, opts...) if err != nil { return nil, err } @@ -360,7 +356,7 @@ func (c *msgClient) ReportBalance(ctx context.Context, in *MsgReportBalance, opt func (c *msgClient) SetNextPrice(ctx context.Context, in *MsgSetNextPrice, opts ...grpc.CallOption) (*MsgSetNextPriceResponse, error) { out := new(MsgSetNextPriceResponse) - err := c.cc.Invoke(ctx, "/halo.aggregator.v1.Msg/SetNextPrice", in, out, opts...) + err := c.cc.Invoke(ctx, "/halo.aggregator.v2.Msg/SetNextPrice", in, out, opts...) if err != nil { return nil, err } @@ -369,7 +365,7 @@ func (c *msgClient) SetNextPrice(ctx context.Context, in *MsgSetNextPrice, opts func (c *msgClient) TransferOwnership(ctx context.Context, in *MsgTransferOwnership, opts ...grpc.CallOption) (*MsgTransferOwnershipResponse, error) { out := new(MsgTransferOwnershipResponse) - err := c.cc.Invoke(ctx, "/halo.aggregator.v1.Msg/TransferOwnership", in, out, opts...) + err := c.cc.Invoke(ctx, "/halo.aggregator.v2.Msg/TransferOwnership", in, out, opts...) if err != nil { return nil, err } @@ -378,7 +374,7 @@ func (c *msgClient) TransferOwnership(ctx context.Context, in *MsgTransferOwners // MsgServer is the server API for Msg service. type MsgServer interface { - ReportBalance(context.Context, *MsgReportBalance) (*MsgReportBalanceResponse, error) + Transmit(context.Context, *MsgTransmit) (*MsgTransmitResponse, error) SetNextPrice(context.Context, *MsgSetNextPrice) (*MsgSetNextPriceResponse, error) TransferOwnership(context.Context, *MsgTransferOwnership) (*MsgTransferOwnershipResponse, error) } @@ -387,8 +383,8 @@ type MsgServer interface { type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) ReportBalance(ctx context.Context, req *MsgReportBalance) (*MsgReportBalanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReportBalance not implemented") +func (*UnimplementedMsgServer) Transmit(ctx context.Context, req *MsgTransmit) (*MsgTransmitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Transmit not implemented") } func (*UnimplementedMsgServer) SetNextPrice(ctx context.Context, req *MsgSetNextPrice) (*MsgSetNextPriceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetNextPrice not implemented") @@ -401,20 +397,20 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } -func _Msg_ReportBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgReportBalance) +func _Msg_Transmit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTransmit) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).ReportBalance(ctx, in) + return srv.(MsgServer).Transmit(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/halo.aggregator.v1.Msg/ReportBalance", + FullMethod: "/halo.aggregator.v2.Msg/Transmit", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ReportBalance(ctx, req.(*MsgReportBalance)) + return srv.(MsgServer).Transmit(ctx, req.(*MsgTransmit)) } return interceptor(ctx, in, info, handler) } @@ -429,7 +425,7 @@ func _Msg_SetNextPrice_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/halo.aggregator.v1.Msg/SetNextPrice", + FullMethod: "/halo.aggregator.v2.Msg/SetNextPrice", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).SetNextPrice(ctx, req.(*MsgSetNextPrice)) @@ -447,7 +443,7 @@ func _Msg_TransferOwnership_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/halo.aggregator.v1.Msg/TransferOwnership", + FullMethod: "/halo.aggregator.v2.Msg/TransferOwnership", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).TransferOwnership(ctx, req.(*MsgTransferOwnership)) @@ -457,12 +453,12 @@ func _Msg_TransferOwnership_Handler(srv interface{}, ctx context.Context, dec fu var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "halo.aggregator.v1.Msg", + ServiceName: "halo.aggregator.v2.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "ReportBalance", - Handler: _Msg_ReportBalance_Handler, + MethodName: "Transmit", + Handler: _Msg_Transmit_Handler, }, { MethodName: "SetNextPrice", @@ -474,10 +470,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "halo/aggregator/v1/tx.proto", + Metadata: "halo/aggregator/v2/tx.proto", } -func (m *MsgReportBalance) Marshal() (dAtA []byte, err error) { +func (m *MsgTransmit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -487,50 +483,25 @@ func (m *MsgReportBalance) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgReportBalance) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgTransmit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgReportBalance) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgTransmit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size := m.NextPrice.Size() - i -= size - if _, err := m.NextPrice.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size := m.TotalSupply.Size() - i -= size - if _, err := m.TotalSupply.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.Interest.Size() - i -= size - if _, err := m.Interest.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) + if m.UpdatedAt != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.UpdatedAt)) + i-- + dAtA[i] = 0x18 } - i-- - dAtA[i] = 0x1a { - size := m.Principal.Size() + size := m.Answer.Size() i -= size - if _, err := m.Principal.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.Answer.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintTx(dAtA, i, uint64(size)) @@ -547,7 +518,7 @@ func (m *MsgReportBalance) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgReportBalanceResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgTransmitResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -557,12 +528,12 @@ func (m *MsgReportBalanceResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgReportBalanceResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgTransmitResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgReportBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgTransmitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -658,10 +629,10 @@ func (m *MsgTransferOwnership) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.NewOwner) > 0 { - i -= len(m.NewOwner) - copy(dAtA[i:], m.NewOwner) - i = encodeVarintTx(dAtA, i, uint64(len(m.NewOwner))) + if len(m.NewReporter) > 0 { + i -= len(m.NewReporter) + copy(dAtA[i:], m.NewReporter) + i = encodeVarintTx(dAtA, i, uint64(len(m.NewReporter))) i-- dAtA[i] = 0x12 } @@ -709,7 +680,7 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *MsgReportBalance) Size() (n int) { +func (m *MsgTransmit) Size() (n int) { if m == nil { return 0 } @@ -719,18 +690,15 @@ func (m *MsgReportBalance) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.Principal.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.Interest.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.TotalSupply.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.NextPrice.Size() + l = m.Answer.Size() n += 1 + l + sovTx(uint64(l)) + if m.UpdatedAt != 0 { + n += 1 + sovTx(uint64(m.UpdatedAt)) + } return n } -func (m *MsgReportBalanceResponse) Size() (n int) { +func (m *MsgTransmitResponse) Size() (n int) { if m == nil { return 0 } @@ -776,7 +744,7 @@ func (m *MsgTransferOwnership) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.NewOwner) + l = len(m.NewReporter) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -798,7 +766,7 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *MsgReportBalance) Unmarshal(dAtA []byte) error { +func (m *MsgTransmit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -821,10 +789,10 @@ func (m *MsgReportBalance) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgReportBalance: wiretype end group for non-group") + return fmt.Errorf("proto: MsgTransmit: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgReportBalance: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgTransmit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -861,7 +829,7 @@ func (m *MsgReportBalance) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Answer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -889,83 +857,15 @@ func (m *MsgReportBalance) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Principal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Answer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interest", 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 - } - if err := m.Interest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalSupply", 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 - } - if err := m.TotalSupply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPrice", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } - var stringLen uint64 + m.UpdatedAt = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -975,26 +875,11 @@ func (m *MsgReportBalance) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.UpdatedAt |= uint32(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 - } - if err := m.NextPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -1016,7 +901,7 @@ func (m *MsgReportBalance) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgReportBalanceResponse) Unmarshal(dAtA []byte) error { +func (m *MsgTransmitResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1039,10 +924,10 @@ func (m *MsgReportBalanceResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgReportBalanceResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgTransmitResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgReportBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgTransmitResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1314,7 +1199,7 @@ func (m *MsgTransferOwnership) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewOwner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NewReporter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1342,7 +1227,7 @@ func (m *MsgTransferOwnership) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NewOwner = string(dAtA[iNdEx:postIndex]) + m.NewReporter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/types/aggregator/v1/aggregator.pb.go b/types/aggregator/v1/aggregator.pb.go new file mode 100644 index 0000000..94dad30 --- /dev/null +++ b/types/aggregator/v1/aggregator.pb.go @@ -0,0 +1,503 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: halo/aggregator/v1/aggregator.proto + +package v1 + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type RoundData struct { + Answer cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=answer,proto3,customtype=cosmossdk.io/math.Int" json:"answer"` + Balance cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=balance,proto3,customtype=cosmossdk.io/math.Int" json:"balance"` + Interest cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=interest,proto3,customtype=cosmossdk.io/math.Int" json:"interest"` + Supply cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=supply,proto3,customtype=cosmossdk.io/math.Int" json:"supply"` + UpdatedAt int64 `protobuf:"varint,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (m *RoundData) Reset() { *m = RoundData{} } +func (m *RoundData) String() string { return proto.CompactTextString(m) } +func (*RoundData) ProtoMessage() {} +func (*RoundData) Descriptor() ([]byte, []int) { + return fileDescriptor_dab90eca84edcf6d, []int{0} +} +func (m *RoundData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoundData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoundData.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 *RoundData) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoundData.Merge(m, src) +} +func (m *RoundData) XXX_Size() int { + return m.Size() +} +func (m *RoundData) XXX_DiscardUnknown() { + xxx_messageInfo_RoundData.DiscardUnknown(m) +} + +var xxx_messageInfo_RoundData proto.InternalMessageInfo + +func (m *RoundData) GetUpdatedAt() int64 { + if m != nil { + return m.UpdatedAt + } + return 0 +} + +func init() { + proto.RegisterType((*RoundData)(nil), "halo.aggregator.v1.RoundData") +} + +func init() { + proto.RegisterFile("halo/aggregator/v1/aggregator.proto", fileDescriptor_dab90eca84edcf6d) +} + +var fileDescriptor_dab90eca84edcf6d = []byte{ + // 323 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xce, 0x48, 0xcc, 0xc9, + 0xd7, 0x4f, 0x4c, 0x4f, 0x2f, 0x4a, 0x4d, 0x4f, 0x2c, 0xc9, 0x2f, 0xd2, 0x2f, 0x33, 0x44, 0xe2, + 0xe9, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x81, 0x14, 0xe9, 0x21, 0x09, 0x97, 0x19, 0x4a, + 0x09, 0x26, 0xe6, 0x66, 0xe6, 0xe5, 0xeb, 0x83, 0x49, 0x88, 0x32, 0x29, 0xc9, 0xe4, 0xfc, 0xe2, + 0xdc, 0xfc, 0xe2, 0x78, 0x30, 0x4f, 0x1f, 0xc2, 0x81, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x43, + 0xc4, 0x41, 0x2c, 0x88, 0xa8, 0xd2, 0x0d, 0x26, 0x2e, 0xce, 0xa0, 0xfc, 0xd2, 0xbc, 0x14, 0x97, + 0xc4, 0x92, 0x44, 0x21, 0x0f, 0x2e, 0xb6, 0xc4, 0xbc, 0xe2, 0xf2, 0xd4, 0x22, 0x09, 0x46, 0x05, + 0x46, 0x0d, 0x4e, 0x27, 0x83, 0x13, 0xf7, 0xe4, 0x19, 0x6e, 0xdd, 0x93, 0x17, 0x85, 0x98, 0x54, + 0x9c, 0x92, 0xad, 0x97, 0x99, 0xaf, 0x9f, 0x9b, 0x58, 0x92, 0xa1, 0xe7, 0x99, 0x57, 0x72, 0x69, + 0x8b, 0x2e, 0x17, 0xd4, 0x0a, 0xcf, 0xbc, 0x92, 0x15, 0xcf, 0x37, 0x68, 0x31, 0x06, 0x41, 0xf5, + 0x0b, 0x79, 0x71, 0xb1, 0x27, 0x25, 0xe6, 0x24, 0xe6, 0x25, 0xa7, 0x4a, 0x30, 0x91, 0x69, 0x14, + 0xcc, 0x00, 0x21, 0x1f, 0x2e, 0x8e, 0xcc, 0xbc, 0x92, 0xd4, 0xa2, 0xd4, 0xe2, 0x12, 0x09, 0x66, + 0x32, 0x0d, 0x83, 0x9b, 0x00, 0xf2, 0x63, 0x71, 0x69, 0x41, 0x41, 0x4e, 0xa5, 0x04, 0x0b, 0xb9, + 0x7e, 0x84, 0xe8, 0x17, 0x92, 0xe5, 0xe2, 0x2a, 0x2d, 0x48, 0x49, 0x2c, 0x49, 0x4d, 0x89, 0x4f, + 0x2c, 0x91, 0x60, 0x55, 0x60, 0xd4, 0x60, 0x0e, 0xe2, 0x84, 0x8a, 0x38, 0x96, 0x38, 0xf9, 0x9e, + 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, + 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x71, 0x7a, 0x66, 0x49, 0x46, 0x69, + 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x5e, 0x7e, 0x52, 0x4e, 0xaa, 0x6e, 0x62, 0x71, 0x71, 0x6a, + 0x49, 0xb1, 0x3e, 0x38, 0x25, 0x94, 0x19, 0xe9, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xa3, 0x26, 0x89, + 0x24, 0x36, 0x70, 0x84, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xdc, 0xd0, 0xe7, 0x9f, 0x2f, + 0x02, 0x00, 0x00, +} + +func (m *RoundData) 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 *RoundData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoundData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UpdatedAt != 0 { + i = encodeVarintAggregator(dAtA, i, uint64(m.UpdatedAt)) + i-- + dAtA[i] = 0x28 + } + { + size := m.Supply.Size() + i -= size + if _, err := m.Supply.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAggregator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.Interest.Size() + i -= size + if _, err := m.Interest.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAggregator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Balance.Size() + i -= size + if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAggregator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Answer.Size() + i -= size + if _, err := m.Answer.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAggregator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintAggregator(dAtA []byte, offset int, v uint64) int { + offset -= sovAggregator(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *RoundData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Answer.Size() + n += 1 + l + sovAggregator(uint64(l)) + l = m.Balance.Size() + n += 1 + l + sovAggregator(uint64(l)) + l = m.Interest.Size() + n += 1 + l + sovAggregator(uint64(l)) + l = m.Supply.Size() + n += 1 + l + sovAggregator(uint64(l)) + if m.UpdatedAt != 0 { + n += 1 + sovAggregator(uint64(m.UpdatedAt)) + } + return n +} + +func sovAggregator(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAggregator(x uint64) (n int) { + return sovAggregator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *RoundData) 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 ErrIntOverflowAggregator + } + 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: RoundData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoundData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Answer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAggregator + } + 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 ErrInvalidLengthAggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Answer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAggregator + } + 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 ErrInvalidLengthAggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Interest", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAggregator + } + 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 ErrInvalidLengthAggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Interest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supply", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAggregator + } + 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 ErrInvalidLengthAggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Supply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) + } + m.UpdatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAggregator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UpdatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAggregator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAggregator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAggregator(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAggregator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAggregator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAggregator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthAggregator + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAggregator + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAggregator + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAggregator = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAggregator = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAggregator = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/genesis.pb.go b/types/genesis.pb.go index f2721ff..db43af0 100644 --- a/types/genesis.pb.go +++ b/types/genesis.pb.go @@ -106,30 +106,31 @@ func init() { func init() { proto.RegisterFile("halo/v1/genesis.proto", fileDescriptor_7afc1cd6dd6a46b0) } var fileDescriptor_7afc1cd6dd6a46b0 = []byte{ - // 363 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xcf, 0x4a, 0xc3, 0x40, - 0x10, 0xc6, 0x93, 0xfe, 0x93, 0x6e, 0x05, 0x6b, 0xa8, 0x10, 0x73, 0x88, 0xb1, 0x20, 0xf4, 0xd2, - 0x0d, 0xad, 0x17, 0xeb, 0x45, 0x2c, 0x88, 0x37, 0xc1, 0xf4, 0x20, 0x78, 0x29, 0x69, 0x3b, 0x6c, - 0x83, 0xe9, 0x6e, 0xd9, 0xdd, 0x46, 0xfa, 0x16, 0x3e, 0x8c, 0x0f, 0xd1, 0x63, 0xf1, 0xe4, 0x49, - 0x4a, 0xfb, 0x22, 0x92, 0xdd, 0x40, 0x23, 0xc5, 0xdb, 0xcc, 0x37, 0xdf, 0xfc, 0x76, 0x76, 0x76, - 0xd1, 0xd9, 0x34, 0x8c, 0x99, 0x9f, 0x74, 0x7c, 0x02, 0x14, 0x44, 0x24, 0xf0, 0x9c, 0x33, 0xc9, - 0xac, 0xa3, 0x54, 0xc6, 0x49, 0xc7, 0x39, 0x1f, 0x33, 0x31, 0x63, 0x62, 0xa8, 0x64, 0x5f, 0x27, - 0xda, 0xe3, 0x34, 0x08, 0x23, 0x4c, 0xeb, 0x69, 0x94, 0xa9, 0x9e, 0x02, 0x86, 0x84, 0x70, 0x20, - 0xa1, 0x64, 0xfc, 0x80, 0xed, 0x34, 0x95, 0x03, 0xa8, 0x8c, 0x64, 0x0c, 0x33, 0xa0, 0x52, 0x1c, - 0x78, 0x9a, 0x9b, 0x02, 0x3a, 0x7e, 0xd4, 0xca, 0x40, 0x86, 0x12, 0xac, 0x67, 0x54, 0xdf, 0x33, - 0x87, 0x22, 0xd5, 0x6c, 0xd3, 0x33, 0x5b, 0xb5, 0xae, 0x87, 0xd5, 0xac, 0xfb, 0x2a, 0x4e, 0x3a, - 0x38, 0xdf, 0xdb, 0x2f, 0xad, 0x7e, 0x2e, 0x8c, 0xe0, 0x64, 0xef, 0xd0, 0xc8, 0x17, 0x64, 0xe5, - 0x87, 0xc8, 0xa0, 0x05, 0x05, 0x6d, 0x6a, 0x68, 0xbe, 0xfe, 0x0f, 0xf6, 0x34, 0xef, 0xd1, 0x60, - 0x8c, 0xca, 0xec, 0x9d, 0x02, 0xb7, 0x8b, 0x9e, 0xd9, 0xaa, 0xf6, 0xed, 0xaf, 0xcf, 0x76, 0x23, - 0xdb, 0xdc, 0xfd, 0x64, 0xc2, 0x41, 0x88, 0x81, 0xe4, 0x11, 0x25, 0x81, 0xb6, 0x59, 0x3d, 0x54, - 0xa1, 0x8c, 0x8e, 0x41, 0xd8, 0x25, 0xaf, 0xd8, 0xaa, 0x75, 0x2f, 0x71, 0xb6, 0xfd, 0x3f, 0xe7, - 0xe1, 0x27, 0xe5, 0x79, 0xa0, 0x92, 0x2f, 0x83, 0xac, 0xc1, 0xe9, 0xa1, 0x5a, 0x4e, 0xb6, 0xea, - 0xa8, 0xf8, 0x06, 0x4b, 0xb5, 0x98, 0x6a, 0x90, 0x86, 0x56, 0x03, 0x95, 0x93, 0x30, 0x5e, 0xe8, - 0x7b, 0x95, 0x02, 0x9d, 0xdc, 0x16, 0x6e, 0xcc, 0xfe, 0xdd, 0x6a, 0xeb, 0x9a, 0xeb, 0xad, 0x6b, - 0x6e, 0xb6, 0xae, 0xf9, 0xb1, 0x73, 0x8d, 0xf5, 0xce, 0x35, 0xbe, 0x77, 0xae, 0xf1, 0x7a, 0x45, - 0x22, 0x39, 0x5d, 0x8c, 0xf0, 0x98, 0xcd, 0x7c, 0xca, 0x46, 0x31, 0xb4, 0x43, 0x21, 0x40, 0x0a, - 0x5f, 0xff, 0x95, 0xae, 0x2f, 0x97, 0x73, 0x10, 0xa3, 0x8a, 0x7a, 0xaa, 0xeb, 0xdf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x2f, 0x70, 0x99, 0xa4, 0x43, 0x02, 0x00, 0x00, + // 369 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0x4f, 0x6b, 0xf2, 0x40, + 0x10, 0xc6, 0x13, 0xff, 0xbd, 0xb8, 0xbe, 0xf0, 0xfa, 0x06, 0x0b, 0x69, 0x0e, 0x69, 0x2a, 0x14, + 0xbc, 0xb8, 0xc1, 0xf4, 0x52, 0x7b, 0x29, 0x15, 0x4a, 0x6f, 0x85, 0xc6, 0x43, 0xa1, 0x17, 0x89, + 0x3a, 0xac, 0xa1, 0x71, 0x57, 0x76, 0xd7, 0x14, 0xbf, 0x45, 0x3f, 0x4c, 0x3f, 0x84, 0x47, 0xe9, + 0xa9, 0xa7, 0x22, 0xfa, 0x45, 0x4a, 0x76, 0x03, 0x46, 0xda, 0xdb, 0xcc, 0x33, 0xcf, 0xfc, 0x66, + 0x32, 0x59, 0x74, 0x32, 0x8b, 0x12, 0xe6, 0xa7, 0x3d, 0x9f, 0x00, 0x05, 0x11, 0x0b, 0xbc, 0xe0, + 0x4c, 0x32, 0xeb, 0x4f, 0x26, 0xe3, 0xb4, 0xe7, 0x9c, 0x4e, 0x98, 0x98, 0x33, 0x31, 0x52, 0xb2, + 0xaf, 0x13, 0xed, 0x71, 0x5a, 0x84, 0x11, 0xa6, 0xf5, 0x2c, 0xca, 0x55, 0x4f, 0x01, 0x23, 0x42, + 0x38, 0x90, 0x48, 0x32, 0xee, 0xa7, 0xc1, 0x31, 0xdb, 0x69, 0x2b, 0x07, 0x50, 0x19, 0xcb, 0x04, + 0xe6, 0x40, 0xa5, 0xf8, 0x31, 0xbf, 0xbd, 0x2d, 0xa1, 0xbf, 0xf7, 0x5a, 0x19, 0xca, 0x48, 0x82, + 0xf5, 0x88, 0x9a, 0x07, 0xe6, 0x48, 0x64, 0x9a, 0x6d, 0x7a, 0x66, 0xa7, 0x11, 0x78, 0x58, 0xed, + 0x7a, 0xa8, 0xe2, 0x34, 0xc0, 0xc5, 0xde, 0x41, 0x65, 0xfd, 0x75, 0x66, 0x84, 0xff, 0x0e, 0x0e, + 0x8d, 0x7c, 0x42, 0x56, 0x71, 0x89, 0x1c, 0x5a, 0x52, 0xd0, 0xb6, 0x86, 0x16, 0xeb, 0x38, 0xed, + 0xfd, 0x86, 0xfd, 0x5f, 0xf4, 0x68, 0x30, 0x46, 0x55, 0xf6, 0x4a, 0x81, 0xdb, 0x65, 0xcf, 0xec, + 0xd4, 0x07, 0xf6, 0xc7, 0x7b, 0xb7, 0x95, 0x5f, 0xee, 0x76, 0x3a, 0xe5, 0x20, 0xc4, 0x50, 0xf2, + 0x98, 0x92, 0x50, 0xdb, 0xac, 0x3e, 0xaa, 0x51, 0x46, 0x27, 0x20, 0xec, 0x8a, 0x57, 0xee, 0x34, + 0x82, 0x73, 0x9c, 0x5f, 0xff, 0x68, 0x1e, 0x7e, 0x50, 0x9e, 0x3b, 0x2a, 0xf9, 0x2a, 0xcc, 0x1b, + 0x9c, 0x3e, 0x6a, 0x14, 0x64, 0xab, 0x89, 0xca, 0x2f, 0xb0, 0x52, 0x87, 0xa9, 0x87, 0x59, 0x68, + 0xb5, 0x50, 0x35, 0x8d, 0x92, 0xa5, 0xfe, 0xae, 0x4a, 0xa8, 0x93, 0xeb, 0xd2, 0x95, 0x39, 0xb8, + 0x59, 0xef, 0x5c, 0x73, 0xb3, 0x73, 0xcd, 0xed, 0xce, 0x35, 0xdf, 0xf6, 0xae, 0xb1, 0xd9, 0xbb, + 0xc6, 0xe7, 0xde, 0x35, 0x9e, 0x2f, 0x48, 0x2c, 0x67, 0xcb, 0x31, 0x9e, 0xb0, 0xb9, 0x4f, 0xd9, + 0x38, 0x81, 0x6e, 0x24, 0x04, 0x48, 0xe1, 0xeb, 0xb7, 0x12, 0xf8, 0x72, 0xb5, 0x00, 0x31, 0xae, + 0xa9, 0x5f, 0x75, 0xf9, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xe8, 0xfe, 0x20, 0x94, 0x43, 0x02, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/utils/data/rounds.go b/utils/data/rounds.go deleted file mode 100644 index fbab443..0000000 --- a/utils/data/rounds.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2024 NASD Inc. -// -// Use of this source code is governed by a BSL-style -// license that can be found in the LICENSE file or at -// https://mariadb.com/bsl11. - -package data - -import ( - "cosmossdk.io/math" - "github.com/noble-assets/halo/v2/types/aggregator" - "github.com/noble-assets/halo/v2/utils" -) - -var EthereumRounds = []struct { - Msg aggregator.MsgReportBalance - Answer math.Int -}{ - { - // https://etherscan.io/tx/0xbcba4db502a72e51a05b378d2e5867be4c60936585cedaf5aad90002f0599428 - Msg: aggregator.MsgReportBalance{ - Principal: utils.MustParseInt("4790909990"), - Interest: utils.MustParseInt("701123"), - TotalSupply: utils.MustParseInt("46169872257060"), - NextPrice: utils.MustParseInt("103794354"), - }, - Answer: utils.MustParseInt("103780685"), - }, - { - // https://etherscan.io/tx/0xd986b4f0367ae38ecca94452a6f3cb471379712f24f42fe85b53c0b420041b3b - Msg: aggregator.MsgReportBalance{ - Principal: utils.MustParseInt("4785004746"), - Interest: utils.MustParseInt("698930"), - TotalSupply: utils.MustParseInt("46106890838455"), - NextPrice: utils.MustParseInt("103807973"), - }, - Answer: utils.MustParseInt("103794328"), - }, - { - // https://etherscan.io/tx/0x1ce8bb109574bd8e39f979f87c6d516eb09a4ced111ef4b6a2c2d6b5a9dcf746 - Msg: aggregator.MsgReportBalance{ - Principal: utils.MustParseInt("4785703676"), - Interest: utils.MustParseInt("676614"), - TotalSupply: utils.MustParseInt("46107564218218"), - NextPrice: utils.MustParseInt("103821180"), - }, - Answer: utils.MustParseInt("103807535"), - }, - { - // https://etherscan.io/tx/0xc2fe6053f8758f0968ec1595ab5018d60a3d4ae3dc0e47c5c1699b6f4156191d - Msg: aggregator.MsgReportBalance{ - Principal: utils.MustParseInt("4796380420"), - Interest: utils.MustParseInt("687997"), - TotalSupply: utils.MustParseInt("46204549387934"), - NextPrice: utils.MustParseInt("103861146"), - }, - Answer: utils.MustParseInt("103820937"), - }, - { - // https://etherscan.io/tx/0x25e2f62b50b35dd985ad4827013b3e365f68a565e0e6aaf78dde58ca934ce70e - Msg: aggregator.MsgReportBalance{ - Principal: utils.MustParseInt("4597451007"), - Interest: utils.MustParseInt("1981867"), - TotalSupply: utils.MustParseInt("44282503451837"), - NextPrice: utils.MustParseInt("103874647"), - }, - Answer: utils.MustParseInt("103861216"), - }, - { - // https://etherscan.io/tx/0x8d6146ed696752a8400f40750baf6515ebc63da7e102976f779da495356ec5cc - Msg: aggregator.MsgReportBalance{ - Principal: utils.MustParseInt("4599432874"), - Interest: utils.MustParseInt("659658"), - TotalSupply: utils.MustParseInt("44284411639586"), - NextPrice: utils.MustParseInt("103888030"), - }, - Answer: utils.MustParseInt("103874623"), - }, - { - // https://etherscan.io/tx/0xe8154863cf89175c9ec361999ec7ddeebf7c29297ee62325f777067409071303 - Msg: aggregator.MsgReportBalance{ - Principal: utils.MustParseInt("4600092532"), - Interest: utils.MustParseInt("658503"), - TotalSupply: utils.MustParseInt("44285046691710"), - NextPrice: utils.MustParseInt("103901390"), - }, - Answer: utils.MustParseInt("103888005"), - }, - { - // https://etherscan.io/tx/0x1a628856cb74de37357a35c29ec22509b72b1fc826ac7bb1020c73a99f9f80fc - Msg: aggregator.MsgReportBalance{ - Principal: utils.MustParseInt("4600751035"), - Interest: utils.MustParseInt("657348"), - TotalSupply: utils.MustParseInt("44285680550257"), - NextPrice: utils.MustParseInt("103914726"), - }, - Answer: utils.MustParseInt("103901364"), - }, - { - // https://etherscan.io/tx/0x5cc762e8201084220a63bdf97dd8d07b87d1a95cbd528d388c41e054aa86e52a - Msg: aggregator.MsgReportBalance{ - Principal: utils.MustParseInt("4601408383"), - Interest: utils.MustParseInt("657442"), - TotalSupply: utils.MustParseInt("44286313215676"), - NextPrice: utils.MustParseInt("103954812"), - }, - Answer: utils.MustParseInt("103914725"), - }, - { - // https://etherscan.io/tx/0x5122f8dd032fccd723fc3f1bda4cf0b3074731ef44208ed13dee11b0b138ee92 - Msg: aggregator.MsgReportBalance{ - Principal: utils.MustParseInt("4602370972"), - Interest: utils.MustParseInt("1976357"), - TotalSupply: utils.MustParseInt("44289882403775"), - NextPrice: utils.MustParseInt("103968279"), - }, - Answer: utils.MustParseInt("103954886"), - }, -}