-
Notifications
You must be signed in to change notification settings - Fork 46
/
oracle.pb.go
6812 lines (6560 loc) · 165 KB
/
oracle.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: oracle/v1/oracle.proto
package types
import (
bytes "bytes"
fmt "fmt"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
types "github.com/cosmos/cosmos-sdk/types"
_ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/cosmos/gogoproto/proto"
github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types"
_ "google.golang.org/protobuf/types/known/timestamppb"
io "io"
math "math"
math_bits "math/bits"
time "time"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen
// 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
// ResolveStatus encodes the status of an oracle request.
type ResolveStatus int32
const (
// Open - the request is not yet resolved.
RESOLVE_STATUS_OPEN ResolveStatus = 0
// Success - the request has been resolved successfully with no errors.
RESOLVE_STATUS_SUCCESS ResolveStatus = 1
// Failure - an error occured during the request's resolve call.
RESOLVE_STATUS_FAILURE ResolveStatus = 2
// Expired - the request does not get enough reports from validator within the
// timeframe.
RESOLVE_STATUS_EXPIRED ResolveStatus = 3
)
var ResolveStatus_name = map[int32]string{
0: "RESOLVE_STATUS_OPEN_UNSPECIFIED",
1: "RESOLVE_STATUS_SUCCESS",
2: "RESOLVE_STATUS_FAILURE",
3: "RESOLVE_STATUS_EXPIRED",
}
var ResolveStatus_value = map[string]int32{
"RESOLVE_STATUS_OPEN_UNSPECIFIED": 0,
"RESOLVE_STATUS_SUCCESS": 1,
"RESOLVE_STATUS_FAILURE": 2,
"RESOLVE_STATUS_EXPIRED": 3,
}
func (x ResolveStatus) String() string {
return proto.EnumName(ResolveStatus_name, int32(x))
}
func (ResolveStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_652b57db11528d07, []int{0}
}
// DataSource is the data structure for storing data sources in the storage.
type DataSource struct {
// Owner is an address of the account who own the data source
Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
// Name is data source name used for display
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// Description is data source description used for display
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// Filename is string of file name used as reference for locating
// data source file stored in bandchain nodes
Filename string `protobuf:"bytes,4,opt,name=filename,proto3" json:"filename,omitempty"`
// Treasury is the account address who receive data source fee from requester.
Treasury string `protobuf:"bytes,5,opt,name=treasury,proto3" json:"treasury,omitempty"`
// Fee is the data source fee per ask_count that data provider will receive
// from requester.
Fee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,6,rep,name=fee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"fee"`
}
func (m *DataSource) Reset() { *m = DataSource{} }
func (m *DataSource) String() string { return proto.CompactTextString(m) }
func (*DataSource) ProtoMessage() {}
func (*DataSource) Descriptor() ([]byte, []int) {
return fileDescriptor_652b57db11528d07, []int{0}
}
func (m *DataSource) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *DataSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_DataSource.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 *DataSource) XXX_Merge(src proto.Message) {
xxx_messageInfo_DataSource.Merge(m, src)
}
func (m *DataSource) XXX_Size() int {
return m.Size()
}
func (m *DataSource) XXX_DiscardUnknown() {
xxx_messageInfo_DataSource.DiscardUnknown(m)
}
var xxx_messageInfo_DataSource proto.InternalMessageInfo
func (m *DataSource) GetOwner() string {
if m != nil {
return m.Owner
}
return ""
}
func (m *DataSource) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *DataSource) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *DataSource) GetFilename() string {
if m != nil {
return m.Filename
}
return ""
}
func (m *DataSource) GetTreasury() string {
if m != nil {
return m.Treasury
}
return ""
}
func (m *DataSource) GetFee() github_com_cosmos_cosmos_sdk_types.Coins {
if m != nil {
return m.Fee
}
return nil
}
// OracleScript is the data structure for storing oracle scripts in the storage.
type OracleScript struct {
// Owner is an address of the account who own the oracle script
Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
// Name is oracle script name used for display
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// Description is oracle script description used for display
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// Filename is string of file name used as reference for locating
// compiled oracle script WASM file stored in bandchain nodes
Filename string `protobuf:"bytes,4,opt,name=filename,proto3" json:"filename,omitempty"`
// Schema is the schema of the oracle script input/output
// which is formatted in OBI format e.g.
// "{symbol:string,multiplier:u64}/{px:u64}"
Schema string `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty"`
// SourceCodeURL is the URL of oracle script's source code.
// It is recommendded to store source code on IPFS and get its URL to preserve
// decentralization.
SourceCodeURL string `protobuf:"bytes,6,opt,name=source_code_url,json=sourceCodeUrl,proto3" json:"source_code_url,omitempty"`
}
func (m *OracleScript) Reset() { *m = OracleScript{} }
func (m *OracleScript) String() string { return proto.CompactTextString(m) }
func (*OracleScript) ProtoMessage() {}
func (*OracleScript) Descriptor() ([]byte, []int) {
return fileDescriptor_652b57db11528d07, []int{1}
}
func (m *OracleScript) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *OracleScript) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_OracleScript.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 *OracleScript) XXX_Merge(src proto.Message) {
xxx_messageInfo_OracleScript.Merge(m, src)
}
func (m *OracleScript) XXX_Size() int {
return m.Size()
}
func (m *OracleScript) XXX_DiscardUnknown() {
xxx_messageInfo_OracleScript.DiscardUnknown(m)
}
var xxx_messageInfo_OracleScript proto.InternalMessageInfo
func (m *OracleScript) GetOwner() string {
if m != nil {
return m.Owner
}
return ""
}
func (m *OracleScript) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *OracleScript) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *OracleScript) GetFilename() string {
if m != nil {
return m.Filename
}
return ""
}
func (m *OracleScript) GetSchema() string {
if m != nil {
return m.Schema
}
return ""
}
func (m *OracleScript) GetSourceCodeURL() string {
if m != nil {
return m.SourceCodeURL
}
return ""
}
// RawRequest is the data structure for storing raw requests in the storage.
type RawRequest struct {
// ExternalID is an ID of the raw request
ExternalID ExternalID `protobuf:"varint,1,opt,name=external_id,json=externalId,proto3,casttype=ExternalID" json:"external_id,omitempty"`
// DataSourceID is an ID of data source script that relates to the raw request
DataSourceID DataSourceID `protobuf:"varint,2,opt,name=data_source_id,json=dataSourceId,proto3,casttype=DataSourceID" json:"data_source_id,omitempty"`
// Calldata is the data used as argument params for executing data source
// script
Calldata []byte `protobuf:"bytes,3,opt,name=calldata,proto3" json:"calldata,omitempty"`
}
func (m *RawRequest) Reset() { *m = RawRequest{} }
func (m *RawRequest) String() string { return proto.CompactTextString(m) }
func (*RawRequest) ProtoMessage() {}
func (*RawRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_652b57db11528d07, []int{2}
}
func (m *RawRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *RawRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_RawRequest.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 *RawRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_RawRequest.Merge(m, src)
}
func (m *RawRequest) XXX_Size() int {
return m.Size()
}
func (m *RawRequest) XXX_DiscardUnknown() {
xxx_messageInfo_RawRequest.DiscardUnknown(m)
}
var xxx_messageInfo_RawRequest proto.InternalMessageInfo
func (m *RawRequest) GetExternalID() ExternalID {
if m != nil {
return m.ExternalID
}
return 0
}
func (m *RawRequest) GetDataSourceID() DataSourceID {
if m != nil {
return m.DataSourceID
}
return 0
}
func (m *RawRequest) GetCalldata() []byte {
if m != nil {
return m.Calldata
}
return nil
}
// RawRequest is the data structure for storing raw reporter in the storage.
type RawReport struct {
// ExternalID is an ID of the raw request
ExternalID ExternalID `protobuf:"varint,1,opt,name=external_id,json=externalId,proto3,casttype=ExternalID" json:"external_id,omitempty"`
// ExitCode is status code provided by validators to specify error, if any.
// Exit code is usually filled by the exit code returned from execution of
// specified data source script. With code 0 means there is no error.
ExitCode uint32 `protobuf:"varint,2,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
// Data is raw result provided by validators.
// It is usually filled by the result from execution of specified data source
// script.
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}
func (m *RawReport) Reset() { *m = RawReport{} }
func (m *RawReport) String() string { return proto.CompactTextString(m) }
func (*RawReport) ProtoMessage() {}
func (*RawReport) Descriptor() ([]byte, []int) {
return fileDescriptor_652b57db11528d07, []int{3}
}
func (m *RawReport) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *RawReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_RawReport.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 *RawReport) XXX_Merge(src proto.Message) {
xxx_messageInfo_RawReport.Merge(m, src)
}
func (m *RawReport) XXX_Size() int {
return m.Size()
}
func (m *RawReport) XXX_DiscardUnknown() {
xxx_messageInfo_RawReport.DiscardUnknown(m)
}
var xxx_messageInfo_RawReport proto.InternalMessageInfo
func (m *RawReport) GetExternalID() ExternalID {
if m != nil {
return m.ExternalID
}
return 0
}
func (m *RawReport) GetExitCode() uint32 {
if m != nil {
return m.ExitCode
}
return 0
}
func (m *RawReport) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
// Request is the data structure for storing requests in the storage.
type Request struct {
// OracleScriptID is ID of an oracle script
OracleScriptID OracleScriptID `protobuf:"varint,1,opt,name=oracle_script_id,json=oracleScriptId,proto3,casttype=OracleScriptID" json:"oracle_script_id,omitempty"`
// Calldata is the data used as argument params for the oracle script
Calldata []byte `protobuf:"bytes,2,opt,name=calldata,proto3" json:"calldata,omitempty"`
// RequestedValidators is a list of validator addresses that are assigned for
// fulfilling the request
RequestedValidators []string `protobuf:"bytes,3,rep,name=requested_validators,json=requestedValidators,proto3" json:"requested_validators,omitempty"`
// MinCount is minimum number of validators required for fulfilling the
// request
MinCount uint64 `protobuf:"varint,4,opt,name=min_count,json=minCount,proto3" json:"min_count,omitempty"`
// RequestHeight is block height that the request has been created
RequestHeight int64 `protobuf:"varint,5,opt,name=request_height,json=requestHeight,proto3" json:"request_height,omitempty"`
// RequestTime is timestamp of the chain's block which contains the request
RequestTime int64 `protobuf:"varint,6,opt,name=request_time,json=requestTime,proto3" json:"request_time,omitempty"`
// ClientID is arbitrary id provided by requester.
// It is used by client-side for referencing the request
ClientID string `protobuf:"bytes,7,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
// RawRequests is a list of raw requests specified by execution of oracle
// script
RawRequests []RawRequest `protobuf:"bytes,8,rep,name=raw_requests,json=rawRequests,proto3" json:"raw_requests"`
// IBCChannel is an IBC channel info of the other chain, which contains a
// channel and a port to allow bandchain connect to that chain. This field
// allows other chain be able to request data from bandchain via IBC.
IBCChannel *IBCChannel `protobuf:"bytes,9,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"`
// ExecuteGas is amount of gas to reserve for executing
ExecuteGas uint64 `protobuf:"varint,10,opt,name=execute_gas,json=executeGas,proto3" json:"execute_gas,omitempty"`
}
func (m *Request) Reset() { *m = Request{} }
func (m *Request) String() string { return proto.CompactTextString(m) }
func (*Request) ProtoMessage() {}
func (*Request) Descriptor() ([]byte, []int) {
return fileDescriptor_652b57db11528d07, []int{4}
}
func (m *Request) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Request.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 *Request) XXX_Merge(src proto.Message) {
xxx_messageInfo_Request.Merge(m, src)
}
func (m *Request) XXX_Size() int {
return m.Size()
}
func (m *Request) XXX_DiscardUnknown() {
xxx_messageInfo_Request.DiscardUnknown(m)
}
var xxx_messageInfo_Request proto.InternalMessageInfo
func (m *Request) GetOracleScriptID() OracleScriptID {
if m != nil {
return m.OracleScriptID
}
return 0
}
func (m *Request) GetCalldata() []byte {
if m != nil {
return m.Calldata
}
return nil
}
func (m *Request) GetRequestedValidators() []string {
if m != nil {
return m.RequestedValidators
}
return nil
}
func (m *Request) GetMinCount() uint64 {
if m != nil {
return m.MinCount
}
return 0
}
func (m *Request) GetRequestHeight() int64 {
if m != nil {
return m.RequestHeight
}
return 0
}
func (m *Request) GetRequestTime() int64 {
if m != nil {
return m.RequestTime
}
return 0
}
func (m *Request) GetClientID() string {
if m != nil {
return m.ClientID
}
return ""
}
func (m *Request) GetRawRequests() []RawRequest {
if m != nil {
return m.RawRequests
}
return nil
}
func (m *Request) GetIBCChannel() *IBCChannel {
if m != nil {
return m.IBCChannel
}
return nil
}
func (m *Request) GetExecuteGas() uint64 {
if m != nil {
return m.ExecuteGas
}
return 0
}
// Report is the data structure for storing reports in the storage.
type Report struct {
// Validator is a validator address who submit the report
Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"`
// InBeforeResolve indicates whether the report is submitted before the
// request resolved
InBeforeResolve bool `protobuf:"varint,2,opt,name=in_before_resolve,json=inBeforeResolve,proto3" json:"in_before_resolve,omitempty"`
// RawReports is list of raw reports provided by the validator.
// Each raw report has different external ID
RawReports []RawReport `protobuf:"bytes,3,rep,name=raw_reports,json=rawReports,proto3" json:"raw_reports"`
}
func (m *Report) Reset() { *m = Report{} }
func (m *Report) String() string { return proto.CompactTextString(m) }
func (*Report) ProtoMessage() {}
func (*Report) Descriptor() ([]byte, []int) {
return fileDescriptor_652b57db11528d07, []int{5}
}
func (m *Report) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Report) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Report.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 *Report) XXX_Merge(src proto.Message) {
xxx_messageInfo_Report.Merge(m, src)
}
func (m *Report) XXX_Size() int {
return m.Size()
}
func (m *Report) XXX_DiscardUnknown() {
xxx_messageInfo_Report.DiscardUnknown(m)
}
var xxx_messageInfo_Report proto.InternalMessageInfo
func (m *Report) GetValidator() string {
if m != nil {
return m.Validator
}
return ""
}
func (m *Report) GetInBeforeResolve() bool {
if m != nil {
return m.InBeforeResolve
}
return false
}
func (m *Report) GetRawReports() []RawReport {
if m != nil {
return m.RawReports
}
return nil
}
// OracleRequestPacketData encodes an oracle request sent from other blockchains
// to BandChain.
type OracleRequestPacketData struct {
// ClientID is the unique identifier of this oracle request, as specified by
// the client. This same unique ID will be sent back to the requester with the
// oracle response.
ClientID string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
// OracleScriptID is the unique identifier of the oracle script to be
// executed.
OracleScriptID OracleScriptID `protobuf:"varint,2,opt,name=oracle_script_id,json=oracleScriptId,proto3,casttype=OracleScriptID" json:"oracle_script_id,omitempty"`
// Calldata is the OBI-encoded calldata bytes available for oracle executor to
// read.
Calldata []byte `protobuf:"bytes,3,opt,name=calldata,proto3" json:"calldata,omitempty"`
// AskCount is the number of validators that are requested to respond to this
// oracle request. Higher value means more security, at a higher gas cost.
AskCount uint64 `protobuf:"varint,4,opt,name=ask_count,json=askCount,proto3" json:"ask_count,omitempty"`
// MinCount is the minimum number of validators necessary for the request to
// proceed to the execution phase. Higher value means more security, at the
// cost of liveness.
MinCount uint64 `protobuf:"varint,5,opt,name=min_count,json=minCount,proto3" json:"min_count,omitempty"`
// FeeLimit is the maximum tokens that will be paid to all data source
// providers.
FeeLimit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,6,rep,name=fee_limit,json=feeLimit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"fee_limit"`
// PrepareGas is amount of gas to pay to prepare raw requests
PrepareGas uint64 `protobuf:"varint,7,opt,name=prepare_gas,json=prepareGas,proto3" json:"prepare_gas,omitempty"`
// ExecuteGas is amount of gas to reserve for executing
ExecuteGas uint64 `protobuf:"varint,8,opt,name=execute_gas,json=executeGas,proto3" json:"execute_gas,omitempty"`
}
func (m *OracleRequestPacketData) Reset() { *m = OracleRequestPacketData{} }
func (m *OracleRequestPacketData) String() string { return proto.CompactTextString(m) }
func (*OracleRequestPacketData) ProtoMessage() {}
func (*OracleRequestPacketData) Descriptor() ([]byte, []int) {
return fileDescriptor_652b57db11528d07, []int{6}
}
func (m *OracleRequestPacketData) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *OracleRequestPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_OracleRequestPacketData.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 *OracleRequestPacketData) XXX_Merge(src proto.Message) {
xxx_messageInfo_OracleRequestPacketData.Merge(m, src)
}
func (m *OracleRequestPacketData) XXX_Size() int {
return m.Size()
}
func (m *OracleRequestPacketData) XXX_DiscardUnknown() {
xxx_messageInfo_OracleRequestPacketData.DiscardUnknown(m)
}
var xxx_messageInfo_OracleRequestPacketData proto.InternalMessageInfo
func (m *OracleRequestPacketData) GetClientID() string {
if m != nil {
return m.ClientID
}
return ""
}
func (m *OracleRequestPacketData) GetOracleScriptID() OracleScriptID {
if m != nil {
return m.OracleScriptID
}
return 0
}
func (m *OracleRequestPacketData) GetCalldata() []byte {
if m != nil {
return m.Calldata
}
return nil
}
func (m *OracleRequestPacketData) GetAskCount() uint64 {
if m != nil {
return m.AskCount
}
return 0
}
func (m *OracleRequestPacketData) GetMinCount() uint64 {
if m != nil {
return m.MinCount
}
return 0
}
func (m *OracleRequestPacketData) GetFeeLimit() github_com_cosmos_cosmos_sdk_types.Coins {
if m != nil {
return m.FeeLimit
}
return nil
}
func (m *OracleRequestPacketData) GetPrepareGas() uint64 {
if m != nil {
return m.PrepareGas
}
return 0
}
func (m *OracleRequestPacketData) GetExecuteGas() uint64 {
if m != nil {
return m.ExecuteGas
}
return 0
}
// OracleRequestPacketAcknowledgement encodes an oracle request acknowledgement
// send back to requester chain.
type OracleRequestPacketAcknowledgement struct {
// RequestID is BandChain's unique identifier for this oracle request.
RequestID RequestID `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3,casttype=RequestID" json:"request_id,omitempty"`
}
func (m *OracleRequestPacketAcknowledgement) Reset() { *m = OracleRequestPacketAcknowledgement{} }
func (m *OracleRequestPacketAcknowledgement) String() string { return proto.CompactTextString(m) }
func (*OracleRequestPacketAcknowledgement) ProtoMessage() {}
func (*OracleRequestPacketAcknowledgement) Descriptor() ([]byte, []int) {
return fileDescriptor_652b57db11528d07, []int{7}
}
func (m *OracleRequestPacketAcknowledgement) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *OracleRequestPacketAcknowledgement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_OracleRequestPacketAcknowledgement.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 *OracleRequestPacketAcknowledgement) XXX_Merge(src proto.Message) {
xxx_messageInfo_OracleRequestPacketAcknowledgement.Merge(m, src)
}
func (m *OracleRequestPacketAcknowledgement) XXX_Size() int {
return m.Size()
}
func (m *OracleRequestPacketAcknowledgement) XXX_DiscardUnknown() {
xxx_messageInfo_OracleRequestPacketAcknowledgement.DiscardUnknown(m)
}
var xxx_messageInfo_OracleRequestPacketAcknowledgement proto.InternalMessageInfo
func (m *OracleRequestPacketAcknowledgement) GetRequestID() RequestID {
if m != nil {
return m.RequestID
}
return 0
}
// OracleResponsePacketData encodes an oracle response from BandChain to the
// requester.
type OracleResponsePacketData struct {
// ClientID is the unique identifier matched with that of the oracle request
// packet.
ClientID string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
// RequestID is BandChain's unique identifier for this oracle request.
RequestID RequestID `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3,casttype=RequestID" json:"request_id,omitempty"`
// AnsCount is the number of validators among to the asked validators that
// actually responded to this oracle request prior to this oracle request
// being resolved.
AnsCount uint64 `protobuf:"varint,3,opt,name=ans_count,json=ansCount,proto3" json:"ans_count,omitempty"`
// RequestTime is the UNIX epoch time at which the request was sent to
// BandChain.
RequestTime int64 `protobuf:"varint,4,opt,name=request_time,json=requestTime,proto3" json:"request_time,omitempty"`
// ResolveTime is the UNIX epoch time at which the request was resolved to the
// final result.
ResolveTime int64 `protobuf:"varint,5,opt,name=resolve_time,json=resolveTime,proto3" json:"resolve_time,omitempty"`
// ResolveStatus is the status of this oracle request, which can be OK,
// FAILURE, or EXPIRED.
ResolveStatus ResolveStatus `protobuf:"varint,6,opt,name=resolve_status,json=resolveStatus,proto3,enum=oracle.v1.ResolveStatus" json:"resolve_status,omitempty"`
// Result is the final aggregated value encoded in OBI format. Only available
// if status if OK.
Result []byte `protobuf:"bytes,7,opt,name=result,proto3" json:"result,omitempty"`
}
func (m *OracleResponsePacketData) Reset() { *m = OracleResponsePacketData{} }
func (m *OracleResponsePacketData) String() string { return proto.CompactTextString(m) }
func (*OracleResponsePacketData) ProtoMessage() {}
func (*OracleResponsePacketData) Descriptor() ([]byte, []int) {
return fileDescriptor_652b57db11528d07, []int{8}
}
func (m *OracleResponsePacketData) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *OracleResponsePacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_OracleResponsePacketData.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 *OracleResponsePacketData) XXX_Merge(src proto.Message) {
xxx_messageInfo_OracleResponsePacketData.Merge(m, src)
}
func (m *OracleResponsePacketData) XXX_Size() int {
return m.Size()
}
func (m *OracleResponsePacketData) XXX_DiscardUnknown() {
xxx_messageInfo_OracleResponsePacketData.DiscardUnknown(m)
}
var xxx_messageInfo_OracleResponsePacketData proto.InternalMessageInfo
func (m *OracleResponsePacketData) GetClientID() string {
if m != nil {
return m.ClientID
}
return ""
}
func (m *OracleResponsePacketData) GetRequestID() RequestID {
if m != nil {
return m.RequestID
}
return 0
}
func (m *OracleResponsePacketData) GetAnsCount() uint64 {
if m != nil {
return m.AnsCount
}
return 0
}
func (m *OracleResponsePacketData) GetRequestTime() int64 {
if m != nil {
return m.RequestTime
}
return 0
}
func (m *OracleResponsePacketData) GetResolveTime() int64 {
if m != nil {
return m.ResolveTime
}
return 0
}
func (m *OracleResponsePacketData) GetResolveStatus() ResolveStatus {
if m != nil {
return m.ResolveStatus
}
return RESOLVE_STATUS_OPEN
}
func (m *OracleResponsePacketData) GetResult() []byte {
if m != nil {
return m.Result
}
return nil
}
// Result encodes a result of request and store in chain
type Result struct {
// ClientID is the unique identifier of this oracle request, as specified by
// the client. This same unique ID will be sent back to the requester with the
// oracle response.
ClientID string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
// OracleScriptID is the unique identifier of the oracle script to be
// executed.
OracleScriptID OracleScriptID `protobuf:"varint,2,opt,name=oracle_script_id,json=oracleScriptId,proto3,casttype=OracleScriptID" json:"oracle_script_id,omitempty"`
// Calldata is the calldata bytes available for oracle executor to read.
Calldata []byte `protobuf:"bytes,3,opt,name=calldata,proto3" json:"calldata,omitempty"`
// AskCount is the number of validators that are requested to respond to this
// oracle request. Higher value means more security, at a higher gas cost.
AskCount uint64 `protobuf:"varint,4,opt,name=ask_count,json=askCount,proto3" json:"ask_count,omitempty"`
// MinCount is the minimum number of validators necessary for the request to
// proceed to the execution phase. Higher value means more security, at the
// cost of liveness.
MinCount uint64 `protobuf:"varint,5,opt,name=min_count,json=minCount,proto3" json:"min_count,omitempty"`
// RequestID is BandChain's unique identifier for this oracle request.
RequestID RequestID `protobuf:"varint,6,opt,name=request_id,json=requestId,proto3,casttype=RequestID" json:"request_id,omitempty"`
// AnsCount is the number of validators among to the asked validators that
// actually responded to this oracle request prior to this oracle request
// being resolved.
AnsCount uint64 `protobuf:"varint,7,opt,name=ans_count,json=ansCount,proto3" json:"ans_count,omitempty"`
// RequestTime is the UNIX epoch time at which the request was sent to
// BandChain.
RequestTime int64 `protobuf:"varint,8,opt,name=request_time,json=requestTime,proto3" json:"request_time,omitempty"`
// ResolveTime is the UNIX epoch time at which the request was resolved to the
// final result.
ResolveTime int64 `protobuf:"varint,9,opt,name=resolve_time,json=resolveTime,proto3" json:"resolve_time,omitempty"`
// ResolveStatus is the status of this oracle request, which can be OK,
// FAILURE, or EXPIRED.
ResolveStatus ResolveStatus `protobuf:"varint,10,opt,name=resolve_status,json=resolveStatus,proto3,enum=oracle.v1.ResolveStatus" json:"resolve_status,omitempty"`
// Result is the final aggregated value only available if status if OK.
Result []byte `protobuf:"bytes,11,opt,name=result,proto3" json:"result,omitempty"`
}
func (m *Result) Reset() { *m = Result{} }
func (m *Result) String() string { return proto.CompactTextString(m) }
func (*Result) ProtoMessage() {}
func (*Result) Descriptor() ([]byte, []int) {
return fileDescriptor_652b57db11528d07, []int{9}
}
func (m *Result) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Result.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 *Result) XXX_Merge(src proto.Message) {
xxx_messageInfo_Result.Merge(m, src)
}
func (m *Result) XXX_Size() int {
return m.Size()
}
func (m *Result) XXX_DiscardUnknown() {
xxx_messageInfo_Result.DiscardUnknown(m)
}
var xxx_messageInfo_Result proto.InternalMessageInfo
func (m *Result) GetClientID() string {
if m != nil {
return m.ClientID
}
return ""
}
func (m *Result) GetOracleScriptID() OracleScriptID {
if m != nil {
return m.OracleScriptID
}
return 0
}
func (m *Result) GetCalldata() []byte {
if m != nil {
return m.Calldata
}
return nil
}
func (m *Result) GetAskCount() uint64 {
if m != nil {
return m.AskCount
}
return 0
}
func (m *Result) GetMinCount() uint64 {
if m != nil {
return m.MinCount
}
return 0
}
func (m *Result) GetRequestID() RequestID {
if m != nil {
return m.RequestID
}
return 0
}
func (m *Result) GetAnsCount() uint64 {
if m != nil {
return m.AnsCount
}
return 0
}
func (m *Result) GetRequestTime() int64 {
if m != nil {
return m.RequestTime
}
return 0
}
func (m *Result) GetResolveTime() int64 {
if m != nil {
return m.ResolveTime
}
return 0
}
func (m *Result) GetResolveStatus() ResolveStatus {
if m != nil {
return m.ResolveStatus
}