-
Notifications
You must be signed in to change notification settings - Fork 2
/
AgentPolice.go
1779 lines (1481 loc) · 91.4 KB
/
AgentPolice.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 - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package abigen
import (
"errors"
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = errors.New
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
_ = abi.ConvertType
)
// SignedCredential is an auto generated low-level Go binding around an user-defined struct.
type SignedCredential_duplicate struct {
Vc VerifiableCredential
V uint8
R [32]byte
S [32]byte
}
// VerifiableCredential is an auto generated low-level Go binding around an user-defined struct.
type VerifiableCredential_AgentPolice struct {
Issuer common.Address
Subject *big.Int
EpochIssued *big.Int
EpochValidUntil *big.Int
Value *big.Int
Action [4]byte
Target uint64
Claim []byte
}
// AgentPoliceMetaData contains all meta data concerning the AgentPolice contract.
var AgentPoliceMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_version\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_defaultWindow\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_router\",\"type\":\"address\"},{\"internalType\":\"contractIPoolRegistry\",\"name\":\"_poolRegistry\",\"type\":\"address\"},{\"internalType\":\"contractIWFIL\",\"name\":\"_wFIL\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AgentStateRejected\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCredential\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPoolID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"agent\",\"type\":\"address\"}],\"name\":\"Defaulted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"agentID\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"faultEpoch\",\"type\":\"uint256\"}],\"name\":\"FaultySectors\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"agent\",\"type\":\"address\"}],\"name\":\"OnAdministration\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_VERIFIABLE_CREDENTIAL_TYPE_HASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subject\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochIssued\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochValidUntil\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"action\",\"type\":\"bytes4\"},{\"internalType\":\"uint64\",\"name\":\"target\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"claim\",\"type\":\"bytes\"}],\"internalType\":\"structVerifiableCredential\",\"name\":\"vc\",\"type\":\"tuple\"}],\"name\":\"agentApproved\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"agentID\",\"type\":\"uint256\"}],\"name\":\"agentLiquidated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subject\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochIssued\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochValidUntil\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"action\",\"type\":\"bytes4\"},{\"internalType\":\"uint64\",\"name\":\"target\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"claim\",\"type\":\"bytes\"}],\"internalType\":\"structVerifiableCredential\",\"name\":\"vc\",\"type\":\"tuple\"}],\"name\":\"confirmRmAdministration\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subject\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochIssued\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochValidUntil\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"action\",\"type\":\"bytes4\"},{\"internalType\":\"uint64\",\"name\":\"target\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"claim\",\"type\":\"bytes\"}],\"internalType\":\"structVerifiableCredential\",\"name\":\"vc\",\"type\":\"tuple\"}],\"name\":\"confirmRmEquity\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"credentialUsed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defaultWindow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subject\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochIssued\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochValidUntil\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"action\",\"type\":\"bytes4\"},{\"internalType\":\"uint64\",\"name\":\"target\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"claim\",\"type\":\"bytes\"}],\"internalType\":\"structVerifiableCredential\",\"name\":\"vc\",\"type\":\"tuple\"}],\"name\":\"deriveStructHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subject\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochIssued\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochValidUntil\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"action\",\"type\":\"bytes4\"},{\"internalType\":\"uint64\",\"name\":\"target\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"claim\",\"type\":\"bytes\"}],\"internalType\":\"structVerifiableCredential\",\"name\":\"vc\",\"type\":\"tuple\"}],\"name\":\"digest\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"agent\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"distributeLiquidatedFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"agent\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"action\",\"type\":\"bytes4\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subject\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochIssued\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochValidUntil\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"action\",\"type\":\"bytes4\"},{\"internalType\":\"uint64\",\"name\":\"target\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"claim\",\"type\":\"bytes\"}],\"internalType\":\"structVerifiableCredential\",\"name\":\"vc\",\"type\":\"tuple\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structSignedCredential\",\"name\":\"sc\",\"type\":\"tuple\"}],\"name\":\"isValidCredential\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIAgent[]\",\"name\":\"agents\",\"type\":\"address[]\"}],\"name\":\"markAsFaulty\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxConsecutiveFaultEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDTE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxEpochsOwedTolerance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxLTV\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxPoolsPerAgent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"operator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"agent\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"miner\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"liquidator\",\"type\":\"uint64\"}],\"name\":\"prepareMinerForLiquidation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"agent\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"administration\",\"type\":\"address\"}],\"name\":\"putAgentOnAdministration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"agent\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"administration\",\"type\":\"address\"}],\"name\":\"putAgentOnAdministrationDueToFaultySectorDays\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subject\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochIssued\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochValidUntil\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"action\",\"type\":\"bytes4\"},{\"internalType\":\"uint64\",\"name\":\"target\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"claim\",\"type\":\"bytes\"}],\"internalType\":\"structVerifiableCredential\",\"name\":\"vc\",\"type\":\"tuple\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structSignedCredential\",\"name\":\"sc\",\"type\":\"tuple\"}],\"name\":\"recover\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"refreshRoutes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subject\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochIssued\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochValidUntil\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"action\",\"type\":\"bytes4\"},{\"internalType\":\"uint64\",\"name\":\"target\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"claim\",\"type\":\"bytes\"}],\"internalType\":\"structVerifiableCredential\",\"name\":\"vc\",\"type\":\"tuple\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structSignedCredential\",\"name\":\"sc\",\"type\":\"tuple\"}],\"name\":\"registerCredentialUseBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resume\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sectorFaultyTolerancePercent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"agent\",\"type\":\"address\"}],\"name\":\"setAgentDefaultDueToFaultySectorDays\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"agent\",\"type\":\"address\"}],\"name\":\"setAgentDefaulted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_defaultWindow\",\"type\":\"uint256\"}],\"name\":\"setDefaultWindow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxConsecutiveFaultEpochs\",\"type\":\"uint256\"}],\"name\":\"setMaxConsecutiveFaultEpochs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDTE\",\"type\":\"uint256\"}],\"name\":\"setMaxDTE\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxEpochsOwedTolerance\",\"type\":\"uint256\"}],\"name\":\"setMaxEpochsOwedTolerance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxLTV\",\"type\":\"uint256\"}],\"name\":\"setMaxLTV\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxPoolsPerAgent\",\"type\":\"uint256\"}],\"name\":\"setMaxPoolsPerAgent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sectorFaultyTolerancePercent\",\"type\":\"uint256\"}],\"name\":\"setSectorFaultyTolerancePercent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOperator\",\"type\":\"address\"}],\"name\":\"transferOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"agent\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subject\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochIssued\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epochValidUntil\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"action\",\"type\":\"bytes4\"},{\"internalType\":\"uint64\",\"name\":\"target\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"claim\",\"type\":\"bytes\"}],\"internalType\":\"structVerifiableCredential\",\"name\":\"vc\",\"type\":\"tuple\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structSignedCredential\",\"name\":\"sc\",\"type\":\"tuple\"}],\"name\":\"validateCred\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}]",
}
// AgentPoliceABI is the input ABI used to generate the binding from.
// Deprecated: Use AgentPoliceMetaData.ABI instead.
var AgentPoliceABI = AgentPoliceMetaData.ABI
// AgentPolice is an auto generated Go binding around an Ethereum contract.
type AgentPolice struct {
AgentPoliceCaller // Read-only binding to the contract
AgentPoliceTransactor // Write-only binding to the contract
AgentPoliceFilterer // Log filterer for contract events
}
// AgentPoliceCaller is an auto generated read-only Go binding around an Ethereum contract.
type AgentPoliceCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// AgentPoliceTransactor is an auto generated write-only Go binding around an Ethereum contract.
type AgentPoliceTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// AgentPoliceFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type AgentPoliceFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// AgentPoliceSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type AgentPoliceSession struct {
Contract *AgentPolice // Generic contract binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// AgentPoliceCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type AgentPoliceCallerSession struct {
Contract *AgentPoliceCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// AgentPoliceTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type AgentPoliceTransactorSession struct {
Contract *AgentPoliceTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// AgentPoliceRaw is an auto generated low-level Go binding around an Ethereum contract.
type AgentPoliceRaw struct {
Contract *AgentPolice // Generic contract binding to access the raw methods on
}
// AgentPoliceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type AgentPoliceCallerRaw struct {
Contract *AgentPoliceCaller // Generic read-only contract binding to access the raw methods on
}
// AgentPoliceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type AgentPoliceTransactorRaw struct {
Contract *AgentPoliceTransactor // Generic write-only contract binding to access the raw methods on
}
// NewAgentPolice creates a new instance of AgentPolice, bound to a specific deployed contract.
func NewAgentPolice(address common.Address, backend bind.ContractBackend) (*AgentPolice, error) {
contract, err := bindAgentPolice(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &AgentPolice{AgentPoliceCaller: AgentPoliceCaller{contract: contract}, AgentPoliceTransactor: AgentPoliceTransactor{contract: contract}, AgentPoliceFilterer: AgentPoliceFilterer{contract: contract}}, nil
}
// NewAgentPoliceCaller creates a new read-only instance of AgentPolice, bound to a specific deployed contract.
func NewAgentPoliceCaller(address common.Address, caller bind.ContractCaller) (*AgentPoliceCaller, error) {
contract, err := bindAgentPolice(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &AgentPoliceCaller{contract: contract}, nil
}
// NewAgentPoliceTransactor creates a new write-only instance of AgentPolice, bound to a specific deployed contract.
func NewAgentPoliceTransactor(address common.Address, transactor bind.ContractTransactor) (*AgentPoliceTransactor, error) {
contract, err := bindAgentPolice(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &AgentPoliceTransactor{contract: contract}, nil
}
// NewAgentPoliceFilterer creates a new log filterer instance of AgentPolice, bound to a specific deployed contract.
func NewAgentPoliceFilterer(address common.Address, filterer bind.ContractFilterer) (*AgentPoliceFilterer, error) {
contract, err := bindAgentPolice(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &AgentPoliceFilterer{contract: contract}, nil
}
// bindAgentPolice binds a generic wrapper to an already deployed contract.
func bindAgentPolice(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := AgentPoliceMetaData.GetAbi()
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_AgentPolice *AgentPoliceRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _AgentPolice.Contract.AgentPoliceCaller.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_AgentPolice *AgentPoliceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _AgentPolice.Contract.AgentPoliceTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_AgentPolice *AgentPoliceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _AgentPolice.Contract.AgentPoliceTransactor.contract.Transact(opts, method, params...)
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_AgentPolice *AgentPoliceCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _AgentPolice.Contract.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_AgentPolice *AgentPoliceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _AgentPolice.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_AgentPolice *AgentPoliceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _AgentPolice.Contract.contract.Transact(opts, method, params...)
}
// VERIFIABLECREDENTIALTYPEHASH is a free data retrieval call binding the contract method 0x2b85012b.
//
// Solidity: function _VERIFIABLE_CREDENTIAL_TYPE_HASH() view returns(bytes32)
func (_AgentPolice *AgentPoliceCaller) VERIFIABLECREDENTIALTYPEHASH(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "_VERIFIABLE_CREDENTIAL_TYPE_HASH")
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
// VERIFIABLECREDENTIALTYPEHASH is a free data retrieval call binding the contract method 0x2b85012b.
//
// Solidity: function _VERIFIABLE_CREDENTIAL_TYPE_HASH() view returns(bytes32)
func (_AgentPolice *AgentPoliceSession) VERIFIABLECREDENTIALTYPEHASH() ([32]byte, error) {
return _AgentPolice.Contract.VERIFIABLECREDENTIALTYPEHASH(&_AgentPolice.CallOpts)
}
// VERIFIABLECREDENTIALTYPEHASH is a free data retrieval call binding the contract method 0x2b85012b.
//
// Solidity: function _VERIFIABLE_CREDENTIAL_TYPE_HASH() view returns(bytes32)
func (_AgentPolice *AgentPoliceCallerSession) VERIFIABLECREDENTIALTYPEHASH() ([32]byte, error) {
return _AgentPolice.Contract.VERIFIABLECREDENTIALTYPEHASH(&_AgentPolice.CallOpts)
}
// AgentApproved is a free data retrieval call binding the contract method 0x260e63c6.
//
// Solidity: function agentApproved((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) view returns()
func (_AgentPolice *AgentPoliceCaller) AgentApproved(opts *bind.CallOpts, vc VerifiableCredential) error {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "agentApproved", vc)
if err != nil {
return err
}
return err
}
// AgentApproved is a free data retrieval call binding the contract method 0x260e63c6.
//
// Solidity: function agentApproved((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) view returns()
func (_AgentPolice *AgentPoliceSession) AgentApproved(vc VerifiableCredential) error {
return _AgentPolice.Contract.AgentApproved(&_AgentPolice.CallOpts, vc)
}
// AgentApproved is a free data retrieval call binding the contract method 0x260e63c6.
//
// Solidity: function agentApproved((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) view returns()
func (_AgentPolice *AgentPoliceCallerSession) AgentApproved(vc VerifiableCredential) error {
return _AgentPolice.Contract.AgentApproved(&_AgentPolice.CallOpts, vc)
}
// AgentLiquidated is a free data retrieval call binding the contract method 0x51692149.
//
// Solidity: function agentLiquidated(uint256 agentID) view returns(bool)
func (_AgentPolice *AgentPoliceCaller) AgentLiquidated(opts *bind.CallOpts, agentID *big.Int) (bool, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "agentLiquidated", agentID)
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// AgentLiquidated is a free data retrieval call binding the contract method 0x51692149.
//
// Solidity: function agentLiquidated(uint256 agentID) view returns(bool)
func (_AgentPolice *AgentPoliceSession) AgentLiquidated(agentID *big.Int) (bool, error) {
return _AgentPolice.Contract.AgentLiquidated(&_AgentPolice.CallOpts, agentID)
}
// AgentLiquidated is a free data retrieval call binding the contract method 0x51692149.
//
// Solidity: function agentLiquidated(uint256 agentID) view returns(bool)
func (_AgentPolice *AgentPoliceCallerSession) AgentLiquidated(agentID *big.Int) (bool, error) {
return _AgentPolice.Contract.AgentLiquidated(&_AgentPolice.CallOpts, agentID)
}
// ConfirmRmAdministration is a free data retrieval call binding the contract method 0x5cf6862f.
//
// Solidity: function confirmRmAdministration((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) view returns()
func (_AgentPolice *AgentPoliceCaller) ConfirmRmAdministration(opts *bind.CallOpts, vc VerifiableCredential) error {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "confirmRmAdministration", vc)
if err != nil {
return err
}
return err
}
// ConfirmRmAdministration is a free data retrieval call binding the contract method 0x5cf6862f.
//
// Solidity: function confirmRmAdministration((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) view returns()
func (_AgentPolice *AgentPoliceSession) ConfirmRmAdministration(vc VerifiableCredential) error {
return _AgentPolice.Contract.ConfirmRmAdministration(&_AgentPolice.CallOpts, vc)
}
// ConfirmRmAdministration is a free data retrieval call binding the contract method 0x5cf6862f.
//
// Solidity: function confirmRmAdministration((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) view returns()
func (_AgentPolice *AgentPoliceCallerSession) ConfirmRmAdministration(vc VerifiableCredential) error {
return _AgentPolice.Contract.ConfirmRmAdministration(&_AgentPolice.CallOpts, vc)
}
// ConfirmRmEquity is a free data retrieval call binding the contract method 0x5654657a.
//
// Solidity: function confirmRmEquity((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) view returns()
func (_AgentPolice *AgentPoliceCaller) ConfirmRmEquity(opts *bind.CallOpts, vc VerifiableCredential) error {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "confirmRmEquity", vc)
if err != nil {
return err
}
return err
}
// ConfirmRmEquity is a free data retrieval call binding the contract method 0x5654657a.
//
// Solidity: function confirmRmEquity((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) view returns()
func (_AgentPolice *AgentPoliceSession) ConfirmRmEquity(vc VerifiableCredential) error {
return _AgentPolice.Contract.ConfirmRmEquity(&_AgentPolice.CallOpts, vc)
}
// ConfirmRmEquity is a free data retrieval call binding the contract method 0x5654657a.
//
// Solidity: function confirmRmEquity((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) view returns()
func (_AgentPolice *AgentPoliceCallerSession) ConfirmRmEquity(vc VerifiableCredential) error {
return _AgentPolice.Contract.ConfirmRmEquity(&_AgentPolice.CallOpts, vc)
}
// CredentialUsed is a free data retrieval call binding the contract method 0xf37c8b85.
//
// Solidity: function credentialUsed(uint8 v, bytes32 r, bytes32 s) view returns(bool)
func (_AgentPolice *AgentPoliceCaller) CredentialUsed(opts *bind.CallOpts, v uint8, r [32]byte, s [32]byte) (bool, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "credentialUsed", v, r, s)
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// CredentialUsed is a free data retrieval call binding the contract method 0xf37c8b85.
//
// Solidity: function credentialUsed(uint8 v, bytes32 r, bytes32 s) view returns(bool)
func (_AgentPolice *AgentPoliceSession) CredentialUsed(v uint8, r [32]byte, s [32]byte) (bool, error) {
return _AgentPolice.Contract.CredentialUsed(&_AgentPolice.CallOpts, v, r, s)
}
// CredentialUsed is a free data retrieval call binding the contract method 0xf37c8b85.
//
// Solidity: function credentialUsed(uint8 v, bytes32 r, bytes32 s) view returns(bool)
func (_AgentPolice *AgentPoliceCallerSession) CredentialUsed(v uint8, r [32]byte, s [32]byte) (bool, error) {
return _AgentPolice.Contract.CredentialUsed(&_AgentPolice.CallOpts, v, r, s)
}
// DefaultWindow is a free data retrieval call binding the contract method 0x78ee44fd.
//
// Solidity: function defaultWindow() view returns(uint256)
func (_AgentPolice *AgentPoliceCaller) DefaultWindow(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "defaultWindow")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// DefaultWindow is a free data retrieval call binding the contract method 0x78ee44fd.
//
// Solidity: function defaultWindow() view returns(uint256)
func (_AgentPolice *AgentPoliceSession) DefaultWindow() (*big.Int, error) {
return _AgentPolice.Contract.DefaultWindow(&_AgentPolice.CallOpts)
}
// DefaultWindow is a free data retrieval call binding the contract method 0x78ee44fd.
//
// Solidity: function defaultWindow() view returns(uint256)
func (_AgentPolice *AgentPoliceCallerSession) DefaultWindow() (*big.Int, error) {
return _AgentPolice.Contract.DefaultWindow(&_AgentPolice.CallOpts)
}
// DeriveStructHash is a free data retrieval call binding the contract method 0x40444c7c.
//
// Solidity: function deriveStructHash((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) pure returns(bytes32)
func (_AgentPolice *AgentPoliceCaller) DeriveStructHash(opts *bind.CallOpts, vc VerifiableCredential) ([32]byte, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "deriveStructHash", vc)
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
// DeriveStructHash is a free data retrieval call binding the contract method 0x40444c7c.
//
// Solidity: function deriveStructHash((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) pure returns(bytes32)
func (_AgentPolice *AgentPoliceSession) DeriveStructHash(vc VerifiableCredential) ([32]byte, error) {
return _AgentPolice.Contract.DeriveStructHash(&_AgentPolice.CallOpts, vc)
}
// DeriveStructHash is a free data retrieval call binding the contract method 0x40444c7c.
//
// Solidity: function deriveStructHash((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) pure returns(bytes32)
func (_AgentPolice *AgentPoliceCallerSession) DeriveStructHash(vc VerifiableCredential) ([32]byte, error) {
return _AgentPolice.Contract.DeriveStructHash(&_AgentPolice.CallOpts, vc)
}
// Digest is a free data retrieval call binding the contract method 0xa2f3c210.
//
// Solidity: function digest((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) view returns(bytes32)
func (_AgentPolice *AgentPoliceCaller) Digest(opts *bind.CallOpts, vc VerifiableCredential) ([32]byte, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "digest", vc)
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
// Digest is a free data retrieval call binding the contract method 0xa2f3c210.
//
// Solidity: function digest((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) view returns(bytes32)
func (_AgentPolice *AgentPoliceSession) Digest(vc VerifiableCredential) ([32]byte, error) {
return _AgentPolice.Contract.Digest(&_AgentPolice.CallOpts, vc)
}
// Digest is a free data retrieval call binding the contract method 0xa2f3c210.
//
// Solidity: function digest((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes) vc) view returns(bytes32)
func (_AgentPolice *AgentPoliceCallerSession) Digest(vc VerifiableCredential) ([32]byte, error) {
return _AgentPolice.Contract.Digest(&_AgentPolice.CallOpts, vc)
}
// IsValidCredential is a free data retrieval call binding the contract method 0x76048dc4.
//
// Solidity: function isValidCredential(uint256 agent, bytes4 action, ((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes),uint8,bytes32,bytes32) sc) view returns()
func (_AgentPolice *AgentPoliceCaller) IsValidCredential(opts *bind.CallOpts, agent *big.Int, action [4]byte, sc SignedCredential) error {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "isValidCredential", agent, action, sc)
if err != nil {
return err
}
return err
}
// IsValidCredential is a free data retrieval call binding the contract method 0x76048dc4.
//
// Solidity: function isValidCredential(uint256 agent, bytes4 action, ((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes),uint8,bytes32,bytes32) sc) view returns()
func (_AgentPolice *AgentPoliceSession) IsValidCredential(agent *big.Int, action [4]byte, sc SignedCredential) error {
return _AgentPolice.Contract.IsValidCredential(&_AgentPolice.CallOpts, agent, action, sc)
}
// IsValidCredential is a free data retrieval call binding the contract method 0x76048dc4.
//
// Solidity: function isValidCredential(uint256 agent, bytes4 action, ((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes),uint8,bytes32,bytes32) sc) view returns()
func (_AgentPolice *AgentPoliceCallerSession) IsValidCredential(agent *big.Int, action [4]byte, sc SignedCredential) error {
return _AgentPolice.Contract.IsValidCredential(&_AgentPolice.CallOpts, agent, action, sc)
}
// MaxConsecutiveFaultEpochs is a free data retrieval call binding the contract method 0x395bbfe9.
//
// Solidity: function maxConsecutiveFaultEpochs() view returns(uint256)
func (_AgentPolice *AgentPoliceCaller) MaxConsecutiveFaultEpochs(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "maxConsecutiveFaultEpochs")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// MaxConsecutiveFaultEpochs is a free data retrieval call binding the contract method 0x395bbfe9.
//
// Solidity: function maxConsecutiveFaultEpochs() view returns(uint256)
func (_AgentPolice *AgentPoliceSession) MaxConsecutiveFaultEpochs() (*big.Int, error) {
return _AgentPolice.Contract.MaxConsecutiveFaultEpochs(&_AgentPolice.CallOpts)
}
// MaxConsecutiveFaultEpochs is a free data retrieval call binding the contract method 0x395bbfe9.
//
// Solidity: function maxConsecutiveFaultEpochs() view returns(uint256)
func (_AgentPolice *AgentPoliceCallerSession) MaxConsecutiveFaultEpochs() (*big.Int, error) {
return _AgentPolice.Contract.MaxConsecutiveFaultEpochs(&_AgentPolice.CallOpts)
}
// MaxDTE is a free data retrieval call binding the contract method 0x9fc2f56b.
//
// Solidity: function maxDTE() view returns(uint256)
func (_AgentPolice *AgentPoliceCaller) MaxDTE(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "maxDTE")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// MaxDTE is a free data retrieval call binding the contract method 0x9fc2f56b.
//
// Solidity: function maxDTE() view returns(uint256)
func (_AgentPolice *AgentPoliceSession) MaxDTE() (*big.Int, error) {
return _AgentPolice.Contract.MaxDTE(&_AgentPolice.CallOpts)
}
// MaxDTE is a free data retrieval call binding the contract method 0x9fc2f56b.
//
// Solidity: function maxDTE() view returns(uint256)
func (_AgentPolice *AgentPoliceCallerSession) MaxDTE() (*big.Int, error) {
return _AgentPolice.Contract.MaxDTE(&_AgentPolice.CallOpts)
}
// MaxEpochsOwedTolerance is a free data retrieval call binding the contract method 0x1387b4ed.
//
// Solidity: function maxEpochsOwedTolerance() view returns(uint256)
func (_AgentPolice *AgentPoliceCaller) MaxEpochsOwedTolerance(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "maxEpochsOwedTolerance")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// MaxEpochsOwedTolerance is a free data retrieval call binding the contract method 0x1387b4ed.
//
// Solidity: function maxEpochsOwedTolerance() view returns(uint256)
func (_AgentPolice *AgentPoliceSession) MaxEpochsOwedTolerance() (*big.Int, error) {
return _AgentPolice.Contract.MaxEpochsOwedTolerance(&_AgentPolice.CallOpts)
}
// MaxEpochsOwedTolerance is a free data retrieval call binding the contract method 0x1387b4ed.
//
// Solidity: function maxEpochsOwedTolerance() view returns(uint256)
func (_AgentPolice *AgentPoliceCallerSession) MaxEpochsOwedTolerance() (*big.Int, error) {
return _AgentPolice.Contract.MaxEpochsOwedTolerance(&_AgentPolice.CallOpts)
}
// MaxLTV is a free data retrieval call binding the contract method 0xf384bd05.
//
// Solidity: function maxLTV() view returns(uint256)
func (_AgentPolice *AgentPoliceCaller) MaxLTV(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "maxLTV")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// MaxLTV is a free data retrieval call binding the contract method 0xf384bd05.
//
// Solidity: function maxLTV() view returns(uint256)
func (_AgentPolice *AgentPoliceSession) MaxLTV() (*big.Int, error) {
return _AgentPolice.Contract.MaxLTV(&_AgentPolice.CallOpts)
}
// MaxLTV is a free data retrieval call binding the contract method 0xf384bd05.
//
// Solidity: function maxLTV() view returns(uint256)
func (_AgentPolice *AgentPoliceCallerSession) MaxLTV() (*big.Int, error) {
return _AgentPolice.Contract.MaxLTV(&_AgentPolice.CallOpts)
}
// MaxPoolsPerAgent is a free data retrieval call binding the contract method 0x56146380.
//
// Solidity: function maxPoolsPerAgent() view returns(uint256)
func (_AgentPolice *AgentPoliceCaller) MaxPoolsPerAgent(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "maxPoolsPerAgent")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// MaxPoolsPerAgent is a free data retrieval call binding the contract method 0x56146380.
//
// Solidity: function maxPoolsPerAgent() view returns(uint256)
func (_AgentPolice *AgentPoliceSession) MaxPoolsPerAgent() (*big.Int, error) {
return _AgentPolice.Contract.MaxPoolsPerAgent(&_AgentPolice.CallOpts)
}
// MaxPoolsPerAgent is a free data retrieval call binding the contract method 0x56146380.
//
// Solidity: function maxPoolsPerAgent() view returns(uint256)
func (_AgentPolice *AgentPoliceCallerSession) MaxPoolsPerAgent() (*big.Int, error) {
return _AgentPolice.Contract.MaxPoolsPerAgent(&_AgentPolice.CallOpts)
}
// Operator is a free data retrieval call binding the contract method 0x570ca735.
//
// Solidity: function operator() view returns(address)
func (_AgentPolice *AgentPoliceCaller) Operator(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "operator")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Operator is a free data retrieval call binding the contract method 0x570ca735.
//
// Solidity: function operator() view returns(address)
func (_AgentPolice *AgentPoliceSession) Operator() (common.Address, error) {
return _AgentPolice.Contract.Operator(&_AgentPolice.CallOpts)
}
// Operator is a free data retrieval call binding the contract method 0x570ca735.
//
// Solidity: function operator() view returns(address)
func (_AgentPolice *AgentPoliceCallerSession) Operator() (common.Address, error) {
return _AgentPolice.Contract.Operator(&_AgentPolice.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_AgentPolice *AgentPoliceCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "owner")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_AgentPolice *AgentPoliceSession) Owner() (common.Address, error) {
return _AgentPolice.Contract.Owner(&_AgentPolice.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_AgentPolice *AgentPoliceCallerSession) Owner() (common.Address, error) {
return _AgentPolice.Contract.Owner(&_AgentPolice.CallOpts)
}
// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
// Solidity: function paused() view returns(bool)
func (_AgentPolice *AgentPoliceCaller) Paused(opts *bind.CallOpts) (bool, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "paused")
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
// Solidity: function paused() view returns(bool)
func (_AgentPolice *AgentPoliceSession) Paused() (bool, error) {
return _AgentPolice.Contract.Paused(&_AgentPolice.CallOpts)
}
// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
// Solidity: function paused() view returns(bool)
func (_AgentPolice *AgentPoliceCallerSession) Paused() (bool, error) {
return _AgentPolice.Contract.Paused(&_AgentPolice.CallOpts)
}
// PendingOperator is a free data retrieval call binding the contract method 0xac7e534e.
//
// Solidity: function pendingOperator() view returns(address)
func (_AgentPolice *AgentPoliceCaller) PendingOperator(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "pendingOperator")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// PendingOperator is a free data retrieval call binding the contract method 0xac7e534e.
//
// Solidity: function pendingOperator() view returns(address)
func (_AgentPolice *AgentPoliceSession) PendingOperator() (common.Address, error) {
return _AgentPolice.Contract.PendingOperator(&_AgentPolice.CallOpts)
}
// PendingOperator is a free data retrieval call binding the contract method 0xac7e534e.
//
// Solidity: function pendingOperator() view returns(address)
func (_AgentPolice *AgentPoliceCallerSession) PendingOperator() (common.Address, error) {
return _AgentPolice.Contract.PendingOperator(&_AgentPolice.CallOpts)
}
// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978.
//
// Solidity: function pendingOwner() view returns(address)
func (_AgentPolice *AgentPoliceCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "pendingOwner")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978.
//
// Solidity: function pendingOwner() view returns(address)
func (_AgentPolice *AgentPoliceSession) PendingOwner() (common.Address, error) {
return _AgentPolice.Contract.PendingOwner(&_AgentPolice.CallOpts)
}
// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978.
//
// Solidity: function pendingOwner() view returns(address)
func (_AgentPolice *AgentPoliceCallerSession) PendingOwner() (common.Address, error) {
return _AgentPolice.Contract.PendingOwner(&_AgentPolice.CallOpts)
}
// Recover is a free data retrieval call binding the contract method 0x4ead1527.
//
// Solidity: function recover(((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes),uint8,bytes32,bytes32) sc) view returns(address)
func (_AgentPolice *AgentPoliceCaller) Recover(opts *bind.CallOpts, sc SignedCredential) (common.Address, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "recover", sc)
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Recover is a free data retrieval call binding the contract method 0x4ead1527.
//
// Solidity: function recover(((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes),uint8,bytes32,bytes32) sc) view returns(address)
func (_AgentPolice *AgentPoliceSession) Recover(sc SignedCredential) (common.Address, error) {
return _AgentPolice.Contract.Recover(&_AgentPolice.CallOpts, sc)
}
// Recover is a free data retrieval call binding the contract method 0x4ead1527.
//
// Solidity: function recover(((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes),uint8,bytes32,bytes32) sc) view returns(address)
func (_AgentPolice *AgentPoliceCallerSession) Recover(sc SignedCredential) (common.Address, error) {
return _AgentPolice.Contract.Recover(&_AgentPolice.CallOpts, sc)
}
// SectorFaultyTolerancePercent is a free data retrieval call binding the contract method 0x37279488.
//
// Solidity: function sectorFaultyTolerancePercent() view returns(uint256)
func (_AgentPolice *AgentPoliceCaller) SectorFaultyTolerancePercent(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "sectorFaultyTolerancePercent")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// SectorFaultyTolerancePercent is a free data retrieval call binding the contract method 0x37279488.
//
// Solidity: function sectorFaultyTolerancePercent() view returns(uint256)
func (_AgentPolice *AgentPoliceSession) SectorFaultyTolerancePercent() (*big.Int, error) {
return _AgentPolice.Contract.SectorFaultyTolerancePercent(&_AgentPolice.CallOpts)
}
// SectorFaultyTolerancePercent is a free data retrieval call binding the contract method 0x37279488.
//
// Solidity: function sectorFaultyTolerancePercent() view returns(uint256)
func (_AgentPolice *AgentPoliceCallerSession) SectorFaultyTolerancePercent() (*big.Int, error) {
return _AgentPolice.Contract.SectorFaultyTolerancePercent(&_AgentPolice.CallOpts)
}
// ValidateCred is a free data retrieval call binding the contract method 0x403bb79d.
//
// Solidity: function validateCred(uint256 agent, bytes4 selector, ((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes),uint8,bytes32,bytes32) sc) view returns()
func (_AgentPolice *AgentPoliceCaller) ValidateCred(opts *bind.CallOpts, agent *big.Int, selector [4]byte, sc SignedCredential) error {
var out []interface{}
err := _AgentPolice.contract.Call(opts, &out, "validateCred", agent, selector, sc)
if err != nil {
return err
}
return err
}
// ValidateCred is a free data retrieval call binding the contract method 0x403bb79d.
//
// Solidity: function validateCred(uint256 agent, bytes4 selector, ((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes),uint8,bytes32,bytes32) sc) view returns()
func (_AgentPolice *AgentPoliceSession) ValidateCred(agent *big.Int, selector [4]byte, sc SignedCredential) error {
return _AgentPolice.Contract.ValidateCred(&_AgentPolice.CallOpts, agent, selector, sc)
}
// ValidateCred is a free data retrieval call binding the contract method 0x403bb79d.
//
// Solidity: function validateCred(uint256 agent, bytes4 selector, ((address,uint256,uint256,uint256,uint256,bytes4,uint64,bytes),uint8,bytes32,bytes32) sc) view returns()
func (_AgentPolice *AgentPoliceCallerSession) ValidateCred(agent *big.Int, selector [4]byte, sc SignedCredential) error {
return _AgentPolice.Contract.ValidateCred(&_AgentPolice.CallOpts, agent, selector, sc)
}
// AcceptOperator is a paid mutator transaction binding the contract method 0xfcad4448.
//
// Solidity: function acceptOperator() returns()
func (_AgentPolice *AgentPoliceTransactor) AcceptOperator(opts *bind.TransactOpts) (*types.Transaction, error) {
return _AgentPolice.contract.Transact(opts, "acceptOperator")
}
// AcceptOperator is a paid mutator transaction binding the contract method 0xfcad4448.
//
// Solidity: function acceptOperator() returns()
func (_AgentPolice *AgentPoliceSession) AcceptOperator() (*types.Transaction, error) {
return _AgentPolice.Contract.AcceptOperator(&_AgentPolice.TransactOpts)
}
// AcceptOperator is a paid mutator transaction binding the contract method 0xfcad4448.
//
// Solidity: function acceptOperator() returns()
func (_AgentPolice *AgentPoliceTransactorSession) AcceptOperator() (*types.Transaction, error) {
return _AgentPolice.Contract.AcceptOperator(&_AgentPolice.TransactOpts)
}
// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097.
//
// Solidity: function acceptOwnership() returns()
func (_AgentPolice *AgentPoliceTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
return _AgentPolice.contract.Transact(opts, "acceptOwnership")
}
// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097.
//
// Solidity: function acceptOwnership() returns()
func (_AgentPolice *AgentPoliceSession) AcceptOwnership() (*types.Transaction, error) {
return _AgentPolice.Contract.AcceptOwnership(&_AgentPolice.TransactOpts)
}
// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097.
//
// Solidity: function acceptOwnership() returns()
func (_AgentPolice *AgentPoliceTransactorSession) AcceptOwnership() (*types.Transaction, error) {
return _AgentPolice.Contract.AcceptOwnership(&_AgentPolice.TransactOpts)
}
// DistributeLiquidatedFunds is a paid mutator transaction binding the contract method 0x5e7981de.
//
// Solidity: function distributeLiquidatedFunds(address agent, uint256 amount) returns()
func (_AgentPolice *AgentPoliceTransactor) DistributeLiquidatedFunds(opts *bind.TransactOpts, agent common.Address, amount *big.Int) (*types.Transaction, error) {
return _AgentPolice.contract.Transact(opts, "distributeLiquidatedFunds", agent, amount)
}
// DistributeLiquidatedFunds is a paid mutator transaction binding the contract method 0x5e7981de.
//
// Solidity: function distributeLiquidatedFunds(address agent, uint256 amount) returns()
func (_AgentPolice *AgentPoliceSession) DistributeLiquidatedFunds(agent common.Address, amount *big.Int) (*types.Transaction, error) {
return _AgentPolice.Contract.DistributeLiquidatedFunds(&_AgentPolice.TransactOpts, agent, amount)
}
// DistributeLiquidatedFunds is a paid mutator transaction binding the contract method 0x5e7981de.
//
// Solidity: function distributeLiquidatedFunds(address agent, uint256 amount) returns()
func (_AgentPolice *AgentPoliceTransactorSession) DistributeLiquidatedFunds(agent common.Address, amount *big.Int) (*types.Transaction, error) {
return _AgentPolice.Contract.DistributeLiquidatedFunds(&_AgentPolice.TransactOpts, agent, amount)
}
// MarkAsFaulty is a paid mutator transaction binding the contract method 0x27ddb79d.
//
// Solidity: function markAsFaulty(address[] agents) returns()
func (_AgentPolice *AgentPoliceTransactor) MarkAsFaulty(opts *bind.TransactOpts, agents []common.Address) (*types.Transaction, error) {
return _AgentPolice.contract.Transact(opts, "markAsFaulty", agents)
}
// MarkAsFaulty is a paid mutator transaction binding the contract method 0x27ddb79d.
//
// Solidity: function markAsFaulty(address[] agents) returns()
func (_AgentPolice *AgentPoliceSession) MarkAsFaulty(agents []common.Address) (*types.Transaction, error) {
return _AgentPolice.Contract.MarkAsFaulty(&_AgentPolice.TransactOpts, agents)
}
// MarkAsFaulty is a paid mutator transaction binding the contract method 0x27ddb79d.
//
// Solidity: function markAsFaulty(address[] agents) returns()
func (_AgentPolice *AgentPoliceTransactorSession) MarkAsFaulty(agents []common.Address) (*types.Transaction, error) {
return _AgentPolice.Contract.MarkAsFaulty(&_AgentPolice.TransactOpts, agents)
}
// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
// Solidity: function pause() returns()
func (_AgentPolice *AgentPoliceTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) {
return _AgentPolice.contract.Transact(opts, "pause")
}
// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
// Solidity: function pause() returns()
func (_AgentPolice *AgentPoliceSession) Pause() (*types.Transaction, error) {