/
state.pb.go
4668 lines (4479 loc) · 114 KB
/
state.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: regen/ecocredit/v1/state.proto
package v1
import (
fmt "fmt"
_ "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1"
types1 "github.com/cosmos/cosmos-sdk/types"
proto "github.com/gogo/protobuf/proto"
types "github.com/gogo/protobuf/types"
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
// CreditType defines the measurement unit/precision of a certain credit type
// (e.g. carbon, biodiversity...)
type CreditType struct {
// abbreviation is a 1-3 character uppercase abbreviation of the CreditType
// name, used in batch denominations within the CreditType. It must be unique.
Abbreviation string `protobuf:"bytes,1,opt,name=abbreviation,proto3" json:"abbreviation,omitempty"`
// name is the name of the credit type (e.g. carbon, biodiversity).
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// unit is the measurement unit of the credit type (e.g. kg, ton).
Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"`
// precision is the decimal precision of the credit type.
Precision uint32 `protobuf:"varint,4,opt,name=precision,proto3" json:"precision,omitempty"`
}
func (m *CreditType) Reset() { *m = CreditType{} }
func (m *CreditType) String() string { return proto.CompactTextString(m) }
func (*CreditType) ProtoMessage() {}
func (*CreditType) Descriptor() ([]byte, []int) {
return fileDescriptor_6cfdca0a4aaabb36, []int{0}
}
func (m *CreditType) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *CreditType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_CreditType.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 *CreditType) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreditType.Merge(m, src)
}
func (m *CreditType) XXX_Size() int {
return m.Size()
}
func (m *CreditType) XXX_DiscardUnknown() {
xxx_messageInfo_CreditType.DiscardUnknown(m)
}
var xxx_messageInfo_CreditType proto.InternalMessageInfo
func (m *CreditType) GetAbbreviation() string {
if m != nil {
return m.Abbreviation
}
return ""
}
func (m *CreditType) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *CreditType) GetUnit() string {
if m != nil {
return m.Unit
}
return ""
}
func (m *CreditType) GetPrecision() uint32 {
if m != nil {
return m.Precision
}
return 0
}
// Class represents the high-level on-chain information for a credit class.
type Class struct {
// key is the table row identifier of the credit class used internally for
// efficient lookups. This identifier is auto-incrementing.
Key uint64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"`
// id is the unique identifier of the credit class auto-generated from the
// credit type abbreviation and the credit class sequence number.
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
// admin is the admin of the credit class.
Admin []byte `protobuf:"bytes,3,opt,name=admin,proto3" json:"admin,omitempty"`
// metadata is any arbitrary metadata to attached to the credit class.
Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
// credit_type_abbrev is the abbreviation of the credit type.
CreditTypeAbbrev string `protobuf:"bytes,5,opt,name=credit_type_abbrev,json=creditTypeAbbrev,proto3" json:"credit_type_abbrev,omitempty"`
}
func (m *Class) Reset() { *m = Class{} }
func (m *Class) String() string { return proto.CompactTextString(m) }
func (*Class) ProtoMessage() {}
func (*Class) Descriptor() ([]byte, []int) {
return fileDescriptor_6cfdca0a4aaabb36, []int{1}
}
func (m *Class) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Class) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Class.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 *Class) XXX_Merge(src proto.Message) {
xxx_messageInfo_Class.Merge(m, src)
}
func (m *Class) XXX_Size() int {
return m.Size()
}
func (m *Class) XXX_DiscardUnknown() {
xxx_messageInfo_Class.DiscardUnknown(m)
}
var xxx_messageInfo_Class proto.InternalMessageInfo
func (m *Class) GetKey() uint64 {
if m != nil {
return m.Key
}
return 0
}
func (m *Class) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Class) GetAdmin() []byte {
if m != nil {
return m.Admin
}
return nil
}
func (m *Class) GetMetadata() string {
if m != nil {
return m.Metadata
}
return ""
}
func (m *Class) GetCreditTypeAbbrev() string {
if m != nil {
return m.CreditTypeAbbrev
}
return ""
}
// ClassIssuers is a JOIN table for Class Info that stores the credit class
// issuers
type ClassIssuer struct {
// class_key is the table row identifier of the credit class used internally
// for efficient lookups. This links a class issuer to a credit class.
ClassKey uint64 `protobuf:"varint,1,opt,name=class_key,json=classKey,proto3" json:"class_key,omitempty"`
// issuer is the approved issuer of the credit class.
Issuer []byte `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"`
}
func (m *ClassIssuer) Reset() { *m = ClassIssuer{} }
func (m *ClassIssuer) String() string { return proto.CompactTextString(m) }
func (*ClassIssuer) ProtoMessage() {}
func (*ClassIssuer) Descriptor() ([]byte, []int) {
return fileDescriptor_6cfdca0a4aaabb36, []int{2}
}
func (m *ClassIssuer) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ClassIssuer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ClassIssuer.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 *ClassIssuer) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClassIssuer.Merge(m, src)
}
func (m *ClassIssuer) XXX_Size() int {
return m.Size()
}
func (m *ClassIssuer) XXX_DiscardUnknown() {
xxx_messageInfo_ClassIssuer.DiscardUnknown(m)
}
var xxx_messageInfo_ClassIssuer proto.InternalMessageInfo
func (m *ClassIssuer) GetClassKey() uint64 {
if m != nil {
return m.ClassKey
}
return 0
}
func (m *ClassIssuer) GetIssuer() []byte {
if m != nil {
return m.Issuer
}
return nil
}
// Project represents the high-level on-chain information for a project.
type Project struct {
// key is the table row identifier of the project used internally for
// efficient lookups. This identifier is auto-incrementing.
Key uint64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"`
// id is the unique identifier of the project either auto-generated from the
// credit class id and project sequence number or provided upon creation.
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
// admin is the admin of the project.
Admin []byte `protobuf:"bytes,3,opt,name=admin,proto3" json:"admin,omitempty"`
// class_key is the table row identifier of the credit class used internally
// for efficient lookups. This links a project to a credit class.
ClassKey uint64 `protobuf:"varint,4,opt,name=class_key,json=classKey,proto3" json:"class_key,omitempty"`
// jurisdiction is the jurisdiction of the project.
// Full documentation can be found in MsgCreateProject.jurisdiction.
Jurisdiction string `protobuf:"bytes,5,opt,name=jurisdiction,proto3" json:"jurisdiction,omitempty"`
// metadata is any arbitrary metadata attached to the project.
Metadata string `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"`
// reference_id is any arbitrary string used to reference the project.
ReferenceId string `protobuf:"bytes,7,opt,name=reference_id,json=referenceId,proto3" json:"reference_id,omitempty"`
}
func (m *Project) Reset() { *m = Project{} }
func (m *Project) String() string { return proto.CompactTextString(m) }
func (*Project) ProtoMessage() {}
func (*Project) Descriptor() ([]byte, []int) {
return fileDescriptor_6cfdca0a4aaabb36, []int{3}
}
func (m *Project) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Project) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Project.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 *Project) XXX_Merge(src proto.Message) {
xxx_messageInfo_Project.Merge(m, src)
}
func (m *Project) XXX_Size() int {
return m.Size()
}
func (m *Project) XXX_DiscardUnknown() {
xxx_messageInfo_Project.DiscardUnknown(m)
}
var xxx_messageInfo_Project proto.InternalMessageInfo
func (m *Project) GetKey() uint64 {
if m != nil {
return m.Key
}
return 0
}
func (m *Project) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Project) GetAdmin() []byte {
if m != nil {
return m.Admin
}
return nil
}
func (m *Project) GetClassKey() uint64 {
if m != nil {
return m.ClassKey
}
return 0
}
func (m *Project) GetJurisdiction() string {
if m != nil {
return m.Jurisdiction
}
return ""
}
func (m *Project) GetMetadata() string {
if m != nil {
return m.Metadata
}
return ""
}
func (m *Project) GetReferenceId() string {
if m != nil {
return m.ReferenceId
}
return ""
}
// Batch represents the high-level on-chain information for a credit batch.
type Batch struct {
// key is the table row identifier of the credit batch used internally for
// efficient lookups. This identifier is auto-incrementing.
Key uint64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"`
// issuer is the address that created the batch and which is
// authorized to mint more credits if open=true.
Issuer []byte `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"`
// project_key is the table row identifier of the credit class used internally
// for efficient lookups. This links a credit batch to a project.
ProjectKey uint64 `protobuf:"varint,3,opt,name=project_key,json=projectKey,proto3" json:"project_key,omitempty"`
// denom is the unique identifier of the credit batch formed from the
// project id, the batch sequence number, and the start and end date of the
// credit batch.
Denom string `protobuf:"bytes,4,opt,name=denom,proto3" json:"denom,omitempty"`
// metadata is any arbitrary metadata attached to the credit batch.
Metadata string `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
// start_date is the beginning of the period during which this credit batch
// was quantified and verified.
StartDate *types.Timestamp `protobuf:"bytes,6,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"`
// end_date is the end of the period during which this credit batch was
// quantified and verified.
EndDate *types.Timestamp `protobuf:"bytes,7,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"`
// issuance_date is the timestamp when the credit batch was issued.
IssuanceDate *types.Timestamp `protobuf:"bytes,8,opt,name=issuance_date,json=issuanceDate,proto3" json:"issuance_date,omitempty"`
// open tells if it's possible to mint new credits in the future.
// Once `open` is set to false, it can't be toggled any more.
Open bool `protobuf:"varint,9,opt,name=open,proto3" json:"open,omitempty"`
}
func (m *Batch) Reset() { *m = Batch{} }
func (m *Batch) String() string { return proto.CompactTextString(m) }
func (*Batch) ProtoMessage() {}
func (*Batch) Descriptor() ([]byte, []int) {
return fileDescriptor_6cfdca0a4aaabb36, []int{4}
}
func (m *Batch) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Batch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Batch.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 *Batch) XXX_Merge(src proto.Message) {
xxx_messageInfo_Batch.Merge(m, src)
}
func (m *Batch) XXX_Size() int {
return m.Size()
}
func (m *Batch) XXX_DiscardUnknown() {
xxx_messageInfo_Batch.DiscardUnknown(m)
}
var xxx_messageInfo_Batch proto.InternalMessageInfo
func (m *Batch) GetKey() uint64 {
if m != nil {
return m.Key
}
return 0
}
func (m *Batch) GetIssuer() []byte {
if m != nil {
return m.Issuer
}
return nil
}
func (m *Batch) GetProjectKey() uint64 {
if m != nil {
return m.ProjectKey
}
return 0
}
func (m *Batch) GetDenom() string {
if m != nil {
return m.Denom
}
return ""
}
func (m *Batch) GetMetadata() string {
if m != nil {
return m.Metadata
}
return ""
}
func (m *Batch) GetStartDate() *types.Timestamp {
if m != nil {
return m.StartDate
}
return nil
}
func (m *Batch) GetEndDate() *types.Timestamp {
if m != nil {
return m.EndDate
}
return nil
}
func (m *Batch) GetIssuanceDate() *types.Timestamp {
if m != nil {
return m.IssuanceDate
}
return nil
}
func (m *Batch) GetOpen() bool {
if m != nil {
return m.Open
}
return false
}
// ClassSequence stores and increments the sequence number for credit classes
// within a credit type.
type ClassSequence struct {
// credit_type_abbrev is the credit type abbreviation. This links a class
// sequence to a credit type.
CreditTypeAbbrev string `protobuf:"bytes,1,opt,name=credit_type_abbrev,json=creditTypeAbbrev,proto3" json:"credit_type_abbrev,omitempty"`
// next_sequence is the next sequence number for a credit class within the
// credit type. The sequence number is used to generate a class id.
NextSequence uint64 `protobuf:"varint,2,opt,name=next_sequence,json=nextSequence,proto3" json:"next_sequence,omitempty"`
}
func (m *ClassSequence) Reset() { *m = ClassSequence{} }
func (m *ClassSequence) String() string { return proto.CompactTextString(m) }
func (*ClassSequence) ProtoMessage() {}
func (*ClassSequence) Descriptor() ([]byte, []int) {
return fileDescriptor_6cfdca0a4aaabb36, []int{5}
}
func (m *ClassSequence) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ClassSequence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ClassSequence.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 *ClassSequence) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClassSequence.Merge(m, src)
}
func (m *ClassSequence) XXX_Size() int {
return m.Size()
}
func (m *ClassSequence) XXX_DiscardUnknown() {
xxx_messageInfo_ClassSequence.DiscardUnknown(m)
}
var xxx_messageInfo_ClassSequence proto.InternalMessageInfo
func (m *ClassSequence) GetCreditTypeAbbrev() string {
if m != nil {
return m.CreditTypeAbbrev
}
return ""
}
func (m *ClassSequence) GetNextSequence() uint64 {
if m != nil {
return m.NextSequence
}
return 0
}
// ProjectSequence stores and increments the sequence number for projects within
// a credit class.
type ProjectSequence struct {
// class_key is the table row identifier of the credit class used internally
// for efficient lookups. This links a project sequence to a credit class.
ClassKey uint64 `protobuf:"varint,1,opt,name=class_key,json=classKey,proto3" json:"class_key,omitempty"`
// next_sequence is the next sequence number for a project within the credit
// class. The sequence number is used to generate a project id.
NextSequence uint64 `protobuf:"varint,2,opt,name=next_sequence,json=nextSequence,proto3" json:"next_sequence,omitempty"`
}
func (m *ProjectSequence) Reset() { *m = ProjectSequence{} }
func (m *ProjectSequence) String() string { return proto.CompactTextString(m) }
func (*ProjectSequence) ProtoMessage() {}
func (*ProjectSequence) Descriptor() ([]byte, []int) {
return fileDescriptor_6cfdca0a4aaabb36, []int{6}
}
func (m *ProjectSequence) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ProjectSequence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ProjectSequence.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 *ProjectSequence) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProjectSequence.Merge(m, src)
}
func (m *ProjectSequence) XXX_Size() int {
return m.Size()
}
func (m *ProjectSequence) XXX_DiscardUnknown() {
xxx_messageInfo_ProjectSequence.DiscardUnknown(m)
}
var xxx_messageInfo_ProjectSequence proto.InternalMessageInfo
func (m *ProjectSequence) GetClassKey() uint64 {
if m != nil {
return m.ClassKey
}
return 0
}
func (m *ProjectSequence) GetNextSequence() uint64 {
if m != nil {
return m.NextSequence
}
return 0
}
// BatchSequence stores and increments the sequence number for credit batches
// within a project.
type BatchSequence struct {
// project_key is the table row identifier of the project used internally for
// efficient lookups. This links a batch sequence to a project.
ProjectKey uint64 `protobuf:"varint,1,opt,name=project_key,json=projectKey,proto3" json:"project_key,omitempty"`
// next_sequence is the next sequence number for a credit batch within the
// project. The sequence number is used to generate a batch denom.
NextSequence uint64 `protobuf:"varint,2,opt,name=next_sequence,json=nextSequence,proto3" json:"next_sequence,omitempty"`
}
func (m *BatchSequence) Reset() { *m = BatchSequence{} }
func (m *BatchSequence) String() string { return proto.CompactTextString(m) }
func (*BatchSequence) ProtoMessage() {}
func (*BatchSequence) Descriptor() ([]byte, []int) {
return fileDescriptor_6cfdca0a4aaabb36, []int{7}
}
func (m *BatchSequence) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *BatchSequence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BatchSequence.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 *BatchSequence) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchSequence.Merge(m, src)
}
func (m *BatchSequence) XXX_Size() int {
return m.Size()
}
func (m *BatchSequence) XXX_DiscardUnknown() {
xxx_messageInfo_BatchSequence.DiscardUnknown(m)
}
var xxx_messageInfo_BatchSequence proto.InternalMessageInfo
func (m *BatchSequence) GetProjectKey() uint64 {
if m != nil {
return m.ProjectKey
}
return 0
}
func (m *BatchSequence) GetNextSequence() uint64 {
if m != nil {
return m.NextSequence
}
return 0
}
// BatchBalance stores each accounts credit balance.
type BatchBalance struct {
// batch_key is the table row identifier of the credit batch used internally
// for efficient lookups. This links a batch balance to a credit batch.
BatchKey uint64 `protobuf:"varint,1,opt,name=batch_key,json=batchKey,proto3" json:"batch_key,omitempty"`
// address is the address of the account that owns the credits.
Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
// tradable_amount is the total number of tradable credits owned by address.
TradableAmount string `protobuf:"bytes,3,opt,name=tradable_amount,json=tradableAmount,proto3" json:"tradable_amount,omitempty"`
// retired_amount is the total number of retired credits owned by address.
RetiredAmount string `protobuf:"bytes,4,opt,name=retired_amount,json=retiredAmount,proto3" json:"retired_amount,omitempty"`
// escrowed_amount is the total number of escrowed credits owned by address
// and held in escrow by the marketplace. Credits are held in escrow when a
// sell order is created and taken out of escrow when the sell order is either
// cancelled, updated with a reduced quantity, or processed.
EscrowedAmount string `protobuf:"bytes,5,opt,name=escrowed_amount,json=escrowedAmount,proto3" json:"escrowed_amount,omitempty"`
}
func (m *BatchBalance) Reset() { *m = BatchBalance{} }
func (m *BatchBalance) String() string { return proto.CompactTextString(m) }
func (*BatchBalance) ProtoMessage() {}
func (*BatchBalance) Descriptor() ([]byte, []int) {
return fileDescriptor_6cfdca0a4aaabb36, []int{8}
}
func (m *BatchBalance) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *BatchBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BatchBalance.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 *BatchBalance) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchBalance.Merge(m, src)
}
func (m *BatchBalance) XXX_Size() int {
return m.Size()
}
func (m *BatchBalance) XXX_DiscardUnknown() {
xxx_messageInfo_BatchBalance.DiscardUnknown(m)
}
var xxx_messageInfo_BatchBalance proto.InternalMessageInfo
func (m *BatchBalance) GetBatchKey() uint64 {
if m != nil {
return m.BatchKey
}
return 0
}
func (m *BatchBalance) GetAddress() []byte {
if m != nil {
return m.Address
}
return nil
}
func (m *BatchBalance) GetTradableAmount() string {
if m != nil {
return m.TradableAmount
}
return ""
}
func (m *BatchBalance) GetRetiredAmount() string {
if m != nil {
return m.RetiredAmount
}
return ""
}
func (m *BatchBalance) GetEscrowedAmount() string {
if m != nil {
return m.EscrowedAmount
}
return ""
}
// BatchSupply stores the supply of credits for a credit batch.
type BatchSupply struct {
// batch_key is the table row identifier of the credit batch used internally
// for efficient lookups. This links a batch supply to a credit batch.
BatchKey uint64 `protobuf:"varint,1,opt,name=batch_key,json=batchKey,proto3" json:"batch_key,omitempty"`
// tradable_amount is the total number of tradable credits in the credit
// batch. Tradable credits may be retired in which case they will be removed
// from tradable_amount and tracked in retired_amount. Tradable credits may
// also be cancelled in which case they will be removed from tradable_amount
// and tracked in cancelled_amount. The sum of the tradable, retired, and
// cancelled amounts will always equal the original credit issuance amount.
TradableAmount string `protobuf:"bytes,2,opt,name=tradable_amount,json=tradableAmount,proto3" json:"tradable_amount,omitempty"`
// retired_amount is the total amount of credits that have been retired in the
// credit batch. The sum of the tradable, retired, and cancelled amounts will
// always equal the original credit issuance amount.
RetiredAmount string `protobuf:"bytes,3,opt,name=retired_amount,json=retiredAmount,proto3" json:"retired_amount,omitempty"`
// cancelled_amount is the number of credits in the batch that have been
// cancelled, effectively undoing the issuance. The sum of the tradable,
// retired, and cancelled amounts will always equal the original credit
// issuance amount.
CancelledAmount string `protobuf:"bytes,4,opt,name=cancelled_amount,json=cancelledAmount,proto3" json:"cancelled_amount,omitempty"`
}
func (m *BatchSupply) Reset() { *m = BatchSupply{} }
func (m *BatchSupply) String() string { return proto.CompactTextString(m) }
func (*BatchSupply) ProtoMessage() {}
func (*BatchSupply) Descriptor() ([]byte, []int) {
return fileDescriptor_6cfdca0a4aaabb36, []int{9}
}
func (m *BatchSupply) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *BatchSupply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BatchSupply.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 *BatchSupply) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchSupply.Merge(m, src)
}
func (m *BatchSupply) XXX_Size() int {
return m.Size()
}
func (m *BatchSupply) XXX_DiscardUnknown() {
xxx_messageInfo_BatchSupply.DiscardUnknown(m)
}
var xxx_messageInfo_BatchSupply proto.InternalMessageInfo
func (m *BatchSupply) GetBatchKey() uint64 {
if m != nil {
return m.BatchKey
}
return 0
}
func (m *BatchSupply) GetTradableAmount() string {
if m != nil {
return m.TradableAmount
}
return ""
}
func (m *BatchSupply) GetRetiredAmount() string {
if m != nil {
return m.RetiredAmount
}
return ""
}
func (m *BatchSupply) GetCancelledAmount() string {
if m != nil {
return m.CancelledAmount
}
return ""
}
// OriginTxIndex indexes the transaction ID and source from the OriginTx
// included in Msg/CreateBatch and Msg/MintBatchCredits to prevent double
// minting errors. The index is scoped to a credit class (it includes the
// class_key) to prevent malicious credit class issuers from blocking any
// bridge operations taking place within another credit class.
type OriginTxIndex struct {
// class_key is the table row identifier of the credit class within which the
// credits were issued or minted. The class_key is included within the index
// to prevent malicious credit class issuers from blocking bridge operations
// taking place within another credit class.
ClassKey uint64 `protobuf:"varint,1,opt,name=class_key,json=classKey,proto3" json:"class_key,omitempty"`
// id is the transaction ID of an originating transaction or operation
// based on a type (i.e. transaction ID, serial number).
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
// source is the source chain or registry of the transaction originating
// the mint process (e.g. polygon, ethereum, verra).
Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
}
func (m *OriginTxIndex) Reset() { *m = OriginTxIndex{} }
func (m *OriginTxIndex) String() string { return proto.CompactTextString(m) }
func (*OriginTxIndex) ProtoMessage() {}
func (*OriginTxIndex) Descriptor() ([]byte, []int) {
return fileDescriptor_6cfdca0a4aaabb36, []int{10}
}
func (m *OriginTxIndex) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *OriginTxIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_OriginTxIndex.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 *OriginTxIndex) XXX_Merge(src proto.Message) {
xxx_messageInfo_OriginTxIndex.Merge(m, src)
}
func (m *OriginTxIndex) XXX_Size() int {
return m.Size()
}
func (m *OriginTxIndex) XXX_DiscardUnknown() {
xxx_messageInfo_OriginTxIndex.DiscardUnknown(m)
}
var xxx_messageInfo_OriginTxIndex proto.InternalMessageInfo
func (m *OriginTxIndex) GetClassKey() uint64 {
if m != nil {
return m.ClassKey
}
return 0
}
func (m *OriginTxIndex) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *OriginTxIndex) GetSource() string {
if m != nil {
return m.Source
}
return ""
}
// BatchContract stores the contract address from which credits were bridged
// when credits are bridged from a contract-based chain, therefore ensuring
// that each credit batch corresponds to a single contract and credits that
// have been bridged will always be bridged back to the original contract.
type BatchContract struct {
// batch_key is the table row identifier of the credit batch used internally
// for efficient lookups. This links an external contract to a credit batch.
BatchKey uint64 `protobuf:"varint,1,opt,name=batch_key,json=batchKey,proto3" json:"batch_key,omitempty"`
// class_key is the table row identifier of the credit class within which the
// credit batch exists. A contract is unique within the scope of a credit
// class to prevent malicious credit class issuers from blocking bridge
// operations taking place within another credit class.
ClassKey uint64 `protobuf:"varint,2,opt,name=class_key,json=classKey,proto3" json:"class_key,omitempty"`
// contract is the address of the contract on the source chain that was
// executed when creating the transaction. This address will be used when
// sending credits back to the source chain.
Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"`
}
func (m *BatchContract) Reset() { *m = BatchContract{} }
func (m *BatchContract) String() string { return proto.CompactTextString(m) }
func (*BatchContract) ProtoMessage() {}
func (*BatchContract) Descriptor() ([]byte, []int) {
return fileDescriptor_6cfdca0a4aaabb36, []int{11}
}
func (m *BatchContract) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *BatchContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BatchContract.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 *BatchContract) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchContract.Merge(m, src)
}
func (m *BatchContract) XXX_Size() int {
return m.Size()
}
func (m *BatchContract) XXX_DiscardUnknown() {
xxx_messageInfo_BatchContract.DiscardUnknown(m)
}
var xxx_messageInfo_BatchContract proto.InternalMessageInfo
func (m *BatchContract) GetBatchKey() uint64 {
if m != nil {
return m.BatchKey
}
return 0
}
func (m *BatchContract) GetClassKey() uint64 {
if m != nil {
return m.ClassKey
}
return 0
}
func (m *BatchContract) GetContract() string {
if m != nil {
return m.Contract
}
return ""
}
// ClassCreatorAllowlist determines if the credit class creator allowlist is
// enabled. When set to true, only the addresses in the AllowedClassCreator
// table may create credit classes. When set to false, any address may create
// credit classes. This table is controlled via governance.
//
// Since Revision 2
type ClassCreatorAllowlist struct {
// enabled is whether or not the allow list is enabled.
Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
}
func (m *ClassCreatorAllowlist) Reset() { *m = ClassCreatorAllowlist{} }
func (m *ClassCreatorAllowlist) String() string { return proto.CompactTextString(m) }
func (*ClassCreatorAllowlist) ProtoMessage() {}
func (*ClassCreatorAllowlist) Descriptor() ([]byte, []int) {
return fileDescriptor_6cfdca0a4aaabb36, []int{12}
}
func (m *ClassCreatorAllowlist) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ClassCreatorAllowlist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ClassCreatorAllowlist.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 *ClassCreatorAllowlist) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClassCreatorAllowlist.Merge(m, src)
}
func (m *ClassCreatorAllowlist) XXX_Size() int {
return m.Size()