@hashpower/collateral-abi 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,978 @@
1
+ export const CollateralVaultAbi = [
2
+ {
3
+ "inputs": [],
4
+ "stateMutability": "nonpayable",
5
+ "type": "constructor"
6
+ },
7
+ {
8
+ "inputs": [
9
+ {
10
+ "internalType": "address",
11
+ "name": "target",
12
+ "type": "address"
13
+ }
14
+ ],
15
+ "name": "AddressEmptyCode",
16
+ "type": "error"
17
+ },
18
+ {
19
+ "inputs": [
20
+ {
21
+ "internalType": "address",
22
+ "name": "implementation",
23
+ "type": "address"
24
+ }
25
+ ],
26
+ "name": "ERC1967InvalidImplementation",
27
+ "type": "error"
28
+ },
29
+ {
30
+ "inputs": [],
31
+ "name": "ERC1967NonPayable",
32
+ "type": "error"
33
+ },
34
+ {
35
+ "inputs": [
36
+ {
37
+ "internalType": "address",
38
+ "name": "spender",
39
+ "type": "address"
40
+ },
41
+ {
42
+ "internalType": "uint256",
43
+ "name": "allowance",
44
+ "type": "uint256"
45
+ },
46
+ {
47
+ "internalType": "uint256",
48
+ "name": "needed",
49
+ "type": "uint256"
50
+ }
51
+ ],
52
+ "name": "ERC20InsufficientAllowance",
53
+ "type": "error"
54
+ },
55
+ {
56
+ "inputs": [
57
+ {
58
+ "internalType": "address",
59
+ "name": "sender",
60
+ "type": "address"
61
+ },
62
+ {
63
+ "internalType": "uint256",
64
+ "name": "balance",
65
+ "type": "uint256"
66
+ },
67
+ {
68
+ "internalType": "uint256",
69
+ "name": "needed",
70
+ "type": "uint256"
71
+ }
72
+ ],
73
+ "name": "ERC20InsufficientBalance",
74
+ "type": "error"
75
+ },
76
+ {
77
+ "inputs": [
78
+ {
79
+ "internalType": "address",
80
+ "name": "approver",
81
+ "type": "address"
82
+ }
83
+ ],
84
+ "name": "ERC20InvalidApprover",
85
+ "type": "error"
86
+ },
87
+ {
88
+ "inputs": [
89
+ {
90
+ "internalType": "address",
91
+ "name": "receiver",
92
+ "type": "address"
93
+ }
94
+ ],
95
+ "name": "ERC20InvalidReceiver",
96
+ "type": "error"
97
+ },
98
+ {
99
+ "inputs": [
100
+ {
101
+ "internalType": "address",
102
+ "name": "sender",
103
+ "type": "address"
104
+ }
105
+ ],
106
+ "name": "ERC20InvalidSender",
107
+ "type": "error"
108
+ },
109
+ {
110
+ "inputs": [
111
+ {
112
+ "internalType": "address",
113
+ "name": "spender",
114
+ "type": "address"
115
+ }
116
+ ],
117
+ "name": "ERC20InvalidSpender",
118
+ "type": "error"
119
+ },
120
+ {
121
+ "inputs": [],
122
+ "name": "FailedCall",
123
+ "type": "error"
124
+ },
125
+ {
126
+ "inputs": [],
127
+ "name": "FunctionDisabled",
128
+ "type": "error"
129
+ },
130
+ {
131
+ "inputs": [],
132
+ "name": "InvalidInitialization",
133
+ "type": "error"
134
+ },
135
+ {
136
+ "inputs": [],
137
+ "name": "MarginBreach",
138
+ "type": "error"
139
+ },
140
+ {
141
+ "inputs": [],
142
+ "name": "NotAuthorized",
143
+ "type": "error"
144
+ },
145
+ {
146
+ "inputs": [],
147
+ "name": "NotInitializing",
148
+ "type": "error"
149
+ },
150
+ {
151
+ "inputs": [
152
+ {
153
+ "internalType": "address",
154
+ "name": "owner",
155
+ "type": "address"
156
+ }
157
+ ],
158
+ "name": "OwnableInvalidOwner",
159
+ "type": "error"
160
+ },
161
+ {
162
+ "inputs": [
163
+ {
164
+ "internalType": "address",
165
+ "name": "account",
166
+ "type": "address"
167
+ }
168
+ ],
169
+ "name": "OwnableUnauthorizedAccount",
170
+ "type": "error"
171
+ },
172
+ {
173
+ "inputs": [
174
+ {
175
+ "internalType": "address",
176
+ "name": "token",
177
+ "type": "address"
178
+ }
179
+ ],
180
+ "name": "SafeERC20FailedOperation",
181
+ "type": "error"
182
+ },
183
+ {
184
+ "inputs": [],
185
+ "name": "UUPSUnauthorizedCallContext",
186
+ "type": "error"
187
+ },
188
+ {
189
+ "inputs": [
190
+ {
191
+ "internalType": "bytes32",
192
+ "name": "slot",
193
+ "type": "bytes32"
194
+ }
195
+ ],
196
+ "name": "UUPSUnsupportedProxiableUUID",
197
+ "type": "error"
198
+ },
199
+ {
200
+ "inputs": [],
201
+ "name": "ZeroAddress",
202
+ "type": "error"
203
+ },
204
+ {
205
+ "inputs": [],
206
+ "name": "ZeroAmount",
207
+ "type": "error"
208
+ },
209
+ {
210
+ "anonymous": false,
211
+ "inputs": [
212
+ {
213
+ "indexed": true,
214
+ "internalType": "address",
215
+ "name": "owner",
216
+ "type": "address"
217
+ },
218
+ {
219
+ "indexed": true,
220
+ "internalType": "address",
221
+ "name": "spender",
222
+ "type": "address"
223
+ },
224
+ {
225
+ "indexed": false,
226
+ "internalType": "uint256",
227
+ "name": "value",
228
+ "type": "uint256"
229
+ }
230
+ ],
231
+ "name": "Approval",
232
+ "type": "event"
233
+ },
234
+ {
235
+ "anonymous": false,
236
+ "inputs": [
237
+ {
238
+ "indexed": true,
239
+ "internalType": "address",
240
+ "name": "caller",
241
+ "type": "address"
242
+ },
243
+ {
244
+ "indexed": false,
245
+ "internalType": "bool",
246
+ "name": "authorized",
247
+ "type": "bool"
248
+ }
249
+ ],
250
+ "name": "AuthorizedCallerSet",
251
+ "type": "event"
252
+ },
253
+ {
254
+ "anonymous": false,
255
+ "inputs": [
256
+ {
257
+ "indexed": true,
258
+ "internalType": "address",
259
+ "name": "user",
260
+ "type": "address"
261
+ },
262
+ {
263
+ "indexed": false,
264
+ "internalType": "uint256",
265
+ "name": "amount",
266
+ "type": "uint256"
267
+ },
268
+ {
269
+ "indexed": true,
270
+ "internalType": "address",
271
+ "name": "sender",
272
+ "type": "address"
273
+ }
274
+ ],
275
+ "name": "Deposited",
276
+ "type": "event"
277
+ },
278
+ {
279
+ "anonymous": false,
280
+ "inputs": [
281
+ {
282
+ "indexed": false,
283
+ "internalType": "uint64",
284
+ "name": "version",
285
+ "type": "uint64"
286
+ }
287
+ ],
288
+ "name": "Initialized",
289
+ "type": "event"
290
+ },
291
+ {
292
+ "anonymous": false,
293
+ "inputs": [
294
+ {
295
+ "indexed": true,
296
+ "internalType": "address",
297
+ "name": "source",
298
+ "type": "address"
299
+ },
300
+ {
301
+ "indexed": false,
302
+ "internalType": "uint256",
303
+ "name": "amount",
304
+ "type": "uint256"
305
+ }
306
+ ],
307
+ "name": "InsuranceFundDeposited",
308
+ "type": "event"
309
+ },
310
+ {
311
+ "anonymous": false,
312
+ "inputs": [
313
+ {
314
+ "indexed": true,
315
+ "internalType": "address",
316
+ "name": "recipient",
317
+ "type": "address"
318
+ },
319
+ {
320
+ "indexed": false,
321
+ "internalType": "uint256",
322
+ "name": "amount",
323
+ "type": "uint256"
324
+ }
325
+ ],
326
+ "name": "InsuranceFundWithdrawn",
327
+ "type": "event"
328
+ },
329
+ {
330
+ "anonymous": false,
331
+ "inputs": [
332
+ {
333
+ "indexed": true,
334
+ "internalType": "address",
335
+ "name": "marginEngine",
336
+ "type": "address"
337
+ }
338
+ ],
339
+ "name": "MarginEngineSet",
340
+ "type": "event"
341
+ },
342
+ {
343
+ "anonymous": false,
344
+ "inputs": [
345
+ {
346
+ "indexed": true,
347
+ "internalType": "address",
348
+ "name": "previousOwner",
349
+ "type": "address"
350
+ },
351
+ {
352
+ "indexed": true,
353
+ "internalType": "address",
354
+ "name": "newOwner",
355
+ "type": "address"
356
+ }
357
+ ],
358
+ "name": "OwnershipTransferred",
359
+ "type": "event"
360
+ },
361
+ {
362
+ "anonymous": false,
363
+ "inputs": [
364
+ {
365
+ "indexed": true,
366
+ "internalType": "address",
367
+ "name": "from",
368
+ "type": "address"
369
+ },
370
+ {
371
+ "indexed": true,
372
+ "internalType": "address",
373
+ "name": "to",
374
+ "type": "address"
375
+ },
376
+ {
377
+ "indexed": false,
378
+ "internalType": "uint256",
379
+ "name": "value",
380
+ "type": "uint256"
381
+ }
382
+ ],
383
+ "name": "Transfer",
384
+ "type": "event"
385
+ },
386
+ {
387
+ "anonymous": false,
388
+ "inputs": [
389
+ {
390
+ "indexed": true,
391
+ "internalType": "address",
392
+ "name": "implementation",
393
+ "type": "address"
394
+ }
395
+ ],
396
+ "name": "Upgraded",
397
+ "type": "event"
398
+ },
399
+ {
400
+ "anonymous": false,
401
+ "inputs": [
402
+ {
403
+ "indexed": true,
404
+ "internalType": "address",
405
+ "name": "user",
406
+ "type": "address"
407
+ },
408
+ {
409
+ "indexed": false,
410
+ "internalType": "uint256",
411
+ "name": "amount",
412
+ "type": "uint256"
413
+ },
414
+ {
415
+ "indexed": true,
416
+ "internalType": "address",
417
+ "name": "recipient",
418
+ "type": "address"
419
+ }
420
+ ],
421
+ "name": "Withdrawn",
422
+ "type": "event"
423
+ },
424
+ {
425
+ "inputs": [],
426
+ "name": "INSURANCE_FUND_ADDR",
427
+ "outputs": [
428
+ {
429
+ "internalType": "address",
430
+ "name": "",
431
+ "type": "address"
432
+ }
433
+ ],
434
+ "stateMutability": "view",
435
+ "type": "function"
436
+ },
437
+ {
438
+ "inputs": [],
439
+ "name": "UPGRADE_INTERFACE_VERSION",
440
+ "outputs": [
441
+ {
442
+ "internalType": "string",
443
+ "name": "",
444
+ "type": "string"
445
+ }
446
+ ],
447
+ "stateMutability": "view",
448
+ "type": "function"
449
+ },
450
+ {
451
+ "inputs": [],
452
+ "name": "VERSION",
453
+ "outputs": [
454
+ {
455
+ "internalType": "string",
456
+ "name": "",
457
+ "type": "string"
458
+ }
459
+ ],
460
+ "stateMutability": "view",
461
+ "type": "function"
462
+ },
463
+ {
464
+ "inputs": [
465
+ {
466
+ "internalType": "address",
467
+ "name": "",
468
+ "type": "address"
469
+ },
470
+ {
471
+ "internalType": "address",
472
+ "name": "",
473
+ "type": "address"
474
+ }
475
+ ],
476
+ "name": "allowance",
477
+ "outputs": [
478
+ {
479
+ "internalType": "uint256",
480
+ "name": "",
481
+ "type": "uint256"
482
+ }
483
+ ],
484
+ "stateMutability": "pure",
485
+ "type": "function"
486
+ },
487
+ {
488
+ "inputs": [
489
+ {
490
+ "internalType": "address",
491
+ "name": "",
492
+ "type": "address"
493
+ },
494
+ {
495
+ "internalType": "uint256",
496
+ "name": "",
497
+ "type": "uint256"
498
+ }
499
+ ],
500
+ "name": "approve",
501
+ "outputs": [
502
+ {
503
+ "internalType": "bool",
504
+ "name": "",
505
+ "type": "bool"
506
+ }
507
+ ],
508
+ "stateMutability": "pure",
509
+ "type": "function"
510
+ },
511
+ {
512
+ "inputs": [
513
+ {
514
+ "internalType": "address",
515
+ "name": "",
516
+ "type": "address"
517
+ }
518
+ ],
519
+ "name": "authorizedCallers",
520
+ "outputs": [
521
+ {
522
+ "internalType": "bool",
523
+ "name": "",
524
+ "type": "bool"
525
+ }
526
+ ],
527
+ "stateMutability": "view",
528
+ "type": "function"
529
+ },
530
+ {
531
+ "inputs": [
532
+ {
533
+ "internalType": "address",
534
+ "name": "account",
535
+ "type": "address"
536
+ }
537
+ ],
538
+ "name": "balanceOf",
539
+ "outputs": [
540
+ {
541
+ "internalType": "uint256",
542
+ "name": "",
543
+ "type": "uint256"
544
+ }
545
+ ],
546
+ "stateMutability": "view",
547
+ "type": "function"
548
+ },
549
+ {
550
+ "inputs": [],
551
+ "name": "collateralToken",
552
+ "outputs": [
553
+ {
554
+ "internalType": "contract IERC20",
555
+ "name": "",
556
+ "type": "address"
557
+ }
558
+ ],
559
+ "stateMutability": "view",
560
+ "type": "function"
561
+ },
562
+ {
563
+ "inputs": [],
564
+ "name": "decimals",
565
+ "outputs": [
566
+ {
567
+ "internalType": "uint8",
568
+ "name": "",
569
+ "type": "uint8"
570
+ }
571
+ ],
572
+ "stateMutability": "view",
573
+ "type": "function"
574
+ },
575
+ {
576
+ "inputs": [
577
+ {
578
+ "internalType": "uint256",
579
+ "name": "amount",
580
+ "type": "uint256"
581
+ }
582
+ ],
583
+ "name": "deposit",
584
+ "outputs": [],
585
+ "stateMutability": "nonpayable",
586
+ "type": "function"
587
+ },
588
+ {
589
+ "inputs": [
590
+ {
591
+ "internalType": "address",
592
+ "name": "recipient",
593
+ "type": "address"
594
+ },
595
+ {
596
+ "internalType": "uint256",
597
+ "name": "amount",
598
+ "type": "uint256"
599
+ }
600
+ ],
601
+ "name": "depositFor",
602
+ "outputs": [],
603
+ "stateMutability": "nonpayable",
604
+ "type": "function"
605
+ },
606
+ {
607
+ "inputs": [
608
+ {
609
+ "internalType": "address",
610
+ "name": "recipient",
611
+ "type": "address"
612
+ },
613
+ {
614
+ "internalType": "uint256",
615
+ "name": "amount",
616
+ "type": "uint256"
617
+ },
618
+ {
619
+ "internalType": "uint256",
620
+ "name": "deadline",
621
+ "type": "uint256"
622
+ },
623
+ {
624
+ "internalType": "uint8",
625
+ "name": "v",
626
+ "type": "uint8"
627
+ },
628
+ {
629
+ "internalType": "bytes32",
630
+ "name": "r",
631
+ "type": "bytes32"
632
+ },
633
+ {
634
+ "internalType": "bytes32",
635
+ "name": "s",
636
+ "type": "bytes32"
637
+ }
638
+ ],
639
+ "name": "depositForPermit",
640
+ "outputs": [],
641
+ "stateMutability": "nonpayable",
642
+ "type": "function"
643
+ },
644
+ {
645
+ "inputs": [
646
+ {
647
+ "internalType": "uint256",
648
+ "name": "amount",
649
+ "type": "uint256"
650
+ }
651
+ ],
652
+ "name": "depositInsuranceFund",
653
+ "outputs": [],
654
+ "stateMutability": "nonpayable",
655
+ "type": "function"
656
+ },
657
+ {
658
+ "inputs": [
659
+ {
660
+ "internalType": "address",
661
+ "name": "_collateralToken",
662
+ "type": "address"
663
+ }
664
+ ],
665
+ "name": "initialize",
666
+ "outputs": [],
667
+ "stateMutability": "nonpayable",
668
+ "type": "function"
669
+ },
670
+ {
671
+ "inputs": [],
672
+ "name": "insuranceFundBalance",
673
+ "outputs": [
674
+ {
675
+ "internalType": "uint256",
676
+ "name": "",
677
+ "type": "uint256"
678
+ }
679
+ ],
680
+ "stateMutability": "view",
681
+ "type": "function"
682
+ },
683
+ {
684
+ "inputs": [
685
+ {
686
+ "internalType": "address",
687
+ "name": "from",
688
+ "type": "address"
689
+ },
690
+ {
691
+ "internalType": "address",
692
+ "name": "to",
693
+ "type": "address"
694
+ },
695
+ {
696
+ "internalType": "uint256",
697
+ "name": "amount",
698
+ "type": "uint256"
699
+ }
700
+ ],
701
+ "name": "internalTransfer",
702
+ "outputs": [],
703
+ "stateMutability": "nonpayable",
704
+ "type": "function"
705
+ },
706
+ {
707
+ "inputs": [
708
+ {
709
+ "internalType": "address",
710
+ "name": "from",
711
+ "type": "address"
712
+ },
713
+ {
714
+ "internalType": "address",
715
+ "name": "to",
716
+ "type": "address"
717
+ },
718
+ {
719
+ "internalType": "uint256",
720
+ "name": "amount",
721
+ "type": "uint256"
722
+ }
723
+ ],
724
+ "name": "internalTransferWithMarginCheck",
725
+ "outputs": [],
726
+ "stateMutability": "nonpayable",
727
+ "type": "function"
728
+ },
729
+ {
730
+ "inputs": [],
731
+ "name": "marginEngine",
732
+ "outputs": [
733
+ {
734
+ "internalType": "address",
735
+ "name": "",
736
+ "type": "address"
737
+ }
738
+ ],
739
+ "stateMutability": "view",
740
+ "type": "function"
741
+ },
742
+ {
743
+ "inputs": [],
744
+ "name": "name",
745
+ "outputs": [
746
+ {
747
+ "internalType": "string",
748
+ "name": "",
749
+ "type": "string"
750
+ }
751
+ ],
752
+ "stateMutability": "view",
753
+ "type": "function"
754
+ },
755
+ {
756
+ "inputs": [],
757
+ "name": "owner",
758
+ "outputs": [
759
+ {
760
+ "internalType": "address",
761
+ "name": "",
762
+ "type": "address"
763
+ }
764
+ ],
765
+ "stateMutability": "view",
766
+ "type": "function"
767
+ },
768
+ {
769
+ "inputs": [],
770
+ "name": "proxiableUUID",
771
+ "outputs": [
772
+ {
773
+ "internalType": "bytes32",
774
+ "name": "",
775
+ "type": "bytes32"
776
+ }
777
+ ],
778
+ "stateMutability": "view",
779
+ "type": "function"
780
+ },
781
+ {
782
+ "inputs": [],
783
+ "name": "renounceOwnership",
784
+ "outputs": [],
785
+ "stateMutability": "nonpayable",
786
+ "type": "function"
787
+ },
788
+ {
789
+ "inputs": [
790
+ {
791
+ "internalType": "address",
792
+ "name": "caller",
793
+ "type": "address"
794
+ },
795
+ {
796
+ "internalType": "bool",
797
+ "name": "authorized",
798
+ "type": "bool"
799
+ }
800
+ ],
801
+ "name": "setAuthorizedCaller",
802
+ "outputs": [],
803
+ "stateMutability": "nonpayable",
804
+ "type": "function"
805
+ },
806
+ {
807
+ "inputs": [
808
+ {
809
+ "internalType": "address",
810
+ "name": "_marginEngine",
811
+ "type": "address"
812
+ }
813
+ ],
814
+ "name": "setMarginEngine",
815
+ "outputs": [],
816
+ "stateMutability": "nonpayable",
817
+ "type": "function"
818
+ },
819
+ {
820
+ "inputs": [],
821
+ "name": "symbol",
822
+ "outputs": [
823
+ {
824
+ "internalType": "string",
825
+ "name": "",
826
+ "type": "string"
827
+ }
828
+ ],
829
+ "stateMutability": "view",
830
+ "type": "function"
831
+ },
832
+ {
833
+ "inputs": [],
834
+ "name": "totalSupply",
835
+ "outputs": [
836
+ {
837
+ "internalType": "uint256",
838
+ "name": "",
839
+ "type": "uint256"
840
+ }
841
+ ],
842
+ "stateMutability": "view",
843
+ "type": "function"
844
+ },
845
+ {
846
+ "inputs": [
847
+ {
848
+ "internalType": "address",
849
+ "name": "",
850
+ "type": "address"
851
+ },
852
+ {
853
+ "internalType": "uint256",
854
+ "name": "",
855
+ "type": "uint256"
856
+ }
857
+ ],
858
+ "name": "transfer",
859
+ "outputs": [
860
+ {
861
+ "internalType": "bool",
862
+ "name": "",
863
+ "type": "bool"
864
+ }
865
+ ],
866
+ "stateMutability": "pure",
867
+ "type": "function"
868
+ },
869
+ {
870
+ "inputs": [
871
+ {
872
+ "internalType": "address",
873
+ "name": "",
874
+ "type": "address"
875
+ },
876
+ {
877
+ "internalType": "address",
878
+ "name": "",
879
+ "type": "address"
880
+ },
881
+ {
882
+ "internalType": "uint256",
883
+ "name": "",
884
+ "type": "uint256"
885
+ }
886
+ ],
887
+ "name": "transferFrom",
888
+ "outputs": [
889
+ {
890
+ "internalType": "bool",
891
+ "name": "",
892
+ "type": "bool"
893
+ }
894
+ ],
895
+ "stateMutability": "pure",
896
+ "type": "function"
897
+ },
898
+ {
899
+ "inputs": [
900
+ {
901
+ "internalType": "address",
902
+ "name": "newOwner",
903
+ "type": "address"
904
+ }
905
+ ],
906
+ "name": "transferOwnership",
907
+ "outputs": [],
908
+ "stateMutability": "nonpayable",
909
+ "type": "function"
910
+ },
911
+ {
912
+ "inputs": [
913
+ {
914
+ "internalType": "address",
915
+ "name": "newImplementation",
916
+ "type": "address"
917
+ },
918
+ {
919
+ "internalType": "bytes",
920
+ "name": "data",
921
+ "type": "bytes"
922
+ }
923
+ ],
924
+ "name": "upgradeToAndCall",
925
+ "outputs": [],
926
+ "stateMutability": "payable",
927
+ "type": "function"
928
+ },
929
+ {
930
+ "inputs": [
931
+ {
932
+ "internalType": "uint256",
933
+ "name": "amount",
934
+ "type": "uint256"
935
+ }
936
+ ],
937
+ "name": "withdraw",
938
+ "outputs": [],
939
+ "stateMutability": "nonpayable",
940
+ "type": "function"
941
+ },
942
+ {
943
+ "inputs": [
944
+ {
945
+ "internalType": "address",
946
+ "name": "recipient",
947
+ "type": "address"
948
+ },
949
+ {
950
+ "internalType": "uint256",
951
+ "name": "amount",
952
+ "type": "uint256"
953
+ }
954
+ ],
955
+ "name": "withdrawInsuranceFund",
956
+ "outputs": [],
957
+ "stateMutability": "nonpayable",
958
+ "type": "function"
959
+ },
960
+ {
961
+ "inputs": [
962
+ {
963
+ "internalType": "address",
964
+ "name": "recipient",
965
+ "type": "address"
966
+ },
967
+ {
968
+ "internalType": "uint256",
969
+ "name": "amount",
970
+ "type": "uint256"
971
+ }
972
+ ],
973
+ "name": "withdrawTo",
974
+ "outputs": [],
975
+ "stateMutability": "nonpayable",
976
+ "type": "function"
977
+ }
978
+ ];