-
Notifications
You must be signed in to change notification settings - Fork 97
/
off_chain_updates.pb.go
1357 lines (1285 loc) · 37.4 KB
/
off_chain_updates.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: dydxprotocol/indexer/off_chain_updates/off_chain_updates.proto
package off_chain_updates
import (
fmt "fmt"
proto "github.com/cosmos/gogoproto/proto"
v1 "github.com/dydxprotocol/v4-chain/protocol/indexer/protocol/v1"
shared "github.com/dydxprotocol/v4-chain/protocol/indexer/shared"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// OrderPlacementStatus is an enum for the resulting status after an order is
// placed.
type OrderPlaceV1_OrderPlacementStatus int32
const (
// Default value, this is invalid and unused.
OrderPlaceV1_ORDER_PLACEMENT_STATUS_UNSPECIFIED OrderPlaceV1_OrderPlacementStatus = 0
// A best effort opened order is one that has only been confirmed to be
// placed on the V4 node sending the off-chain update message.
// The cases where this happens includes:
// - The V4 node places an order in it's in-memory orderbook during the
// CheckTx flow.
// A best effort placed order may not have been placed on other V4
// nodes including other V4 validator nodes and may still be excluded in
// future order matches.
OrderPlaceV1_ORDER_PLACEMENT_STATUS_BEST_EFFORT_OPENED OrderPlaceV1_OrderPlacementStatus = 1
// An opened order is one that is confirmed to be placed on all V4 nodes
// (discounting dishonest V4 nodes) and will be included in any future
// order matches.
// This status is used internally by the indexer and will not be sent
// out by protocol.
OrderPlaceV1_ORDER_PLACEMENT_STATUS_OPENED OrderPlaceV1_OrderPlacementStatus = 2
)
var OrderPlaceV1_OrderPlacementStatus_name = map[int32]string{
0: "ORDER_PLACEMENT_STATUS_UNSPECIFIED",
1: "ORDER_PLACEMENT_STATUS_BEST_EFFORT_OPENED",
2: "ORDER_PLACEMENT_STATUS_OPENED",
}
var OrderPlaceV1_OrderPlacementStatus_value = map[string]int32{
"ORDER_PLACEMENT_STATUS_UNSPECIFIED": 0,
"ORDER_PLACEMENT_STATUS_BEST_EFFORT_OPENED": 1,
"ORDER_PLACEMENT_STATUS_OPENED": 2,
}
func (x OrderPlaceV1_OrderPlacementStatus) String() string {
return proto.EnumName(OrderPlaceV1_OrderPlacementStatus_name, int32(x))
}
func (OrderPlaceV1_OrderPlacementStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_a3058c1b66f59e98, []int{0, 0}
}
// OrderRemovalStatus is an enum for the resulting status after an order is
// removed.
type OrderRemoveV1_OrderRemovalStatus int32
const (
// Default value, this is invalid and unused.
OrderRemoveV1_ORDER_REMOVAL_STATUS_UNSPECIFIED OrderRemoveV1_OrderRemovalStatus = 0
// A best effort canceled order is one that has only been confirmed to be
// removed on the V4 node sending the off-chain update message.
// The cases where this happens includes:
// - the order was removed due to the V4 node receiving a CancelOrder
// transaction for the order.
// - the order was removed due to being undercollateralized during
// optimistic matching.
// A best effort canceled order may not have been removed on other V4
// nodes including other V4 validator nodes and may still be included in
// future order matches.
OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED OrderRemoveV1_OrderRemovalStatus = 1
// A canceled order is one that is confirmed to be removed on all V4 nodes
// (discounting dishonest V4 nodes) and will not be included in any future
// order matches.
// The cases where this happens includes:
// - the order is expired.
OrderRemoveV1_ORDER_REMOVAL_STATUS_CANCELED OrderRemoveV1_OrderRemovalStatus = 2
// An order was fully-filled. Only sent by the Indexer for stateful orders.
OrderRemoveV1_ORDER_REMOVAL_STATUS_FILLED OrderRemoveV1_OrderRemovalStatus = 3
)
var OrderRemoveV1_OrderRemovalStatus_name = map[int32]string{
0: "ORDER_REMOVAL_STATUS_UNSPECIFIED",
1: "ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED",
2: "ORDER_REMOVAL_STATUS_CANCELED",
3: "ORDER_REMOVAL_STATUS_FILLED",
}
var OrderRemoveV1_OrderRemovalStatus_value = map[string]int32{
"ORDER_REMOVAL_STATUS_UNSPECIFIED": 0,
"ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED": 1,
"ORDER_REMOVAL_STATUS_CANCELED": 2,
"ORDER_REMOVAL_STATUS_FILLED": 3,
}
func (x OrderRemoveV1_OrderRemovalStatus) String() string {
return proto.EnumName(OrderRemoveV1_OrderRemovalStatus_name, int32(x))
}
func (OrderRemoveV1_OrderRemovalStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_a3058c1b66f59e98, []int{1, 0}
}
// OrderPlace messages contain the order placed/replaced.
type OrderPlaceV1 struct {
Order *v1.IndexerOrder `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"`
PlacementStatus OrderPlaceV1_OrderPlacementStatus `protobuf:"varint,2,opt,name=placement_status,json=placementStatus,proto3,enum=dydxprotocol.indexer.off_chain_updates.OrderPlaceV1_OrderPlacementStatus" json:"placement_status,omitempty"`
}
func (m *OrderPlaceV1) Reset() { *m = OrderPlaceV1{} }
func (m *OrderPlaceV1) String() string { return proto.CompactTextString(m) }
func (*OrderPlaceV1) ProtoMessage() {}
func (*OrderPlaceV1) Descriptor() ([]byte, []int) {
return fileDescriptor_a3058c1b66f59e98, []int{0}
}
func (m *OrderPlaceV1) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *OrderPlaceV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_OrderPlaceV1.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 *OrderPlaceV1) XXX_Merge(src proto.Message) {
xxx_messageInfo_OrderPlaceV1.Merge(m, src)
}
func (m *OrderPlaceV1) XXX_Size() int {
return m.Size()
}
func (m *OrderPlaceV1) XXX_DiscardUnknown() {
xxx_messageInfo_OrderPlaceV1.DiscardUnknown(m)
}
var xxx_messageInfo_OrderPlaceV1 proto.InternalMessageInfo
func (m *OrderPlaceV1) GetOrder() *v1.IndexerOrder {
if m != nil {
return m.Order
}
return nil
}
func (m *OrderPlaceV1) GetPlacementStatus() OrderPlaceV1_OrderPlacementStatus {
if m != nil {
return m.PlacementStatus
}
return OrderPlaceV1_ORDER_PLACEMENT_STATUS_UNSPECIFIED
}
// OrderRemove messages contain the id of the order removed, the reason for the
// removal and the resulting status from the removal.
type OrderRemoveV1 struct {
RemovedOrderId *v1.IndexerOrderId `protobuf:"bytes,1,opt,name=removed_order_id,json=removedOrderId,proto3" json:"removed_order_id,omitempty"`
Reason shared.OrderRemovalReason `protobuf:"varint,2,opt,name=reason,proto3,enum=dydxprotocol.indexer.shared.OrderRemovalReason" json:"reason,omitempty"`
RemovalStatus OrderRemoveV1_OrderRemovalStatus `protobuf:"varint,3,opt,name=removal_status,json=removalStatus,proto3,enum=dydxprotocol.indexer.off_chain_updates.OrderRemoveV1_OrderRemovalStatus" json:"removal_status,omitempty"`
}
func (m *OrderRemoveV1) Reset() { *m = OrderRemoveV1{} }
func (m *OrderRemoveV1) String() string { return proto.CompactTextString(m) }
func (*OrderRemoveV1) ProtoMessage() {}
func (*OrderRemoveV1) Descriptor() ([]byte, []int) {
return fileDescriptor_a3058c1b66f59e98, []int{1}
}
func (m *OrderRemoveV1) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *OrderRemoveV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_OrderRemoveV1.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 *OrderRemoveV1) XXX_Merge(src proto.Message) {
xxx_messageInfo_OrderRemoveV1.Merge(m, src)
}
func (m *OrderRemoveV1) XXX_Size() int {
return m.Size()
}
func (m *OrderRemoveV1) XXX_DiscardUnknown() {
xxx_messageInfo_OrderRemoveV1.DiscardUnknown(m)
}
var xxx_messageInfo_OrderRemoveV1 proto.InternalMessageInfo
func (m *OrderRemoveV1) GetRemovedOrderId() *v1.IndexerOrderId {
if m != nil {
return m.RemovedOrderId
}
return nil
}
func (m *OrderRemoveV1) GetReason() shared.OrderRemovalReason {
if m != nil {
return m.Reason
}
return shared.OrderRemovalReason_ORDER_REMOVAL_REASON_UNSPECIFIED
}
func (m *OrderRemoveV1) GetRemovalStatus() OrderRemoveV1_OrderRemovalStatus {
if m != nil {
return m.RemovalStatus
}
return OrderRemoveV1_ORDER_REMOVAL_STATUS_UNSPECIFIED
}
// OrderUpdate messages contain the id of the order being updated, and the
// updated total filled quantums of the order.
type OrderUpdateV1 struct {
OrderId *v1.IndexerOrderId `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
TotalFilledQuantums uint64 `protobuf:"varint,2,opt,name=total_filled_quantums,json=totalFilledQuantums,proto3" json:"total_filled_quantums,omitempty"`
}
func (m *OrderUpdateV1) Reset() { *m = OrderUpdateV1{} }
func (m *OrderUpdateV1) String() string { return proto.CompactTextString(m) }
func (*OrderUpdateV1) ProtoMessage() {}
func (*OrderUpdateV1) Descriptor() ([]byte, []int) {
return fileDescriptor_a3058c1b66f59e98, []int{2}
}
func (m *OrderUpdateV1) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *OrderUpdateV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_OrderUpdateV1.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 *OrderUpdateV1) XXX_Merge(src proto.Message) {
xxx_messageInfo_OrderUpdateV1.Merge(m, src)
}
func (m *OrderUpdateV1) XXX_Size() int {
return m.Size()
}
func (m *OrderUpdateV1) XXX_DiscardUnknown() {
xxx_messageInfo_OrderUpdateV1.DiscardUnknown(m)
}
var xxx_messageInfo_OrderUpdateV1 proto.InternalMessageInfo
func (m *OrderUpdateV1) GetOrderId() *v1.IndexerOrderId {
if m != nil {
return m.OrderId
}
return nil
}
func (m *OrderUpdateV1) GetTotalFilledQuantums() uint64 {
if m != nil {
return m.TotalFilledQuantums
}
return 0
}
// An OffChainUpdate message is the message type which will be sent on Kafka to
// the Indexer.
type OffChainUpdateV1 struct {
// Contains one of an OrderPlaceV1, OrderRemoveV1, and OrderUpdateV1 message.
//
// Types that are valid to be assigned to UpdateMessage:
// *OffChainUpdateV1_OrderPlace
// *OffChainUpdateV1_OrderRemove
// *OffChainUpdateV1_OrderUpdate
UpdateMessage isOffChainUpdateV1_UpdateMessage `protobuf_oneof:"update_message"`
}
func (m *OffChainUpdateV1) Reset() { *m = OffChainUpdateV1{} }
func (m *OffChainUpdateV1) String() string { return proto.CompactTextString(m) }
func (*OffChainUpdateV1) ProtoMessage() {}
func (*OffChainUpdateV1) Descriptor() ([]byte, []int) {
return fileDescriptor_a3058c1b66f59e98, []int{3}
}
func (m *OffChainUpdateV1) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *OffChainUpdateV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_OffChainUpdateV1.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 *OffChainUpdateV1) XXX_Merge(src proto.Message) {
xxx_messageInfo_OffChainUpdateV1.Merge(m, src)
}
func (m *OffChainUpdateV1) XXX_Size() int {
return m.Size()
}
func (m *OffChainUpdateV1) XXX_DiscardUnknown() {
xxx_messageInfo_OffChainUpdateV1.DiscardUnknown(m)
}
var xxx_messageInfo_OffChainUpdateV1 proto.InternalMessageInfo
type isOffChainUpdateV1_UpdateMessage interface {
isOffChainUpdateV1_UpdateMessage()
MarshalTo([]byte) (int, error)
Size() int
}
type OffChainUpdateV1_OrderPlace struct {
OrderPlace *OrderPlaceV1 `protobuf:"bytes,1,opt,name=order_place,json=orderPlace,proto3,oneof" json:"order_place,omitempty"`
}
type OffChainUpdateV1_OrderRemove struct {
OrderRemove *OrderRemoveV1 `protobuf:"bytes,2,opt,name=order_remove,json=orderRemove,proto3,oneof" json:"order_remove,omitempty"`
}
type OffChainUpdateV1_OrderUpdate struct {
OrderUpdate *OrderUpdateV1 `protobuf:"bytes,3,opt,name=order_update,json=orderUpdate,proto3,oneof" json:"order_update,omitempty"`
}
func (*OffChainUpdateV1_OrderPlace) isOffChainUpdateV1_UpdateMessage() {}
func (*OffChainUpdateV1_OrderRemove) isOffChainUpdateV1_UpdateMessage() {}
func (*OffChainUpdateV1_OrderUpdate) isOffChainUpdateV1_UpdateMessage() {}
func (m *OffChainUpdateV1) GetUpdateMessage() isOffChainUpdateV1_UpdateMessage {
if m != nil {
return m.UpdateMessage
}
return nil
}
func (m *OffChainUpdateV1) GetOrderPlace() *OrderPlaceV1 {
if x, ok := m.GetUpdateMessage().(*OffChainUpdateV1_OrderPlace); ok {
return x.OrderPlace
}
return nil
}
func (m *OffChainUpdateV1) GetOrderRemove() *OrderRemoveV1 {
if x, ok := m.GetUpdateMessage().(*OffChainUpdateV1_OrderRemove); ok {
return x.OrderRemove
}
return nil
}
func (m *OffChainUpdateV1) GetOrderUpdate() *OrderUpdateV1 {
if x, ok := m.GetUpdateMessage().(*OffChainUpdateV1_OrderUpdate); ok {
return x.OrderUpdate
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*OffChainUpdateV1) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*OffChainUpdateV1_OrderPlace)(nil),
(*OffChainUpdateV1_OrderRemove)(nil),
(*OffChainUpdateV1_OrderUpdate)(nil),
}
}
func init() {
proto.RegisterEnum("dydxprotocol.indexer.off_chain_updates.OrderPlaceV1_OrderPlacementStatus", OrderPlaceV1_OrderPlacementStatus_name, OrderPlaceV1_OrderPlacementStatus_value)
proto.RegisterEnum("dydxprotocol.indexer.off_chain_updates.OrderRemoveV1_OrderRemovalStatus", OrderRemoveV1_OrderRemovalStatus_name, OrderRemoveV1_OrderRemovalStatus_value)
proto.RegisterType((*OrderPlaceV1)(nil), "dydxprotocol.indexer.off_chain_updates.OrderPlaceV1")
proto.RegisterType((*OrderRemoveV1)(nil), "dydxprotocol.indexer.off_chain_updates.OrderRemoveV1")
proto.RegisterType((*OrderUpdateV1)(nil), "dydxprotocol.indexer.off_chain_updates.OrderUpdateV1")
proto.RegisterType((*OffChainUpdateV1)(nil), "dydxprotocol.indexer.off_chain_updates.OffChainUpdateV1")
}
func init() {
proto.RegisterFile("dydxprotocol/indexer/off_chain_updates/off_chain_updates.proto", fileDescriptor_a3058c1b66f59e98)
}
var fileDescriptor_a3058c1b66f59e98 = []byte{
// 623 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xd1, 0x6e, 0xd3, 0x3c,
0x18, 0x4d, 0xba, 0xff, 0x1f, 0xc8, 0xdb, 0x4a, 0x64, 0x40, 0x9a, 0x86, 0x08, 0x23, 0x42, 0xd3,
0x10, 0x5a, 0xb2, 0x96, 0x71, 0x8b, 0xd4, 0xa5, 0x29, 0x8b, 0xe8, 0x9a, 0xe2, 0x76, 0x43, 0xaa,
0x84, 0xac, 0xb4, 0x71, 0xd7, 0x4a, 0x69, 0x5d, 0x92, 0xb4, 0x1a, 0x6f, 0xb1, 0x17, 0xe1, 0x92,
0x77, 0xe0, 0x72, 0x37, 0x48, 0xdc, 0x20, 0xa1, 0xf6, 0x45, 0x50, 0x6c, 0x37, 0x6b, 0xd7, 0x4c,
0xa3, 0xe3, 0xf2, 0xfb, 0x72, 0xbe, 0xe3, 0xe3, 0x73, 0x3e, 0xb7, 0xe0, 0xad, 0xf7, 0xc5, 0x3b,
0x1f, 0x04, 0x34, 0xa2, 0x2d, 0xea, 0x1b, 0xdd, 0xbe, 0x47, 0xce, 0x49, 0x60, 0xd0, 0x76, 0x1b,
0xb7, 0x3a, 0x6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0xbe, 0x7d, 0x10, 0x9f, 0xb4, 0x6f, 0x19, 0xa0, 0x38, 0xed, 0xb6, 0x19, 0xe7, 0x90,
0xa8, 0xfa, 0x08, 0xd6, 0xb8, 0x2a, 0xf6, 0x56, 0x84, 0xb0, 0x83, 0xbb, 0xbc, 0xc1, 0x23, 0x09,
0x01, 0x9a, 0xd4, 0xb0, 0x01, 0xd6, 0x39, 0x31, 0x5f, 0x41, 0x26, 0x6c, 0x2d, 0xff, 0xe6, 0x4e,
0xfb, 0x71, 0x24, 0x21, 0xae, 0x92, 0x37, 0xae, 0xb8, 0x39, 0x9a, 0xed, 0xde, 0xb2, 0xdc, 0x53,
0x07, 0x12, 0x6e, 0xde, 0x38, 0x54, 0x40, 0x96, 0xe3, 0x70, 0x8f, 0x84, 0xa1, 0x7b, 0x46, 0x0e,
0x3f, 0x7d, 0x1f, 0xab, 0xf2, 0xe5, 0x58, 0x95, 0x7f, 0x8f, 0x55, 0xf9, 0x62, 0xa2, 0x4a, 0x97,
0x13, 0x55, 0xfa, 0x39, 0x51, 0xa5, 0x86, 0x79, 0xd6, 0x8d, 0x3a, 0xc3, 0xa6, 0xde, 0xa2, 0x3d,
0x63, 0xee, 0x47, 0x75, 0x74, 0xb0, 0xc7, 0x8e, 0x34, 0x6e, 0xff, 0x03, 0x68, 0xae, 0x32, 0xcc,
0xeb, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xd9, 0x86, 0x42, 0x31, 0x06, 0x00, 0x00,
}
func (m *OrderPlaceV1) 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 *OrderPlaceV1) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *OrderPlaceV1) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.PlacementStatus != 0 {
i = encodeVarintOffChainUpdates(dAtA, i, uint64(m.PlacementStatus))
i--
dAtA[i] = 0x10
}
if m.Order != nil {
{
size, err := m.Order.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintOffChainUpdates(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *OrderRemoveV1) 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 *OrderRemoveV1) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *OrderRemoveV1) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.RemovalStatus != 0 {
i = encodeVarintOffChainUpdates(dAtA, i, uint64(m.RemovalStatus))
i--
dAtA[i] = 0x18
}
if m.Reason != 0 {
i = encodeVarintOffChainUpdates(dAtA, i, uint64(m.Reason))
i--
dAtA[i] = 0x10
}
if m.RemovedOrderId != nil {
{
size, err := m.RemovedOrderId.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintOffChainUpdates(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *OrderUpdateV1) 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 *OrderUpdateV1) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *OrderUpdateV1) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.TotalFilledQuantums != 0 {
i = encodeVarintOffChainUpdates(dAtA, i, uint64(m.TotalFilledQuantums))
i--
dAtA[i] = 0x10
}
if m.OrderId != nil {
{
size, err := m.OrderId.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintOffChainUpdates(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *OffChainUpdateV1) 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 *OffChainUpdateV1) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *OffChainUpdateV1) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.UpdateMessage != nil {
{
size := m.UpdateMessage.Size()
i -= size
if _, err := m.UpdateMessage.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
return len(dAtA) - i, nil
}
func (m *OffChainUpdateV1_OrderPlace) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *OffChainUpdateV1_OrderPlace) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
if m.OrderPlace != nil {
{
size, err := m.OrderPlace.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintOffChainUpdates(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *OffChainUpdateV1_OrderRemove) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *OffChainUpdateV1_OrderRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
if m.OrderRemove != nil {
{
size, err := m.OrderRemove.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintOffChainUpdates(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
return len(dAtA) - i, nil
}
func (m *OffChainUpdateV1_OrderUpdate) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *OffChainUpdateV1_OrderUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
if m.OrderUpdate != nil {
{
size, err := m.OrderUpdate.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintOffChainUpdates(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
return len(dAtA) - i, nil
}
func encodeVarintOffChainUpdates(dAtA []byte, offset int, v uint64) int {
offset -= sovOffChainUpdates(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *OrderPlaceV1) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Order != nil {
l = m.Order.Size()
n += 1 + l + sovOffChainUpdates(uint64(l))
}
if m.PlacementStatus != 0 {
n += 1 + sovOffChainUpdates(uint64(m.PlacementStatus))
}
return n
}
func (m *OrderRemoveV1) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.RemovedOrderId != nil {
l = m.RemovedOrderId.Size()
n += 1 + l + sovOffChainUpdates(uint64(l))
}
if m.Reason != 0 {
n += 1 + sovOffChainUpdates(uint64(m.Reason))
}
if m.RemovalStatus != 0 {
n += 1 + sovOffChainUpdates(uint64(m.RemovalStatus))
}
return n
}
func (m *OrderUpdateV1) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.OrderId != nil {
l = m.OrderId.Size()
n += 1 + l + sovOffChainUpdates(uint64(l))
}
if m.TotalFilledQuantums != 0 {
n += 1 + sovOffChainUpdates(uint64(m.TotalFilledQuantums))
}
return n
}
func (m *OffChainUpdateV1) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.UpdateMessage != nil {
n += m.UpdateMessage.Size()
}
return n
}
func (m *OffChainUpdateV1_OrderPlace) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.OrderPlace != nil {
l = m.OrderPlace.Size()
n += 1 + l + sovOffChainUpdates(uint64(l))
}
return n
}
func (m *OffChainUpdateV1_OrderRemove) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.OrderRemove != nil {
l = m.OrderRemove.Size()
n += 1 + l + sovOffChainUpdates(uint64(l))
}
return n
}
func (m *OffChainUpdateV1_OrderUpdate) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.OrderUpdate != nil {
l = m.OrderUpdate.Size()
n += 1 + l + sovOffChainUpdates(uint64(l))
}
return n
}
func sovOffChainUpdates(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozOffChainUpdates(x uint64) (n int) {
return sovOffChainUpdates(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *OrderPlaceV1) 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 ErrIntOverflowOffChainUpdates
}
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: OrderPlaceV1: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: OrderPlaceV1: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowOffChainUpdates
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthOffChainUpdates
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthOffChainUpdates
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Order == nil {
m.Order = &v1.IndexerOrder{}
}
if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field PlacementStatus", wireType)
}
m.PlacementStatus = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowOffChainUpdates
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.PlacementStatus |= OrderPlaceV1_OrderPlacementStatus(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipOffChainUpdates(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthOffChainUpdates
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *OrderRemoveV1) 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 ErrIntOverflowOffChainUpdates
}
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: OrderRemoveV1: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: OrderRemoveV1: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RemovedOrderId", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowOffChainUpdates
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthOffChainUpdates
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthOffChainUpdates
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.RemovedOrderId == nil {
m.RemovedOrderId = &v1.IndexerOrderId{}
}
if err := m.RemovedOrderId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
}
m.Reason = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowOffChainUpdates
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Reason |= shared.OrderRemovalReason(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field RemovalStatus", wireType)
}
m.RemovalStatus = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowOffChainUpdates
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.RemovalStatus |= OrderRemoveV1_OrderRemovalStatus(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipOffChainUpdates(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthOffChainUpdates