diff --git a/api/slinky/marketmap/v1/query_grpc.pb.go b/api/slinky/marketmap/v1/query_grpc.pb.go index b61110a26..0ab689036 100644 --- a/api/slinky/marketmap/v1/query_grpc.pb.go +++ b/api/slinky/marketmap/v1/query_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: slinky/marketmap/v1/query.proto @@ -15,8 +15,8 @@ import ( // 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.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Query_MarketMap_FullMethodName = "/slinky.marketmap.v1.Query/MarketMap" @@ -93,7 +93,7 @@ func (c *queryClient) Params(ctx context.Context, in *ParamsRequest, opts ...grp // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer -// for forward compatibility +// for forward compatibility. // // Query is the query service for the x/marketmap module. type QueryServer interface { @@ -110,9 +110,12 @@ type QueryServer interface { mustEmbedUnimplementedQueryServer() } -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} +// 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) MarketMap(context.Context, *MarketMapRequest) (*MarketMapResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MarketMap not implemented") @@ -127,6 +130,7 @@ func (UnimplementedQueryServer) Params(context.Context, *ParamsRequest) (*Params return nil, status.Errorf(codes.Unimplemented, "method Params 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 @@ -136,6 +140,13 @@ type UnsafeQueryServer interface { } 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) } diff --git a/api/slinky/marketmap/v1/tx.pulsar.go b/api/slinky/marketmap/v1/tx.pulsar.go index 012528a4d..110515001 100644 --- a/api/slinky/marketmap/v1/tx.pulsar.go +++ b/api/slinky/marketmap/v1/tx.pulsar.go @@ -13,82 +13,83 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" + sort "sort" sync "sync" ) -var _ protoreflect.List = (*_MsgCreateMarkets_2_list)(nil) +var _ protoreflect.List = (*_MsgUpsertMarkets_2_list)(nil) -type _MsgCreateMarkets_2_list struct { +type _MsgUpsertMarkets_2_list struct { list *[]*Market } -func (x *_MsgCreateMarkets_2_list) Len() int { +func (x *_MsgUpsertMarkets_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_MsgCreateMarkets_2_list) Get(i int) protoreflect.Value { +func (x *_MsgUpsertMarkets_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_MsgCreateMarkets_2_list) Set(i int, value protoreflect.Value) { +func (x *_MsgUpsertMarkets_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Market) (*x.list)[i] = concreteValue } -func (x *_MsgCreateMarkets_2_list) Append(value protoreflect.Value) { +func (x *_MsgUpsertMarkets_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Market) *x.list = append(*x.list, concreteValue) } -func (x *_MsgCreateMarkets_2_list) AppendMutable() protoreflect.Value { +func (x *_MsgUpsertMarkets_2_list) AppendMutable() protoreflect.Value { v := new(Market) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgCreateMarkets_2_list) Truncate(n int) { +func (x *_MsgUpsertMarkets_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_MsgCreateMarkets_2_list) NewElement() protoreflect.Value { +func (x *_MsgUpsertMarkets_2_list) NewElement() protoreflect.Value { v := new(Market) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgCreateMarkets_2_list) IsValid() bool { +func (x *_MsgUpsertMarkets_2_list) IsValid() bool { return x.list != nil } var ( - md_MsgCreateMarkets protoreflect.MessageDescriptor - fd_MsgCreateMarkets_authority protoreflect.FieldDescriptor - fd_MsgCreateMarkets_create_markets protoreflect.FieldDescriptor + md_MsgUpsertMarkets protoreflect.MessageDescriptor + fd_MsgUpsertMarkets_authority protoreflect.FieldDescriptor + fd_MsgUpsertMarkets_markets protoreflect.FieldDescriptor ) func init() { file_slinky_marketmap_v1_tx_proto_init() - md_MsgCreateMarkets = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgCreateMarkets") - fd_MsgCreateMarkets_authority = md_MsgCreateMarkets.Fields().ByName("authority") - fd_MsgCreateMarkets_create_markets = md_MsgCreateMarkets.Fields().ByName("create_markets") + md_MsgUpsertMarkets = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgUpsertMarkets") + fd_MsgUpsertMarkets_authority = md_MsgUpsertMarkets.Fields().ByName("authority") + fd_MsgUpsertMarkets_markets = md_MsgUpsertMarkets.Fields().ByName("markets") } -var _ protoreflect.Message = (*fastReflection_MsgCreateMarkets)(nil) +var _ protoreflect.Message = (*fastReflection_MsgUpsertMarkets)(nil) -type fastReflection_MsgCreateMarkets MsgCreateMarkets +type fastReflection_MsgUpsertMarkets MsgUpsertMarkets -func (x *MsgCreateMarkets) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateMarkets)(x) +func (x *MsgUpsertMarkets) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpsertMarkets)(x) } -func (x *MsgCreateMarkets) slowProtoReflect() protoreflect.Message { +func (x *MsgUpsertMarkets) slowProtoReflect() protoreflect.Message { mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100,43 +101,43 @@ func (x *MsgCreateMarkets) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgCreateMarkets_messageType fastReflection_MsgCreateMarkets_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateMarkets_messageType{} +var _fastReflection_MsgUpsertMarkets_messageType fastReflection_MsgUpsertMarkets_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpsertMarkets_messageType{} -type fastReflection_MsgCreateMarkets_messageType struct{} +type fastReflection_MsgUpsertMarkets_messageType struct{} -func (x fastReflection_MsgCreateMarkets_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateMarkets)(nil) +func (x fastReflection_MsgUpsertMarkets_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpsertMarkets)(nil) } -func (x fastReflection_MsgCreateMarkets_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateMarkets) +func (x fastReflection_MsgUpsertMarkets_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpsertMarkets) } -func (x fastReflection_MsgCreateMarkets_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateMarkets +func (x fastReflection_MsgUpsertMarkets_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpsertMarkets } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgCreateMarkets) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateMarkets +func (x *fastReflection_MsgUpsertMarkets) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpsertMarkets } // 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_MsgCreateMarkets) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateMarkets_messageType +func (x *fastReflection_MsgUpsertMarkets) Type() protoreflect.MessageType { + return _fastReflection_MsgUpsertMarkets_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateMarkets) New() protoreflect.Message { - return new(fastReflection_MsgCreateMarkets) +func (x *fastReflection_MsgUpsertMarkets) New() protoreflect.Message { + return new(fastReflection_MsgUpsertMarkets) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateMarkets) Interface() protoreflect.ProtoMessage { - return (*MsgCreateMarkets)(x) +func (x *fastReflection_MsgUpsertMarkets) Interface() protoreflect.ProtoMessage { + return (*MsgUpsertMarkets)(x) } // Range iterates over every populated field in an undefined order, @@ -144,16 +145,16 @@ func (x *fastReflection_MsgCreateMarkets) 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_MsgCreateMarkets) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgUpsertMarkets) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgCreateMarkets_authority, value) { + if !f(fd_MsgUpsertMarkets_authority, value) { return } } - if len(x.CreateMarkets) != 0 { - value := protoreflect.ValueOfList(&_MsgCreateMarkets_2_list{list: &x.CreateMarkets}) - if !f(fd_MsgCreateMarkets_create_markets, value) { + if len(x.Markets) != 0 { + value := protoreflect.ValueOfList(&_MsgUpsertMarkets_2_list{list: &x.Markets}) + if !f(fd_MsgUpsertMarkets_markets, value) { return } } @@ -170,17 +171,17 @@ func (x *fastReflection_MsgCreateMarkets) 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_MsgCreateMarkets) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgUpsertMarkets) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "slinky.marketmap.v1.MsgCreateMarkets.authority": + case "slinky.marketmap.v1.MsgUpsertMarkets.authority": return x.Authority != "" - case "slinky.marketmap.v1.MsgCreateMarkets.create_markets": - return len(x.CreateMarkets) != 0 + case "slinky.marketmap.v1.MsgUpsertMarkets.markets": + return len(x.Markets) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarkets")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpsertMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarkets does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpsertMarkets does not contain field %s", fd.FullName())) } } @@ -190,17 +191,17 @@ func (x *fastReflection_MsgCreateMarkets) Has(fd protoreflect.FieldDescriptor) b // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCreateMarkets) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgUpsertMarkets) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "slinky.marketmap.v1.MsgCreateMarkets.authority": + case "slinky.marketmap.v1.MsgUpsertMarkets.authority": x.Authority = "" - case "slinky.marketmap.v1.MsgCreateMarkets.create_markets": - x.CreateMarkets = nil + case "slinky.marketmap.v1.MsgUpsertMarkets.markets": + x.Markets = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarkets")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpsertMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarkets does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpsertMarkets does not contain field %s", fd.FullName())) } } @@ -210,22 +211,22 @@ func (x *fastReflection_MsgCreateMarkets) 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_MsgCreateMarkets) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpsertMarkets) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "slinky.marketmap.v1.MsgCreateMarkets.authority": + case "slinky.marketmap.v1.MsgUpsertMarkets.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "slinky.marketmap.v1.MsgCreateMarkets.create_markets": - if len(x.CreateMarkets) == 0 { - return protoreflect.ValueOfList(&_MsgCreateMarkets_2_list{}) + case "slinky.marketmap.v1.MsgUpsertMarkets.markets": + if len(x.Markets) == 0 { + return protoreflect.ValueOfList(&_MsgUpsertMarkets_2_list{}) } - listValue := &_MsgCreateMarkets_2_list{list: &x.CreateMarkets} + listValue := &_MsgUpsertMarkets_2_list{list: &x.Markets} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarkets")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpsertMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarkets does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpsertMarkets does not contain field %s", descriptor.FullName())) } } @@ -239,19 +240,19 @@ func (x *fastReflection_MsgCreateMarkets) Get(descriptor protoreflect.FieldDescr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCreateMarkets) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgUpsertMarkets) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "slinky.marketmap.v1.MsgCreateMarkets.authority": + case "slinky.marketmap.v1.MsgUpsertMarkets.authority": x.Authority = value.Interface().(string) - case "slinky.marketmap.v1.MsgCreateMarkets.create_markets": + case "slinky.marketmap.v1.MsgUpsertMarkets.markets": lv := value.List() - clv := lv.(*_MsgCreateMarkets_2_list) - x.CreateMarkets = *clv.list + clv := lv.(*_MsgUpsertMarkets_2_list) + x.Markets = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarkets")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpsertMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarkets does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpsertMarkets does not contain field %s", fd.FullName())) } } @@ -265,49 +266,49 @@ func (x *fastReflection_MsgCreateMarkets) 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_MsgCreateMarkets) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpsertMarkets) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "slinky.marketmap.v1.MsgCreateMarkets.create_markets": - if x.CreateMarkets == nil { - x.CreateMarkets = []*Market{} + case "slinky.marketmap.v1.MsgUpsertMarkets.markets": + if x.Markets == nil { + x.Markets = []*Market{} } - value := &_MsgCreateMarkets_2_list{list: &x.CreateMarkets} + value := &_MsgUpsertMarkets_2_list{list: &x.Markets} return protoreflect.ValueOfList(value) - case "slinky.marketmap.v1.MsgCreateMarkets.authority": - panic(fmt.Errorf("field authority of message slinky.marketmap.v1.MsgCreateMarkets is not mutable")) + case "slinky.marketmap.v1.MsgUpsertMarkets.authority": + panic(fmt.Errorf("field authority of message slinky.marketmap.v1.MsgUpsertMarkets is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarkets")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpsertMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarkets does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpsertMarkets 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_MsgCreateMarkets) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpsertMarkets) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "slinky.marketmap.v1.MsgCreateMarkets.authority": + case "slinky.marketmap.v1.MsgUpsertMarkets.authority": return protoreflect.ValueOfString("") - case "slinky.marketmap.v1.MsgCreateMarkets.create_markets": + case "slinky.marketmap.v1.MsgUpsertMarkets.markets": list := []*Market{} - return protoreflect.ValueOfList(&_MsgCreateMarkets_2_list{list: &list}) + return protoreflect.ValueOfList(&_MsgUpsertMarkets_2_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarkets")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpsertMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarkets does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpsertMarkets 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_MsgCreateMarkets) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgUpsertMarkets) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgCreateMarkets", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgUpsertMarkets", d.FullName())) } panic("unreachable") } @@ -315,7 +316,7 @@ func (x *fastReflection_MsgCreateMarkets) 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_MsgCreateMarkets) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgUpsertMarkets) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -326,7 +327,7 @@ func (x *fastReflection_MsgCreateMarkets) 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_MsgCreateMarkets) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgUpsertMarkets) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -338,7 +339,7 @@ func (x *fastReflection_MsgCreateMarkets) 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_MsgCreateMarkets) IsValid() bool { +func (x *fastReflection_MsgUpsertMarkets) IsValid() bool { return x != nil } @@ -348,9 +349,9 @@ func (x *fastReflection_MsgCreateMarkets) 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_MsgCreateMarkets) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgUpsertMarkets) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateMarkets) + x := input.Message.Interface().(*MsgUpsertMarkets) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -366,8 +367,8 @@ func (x *fastReflection_MsgCreateMarkets) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.CreateMarkets) > 0 { - for _, e := range x.CreateMarkets { + if len(x.Markets) > 0 { + for _, e := range x.Markets { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } @@ -382,7 +383,7 @@ func (x *fastReflection_MsgCreateMarkets) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateMarkets) + x := input.Message.Interface().(*MsgUpsertMarkets) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -401,9 +402,9 @@ func (x *fastReflection_MsgCreateMarkets) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.CreateMarkets) > 0 { - for iNdEx := len(x.CreateMarkets) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.CreateMarkets[iNdEx]) + if len(x.Markets) > 0 { + for iNdEx := len(x.Markets) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Markets[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -435,7 +436,7 @@ func (x *fastReflection_MsgCreateMarkets) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateMarkets) + x := input.Message.Interface().(*MsgUpsertMarkets) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -467,10 +468,10 @@ func (x *fastReflection_MsgCreateMarkets) 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: MsgCreateMarkets: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpsertMarkets: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateMarkets: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpsertMarkets: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -507,7 +508,7 @@ func (x *fastReflection_MsgCreateMarkets) 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 CreateMarkets", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Markets", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -534,8 +535,8 @@ func (x *fastReflection_MsgCreateMarkets) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.CreateMarkets = append(x.CreateMarkets, &Market{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreateMarkets[len(x.CreateMarkets)-1]); err != nil { + x.Markets = append(x.Markets, &Market{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Markets[len(x.Markets)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -574,24 +575,108 @@ func (x *fastReflection_MsgCreateMarkets) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.Map = (*_MsgUpsertMarketsResponse_1_map)(nil) + +type _MsgUpsertMarketsResponse_1_map struct { + m *map[string]bool +} + +func (x *_MsgUpsertMarketsResponse_1_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_MsgUpsertMarketsResponse_1_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfBool(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_MsgUpsertMarketsResponse_1_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_MsgUpsertMarketsResponse_1_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_MsgUpsertMarketsResponse_1_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfBool(v) +} + +func (x *_MsgUpsertMarketsResponse_1_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.Bool() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_MsgUpsertMarketsResponse_1_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 *_MsgUpsertMarketsResponse_1_map) NewValue() protoreflect.Value { + v := false + return protoreflect.ValueOfBool(v) +} + +func (x *_MsgUpsertMarketsResponse_1_map) IsValid() bool { + return x.m != nil +} + var ( - md_MsgCreateMarketsResponse protoreflect.MessageDescriptor + md_MsgUpsertMarketsResponse protoreflect.MessageDescriptor + fd_MsgUpsertMarketsResponse_market_updates protoreflect.FieldDescriptor ) func init() { file_slinky_marketmap_v1_tx_proto_init() - md_MsgCreateMarketsResponse = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgCreateMarketsResponse") + md_MsgUpsertMarketsResponse = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgUpsertMarketsResponse") + fd_MsgUpsertMarketsResponse_market_updates = md_MsgUpsertMarketsResponse.Fields().ByName("market_updates") } -var _ protoreflect.Message = (*fastReflection_MsgCreateMarketsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgUpsertMarketsResponse)(nil) -type fastReflection_MsgCreateMarketsResponse MsgCreateMarketsResponse +type fastReflection_MsgUpsertMarketsResponse MsgUpsertMarketsResponse -func (x *MsgCreateMarketsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateMarketsResponse)(x) +func (x *MsgUpsertMarketsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpsertMarketsResponse)(x) } -func (x *MsgCreateMarketsResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgUpsertMarketsResponse) slowProtoReflect() protoreflect.Message { mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -603,43 +688,43 @@ func (x *MsgCreateMarketsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgCreateMarketsResponse_messageType fastReflection_MsgCreateMarketsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateMarketsResponse_messageType{} +var _fastReflection_MsgUpsertMarketsResponse_messageType fastReflection_MsgUpsertMarketsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpsertMarketsResponse_messageType{} -type fastReflection_MsgCreateMarketsResponse_messageType struct{} +type fastReflection_MsgUpsertMarketsResponse_messageType struct{} -func (x fastReflection_MsgCreateMarketsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateMarketsResponse)(nil) +func (x fastReflection_MsgUpsertMarketsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpsertMarketsResponse)(nil) } -func (x fastReflection_MsgCreateMarketsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateMarketsResponse) +func (x fastReflection_MsgUpsertMarketsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpsertMarketsResponse) } -func (x fastReflection_MsgCreateMarketsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateMarketsResponse +func (x fastReflection_MsgUpsertMarketsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpsertMarketsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgCreateMarketsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateMarketsResponse +func (x *fastReflection_MsgUpsertMarketsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpsertMarketsResponse } // 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_MsgCreateMarketsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateMarketsResponse_messageType +func (x *fastReflection_MsgUpsertMarketsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpsertMarketsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateMarketsResponse) New() protoreflect.Message { - return new(fastReflection_MsgCreateMarketsResponse) +func (x *fastReflection_MsgUpsertMarketsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpsertMarketsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateMarketsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCreateMarketsResponse)(x) +func (x *fastReflection_MsgUpsertMarketsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpsertMarketsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -647,7 +732,13 @@ func (x *fastReflection_MsgCreateMarketsResponse) 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_MsgCreateMarketsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgUpsertMarketsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.MarketUpdates) != 0 { + value := protoreflect.ValueOfMap(&_MsgUpsertMarketsResponse_1_map{m: &x.MarketUpdates}) + if !f(fd_MsgUpsertMarketsResponse_market_updates, value) { + return + } + } } // Has reports whether a field is populated. @@ -661,13 +752,15 @@ func (x *fastReflection_MsgCreateMarketsResponse) 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_MsgCreateMarketsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgUpsertMarketsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "slinky.marketmap.v1.MsgUpsertMarketsResponse.market_updates": + return len(x.MarketUpdates) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpsertMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpsertMarketsResponse does not contain field %s", fd.FullName())) } } @@ -677,13 +770,15 @@ func (x *fastReflection_MsgCreateMarketsResponse) Has(fd protoreflect.FieldDescr // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCreateMarketsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgUpsertMarketsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "slinky.marketmap.v1.MsgUpsertMarketsResponse.market_updates": + x.MarketUpdates = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpsertMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpsertMarketsResponse does not contain field %s", fd.FullName())) } } @@ -693,13 +788,19 @@ func (x *fastReflection_MsgCreateMarketsResponse) 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_MsgCreateMarketsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpsertMarketsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "slinky.marketmap.v1.MsgUpsertMarketsResponse.market_updates": + if len(x.MarketUpdates) == 0 { + return protoreflect.ValueOfMap(&_MsgUpsertMarketsResponse_1_map{}) + } + mapValue := &_MsgUpsertMarketsResponse_1_map{m: &x.MarketUpdates} + return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpsertMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarketsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpsertMarketsResponse does not contain field %s", descriptor.FullName())) } } @@ -713,13 +814,17 @@ func (x *fastReflection_MsgCreateMarketsResponse) Get(descriptor protoreflect.Fi // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCreateMarketsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgUpsertMarketsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "slinky.marketmap.v1.MsgUpsertMarketsResponse.market_updates": + mv := value.Map() + cmv := mv.(*_MsgUpsertMarketsResponse_1_map) + x.MarketUpdates = *cmv.m default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpsertMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpsertMarketsResponse does not contain field %s", fd.FullName())) } } @@ -733,36 +838,45 @@ func (x *fastReflection_MsgCreateMarketsResponse) 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_MsgCreateMarketsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpsertMarketsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "slinky.marketmap.v1.MsgUpsertMarketsResponse.market_updates": + if x.MarketUpdates == nil { + x.MarketUpdates = make(map[string]bool) + } + value := &_MsgUpsertMarketsResponse_1_map{m: &x.MarketUpdates} + return protoreflect.ValueOfMap(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpsertMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpsertMarketsResponse 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_MsgCreateMarketsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpsertMarketsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "slinky.marketmap.v1.MsgUpsertMarketsResponse.market_updates": + m := make(map[string]bool) + return protoreflect.ValueOfMap(&_MsgUpsertMarketsResponse_1_map{m: &m}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpsertMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpsertMarketsResponse 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_MsgCreateMarketsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgUpsertMarketsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgCreateMarketsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgUpsertMarketsResponse", d.FullName())) } panic("unreachable") } @@ -770,7 +884,7 @@ func (x *fastReflection_MsgCreateMarketsResponse) 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_MsgCreateMarketsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgUpsertMarketsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -781,7 +895,7 @@ func (x *fastReflection_MsgCreateMarketsResponse) 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_MsgCreateMarketsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgUpsertMarketsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -793,7 +907,7 @@ func (x *fastReflection_MsgCreateMarketsResponse) 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_MsgCreateMarketsResponse) IsValid() bool { +func (x *fastReflection_MsgUpsertMarketsResponse) IsValid() bool { return x != nil } @@ -803,9 +917,9 @@ func (x *fastReflection_MsgCreateMarketsResponse) 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_MsgCreateMarketsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgUpsertMarketsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateMarketsResponse) + x := input.Message.Interface().(*MsgUpsertMarketsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -817,6 +931,27 @@ func (x *fastReflection_MsgCreateMarketsResponse) ProtoMethods() *protoiface.Met var n int var l int _ = l + if len(x.MarketUpdates) > 0 { + SiZeMaP := func(k string, v bool) { + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + 1 + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.MarketUpdates)) + for k := range x.MarketUpdates { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.MarketUpdates[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.MarketUpdates { + SiZeMaP(k, v) + } + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -827,7 +962,7 @@ func (x *fastReflection_MsgCreateMarketsResponse) ProtoMethods() *protoiface.Met } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateMarketsResponse) + x := input.Message.Interface().(*MsgUpsertMarketsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -846,6 +981,52 @@ func (x *fastReflection_MsgCreateMarketsResponse) ProtoMethods() *protoiface.Met i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.MarketUpdates) > 0 { + MaRsHaLmAp := func(k string, v bool) (protoiface.MarshalOutput, error) { + baseI := i + i-- + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForMarketUpdates := make([]string, 0, len(x.MarketUpdates)) + for k := range x.MarketUpdates { + keysForMarketUpdates = append(keysForMarketUpdates, string(k)) + } + sort.Slice(keysForMarketUpdates, func(i, j int) bool { + return keysForMarketUpdates[i] < keysForMarketUpdates[j] + }) + for iNdEx := len(keysForMarketUpdates) - 1; iNdEx >= 0; iNdEx-- { + v := x.MarketUpdates[string(keysForMarketUpdates[iNdEx])] + out, err := MaRsHaLmAp(keysForMarketUpdates[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.MarketUpdates { + v := x.MarketUpdates[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -857,7 +1038,7 @@ func (x *fastReflection_MsgCreateMarketsResponse) ProtoMethods() *protoiface.Met }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateMarketsResponse) + x := input.Message.Interface().(*MsgUpsertMarketsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -889,12 +1070,127 @@ func (x *fastReflection_MsgCreateMarketsResponse) 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: MsgCreateMarketsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpsertMarketsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateMarketsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpsertMarketsResponse: 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 MarketUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.MarketUpdates == nil { + x.MarketUpdates = make(map[string]bool) + } + var mapkey string + var mapvalue bool + 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 { + var stringLenmapkey 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++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp 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++ + mapvaluetemp |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } 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.MarketUpdates[mapkey] = mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -930,79 +1226,79 @@ func (x *fastReflection_MsgCreateMarketsResponse) ProtoMethods() *protoiface.Met } } -var _ protoreflect.List = (*_MsgUpdateMarkets_2_list)(nil) +var _ protoreflect.List = (*_MsgCreateMarkets_2_list)(nil) -type _MsgUpdateMarkets_2_list struct { +type _MsgCreateMarkets_2_list struct { list *[]*Market } -func (x *_MsgUpdateMarkets_2_list) Len() int { +func (x *_MsgCreateMarkets_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_MsgUpdateMarkets_2_list) Get(i int) protoreflect.Value { +func (x *_MsgCreateMarkets_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_MsgUpdateMarkets_2_list) Set(i int, value protoreflect.Value) { +func (x *_MsgCreateMarkets_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Market) (*x.list)[i] = concreteValue } -func (x *_MsgUpdateMarkets_2_list) Append(value protoreflect.Value) { +func (x *_MsgCreateMarkets_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Market) *x.list = append(*x.list, concreteValue) } -func (x *_MsgUpdateMarkets_2_list) AppendMutable() protoreflect.Value { +func (x *_MsgCreateMarkets_2_list) AppendMutable() protoreflect.Value { v := new(Market) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgUpdateMarkets_2_list) Truncate(n int) { +func (x *_MsgCreateMarkets_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_MsgUpdateMarkets_2_list) NewElement() protoreflect.Value { +func (x *_MsgCreateMarkets_2_list) NewElement() protoreflect.Value { v := new(Market) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgUpdateMarkets_2_list) IsValid() bool { +func (x *_MsgCreateMarkets_2_list) IsValid() bool { return x.list != nil } var ( - md_MsgUpdateMarkets protoreflect.MessageDescriptor - fd_MsgUpdateMarkets_authority protoreflect.FieldDescriptor - fd_MsgUpdateMarkets_update_markets protoreflect.FieldDescriptor + md_MsgCreateMarkets protoreflect.MessageDescriptor + fd_MsgCreateMarkets_authority protoreflect.FieldDescriptor + fd_MsgCreateMarkets_create_markets protoreflect.FieldDescriptor ) func init() { file_slinky_marketmap_v1_tx_proto_init() - md_MsgUpdateMarkets = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgUpdateMarkets") - fd_MsgUpdateMarkets_authority = md_MsgUpdateMarkets.Fields().ByName("authority") - fd_MsgUpdateMarkets_update_markets = md_MsgUpdateMarkets.Fields().ByName("update_markets") + md_MsgCreateMarkets = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgCreateMarkets") + fd_MsgCreateMarkets_authority = md_MsgCreateMarkets.Fields().ByName("authority") + fd_MsgCreateMarkets_create_markets = md_MsgCreateMarkets.Fields().ByName("create_markets") } -var _ protoreflect.Message = (*fastReflection_MsgUpdateMarkets)(nil) +var _ protoreflect.Message = (*fastReflection_MsgCreateMarkets)(nil) -type fastReflection_MsgUpdateMarkets MsgUpdateMarkets +type fastReflection_MsgCreateMarkets MsgCreateMarkets -func (x *MsgUpdateMarkets) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateMarkets)(x) +func (x *MsgCreateMarkets) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateMarkets)(x) } -func (x *MsgUpdateMarkets) slowProtoReflect() protoreflect.Message { +func (x *MsgCreateMarkets) slowProtoReflect() protoreflect.Message { mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1014,43 +1310,43 @@ func (x *MsgUpdateMarkets) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgUpdateMarkets_messageType fastReflection_MsgUpdateMarkets_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateMarkets_messageType{} +var _fastReflection_MsgCreateMarkets_messageType fastReflection_MsgCreateMarkets_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateMarkets_messageType{} -type fastReflection_MsgUpdateMarkets_messageType struct{} +type fastReflection_MsgCreateMarkets_messageType struct{} -func (x fastReflection_MsgUpdateMarkets_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateMarkets)(nil) +func (x fastReflection_MsgCreateMarkets_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateMarkets)(nil) } -func (x fastReflection_MsgUpdateMarkets_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateMarkets) +func (x fastReflection_MsgCreateMarkets_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateMarkets) } -func (x fastReflection_MsgUpdateMarkets_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateMarkets +func (x fastReflection_MsgCreateMarkets_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateMarkets } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgUpdateMarkets) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateMarkets +func (x *fastReflection_MsgCreateMarkets) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateMarkets } // 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_MsgUpdateMarkets) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateMarkets_messageType +func (x *fastReflection_MsgCreateMarkets) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateMarkets_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateMarkets) New() protoreflect.Message { - return new(fastReflection_MsgUpdateMarkets) +func (x *fastReflection_MsgCreateMarkets) New() protoreflect.Message { + return new(fastReflection_MsgCreateMarkets) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateMarkets) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateMarkets)(x) +func (x *fastReflection_MsgCreateMarkets) Interface() protoreflect.ProtoMessage { + return (*MsgCreateMarkets)(x) } // Range iterates over every populated field in an undefined order, @@ -1058,16 +1354,16 @@ func (x *fastReflection_MsgUpdateMarkets) 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_MsgUpdateMarkets) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgCreateMarkets) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgUpdateMarkets_authority, value) { + if !f(fd_MsgCreateMarkets_authority, value) { return } } - if len(x.UpdateMarkets) != 0 { - value := protoreflect.ValueOfList(&_MsgUpdateMarkets_2_list{list: &x.UpdateMarkets}) - if !f(fd_MsgUpdateMarkets_update_markets, value) { + if len(x.CreateMarkets) != 0 { + value := protoreflect.ValueOfList(&_MsgCreateMarkets_2_list{list: &x.CreateMarkets}) + if !f(fd_MsgCreateMarkets_create_markets, value) { return } } @@ -1084,17 +1380,17 @@ func (x *fastReflection_MsgUpdateMarkets) 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_MsgUpdateMarkets) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgCreateMarkets) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "slinky.marketmap.v1.MsgUpdateMarkets.authority": + case "slinky.marketmap.v1.MsgCreateMarkets.authority": return x.Authority != "" - case "slinky.marketmap.v1.MsgUpdateMarkets.update_markets": - return len(x.UpdateMarkets) != 0 + case "slinky.marketmap.v1.MsgCreateMarkets.create_markets": + return len(x.CreateMarkets) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarkets")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarkets does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarkets does not contain field %s", fd.FullName())) } } @@ -1104,17 +1400,17 @@ func (x *fastReflection_MsgUpdateMarkets) Has(fd protoreflect.FieldDescriptor) b // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateMarkets) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgCreateMarkets) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "slinky.marketmap.v1.MsgUpdateMarkets.authority": + case "slinky.marketmap.v1.MsgCreateMarkets.authority": x.Authority = "" - case "slinky.marketmap.v1.MsgUpdateMarkets.update_markets": - x.UpdateMarkets = nil + case "slinky.marketmap.v1.MsgCreateMarkets.create_markets": + x.CreateMarkets = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarkets")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarkets does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarkets does not contain field %s", fd.FullName())) } } @@ -1124,22 +1420,22 @@ func (x *fastReflection_MsgUpdateMarkets) 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_MsgUpdateMarkets) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgCreateMarkets) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "slinky.marketmap.v1.MsgUpdateMarkets.authority": + case "slinky.marketmap.v1.MsgCreateMarkets.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "slinky.marketmap.v1.MsgUpdateMarkets.update_markets": - if len(x.UpdateMarkets) == 0 { - return protoreflect.ValueOfList(&_MsgUpdateMarkets_2_list{}) + case "slinky.marketmap.v1.MsgCreateMarkets.create_markets": + if len(x.CreateMarkets) == 0 { + return protoreflect.ValueOfList(&_MsgCreateMarkets_2_list{}) } - listValue := &_MsgUpdateMarkets_2_list{list: &x.UpdateMarkets} + listValue := &_MsgCreateMarkets_2_list{list: &x.CreateMarkets} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarkets")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarkets does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarkets does not contain field %s", descriptor.FullName())) } } @@ -1153,19 +1449,19 @@ func (x *fastReflection_MsgUpdateMarkets) Get(descriptor protoreflect.FieldDescr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateMarkets) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgCreateMarkets) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "slinky.marketmap.v1.MsgUpdateMarkets.authority": + case "slinky.marketmap.v1.MsgCreateMarkets.authority": x.Authority = value.Interface().(string) - case "slinky.marketmap.v1.MsgUpdateMarkets.update_markets": + case "slinky.marketmap.v1.MsgCreateMarkets.create_markets": lv := value.List() - clv := lv.(*_MsgUpdateMarkets_2_list) - x.UpdateMarkets = *clv.list + clv := lv.(*_MsgCreateMarkets_2_list) + x.CreateMarkets = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarkets")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarkets does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarkets does not contain field %s", fd.FullName())) } } @@ -1179,49 +1475,49 @@ func (x *fastReflection_MsgUpdateMarkets) 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_MsgUpdateMarkets) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgCreateMarkets) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "slinky.marketmap.v1.MsgUpdateMarkets.update_markets": - if x.UpdateMarkets == nil { - x.UpdateMarkets = []*Market{} + case "slinky.marketmap.v1.MsgCreateMarkets.create_markets": + if x.CreateMarkets == nil { + x.CreateMarkets = []*Market{} } - value := &_MsgUpdateMarkets_2_list{list: &x.UpdateMarkets} + value := &_MsgCreateMarkets_2_list{list: &x.CreateMarkets} return protoreflect.ValueOfList(value) - case "slinky.marketmap.v1.MsgUpdateMarkets.authority": - panic(fmt.Errorf("field authority of message slinky.marketmap.v1.MsgUpdateMarkets is not mutable")) + case "slinky.marketmap.v1.MsgCreateMarkets.authority": + panic(fmt.Errorf("field authority of message slinky.marketmap.v1.MsgCreateMarkets is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarkets")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarkets does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarkets 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_MsgUpdateMarkets) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgCreateMarkets) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "slinky.marketmap.v1.MsgUpdateMarkets.authority": + case "slinky.marketmap.v1.MsgCreateMarkets.authority": return protoreflect.ValueOfString("") - case "slinky.marketmap.v1.MsgUpdateMarkets.update_markets": + case "slinky.marketmap.v1.MsgCreateMarkets.create_markets": list := []*Market{} - return protoreflect.ValueOfList(&_MsgUpdateMarkets_2_list{list: &list}) + return protoreflect.ValueOfList(&_MsgCreateMarkets_2_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarkets")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarkets does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarkets 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_MsgUpdateMarkets) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgCreateMarkets) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgUpdateMarkets", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgCreateMarkets", d.FullName())) } panic("unreachable") } @@ -1229,7 +1525,7 @@ func (x *fastReflection_MsgUpdateMarkets) 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_MsgUpdateMarkets) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgCreateMarkets) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1240,7 +1536,7 @@ func (x *fastReflection_MsgUpdateMarkets) 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_MsgUpdateMarkets) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgCreateMarkets) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1252,7 +1548,7 @@ func (x *fastReflection_MsgUpdateMarkets) 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_MsgUpdateMarkets) IsValid() bool { +func (x *fastReflection_MsgCreateMarkets) IsValid() bool { return x != nil } @@ -1262,9 +1558,9 @@ func (x *fastReflection_MsgUpdateMarkets) 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_MsgUpdateMarkets) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgCreateMarkets) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateMarkets) + x := input.Message.Interface().(*MsgCreateMarkets) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1280,8 +1576,8 @@ func (x *fastReflection_MsgUpdateMarkets) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.UpdateMarkets) > 0 { - for _, e := range x.UpdateMarkets { + if len(x.CreateMarkets) > 0 { + for _, e := range x.CreateMarkets { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } @@ -1296,7 +1592,7 @@ func (x *fastReflection_MsgUpdateMarkets) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateMarkets) + x := input.Message.Interface().(*MsgCreateMarkets) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1315,9 +1611,9 @@ func (x *fastReflection_MsgUpdateMarkets) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.UpdateMarkets) > 0 { - for iNdEx := len(x.UpdateMarkets) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.UpdateMarkets[iNdEx]) + if len(x.CreateMarkets) > 0 { + for iNdEx := len(x.CreateMarkets) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.CreateMarkets[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1349,7 +1645,7 @@ func (x *fastReflection_MsgUpdateMarkets) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateMarkets) + x := input.Message.Interface().(*MsgCreateMarkets) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1381,10 +1677,10 @@ func (x *fastReflection_MsgUpdateMarkets) 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: MsgUpdateMarkets: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateMarkets: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateMarkets: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateMarkets: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1421,7 +1717,7 @@ func (x *fastReflection_MsgUpdateMarkets) 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 UpdateMarkets", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreateMarkets", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1448,8 +1744,8 @@ func (x *fastReflection_MsgUpdateMarkets) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.UpdateMarkets = append(x.UpdateMarkets, &Market{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UpdateMarkets[len(x.UpdateMarkets)-1]); err != nil { + x.CreateMarkets = append(x.CreateMarkets, &Market{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CreateMarkets[len(x.CreateMarkets)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -1489,23 +1785,23 @@ func (x *fastReflection_MsgUpdateMarkets) ProtoMethods() *protoiface.Methods { } var ( - md_MsgUpdateMarketsResponse protoreflect.MessageDescriptor + md_MsgCreateMarketsResponse protoreflect.MessageDescriptor ) func init() { file_slinky_marketmap_v1_tx_proto_init() - md_MsgUpdateMarketsResponse = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgUpdateMarketsResponse") + md_MsgCreateMarketsResponse = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgCreateMarketsResponse") } -var _ protoreflect.Message = (*fastReflection_MsgUpdateMarketsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgCreateMarketsResponse)(nil) -type fastReflection_MsgUpdateMarketsResponse MsgUpdateMarketsResponse +type fastReflection_MsgCreateMarketsResponse MsgCreateMarketsResponse -func (x *MsgUpdateMarketsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateMarketsResponse)(x) +func (x *MsgCreateMarketsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateMarketsResponse)(x) } -func (x *MsgUpdateMarketsResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgCreateMarketsResponse) slowProtoReflect() protoreflect.Message { mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1517,43 +1813,43 @@ func (x *MsgUpdateMarketsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgUpdateMarketsResponse_messageType fastReflection_MsgUpdateMarketsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateMarketsResponse_messageType{} +var _fastReflection_MsgCreateMarketsResponse_messageType fastReflection_MsgCreateMarketsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateMarketsResponse_messageType{} -type fastReflection_MsgUpdateMarketsResponse_messageType struct{} +type fastReflection_MsgCreateMarketsResponse_messageType struct{} -func (x fastReflection_MsgUpdateMarketsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateMarketsResponse)(nil) +func (x fastReflection_MsgCreateMarketsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateMarketsResponse)(nil) } -func (x fastReflection_MsgUpdateMarketsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateMarketsResponse) +func (x fastReflection_MsgCreateMarketsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateMarketsResponse) } -func (x fastReflection_MsgUpdateMarketsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateMarketsResponse +func (x fastReflection_MsgCreateMarketsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateMarketsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgUpdateMarketsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateMarketsResponse +func (x *fastReflection_MsgCreateMarketsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateMarketsResponse } // 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_MsgUpdateMarketsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateMarketsResponse_messageType +func (x *fastReflection_MsgCreateMarketsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateMarketsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateMarketsResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateMarketsResponse) +func (x *fastReflection_MsgCreateMarketsResponse) New() protoreflect.Message { + return new(fastReflection_MsgCreateMarketsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateMarketsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateMarketsResponse)(x) +func (x *fastReflection_MsgCreateMarketsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCreateMarketsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -1561,7 +1857,7 @@ func (x *fastReflection_MsgUpdateMarketsResponse) 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_MsgUpdateMarketsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgCreateMarketsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -1575,13 +1871,13 @@ func (x *fastReflection_MsgUpdateMarketsResponse) 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_MsgUpdateMarketsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgCreateMarketsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarketsResponse does not contain field %s", fd.FullName())) } } @@ -1591,13 +1887,13 @@ func (x *fastReflection_MsgUpdateMarketsResponse) Has(fd protoreflect.FieldDescr // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateMarketsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgCreateMarketsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarketsResponse does not contain field %s", fd.FullName())) } } @@ -1607,13 +1903,13 @@ func (x *fastReflection_MsgUpdateMarketsResponse) 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_MsgUpdateMarketsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgCreateMarketsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarketsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarketsResponse does not contain field %s", descriptor.FullName())) } } @@ -1627,13 +1923,13 @@ func (x *fastReflection_MsgUpdateMarketsResponse) Get(descriptor protoreflect.Fi // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateMarketsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgCreateMarketsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarketsResponse does not contain field %s", fd.FullName())) } } @@ -1647,36 +1943,36 @@ func (x *fastReflection_MsgUpdateMarketsResponse) 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_MsgUpdateMarketsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgCreateMarketsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarketsResponse 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_MsgUpdateMarketsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgCreateMarketsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgCreateMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgCreateMarketsResponse 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_MsgUpdateMarketsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgCreateMarketsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgUpdateMarketsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgCreateMarketsResponse", d.FullName())) } panic("unreachable") } @@ -1684,7 +1980,7 @@ func (x *fastReflection_MsgUpdateMarketsResponse) 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_MsgUpdateMarketsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgCreateMarketsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1695,7 +1991,7 @@ func (x *fastReflection_MsgUpdateMarketsResponse) 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_MsgUpdateMarketsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgCreateMarketsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1707,7 +2003,7 @@ func (x *fastReflection_MsgUpdateMarketsResponse) 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_MsgUpdateMarketsResponse) IsValid() bool { +func (x *fastReflection_MsgCreateMarketsResponse) IsValid() bool { return x != nil } @@ -1717,9 +2013,9 @@ func (x *fastReflection_MsgUpdateMarketsResponse) 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_MsgUpdateMarketsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgCreateMarketsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateMarketsResponse) + x := input.Message.Interface().(*MsgCreateMarketsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1741,7 +2037,7 @@ func (x *fastReflection_MsgUpdateMarketsResponse) ProtoMethods() *protoiface.Met } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateMarketsResponse) + x := input.Message.Interface().(*MsgCreateMarketsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1771,7 +2067,7 @@ func (x *fastReflection_MsgUpdateMarketsResponse) ProtoMethods() *protoiface.Met }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateMarketsResponse) + x := input.Message.Interface().(*MsgCreateMarketsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1803,10 +2099,10 @@ func (x *fastReflection_MsgUpdateMarketsResponse) 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: MsgUpdateMarketsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateMarketsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateMarketsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateMarketsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1844,28 +2140,79 @@ func (x *fastReflection_MsgUpdateMarketsResponse) ProtoMethods() *protoiface.Met } } +var _ protoreflect.List = (*_MsgUpdateMarkets_2_list)(nil) + +type _MsgUpdateMarkets_2_list struct { + list *[]*Market +} + +func (x *_MsgUpdateMarkets_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgUpdateMarkets_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgUpdateMarkets_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Market) + (*x.list)[i] = concreteValue +} + +func (x *_MsgUpdateMarkets_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Market) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgUpdateMarkets_2_list) AppendMutable() protoreflect.Value { + v := new(Market) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgUpdateMarkets_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgUpdateMarkets_2_list) NewElement() protoreflect.Value { + v := new(Market) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgUpdateMarkets_2_list) IsValid() bool { + return x.list != nil +} + var ( - md_MsgParams protoreflect.MessageDescriptor - fd_MsgParams_params protoreflect.FieldDescriptor - fd_MsgParams_authority protoreflect.FieldDescriptor + md_MsgUpdateMarkets protoreflect.MessageDescriptor + fd_MsgUpdateMarkets_authority protoreflect.FieldDescriptor + fd_MsgUpdateMarkets_update_markets protoreflect.FieldDescriptor ) func init() { file_slinky_marketmap_v1_tx_proto_init() - md_MsgParams = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgParams") - fd_MsgParams_params = md_MsgParams.Fields().ByName("params") - fd_MsgParams_authority = md_MsgParams.Fields().ByName("authority") + md_MsgUpdateMarkets = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgUpdateMarkets") + fd_MsgUpdateMarkets_authority = md_MsgUpdateMarkets.Fields().ByName("authority") + fd_MsgUpdateMarkets_update_markets = md_MsgUpdateMarkets.Fields().ByName("update_markets") } -var _ protoreflect.Message = (*fastReflection_MsgParams)(nil) +var _ protoreflect.Message = (*fastReflection_MsgUpdateMarkets)(nil) -type fastReflection_MsgParams MsgParams +type fastReflection_MsgUpdateMarkets MsgUpdateMarkets -func (x *MsgParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgParams)(x) +func (x *MsgUpdateMarkets) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateMarkets)(x) } -func (x *MsgParams) slowProtoReflect() protoreflect.Message { +func (x *MsgUpdateMarkets) slowProtoReflect() protoreflect.Message { mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1877,43 +2224,43 @@ func (x *MsgParams) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgParams_messageType fastReflection_MsgParams_messageType -var _ protoreflect.MessageType = fastReflection_MsgParams_messageType{} +var _fastReflection_MsgUpdateMarkets_messageType fastReflection_MsgUpdateMarkets_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateMarkets_messageType{} -type fastReflection_MsgParams_messageType struct{} +type fastReflection_MsgUpdateMarkets_messageType struct{} -func (x fastReflection_MsgParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgParams)(nil) +func (x fastReflection_MsgUpdateMarkets_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateMarkets)(nil) } -func (x fastReflection_MsgParams_messageType) New() protoreflect.Message { - return new(fastReflection_MsgParams) +func (x fastReflection_MsgUpdateMarkets_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateMarkets) } -func (x fastReflection_MsgParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgParams +func (x fastReflection_MsgUpdateMarkets_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateMarkets } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgParams) Descriptor() protoreflect.MessageDescriptor { - return md_MsgParams +func (x *fastReflection_MsgUpdateMarkets) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateMarkets } // 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_MsgParams) Type() protoreflect.MessageType { - return _fastReflection_MsgParams_messageType +func (x *fastReflection_MsgUpdateMarkets) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateMarkets_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgParams) New() protoreflect.Message { - return new(fastReflection_MsgParams) +func (x *fastReflection_MsgUpdateMarkets) New() protoreflect.Message { + return new(fastReflection_MsgUpdateMarkets) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgParams) Interface() protoreflect.ProtoMessage { - return (*MsgParams)(x) +func (x *fastReflection_MsgUpdateMarkets) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateMarkets)(x) } // Range iterates over every populated field in an undefined order, @@ -1921,16 +2268,16 @@ func (x *fastReflection_MsgParams) 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_MsgParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_MsgParams_params, value) { +func (x *fastReflection_MsgUpdateMarkets) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateMarkets_authority, value) { return } } - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgParams_authority, value) { + if len(x.UpdateMarkets) != 0 { + value := protoreflect.ValueOfList(&_MsgUpdateMarkets_2_list{list: &x.UpdateMarkets}) + if !f(fd_MsgUpdateMarkets_update_markets, value) { return } } @@ -1947,17 +2294,1781 @@ func (x *fastReflection_MsgParams) Range(f func(protoreflect.FieldDescriptor, pr // 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_MsgParams) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgUpdateMarkets) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "slinky.marketmap.v1.MsgParams.params": - return x.Params != nil - case "slinky.marketmap.v1.MsgParams.authority": + case "slinky.marketmap.v1.MsgUpdateMarkets.authority": return x.Authority != "" + case "slinky.marketmap.v1.MsgUpdateMarkets.update_markets": + return len(x.UpdateMarkets) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarkets")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarkets 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_MsgUpdateMarkets) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "slinky.marketmap.v1.MsgUpdateMarkets.authority": + x.Authority = "" + case "slinky.marketmap.v1.MsgUpdateMarkets.update_markets": + x.UpdateMarkets = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarkets")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarkets 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_MsgUpdateMarkets) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "slinky.marketmap.v1.MsgUpdateMarkets.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "slinky.marketmap.v1.MsgUpdateMarkets.update_markets": + if len(x.UpdateMarkets) == 0 { + return protoreflect.ValueOfList(&_MsgUpdateMarkets_2_list{}) + } + listValue := &_MsgUpdateMarkets_2_list{list: &x.UpdateMarkets} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarkets")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarkets 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_MsgUpdateMarkets) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "slinky.marketmap.v1.MsgUpdateMarkets.authority": + x.Authority = value.Interface().(string) + case "slinky.marketmap.v1.MsgUpdateMarkets.update_markets": + lv := value.List() + clv := lv.(*_MsgUpdateMarkets_2_list) + x.UpdateMarkets = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarkets")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarkets 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_MsgUpdateMarkets) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "slinky.marketmap.v1.MsgUpdateMarkets.update_markets": + if x.UpdateMarkets == nil { + x.UpdateMarkets = []*Market{} + } + value := &_MsgUpdateMarkets_2_list{list: &x.UpdateMarkets} + return protoreflect.ValueOfList(value) + case "slinky.marketmap.v1.MsgUpdateMarkets.authority": + panic(fmt.Errorf("field authority of message slinky.marketmap.v1.MsgUpdateMarkets is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarkets")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarkets 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_MsgUpdateMarkets) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "slinky.marketmap.v1.MsgUpdateMarkets.authority": + return protoreflect.ValueOfString("") + case "slinky.marketmap.v1.MsgUpdateMarkets.update_markets": + list := []*Market{} + return protoreflect.ValueOfList(&_MsgUpdateMarkets_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarkets")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarkets 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_MsgUpdateMarkets) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgUpdateMarkets", 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_MsgUpdateMarkets) 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_MsgUpdateMarkets) 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_MsgUpdateMarkets) 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_MsgUpdateMarkets) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateMarkets) + 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.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.UpdateMarkets) > 0 { + for _, e := range x.UpdateMarkets { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateMarkets) + 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.UpdateMarkets) > 0 { + for iNdEx := len(x.UpdateMarkets) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.UpdateMarkets[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + 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().(*MsgUpdateMarkets) + 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: MsgUpdateMarkets: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateMarkets: 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 Authority", 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.Authority = 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 UpdateMarkets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.UpdateMarkets = append(x.UpdateMarkets, &Market{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UpdateMarkets[len(x.UpdateMarkets)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateMarketsResponse protoreflect.MessageDescriptor +) + +func init() { + file_slinky_marketmap_v1_tx_proto_init() + md_MsgUpdateMarketsResponse = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgUpdateMarketsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateMarketsResponse)(nil) + +type fastReflection_MsgUpdateMarketsResponse MsgUpdateMarketsResponse + +func (x *MsgUpdateMarketsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateMarketsResponse)(x) +} + +func (x *MsgUpdateMarketsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateMarketsResponse_messageType fastReflection_MsgUpdateMarketsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateMarketsResponse_messageType{} + +type fastReflection_MsgUpdateMarketsResponse_messageType struct{} + +func (x fastReflection_MsgUpdateMarketsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateMarketsResponse)(nil) +} +func (x fastReflection_MsgUpdateMarketsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateMarketsResponse) +} +func (x fastReflection_MsgUpdateMarketsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateMarketsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateMarketsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateMarketsResponse +} + +// 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_MsgUpdateMarketsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateMarketsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateMarketsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateMarketsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateMarketsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateMarketsResponse)(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_MsgUpdateMarketsResponse) 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_MsgUpdateMarketsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarketsResponse")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarketsResponse 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_MsgUpdateMarketsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarketsResponse")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarketsResponse 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_MsgUpdateMarketsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarketsResponse")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarketsResponse 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_MsgUpdateMarketsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarketsResponse")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarketsResponse 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_MsgUpdateMarketsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarketsResponse")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarketsResponse 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_MsgUpdateMarketsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgUpdateMarketsResponse")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgUpdateMarketsResponse 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_MsgUpdateMarketsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgUpdateMarketsResponse", 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_MsgUpdateMarketsResponse) 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_MsgUpdateMarketsResponse) 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_MsgUpdateMarketsResponse) 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_MsgUpdateMarketsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateMarketsResponse) + 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().(*MsgUpdateMarketsResponse) + 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().(*MsgUpdateMarketsResponse) + 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: MsgUpdateMarketsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateMarketsResponse: 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_MsgParams protoreflect.MessageDescriptor + fd_MsgParams_params protoreflect.FieldDescriptor + fd_MsgParams_authority protoreflect.FieldDescriptor +) + +func init() { + file_slinky_marketmap_v1_tx_proto_init() + md_MsgParams = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgParams") + fd_MsgParams_params = md_MsgParams.Fields().ByName("params") + fd_MsgParams_authority = md_MsgParams.Fields().ByName("authority") +} + +var _ protoreflect.Message = (*fastReflection_MsgParams)(nil) + +type fastReflection_MsgParams MsgParams + +func (x *MsgParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgParams)(x) +} + +func (x *MsgParams) slowProtoReflect() protoreflect.Message { + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgParams_messageType fastReflection_MsgParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgParams_messageType{} + +type fastReflection_MsgParams_messageType struct{} + +func (x fastReflection_MsgParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgParams)(nil) +} +func (x fastReflection_MsgParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgParams) +} +func (x fastReflection_MsgParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgParams +} + +// 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_MsgParams) Type() protoreflect.MessageType { + return _fastReflection_MsgParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgParams) New() protoreflect.Message { + return new(fastReflection_MsgParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgParams) Interface() protoreflect.ProtoMessage { + return (*MsgParams)(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_MsgParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgParams_params, value) { + return + } + } + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgParams_authority, 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_MsgParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "slinky.marketmap.v1.MsgParams.params": + return x.Params != nil + case "slinky.marketmap.v1.MsgParams.authority": + return x.Authority != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParams")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgParams 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_MsgParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "slinky.marketmap.v1.MsgParams.params": + x.Params = nil + case "slinky.marketmap.v1.MsgParams.authority": + x.Authority = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParams")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgParams 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_MsgParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "slinky.marketmap.v1.MsgParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "slinky.marketmap.v1.MsgParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParams")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgParams 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_MsgParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "slinky.marketmap.v1.MsgParams.params": + x.Params = value.Message().Interface().(*Params) + case "slinky.marketmap.v1.MsgParams.authority": + x.Authority = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParams")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgParams 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_MsgParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "slinky.marketmap.v1.MsgParams.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "slinky.marketmap.v1.MsgParams.authority": + panic(fmt.Errorf("field authority of message slinky.marketmap.v1.MsgParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParams")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgParams 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_MsgParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "slinky.marketmap.v1.MsgParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "slinky.marketmap.v1.MsgParams.authority": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParams")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgParams 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_MsgParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgParams", 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_MsgParams) 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_MsgParams) 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_MsgParams) 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_MsgParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgParams) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Authority) + 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().(*MsgParams) + 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.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0x12 + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgParams) + 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: MsgParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = 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_MsgParamsResponse protoreflect.MessageDescriptor +) + +func init() { + file_slinky_marketmap_v1_tx_proto_init() + md_MsgParamsResponse = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgParamsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgParamsResponse)(nil) + +type fastReflection_MsgParamsResponse MsgParamsResponse + +func (x *MsgParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgParamsResponse)(x) +} + +func (x *MsgParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgParamsResponse_messageType fastReflection_MsgParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgParamsResponse_messageType{} + +type fastReflection_MsgParamsResponse_messageType struct{} + +func (x fastReflection_MsgParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgParamsResponse)(nil) +} +func (x fastReflection_MsgParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgParamsResponse) +} +func (x fastReflection_MsgParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgParamsResponse +} + +// 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_MsgParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgParamsResponse)(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_MsgParamsResponse) 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_MsgParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParamsResponse")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgParamsResponse 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_MsgParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParamsResponse")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgParamsResponse 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_MsgParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParamsResponse")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgParamsResponse 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_MsgParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParamsResponse")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgParamsResponse 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_MsgParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParamsResponse")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgParamsResponse 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_MsgParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParamsResponse")) + } + panic(fmt.Errorf("message slinky.marketmap.v1.MsgParamsResponse 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_MsgParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgParamsResponse", 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_MsgParamsResponse) 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_MsgParamsResponse) 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_MsgParamsResponse) 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_MsgParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgParamsResponse) + 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().(*MsgParamsResponse) + 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().(*MsgParamsResponse) + 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: MsgParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgRemoveMarketAuthorities_1_list)(nil) + +type _MsgRemoveMarketAuthorities_1_list struct { + list *[]string +} + +func (x *_MsgRemoveMarketAuthorities_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRemoveMarketAuthorities_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgRemoveMarketAuthorities_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgRemoveMarketAuthorities_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRemoveMarketAuthorities_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRemoveMarketAuthorities at list field RemoveAddresses as it is not of Message kind")) +} + +func (x *_MsgRemoveMarketAuthorities_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgRemoveMarketAuthorities_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgRemoveMarketAuthorities_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgRemoveMarketAuthorities protoreflect.MessageDescriptor + fd_MsgRemoveMarketAuthorities_remove_addresses protoreflect.FieldDescriptor + fd_MsgRemoveMarketAuthorities_admin protoreflect.FieldDescriptor +) + +func init() { + file_slinky_marketmap_v1_tx_proto_init() + md_MsgRemoveMarketAuthorities = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgRemoveMarketAuthorities") + fd_MsgRemoveMarketAuthorities_remove_addresses = md_MsgRemoveMarketAuthorities.Fields().ByName("remove_addresses") + fd_MsgRemoveMarketAuthorities_admin = md_MsgRemoveMarketAuthorities.Fields().ByName("admin") +} + +var _ protoreflect.Message = (*fastReflection_MsgRemoveMarketAuthorities)(nil) + +type fastReflection_MsgRemoveMarketAuthorities MsgRemoveMarketAuthorities + +func (x *MsgRemoveMarketAuthorities) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRemoveMarketAuthorities)(x) +} + +func (x *MsgRemoveMarketAuthorities) slowProtoReflect() protoreflect.Message { + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRemoveMarketAuthorities_messageType fastReflection_MsgRemoveMarketAuthorities_messageType +var _ protoreflect.MessageType = fastReflection_MsgRemoveMarketAuthorities_messageType{} + +type fastReflection_MsgRemoveMarketAuthorities_messageType struct{} + +func (x fastReflection_MsgRemoveMarketAuthorities_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRemoveMarketAuthorities)(nil) +} +func (x fastReflection_MsgRemoveMarketAuthorities_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRemoveMarketAuthorities) +} +func (x fastReflection_MsgRemoveMarketAuthorities_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRemoveMarketAuthorities +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRemoveMarketAuthorities) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRemoveMarketAuthorities +} + +// 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_MsgRemoveMarketAuthorities) Type() protoreflect.MessageType { + return _fastReflection_MsgRemoveMarketAuthorities_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRemoveMarketAuthorities) New() protoreflect.Message { + return new(fastReflection_MsgRemoveMarketAuthorities) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRemoveMarketAuthorities) Interface() protoreflect.ProtoMessage { + return (*MsgRemoveMarketAuthorities)(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_MsgRemoveMarketAuthorities) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.RemoveAddresses) != 0 { + value := protoreflect.ValueOfList(&_MsgRemoveMarketAuthorities_1_list{list: &x.RemoveAddresses}) + if !f(fd_MsgRemoveMarketAuthorities_remove_addresses, value) { + return + } + } + if x.Admin != "" { + value := protoreflect.ValueOfString(x.Admin) + if !f(fd_MsgRemoveMarketAuthorities_admin, 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_MsgRemoveMarketAuthorities) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.remove_addresses": + return len(x.RemoveAddresses) != 0 + case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.admin": + return x.Admin != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthorities")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthorities does not contain field %s", fd.FullName())) } } @@ -1967,17 +4078,17 @@ func (x *fastReflection_MsgParams) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgParams) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgRemoveMarketAuthorities) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "slinky.marketmap.v1.MsgParams.params": - x.Params = nil - case "slinky.marketmap.v1.MsgParams.authority": - x.Authority = "" + case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.remove_addresses": + x.RemoveAddresses = nil + case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.admin": + x.Admin = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthorities")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthorities does not contain field %s", fd.FullName())) } } @@ -1987,19 +4098,22 @@ func (x *fastReflection_MsgParams) 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_MsgParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgRemoveMarketAuthorities) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "slinky.marketmap.v1.MsgParams.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "slinky.marketmap.v1.MsgParams.authority": - value := x.Authority + case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.remove_addresses": + if len(x.RemoveAddresses) == 0 { + return protoreflect.ValueOfList(&_MsgRemoveMarketAuthorities_1_list{}) + } + listValue := &_MsgRemoveMarketAuthorities_1_list{list: &x.RemoveAddresses} + return protoreflect.ValueOfList(listValue) + case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.admin": + value := x.Admin return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthorities")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgParams does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthorities does not contain field %s", descriptor.FullName())) } } @@ -2013,17 +4127,19 @@ func (x *fastReflection_MsgParams) Get(descriptor protoreflect.FieldDescriptor) // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgRemoveMarketAuthorities) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "slinky.marketmap.v1.MsgParams.params": - x.Params = value.Message().Interface().(*Params) - case "slinky.marketmap.v1.MsgParams.authority": - x.Authority = value.Interface().(string) + case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.remove_addresses": + lv := value.List() + clv := lv.(*_MsgRemoveMarketAuthorities_1_list) + x.RemoveAddresses = *clv.list + case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.admin": + x.Admin = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthorities")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthorities does not contain field %s", fd.FullName())) } } @@ -2037,48 +4153,49 @@ func (x *fastReflection_MsgParams) Set(fd protoreflect.FieldDescriptor, value pr // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgRemoveMarketAuthorities) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "slinky.marketmap.v1.MsgParams.params": - if x.Params == nil { - x.Params = new(Params) + case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.remove_addresses": + if x.RemoveAddresses == nil { + x.RemoveAddresses = []string{} } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "slinky.marketmap.v1.MsgParams.authority": - panic(fmt.Errorf("field authority of message slinky.marketmap.v1.MsgParams is not mutable")) + value := &_MsgRemoveMarketAuthorities_1_list{list: &x.RemoveAddresses} + return protoreflect.ValueOfList(value) + case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.admin": + panic(fmt.Errorf("field admin of message slinky.marketmap.v1.MsgRemoveMarketAuthorities is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthorities")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthorities 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_MsgParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgRemoveMarketAuthorities) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "slinky.marketmap.v1.MsgParams.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "slinky.marketmap.v1.MsgParams.authority": + case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.remove_addresses": + list := []string{} + return protoreflect.ValueOfList(&_MsgRemoveMarketAuthorities_1_list{list: &list}) + case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.admin": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthorities")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthorities 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_MsgParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgRemoveMarketAuthorities) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgParams", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgRemoveMarketAuthorities", d.FullName())) } panic("unreachable") } @@ -2086,7 +4203,7 @@ func (x *fastReflection_MsgParams) WhichOneof(d protoreflect.OneofDescriptor) pr // 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_MsgParams) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgRemoveMarketAuthorities) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2097,7 +4214,7 @@ func (x *fastReflection_MsgParams) 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_MsgParams) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgRemoveMarketAuthorities) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2109,7 +4226,7 @@ func (x *fastReflection_MsgParams) SetUnknown(fields protoreflect.RawFields) { // 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_MsgParams) IsValid() bool { +func (x *fastReflection_MsgRemoveMarketAuthorities) IsValid() bool { return x != nil } @@ -2119,9 +4236,9 @@ func (x *fastReflection_MsgParams) 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_MsgParams) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgRemoveMarketAuthorities) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgParams) + x := input.Message.Interface().(*MsgRemoveMarketAuthorities) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2133,11 +4250,13 @@ func (x *fastReflection_MsgParams) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.RemoveAddresses) > 0 { + for _, s := range x.RemoveAddresses { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } } - l = len(x.Authority) + l = len(x.Admin) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -2151,7 +4270,7 @@ func (x *fastReflection_MsgParams) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgParams) + x := input.Message.Interface().(*MsgRemoveMarketAuthorities) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2170,26 +4289,21 @@ func (x *fastReflection_MsgParams) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + if len(x.Admin) > 0 { + i -= len(x.Admin) + copy(dAtA[i:], x.Admin) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) i-- dAtA[i] = 0x12 } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err + if len(x.RemoveAddresses) > 0 { + for iNdEx := len(x.RemoveAddresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.RemoveAddresses[iNdEx]) + copy(dAtA[i:], x.RemoveAddresses[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RemoveAddresses[iNdEx]))) + i-- + dAtA[i] = 0xa } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -2202,7 +4316,7 @@ func (x *fastReflection_MsgParams) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgParams) + x := input.Message.Interface().(*MsgRemoveMarketAuthorities) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2234,17 +4348,17 @@ func (x *fastReflection_MsgParams) 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: MsgParams: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveMarketAuthorities: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgParams: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveMarketAuthorities: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RemoveAddresses", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2254,31 +4368,27 @@ func (x *fastReflection_MsgParams) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + 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 } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } + x.RemoveAddresses = append(x.RemoveAddresses, 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 Authority", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2306,7 +4416,7 @@ func (x *fastReflection_MsgParams) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Authority = string(dAtA[iNdEx:postIndex]) + x.Admin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2344,24 +4454,24 @@ func (x *fastReflection_MsgParams) ProtoMethods() *protoiface.Methods { } var ( - md_MsgParamsResponse protoreflect.MessageDescriptor + md_MsgRemoveMarketAuthoritiesResponse protoreflect.MessageDescriptor ) func init() { file_slinky_marketmap_v1_tx_proto_init() - md_MsgParamsResponse = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgParamsResponse") + md_MsgRemoveMarketAuthoritiesResponse = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgRemoveMarketAuthoritiesResponse") } -var _ protoreflect.Message = (*fastReflection_MsgParamsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgRemoveMarketAuthoritiesResponse)(nil) -type fastReflection_MsgParamsResponse MsgParamsResponse +type fastReflection_MsgRemoveMarketAuthoritiesResponse MsgRemoveMarketAuthoritiesResponse -func (x *MsgParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgParamsResponse)(x) +func (x *MsgRemoveMarketAuthoritiesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRemoveMarketAuthoritiesResponse)(x) } -func (x *MsgParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[5] +func (x *MsgRemoveMarketAuthoritiesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2372,43 +4482,43 @@ func (x *MsgParamsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgParamsResponse_messageType fastReflection_MsgParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgParamsResponse_messageType{} +var _fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType{} -type fastReflection_MsgParamsResponse_messageType struct{} +type fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType struct{} -func (x fastReflection_MsgParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgParamsResponse)(nil) +func (x fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRemoveMarketAuthoritiesResponse)(nil) } -func (x fastReflection_MsgParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgParamsResponse) +func (x fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRemoveMarketAuthoritiesResponse) } -func (x fastReflection_MsgParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgParamsResponse +func (x fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRemoveMarketAuthoritiesResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgParamsResponse +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRemoveMarketAuthoritiesResponse } // 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_MsgParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgParamsResponse_messageType +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgParamsResponse) New() protoreflect.Message { - return new(fastReflection_MsgParamsResponse) +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) New() protoreflect.Message { + return new(fastReflection_MsgRemoveMarketAuthoritiesResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgParamsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgParamsResponse)(x) +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRemoveMarketAuthoritiesResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -2416,7 +4526,7 @@ func (x *fastReflection_MsgParamsResponse) 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_MsgParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -2430,13 +4540,13 @@ func (x *fastReflection_MsgParamsResponse) Range(f func(protoreflect.FieldDescri // 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_MsgParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse does not contain field %s", fd.FullName())) } } @@ -2446,13 +4556,13 @@ func (x *fastReflection_MsgParamsResponse) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgParamsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse does not contain field %s", fd.FullName())) } } @@ -2462,13 +4572,13 @@ func (x *fastReflection_MsgParamsResponse) 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_MsgParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgParamsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse does not contain field %s", descriptor.FullName())) } } @@ -2482,13 +4592,13 @@ func (x *fastReflection_MsgParamsResponse) Get(descriptor protoreflect.FieldDesc // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse does not contain field %s", fd.FullName())) } } @@ -2502,36 +4612,36 @@ func (x *fastReflection_MsgParamsResponse) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse 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_MsgParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse 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_MsgParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgParamsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse", d.FullName())) } panic("unreachable") } @@ -2539,7 +4649,7 @@ func (x *fastReflection_MsgParamsResponse) WhichOneof(d protoreflect.OneofDescri // 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_MsgParamsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2550,7 +4660,7 @@ func (x *fastReflection_MsgParamsResponse) 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_MsgParamsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2562,7 +4672,7 @@ func (x *fastReflection_MsgParamsResponse) SetUnknown(fields protoreflect.RawFie // 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_MsgParamsResponse) IsValid() bool { +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) IsValid() bool { return x != nil } @@ -2572,9 +4682,9 @@ func (x *fastReflection_MsgParamsResponse) 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_MsgParamsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgParamsResponse) + x := input.Message.Interface().(*MsgRemoveMarketAuthoritiesResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2596,7 +4706,7 @@ func (x *fastReflection_MsgParamsResponse) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgParamsResponse) + x := input.Message.Interface().(*MsgRemoveMarketAuthoritiesResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2626,7 +4736,7 @@ func (x *fastReflection_MsgParamsResponse) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgParamsResponse) + x := input.Message.Interface().(*MsgRemoveMarketAuthoritiesResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2658,10 +4768,10 @@ func (x *fastReflection_MsgParamsResponse) 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: MsgParamsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveMarketAuthoritiesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveMarketAuthoritiesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2699,75 +4809,75 @@ func (x *fastReflection_MsgParamsResponse) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_MsgRemoveMarketAuthorities_1_list)(nil) +var _ protoreflect.List = (*_MsgRemoveMarkets_2_list)(nil) -type _MsgRemoveMarketAuthorities_1_list struct { +type _MsgRemoveMarkets_2_list struct { list *[]string } -func (x *_MsgRemoveMarketAuthorities_1_list) Len() int { +func (x *_MsgRemoveMarkets_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_MsgRemoveMarketAuthorities_1_list) Get(i int) protoreflect.Value { +func (x *_MsgRemoveMarkets_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } -func (x *_MsgRemoveMarketAuthorities_1_list) Set(i int, value protoreflect.Value) { +func (x *_MsgRemoveMarkets_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } -func (x *_MsgRemoveMarketAuthorities_1_list) Append(value protoreflect.Value) { +func (x *_MsgRemoveMarkets_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_MsgRemoveMarketAuthorities_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgRemoveMarketAuthorities at list field RemoveAddresses as it is not of Message kind")) +func (x *_MsgRemoveMarkets_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRemoveMarkets at list field Markets as it is not of Message kind")) } -func (x *_MsgRemoveMarketAuthorities_1_list) Truncate(n int) { +func (x *_MsgRemoveMarkets_2_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_MsgRemoveMarketAuthorities_1_list) NewElement() protoreflect.Value { +func (x *_MsgRemoveMarkets_2_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_MsgRemoveMarketAuthorities_1_list) IsValid() bool { +func (x *_MsgRemoveMarkets_2_list) IsValid() bool { return x.list != nil } var ( - md_MsgRemoveMarketAuthorities protoreflect.MessageDescriptor - fd_MsgRemoveMarketAuthorities_remove_addresses protoreflect.FieldDescriptor - fd_MsgRemoveMarketAuthorities_admin protoreflect.FieldDescriptor + md_MsgRemoveMarkets protoreflect.MessageDescriptor + fd_MsgRemoveMarkets_authority protoreflect.FieldDescriptor + fd_MsgRemoveMarkets_markets protoreflect.FieldDescriptor ) func init() { file_slinky_marketmap_v1_tx_proto_init() - md_MsgRemoveMarketAuthorities = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgRemoveMarketAuthorities") - fd_MsgRemoveMarketAuthorities_remove_addresses = md_MsgRemoveMarketAuthorities.Fields().ByName("remove_addresses") - fd_MsgRemoveMarketAuthorities_admin = md_MsgRemoveMarketAuthorities.Fields().ByName("admin") + md_MsgRemoveMarkets = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgRemoveMarkets") + fd_MsgRemoveMarkets_authority = md_MsgRemoveMarkets.Fields().ByName("authority") + fd_MsgRemoveMarkets_markets = md_MsgRemoveMarkets.Fields().ByName("markets") } -var _ protoreflect.Message = (*fastReflection_MsgRemoveMarketAuthorities)(nil) +var _ protoreflect.Message = (*fastReflection_MsgRemoveMarkets)(nil) -type fastReflection_MsgRemoveMarketAuthorities MsgRemoveMarketAuthorities +type fastReflection_MsgRemoveMarkets MsgRemoveMarkets -func (x *MsgRemoveMarketAuthorities) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRemoveMarketAuthorities)(x) +func (x *MsgRemoveMarkets) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRemoveMarkets)(x) } -func (x *MsgRemoveMarketAuthorities) slowProtoReflect() protoreflect.Message { - mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[6] +func (x *MsgRemoveMarkets) slowProtoReflect() protoreflect.Message { + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2778,43 +4888,43 @@ func (x *MsgRemoveMarketAuthorities) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgRemoveMarketAuthorities_messageType fastReflection_MsgRemoveMarketAuthorities_messageType -var _ protoreflect.MessageType = fastReflection_MsgRemoveMarketAuthorities_messageType{} +var _fastReflection_MsgRemoveMarkets_messageType fastReflection_MsgRemoveMarkets_messageType +var _ protoreflect.MessageType = fastReflection_MsgRemoveMarkets_messageType{} -type fastReflection_MsgRemoveMarketAuthorities_messageType struct{} +type fastReflection_MsgRemoveMarkets_messageType struct{} -func (x fastReflection_MsgRemoveMarketAuthorities_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRemoveMarketAuthorities)(nil) +func (x fastReflection_MsgRemoveMarkets_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRemoveMarkets)(nil) } -func (x fastReflection_MsgRemoveMarketAuthorities_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRemoveMarketAuthorities) +func (x fastReflection_MsgRemoveMarkets_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRemoveMarkets) } -func (x fastReflection_MsgRemoveMarketAuthorities_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRemoveMarketAuthorities +func (x fastReflection_MsgRemoveMarkets_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRemoveMarkets } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgRemoveMarketAuthorities) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRemoveMarketAuthorities +func (x *fastReflection_MsgRemoveMarkets) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRemoveMarkets } // 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_MsgRemoveMarketAuthorities) Type() protoreflect.MessageType { - return _fastReflection_MsgRemoveMarketAuthorities_messageType +func (x *fastReflection_MsgRemoveMarkets) Type() protoreflect.MessageType { + return _fastReflection_MsgRemoveMarkets_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRemoveMarketAuthorities) New() protoreflect.Message { - return new(fastReflection_MsgRemoveMarketAuthorities) +func (x *fastReflection_MsgRemoveMarkets) New() protoreflect.Message { + return new(fastReflection_MsgRemoveMarkets) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRemoveMarketAuthorities) Interface() protoreflect.ProtoMessage { - return (*MsgRemoveMarketAuthorities)(x) +func (x *fastReflection_MsgRemoveMarkets) Interface() protoreflect.ProtoMessage { + return (*MsgRemoveMarkets)(x) } // Range iterates over every populated field in an undefined order, @@ -2822,16 +4932,16 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) Interface() protoreflect.Pro // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgRemoveMarketAuthorities) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.RemoveAddresses) != 0 { - value := protoreflect.ValueOfList(&_MsgRemoveMarketAuthorities_1_list{list: &x.RemoveAddresses}) - if !f(fd_MsgRemoveMarketAuthorities_remove_addresses, value) { +func (x *fastReflection_MsgRemoveMarkets) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgRemoveMarkets_authority, value) { return } } - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_MsgRemoveMarketAuthorities_admin, value) { + if len(x.Markets) != 0 { + value := protoreflect.ValueOfList(&_MsgRemoveMarkets_2_list{list: &x.Markets}) + if !f(fd_MsgRemoveMarkets_markets, value) { return } } @@ -2848,17 +4958,17 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) Range(f func(protoreflect.Fi // 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_MsgRemoveMarketAuthorities) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgRemoveMarkets) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.remove_addresses": - return len(x.RemoveAddresses) != 0 - case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.admin": - return x.Admin != "" + case "slinky.marketmap.v1.MsgRemoveMarkets.authority": + return x.Authority != "" + case "slinky.marketmap.v1.MsgRemoveMarkets.markets": + return len(x.Markets) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthorities")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthorities does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarkets does not contain field %s", fd.FullName())) } } @@ -2868,17 +4978,17 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) Has(fd protoreflect.FieldDes // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRemoveMarketAuthorities) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgRemoveMarkets) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.remove_addresses": - x.RemoveAddresses = nil - case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.admin": - x.Admin = "" + case "slinky.marketmap.v1.MsgRemoveMarkets.authority": + x.Authority = "" + case "slinky.marketmap.v1.MsgRemoveMarkets.markets": + x.Markets = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthorities")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthorities does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarkets does not contain field %s", fd.FullName())) } } @@ -2888,22 +4998,22 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) Clear(fd protoreflect.FieldD // 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_MsgRemoveMarketAuthorities) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgRemoveMarkets) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.remove_addresses": - if len(x.RemoveAddresses) == 0 { - return protoreflect.ValueOfList(&_MsgRemoveMarketAuthorities_1_list{}) + case "slinky.marketmap.v1.MsgRemoveMarkets.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "slinky.marketmap.v1.MsgRemoveMarkets.markets": + if len(x.Markets) == 0 { + return protoreflect.ValueOfList(&_MsgRemoveMarkets_2_list{}) } - listValue := &_MsgRemoveMarketAuthorities_1_list{list: &x.RemoveAddresses} + listValue := &_MsgRemoveMarkets_2_list{list: &x.Markets} return protoreflect.ValueOfList(listValue) - case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.admin": - value := x.Admin - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthorities")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthorities does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarkets does not contain field %s", descriptor.FullName())) } } @@ -2917,19 +5027,19 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) Get(descriptor protoreflect. // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRemoveMarketAuthorities) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgRemoveMarkets) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.remove_addresses": + case "slinky.marketmap.v1.MsgRemoveMarkets.authority": + x.Authority = value.Interface().(string) + case "slinky.marketmap.v1.MsgRemoveMarkets.markets": lv := value.List() - clv := lv.(*_MsgRemoveMarketAuthorities_1_list) - x.RemoveAddresses = *clv.list - case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.admin": - x.Admin = value.Interface().(string) + clv := lv.(*_MsgRemoveMarkets_2_list) + x.Markets = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthorities")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthorities does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarkets does not contain field %s", fd.FullName())) } } @@ -2943,49 +5053,49 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) Set(fd protoreflect.FieldDes // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRemoveMarketAuthorities) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgRemoveMarkets) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.remove_addresses": - if x.RemoveAddresses == nil { - x.RemoveAddresses = []string{} + case "slinky.marketmap.v1.MsgRemoveMarkets.markets": + if x.Markets == nil { + x.Markets = []string{} } - value := &_MsgRemoveMarketAuthorities_1_list{list: &x.RemoveAddresses} + value := &_MsgRemoveMarkets_2_list{list: &x.Markets} return protoreflect.ValueOfList(value) - case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.admin": - panic(fmt.Errorf("field admin of message slinky.marketmap.v1.MsgRemoveMarketAuthorities is not mutable")) + case "slinky.marketmap.v1.MsgRemoveMarkets.authority": + panic(fmt.Errorf("field authority of message slinky.marketmap.v1.MsgRemoveMarkets is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthorities")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthorities does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarkets 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_MsgRemoveMarketAuthorities) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgRemoveMarkets) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.remove_addresses": - list := []string{} - return protoreflect.ValueOfList(&_MsgRemoveMarketAuthorities_1_list{list: &list}) - case "slinky.marketmap.v1.MsgRemoveMarketAuthorities.admin": + case "slinky.marketmap.v1.MsgRemoveMarkets.authority": return protoreflect.ValueOfString("") + case "slinky.marketmap.v1.MsgRemoveMarkets.markets": + list := []string{} + return protoreflect.ValueOfList(&_MsgRemoveMarkets_2_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthorities")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarkets")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthorities does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarkets 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_MsgRemoveMarketAuthorities) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgRemoveMarkets) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgRemoveMarketAuthorities", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgRemoveMarkets", d.FullName())) } panic("unreachable") } @@ -2993,7 +5103,7 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) WhichOneof(d protoreflect.On // 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_MsgRemoveMarketAuthorities) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgRemoveMarkets) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3004,7 +5114,7 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) GetUnknown() protoreflect.Ra // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRemoveMarketAuthorities) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgRemoveMarkets) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3016,7 +5126,7 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) SetUnknown(fields protorefle // 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_MsgRemoveMarketAuthorities) IsValid() bool { +func (x *fastReflection_MsgRemoveMarkets) IsValid() bool { return x != nil } @@ -3026,9 +5136,9 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) 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_MsgRemoveMarketAuthorities) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgRemoveMarkets) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRemoveMarketAuthorities) + x := input.Message.Interface().(*MsgRemoveMarkets) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3040,16 +5150,16 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) ProtoMethods() *protoiface.M var n int var l int _ = l - if len(x.RemoveAddresses) > 0 { - for _, s := range x.RemoveAddresses { + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Markets) > 0 { + for _, s := range x.Markets { l = len(s) n += 1 + l + runtime.Sov(uint64(l)) } } - l = len(x.Admin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3060,7 +5170,7 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) ProtoMethods() *protoiface.M } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRemoveMarketAuthorities) + x := input.Message.Interface().(*MsgRemoveMarkets) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3079,22 +5189,22 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) ProtoMethods() *protoiface.M i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) - i-- - dAtA[i] = 0x12 - } - if len(x.RemoveAddresses) > 0 { - for iNdEx := len(x.RemoveAddresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.RemoveAddresses[iNdEx]) - copy(dAtA[i:], x.RemoveAddresses[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RemoveAddresses[iNdEx]))) + if len(x.Markets) > 0 { + for iNdEx := len(x.Markets) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Markets[iNdEx]) + copy(dAtA[i:], x.Markets[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Markets[iNdEx]))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -3106,7 +5216,7 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) ProtoMethods() *protoiface.M }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRemoveMarketAuthorities) + x := input.Message.Interface().(*MsgRemoveMarkets) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3138,15 +5248,15 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) ProtoMethods() *protoiface.M fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveMarketAuthorities: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveMarkets: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveMarketAuthorities: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveMarkets: 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 RemoveAddresses", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3174,11 +5284,11 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) ProtoMethods() *protoiface.M if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.RemoveAddresses = append(x.RemoveAddresses, string(dAtA[iNdEx:postIndex])) + x.Authority = 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 Admin", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Markets", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3206,7 +5316,7 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) ProtoMethods() *protoiface.M if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Admin = string(dAtA[iNdEx:postIndex]) + x.Markets = append(x.Markets, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -3243,25 +5353,73 @@ func (x *fastReflection_MsgRemoveMarketAuthorities) ProtoMethods() *protoiface.M } } +var _ protoreflect.List = (*_MsgRemoveMarketsResponse_1_list)(nil) + +type _MsgRemoveMarketsResponse_1_list struct { + list *[]string +} + +func (x *_MsgRemoveMarketsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRemoveMarketsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgRemoveMarketsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgRemoveMarketsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRemoveMarketsResponse_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRemoveMarketsResponse at list field DeletedMarkets as it is not of Message kind")) +} + +func (x *_MsgRemoveMarketsResponse_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgRemoveMarketsResponse_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgRemoveMarketsResponse_1_list) IsValid() bool { + return x.list != nil +} + var ( - md_MsgRemoveMarketAuthoritiesResponse protoreflect.MessageDescriptor + md_MsgRemoveMarketsResponse protoreflect.MessageDescriptor + fd_MsgRemoveMarketsResponse_deleted_markets protoreflect.FieldDescriptor ) func init() { file_slinky_marketmap_v1_tx_proto_init() - md_MsgRemoveMarketAuthoritiesResponse = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgRemoveMarketAuthoritiesResponse") + md_MsgRemoveMarketsResponse = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgRemoveMarketsResponse") + fd_MsgRemoveMarketsResponse_deleted_markets = md_MsgRemoveMarketsResponse.Fields().ByName("deleted_markets") } -var _ protoreflect.Message = (*fastReflection_MsgRemoveMarketAuthoritiesResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgRemoveMarketsResponse)(nil) -type fastReflection_MsgRemoveMarketAuthoritiesResponse MsgRemoveMarketAuthoritiesResponse +type fastReflection_MsgRemoveMarketsResponse MsgRemoveMarketsResponse -func (x *MsgRemoveMarketAuthoritiesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRemoveMarketAuthoritiesResponse)(x) +func (x *MsgRemoveMarketsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRemoveMarketsResponse)(x) } -func (x *MsgRemoveMarketAuthoritiesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[7] +func (x *MsgRemoveMarketsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3272,43 +5430,43 @@ func (x *MsgRemoveMarketAuthoritiesResponse) slowProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -var _fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType{} +var _fastReflection_MsgRemoveMarketsResponse_messageType fastReflection_MsgRemoveMarketsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRemoveMarketsResponse_messageType{} -type fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType struct{} +type fastReflection_MsgRemoveMarketsResponse_messageType struct{} -func (x fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRemoveMarketAuthoritiesResponse)(nil) +func (x fastReflection_MsgRemoveMarketsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRemoveMarketsResponse)(nil) } -func (x fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRemoveMarketAuthoritiesResponse) +func (x fastReflection_MsgRemoveMarketsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRemoveMarketsResponse) } -func (x fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRemoveMarketAuthoritiesResponse +func (x fastReflection_MsgRemoveMarketsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRemoveMarketsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRemoveMarketAuthoritiesResponse +func (x *fastReflection_MsgRemoveMarketsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRemoveMarketsResponse } // 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_MsgRemoveMarketAuthoritiesResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgRemoveMarketAuthoritiesResponse_messageType +func (x *fastReflection_MsgRemoveMarketsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRemoveMarketsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) New() protoreflect.Message { - return new(fastReflection_MsgRemoveMarketAuthoritiesResponse) +func (x *fastReflection_MsgRemoveMarketsResponse) New() protoreflect.Message { + return new(fastReflection_MsgRemoveMarketsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Interface() protoreflect.ProtoMessage { - return (*MsgRemoveMarketAuthoritiesResponse)(x) +func (x *fastReflection_MsgRemoveMarketsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRemoveMarketsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -3316,7 +5474,13 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Interface() protoref // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgRemoveMarketsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.DeletedMarkets) != 0 { + value := protoreflect.ValueOfList(&_MsgRemoveMarketsResponse_1_list{list: &x.DeletedMarkets}) + if !f(fd_MsgRemoveMarketsResponse_deleted_markets, value) { + return + } + } } // Has reports whether a field is populated. @@ -3330,13 +5494,15 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Range(f func(protore // 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_MsgRemoveMarketAuthoritiesResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgRemoveMarketsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "slinky.marketmap.v1.MsgRemoveMarketsResponse.deleted_markets": + return len(x.DeletedMarkets) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketsResponse does not contain field %s", fd.FullName())) } } @@ -3346,13 +5512,15 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Has(fd protoreflect. // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgRemoveMarketsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "slinky.marketmap.v1.MsgRemoveMarketsResponse.deleted_markets": + x.DeletedMarkets = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketsResponse does not contain field %s", fd.FullName())) } } @@ -3362,13 +5530,19 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Clear(fd protoreflec // 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_MsgRemoveMarketAuthoritiesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgRemoveMarketsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "slinky.marketmap.v1.MsgRemoveMarketsResponse.deleted_markets": + if len(x.DeletedMarkets) == 0 { + return protoreflect.ValueOfList(&_MsgRemoveMarketsResponse_1_list{}) + } + listValue := &_MsgRemoveMarketsResponse_1_list{list: &x.DeletedMarkets} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketsResponse does not contain field %s", descriptor.FullName())) } } @@ -3382,13 +5556,17 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Get(descriptor proto // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgRemoveMarketsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "slinky.marketmap.v1.MsgRemoveMarketsResponse.deleted_markets": + lv := value.List() + clv := lv.(*_MsgRemoveMarketsResponse_1_list) + x.DeletedMarkets = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketsResponse does not contain field %s", fd.FullName())) } } @@ -3402,36 +5580,45 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Set(fd protoreflect. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgRemoveMarketsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "slinky.marketmap.v1.MsgRemoveMarketsResponse.deleted_markets": + if x.DeletedMarkets == nil { + x.DeletedMarkets = []string{} + } + value := &_MsgRemoveMarketsResponse_1_list{list: &x.DeletedMarkets} + return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketsResponse 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_MsgRemoveMarketAuthoritiesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgRemoveMarketsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "slinky.marketmap.v1.MsgRemoveMarketsResponse.deleted_markets": + list := []string{} + return protoreflect.ValueOfList(&_MsgRemoveMarketsResponse_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarketsResponse")) } - panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message slinky.marketmap.v1.MsgRemoveMarketsResponse 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_MsgRemoveMarketAuthoritiesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgRemoveMarketsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in slinky.marketmap.v1.MsgRemoveMarketsResponse", d.FullName())) } panic("unreachable") } @@ -3439,7 +5626,7 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) WhichOneof(d protore // 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_MsgRemoveMarketAuthoritiesResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgRemoveMarketsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3450,7 +5637,7 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) GetUnknown() protore // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgRemoveMarketsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3462,7 +5649,7 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) SetUnknown(fields pr // 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_MsgRemoveMarketAuthoritiesResponse) IsValid() bool { +func (x *fastReflection_MsgRemoveMarketsResponse) IsValid() bool { return x != nil } @@ -3472,9 +5659,9 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) 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_MsgRemoveMarketAuthoritiesResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgRemoveMarketsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRemoveMarketAuthoritiesResponse) + x := input.Message.Interface().(*MsgRemoveMarketsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3486,6 +5673,12 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) ProtoMethods() *prot var n int var l int _ = l + if len(x.DeletedMarkets) > 0 { + for _, s := range x.DeletedMarkets { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3496,7 +5689,7 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) ProtoMethods() *prot } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRemoveMarketAuthoritiesResponse) + x := input.Message.Interface().(*MsgRemoveMarketsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3515,6 +5708,15 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) ProtoMethods() *prot i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.DeletedMarkets) > 0 { + for iNdEx := len(x.DeletedMarkets) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.DeletedMarkets[iNdEx]) + copy(dAtA[i:], x.DeletedMarkets[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DeletedMarkets[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -3526,7 +5728,7 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) ProtoMethods() *prot }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRemoveMarketAuthoritiesResponse) + x := input.Message.Interface().(*MsgRemoveMarketsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3558,12 +5760,44 @@ func (x *fastReflection_MsgRemoveMarketAuthoritiesResponse) ProtoMethods() *prot fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveMarketAuthoritiesResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveMarketsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveMarketAuthoritiesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRemoveMarketsResponse: 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 DeletedMarkets", 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.DeletedMarkets = append(x.DeletedMarkets, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3612,6 +5846,98 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// MsgUpsertMarkets defines a message carrying a payload for performing market +// upserts (update or create if does not exist) in the x/marketmap module. +type MsgUpsertMarkets struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Authority is the signer of this transaction. This authority must be + // authorized by the module to execute the message. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // CreateMarkets is the list of all markets to be created for the given + // transaction. + Markets []*Market `protobuf:"bytes,2,rep,name=markets,proto3" json:"markets,omitempty"` +} + +func (x *MsgUpsertMarkets) Reset() { + *x = MsgUpsertMarkets{} + if protoimpl.UnsafeEnabled { + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpsertMarkets) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpsertMarkets) ProtoMessage() {} + +// Deprecated: Use MsgUpsertMarkets.ProtoReflect.Descriptor instead. +func (*MsgUpsertMarkets) Descriptor() ([]byte, []int) { + return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgUpsertMarkets) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpsertMarkets) GetMarkets() []*Market { + if x != nil { + return x.Markets + } + return nil +} + +// MsgUpsertMarketsResponse is the response from the UpsertMarkets API in the +// x/marketmap module. +type MsgUpsertMarketsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // UpdatedMarkets is a map between the ticker and whether the market was + // updated. + // Deprecated: This field will be empty in all responses. + // + // Deprecated: Do not use. + MarketUpdates map[string]bool `protobuf:"bytes,1,rep,name=market_updates,json=marketUpdates,proto3" json:"market_updates,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (x *MsgUpsertMarketsResponse) Reset() { + *x = MsgUpsertMarketsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpsertMarketsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpsertMarketsResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpsertMarketsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpsertMarketsResponse) Descriptor() ([]byte, []int) { + return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{1} +} + +// Deprecated: Do not use. +func (x *MsgUpsertMarketsResponse) GetMarketUpdates() map[string]bool { + if x != nil { + return x.MarketUpdates + } + return nil +} + // MsgCreateMarkets defines a message carrying a payload for creating markets in // the x/marketmap module. type MsgCreateMarkets struct { @@ -3630,7 +5956,7 @@ type MsgCreateMarkets struct { func (x *MsgCreateMarkets) Reset() { *x = MsgCreateMarkets{} if protoimpl.UnsafeEnabled { - mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[0] + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3644,7 +5970,7 @@ func (*MsgCreateMarkets) ProtoMessage() {} // Deprecated: Use MsgCreateMarkets.ProtoReflect.Descriptor instead. func (*MsgCreateMarkets) Descriptor() ([]byte, []int) { - return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{0} + return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{2} } func (x *MsgCreateMarkets) GetAuthority() string { @@ -3671,7 +5997,7 @@ type MsgCreateMarketsResponse struct { func (x *MsgCreateMarketsResponse) Reset() { *x = MsgCreateMarketsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[1] + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3685,7 +6011,7 @@ func (*MsgCreateMarketsResponse) ProtoMessage() {} // Deprecated: Use MsgCreateMarketsResponse.ProtoReflect.Descriptor instead. func (*MsgCreateMarketsResponse) Descriptor() ([]byte, []int) { - return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{1} + return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{3} } // MsgUpdateMarkets defines a message carrying a payload for updating the @@ -3706,7 +6032,7 @@ type MsgUpdateMarkets struct { func (x *MsgUpdateMarkets) Reset() { *x = MsgUpdateMarkets{} if protoimpl.UnsafeEnabled { - mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[2] + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3720,7 +6046,7 @@ func (*MsgUpdateMarkets) ProtoMessage() {} // Deprecated: Use MsgUpdateMarkets.ProtoReflect.Descriptor instead. func (*MsgUpdateMarkets) Descriptor() ([]byte, []int) { - return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{2} + return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgUpdateMarkets) GetAuthority() string { @@ -3747,7 +6073,7 @@ type MsgUpdateMarketsResponse struct { func (x *MsgUpdateMarketsResponse) Reset() { *x = MsgUpdateMarketsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[3] + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3761,7 +6087,7 @@ func (*MsgUpdateMarketsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateMarketsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateMarketsResponse) Descriptor() ([]byte, []int) { - return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{3} + return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{5} } // MsgParams defines the Msg/Params request type. It contains the @@ -3781,7 +6107,7 @@ type MsgParams struct { func (x *MsgParams) Reset() { *x = MsgParams{} if protoimpl.UnsafeEnabled { - mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[4] + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3795,7 +6121,7 @@ func (*MsgParams) ProtoMessage() {} // Deprecated: Use MsgParams.ProtoReflect.Descriptor instead. func (*MsgParams) Descriptor() ([]byte, []int) { - return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{4} + return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgParams) GetParams() *Params { @@ -3822,7 +6148,7 @@ type MsgParamsResponse struct { func (x *MsgParamsResponse) Reset() { *x = MsgParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[5] + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3836,7 +6162,7 @@ func (*MsgParamsResponse) ProtoMessage() {} // Deprecated: Use MsgParamsResponse.ProtoReflect.Descriptor instead. func (*MsgParamsResponse) Descriptor() ([]byte, []int) { - return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{5} + return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{7} } // MsgRemoveMarketAuthorities defines the Msg/RemoveMarketAuthoritiesResponse @@ -3857,7 +6183,7 @@ type MsgRemoveMarketAuthorities struct { func (x *MsgRemoveMarketAuthorities) Reset() { *x = MsgRemoveMarketAuthorities{} if protoimpl.UnsafeEnabled { - mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[6] + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3871,7 +6197,7 @@ func (*MsgRemoveMarketAuthorities) ProtoMessage() {} // Deprecated: Use MsgRemoveMarketAuthorities.ProtoReflect.Descriptor instead. func (*MsgRemoveMarketAuthorities) Descriptor() ([]byte, []int) { - return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{6} + return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgRemoveMarketAuthorities) GetRemoveAddresses() []string { @@ -3899,7 +6225,7 @@ type MsgRemoveMarketAuthoritiesResponse struct { func (x *MsgRemoveMarketAuthoritiesResponse) Reset() { *x = MsgRemoveMarketAuthoritiesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[7] + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3913,7 +6239,93 @@ func (*MsgRemoveMarketAuthoritiesResponse) ProtoMessage() {} // Deprecated: Use MsgRemoveMarketAuthoritiesResponse.ProtoReflect.Descriptor instead. func (*MsgRemoveMarketAuthoritiesResponse) Descriptor() ([]byte, []int) { - return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{7} + return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{9} +} + +// MsgRemoveMarkets defines the Msg/RemoveMarkets request type. It contains the +// new markets to be removed from the market map. +type MsgRemoveMarkets struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Authority is the signer of this transaction. This authority must be + // authorized by the module to execute the message. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Markets is the list of markets to remove. + Markets []string `protobuf:"bytes,2,rep,name=markets,proto3" json:"markets,omitempty"` +} + +func (x *MsgRemoveMarkets) Reset() { + *x = MsgRemoveMarkets{} + if protoimpl.UnsafeEnabled { + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRemoveMarkets) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRemoveMarkets) ProtoMessage() {} + +// Deprecated: Use MsgRemoveMarkets.ProtoReflect.Descriptor instead. +func (*MsgRemoveMarkets) Descriptor() ([]byte, []int) { + return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgRemoveMarkets) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgRemoveMarkets) GetMarkets() []string { + if x != nil { + return x.Markets + } + return nil +} + +// MsgRemoveMarketsResponse defines the +// Msg/MsgRemoveMarketsResponse response type. +type MsgRemoveMarketsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // DeletedMarkets is the list of markets that were removed. + DeletedMarkets []string `protobuf:"bytes,1,rep,name=deleted_markets,json=deletedMarkets,proto3" json:"deleted_markets,omitempty"` +} + +func (x *MsgRemoveMarketsResponse) Reset() { + *x = MsgRemoveMarketsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_slinky_marketmap_v1_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRemoveMarketsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRemoveMarketsResponse) ProtoMessage() {} + +// Deprecated: Use MsgRemoveMarketsResponse.ProtoReflect.Descriptor instead. +func (*MsgRemoveMarketsResponse) Descriptor() ([]byte, []int) { + return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{11} +} + +func (x *MsgRemoveMarketsResponse) GetDeletedMarkets() []string { + if x != nil { + return x.DeletedMarkets + } + return nil } var File_slinky_marketmap_v1_tx_proto protoreflect.FileDescriptor @@ -3932,98 +6344,148 @@ var file_slinky_marketmap_v1_tx_proto_rawDesc = []byte{ 0x61, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd0, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x73, 0x65, + 0x72, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x12, 0x48, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6c, 0x69, 0x6e, - 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x3a, 0x3a, 0xe8, 0xa0, 0x1f, - 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, - 0xe7, 0xb0, 0x2a, 0x23, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2f, 0x78, 0x2f, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xd0, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x48, 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, - 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x3a, 0x3a, 0xe8, 0xa0, 0x1f, 0x00, - 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, - 0xb0, 0x2a, 0x23, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2f, 0x78, 0x2f, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x79, 0x12, 0x3b, 0x0a, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x3a, 0x3a, + 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x23, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2f, 0x78, 0x2f, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x73, + 0x65, 0x72, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x22, 0xcf, 0x01, 0x0a, 0x18, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0e, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x40, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, + 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x04, 0x98, 0xa1, 0x1f, 0x01, 0x22, 0xd0, 0x01, 0x0a, + 0x10, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 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, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x48, 0x0a, 0x0e, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x42, 0x04, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x3a, 0x3a, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x23, 0x73, 0x6c, 0x69, 0x6e, + 0x6b, 0x79, 0x2f, 0x78, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2f, 0x4d, + 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x22, + 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd0, 0x01, 0x0a, 0x10, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, + 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 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, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x48, 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 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, 0x05, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x24, - 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x65, 0x0a, 0x0d, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, + 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x73, 0x3a, 0x3a, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x23, 0x73, 0x6c, 0x69, 0x6e, 0x6b, + 0x79, 0x2f, 0x78, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2f, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x22, 0x1a, + 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x09, 0x4d, + 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, + 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, + 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x13, 0x0a, 0x11, 0x4d, + 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x83, 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x29, 0x0a, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 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, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, + 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x24, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x74, 0x0a, 0x10, + 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, + 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 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, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x22, 0x43, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, + 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x32, 0x86, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x65, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, + 0x12, 0x25, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x2d, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, + 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, + 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x2d, + 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, + 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, + 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x2d, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x2d, 0x2e, 0x73, 0x6c, - 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x6c, 0x69, - 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, 0x2e, 0x73, 0x6c, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, 0x2e, + 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x2f, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x1a, 0x37, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x55, + 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x73, + 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x1a, 0x2d, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x73, + 0x65, 0x72, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x2d, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2f, - 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, - 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, - 0x37, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, - 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, - 0xc2, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, - 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2f, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x4d, 0x58, 0xaa, 0x02, - 0x13, 0x53, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, - 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x53, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x5c, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x53, 0x6c, 0x69, - 0x6e, 0x6b, 0x79, 0x5c, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x53, - 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x3a, 0x3a, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, + 0x42, 0xc2, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, + 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x4d, 0x58, 0xaa, + 0x02, 0x13, 0x53, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, + 0x61, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x53, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x5c, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x53, 0x6c, + 0x69, 0x6e, 0x6b, 0x79, 0x5c, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, + 0x53, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x3a, 0x3a, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, + 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4038,36 +6500,47 @@ func file_slinky_marketmap_v1_tx_proto_rawDescGZIP() []byte { return file_slinky_marketmap_v1_tx_proto_rawDescData } -var file_slinky_marketmap_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_slinky_marketmap_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_slinky_marketmap_v1_tx_proto_goTypes = []interface{}{ - (*MsgCreateMarkets)(nil), // 0: slinky.marketmap.v1.MsgCreateMarkets - (*MsgCreateMarketsResponse)(nil), // 1: slinky.marketmap.v1.MsgCreateMarketsResponse - (*MsgUpdateMarkets)(nil), // 2: slinky.marketmap.v1.MsgUpdateMarkets - (*MsgUpdateMarketsResponse)(nil), // 3: slinky.marketmap.v1.MsgUpdateMarketsResponse - (*MsgParams)(nil), // 4: slinky.marketmap.v1.MsgParams - (*MsgParamsResponse)(nil), // 5: slinky.marketmap.v1.MsgParamsResponse - (*MsgRemoveMarketAuthorities)(nil), // 6: slinky.marketmap.v1.MsgRemoveMarketAuthorities - (*MsgRemoveMarketAuthoritiesResponse)(nil), // 7: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse - (*Market)(nil), // 8: slinky.marketmap.v1.Market - (*Params)(nil), // 9: slinky.marketmap.v1.Params + (*MsgUpsertMarkets)(nil), // 0: slinky.marketmap.v1.MsgUpsertMarkets + (*MsgUpsertMarketsResponse)(nil), // 1: slinky.marketmap.v1.MsgUpsertMarketsResponse + (*MsgCreateMarkets)(nil), // 2: slinky.marketmap.v1.MsgCreateMarkets + (*MsgCreateMarketsResponse)(nil), // 3: slinky.marketmap.v1.MsgCreateMarketsResponse + (*MsgUpdateMarkets)(nil), // 4: slinky.marketmap.v1.MsgUpdateMarkets + (*MsgUpdateMarketsResponse)(nil), // 5: slinky.marketmap.v1.MsgUpdateMarketsResponse + (*MsgParams)(nil), // 6: slinky.marketmap.v1.MsgParams + (*MsgParamsResponse)(nil), // 7: slinky.marketmap.v1.MsgParamsResponse + (*MsgRemoveMarketAuthorities)(nil), // 8: slinky.marketmap.v1.MsgRemoveMarketAuthorities + (*MsgRemoveMarketAuthoritiesResponse)(nil), // 9: slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse + (*MsgRemoveMarkets)(nil), // 10: slinky.marketmap.v1.MsgRemoveMarkets + (*MsgRemoveMarketsResponse)(nil), // 11: slinky.marketmap.v1.MsgRemoveMarketsResponse + nil, // 12: slinky.marketmap.v1.MsgUpsertMarketsResponse.MarketUpdatesEntry + (*Market)(nil), // 13: slinky.marketmap.v1.Market + (*Params)(nil), // 14: slinky.marketmap.v1.Params } var file_slinky_marketmap_v1_tx_proto_depIdxs = []int32{ - 8, // 0: slinky.marketmap.v1.MsgCreateMarkets.create_markets:type_name -> slinky.marketmap.v1.Market - 8, // 1: slinky.marketmap.v1.MsgUpdateMarkets.update_markets:type_name -> slinky.marketmap.v1.Market - 9, // 2: slinky.marketmap.v1.MsgParams.params:type_name -> slinky.marketmap.v1.Params - 0, // 3: slinky.marketmap.v1.Msg.CreateMarkets:input_type -> slinky.marketmap.v1.MsgCreateMarkets - 2, // 4: slinky.marketmap.v1.Msg.UpdateMarkets:input_type -> slinky.marketmap.v1.MsgUpdateMarkets - 4, // 5: slinky.marketmap.v1.Msg.UpdateParams:input_type -> slinky.marketmap.v1.MsgParams - 6, // 6: slinky.marketmap.v1.Msg.RemoveMarketAuthorities:input_type -> slinky.marketmap.v1.MsgRemoveMarketAuthorities - 1, // 7: slinky.marketmap.v1.Msg.CreateMarkets:output_type -> slinky.marketmap.v1.MsgCreateMarketsResponse - 3, // 8: slinky.marketmap.v1.Msg.UpdateMarkets:output_type -> slinky.marketmap.v1.MsgUpdateMarketsResponse - 5, // 9: slinky.marketmap.v1.Msg.UpdateParams:output_type -> slinky.marketmap.v1.MsgParamsResponse - 7, // 10: slinky.marketmap.v1.Msg.RemoveMarketAuthorities:output_type -> slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse - 7, // [7:11] is the sub-list for method output_type - 3, // [3:7] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 13, // 0: slinky.marketmap.v1.MsgUpsertMarkets.markets:type_name -> slinky.marketmap.v1.Market + 12, // 1: slinky.marketmap.v1.MsgUpsertMarketsResponse.market_updates:type_name -> slinky.marketmap.v1.MsgUpsertMarketsResponse.MarketUpdatesEntry + 13, // 2: slinky.marketmap.v1.MsgCreateMarkets.create_markets:type_name -> slinky.marketmap.v1.Market + 13, // 3: slinky.marketmap.v1.MsgUpdateMarkets.update_markets:type_name -> slinky.marketmap.v1.Market + 14, // 4: slinky.marketmap.v1.MsgParams.params:type_name -> slinky.marketmap.v1.Params + 2, // 5: slinky.marketmap.v1.Msg.CreateMarkets:input_type -> slinky.marketmap.v1.MsgCreateMarkets + 4, // 6: slinky.marketmap.v1.Msg.UpdateMarkets:input_type -> slinky.marketmap.v1.MsgUpdateMarkets + 6, // 7: slinky.marketmap.v1.Msg.UpdateParams:input_type -> slinky.marketmap.v1.MsgParams + 8, // 8: slinky.marketmap.v1.Msg.RemoveMarketAuthorities:input_type -> slinky.marketmap.v1.MsgRemoveMarketAuthorities + 0, // 9: slinky.marketmap.v1.Msg.UpsertMarkets:input_type -> slinky.marketmap.v1.MsgUpsertMarkets + 10, // 10: slinky.marketmap.v1.Msg.RemoveMarkets:input_type -> slinky.marketmap.v1.MsgRemoveMarkets + 3, // 11: slinky.marketmap.v1.Msg.CreateMarkets:output_type -> slinky.marketmap.v1.MsgCreateMarketsResponse + 5, // 12: slinky.marketmap.v1.Msg.UpdateMarkets:output_type -> slinky.marketmap.v1.MsgUpdateMarketsResponse + 7, // 13: slinky.marketmap.v1.Msg.UpdateParams:output_type -> slinky.marketmap.v1.MsgParamsResponse + 9, // 14: slinky.marketmap.v1.Msg.RemoveMarketAuthorities:output_type -> slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse + 1, // 15: slinky.marketmap.v1.Msg.UpsertMarkets:output_type -> slinky.marketmap.v1.MsgUpsertMarketsResponse + 11, // 16: slinky.marketmap.v1.Msg.RemoveMarkets:output_type -> slinky.marketmap.v1.MsgRemoveMarketsResponse + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_slinky_marketmap_v1_tx_proto_init() } @@ -4079,7 +6552,7 @@ func file_slinky_marketmap_v1_tx_proto_init() { file_slinky_marketmap_v1_params_proto_init() if !protoimpl.UnsafeEnabled { file_slinky_marketmap_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateMarkets); i { + switch v := v.(*MsgUpsertMarkets); i { case 0: return &v.state case 1: @@ -4091,7 +6564,7 @@ func file_slinky_marketmap_v1_tx_proto_init() { } } file_slinky_marketmap_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateMarketsResponse); i { + switch v := v.(*MsgUpsertMarketsResponse); i { case 0: return &v.state case 1: @@ -4103,7 +6576,7 @@ func file_slinky_marketmap_v1_tx_proto_init() { } } file_slinky_marketmap_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateMarkets); i { + switch v := v.(*MsgCreateMarkets); i { case 0: return &v.state case 1: @@ -4115,7 +6588,7 @@ func file_slinky_marketmap_v1_tx_proto_init() { } } file_slinky_marketmap_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateMarketsResponse); i { + switch v := v.(*MsgCreateMarketsResponse); i { case 0: return &v.state case 1: @@ -4127,7 +6600,7 @@ func file_slinky_marketmap_v1_tx_proto_init() { } } file_slinky_marketmap_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgParams); i { + switch v := v.(*MsgUpdateMarkets); i { case 0: return &v.state case 1: @@ -4139,7 +6612,7 @@ func file_slinky_marketmap_v1_tx_proto_init() { } } file_slinky_marketmap_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgParamsResponse); i { + switch v := v.(*MsgUpdateMarketsResponse); i { case 0: return &v.state case 1: @@ -4151,7 +6624,7 @@ func file_slinky_marketmap_v1_tx_proto_init() { } } file_slinky_marketmap_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRemoveMarketAuthorities); i { + switch v := v.(*MsgParams); i { case 0: return &v.state case 1: @@ -4163,6 +6636,30 @@ func file_slinky_marketmap_v1_tx_proto_init() { } } file_slinky_marketmap_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_slinky_marketmap_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRemoveMarketAuthorities); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_slinky_marketmap_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRemoveMarketAuthoritiesResponse); i { case 0: return &v.state @@ -4174,6 +6671,30 @@ func file_slinky_marketmap_v1_tx_proto_init() { return nil } } + file_slinky_marketmap_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRemoveMarkets); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_slinky_marketmap_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRemoveMarketsResponse); 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{ @@ -4181,7 +6702,7 @@ func file_slinky_marketmap_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_slinky_marketmap_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/api/slinky/marketmap/v1/tx_grpc.pb.go b/api/slinky/marketmap/v1/tx_grpc.pb.go index 7ac14d708..ec402a769 100644 --- a/api/slinky/marketmap/v1/tx_grpc.pb.go +++ b/api/slinky/marketmap/v1/tx_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: slinky/marketmap/v1/tx.proto @@ -15,14 +15,16 @@ import ( // 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.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Msg_CreateMarkets_FullMethodName = "/slinky.marketmap.v1.Msg/CreateMarkets" Msg_UpdateMarkets_FullMethodName = "/slinky.marketmap.v1.Msg/UpdateMarkets" Msg_UpdateParams_FullMethodName = "/slinky.marketmap.v1.Msg/UpdateParams" Msg_RemoveMarketAuthorities_FullMethodName = "/slinky.marketmap.v1.Msg/RemoveMarketAuthorities" + Msg_UpsertMarkets_FullMethodName = "/slinky.marketmap.v1.Msg/UpsertMarkets" + Msg_RemoveMarkets_FullMethodName = "/slinky.marketmap.v1.Msg/RemoveMarkets" ) // MsgClient is the client API for Msg service. @@ -41,6 +43,14 @@ type MsgClient interface { // RemoveMarketAuthorities defines a method for removing market authorities // from the x/marketmap module. the signer must be the admin. RemoveMarketAuthorities(ctx context.Context, in *MsgRemoveMarketAuthorities, opts ...grpc.CallOption) (*MsgRemoveMarketAuthoritiesResponse, error) + // UpsertMarkets wraps both Create / Update markets into a single message. + // Specifically if a market does not exist it will be created, otherwise it + // will be updated. The response will be a map between ticker -> updated. + UpsertMarkets(ctx context.Context, in *MsgUpsertMarkets, opts ...grpc.CallOption) (*MsgUpsertMarketsResponse, error) + // RemoveMarkets removes the given markets from the marketmap if: + // - they exist in the map + // - they are disabled + RemoveMarkets(ctx context.Context, in *MsgRemoveMarkets, opts ...grpc.CallOption) (*MsgRemoveMarketsResponse, error) } type msgClient struct { @@ -91,9 +101,29 @@ func (c *msgClient) RemoveMarketAuthorities(ctx context.Context, in *MsgRemoveMa return out, nil } +func (c *msgClient) UpsertMarkets(ctx context.Context, in *MsgUpsertMarkets, opts ...grpc.CallOption) (*MsgUpsertMarketsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpsertMarketsResponse) + err := c.cc.Invoke(ctx, Msg_UpsertMarkets_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RemoveMarkets(ctx context.Context, in *MsgRemoveMarkets, opts ...grpc.CallOption) (*MsgRemoveMarketsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgRemoveMarketsResponse) + err := c.cc.Invoke(ctx, Msg_RemoveMarkets_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer -// for forward compatibility +// for forward compatibility. // // Msg is the message service for the x/marketmap module. type MsgServer interface { @@ -107,12 +137,23 @@ type MsgServer interface { // RemoveMarketAuthorities defines a method for removing market authorities // from the x/marketmap module. the signer must be the admin. RemoveMarketAuthorities(context.Context, *MsgRemoveMarketAuthorities) (*MsgRemoveMarketAuthoritiesResponse, error) + // UpsertMarkets wraps both Create / Update markets into a single message. + // Specifically if a market does not exist it will be created, otherwise it + // will be updated. The response will be a map between ticker -> updated. + UpsertMarkets(context.Context, *MsgUpsertMarkets) (*MsgUpsertMarketsResponse, error) + // RemoveMarkets removes the given markets from the marketmap if: + // - they exist in the map + // - they are disabled + RemoveMarkets(context.Context, *MsgRemoveMarkets) (*MsgRemoveMarketsResponse, error) mustEmbedUnimplementedMsgServer() } -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} +// UnimplementedMsgServer 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 UnimplementedMsgServer struct{} func (UnimplementedMsgServer) CreateMarkets(context.Context, *MsgCreateMarkets) (*MsgCreateMarketsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateMarkets not implemented") @@ -126,7 +167,14 @@ func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgParams) (*MsgPar func (UnimplementedMsgServer) RemoveMarketAuthorities(context.Context, *MsgRemoveMarketAuthorities) (*MsgRemoveMarketAuthoritiesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveMarketAuthorities not implemented") } +func (UnimplementedMsgServer) UpsertMarkets(context.Context, *MsgUpsertMarkets) (*MsgUpsertMarketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpsertMarkets not implemented") +} +func (UnimplementedMsgServer) RemoveMarkets(context.Context, *MsgRemoveMarkets) (*MsgRemoveMarketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveMarkets not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} +func (UnimplementedMsgServer) testEmbeddedByValue() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MsgServer will @@ -136,6 +184,13 @@ type UnsafeMsgServer interface { } func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + // If the following call pancis, it indicates UnimplementedMsgServer 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(&Msg_ServiceDesc, srv) } @@ -211,6 +266,42 @@ func _Msg_RemoveMarketAuthorities_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Msg_UpsertMarkets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpsertMarkets) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpsertMarkets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpsertMarkets_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpsertMarkets(ctx, req.(*MsgUpsertMarkets)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RemoveMarkets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRemoveMarkets) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RemoveMarkets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_RemoveMarkets_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RemoveMarkets(ctx, req.(*MsgRemoveMarkets)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -234,6 +325,14 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "RemoveMarketAuthorities", Handler: _Msg_RemoveMarketAuthorities_Handler, }, + { + MethodName: "UpsertMarkets", + Handler: _Msg_UpsertMarkets_Handler, + }, + { + MethodName: "RemoveMarkets", + Handler: _Msg_RemoveMarkets_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "slinky/marketmap/v1/tx.proto", diff --git a/api/slinky/oracle/v1/query_grpc.pb.go b/api/slinky/oracle/v1/query_grpc.pb.go index bf893f2c2..8c84ec260 100644 --- a/api/slinky/oracle/v1/query_grpc.pb.go +++ b/api/slinky/oracle/v1/query_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: slinky/oracle/v1/query.proto @@ -15,8 +15,8 @@ import ( // 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.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Query_GetAllCurrencyPairs_FullMethodName = "/slinky.oracle.v1.Query/GetAllCurrencyPairs" @@ -93,7 +93,7 @@ func (c *queryClient) GetCurrencyPairMapping(ctx context.Context, in *GetCurrenc // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer -// for forward compatibility +// for forward compatibility. // // Query is the query service for the x/oracle module. type QueryServer interface { @@ -110,9 +110,12 @@ type QueryServer interface { mustEmbedUnimplementedQueryServer() } -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} +// 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) GetAllCurrencyPairs(context.Context, *GetAllCurrencyPairsRequest) (*GetAllCurrencyPairsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAllCurrencyPairs not implemented") @@ -127,6 +130,7 @@ func (UnimplementedQueryServer) GetCurrencyPairMapping(context.Context, *GetCurr return nil, status.Errorf(codes.Unimplemented, "method GetCurrencyPairMapping 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 @@ -136,6 +140,13 @@ type UnsafeQueryServer interface { } 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) } diff --git a/api/slinky/oracle/v1/tx_grpc.pb.go b/api/slinky/oracle/v1/tx_grpc.pb.go index 5938bc4e9..c427a2490 100644 --- a/api/slinky/oracle/v1/tx_grpc.pb.go +++ b/api/slinky/oracle/v1/tx_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: slinky/oracle/v1/tx.proto @@ -15,8 +15,8 @@ import ( // 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.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Msg_AddCurrencyPairs_FullMethodName = "/slinky.oracle.v1.Msg/AddCurrencyPairs" @@ -69,7 +69,7 @@ func (c *msgClient) RemoveCurrencyPairs(ctx context.Context, in *MsgRemoveCurren // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer -// for forward compatibility +// for forward compatibility. // // Msg is the message service for the x/oracle module. type MsgServer interface { @@ -84,9 +84,12 @@ type MsgServer interface { mustEmbedUnimplementedMsgServer() } -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} +// UnimplementedMsgServer 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 UnimplementedMsgServer struct{} func (UnimplementedMsgServer) AddCurrencyPairs(context.Context, *MsgAddCurrencyPairs) (*MsgAddCurrencyPairsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddCurrencyPairs not implemented") @@ -95,6 +98,7 @@ func (UnimplementedMsgServer) RemoveCurrencyPairs(context.Context, *MsgRemoveCur return nil, status.Errorf(codes.Unimplemented, "method RemoveCurrencyPairs not implemented") } func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} +func (UnimplementedMsgServer) testEmbeddedByValue() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MsgServer will @@ -104,6 +108,13 @@ type UnsafeMsgServer interface { } func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + // If the following call pancis, it indicates UnimplementedMsgServer 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(&Msg_ServiceDesc, srv) } diff --git a/go.mod b/go.mod index 9fc4be70e..f0a68013b 100644 --- a/go.mod +++ b/go.mod @@ -51,12 +51,6 @@ require ( require ( cloud.google.com/go/storage v1.43.0 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect - github.com/golangci/go-printf-func-name v0.1.0 // indirect - github.com/raeperd/recvcheck v0.1.2 // indirect - github.com/uudashr/iface v1.2.1 // indirect -) - -require ( 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect 4d63.com/gochecknoglobals v0.2.1 // indirect cosmossdk.io/errors v1.0.1 // indirect @@ -80,7 +74,6 @@ require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect github.com/StackExchange/wmi v1.2.1 // indirect - github.com/alecthomas/assert/v2 v2.6.0 // indirect github.com/alecthomas/go-check-sumtype v0.2.0 // indirect github.com/alexkohler/nakedret/v2 v2.0.5 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect diff --git a/oracle/market_mapper_test.go b/oracle/market_mapper_test.go index 3ab125200..86a223604 100644 --- a/oracle/market_mapper_test.go +++ b/oracle/market_mapper_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" "github.com/skip-mev/slinky/oracle" - connecttypes "github.com/skip-mev/slinky/pkg/types" + slinkytypes "github.com/skip-mev/slinky/pkg/types" oraclefactory "github.com/skip-mev/slinky/providers/factories/oracle" "github.com/skip-mev/slinky/providers/providertest" mmclienttypes "github.com/skip-mev/slinky/service/clients/marketmap/types" @@ -22,7 +22,7 @@ import ( var ( btcusdt = mmtypes.Market{ Ticker: mmtypes.Ticker{ - CurrencyPair: connecttypes.CurrencyPair{ + CurrencyPair: slinkytypes.CurrencyPair{ Base: "BITCOIN", Quote: "USDT", }, @@ -39,7 +39,7 @@ var ( usdtusd = mmtypes.Market{ Ticker: mmtypes.Ticker{ - CurrencyPair: connecttypes.CurrencyPair{ + CurrencyPair: slinkytypes.CurrencyPair{ Base: "USDT", Quote: "USD", }, @@ -56,7 +56,7 @@ var ( usdcusd = mmtypes.Market{ Ticker: mmtypes.Ticker{ - CurrencyPair: connecttypes.CurrencyPair{ + CurrencyPair: slinkytypes.CurrencyPair{ Base: "USDC", Quote: "USD", }, @@ -73,7 +73,7 @@ var ( ethusdt = mmtypes.Market{ Ticker: mmtypes.Ticker{ - CurrencyPair: connecttypes.CurrencyPair{ + CurrencyPair: slinkytypes.CurrencyPair{ Base: "ETHEREUM", Quote: "USDT", }, diff --git a/proto/slinky/marketmap/v1/tx.proto b/proto/slinky/marketmap/v1/tx.proto index eac65ea3a..b2241741e 100644 --- a/proto/slinky/marketmap/v1/tx.proto +++ b/proto/slinky/marketmap/v1/tx.proto @@ -33,6 +33,11 @@ service Msg { // Specifically if a market does not exist it will be created, otherwise it // will be updated. The response will be a map between ticker -> updated. rpc UpsertMarkets(MsgUpsertMarkets) returns (MsgUpsertMarketsResponse); + + // RemoveMarkets removes the given markets from the marketmap if: + // - they exist in the map + // - they are disabled + rpc RemoveMarkets(MsgRemoveMarkets) returns (MsgRemoveMarketsResponse); } // MsgUpsertMarkets defines a message carrying a payload for performing market @@ -134,3 +139,23 @@ message MsgRemoveMarketAuthorities { // MsgRemoveMarketAuthoritiesResponse defines the // Msg/RemoveMarketAuthoritiesResponse response type. message MsgRemoveMarketAuthoritiesResponse {} + +// MsgRemoveMarkets defines the Msg/RemoveMarkets request type. It contains the +// new markets to be removed from the market map. +message MsgRemoveMarkets { + option (cosmos.msg.v1.signer) = "authority"; + + // Authority is the signer of this transaction. This authority must be + // authorized by the module to execute the message. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // Markets is the list of markets to remove. + repeated string markets = 2; +} + +// MsgRemoveMarketsResponse defines the +// Msg/MsgRemoveMarketsResponse response type. +message MsgRemoveMarketsResponse { + // DeletedMarkets is the list of markets that were removed. + repeated string deleted_markets = 1; +} diff --git a/scripts/protocgen-pulsar.sh b/scripts/protocgen-pulsar.sh index fd8bf6af4..072c93891 100644 --- a/scripts/protocgen-pulsar.sh +++ b/scripts/protocgen-pulsar.sh @@ -13,7 +13,7 @@ echo "Cleaning API directory" (cd api; find ./ -type f \( -iname \*.pulsar.go -o -iname \*.pb.go -o -iname \*.cosmos_orm.go -o -iname \*.pb.gw.go \) -delete; find . -empty -type d -delete; cd ..) echo "Generating API module" -(cd proto; buf generate --template buf.gen.pulsar.yaml) +(cd proto; buf generate --template buf.gen.pulsar.yaml --exclude-path slinky/service) echo "fixing types.pulsar.go" sed -i.bak 's|cosmossdk.io/api/slinky/types/v1|github.com/skip-mev/slinky/api/slinky/types/v1|g' ./api/slinky/types/v1/currency_pair.pulsar.go && rm ./api/slinky/types/v1/currency_pair.pulsar.go.bak diff --git a/tests/integration/consumer.go b/tests/integration/consumer.go index 6ddbb86f9..6a41e8a9b 100644 --- a/tests/integration/consumer.go +++ b/tests/integration/consumer.go @@ -16,7 +16,7 @@ import ( var ( providerChainID = "provider-1" - providerNumValidators = int(4) + providerNumValidators = 4 providerVersion = "v5.0.0-rc0" ) diff --git a/tests/integration/slinky_setup.go b/tests/integration/slinky_setup.go index a63e527d7..9b80f81ff 100644 --- a/tests/integration/slinky_setup.go +++ b/tests/integration/slinky_setup.go @@ -472,6 +472,37 @@ func (s *SlinkyIntegrationSuite) AddCurrencyPairs(chain *cosmos.CosmosChain, use return nil } +func (s *SlinkyIntegrationSuite) RemoveMarket( + chain *cosmos.CosmosChain, + markets []slinkytypes.CurrencyPair, +) error { + marketString := make([]string, len(markets)) + for i, market := range markets { + marketString[i] = market.String() + } + + msg := &mmtypes.MsgRemoveMarkets{ + Authority: s.user.FormattedAddress(), + Markets: marketString, + } + + tx := CreateTx(s.T(), s.chain, s.user, gasPrice, msg) + + // get an rpc endpoint for the chain + client := chain.Nodes()[0].Client + // broadcast the tx + resp, err := client.BroadcastTxCommit(context.Background(), tx) + if err != nil { + return err + } + + if resp.TxResult.Code != abcitypes.CodeTypeOK { + return fmt.Errorf(resp.TxResult.Log) + } + + return nil +} + func (s *SlinkyIntegrationSuite) UpdateCurrencyPair(chain *cosmos.CosmosChain, markets []mmtypes.Market) error { msg := &mmtypes.MsgUpsertMarkets{ Authority: s.user.FormattedAddress(), diff --git a/tests/integration/slinky_suite.go b/tests/integration/slinky_suite.go index 9490927a6..6d8d18e7f 100644 --- a/tests/integration/slinky_suite.go +++ b/tests/integration/slinky_suite.go @@ -38,7 +38,6 @@ const ( defaultDenom = "stake" validatorKey = "validator" yes = "yes" - deposit = 1000000 userMnemonic = "foster poverty abstract scorpion short shrimp tilt edge romance adapt only benefit moral another where host egg echo ability wisdom lizard lazy pool roast" userAccountAddressHex = "877E307618AB73E009A978AC32E0264791F6D40A" gasPrice = 100 @@ -366,12 +365,50 @@ func (s *SlinkyOracleIntegrationSuite) TestOracleModule() { cp1 := slinkytypes.NewCurrencyPair("ETH", "USD") cp2 := slinkytypes.NewCurrencyPair("USDT", "USD") s.Require().NoError(s.AddCurrencyPairs(s.chain, s.user, 1.1, []mmtypes.Ticker{ - enabledTicker(cp1), enabledTicker(cp2), + enabledTicker(cp1), + enabledTicker(cp2), }...)) resp, err := QueryCurrencyPairs(s.chain) s.Require().NoError(err) s.Require().True(len(resp.CurrencyPairs) == 3) + + s.Run("fail to remove an enabled market", func() { + s.Require().Error(s.RemoveMarket(s.chain, []slinkytypes.CurrencyPair{cp1})) + + // check not removed + market, err := QueryMarket(s.chain, cp1) + s.Require().NoError(err) + s.Require().NotNil(market) + }) + }) + + s.Run("remove a disabled market", func() { + disabledCP := slinkytypes.NewCurrencyPair("DIS", "ABLE") + s.Require().NoError(s.AddCurrencyPairs(s.chain, s.user, 1.1, []mmtypes.Ticker{ + disabledTicker(disabledCP), + }...)) + + market, err := QueryMarket(s.chain, disabledCP) + s.Require().NoError(err) + s.Require().NotNil(market) + + s.Require().NoError(s.RemoveMarket(s.chain, []slinkytypes.CurrencyPair{disabledCP})) + + // check removed + _, err = QueryMarket(s.chain, disabledCP) + s.Require().Error(err) + }) + + s.Run("remove a non existent market", func() { + nonexistentCP := slinkytypes.NewCurrencyPair("NON", "EXIST") + + // check removed doesnt exist + _, err := QueryMarket(s.chain, nonexistentCP) + s.Require().Error(err) + + // tx will not error + s.Require().NoError(s.RemoveMarket(s.chain, []slinkytypes.CurrencyPair{nonexistentCP})) }) } @@ -381,9 +418,16 @@ func translateGRPCAddr(chain *cosmos.CosmosChain) string { func (s *SlinkyOracleIntegrationSuite) TestNodeFailures() { ethusdcCP := slinkytypes.NewCurrencyPair("ETH", "USDC") + tickerETHUSDC := mmtypes.Ticker{ + CurrencyPair: ethusdcCP, + Decimals: 8, + MinProviderCount: 1, + Enabled: true, + Metadata_JSON: "", + } s.Require().NoError(s.AddCurrencyPairs(s.chain, s.user, 1.1, []mmtypes.Ticker{ - enabledTicker(ethusdcCP), + tickerETHUSDC, }...)) cc, closeFn, err := GetChainGRPC(s.chain) @@ -577,12 +621,12 @@ func (s *SlinkyOracleIntegrationSuite) TestNodeFailures() { }) } -func (s *SlinkyOracleIntegrationSuite) TestMultiplePriceFeeds() { +func (s *SlinkyIntegrationSuite) TestMultiplePriceFeeds() { ethusdcCP := slinkytypes.NewCurrencyPair("ETH", "USDC") ethusdtCP := slinkytypes.NewCurrencyPair("ETH", "USDT") ethusdCP := slinkytypes.NewCurrencyPair("ETH", "USD") - // add multiple currency pairs + // add multiple tickers tickers := []mmtypes.Ticker{ enabledTicker(ethusdcCP), enabledTicker(ethusdtCP), diff --git a/tests/integration/slinky_validator_suite.go b/tests/integration/slinky_validator_suite.go index e4336a314..1347379f1 100644 --- a/tests/integration/slinky_validator_suite.go +++ b/tests/integration/slinky_validator_suite.go @@ -4,14 +4,13 @@ import ( "context" "time" - mmtypes "github.com/skip-mev/slinky/x/marketmap/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" oracleconfig "github.com/skip-mev/slinky/oracle/config" "github.com/skip-mev/slinky/oracle/types" slinkytypes "github.com/skip-mev/slinky/pkg/types" "github.com/skip-mev/slinky/providers/static" + mmtypes "github.com/skip-mev/slinky/x/marketmap/types" oracletypes "github.com/skip-mev/slinky/x/oracle/types" ) diff --git a/x/marketmap/keeper/keeper.go b/x/marketmap/keeper/keeper.go index d27fb1726..9e63fd374 100644 --- a/x/marketmap/keeper/keeper.go +++ b/x/marketmap/keeper/keeper.go @@ -1,6 +1,7 @@ package keeper import ( + "errors" "fmt" "cosmossdk.io/collections" @@ -30,10 +31,13 @@ type Keeper struct { // params is the module's parameters. params collections.Item[types.Params] + + // deleteValidationHooks are called by the keeper before any deletion call is performed. + deleteMarketValidationHooks types.MarketValidationHooks } // NewKeeper initializes the keeper and its backing stores. -func NewKeeper(ss store.KVStoreService, cdc codec.BinaryCodec, authority sdk.AccAddress) *Keeper { +func NewKeeper(ss store.KVStoreService, cdc codec.BinaryCodec, authority sdk.AccAddress, opts ...Option) *Keeper { sb := collections.NewSchemaBuilder(ss) // Create the collections item that will track the module parameters. @@ -44,14 +48,27 @@ func NewKeeper(ss store.KVStoreService, cdc codec.BinaryCodec, authority sdk.Acc codec.CollValue[types.Params](cdc), ) - return &Keeper{ - cdc: cdc, - authority: authority, - markets: collections.NewMap(sb, types.MarketsPrefix, "markets", types.TickersCodec, codec.CollValue[types.Market](cdc)), - lastUpdated: collections.NewItem[uint64](sb, types.LastUpdatedPrefix, "last_updated", types.LastUpdatedCodec), - params: params, - hooks: &types.NoopMarketMapHooks{}, + k := &Keeper{ + cdc: cdc, + authority: authority, + markets: collections.NewMap(sb, types.MarketsPrefix, "markets", types.TickersCodec, codec.CollValue[types.Market](cdc)), + lastUpdated: collections.NewItem[uint64](sb, types.LastUpdatedPrefix, "last_updated", types.LastUpdatedCodec), + params: params, + hooks: &types.NoopMarketMapHooks{}, + deleteMarketValidationHooks: types.DefaultDeleteMarketValidationHooks(), + } + + // apply options to default initialized keeper + for _, opt := range opts { + opt(k) } + + return k +} + +// SetDeleteMarketValidationHooks sets the MarketValidationHooks for deletion in the keeper. +func (k *Keeper) SetDeleteMarketValidationHooks(hooks types.MarketValidationHooks) { + k.deleteMarketValidationHooks = hooks } // SetLastUpdated sets the lastUpdated field to the current block height. @@ -109,7 +126,6 @@ func (k *Keeper) GetAllMarkets(ctx sdk.Context) (map[string]types.Market, error) if err != nil { return nil, err } - m := make(map[string]types.Market, len(keyValues)) for _, keyValue := range keyValues { m[string(keyValue.Key)] = keyValue.Value @@ -148,19 +164,28 @@ func (k *Keeper) UpdateMarket(ctx sdk.Context, market types.Market) error { return k.setMarket(ctx, market) } -// DeleteMarket removes a Market. -// This is currently only expected to be called in upgrade handlers, and callers will need to separately call -// RemoveCurrencyPair on x/oracle to clean up leftover state in that module. -func (k *Keeper) DeleteMarket(ctx sdk.Context, tickerStr string) error { - // Check if Ticker exists - alreadyExists, err := k.markets.Has(ctx, types.TickerString(tickerStr)) - if err != nil { - return err +// DeleteMarket removes a Market. If the market does not exist, this is a no-op and nil is returned. +// If the market exists, all DeleteMarketValidationHooks are called on the market before deletion. +// Additionally, returns true if the market was deleted. +func (k *Keeper) DeleteMarket(ctx sdk.Context, tickerStr string) (bool, error) { + market, err := k.GetMarket(ctx, tickerStr) + switch { + case errors.Is(err, collections.ErrNotFound): + return false, nil + case err != nil: + return false, fmt.Errorf("failed to get market for ticker %s: %w", tickerStr, err) } - if !alreadyExists { - return types.NewMarketDoesNotExistsError(types.TickerString(tickerStr)) + + if err := k.deleteMarketValidationHooks.ValidateMarket(ctx, market); err != nil { + return false, err } - return k.markets.Remove(ctx, types.TickerString(tickerStr)) + + err = k.markets.Remove(ctx, types.TickerString(market.Ticker.String())) + if err != nil { + return false, err + } + + return true, nil } // HasMarket checks if a market exists in the store. diff --git a/x/marketmap/keeper/keeper_test.go b/x/marketmap/keeper/keeper_test.go index 7ff2b0eb9..eaf4c6053 100644 --- a/x/marketmap/keeper/keeper_test.go +++ b/x/marketmap/keeper/keeper_test.go @@ -323,14 +323,30 @@ func (s *KeeperTestSuite) TestInvalidCreateDisabledNormalizeBy() { func (s *KeeperTestSuite) TestDeleteMarket() { // create a valid markets - s.Require().NoError(s.keeper.CreateMarket(s.ctx, btcusdt)) + btcCopy := btcusdt + btcCopy.Ticker.Enabled = true + s.Require().NoError(s.keeper.CreateMarket(s.ctx, btcCopy)) + + // invalid delete will return nil - idempotent + deleted, err := s.keeper.DeleteMarket(s.ctx, "foobar") + s.Require().NoError(err) + s.Require().False(deleted) - // invalid delete fails - s.Require().Error(s.keeper.DeleteMarket(s.ctx, "foobar")) + // cannot delete enabled markets + deleted, err = s.keeper.DeleteMarket(s.ctx, btcCopy.Ticker.String()) + s.Require().Error(err) + s.Require().False(deleted) + + // disable market + btcCopy.Ticker.Enabled = false + s.Require().NoError(s.keeper.UpdateMarket(s.ctx, btcCopy)) + + // delete disabled markets + deleted, err = s.keeper.DeleteMarket(s.ctx, btcCopy.Ticker.String()) + s.Require().NoError(err) + s.Require().True(deleted) - // valid delete works - s.Require().NoError(s.keeper.DeleteMarket(s.ctx, btcusdt.Ticker.String())) - _, err := s.keeper.GetMarket(s.ctx, btcusdt.Ticker.String()) + _, err = s.keeper.GetMarket(s.ctx, btcCopy.Ticker.String()) s.Require().Error(err) } diff --git a/x/marketmap/keeper/msg_server.go b/x/marketmap/keeper/msg_server.go index dbeac0e67..a5098adab 100644 --- a/x/marketmap/keeper/msg_server.go +++ b/x/marketmap/keeper/msg_server.go @@ -250,6 +250,57 @@ func (ms msgServer) RemoveMarketAuthorities(goCtx context.Context, msg *types.Ms return &types.MsgRemoveMarketAuthoritiesResponse{}, nil } +// RemoveMarkets attempts to remove the provided markets from the MarketMap. Stateful validation is performed on these +// markets using the configured ValidationHooks. +func (ms msgServer) RemoveMarkets( + goCtx context.Context, + msg *types.MsgRemoveMarkets) ( + *types.MsgRemoveMarketsResponse, error, +) { + if msg == nil { + return nil, fmt.Errorf("unable to process nil msg") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + // perform basic msg validity checks + if err := ms.verifyMarketAuthorities(ctx, msg); err != nil { + return nil, fmt.Errorf("unable to verify market authorities: %w", err) + } + + deletedMarkets := make([]string, 0, len(msg.Markets)) + for _, market := range msg.Markets { + deleted, err := ms.k.DeleteMarket(ctx, market) + if err != nil { + return nil, fmt.Errorf("unable to delete market: %w", err) + } + + if deleted { + ctx.Logger().Info(fmt.Sprintf("deleted market %s", market)) + deletedMarkets = append(deletedMarkets, market) + } + + if err := ms.k.hooks.AfterMarketRemoved(ctx, market); err != nil { + return nil, fmt.Errorf("unable to run market removal hook: %w", err) + } + } + + // check if the resulting state is valid: it may not be valid if the removed market is used as a normalization pair + allMarkets, err := ms.k.GetAllMarkets(ctx) + if err != nil { + return nil, err + } + + mm := types.MarketMap{Markets: allMarkets} + if err := mm.ValidateBasic(); err != nil { + return nil, fmt.Errorf("invalid state resulting from removals: %w", err) + } + + return &types.MsgRemoveMarketsResponse{ + DeletedMarkets: deletedMarkets, + }, nil +} + // checkMarketAuthority checks if the given authority is the x/marketmap's list of MarketAuthorities. func checkMarketAuthority(authority string, params types.Params) bool { if len(params.MarketAuthorities) == 0 { diff --git a/x/marketmap/keeper/msg_server_test.go b/x/marketmap/keeper/msg_server_test.go index 3096f0034..4affcf865 100644 --- a/x/marketmap/keeper/msg_server_test.go +++ b/x/marketmap/keeper/msg_server_test.go @@ -519,3 +519,214 @@ func (s *KeeperTestSuite) TestMsgServerUpsertMarkets() { s.Require().Nil(resp) }) } + +func (s *KeeperTestSuite) TestMsgServerRemoveMarkets() { + msgServer := keeper.NewMsgServer(s.keeper) + + s.Run("unable to process nil request", func() { + resp, err := msgServer.RemoveMarkets(s.ctx, nil) + s.Require().Error(err) + s.Require().Nil(resp) + }) + + s.Run("unable to process for invalid authority", func() { + msg := &types.MsgRemoveMarkets{ + Authority: "invalid", + } + resp, err := msgServer.RemoveMarkets(s.ctx, msg) + s.Require().Error(err) + s.Require().Nil(resp) + }) + + s.Run("only remove existing markets - no error", func() { + msg := &types.MsgRemoveMarkets{ + Authority: s.marketAuthorities[0], + Markets: []string{"BTC/USD", "ETH/USDT"}, + } + resp, err := msgServer.RemoveMarkets(s.ctx, msg) + s.Require().NoError(err) + s.Require().Equal([]string{}, resp.DeletedMarkets) + }) + + s.Run("unable to remove non-existent market - single", func() { + msg := &types.MsgRemoveMarkets{ + Authority: s.marketAuthorities[0], + Markets: []string{"BTC/USD"}, + } + resp, err := msgServer.RemoveMarkets(s.ctx, msg) + s.Require().NoError(err) + s.Require().Equal([]string{}, resp.DeletedMarkets) + }) + + s.Run("able to remove disabled market", func() { + copyBTC := btcusdt + copyBTC.Ticker.Enabled = false + + msg := &types.MsgRemoveMarkets{ + Authority: s.marketAuthorities[0], + Markets: []string{copyBTC.Ticker.String()}, + } + + err := s.keeper.CreateMarket(s.ctx, copyBTC) + s.Require().NoError(err) + + resp, err := msgServer.RemoveMarkets(s.ctx, msg) + s.Require().NoError(err) + s.Require().Equal([]string{copyBTC.Ticker.String()}, resp.DeletedMarkets) + + // market should not exist + _, err = s.keeper.GetMarket(s.ctx, copyBTC.Ticker.String()) + s.Require().Error(err) + }) + + s.Run("do not remove enabled market", func() { + copyBTC := btcusdt + copyBTC.Ticker.Enabled = true + + err := s.keeper.CreateMarket(s.ctx, copyBTC) + s.Require().NoError(err) + + msg := &types.MsgRemoveMarkets{ + Authority: s.marketAuthorities[0], + Markets: []string{copyBTC.Ticker.String()}, + } + + resp, err := msgServer.RemoveMarkets(s.ctx, msg) + s.Require().Error(err) + s.Require().Nil(resp) + + // market should exist + _, err = s.keeper.GetMarket(s.ctx, copyBTC.Ticker.String()) + s.Require().NoError(err) + + // update market to be disabled + copyBTC.Ticker.Enabled = false + + err = s.keeper.UpdateMarket(s.ctx, copyBTC) + s.Require().NoError(err) + + // remove + resp, err = msgServer.RemoveMarkets(s.ctx, msg) + s.Require().NoError(err) + s.Require().Equal([]string{copyBTC.Ticker.String()}, resp.DeletedMarkets) + + // market should not exist + _, err = s.keeper.GetMarket(s.ctx, copyBTC.Ticker.String()) + s.Require().Error(err) + }) + + s.Run("resulting state is invalid - 1", func() { + // add a market that depends on the btc market + copyBTC := btcusdt + + err := s.keeper.CreateMarket(s.ctx, copyBTC) + s.Require().NoError(err) + + copyETH := ethusdt + copyETH.ProviderConfigs = []types.ProviderConfig{ + { + Name: "normalized", + OffChainTicker: "normalized", + NormalizeByPair: &slinkytypes.CurrencyPair{ + Base: copyBTC.Ticker.CurrencyPair.Base, + Quote: copyBTC.Ticker.CurrencyPair.Quote, + }, + }, + } + + err = s.keeper.CreateMarket(s.ctx, copyETH) + s.Require().NoError(err) + + msgRemoveBTC := &types.MsgRemoveMarkets{ + Authority: s.marketAuthorities[0], + Markets: []string{copyBTC.Ticker.String()}, + } + + msgRemoveETH := &types.MsgRemoveMarkets{ + Authority: s.marketAuthorities[0], + Markets: []string{copyETH.Ticker.String()}, + } + + resp, err := msgServer.RemoveMarkets(s.ctx, msgRemoveBTC) + s.Require().Error(err) + s.Require().Nil(resp) + + // remove dependent market first for valid state in 2 transaction + resp, err = msgServer.RemoveMarkets(s.ctx, msgRemoveETH) + s.Require().NoError(err) + s.Require().NotNil(resp) + + // market should not exist + _, err = s.keeper.GetMarket(s.ctx, copyETH.Ticker.String()) + s.Require().Error(err) + }) + + s.Run("remove both markets in one tx - no dependency", func() { + // add a market that depends on the btc market + copyBTC := btcusdt + copyETH := ethusdt + + err := s.keeper.CreateMarket(s.ctx, copyBTC) + s.Require().NoError(err) + + err = s.keeper.CreateMarket(s.ctx, copyETH) + s.Require().NoError(err) + + msg := &types.MsgRemoveMarkets{ + Authority: s.marketAuthorities[0], + Markets: []string{copyBTC.Ticker.String(), copyETH.Ticker.String()}, + } + + resp, err := msgServer.RemoveMarkets(s.ctx, msg) + s.Require().NoError(err) + s.Require().NotNil(resp) + + // market should not exist + _, err = s.keeper.GetMarket(s.ctx, copyBTC.Ticker.String()) + s.Require().Error(err) + + // market should not exist + _, err = s.keeper.GetMarket(s.ctx, copyETH.Ticker.String()) + s.Require().Error(err) + }) + + s.Run("remove both markets in one tx - with dependency", func() { + // add a market that depends on the btc market + copyBTC := btcusdt + + err := s.keeper.CreateMarket(s.ctx, copyBTC) + s.Require().NoError(err) + + copyETH := ethusdt + copyETH.ProviderConfigs = []types.ProviderConfig{ + { + Name: "normalized", + OffChainTicker: "normalized", + NormalizeByPair: &slinkytypes.CurrencyPair{ + Base: copyBTC.Ticker.CurrencyPair.Base, + Quote: copyBTC.Ticker.CurrencyPair.Quote, + }, + }, + } + + err = s.keeper.CreateMarket(s.ctx, copyETH) + s.Require().NoError(err) + + msg := &types.MsgRemoveMarkets{ + Authority: s.marketAuthorities[0], + Markets: []string{copyBTC.Ticker.String(), copyETH.Ticker.String()}, + } + + resp, err := msgServer.RemoveMarkets(s.ctx, msg) + s.Require().NoError(err) + s.Require().NotNil(resp) + + // market should not exist + _, err = s.keeper.GetMarket(s.ctx, copyBTC.Ticker.String()) + s.Require().Error(err) + + // market should not exist + _, err = s.keeper.GetMarket(s.ctx, copyETH.Ticker.String()) + s.Require().Error(err) + }) +} diff --git a/x/marketmap/keeper/options.go b/x/marketmap/keeper/options.go new file mode 100644 index 000000000..a2d663d88 --- /dev/null +++ b/x/marketmap/keeper/options.go @@ -0,0 +1,21 @@ +package keeper + +import "github.com/skip-mev/slinky/x/marketmap/types" + +// Option is a type that modifies a keeper during instantiation. These can be passed variadically into NewKeeper +// to specify keeper behavior. +type Option func(*Keeper) + +// WithHooks sets the keeper hooks to the given hooks. +func WithHooks(hooks types.MarketMapHooks) Option { + return func(k *Keeper) { + k.hooks = hooks + } +} + +// WithDeleteValidationHooks sets the keeper deleteMarketValidationHooks to the given hooks. +func WithDeleteValidationHooks(hooks []types.MarketValidationHook) Option { + return func(k *Keeper) { + k.deleteMarketValidationHooks = hooks + } +} diff --git a/x/marketmap/keeper/validation_hooks.go b/x/marketmap/keeper/validation_hooks.go new file mode 100644 index 000000000..b55569d4a --- /dev/null +++ b/x/marketmap/keeper/validation_hooks.go @@ -0,0 +1 @@ +package keeper diff --git a/x/marketmap/types/codec.go b/x/marketmap/types/codec.go index 7e90eef60..ba7875c40 100644 --- a/x/marketmap/types/codec.go +++ b/x/marketmap/types/codec.go @@ -15,6 +15,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgCreateMarkets{}, "slinky/x/marketmap/MsgCreateMarkets") legacy.RegisterAminoMsg(cdc, &MsgUpdateMarkets{}, "slinky/x/marketmap/MsgUpdateMarkets") legacy.RegisterAminoMsg(cdc, &MsgParams{}, "slinky/x/marketmap/MsgParams") + legacy.RegisterAminoMsg(cdc, &MsgUpsertMarkets{}, "slinky/x/marketmap/MsgUpsertMarkets") + legacy.RegisterAminoMsg(cdc, &MsgRemoveMarkets{}, "slinky/x/marketmap/MsgRemoveMarkets") } // RegisterInterfaces registers the x/marketmap messages + message service w/ the InterfaceRegistry (registry). @@ -24,6 +26,9 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgCreateMarkets{}, &MsgUpdateMarkets{}, &MsgParams{}, + &MsgUpsertMarkets{}, + &MsgRemoveMarkets{}, + &MsgRemoveMarketAuthorities{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/marketmap/types/errors.go b/x/marketmap/types/errors.go index effcebcf3..a14f47e84 100644 --- a/x/marketmap/types/errors.go +++ b/x/marketmap/types/errors.go @@ -29,3 +29,17 @@ func NewMarketDoesNotExistsError(ticker TickerString) MarketDoesNotExistsError { func (e MarketDoesNotExistsError) Error() string { return fmt.Sprintf("market does not exist for ticker %s", e.ticker) } + +// MarketIsEnabledError is an error indicating the given Market does not exist in state. +type MarketIsEnabledError struct { + ticker TickerString +} + +func NewMarketIsEnabledError(ticker TickerString) MarketIsEnabledError { + return MarketIsEnabledError{ticker: ticker} +} + +// Error returns the error string for MarketIsEnabledError. +func (e MarketIsEnabledError) Error() string { + return fmt.Sprintf("market is currently enabled %s", e.ticker) +} diff --git a/x/marketmap/types/hooks.go b/x/marketmap/types/hooks.go index 541e3e30f..276d55591 100644 --- a/x/marketmap/types/hooks.go +++ b/x/marketmap/types/hooks.go @@ -14,6 +14,9 @@ type MarketMapHooks interface { // AfterMarketGenesis is called after x/marketmap init genesis. AfterMarketGenesis(ctx sdk.Context, tickers map[string]Market) error + + // AfterMarketRemoved is called after a market is removed. + AfterMarketRemoved(ctx sdk.Context, key string) error } var _ MarketMapHooks = &MultiMarketMapHooks{} @@ -54,6 +57,17 @@ func (mh MultiMarketMapHooks) AfterMarketGenesis(ctx sdk.Context, markets map[st return nil } +// AfterMarketRemoved calls all AfterMarketRemoved hooks registered to the MultiMarketMapHooks. +func (mh MultiMarketMapHooks) AfterMarketRemoved(ctx sdk.Context, key string) error { + for i := range mh { + if err := mh[i].AfterMarketRemoved(ctx, key); err != nil { + return err + } + } + + return nil +} + // MarketMapHooksWrapper is a wrapper for modules to inject MarketMapHooks using depinject. type MarketMapHooksWrapper struct{ MarketMapHooks } @@ -73,3 +87,7 @@ func (n *NoopMarketMapHooks) AfterMarketUpdated(_ sdk.Context, _ Market) error { func (n *NoopMarketMapHooks) AfterMarketGenesis(_ sdk.Context, _ map[string]Market) error { return nil } + +func (n *NoopMarketMapHooks) AfterMarketRemoved(_ sdk.Context, _ string) error { + return nil +} diff --git a/x/marketmap/types/mocks/MarketMapHooks.go b/x/marketmap/types/mocks/MarketMapHooks.go index 395d80e5a..b289a2cac 100644 --- a/x/marketmap/types/mocks/MarketMapHooks.go +++ b/x/marketmap/types/mocks/MarketMapHooks.go @@ -51,6 +51,24 @@ func (_m *MarketMapHooks) AfterMarketGenesis(ctx types.Context, tickers map[stri return r0 } +// AfterMarketRemoved provides a mock function with given fields: ctx, key +func (_m *MarketMapHooks) AfterMarketRemoved(ctx types.Context, key string) error { + ret := _m.Called(ctx, key) + + if len(ret) == 0 { + panic("no return value specified for AfterMarketRemoved") + } + + var r0 error + if rf, ok := ret.Get(0).(func(types.Context, string) error); ok { + r0 = rf(ctx, key) + } else { + r0 = ret.Error(0) + } + + return r0 +} + // AfterMarketUpdated provides a mock function with given fields: ctx, market func (_m *MarketMapHooks) AfterMarketUpdated(ctx types.Context, market marketmaptypes.Market) error { ret := _m.Called(ctx, market) diff --git a/x/marketmap/types/msg.go b/x/marketmap/types/msg.go index 3f64dd570..b0399421a 100644 --- a/x/marketmap/types/msg.go +++ b/x/marketmap/types/msg.go @@ -3,6 +3,8 @@ package types import ( "fmt" + slinkytypes "github.com/skip-mev/slinky/pkg/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -12,6 +14,7 @@ var ( _ sdk.Msg = &MsgParams{} _ sdk.Msg = &MsgRemoveMarketAuthorities{} _ sdk.Msg = &MsgUpsertMarkets{} + _ sdk.Msg = &MsgRemoveMarkets{} ) // ValidateBasic asserts that the authority address in the upsert-markets message is formatted correctly. @@ -124,3 +127,31 @@ func (m *MsgRemoveMarketAuthorities) ValidateBasic() error { return nil } + +// ValidateBasic determines whether the information in the message is formatted correctly, specifically +// whether the signer is a valid acc-address. +func (m *MsgRemoveMarkets) ValidateBasic() error { + // validate signer address + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return err + } + + if len(m.Markets) == 0 { + return fmt.Errorf("markets to remove cannot be nil") + } + + seenMarkets := make(map[string]struct{}, len(m.Markets)) + for _, market := range m.Markets { + if _, seen := seenMarkets[market]; seen { + return fmt.Errorf("duplicate market %s found", market) + } + + if _, err := slinkytypes.CurrencyPairFromString(market); err != nil { + return fmt.Errorf("invalid market pair string: %w", err) + } + + seenMarkets[market] = struct{}{} + } + + return nil +} diff --git a/x/marketmap/types/msg_test.go b/x/marketmap/types/msg_test.go index 3b65eb894..4cf6ad781 100644 --- a/x/marketmap/types/msg_test.go +++ b/x/marketmap/types/msg_test.go @@ -516,3 +516,64 @@ func TestValidateBasicMsgRemoveMarketAuthorities(t *testing.T) { }) } } + +func TestValidateBasicMsgRemoveMarkets(t *testing.T) { + rng := sample.Rand() + + tcs := []struct { + name string + msg types.MsgRemoveMarkets + expectPass bool + }{ + { + "if the Authority is not an acc-address - fail", + types.MsgRemoveMarkets{ + Authority: "invalid", + }, + false, + }, + { + name: "invalid message (no markets) - fail", + msg: types.MsgRemoveMarkets{ + Markets: nil, + Authority: sample.Address(rng), + }, + expectPass: false, + }, + { + name: "valid message - single market", + msg: types.MsgRemoveMarkets{ + Markets: []string{"USDT/USD"}, + Authority: sample.Address(rng), + }, + expectPass: true, + }, + { + name: "valid message - multiple markets", + msg: types.MsgRemoveMarkets{ + Markets: []string{"USDT/USD", "ETH/USD"}, + Authority: sample.Address(rng), + }, + expectPass: true, + }, + { + name: "invalid message (duplicate markets", + msg: types.MsgRemoveMarkets{ + Markets: []string{"USDT/USD", "USDT/USD"}, + Authority: sample.Address(rng), + }, + expectPass: false, + }, + } + + for _, tc := range tcs { + t.Run(tc.name, func(t *testing.T) { + err := tc.msg.ValidateBasic() + if !tc.expectPass { + require.NotNil(t, err) + } else { + require.Nil(t, err) + } + }) + } +} diff --git a/x/marketmap/types/tx.pb.go b/x/marketmap/types/tx.pb.go index d2095f068..581f28d3c 100644 --- a/x/marketmap/types/tx.pb.go +++ b/x/marketmap/types/tx.pb.go @@ -516,6 +516,110 @@ func (m *MsgRemoveMarketAuthoritiesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRemoveMarketAuthoritiesResponse proto.InternalMessageInfo +// MsgRemoveMarkets defines the Msg/RemoveMarkets request type. It contains the +// new markets to be removed from the market map. +type MsgRemoveMarkets struct { + // Authority is the signer of this transaction. This authority must be + // authorized by the module to execute the message. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Markets is the list of markets to remove. + Markets []string `protobuf:"bytes,2,rep,name=markets,proto3" json:"markets,omitempty"` +} + +func (m *MsgRemoveMarkets) Reset() { *m = MsgRemoveMarkets{} } +func (m *MsgRemoveMarkets) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveMarkets) ProtoMessage() {} +func (*MsgRemoveMarkets) Descriptor() ([]byte, []int) { + return fileDescriptor_e9adadfc18297083, []int{10} +} +func (m *MsgRemoveMarkets) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveMarkets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveMarkets.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 *MsgRemoveMarkets) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveMarkets.Merge(m, src) +} +func (m *MsgRemoveMarkets) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveMarkets) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveMarkets.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveMarkets proto.InternalMessageInfo + +func (m *MsgRemoveMarkets) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgRemoveMarkets) GetMarkets() []string { + if m != nil { + return m.Markets + } + return nil +} + +// MsgRemoveMarketsResponse defines the +// Msg/MsgRemoveMarketsResponse response type. +type MsgRemoveMarketsResponse struct { + // DeletedMarkets is the list of markets that were removed. + DeletedMarkets []string `protobuf:"bytes,1,rep,name=deleted_markets,json=deletedMarkets,proto3" json:"deleted_markets,omitempty"` +} + +func (m *MsgRemoveMarketsResponse) Reset() { *m = MsgRemoveMarketsResponse{} } +func (m *MsgRemoveMarketsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveMarketsResponse) ProtoMessage() {} +func (*MsgRemoveMarketsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e9adadfc18297083, []int{11} +} +func (m *MsgRemoveMarketsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveMarketsResponse.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 *MsgRemoveMarketsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveMarketsResponse.Merge(m, src) +} +func (m *MsgRemoveMarketsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveMarketsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveMarketsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveMarketsResponse proto.InternalMessageInfo + +func (m *MsgRemoveMarketsResponse) GetDeletedMarkets() []string { + if m != nil { + return m.DeletedMarkets + } + return nil +} + func init() { proto.RegisterType((*MsgUpsertMarkets)(nil), "slinky.marketmap.v1.MsgUpsertMarkets") proto.RegisterType((*MsgUpsertMarketsResponse)(nil), "slinky.marketmap.v1.MsgUpsertMarketsResponse") @@ -528,55 +632,61 @@ func init() { proto.RegisterType((*MsgParamsResponse)(nil), "slinky.marketmap.v1.MsgParamsResponse") proto.RegisterType((*MsgRemoveMarketAuthorities)(nil), "slinky.marketmap.v1.MsgRemoveMarketAuthorities") proto.RegisterType((*MsgRemoveMarketAuthoritiesResponse)(nil), "slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse") + proto.RegisterType((*MsgRemoveMarkets)(nil), "slinky.marketmap.v1.MsgRemoveMarkets") + proto.RegisterType((*MsgRemoveMarketsResponse)(nil), "slinky.marketmap.v1.MsgRemoveMarketsResponse") } func init() { proto.RegisterFile("slinky/marketmap/v1/tx.proto", fileDescriptor_e9adadfc18297083) } var fileDescriptor_e9adadfc18297083 = []byte{ - // 684 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x6f, 0xd3, 0x4c, - 0x10, 0xce, 0xa6, 0x1f, 0xef, 0x9b, 0x85, 0x94, 0x76, 0x5b, 0xa9, 0xc6, 0x20, 0x37, 0x32, 0x14, - 0x95, 0x8a, 0xda, 0x6a, 0x91, 0xf8, 0x30, 0x97, 0x36, 0x08, 0xc4, 0x25, 0x12, 0x32, 0x2a, 0x07, - 0x2e, 0x91, 0x1b, 0xaf, 0x5c, 0x2b, 0x5d, 0xdb, 0xf2, 0x6e, 0xa2, 0xe6, 0x86, 0xe8, 0x8d, 0x03, - 0xe2, 0xc8, 0x0d, 0xf8, 0x07, 0x3d, 0xf0, 0x0f, 0xb8, 0xf4, 0x46, 0xc4, 0x89, 0x13, 0x42, 0xc9, - 0x21, 0xfc, 0x0c, 0x14, 0xef, 0xc6, 0x8d, 0x5b, 0x3b, 0x24, 0xc0, 0xc5, 0xda, 0x9d, 0x79, 0x66, - 0xf6, 0x79, 0x66, 0x76, 0xd6, 0xf0, 0x2a, 0x3d, 0x70, 0xbd, 0x7a, 0x4b, 0x27, 0x56, 0x58, 0xc7, - 0x8c, 0x58, 0x81, 0xde, 0xdc, 0xd4, 0xd9, 0xa1, 0x16, 0x84, 0x3e, 0xf3, 0xd1, 0x22, 0xf7, 0x6a, - 0xb1, 0x57, 0x6b, 0x6e, 0xca, 0xcb, 0x35, 0x9f, 0x12, 0x9f, 0xea, 0x84, 0x3a, 0x7d, 0x30, 0xa1, - 0x0e, 0x47, 0xcb, 0x4b, 0x8e, 0xef, 0xf8, 0xd1, 0x52, 0xef, 0xaf, 0x84, 0xf5, 0x32, 0x87, 0x57, - 0xb9, 0x83, 0x6f, 0x84, 0x6b, 0xc1, 0x22, 0xae, 0xe7, 0xeb, 0xd1, 0x57, 0x98, 0x4a, 0x69, 0x7c, - 0xf8, 0x66, 0x14, 0x22, 0xb0, 0x42, 0x8b, 0x88, 0xb4, 0xea, 0x67, 0x00, 0xe7, 0x2b, 0xd4, 0xd9, - 0x0d, 0x28, 0x0e, 0x59, 0x25, 0x82, 0x51, 0x74, 0x07, 0x16, 0xac, 0x06, 0xdb, 0xf7, 0x43, 0x97, - 0xb5, 0x24, 0x50, 0x02, 0x6b, 0x85, 0xb2, 0xf4, 0xf5, 0xd3, 0xc6, 0x92, 0x20, 0xb4, 0x63, 0xdb, - 0x21, 0xa6, 0xf4, 0x19, 0x0b, 0x5d, 0xcf, 0x31, 0x4f, 0xa1, 0xe8, 0x01, 0xfc, 0x8f, 0x9f, 0x44, - 0xa5, 0x7c, 0x69, 0x6a, 0xed, 0xc2, 0xd6, 0x15, 0x2d, 0xa5, 0x28, 0x1a, 0x3f, 0xa6, 0x3c, 0x7d, - 0xf2, 0x7d, 0x25, 0x67, 0x0e, 0x22, 0x0c, 0xe3, 0xe7, 0x87, 0x95, 0xdc, 0xab, 0xde, 0xf1, 0xfa, - 0x69, 0xc2, 0xd7, 0xbd, 0xe3, 0xf5, 0x6b, 0x42, 0xc2, 0xe1, 0x90, 0x88, 0xb3, 0x84, 0xd5, 0x2f, - 0x00, 0x4a, 0x67, 0x8d, 0x26, 0xa6, 0x81, 0xef, 0x51, 0x8c, 0xea, 0x70, 0x8e, 0x87, 0x56, 0x1b, - 0x81, 0x6d, 0x31, 0x4c, 0x25, 0x10, 0x91, 0xdb, 0x4e, 0x27, 0x97, 0x91, 0x46, 0xb0, 0xde, 0xe5, - 0x29, 0x1e, 0x79, 0x2c, 0x6c, 0x95, 0xf3, 0x12, 0x30, 0x8b, 0x64, 0xd8, 0x2e, 0x6f, 0x43, 0x74, - 0x1e, 0x88, 0xe6, 0xe1, 0x54, 0x1d, 0x8b, 0x52, 0x9a, 0xfd, 0x25, 0x5a, 0x82, 0x33, 0x4d, 0xeb, - 0xa0, 0x81, 0xa5, 0x7c, 0x09, 0xac, 0xfd, 0x6f, 0xf2, 0x8d, 0x91, 0xbf, 0x07, 0x8c, 0xe9, 0x77, - 0x1f, 0x57, 0x80, 0xda, 0xe6, 0x7d, 0x79, 0x18, 0x62, 0x8b, 0xe1, 0xbf, 0xed, 0xcb, 0x13, 0x38, - 0x57, 0x8b, 0x12, 0x55, 0x27, 0x6e, 0x4f, 0xb1, 0x36, 0xcc, 0x60, 0xc2, 0x26, 0x25, 0xd8, 0xab, - 0x72, 0xd4, 0xa3, 0x84, 0x6d, 0x50, 0xdc, 0x81, 0x5c, 0x5e, 0xb4, 0x7f, 0x20, 0x97, 0x77, 0xfa, - 0x0f, 0xe4, 0x36, 0x86, 0x19, 0x4c, 0x7c, 0x27, 0xed, 0x73, 0x72, 0x13, 0xb6, 0x58, 0xee, 0x1b, - 0x00, 0x0b, 0x15, 0xea, 0x3c, 0x8d, 0x26, 0x11, 0xdd, 0x87, 0xb3, 0x7c, 0x26, 0x23, 0x91, 0x59, - 0x3c, 0x39, 0x58, 0xf0, 0x14, 0x01, 0xc9, 0x12, 0xe5, 0xc7, 0x2e, 0x91, 0x31, 0x97, 0x14, 0xa5, - 0x2e, 0xc2, 0x85, 0x98, 0x4f, 0xcc, 0xf2, 0x08, 0x40, 0xb9, 0x42, 0x1d, 0x13, 0x13, 0xbf, 0x29, - 0x24, 0xec, 0x88, 0x08, 0x17, 0x53, 0x74, 0x13, 0xce, 0x87, 0x91, 0xab, 0x6a, 0xf1, 0x63, 0xc4, - 0x64, 0x15, 0xcc, 0x4b, 0xdc, 0xbe, 0x33, 0x30, 0x23, 0x0d, 0xce, 0x58, 0x36, 0x71, 0xbd, 0xdf, - 0x52, 0xe4, 0x30, 0x03, 0xf6, 0xe9, 0xf1, 0xb5, 0x7a, 0x1d, 0xaa, 0xd9, 0x24, 0x06, 0x5c, 0xb7, - 0xde, 0x4f, 0xc3, 0xa9, 0x0a, 0x75, 0x10, 0x86, 0xc5, 0xe4, 0xcc, 0xac, 0x66, 0x4d, 0x79, 0x02, - 0x26, 0x6f, 0x8c, 0x05, 0x8b, 0xdf, 0x14, 0x0c, 0x8b, 0xc9, 0xbb, 0xba, 0x9a, 0xfd, 0x98, 0xd8, - 0xe3, 0x1c, 0x93, 0x7a, 0x4f, 0xd0, 0x73, 0x78, 0x91, 0x3b, 0xc4, 0x4d, 0x51, 0xb2, 0xc2, 0xb9, - 0x5f, 0xbe, 0x31, 0xda, 0x1f, 0xe7, 0x3d, 0x02, 0x70, 0x39, 0xab, 0xad, 0x7a, 0x56, 0x8e, 0x8c, - 0x00, 0xf9, 0xee, 0x84, 0x01, 0xc9, 0x22, 0x0e, 0xff, 0x77, 0x56, 0xc7, 0x7a, 0x91, 0x47, 0x15, - 0x31, 0xe5, 0xe1, 0x96, 0x67, 0x5e, 0xf6, 0x8e, 0xd7, 0x41, 0xf9, 0xf1, 0x49, 0x47, 0x01, 0xed, - 0x8e, 0x02, 0x7e, 0x74, 0x14, 0xf0, 0xb6, 0xab, 0xe4, 0xda, 0x5d, 0x25, 0xf7, 0xad, 0xab, 0xe4, - 0x5e, 0xdc, 0x72, 0x5c, 0xb6, 0xdf, 0xd8, 0xd3, 0x6a, 0x3e, 0xd1, 0x69, 0xdd, 0x0d, 0x36, 0x08, - 0x6e, 0xea, 0x29, 0x23, 0xce, 0x5a, 0x01, 0xa6, 0x7b, 0xb3, 0xd1, 0x8f, 0xf3, 0xf6, 0xaf, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xbc, 0xa2, 0xfb, 0xf6, 0x0e, 0x08, 0x00, 0x00, + // 738 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0xd3, 0x4c, + 0x10, 0xce, 0xa6, 0x4d, 0xdf, 0x37, 0x03, 0x49, 0x5b, 0xb7, 0x52, 0x8d, 0x41, 0x6e, 0x64, 0x08, + 0x94, 0x8a, 0xda, 0x6a, 0x91, 0xf8, 0x08, 0x97, 0x36, 0x15, 0x88, 0x4b, 0x24, 0x64, 0x54, 0x0e, + 0x5c, 0x22, 0x37, 0x5e, 0xb9, 0x56, 0xea, 0xd8, 0xf2, 0x6e, 0xa2, 0xe6, 0x86, 0xa8, 0xc4, 0x81, + 0x03, 0xe2, 0xc8, 0x11, 0xfe, 0x41, 0x0f, 0xfc, 0x03, 0x2e, 0xbd, 0x51, 0x71, 0xe2, 0x84, 0x50, + 0x7b, 0x28, 0x3f, 0x03, 0xc5, 0xbb, 0x71, 0xed, 0xd4, 0x0e, 0x49, 0xe1, 0x12, 0xad, 0x67, 0x9e, + 0x99, 0x79, 0xe6, 0x63, 0x67, 0x03, 0xd7, 0xc8, 0xae, 0xdd, 0x6a, 0x76, 0x35, 0xc7, 0xf0, 0x9b, + 0x98, 0x3a, 0x86, 0xa7, 0x75, 0x56, 0x35, 0xba, 0xa7, 0x7a, 0xbe, 0x4b, 0x5d, 0x61, 0x8e, 0x69, + 0xd5, 0x50, 0xab, 0x76, 0x56, 0xa5, 0x85, 0x86, 0x4b, 0x1c, 0x97, 0x68, 0x0e, 0xb1, 0x7a, 0x60, + 0x87, 0x58, 0x0c, 0x2d, 0xcd, 0x5b, 0xae, 0xe5, 0x06, 0x47, 0xad, 0x77, 0xe2, 0xd2, 0x2b, 0x0c, + 0x5e, 0x67, 0x0a, 0xf6, 0xc1, 0x55, 0xb3, 0x86, 0x63, 0xb7, 0x5c, 0x2d, 0xf8, 0xe5, 0xa2, 0x52, + 0x12, 0x1f, 0xf6, 0x31, 0x0c, 0xe1, 0x19, 0xbe, 0xe1, 0x70, 0xb7, 0xca, 0x17, 0x04, 0x33, 0x35, + 0x62, 0x6d, 0x79, 0x04, 0xfb, 0xb4, 0x16, 0xc0, 0x88, 0x70, 0x0f, 0xf2, 0x46, 0x9b, 0xee, 0xb8, + 0xbe, 0x4d, 0xbb, 0x22, 0x2a, 0xa1, 0xa5, 0x7c, 0x55, 0xfc, 0xf6, 0x79, 0x65, 0x9e, 0x13, 0xda, + 0x30, 0x4d, 0x1f, 0x13, 0xf2, 0x9c, 0xfa, 0x76, 0xcb, 0xd2, 0xcf, 0xa0, 0xc2, 0x23, 0xf8, 0x8f, + 0x45, 0x22, 0x62, 0xb6, 0x34, 0xb1, 0x74, 0x69, 0xed, 0xaa, 0x9a, 0x50, 0x14, 0x95, 0x85, 0xa9, + 0x4e, 0x1e, 0xfe, 0x58, 0xcc, 0xe8, 0x7d, 0x8b, 0x4a, 0xe5, 0xd7, 0xc7, 0xc5, 0xcc, 0xeb, 0xd3, + 0x83, 0xe5, 0x33, 0x87, 0x6f, 0x4f, 0x0f, 0x96, 0xaf, 0xf3, 0x14, 0xf6, 0x22, 0x49, 0x0c, 0x12, + 0x56, 0xbe, 0x22, 0x10, 0x07, 0x85, 0x3a, 0x26, 0x9e, 0xdb, 0x22, 0x58, 0x68, 0x42, 0x91, 0x99, + 0xd6, 0xdb, 0x9e, 0x69, 0x50, 0x4c, 0x44, 0x14, 0x90, 0x5b, 0x4f, 0x26, 0x97, 0xe2, 0x86, 0xb3, + 0xde, 0x62, 0x2e, 0x1e, 0xb7, 0xa8, 0xdf, 0xad, 0x66, 0x45, 0xa4, 0x17, 0x9c, 0xa8, 0x5c, 0x5a, + 0x07, 0xe1, 0x3c, 0x50, 0x98, 0x81, 0x89, 0x26, 0xe6, 0xa5, 0xd4, 0x7b, 0x47, 0x61, 0x1e, 0x72, + 0x1d, 0x63, 0xb7, 0x8d, 0xc5, 0x6c, 0x09, 0x2d, 0xfd, 0xaf, 0xb3, 0x8f, 0x4a, 0xf6, 0x01, 0xaa, + 0x4c, 0x7e, 0xf8, 0xb4, 0x88, 0x94, 0x23, 0xd6, 0x97, 0x4d, 0x1f, 0x1b, 0x14, 0xff, 0x6d, 0x5f, + 0x9e, 0x42, 0xb1, 0x11, 0x38, 0xaa, 0x8f, 0xdd, 0x9e, 0x42, 0x23, 0xca, 0x60, 0xcc, 0x26, 0xc5, + 0xd8, 0x2b, 0x52, 0xd0, 0xa3, 0x98, 0xac, 0x5f, 0xdc, 0x7e, 0xba, 0xac, 0x68, 0xff, 0x20, 0x5d, + 0xd6, 0xe9, 0x0b, 0xa4, 0xdb, 0x8e, 0x32, 0x18, 0x7b, 0x26, 0xcd, 0x73, 0xe9, 0xc6, 0x64, 0x61, + 0xba, 0xef, 0x10, 0xe4, 0x6b, 0xc4, 0x7a, 0x16, 0xdc, 0x44, 0xe1, 0x21, 0x4c, 0xb1, 0x3b, 0x19, + 0x24, 0x99, 0xc6, 0x93, 0x81, 0x39, 0x4f, 0x6e, 0x10, 0x2f, 0x51, 0x76, 0xe4, 0x12, 0x55, 0x8a, + 0xf1, 0xa4, 0x94, 0x39, 0x98, 0x0d, 0xf9, 0x84, 0x2c, 0xf7, 0x11, 0x48, 0x35, 0x62, 0xe9, 0xd8, + 0x71, 0x3b, 0x3c, 0x85, 0x0d, 0x6e, 0x61, 0x63, 0x22, 0xdc, 0x86, 0x19, 0x3f, 0x50, 0xd5, 0x0d, + 0x16, 0x86, 0xdf, 0xac, 0xbc, 0x3e, 0xcd, 0xe4, 0x1b, 0x7d, 0xb1, 0xa0, 0x42, 0xce, 0x30, 0x1d, + 0xbb, 0xf5, 0x47, 0x8a, 0x0c, 0x56, 0x81, 0x1e, 0x3d, 0x76, 0x56, 0x6e, 0x80, 0x92, 0x4e, 0x22, + 0xe4, 0x4a, 0x83, 0xf9, 0x89, 0xa2, 0x2e, 0x3e, 0x3f, 0x62, 0x7c, 0x8d, 0xe5, 0xcf, 0x76, 0xd4, + 0x60, 0xd9, 0x36, 0x83, 0x1e, 0xc7, 0xa2, 0x86, 0x6b, 0xe7, 0x16, 0x4c, 0x9b, 0x78, 0x17, 0x53, + 0x6c, 0x86, 0x63, 0xc8, 0xaa, 0x53, 0xe4, 0x62, 0x6e, 0xb0, 0xf6, 0x26, 0x07, 0x13, 0x35, 0x62, + 0x09, 0x18, 0x0a, 0xf1, 0xeb, 0x5e, 0x4e, 0x5b, 0x50, 0x31, 0x98, 0xb4, 0x32, 0x12, 0x2c, 0xe4, + 0x85, 0xa1, 0x10, 0xbf, 0x66, 0xe5, 0xf4, 0x3d, 0x68, 0x8e, 0x12, 0x26, 0x71, 0xc4, 0x85, 0x17, + 0x70, 0x99, 0x29, 0xf8, 0x90, 0xcb, 0x69, 0xe6, 0x4c, 0x2f, 0xdd, 0x1c, 0xae, 0x0f, 0xfd, 0xee, + 0x23, 0x58, 0x48, 0x9b, 0x48, 0x2d, 0xcd, 0x47, 0x8a, 0x81, 0x74, 0x7f, 0x4c, 0x83, 0x78, 0x11, + 0xa3, 0x4f, 0x66, 0x79, 0xa4, 0xc7, 0x64, 0x58, 0x11, 0x93, 0x9e, 0x2e, 0x0c, 0x85, 0xf8, 0x48, + 0x97, 0x47, 0x21, 0x3c, 0x24, 0x4c, 0xe2, 0xa8, 0x4a, 0xb9, 0x57, 0xa7, 0x07, 0xcb, 0xa8, 0xfa, + 0xe4, 0xf0, 0x58, 0x46, 0x47, 0xc7, 0x32, 0xfa, 0x79, 0x2c, 0xa3, 0xf7, 0x27, 0x72, 0xe6, 0xe8, + 0x44, 0xce, 0x7c, 0x3f, 0x91, 0x33, 0x2f, 0xef, 0x58, 0x36, 0xdd, 0x69, 0x6f, 0xab, 0x0d, 0xd7, + 0xd1, 0x48, 0xd3, 0xf6, 0x56, 0x1c, 0xdc, 0xd1, 0x12, 0x96, 0x20, 0xed, 0x7a, 0x98, 0x6c, 0x4f, + 0x05, 0x7f, 0x2d, 0xee, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x0d, 0x35, 0x3d, 0x30, 0x09, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -605,6 +715,10 @@ type MsgClient interface { // Specifically if a market does not exist it will be created, otherwise it // will be updated. The response will be a map between ticker -> updated. UpsertMarkets(ctx context.Context, in *MsgUpsertMarkets, opts ...grpc.CallOption) (*MsgUpsertMarketsResponse, error) + // RemoveMarkets removes the given markets from the marketmap if: + // - they exist in the map + // - they are disabled + RemoveMarkets(ctx context.Context, in *MsgRemoveMarkets, opts ...grpc.CallOption) (*MsgRemoveMarketsResponse, error) } type msgClient struct { @@ -660,6 +774,15 @@ func (c *msgClient) UpsertMarkets(ctx context.Context, in *MsgUpsertMarkets, opt return out, nil } +func (c *msgClient) RemoveMarkets(ctx context.Context, in *MsgRemoveMarkets, opts ...grpc.CallOption) (*MsgRemoveMarketsResponse, error) { + out := new(MsgRemoveMarketsResponse) + err := c.cc.Invoke(ctx, "/slinky.marketmap.v1.Msg/RemoveMarkets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // CreateMarkets creates markets from the given message. @@ -676,6 +799,10 @@ type MsgServer interface { // Specifically if a market does not exist it will be created, otherwise it // will be updated. The response will be a map between ticker -> updated. UpsertMarkets(context.Context, *MsgUpsertMarkets) (*MsgUpsertMarketsResponse, error) + // RemoveMarkets removes the given markets from the marketmap if: + // - they exist in the map + // - they are disabled + RemoveMarkets(context.Context, *MsgRemoveMarkets) (*MsgRemoveMarketsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -697,6 +824,9 @@ func (*UnimplementedMsgServer) RemoveMarketAuthorities(ctx context.Context, req func (*UnimplementedMsgServer) UpsertMarkets(ctx context.Context, req *MsgUpsertMarkets) (*MsgUpsertMarketsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpsertMarkets not implemented") } +func (*UnimplementedMsgServer) RemoveMarkets(ctx context.Context, req *MsgRemoveMarkets) (*MsgRemoveMarketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveMarkets not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -792,6 +922,24 @@ func _Msg_UpsertMarkets_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Msg_RemoveMarkets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRemoveMarkets) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RemoveMarkets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slinky.marketmap.v1.Msg/RemoveMarkets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RemoveMarkets(ctx, req.(*MsgRemoveMarkets)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "slinky.marketmap.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -816,6 +964,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpsertMarkets", Handler: _Msg_UpsertMarkets_Handler, }, + { + MethodName: "RemoveMarkets", + Handler: _Msg_RemoveMarkets_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "slinky/marketmap/v1/tx.proto", @@ -1174,6 +1326,77 @@ func (m *MsgRemoveMarketAuthoritiesResponse) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } +func (m *MsgRemoveMarkets) 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 *MsgRemoveMarkets) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveMarkets) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Markets) > 0 { + for iNdEx := len(m.Markets) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Markets[iNdEx]) + copy(dAtA[i:], m.Markets[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Markets[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRemoveMarketsResponse) 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 *MsgRemoveMarketsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DeletedMarkets) > 0 { + for iNdEx := len(m.DeletedMarkets) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DeletedMarkets[iNdEx]) + copy(dAtA[i:], m.DeletedMarkets[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.DeletedMarkets[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1329,6 +1552,40 @@ func (m *MsgRemoveMarketAuthoritiesResponse) Size() (n int) { return n } +func (m *MsgRemoveMarkets) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Markets) > 0 { + for _, s := range m.Markets { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgRemoveMarketsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DeletedMarkets) > 0 { + for _, s := range m.DeletedMarkets { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2277,6 +2534,202 @@ func (m *MsgRemoveMarketAuthoritiesResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgRemoveMarkets) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRemoveMarkets: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemoveMarkets: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Markets", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Markets = append(m.Markets, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRemoveMarketsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRemoveMarketsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemoveMarketsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletedMarkets", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeletedMarkets = append(m.DeletedMarkets, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/marketmap/types/validation_hooks.go b/x/marketmap/types/validation_hooks.go new file mode 100644 index 000000000..d812aee85 --- /dev/null +++ b/x/marketmap/types/validation_hooks.go @@ -0,0 +1,47 @@ +package types + +import ( + "context" + "fmt" +) + +// MarketValidationHook is a hook that is called for stateful validation of a market before +// some keeper operation is performed on it. +type MarketValidationHook func(ctx context.Context, market Market) error + +// MarketValidationHooks is a type alias for an array of MarketValidationHook. +type MarketValidationHooks []MarketValidationHook + +// ValidateMarket calls all validation hooks for the given market. +func (h MarketValidationHooks) ValidateMarket(ctx context.Context, market Market) error { + for _, hook := range h { + if err := hook(ctx, market); err != nil { + return fmt.Errorf("failed validation hooks for market %s: %w", market.Ticker.String(), err) + } + } + + return nil +} + +// DefaultDeleteMarketValidationHooks returns the default DeleteMarketValidationHook as an array. +func DefaultDeleteMarketValidationHooks() MarketValidationHooks { + hooks := MarketValidationHooks{ + DefaultDeleteMarketValidationHook(), + } + + return hooks +} + +// DefaultDeleteMarketValidationHook returns the default DeleteMarketValidationHook for x/marketmap. +// This hook checks: +// - if the given market is enabled - error +// - if the given market is disabled - return nil. +func DefaultDeleteMarketValidationHook() MarketValidationHook { + return func(_ context.Context, market Market) error { + if market.Ticker.Enabled { + return fmt.Errorf("market is enabled - cannot be deleted") + } + + return nil + } +} diff --git a/x/marketmap/types/validation_hooks_test.go b/x/marketmap/types/validation_hooks_test.go new file mode 100644 index 000000000..32794c541 --- /dev/null +++ b/x/marketmap/types/validation_hooks_test.go @@ -0,0 +1,64 @@ +package types_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + slinkytypes "github.com/skip-mev/slinky/pkg/types" + "github.com/skip-mev/slinky/x/marketmap/types" +) + +func TestDefaultDeleteMarketValidationHooks_ValidateMarket(t *testing.T) { + tests := []struct { + name string + market types.Market + wantErr bool + }{ + { + name: "valid - disabled market", + market: types.Market{ + Ticker: types.Ticker{ + CurrencyPair: slinkytypes.CurrencyPair{ + Base: "BTC", + Quote: "USD", + }, + Decimals: 3, + MinProviderCount: 3, + Enabled: false, + Metadata_JSON: "", + }, + }, + wantErr: false, + }, + { + name: "invalid - enabled market", + market: types.Market{ + Ticker: types.Ticker{ + CurrencyPair: slinkytypes.CurrencyPair{ + Base: "BTC", + Quote: "USD", + }, + Decimals: 3, + MinProviderCount: 3, + Enabled: true, + Metadata_JSON: "", + }, + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + hooks := types.DefaultDeleteMarketValidationHooks() + + err := hooks.ValidateMarket(context.Background(), tt.market) + if tt.wantErr { + require.Error(t, err) + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/oracle/keeper/hooks.go b/x/oracle/keeper/hooks.go index 70423405d..69464e797 100644 --- a/x/oracle/keeper/hooks.go +++ b/x/oracle/keeper/hooks.go @@ -24,13 +24,14 @@ func (k *Keeper) Hooks() Hooks { // the marketmap. After the market is created, a currency pair and its state are initialized in the // oracle module. func (h Hooks) AfterMarketCreated(ctx sdk.Context, market marketmaptypes.Market) error { + ctx.Logger().Info(fmt.Sprintf("creating x/oracle state for market %s", market.Ticker.String())) return h.k.CreateCurrencyPair(ctx, market.Ticker.CurrencyPair) } // AfterMarketUpdated is the marketmap hook for x/oracle that is run after a market is updated in // the marketmap. -func (h Hooks) AfterMarketUpdated(_ sdk.Context, _ marketmaptypes.Market) error { - // TODO +func (h Hooks) AfterMarketUpdated(ctx sdk.Context, market marketmaptypes.Market) error { + ctx.Logger().Info(fmt.Sprintf("market %s updated", market.Ticker.String())) return nil } @@ -45,3 +46,11 @@ func (h Hooks) AfterMarketGenesis(ctx sdk.Context, markets map[string]marketmapt return nil } + +// AfterMarketRemoved is the marketmap hook for x/oracle that is run after a market is removed in +// the marketmap. +func (h Hooks) AfterMarketRemoved(ctx sdk.Context, key string) error { + ctx.Logger().Info(fmt.Sprintf("market %s removed. retaining x/oracle state if it exists", key)) + + return nil +}