forked from 33cn/plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
trade.pb.go
2944 lines (2603 loc) · 93 KB
/
trade.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-go. DO NOT EDIT.
// source: trade.proto
package types
import (
context "context"
fmt "fmt"
math "math"
types "github.com/33cn/chain33/types"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
)
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
// trade 交易部分
//
type Trade struct {
// Types that are valid to be assigned to Value:
// *Trade_SellLimit
// *Trade_BuyMarket
// *Trade_RevokeSell
// *Trade_BuyLimit
// *Trade_SellMarket
// *Trade_RevokeBuy
Value isTrade_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,4,opt,name=ty,proto3" json:"ty,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Trade) Reset() { *m = Trade{} }
func (m *Trade) String() string { return proto.CompactTextString(m) }
func (*Trade) ProtoMessage() {}
func (*Trade) Descriptor() ([]byte, []int) {
return fileDescriptor_ee944bd90e8a0312, []int{0}
}
func (m *Trade) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Trade.Unmarshal(m, b)
}
func (m *Trade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Trade.Marshal(b, m, deterministic)
}
func (m *Trade) XXX_Merge(src proto.Message) {
xxx_messageInfo_Trade.Merge(m, src)
}
func (m *Trade) XXX_Size() int {
return xxx_messageInfo_Trade.Size(m)
}
func (m *Trade) XXX_DiscardUnknown() {
xxx_messageInfo_Trade.DiscardUnknown(m)
}
var xxx_messageInfo_Trade proto.InternalMessageInfo
type isTrade_Value interface {
isTrade_Value()
}
type Trade_SellLimit struct {
SellLimit *TradeForSell `protobuf:"bytes,1,opt,name=sellLimit,proto3,oneof"`
}
type Trade_BuyMarket struct {
BuyMarket *TradeForBuy `protobuf:"bytes,2,opt,name=buyMarket,proto3,oneof"`
}
type Trade_RevokeSell struct {
RevokeSell *TradeForRevokeSell `protobuf:"bytes,3,opt,name=revokeSell,proto3,oneof"`
}
type Trade_BuyLimit struct {
BuyLimit *TradeForBuyLimit `protobuf:"bytes,5,opt,name=buyLimit,proto3,oneof"`
}
type Trade_SellMarket struct {
SellMarket *TradeForSellMarket `protobuf:"bytes,6,opt,name=sellMarket,proto3,oneof"`
}
type Trade_RevokeBuy struct {
RevokeBuy *TradeForRevokeBuy `protobuf:"bytes,7,opt,name=revokeBuy,proto3,oneof"`
}
func (*Trade_SellLimit) isTrade_Value() {}
func (*Trade_BuyMarket) isTrade_Value() {}
func (*Trade_RevokeSell) isTrade_Value() {}
func (*Trade_BuyLimit) isTrade_Value() {}
func (*Trade_SellMarket) isTrade_Value() {}
func (*Trade_RevokeBuy) isTrade_Value() {}
func (m *Trade) GetValue() isTrade_Value {
if m != nil {
return m.Value
}
return nil
}
func (m *Trade) GetSellLimit() *TradeForSell {
if x, ok := m.GetValue().(*Trade_SellLimit); ok {
return x.SellLimit
}
return nil
}
func (m *Trade) GetBuyMarket() *TradeForBuy {
if x, ok := m.GetValue().(*Trade_BuyMarket); ok {
return x.BuyMarket
}
return nil
}
func (m *Trade) GetRevokeSell() *TradeForRevokeSell {
if x, ok := m.GetValue().(*Trade_RevokeSell); ok {
return x.RevokeSell
}
return nil
}
func (m *Trade) GetBuyLimit() *TradeForBuyLimit {
if x, ok := m.GetValue().(*Trade_BuyLimit); ok {
return x.BuyLimit
}
return nil
}
func (m *Trade) GetSellMarket() *TradeForSellMarket {
if x, ok := m.GetValue().(*Trade_SellMarket); ok {
return x.SellMarket
}
return nil
}
func (m *Trade) GetRevokeBuy() *TradeForRevokeBuy {
if x, ok := m.GetValue().(*Trade_RevokeBuy); ok {
return x.RevokeBuy
}
return nil
}
func (m *Trade) GetTy() int32 {
if m != nil {
return m.Ty
}
return 0
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Trade) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Trade_OneofMarshaler, _Trade_OneofUnmarshaler, _Trade_OneofSizer, []interface{}{
(*Trade_SellLimit)(nil),
(*Trade_BuyMarket)(nil),
(*Trade_RevokeSell)(nil),
(*Trade_BuyLimit)(nil),
(*Trade_SellMarket)(nil),
(*Trade_RevokeBuy)(nil),
}
}
func _Trade_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Trade)
// value
switch x := m.Value.(type) {
case *Trade_SellLimit:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.SellLimit); err != nil {
return err
}
case *Trade_BuyMarket:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.BuyMarket); err != nil {
return err
}
case *Trade_RevokeSell:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.RevokeSell); err != nil {
return err
}
case *Trade_BuyLimit:
b.EncodeVarint(5<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.BuyLimit); err != nil {
return err
}
case *Trade_SellMarket:
b.EncodeVarint(6<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.SellMarket); err != nil {
return err
}
case *Trade_RevokeBuy:
b.EncodeVarint(7<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.RevokeBuy); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Trade.Value has unexpected type %T", x)
}
return nil
}
func _Trade_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Trade)
switch tag {
case 1: // value.sellLimit
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TradeForSell)
err := b.DecodeMessage(msg)
m.Value = &Trade_SellLimit{msg}
return true, err
case 2: // value.buyMarket
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TradeForBuy)
err := b.DecodeMessage(msg)
m.Value = &Trade_BuyMarket{msg}
return true, err
case 3: // value.revokeSell
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TradeForRevokeSell)
err := b.DecodeMessage(msg)
m.Value = &Trade_RevokeSell{msg}
return true, err
case 5: // value.buyLimit
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TradeForBuyLimit)
err := b.DecodeMessage(msg)
m.Value = &Trade_BuyLimit{msg}
return true, err
case 6: // value.sellMarket
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TradeForSellMarket)
err := b.DecodeMessage(msg)
m.Value = &Trade_SellMarket{msg}
return true, err
case 7: // value.revokeBuy
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TradeForRevokeBuy)
err := b.DecodeMessage(msg)
m.Value = &Trade_RevokeBuy{msg}
return true, err
default:
return false, nil
}
}
func _Trade_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Trade)
// value
switch x := m.Value.(type) {
case *Trade_SellLimit:
s := proto.Size(x.SellLimit)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Trade_BuyMarket:
s := proto.Size(x.BuyMarket)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Trade_RevokeSell:
s := proto.Size(x.RevokeSell)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Trade_BuyLimit:
s := proto.Size(x.BuyLimit)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Trade_SellMarket:
s := proto.Size(x.SellMarket)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Trade_RevokeBuy:
s := proto.Size(x.RevokeBuy)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// 创建众筹交易,确定一手交易的token的数量,单价以及总共有多少手token可以进行众筹
type TradeForSell struct {
TokenSymbol string `protobuf:"bytes,1,opt,name=tokenSymbol,proto3" json:"tokenSymbol,omitempty"`
// 每一手出售的token的数量
AmountPerBoardlot int64 `protobuf:"varint,2,opt,name=amountPerBoardlot,proto3" json:"amountPerBoardlot,omitempty"`
// 起卖手数,必须达到这个门槛才允许进行交易
MinBoardlot int64 `protobuf:"varint,3,opt,name=minBoardlot,proto3" json:"minBoardlot,omitempty"`
// 每一手token的价格
PricePerBoardlot int64 `protobuf:"varint,4,opt,name=pricePerBoardlot,proto3" json:"pricePerBoardlot,omitempty"`
TotalBoardlot int64 `protobuf:"varint,5,opt,name=totalBoardlot,proto3" json:"totalBoardlot,omitempty"`
// 此次出售的起始时间,如果非众筹则可以忽略此时间
Starttime int64 `protobuf:"varint,6,opt,name=starttime,proto3" json:"starttime,omitempty"`
Stoptime int64 `protobuf:"varint,7,opt,name=stoptime,proto3" json:"stoptime,omitempty"`
Crowdfund bool `protobuf:"varint,8,opt,name=crowdfund,proto3" json:"crowdfund,omitempty"`
// 资产来源
AssetExec string `protobuf:"bytes,9,opt,name=assetExec,proto3" json:"assetExec,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TradeForSell) Reset() { *m = TradeForSell{} }
func (m *TradeForSell) String() string { return proto.CompactTextString(m) }
func (*TradeForSell) ProtoMessage() {}
func (*TradeForSell) Descriptor() ([]byte, []int) {
return fileDescriptor_ee944bd90e8a0312, []int{1}
}
func (m *TradeForSell) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TradeForSell.Unmarshal(m, b)
}
func (m *TradeForSell) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TradeForSell.Marshal(b, m, deterministic)
}
func (m *TradeForSell) XXX_Merge(src proto.Message) {
xxx_messageInfo_TradeForSell.Merge(m, src)
}
func (m *TradeForSell) XXX_Size() int {
return xxx_messageInfo_TradeForSell.Size(m)
}
func (m *TradeForSell) XXX_DiscardUnknown() {
xxx_messageInfo_TradeForSell.DiscardUnknown(m)
}
var xxx_messageInfo_TradeForSell proto.InternalMessageInfo
func (m *TradeForSell) GetTokenSymbol() string {
if m != nil {
return m.TokenSymbol
}
return ""
}
func (m *TradeForSell) GetAmountPerBoardlot() int64 {
if m != nil {
return m.AmountPerBoardlot
}
return 0
}
func (m *TradeForSell) GetMinBoardlot() int64 {
if m != nil {
return m.MinBoardlot
}
return 0
}
func (m *TradeForSell) GetPricePerBoardlot() int64 {
if m != nil {
return m.PricePerBoardlot
}
return 0
}
func (m *TradeForSell) GetTotalBoardlot() int64 {
if m != nil {
return m.TotalBoardlot
}
return 0
}
func (m *TradeForSell) GetStarttime() int64 {
if m != nil {
return m.Starttime
}
return 0
}
func (m *TradeForSell) GetStoptime() int64 {
if m != nil {
return m.Stoptime
}
return 0
}
func (m *TradeForSell) GetCrowdfund() bool {
if m != nil {
return m.Crowdfund
}
return false
}
func (m *TradeForSell) GetAssetExec() string {
if m != nil {
return m.AssetExec
}
return ""
}
// 购买者发起交易用来购买token持有者之前挂单出售的token
// 其中的hash为token出售者发起出售交易的hash
type TradeForBuy struct {
SellID string `protobuf:"bytes,1,opt,name=sellID,proto3" json:"sellID,omitempty"`
BoardlotCnt int64 `protobuf:"varint,2,opt,name=boardlotCnt,proto3" json:"boardlotCnt,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TradeForBuy) Reset() { *m = TradeForBuy{} }
func (m *TradeForBuy) String() string { return proto.CompactTextString(m) }
func (*TradeForBuy) ProtoMessage() {}
func (*TradeForBuy) Descriptor() ([]byte, []int) {
return fileDescriptor_ee944bd90e8a0312, []int{2}
}
func (m *TradeForBuy) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TradeForBuy.Unmarshal(m, b)
}
func (m *TradeForBuy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TradeForBuy.Marshal(b, m, deterministic)
}
func (m *TradeForBuy) XXX_Merge(src proto.Message) {
xxx_messageInfo_TradeForBuy.Merge(m, src)
}
func (m *TradeForBuy) XXX_Size() int {
return xxx_messageInfo_TradeForBuy.Size(m)
}
func (m *TradeForBuy) XXX_DiscardUnknown() {
xxx_messageInfo_TradeForBuy.DiscardUnknown(m)
}
var xxx_messageInfo_TradeForBuy proto.InternalMessageInfo
func (m *TradeForBuy) GetSellID() string {
if m != nil {
return m.SellID
}
return ""
}
func (m *TradeForBuy) GetBoardlotCnt() int64 {
if m != nil {
return m.BoardlotCnt
}
return 0
}
// 允许token的持有者撤销之前未成交出售token的挂单
type TradeForRevokeSell struct {
SellID string `protobuf:"bytes,1,opt,name=sellID,proto3" json:"sellID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TradeForRevokeSell) Reset() { *m = TradeForRevokeSell{} }
func (m *TradeForRevokeSell) String() string { return proto.CompactTextString(m) }
func (*TradeForRevokeSell) ProtoMessage() {}
func (*TradeForRevokeSell) Descriptor() ([]byte, []int) {
return fileDescriptor_ee944bd90e8a0312, []int{3}
}
func (m *TradeForRevokeSell) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TradeForRevokeSell.Unmarshal(m, b)
}
func (m *TradeForRevokeSell) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TradeForRevokeSell.Marshal(b, m, deterministic)
}
func (m *TradeForRevokeSell) XXX_Merge(src proto.Message) {
xxx_messageInfo_TradeForRevokeSell.Merge(m, src)
}
func (m *TradeForRevokeSell) XXX_Size() int {
return xxx_messageInfo_TradeForRevokeSell.Size(m)
}
func (m *TradeForRevokeSell) XXX_DiscardUnknown() {
xxx_messageInfo_TradeForRevokeSell.DiscardUnknown(m)
}
var xxx_messageInfo_TradeForRevokeSell proto.InternalMessageInfo
func (m *TradeForRevokeSell) GetSellID() string {
if m != nil {
return m.SellID
}
return ""
}
// 限价买单构造请求
type TradeForBuyLimit struct {
TokenSymbol string `protobuf:"bytes,1,opt,name=tokenSymbol,proto3" json:"tokenSymbol,omitempty"`
AmountPerBoardlot int64 `protobuf:"varint,2,opt,name=amountPerBoardlot,proto3" json:"amountPerBoardlot,omitempty"`
MinBoardlot int64 `protobuf:"varint,3,opt,name=minBoardlot,proto3" json:"minBoardlot,omitempty"`
PricePerBoardlot int64 `protobuf:"varint,4,opt,name=pricePerBoardlot,proto3" json:"pricePerBoardlot,omitempty"`
TotalBoardlot int64 `protobuf:"varint,5,opt,name=totalBoardlot,proto3" json:"totalBoardlot,omitempty"`
AssetExec string `protobuf:"bytes,6,opt,name=assetExec,proto3" json:"assetExec,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TradeForBuyLimit) Reset() { *m = TradeForBuyLimit{} }
func (m *TradeForBuyLimit) String() string { return proto.CompactTextString(m) }
func (*TradeForBuyLimit) ProtoMessage() {}
func (*TradeForBuyLimit) Descriptor() ([]byte, []int) {
return fileDescriptor_ee944bd90e8a0312, []int{4}
}
func (m *TradeForBuyLimit) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TradeForBuyLimit.Unmarshal(m, b)
}
func (m *TradeForBuyLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TradeForBuyLimit.Marshal(b, m, deterministic)
}
func (m *TradeForBuyLimit) XXX_Merge(src proto.Message) {
xxx_messageInfo_TradeForBuyLimit.Merge(m, src)
}
func (m *TradeForBuyLimit) XXX_Size() int {
return xxx_messageInfo_TradeForBuyLimit.Size(m)
}
func (m *TradeForBuyLimit) XXX_DiscardUnknown() {
xxx_messageInfo_TradeForBuyLimit.DiscardUnknown(m)
}
var xxx_messageInfo_TradeForBuyLimit proto.InternalMessageInfo
func (m *TradeForBuyLimit) GetTokenSymbol() string {
if m != nil {
return m.TokenSymbol
}
return ""
}
func (m *TradeForBuyLimit) GetAmountPerBoardlot() int64 {
if m != nil {
return m.AmountPerBoardlot
}
return 0
}
func (m *TradeForBuyLimit) GetMinBoardlot() int64 {
if m != nil {
return m.MinBoardlot
}
return 0
}
func (m *TradeForBuyLimit) GetPricePerBoardlot() int64 {
if m != nil {
return m.PricePerBoardlot
}
return 0
}
func (m *TradeForBuyLimit) GetTotalBoardlot() int64 {
if m != nil {
return m.TotalBoardlot
}
return 0
}
func (m *TradeForBuyLimit) GetAssetExec() string {
if m != nil {
return m.AssetExec
}
return ""
}
// 现价卖单
type TradeForSellMarket struct {
BuyID string `protobuf:"bytes,1,opt,name=buyID,proto3" json:"buyID,omitempty"`
BoardlotCnt int64 `protobuf:"varint,2,opt,name=boardlotCnt,proto3" json:"boardlotCnt,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TradeForSellMarket) Reset() { *m = TradeForSellMarket{} }
func (m *TradeForSellMarket) String() string { return proto.CompactTextString(m) }
func (*TradeForSellMarket) ProtoMessage() {}
func (*TradeForSellMarket) Descriptor() ([]byte, []int) {
return fileDescriptor_ee944bd90e8a0312, []int{5}
}
func (m *TradeForSellMarket) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TradeForSellMarket.Unmarshal(m, b)
}
func (m *TradeForSellMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TradeForSellMarket.Marshal(b, m, deterministic)
}
func (m *TradeForSellMarket) XXX_Merge(src proto.Message) {
xxx_messageInfo_TradeForSellMarket.Merge(m, src)
}
func (m *TradeForSellMarket) XXX_Size() int {
return xxx_messageInfo_TradeForSellMarket.Size(m)
}
func (m *TradeForSellMarket) XXX_DiscardUnknown() {
xxx_messageInfo_TradeForSellMarket.DiscardUnknown(m)
}
var xxx_messageInfo_TradeForSellMarket proto.InternalMessageInfo
func (m *TradeForSellMarket) GetBuyID() string {
if m != nil {
return m.BuyID
}
return ""
}
func (m *TradeForSellMarket) GetBoardlotCnt() int64 {
if m != nil {
return m.BoardlotCnt
}
return 0
}
// 撤销买单
type TradeForRevokeBuy struct {
BuyID string `protobuf:"bytes,1,opt,name=buyID,proto3" json:"buyID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TradeForRevokeBuy) Reset() { *m = TradeForRevokeBuy{} }
func (m *TradeForRevokeBuy) String() string { return proto.CompactTextString(m) }
func (*TradeForRevokeBuy) ProtoMessage() {}
func (*TradeForRevokeBuy) Descriptor() ([]byte, []int) {
return fileDescriptor_ee944bd90e8a0312, []int{6}
}
func (m *TradeForRevokeBuy) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TradeForRevokeBuy.Unmarshal(m, b)
}
func (m *TradeForRevokeBuy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TradeForRevokeBuy.Marshal(b, m, deterministic)
}
func (m *TradeForRevokeBuy) XXX_Merge(src proto.Message) {
xxx_messageInfo_TradeForRevokeBuy.Merge(m, src)
}
func (m *TradeForRevokeBuy) XXX_Size() int {
return xxx_messageInfo_TradeForRevokeBuy.Size(m)
}
func (m *TradeForRevokeBuy) XXX_DiscardUnknown() {
xxx_messageInfo_TradeForRevokeBuy.DiscardUnknown(m)
}
var xxx_messageInfo_TradeForRevokeBuy proto.InternalMessageInfo
func (m *TradeForRevokeBuy) GetBuyID() string {
if m != nil {
return m.BuyID
}
return ""
}
// 数据库部分
type SellOrder struct {
TokenSymbol string `protobuf:"bytes,1,opt,name=tokenSymbol,proto3" json:"tokenSymbol,omitempty"`
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
//每一手出售的token的数量
AmountPerBoardlot int64 `protobuf:"varint,3,opt,name=amountPerBoardlot,proto3" json:"amountPerBoardlot,omitempty"`
MinBoardlot int64 `protobuf:"varint,4,opt,name=minBoardlot,proto3" json:"minBoardlot,omitempty"`
//每一手token的价格
PricePerBoardlot int64 `protobuf:"varint,5,opt,name=pricePerBoardlot,proto3" json:"pricePerBoardlot,omitempty"`
TotalBoardlot int64 `protobuf:"varint,6,opt,name=totalBoardlot,proto3" json:"totalBoardlot,omitempty"`
SoldBoardlot int64 `protobuf:"varint,7,opt,name=soldBoardlot,proto3" json:"soldBoardlot,omitempty"`
//此次出售的起始时间,如果非众筹则可以忽略此时间
Starttime int64 `protobuf:"varint,8,opt,name=starttime,proto3" json:"starttime,omitempty"`
Stoptime int64 `protobuf:"varint,9,opt,name=stoptime,proto3" json:"stoptime,omitempty"`
Crowdfund bool `protobuf:"varint,10,opt,name=crowdfund,proto3" json:"crowdfund,omitempty"`
//此处使用tx的hash来指定
SellID string `protobuf:"bytes,11,opt,name=sellID,proto3" json:"sellID,omitempty"`
Status int32 `protobuf:"varint,12,opt,name=status,proto3" json:"status,omitempty"`
Height int64 `protobuf:"varint,13,opt,name=height,proto3" json:"height,omitempty"`
AssetExec string `protobuf:"bytes,14,opt,name=assetExec,proto3" json:"assetExec,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SellOrder) Reset() { *m = SellOrder{} }
func (m *SellOrder) String() string { return proto.CompactTextString(m) }
func (*SellOrder) ProtoMessage() {}
func (*SellOrder) Descriptor() ([]byte, []int) {
return fileDescriptor_ee944bd90e8a0312, []int{7}
}
func (m *SellOrder) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SellOrder.Unmarshal(m, b)
}
func (m *SellOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SellOrder.Marshal(b, m, deterministic)
}
func (m *SellOrder) XXX_Merge(src proto.Message) {
xxx_messageInfo_SellOrder.Merge(m, src)
}
func (m *SellOrder) XXX_Size() int {
return xxx_messageInfo_SellOrder.Size(m)
}
func (m *SellOrder) XXX_DiscardUnknown() {
xxx_messageInfo_SellOrder.DiscardUnknown(m)
}
var xxx_messageInfo_SellOrder proto.InternalMessageInfo
func (m *SellOrder) GetTokenSymbol() string {
if m != nil {
return m.TokenSymbol
}
return ""
}
func (m *SellOrder) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
func (m *SellOrder) GetAmountPerBoardlot() int64 {
if m != nil {
return m.AmountPerBoardlot
}
return 0
}
func (m *SellOrder) GetMinBoardlot() int64 {
if m != nil {
return m.MinBoardlot
}
return 0
}
func (m *SellOrder) GetPricePerBoardlot() int64 {
if m != nil {
return m.PricePerBoardlot
}
return 0
}
func (m *SellOrder) GetTotalBoardlot() int64 {
if m != nil {
return m.TotalBoardlot
}
return 0
}
func (m *SellOrder) GetSoldBoardlot() int64 {
if m != nil {
return m.SoldBoardlot
}
return 0
}
func (m *SellOrder) GetStarttime() int64 {
if m != nil {
return m.Starttime
}
return 0
}
func (m *SellOrder) GetStoptime() int64 {
if m != nil {
return m.Stoptime
}
return 0
}
func (m *SellOrder) GetCrowdfund() bool {
if m != nil {
return m.Crowdfund
}
return false
}
func (m *SellOrder) GetSellID() string {
if m != nil {
return m.SellID
}
return ""
}
func (m *SellOrder) GetStatus() int32 {
if m != nil {
return m.Status
}
return 0
}
func (m *SellOrder) GetHeight() int64 {
if m != nil {
return m.Height
}
return 0
}
func (m *SellOrder) GetAssetExec() string {
if m != nil {
return m.AssetExec
}
return ""
}
// 限价买单数据库记录
type BuyLimitOrder struct {
TokenSymbol string `protobuf:"bytes,1,opt,name=tokenSymbol,proto3" json:"tokenSymbol,omitempty"`
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
AmountPerBoardlot int64 `protobuf:"varint,3,opt,name=amountPerBoardlot,proto3" json:"amountPerBoardlot,omitempty"`
MinBoardlot int64 `protobuf:"varint,4,opt,name=minBoardlot,proto3" json:"minBoardlot,omitempty"`
PricePerBoardlot int64 `protobuf:"varint,5,opt,name=pricePerBoardlot,proto3" json:"pricePerBoardlot,omitempty"`
TotalBoardlot int64 `protobuf:"varint,6,opt,name=totalBoardlot,proto3" json:"totalBoardlot,omitempty"`
BoughtBoardlot int64 `protobuf:"varint,7,opt,name=boughtBoardlot,proto3" json:"boughtBoardlot,omitempty"`
BuyID string `protobuf:"bytes,8,opt,name=buyID,proto3" json:"buyID,omitempty"`
Status int32 `protobuf:"varint,9,opt,name=status,proto3" json:"status,omitempty"`
Height int64 `protobuf:"varint,10,opt,name=height,proto3" json:"height,omitempty"`
AssetExec string `protobuf:"bytes,11,opt,name=assetExec,proto3" json:"assetExec,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BuyLimitOrder) Reset() { *m = BuyLimitOrder{} }
func (m *BuyLimitOrder) String() string { return proto.CompactTextString(m) }
func (*BuyLimitOrder) ProtoMessage() {}
func (*BuyLimitOrder) Descriptor() ([]byte, []int) {
return fileDescriptor_ee944bd90e8a0312, []int{8}
}
func (m *BuyLimitOrder) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BuyLimitOrder.Unmarshal(m, b)
}
func (m *BuyLimitOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BuyLimitOrder.Marshal(b, m, deterministic)
}
func (m *BuyLimitOrder) XXX_Merge(src proto.Message) {
xxx_messageInfo_BuyLimitOrder.Merge(m, src)
}
func (m *BuyLimitOrder) XXX_Size() int {
return xxx_messageInfo_BuyLimitOrder.Size(m)
}
func (m *BuyLimitOrder) XXX_DiscardUnknown() {
xxx_messageInfo_BuyLimitOrder.DiscardUnknown(m)
}
var xxx_messageInfo_BuyLimitOrder proto.InternalMessageInfo
func (m *BuyLimitOrder) GetTokenSymbol() string {
if m != nil {
return m.TokenSymbol
}
return ""
}
func (m *BuyLimitOrder) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
func (m *BuyLimitOrder) GetAmountPerBoardlot() int64 {
if m != nil {
return m.AmountPerBoardlot
}
return 0
}
func (m *BuyLimitOrder) GetMinBoardlot() int64 {
if m != nil {
return m.MinBoardlot
}
return 0
}
func (m *BuyLimitOrder) GetPricePerBoardlot() int64 {
if m != nil {
return m.PricePerBoardlot
}
return 0
}
func (m *BuyLimitOrder) GetTotalBoardlot() int64 {
if m != nil {
return m.TotalBoardlot
}
return 0
}
func (m *BuyLimitOrder) GetBoughtBoardlot() int64 {
if m != nil {
return m.BoughtBoardlot
}
return 0
}
func (m *BuyLimitOrder) GetBuyID() string {
if m != nil {
return m.BuyID
}
return ""
}
func (m *BuyLimitOrder) GetStatus() int32 {
if m != nil {
return m.Status
}
return 0
}
func (m *BuyLimitOrder) GetHeight() int64 {
if m != nil {
return m.Height
}
return 0
}
func (m *BuyLimitOrder) GetAssetExec() string {
if m != nil {
return m.AssetExec
}
return ""
}
// 执行器日志部分
type ReceiptBuyBase struct {
TokenSymbol string `protobuf:"bytes,1,opt,name=tokenSymbol,proto3" json:"tokenSymbol,omitempty"`
Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
AmountPerBoardlot string `protobuf:"bytes,3,opt,name=amountPerBoardlot,proto3" json:"amountPerBoardlot,omitempty"`
MinBoardlot int64 `protobuf:"varint,4,opt,name=minBoardlot,proto3" json:"minBoardlot,omitempty"`
PricePerBoardlot string `protobuf:"bytes,5,opt,name=pricePerBoardlot,proto3" json:"pricePerBoardlot,omitempty"`
TotalBoardlot int64 `protobuf:"varint,6,opt,name=totalBoardlot,proto3" json:"totalBoardlot,omitempty"`
BoughtBoardlot int64 `protobuf:"varint,7,opt,name=boughtBoardlot,proto3" json:"boughtBoardlot,omitempty"`
BuyID string `protobuf:"bytes,8,opt,name=buyID,proto3" json:"buyID,omitempty"`
Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"`
SellID string `protobuf:"bytes,10,opt,name=sellID,proto3" json:"sellID,omitempty"`
TxHash string `protobuf:"bytes,11,opt,name=txHash,proto3" json:"txHash,omitempty"`
Height int64 `protobuf:"varint,12,opt,name=height,proto3" json:"height,omitempty"`
AssetExec string `protobuf:"bytes,13,opt,name=assetExec,proto3" json:"assetExec,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReceiptBuyBase) Reset() { *m = ReceiptBuyBase{} }
func (m *ReceiptBuyBase) String() string { return proto.CompactTextString(m) }
func (*ReceiptBuyBase) ProtoMessage() {}
func (*ReceiptBuyBase) Descriptor() ([]byte, []int) {
return fileDescriptor_ee944bd90e8a0312, []int{9}
}
func (m *ReceiptBuyBase) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptBuyBase.Unmarshal(m, b)
}
func (m *ReceiptBuyBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReceiptBuyBase.Marshal(b, m, deterministic)
}
func (m *ReceiptBuyBase) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReceiptBuyBase.Merge(m, src)
}
func (m *ReceiptBuyBase) XXX_Size() int {
return xxx_messageInfo_ReceiptBuyBase.Size(m)
}
func (m *ReceiptBuyBase) XXX_DiscardUnknown() {
xxx_messageInfo_ReceiptBuyBase.DiscardUnknown(m)
}
var xxx_messageInfo_ReceiptBuyBase proto.InternalMessageInfo
func (m *ReceiptBuyBase) GetTokenSymbol() string {
if m != nil {
return m.TokenSymbol
}
return ""
}