@black-market/sdk 0.1.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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +111 -0
  3. package/dist/abis.d.ts +2573 -0
  4. package/dist/abis.d.ts.map +1 -0
  5. package/dist/abis.js +1875 -0
  6. package/dist/abis.js.map +1 -0
  7. package/dist/abyss.d.ts +3650 -0
  8. package/dist/abyss.d.ts.map +1 -0
  9. package/dist/abyss.js +1522 -0
  10. package/dist/abyss.js.map +1 -0
  11. package/dist/addresses.d.ts +211 -0
  12. package/dist/addresses.d.ts.map +1 -0
  13. package/dist/addresses.js +234 -0
  14. package/dist/addresses.js.map +1 -0
  15. package/dist/auction.d.ts +57 -0
  16. package/dist/auction.d.ts.map +1 -0
  17. package/dist/auction.js +88 -0
  18. package/dist/auction.js.map +1 -0
  19. package/dist/client.d.ts +12 -0
  20. package/dist/client.d.ts.map +1 -0
  21. package/dist/client.js +18 -0
  22. package/dist/client.js.map +1 -0
  23. package/dist/format.d.ts +15 -0
  24. package/dist/format.d.ts.map +1 -0
  25. package/dist/format.js +78 -0
  26. package/dist/format.js.map +1 -0
  27. package/dist/index.d.ts +9 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +9 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/launch.d.ts +225 -0
  32. package/dist/launch.d.ts.map +1 -0
  33. package/dist/launch.js +511 -0
  34. package/dist/launch.js.map +1 -0
  35. package/dist/live.d.ts +185 -0
  36. package/dist/live.d.ts.map +1 -0
  37. package/dist/live.js +205 -0
  38. package/dist/live.js.map +1 -0
  39. package/package.json +51 -0
  40. package/src/abis.ts +1896 -0
  41. package/src/abyss.ts +1574 -0
  42. package/src/addresses.ts +342 -0
  43. package/src/auction.ts +107 -0
  44. package/src/client.ts +37 -0
  45. package/src/format.ts +73 -0
  46. package/src/index.ts +8 -0
  47. package/src/launch.ts +724 -0
  48. package/src/live.ts +393 -0
package/dist/abis.js ADDED
@@ -0,0 +1,1875 @@
1
+ // Auto-trimmed from forge artifacts for the Black Market web app.
2
+ export const lendingPoolAbi = [
3
+ {
4
+ type: "function",
5
+ name: "borrow",
6
+ inputs: [
7
+ {
8
+ name: "asset",
9
+ type: "address",
10
+ internalType: "address",
11
+ },
12
+ {
13
+ name: "amount",
14
+ type: "uint256",
15
+ internalType: "uint256",
16
+ },
17
+ {
18
+ name: "interestRateMode",
19
+ type: "uint256",
20
+ internalType: "uint256",
21
+ },
22
+ {
23
+ name: "referralCode",
24
+ type: "uint16",
25
+ internalType: "uint16",
26
+ },
27
+ {
28
+ name: "onBehalfOf",
29
+ type: "address",
30
+ internalType: "address",
31
+ },
32
+ ],
33
+ outputs: [],
34
+ stateMutability: "nonpayable",
35
+ },
36
+ {
37
+ type: "function",
38
+ name: "deposit",
39
+ inputs: [
40
+ {
41
+ name: "asset",
42
+ type: "address",
43
+ internalType: "address",
44
+ },
45
+ {
46
+ name: "amount",
47
+ type: "uint256",
48
+ internalType: "uint256",
49
+ },
50
+ {
51
+ name: "onBehalfOf",
52
+ type: "address",
53
+ internalType: "address",
54
+ },
55
+ {
56
+ name: "referralCode",
57
+ type: "uint16",
58
+ internalType: "uint16",
59
+ },
60
+ ],
61
+ outputs: [],
62
+ stateMutability: "nonpayable",
63
+ },
64
+ {
65
+ type: "function",
66
+ name: "getReserveData",
67
+ inputs: [
68
+ {
69
+ name: "asset",
70
+ type: "address",
71
+ internalType: "address",
72
+ },
73
+ ],
74
+ outputs: [
75
+ {
76
+ name: "",
77
+ type: "tuple",
78
+ internalType: "struct DataTypes.ReserveData",
79
+ components: [
80
+ {
81
+ name: "configuration",
82
+ type: "tuple",
83
+ internalType: "struct DataTypes.ReserveConfigurationMap",
84
+ components: [
85
+ {
86
+ name: "data",
87
+ type: "uint256",
88
+ internalType: "uint256",
89
+ },
90
+ ],
91
+ },
92
+ {
93
+ name: "liquidityIndex",
94
+ type: "uint128",
95
+ internalType: "uint128",
96
+ },
97
+ {
98
+ name: "variableBorrowIndex",
99
+ type: "uint128",
100
+ internalType: "uint128",
101
+ },
102
+ {
103
+ name: "currentLiquidityRate",
104
+ type: "uint128",
105
+ internalType: "uint128",
106
+ },
107
+ {
108
+ name: "currentVariableBorrowRate",
109
+ type: "uint128",
110
+ internalType: "uint128",
111
+ },
112
+ {
113
+ name: "currentStableBorrowRate",
114
+ type: "uint128",
115
+ internalType: "uint128",
116
+ },
117
+ {
118
+ name: "lastUpdateTimestamp",
119
+ type: "uint40",
120
+ internalType: "uint40",
121
+ },
122
+ {
123
+ name: "aTokenAddress",
124
+ type: "address",
125
+ internalType: "address",
126
+ },
127
+ {
128
+ name: "stableDebtTokenAddress",
129
+ type: "address",
130
+ internalType: "address",
131
+ },
132
+ {
133
+ name: "variableDebtTokenAddress",
134
+ type: "address",
135
+ internalType: "address",
136
+ },
137
+ {
138
+ name: "interestRateStrategyAddress",
139
+ type: "address",
140
+ internalType: "address",
141
+ },
142
+ {
143
+ name: "id",
144
+ type: "uint8",
145
+ internalType: "uint8",
146
+ },
147
+ {
148
+ name: "isolationModeTotalDebt",
149
+ type: "uint128",
150
+ internalType: "uint128",
151
+ },
152
+ ],
153
+ },
154
+ ],
155
+ stateMutability: "view",
156
+ },
157
+ {
158
+ type: "function",
159
+ name: "getReservesList",
160
+ inputs: [],
161
+ outputs: [
162
+ {
163
+ name: "",
164
+ type: "address[]",
165
+ internalType: "address[]",
166
+ },
167
+ ],
168
+ stateMutability: "view",
169
+ },
170
+ {
171
+ type: "function",
172
+ name: "getUserAccountData",
173
+ inputs: [
174
+ {
175
+ name: "user",
176
+ type: "address",
177
+ internalType: "address",
178
+ },
179
+ ],
180
+ outputs: [
181
+ {
182
+ name: "totalCollateralETH",
183
+ type: "uint256",
184
+ internalType: "uint256",
185
+ },
186
+ {
187
+ name: "totalDebtETH",
188
+ type: "uint256",
189
+ internalType: "uint256",
190
+ },
191
+ {
192
+ name: "availableBorrowsETH",
193
+ type: "uint256",
194
+ internalType: "uint256",
195
+ },
196
+ {
197
+ name: "currentLiquidationThreshold",
198
+ type: "uint256",
199
+ internalType: "uint256",
200
+ },
201
+ {
202
+ name: "ltv",
203
+ type: "uint256",
204
+ internalType: "uint256",
205
+ },
206
+ {
207
+ name: "healthFactor",
208
+ type: "uint256",
209
+ internalType: "uint256",
210
+ },
211
+ ],
212
+ stateMutability: "view",
213
+ },
214
+ {
215
+ type: "function",
216
+ name: "liquidationCall",
217
+ inputs: [
218
+ {
219
+ name: "collateralAsset",
220
+ type: "address",
221
+ internalType: "address",
222
+ },
223
+ {
224
+ name: "debtAsset",
225
+ type: "address",
226
+ internalType: "address",
227
+ },
228
+ {
229
+ name: "user",
230
+ type: "address",
231
+ internalType: "address",
232
+ },
233
+ {
234
+ name: "debtToCover",
235
+ type: "uint256",
236
+ internalType: "uint256",
237
+ },
238
+ {
239
+ name: "receiveAToken",
240
+ type: "bool",
241
+ internalType: "bool",
242
+ },
243
+ ],
244
+ outputs: [],
245
+ stateMutability: "nonpayable",
246
+ },
247
+ {
248
+ type: "function",
249
+ name: "paused",
250
+ inputs: [],
251
+ outputs: [
252
+ {
253
+ name: "",
254
+ type: "bool",
255
+ internalType: "bool",
256
+ },
257
+ ],
258
+ stateMutability: "view",
259
+ },
260
+ {
261
+ type: "function",
262
+ name: "repay",
263
+ inputs: [
264
+ {
265
+ name: "asset",
266
+ type: "address",
267
+ internalType: "address",
268
+ },
269
+ {
270
+ name: "amount",
271
+ type: "uint256",
272
+ internalType: "uint256",
273
+ },
274
+ {
275
+ name: "rateMode",
276
+ type: "uint256",
277
+ internalType: "uint256",
278
+ },
279
+ {
280
+ name: "onBehalfOf",
281
+ type: "address",
282
+ internalType: "address",
283
+ },
284
+ ],
285
+ outputs: [
286
+ {
287
+ name: "",
288
+ type: "uint256",
289
+ internalType: "uint256",
290
+ },
291
+ ],
292
+ stateMutability: "nonpayable",
293
+ },
294
+ {
295
+ type: "function",
296
+ name: "setUserUseReserveAsCollateral",
297
+ inputs: [
298
+ {
299
+ name: "asset",
300
+ type: "address",
301
+ internalType: "address",
302
+ },
303
+ {
304
+ name: "useAsCollateral",
305
+ type: "bool",
306
+ internalType: "bool",
307
+ },
308
+ ],
309
+ outputs: [],
310
+ stateMutability: "nonpayable",
311
+ },
312
+ {
313
+ type: "function",
314
+ name: "swapBorrowRateMode",
315
+ inputs: [
316
+ {
317
+ name: "asset",
318
+ type: "address",
319
+ internalType: "address",
320
+ },
321
+ {
322
+ name: "rateMode",
323
+ type: "uint256",
324
+ internalType: "uint256",
325
+ },
326
+ ],
327
+ outputs: [],
328
+ stateMutability: "nonpayable",
329
+ },
330
+ {
331
+ type: "function",
332
+ name: "withdraw",
333
+ inputs: [
334
+ {
335
+ name: "asset",
336
+ type: "address",
337
+ internalType: "address",
338
+ },
339
+ {
340
+ name: "amount",
341
+ type: "uint256",
342
+ internalType: "uint256",
343
+ },
344
+ {
345
+ name: "to",
346
+ type: "address",
347
+ internalType: "address",
348
+ },
349
+ ],
350
+ outputs: [
351
+ {
352
+ name: "",
353
+ type: "uint256",
354
+ internalType: "uint256",
355
+ },
356
+ ],
357
+ stateMutability: "nonpayable",
358
+ },
359
+ {
360
+ type: "event",
361
+ name: "Borrow",
362
+ inputs: [
363
+ {
364
+ name: "reserve",
365
+ type: "address",
366
+ indexed: true,
367
+ internalType: "address",
368
+ },
369
+ {
370
+ name: "user",
371
+ type: "address",
372
+ indexed: false,
373
+ internalType: "address",
374
+ },
375
+ {
376
+ name: "onBehalfOf",
377
+ type: "address",
378
+ indexed: true,
379
+ internalType: "address",
380
+ },
381
+ {
382
+ name: "amount",
383
+ type: "uint256",
384
+ indexed: false,
385
+ internalType: "uint256",
386
+ },
387
+ {
388
+ name: "borrowRateMode",
389
+ type: "uint256",
390
+ indexed: false,
391
+ internalType: "uint256",
392
+ },
393
+ {
394
+ name: "borrowRate",
395
+ type: "uint256",
396
+ indexed: false,
397
+ internalType: "uint256",
398
+ },
399
+ {
400
+ name: "referral",
401
+ type: "uint16",
402
+ indexed: true,
403
+ internalType: "uint16",
404
+ },
405
+ ],
406
+ anonymous: false,
407
+ },
408
+ {
409
+ type: "event",
410
+ name: "Deposit",
411
+ inputs: [
412
+ {
413
+ name: "reserve",
414
+ type: "address",
415
+ indexed: true,
416
+ internalType: "address",
417
+ },
418
+ {
419
+ name: "user",
420
+ type: "address",
421
+ indexed: false,
422
+ internalType: "address",
423
+ },
424
+ {
425
+ name: "onBehalfOf",
426
+ type: "address",
427
+ indexed: true,
428
+ internalType: "address",
429
+ },
430
+ {
431
+ name: "amount",
432
+ type: "uint256",
433
+ indexed: false,
434
+ internalType: "uint256",
435
+ },
436
+ {
437
+ name: "referral",
438
+ type: "uint16",
439
+ indexed: true,
440
+ internalType: "uint16",
441
+ },
442
+ ],
443
+ anonymous: false,
444
+ },
445
+ {
446
+ type: "event",
447
+ name: "LiquidationCall",
448
+ inputs: [
449
+ {
450
+ name: "collateralAsset",
451
+ type: "address",
452
+ indexed: true,
453
+ internalType: "address",
454
+ },
455
+ {
456
+ name: "debtAsset",
457
+ type: "address",
458
+ indexed: true,
459
+ internalType: "address",
460
+ },
461
+ {
462
+ name: "user",
463
+ type: "address",
464
+ indexed: true,
465
+ internalType: "address",
466
+ },
467
+ {
468
+ name: "debtToCover",
469
+ type: "uint256",
470
+ indexed: false,
471
+ internalType: "uint256",
472
+ },
473
+ {
474
+ name: "liquidatedCollateralAmount",
475
+ type: "uint256",
476
+ indexed: false,
477
+ internalType: "uint256",
478
+ },
479
+ {
480
+ name: "liquidator",
481
+ type: "address",
482
+ indexed: false,
483
+ internalType: "address",
484
+ },
485
+ {
486
+ name: "receiveAToken",
487
+ type: "bool",
488
+ indexed: false,
489
+ internalType: "bool",
490
+ },
491
+ ],
492
+ anonymous: false,
493
+ },
494
+ {
495
+ type: "event",
496
+ name: "Repay",
497
+ inputs: [
498
+ {
499
+ name: "reserve",
500
+ type: "address",
501
+ indexed: true,
502
+ internalType: "address",
503
+ },
504
+ {
505
+ name: "user",
506
+ type: "address",
507
+ indexed: true,
508
+ internalType: "address",
509
+ },
510
+ {
511
+ name: "repayer",
512
+ type: "address",
513
+ indexed: true,
514
+ internalType: "address",
515
+ },
516
+ {
517
+ name: "amount",
518
+ type: "uint256",
519
+ indexed: false,
520
+ internalType: "uint256",
521
+ },
522
+ ],
523
+ anonymous: false,
524
+ },
525
+ {
526
+ type: "event",
527
+ name: "ReserveUsedAsCollateralDisabled",
528
+ inputs: [
529
+ {
530
+ name: "reserve",
531
+ type: "address",
532
+ indexed: true,
533
+ internalType: "address",
534
+ },
535
+ {
536
+ name: "user",
537
+ type: "address",
538
+ indexed: true,
539
+ internalType: "address",
540
+ },
541
+ ],
542
+ anonymous: false,
543
+ },
544
+ {
545
+ type: "event",
546
+ name: "ReserveUsedAsCollateralEnabled",
547
+ inputs: [
548
+ {
549
+ name: "reserve",
550
+ type: "address",
551
+ indexed: true,
552
+ internalType: "address",
553
+ },
554
+ {
555
+ name: "user",
556
+ type: "address",
557
+ indexed: true,
558
+ internalType: "address",
559
+ },
560
+ ],
561
+ anonymous: false,
562
+ },
563
+ {
564
+ type: "event",
565
+ name: "Withdraw",
566
+ inputs: [
567
+ {
568
+ name: "reserve",
569
+ type: "address",
570
+ indexed: true,
571
+ internalType: "address",
572
+ },
573
+ {
574
+ name: "user",
575
+ type: "address",
576
+ indexed: true,
577
+ internalType: "address",
578
+ },
579
+ {
580
+ name: "to",
581
+ type: "address",
582
+ indexed: true,
583
+ internalType: "address",
584
+ },
585
+ {
586
+ name: "amount",
587
+ type: "uint256",
588
+ indexed: false,
589
+ internalType: "uint256",
590
+ },
591
+ ],
592
+ anonymous: false,
593
+ },
594
+ ];
595
+ export const protocolDataProviderAbi = [
596
+ {
597
+ type: "constructor",
598
+ inputs: [
599
+ {
600
+ name: "addressesProvider",
601
+ type: "address",
602
+ internalType: "contract ILendingPoolAddressesProvider",
603
+ },
604
+ ],
605
+ stateMutability: "nonpayable",
606
+ },
607
+ {
608
+ type: "function",
609
+ name: "ADDRESSES_PROVIDER",
610
+ inputs: [],
611
+ outputs: [
612
+ {
613
+ name: "",
614
+ type: "address",
615
+ internalType: "contract ILendingPoolAddressesProvider",
616
+ },
617
+ ],
618
+ stateMutability: "view",
619
+ },
620
+ {
621
+ type: "function",
622
+ name: "getAllATokens",
623
+ inputs: [],
624
+ outputs: [
625
+ {
626
+ name: "",
627
+ type: "tuple[]",
628
+ internalType: "struct AaveProtocolDataProvider.TokenData[]",
629
+ components: [
630
+ {
631
+ name: "symbol",
632
+ type: "string",
633
+ internalType: "string",
634
+ },
635
+ {
636
+ name: "tokenAddress",
637
+ type: "address",
638
+ internalType: "address",
639
+ },
640
+ ],
641
+ },
642
+ ],
643
+ stateMutability: "view",
644
+ },
645
+ {
646
+ type: "function",
647
+ name: "getAllReservesTokens",
648
+ inputs: [],
649
+ outputs: [
650
+ {
651
+ name: "",
652
+ type: "tuple[]",
653
+ internalType: "struct AaveProtocolDataProvider.TokenData[]",
654
+ components: [
655
+ {
656
+ name: "symbol",
657
+ type: "string",
658
+ internalType: "string",
659
+ },
660
+ {
661
+ name: "tokenAddress",
662
+ type: "address",
663
+ internalType: "address",
664
+ },
665
+ ],
666
+ },
667
+ ],
668
+ stateMutability: "view",
669
+ },
670
+ {
671
+ type: "function",
672
+ name: "getReserveConfigurationData",
673
+ inputs: [
674
+ {
675
+ name: "asset",
676
+ type: "address",
677
+ internalType: "address",
678
+ },
679
+ ],
680
+ outputs: [
681
+ {
682
+ name: "decimals",
683
+ type: "uint256",
684
+ internalType: "uint256",
685
+ },
686
+ {
687
+ name: "ltv",
688
+ type: "uint256",
689
+ internalType: "uint256",
690
+ },
691
+ {
692
+ name: "liquidationThreshold",
693
+ type: "uint256",
694
+ internalType: "uint256",
695
+ },
696
+ {
697
+ name: "liquidationBonus",
698
+ type: "uint256",
699
+ internalType: "uint256",
700
+ },
701
+ {
702
+ name: "reserveFactor",
703
+ type: "uint256",
704
+ internalType: "uint256",
705
+ },
706
+ {
707
+ name: "usageAsCollateralEnabled",
708
+ type: "bool",
709
+ internalType: "bool",
710
+ },
711
+ {
712
+ name: "borrowingEnabled",
713
+ type: "bool",
714
+ internalType: "bool",
715
+ },
716
+ {
717
+ name: "stableBorrowRateEnabled",
718
+ type: "bool",
719
+ internalType: "bool",
720
+ },
721
+ {
722
+ name: "isActive",
723
+ type: "bool",
724
+ internalType: "bool",
725
+ },
726
+ {
727
+ name: "isFrozen",
728
+ type: "bool",
729
+ internalType: "bool",
730
+ },
731
+ ],
732
+ stateMutability: "view",
733
+ },
734
+ {
735
+ type: "function",
736
+ name: "getReserveData",
737
+ inputs: [
738
+ {
739
+ name: "asset",
740
+ type: "address",
741
+ internalType: "address",
742
+ },
743
+ ],
744
+ outputs: [
745
+ {
746
+ name: "availableLiquidity",
747
+ type: "uint256",
748
+ internalType: "uint256",
749
+ },
750
+ {
751
+ name: "totalStableDebt",
752
+ type: "uint256",
753
+ internalType: "uint256",
754
+ },
755
+ {
756
+ name: "totalVariableDebt",
757
+ type: "uint256",
758
+ internalType: "uint256",
759
+ },
760
+ {
761
+ name: "liquidityRate",
762
+ type: "uint256",
763
+ internalType: "uint256",
764
+ },
765
+ {
766
+ name: "variableBorrowRate",
767
+ type: "uint256",
768
+ internalType: "uint256",
769
+ },
770
+ {
771
+ name: "stableBorrowRate",
772
+ type: "uint256",
773
+ internalType: "uint256",
774
+ },
775
+ {
776
+ name: "averageStableBorrowRate",
777
+ type: "uint256",
778
+ internalType: "uint256",
779
+ },
780
+ {
781
+ name: "liquidityIndex",
782
+ type: "uint256",
783
+ internalType: "uint256",
784
+ },
785
+ {
786
+ name: "variableBorrowIndex",
787
+ type: "uint256",
788
+ internalType: "uint256",
789
+ },
790
+ {
791
+ name: "lastUpdateTimestamp",
792
+ type: "uint40",
793
+ internalType: "uint40",
794
+ },
795
+ ],
796
+ stateMutability: "view",
797
+ },
798
+ {
799
+ type: "function",
800
+ name: "getReserveTokensAddresses",
801
+ inputs: [
802
+ {
803
+ name: "asset",
804
+ type: "address",
805
+ internalType: "address",
806
+ },
807
+ ],
808
+ outputs: [
809
+ {
810
+ name: "aTokenAddress",
811
+ type: "address",
812
+ internalType: "address",
813
+ },
814
+ {
815
+ name: "stableDebtTokenAddress",
816
+ type: "address",
817
+ internalType: "address",
818
+ },
819
+ {
820
+ name: "variableDebtTokenAddress",
821
+ type: "address",
822
+ internalType: "address",
823
+ },
824
+ ],
825
+ stateMutability: "view",
826
+ },
827
+ {
828
+ type: "function",
829
+ name: "getUserReserveData",
830
+ inputs: [
831
+ {
832
+ name: "asset",
833
+ type: "address",
834
+ internalType: "address",
835
+ },
836
+ {
837
+ name: "user",
838
+ type: "address",
839
+ internalType: "address",
840
+ },
841
+ ],
842
+ outputs: [
843
+ {
844
+ name: "currentATokenBalance",
845
+ type: "uint256",
846
+ internalType: "uint256",
847
+ },
848
+ {
849
+ name: "currentStableDebt",
850
+ type: "uint256",
851
+ internalType: "uint256",
852
+ },
853
+ {
854
+ name: "currentVariableDebt",
855
+ type: "uint256",
856
+ internalType: "uint256",
857
+ },
858
+ {
859
+ name: "principalStableDebt",
860
+ type: "uint256",
861
+ internalType: "uint256",
862
+ },
863
+ {
864
+ name: "scaledVariableDebt",
865
+ type: "uint256",
866
+ internalType: "uint256",
867
+ },
868
+ {
869
+ name: "stableBorrowRate",
870
+ type: "uint256",
871
+ internalType: "uint256",
872
+ },
873
+ {
874
+ name: "liquidityRate",
875
+ type: "uint256",
876
+ internalType: "uint256",
877
+ },
878
+ {
879
+ name: "stableRateLastUpdated",
880
+ type: "uint40",
881
+ internalType: "uint40",
882
+ },
883
+ {
884
+ name: "usageAsCollateralEnabled",
885
+ type: "bool",
886
+ internalType: "bool",
887
+ },
888
+ ],
889
+ stateMutability: "view",
890
+ },
891
+ {
892
+ type: "function",
893
+ name: "getReserveCaps",
894
+ inputs: [
895
+ {
896
+ name: "asset",
897
+ type: "address",
898
+ internalType: "address",
899
+ },
900
+ ],
901
+ outputs: [
902
+ {
903
+ name: "supplyCap",
904
+ type: "uint256",
905
+ internalType: "uint256",
906
+ },
907
+ {
908
+ name: "borrowCap",
909
+ type: "uint256",
910
+ internalType: "uint256",
911
+ },
912
+ ],
913
+ stateMutability: "view",
914
+ },
915
+ ];
916
+ export const erc20Abi = [
917
+ {
918
+ type: "function",
919
+ name: "approve",
920
+ stateMutability: "nonpayable",
921
+ inputs: [
922
+ {
923
+ name: "spender",
924
+ type: "address",
925
+ },
926
+ {
927
+ name: "amount",
928
+ type: "uint256",
929
+ },
930
+ ],
931
+ outputs: [
932
+ {
933
+ type: "bool",
934
+ },
935
+ ],
936
+ },
937
+ {
938
+ type: "function",
939
+ name: "allowance",
940
+ stateMutability: "view",
941
+ inputs: [
942
+ {
943
+ name: "owner",
944
+ type: "address",
945
+ },
946
+ {
947
+ name: "spender",
948
+ type: "address",
949
+ },
950
+ ],
951
+ outputs: [
952
+ {
953
+ type: "uint256",
954
+ },
955
+ ],
956
+ },
957
+ {
958
+ type: "function",
959
+ name: "balanceOf",
960
+ stateMutability: "view",
961
+ inputs: [
962
+ {
963
+ name: "account",
964
+ type: "address",
965
+ },
966
+ ],
967
+ outputs: [
968
+ {
969
+ type: "uint256",
970
+ },
971
+ ],
972
+ },
973
+ {
974
+ type: "function",
975
+ name: "decimals",
976
+ stateMutability: "view",
977
+ inputs: [],
978
+ outputs: [
979
+ {
980
+ type: "uint8",
981
+ },
982
+ ],
983
+ },
984
+ {
985
+ type: "function",
986
+ name: "symbol",
987
+ stateMutability: "view",
988
+ inputs: [],
989
+ outputs: [
990
+ {
991
+ type: "string",
992
+ },
993
+ ],
994
+ },
995
+ {
996
+ type: "function",
997
+ name: "name",
998
+ stateMutability: "view",
999
+ inputs: [],
1000
+ outputs: [
1001
+ {
1002
+ type: "string",
1003
+ },
1004
+ ],
1005
+ },
1006
+ {
1007
+ type: "function",
1008
+ name: "totalSupply",
1009
+ stateMutability: "view",
1010
+ inputs: [],
1011
+ outputs: [
1012
+ {
1013
+ type: "uint256",
1014
+ },
1015
+ ],
1016
+ },
1017
+ ];
1018
+ export const aggregatorV3Abi = [
1019
+ {
1020
+ type: "function",
1021
+ name: "decimals",
1022
+ stateMutability: "view",
1023
+ inputs: [],
1024
+ outputs: [
1025
+ {
1026
+ type: "uint8",
1027
+ },
1028
+ ],
1029
+ },
1030
+ {
1031
+ type: "function",
1032
+ name: "latestRoundData",
1033
+ stateMutability: "view",
1034
+ inputs: [],
1035
+ outputs: [
1036
+ {
1037
+ name: "roundId",
1038
+ type: "uint80",
1039
+ },
1040
+ {
1041
+ name: "answer",
1042
+ type: "int256",
1043
+ },
1044
+ {
1045
+ name: "startedAt",
1046
+ type: "uint256",
1047
+ },
1048
+ {
1049
+ name: "updatedAt",
1050
+ type: "uint256",
1051
+ },
1052
+ {
1053
+ name: "answeredInRound",
1054
+ type: "uint80",
1055
+ },
1056
+ ],
1057
+ },
1058
+ {
1059
+ type: "function",
1060
+ name: "setAnswer",
1061
+ stateMutability: "nonpayable",
1062
+ inputs: [
1063
+ {
1064
+ name: "newAnswer",
1065
+ type: "int256",
1066
+ },
1067
+ ],
1068
+ outputs: [],
1069
+ },
1070
+ ];
1071
+ export const wethGatewayAbi = [
1072
+ {
1073
+ type: "function",
1074
+ name: "depositETH",
1075
+ stateMutability: "payable",
1076
+ inputs: [
1077
+ { name: "lendingPool", type: "address" },
1078
+ { name: "onBehalfOf", type: "address" },
1079
+ { name: "referralCode", type: "uint16" },
1080
+ ],
1081
+ outputs: [],
1082
+ },
1083
+ {
1084
+ type: "function",
1085
+ name: "withdrawETH",
1086
+ stateMutability: "nonpayable",
1087
+ inputs: [
1088
+ { name: "lendingPool", type: "address" },
1089
+ { name: "amount", type: "uint256" },
1090
+ { name: "to", type: "address" },
1091
+ ],
1092
+ outputs: [],
1093
+ },
1094
+ {
1095
+ type: "function",
1096
+ name: "repayETH",
1097
+ stateMutability: "payable",
1098
+ inputs: [
1099
+ { name: "lendingPool", type: "address" },
1100
+ { name: "amount", type: "uint256" },
1101
+ { name: "rateMode", type: "uint256" },
1102
+ { name: "onBehalfOf", type: "address" },
1103
+ ],
1104
+ outputs: [],
1105
+ },
1106
+ {
1107
+ type: "function",
1108
+ name: "borrowETH",
1109
+ stateMutability: "nonpayable",
1110
+ inputs: [
1111
+ { name: "lendingPool", type: "address" },
1112
+ { name: "amount", type: "uint256" },
1113
+ { name: "interesRateMode", type: "uint256" },
1114
+ { name: "referralCode", type: "uint16" },
1115
+ ],
1116
+ outputs: [],
1117
+ },
1118
+ {
1119
+ type: "function",
1120
+ name: "getWETHAddress",
1121
+ stateMutability: "view",
1122
+ inputs: [],
1123
+ outputs: [{ name: "", type: "address" }],
1124
+ },
1125
+ ];
1126
+ export const creditDelegationAbi = [
1127
+ {
1128
+ type: "function",
1129
+ name: "approveDelegation",
1130
+ stateMutability: "nonpayable",
1131
+ inputs: [
1132
+ { name: "delegatee", type: "address" },
1133
+ { name: "amount", type: "uint256" },
1134
+ ],
1135
+ outputs: [],
1136
+ },
1137
+ ];
1138
+ export const aaveOracleAbi = [
1139
+ {
1140
+ type: "function",
1141
+ name: "getAssetPrice",
1142
+ stateMutability: "view",
1143
+ inputs: [{ name: "asset", type: "address" }],
1144
+ outputs: [{ name: "", type: "uint256" }],
1145
+ },
1146
+ {
1147
+ type: "function",
1148
+ name: "getCollateralPrice",
1149
+ stateMutability: "view",
1150
+ inputs: [{ name: "asset", type: "address" }],
1151
+ outputs: [{ name: "", type: "uint256" }],
1152
+ },
1153
+ {
1154
+ type: "function",
1155
+ name: "getDebtPrice",
1156
+ stateMutability: "view",
1157
+ inputs: [{ name: "asset", type: "address" }],
1158
+ outputs: [{ name: "", type: "uint256" }],
1159
+ },
1160
+ {
1161
+ type: "function",
1162
+ name: "getAssetsPrices",
1163
+ stateMutability: "view",
1164
+ inputs: [{ name: "assets", type: "address[]" }],
1165
+ outputs: [{ name: "", type: "uint256[]" }],
1166
+ },
1167
+ {
1168
+ type: "function",
1169
+ name: "getSourceOfAsset",
1170
+ stateMutability: "view",
1171
+ inputs: [{ name: "asset", type: "address" }],
1172
+ outputs: [{ name: "", type: "address" }],
1173
+ },
1174
+ ];
1175
+ const lensReserveComponents = [
1176
+ { name: "token", type: "address" },
1177
+ { name: "aToken", type: "address" },
1178
+ { name: "stableDebtToken", type: "address" },
1179
+ { name: "variableDebtToken", type: "address" },
1180
+ { name: "decimals", type: "uint256" },
1181
+ { name: "isActive", type: "bool" },
1182
+ { name: "isFrozen", type: "bool" },
1183
+ { name: "borrowingEnabled", type: "bool" },
1184
+ { name: "stableBorrowEnabled", type: "bool" },
1185
+ { name: "collateralEnabled", type: "bool" },
1186
+ { name: "ltvBps", type: "uint256" },
1187
+ { name: "liquidationThresholdBps", type: "uint256" },
1188
+ { name: "liquidationBonusBps", type: "uint256" },
1189
+ { name: "reserveFactorBps", type: "uint256" },
1190
+ { name: "priceUsd", type: "uint256" },
1191
+ { name: "liquidityRate", type: "uint256" },
1192
+ { name: "variableBorrowRate", type: "uint256" },
1193
+ { name: "availableLiquidity", type: "uint256" },
1194
+ { name: "totalStableDebt", type: "uint256" },
1195
+ { name: "totalVariableDebt", type: "uint256" },
1196
+ { name: "supplyCap", type: "uint256" },
1197
+ { name: "borrowCap", type: "uint256" },
1198
+ { name: "collateralPriceUsd", type: "uint256" },
1199
+ { name: "debtPriceUsd", type: "uint256" },
1200
+ { name: "isIsolated", type: "bool" },
1201
+ { name: "borrowableInIsolation", type: "bool" },
1202
+ { name: "debtCeiling", type: "uint256" },
1203
+ { name: "isolationModeTotalDebt", type: "uint256" },
1204
+ ];
1205
+ const lensPositionComponents = [
1206
+ { name: "token", type: "address" },
1207
+ { name: "supplied", type: "uint256" },
1208
+ { name: "borrowed", type: "uint256" },
1209
+ { name: "wallet", type: "uint256" },
1210
+ { name: "isCollateral", type: "bool" },
1211
+ ];
1212
+ export const blackMarketLensAbi = [
1213
+ {
1214
+ type: "function",
1215
+ name: "MAX_LIMIT",
1216
+ stateMutability: "view",
1217
+ inputs: [],
1218
+ outputs: [{ name: "", type: "uint256" }],
1219
+ },
1220
+ {
1221
+ type: "function",
1222
+ name: "reserveCount",
1223
+ stateMutability: "view",
1224
+ inputs: [],
1225
+ outputs: [{ name: "", type: "uint256" }],
1226
+ },
1227
+ {
1228
+ type: "function",
1229
+ name: "auctionCount",
1230
+ stateMutability: "view",
1231
+ inputs: [],
1232
+ outputs: [{ name: "", type: "uint256" }],
1233
+ },
1234
+ {
1235
+ type: "function",
1236
+ name: "markets",
1237
+ stateMutability: "view",
1238
+ inputs: [
1239
+ { name: "offset", type: "uint256" },
1240
+ { name: "limit", type: "uint256" },
1241
+ ],
1242
+ outputs: [
1243
+ {
1244
+ name: "items",
1245
+ type: "tuple[]",
1246
+ components: [...lensReserveComponents],
1247
+ },
1248
+ { name: "total", type: "uint256" },
1249
+ ],
1250
+ },
1251
+ {
1252
+ type: "function",
1253
+ name: "market",
1254
+ stateMutability: "view",
1255
+ inputs: [{ name: "token", type: "address" }],
1256
+ outputs: [
1257
+ {
1258
+ name: "",
1259
+ type: "tuple",
1260
+ components: [...lensReserveComponents],
1261
+ },
1262
+ ],
1263
+ },
1264
+ {
1265
+ type: "function",
1266
+ name: "positions",
1267
+ stateMutability: "view",
1268
+ inputs: [
1269
+ { name: "user", type: "address" },
1270
+ { name: "offset", type: "uint256" },
1271
+ { name: "limit", type: "uint256" },
1272
+ ],
1273
+ outputs: [
1274
+ {
1275
+ name: "page",
1276
+ type: "tuple",
1277
+ components: [
1278
+ {
1279
+ name: "items",
1280
+ type: "tuple[]",
1281
+ components: [...lensPositionComponents],
1282
+ },
1283
+ { name: "total", type: "uint256" },
1284
+ { name: "totalCollateralWad", type: "uint256" },
1285
+ { name: "totalDebtWad", type: "uint256" },
1286
+ { name: "availableBorrowsWad", type: "uint256" },
1287
+ { name: "healthFactorWad", type: "uint256" },
1288
+ { name: "ltvBps", type: "uint256" },
1289
+ { name: "liquidationThresholdBps", type: "uint256" },
1290
+ { name: "nativeEth", type: "uint256" },
1291
+ ],
1292
+ },
1293
+ ],
1294
+ },
1295
+ {
1296
+ type: "function",
1297
+ name: "snapshot",
1298
+ stateMutability: "view",
1299
+ inputs: [
1300
+ { name: "user", type: "address" },
1301
+ { name: "offset", type: "uint256" },
1302
+ { name: "limit", type: "uint256" },
1303
+ ],
1304
+ outputs: [
1305
+ {
1306
+ name: "",
1307
+ type: "tuple",
1308
+ components: [
1309
+ {
1310
+ name: "markets",
1311
+ type: "tuple[]",
1312
+ components: [...lensReserveComponents],
1313
+ },
1314
+ { name: "marketTotal", type: "uint256" },
1315
+ {
1316
+ name: "positions",
1317
+ type: "tuple[]",
1318
+ components: [...lensPositionComponents],
1319
+ },
1320
+ { name: "positionTotal", type: "uint256" },
1321
+ { name: "totalCollateralWad", type: "uint256" },
1322
+ { name: "totalDebtWad", type: "uint256" },
1323
+ { name: "availableBorrowsWad", type: "uint256" },
1324
+ { name: "healthFactorWad", type: "uint256" },
1325
+ { name: "ltvBps", type: "uint256" },
1326
+ { name: "liquidationThresholdBps", type: "uint256" },
1327
+ { name: "nativeEth", type: "uint256" },
1328
+ ],
1329
+ },
1330
+ ],
1331
+ },
1332
+ {
1333
+ type: "function",
1334
+ name: "owner",
1335
+ stateMutability: "view",
1336
+ inputs: [],
1337
+ outputs: [{ name: "", type: "address" }],
1338
+ },
1339
+ ];
1340
+ export const uiPoolDataProviderAbi = [
1341
+ {
1342
+ type: "function",
1343
+ name: "MARKET_REFERENCE_CURRENCY_UNIT",
1344
+ stateMutability: "view",
1345
+ inputs: [],
1346
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
1347
+ },
1348
+ {
1349
+ type: "function",
1350
+ name: "getReservesData",
1351
+ stateMutability: "view",
1352
+ inputs: [
1353
+ {
1354
+ name: "provider",
1355
+ type: "address",
1356
+ internalType: "contract ILendingPoolAddressesProvider",
1357
+ },
1358
+ { name: "user", type: "address", internalType: "address" },
1359
+ ],
1360
+ outputs: [
1361
+ {
1362
+ name: "reservesData",
1363
+ type: "tuple[]",
1364
+ internalType: "struct IUiPoolDataProvider.AggregatedReserveData[]",
1365
+ components: [
1366
+ { name: "underlyingAsset", type: "address" },
1367
+ { name: "name", type: "string" },
1368
+ { name: "symbol", type: "string" },
1369
+ { name: "decimals", type: "uint256" },
1370
+ { name: "baseLTVasCollateral", type: "uint256" },
1371
+ { name: "reserveLiquidationThreshold", type: "uint256" },
1372
+ { name: "reserveLiquidationBonus", type: "uint256" },
1373
+ { name: "reserveFactor", type: "uint256" },
1374
+ { name: "usageAsCollateralEnabled", type: "bool" },
1375
+ { name: "borrowingEnabled", type: "bool" },
1376
+ { name: "stableBorrowRateEnabled", type: "bool" },
1377
+ { name: "isActive", type: "bool" },
1378
+ { name: "isFrozen", type: "bool" },
1379
+ { name: "liquidityIndex", type: "uint128" },
1380
+ { name: "variableBorrowIndex", type: "uint128" },
1381
+ { name: "liquidityRate", type: "uint128" },
1382
+ { name: "variableBorrowRate", type: "uint128" },
1383
+ { name: "stableBorrowRate", type: "uint128" },
1384
+ { name: "lastUpdateTimestamp", type: "uint40" },
1385
+ { name: "aTokenAddress", type: "address" },
1386
+ { name: "stableDebtTokenAddress", type: "address" },
1387
+ { name: "variableDebtTokenAddress", type: "address" },
1388
+ { name: "interestRateStrategyAddress", type: "address" },
1389
+ { name: "availableLiquidity", type: "uint256" },
1390
+ { name: "totalPrincipalStableDebt", type: "uint256" },
1391
+ { name: "averageStableRate", type: "uint256" },
1392
+ { name: "stableDebtLastUpdateTimestamp", type: "uint256" },
1393
+ { name: "totalScaledVariableDebt", type: "uint256" },
1394
+ { name: "priceInUsd", type: "uint256" },
1395
+ { name: "variableRateSlope1", type: "uint256" },
1396
+ { name: "variableRateSlope2", type: "uint256" },
1397
+ { name: "stableRateSlope1", type: "uint256" },
1398
+ { name: "stableRateSlope2", type: "uint256" },
1399
+ { name: "supplyCap", type: "uint256" },
1400
+ { name: "borrowCap", type: "uint256" },
1401
+ ],
1402
+ },
1403
+ {
1404
+ name: "userReservesData",
1405
+ type: "tuple[]",
1406
+ internalType: "struct IUiPoolDataProvider.UserReserveData[]",
1407
+ components: [
1408
+ { name: "underlyingAsset", type: "address" },
1409
+ { name: "scaledATokenBalance", type: "uint256" },
1410
+ { name: "usageAsCollateralEnabledOnUser", type: "bool" },
1411
+ { name: "stableBorrowRate", type: "uint256" },
1412
+ { name: "scaledVariableDebt", type: "uint256" },
1413
+ { name: "principalStableDebt", type: "uint256" },
1414
+ { name: "stableBorrowLastUpdateTimestamp", type: "uint256" },
1415
+ ],
1416
+ },
1417
+ { name: "marketReferenceCurrencyUnit", type: "uint256" },
1418
+ ],
1419
+ },
1420
+ {
1421
+ type: "function",
1422
+ name: "getUserReservesData",
1423
+ stateMutability: "view",
1424
+ inputs: [
1425
+ {
1426
+ name: "provider",
1427
+ type: "address",
1428
+ internalType: "contract ILendingPoolAddressesProvider",
1429
+ },
1430
+ { name: "user", type: "address", internalType: "address" },
1431
+ ],
1432
+ outputs: [
1433
+ {
1434
+ name: "userReservesData",
1435
+ type: "tuple[]",
1436
+ internalType: "struct IUiPoolDataProvider.UserReserveData[]",
1437
+ components: [
1438
+ { name: "underlyingAsset", type: "address" },
1439
+ { name: "scaledATokenBalance", type: "uint256" },
1440
+ { name: "usageAsCollateralEnabledOnUser", type: "bool" },
1441
+ { name: "stableBorrowRate", type: "uint256" },
1442
+ { name: "scaledVariableDebt", type: "uint256" },
1443
+ { name: "principalStableDebt", type: "uint256" },
1444
+ { name: "stableBorrowLastUpdateTimestamp", type: "uint256" },
1445
+ ],
1446
+ },
1447
+ ],
1448
+ },
1449
+ ];
1450
+ export const walletBalanceProviderAbi = [
1451
+ {
1452
+ type: "function",
1453
+ name: "getUserWalletBalances",
1454
+ stateMutability: "view",
1455
+ inputs: [
1456
+ { name: "provider", type: "address" },
1457
+ { name: "user", type: "address" },
1458
+ ],
1459
+ outputs: [
1460
+ { name: "", type: "address[]" },
1461
+ { name: "", type: "uint256[]" },
1462
+ ],
1463
+ },
1464
+ ];
1465
+ export const priceFeedAbi = [
1466
+ {
1467
+ type: "function",
1468
+ name: "fetchPrice",
1469
+ stateMutability: "view",
1470
+ inputs: [],
1471
+ outputs: [{ name: "", type: "uint256" }],
1472
+ },
1473
+ ];
1474
+ export const chainedPriceFeedAbi = [
1475
+ {
1476
+ type: "function",
1477
+ name: "base",
1478
+ stateMutability: "view",
1479
+ inputs: [],
1480
+ outputs: [{ name: "", type: "address" }],
1481
+ },
1482
+ {
1483
+ type: "function",
1484
+ name: "quoteUsd",
1485
+ stateMutability: "view",
1486
+ inputs: [],
1487
+ outputs: [{ name: "", type: "address" }],
1488
+ },
1489
+ {
1490
+ type: "function",
1491
+ name: "fetchPrice",
1492
+ stateMutability: "view",
1493
+ inputs: [],
1494
+ outputs: [{ name: "", type: "uint256" }],
1495
+ },
1496
+ {
1497
+ type: "function",
1498
+ name: "spotUsd",
1499
+ stateMutability: "view",
1500
+ inputs: [],
1501
+ outputs: [{ name: "", type: "uint256" }],
1502
+ },
1503
+ {
1504
+ type: "function",
1505
+ name: "fetchCollateralPrice",
1506
+ stateMutability: "view",
1507
+ inputs: [],
1508
+ outputs: [{ name: "", type: "uint256" }],
1509
+ },
1510
+ {
1511
+ type: "function",
1512
+ name: "fetchDebtPrice",
1513
+ stateMutability: "view",
1514
+ inputs: [],
1515
+ outputs: [{ name: "", type: "uint256" }],
1516
+ },
1517
+ ];
1518
+ const vestingSchedule = {
1519
+ type: "tuple",
1520
+ components: [
1521
+ { name: "creator", type: "address" },
1522
+ { name: "beneficiary", type: "address" },
1523
+ { name: "token", type: "address" },
1524
+ { name: "cliffTime", type: "uint64" },
1525
+ { name: "endTime", type: "uint64" },
1526
+ { name: "cliffAmount", type: "uint256" },
1527
+ { name: "totalAmount", type: "uint256" },
1528
+ { name: "releasedAmount", type: "uint256" },
1529
+ { name: "claimedCliffAmount", type: "bool" },
1530
+ ],
1531
+ };
1532
+ const vestingScheduleView = {
1533
+ type: "tuple",
1534
+ components: [
1535
+ { name: "id", type: "uint256" },
1536
+ { name: "creator", type: "address" },
1537
+ { name: "beneficiary", type: "address" },
1538
+ { name: "token", type: "address" },
1539
+ { name: "cliffTime", type: "uint64" },
1540
+ { name: "endTime", type: "uint64" },
1541
+ { name: "cliffAmount", type: "uint256" },
1542
+ { name: "totalAmount", type: "uint256" },
1543
+ { name: "releasedAmount", type: "uint256" },
1544
+ { name: "claimedCliffAmount", type: "bool" },
1545
+ { name: "claimable", type: "uint256" },
1546
+ ],
1547
+ };
1548
+ export const tokenVestingAbi = [
1549
+ {
1550
+ type: "function",
1551
+ name: "createVestingSchedule",
1552
+ stateMutability: "nonpayable",
1553
+ inputs: [
1554
+ { name: "target", type: "address" },
1555
+ { name: "token", type: "address" },
1556
+ { name: "cliffTime", type: "uint256" },
1557
+ { name: "endTime", type: "uint256" },
1558
+ { name: "cliffAmount", type: "uint256" },
1559
+ { name: "totalAmount", type: "uint256" },
1560
+ ],
1561
+ outputs: [{ name: "id", type: "uint256" }],
1562
+ },
1563
+ {
1564
+ type: "function",
1565
+ name: "claimTokens",
1566
+ stateMutability: "nonpayable",
1567
+ inputs: [{ name: "id", type: "uint256" }],
1568
+ outputs: [],
1569
+ },
1570
+ {
1571
+ type: "function",
1572
+ name: "getSchedule",
1573
+ stateMutability: "view",
1574
+ inputs: [{ name: "id", type: "uint256" }],
1575
+ outputs: [{ ...vestingSchedule, name: "" }],
1576
+ },
1577
+ {
1578
+ type: "function",
1579
+ name: "claimable",
1580
+ stateMutability: "view",
1581
+ inputs: [{ name: "id", type: "uint256" }],
1582
+ outputs: [{ name: "amount", type: "uint256" }],
1583
+ },
1584
+ {
1585
+ type: "function",
1586
+ name: "schedulesByBeneficiary",
1587
+ stateMutability: "view",
1588
+ inputs: [{ name: "beneficiary", type: "address" }],
1589
+ outputs: [{ name: "", type: "uint256[]" }],
1590
+ },
1591
+ {
1592
+ type: "function",
1593
+ name: "schedulesByCreator",
1594
+ stateMutability: "view",
1595
+ inputs: [{ name: "creator", type: "address" }],
1596
+ outputs: [{ name: "", type: "uint256[]" }],
1597
+ },
1598
+ {
1599
+ type: "function",
1600
+ name: "schedulesByToken",
1601
+ stateMutability: "view",
1602
+ inputs: [{ name: "token", type: "address" }],
1603
+ outputs: [{ name: "", type: "uint256[]" }],
1604
+ },
1605
+ {
1606
+ type: "function",
1607
+ name: "previewByIds",
1608
+ stateMutability: "view",
1609
+ inputs: [{ name: "ids", type: "uint256[]" }],
1610
+ outputs: [{ name: "rows", type: "tuple[]", components: vestingScheduleView.components }],
1611
+ },
1612
+ {
1613
+ type: "function",
1614
+ name: "previewByBeneficiary",
1615
+ stateMutability: "view",
1616
+ inputs: [{ name: "beneficiary", type: "address" }],
1617
+ outputs: [{ name: "", type: "tuple[]", components: vestingScheduleView.components }],
1618
+ },
1619
+ {
1620
+ type: "function",
1621
+ name: "previewByCreator",
1622
+ stateMutability: "view",
1623
+ inputs: [{ name: "creator", type: "address" }],
1624
+ outputs: [{ name: "", type: "tuple[]", components: vestingScheduleView.components }],
1625
+ },
1626
+ {
1627
+ type: "function",
1628
+ name: "previewByToken",
1629
+ stateMutability: "view",
1630
+ inputs: [{ name: "token", type: "address" }],
1631
+ outputs: [{ name: "", type: "tuple[]", components: vestingScheduleView.components }],
1632
+ },
1633
+ {
1634
+ type: "function",
1635
+ name: "lookup",
1636
+ stateMutability: "view",
1637
+ inputs: [
1638
+ { name: "wallet", type: "address" },
1639
+ { name: "token", type: "address" },
1640
+ ],
1641
+ outputs: [
1642
+ { name: "toWallet", type: "tuple[]", components: vestingScheduleView.components },
1643
+ { name: "fromWallet", type: "tuple[]", components: vestingScheduleView.components },
1644
+ { name: "ofToken", type: "tuple[]", components: vestingScheduleView.components },
1645
+ ],
1646
+ },
1647
+ {
1648
+ type: "function",
1649
+ name: "MAX_LOOKUP",
1650
+ stateMutability: "view",
1651
+ inputs: [],
1652
+ outputs: [{ name: "", type: "uint256" }],
1653
+ },
1654
+ {
1655
+ type: "function",
1656
+ name: "nextScheduleId",
1657
+ stateMutability: "view",
1658
+ inputs: [],
1659
+ outputs: [{ name: "", type: "uint256" }],
1660
+ },
1661
+ {
1662
+ type: "event",
1663
+ name: "VestingScheduleCreated",
1664
+ inputs: [
1665
+ { name: "id", type: "uint256", indexed: true },
1666
+ { name: "target", type: "address", indexed: true },
1667
+ { name: "token", type: "address", indexed: true },
1668
+ { name: "creator", type: "address", indexed: false },
1669
+ { name: "cliffAmount", type: "uint256", indexed: false },
1670
+ { name: "totalAmount", type: "uint256", indexed: false },
1671
+ { name: "cliffTime", type: "uint64", indexed: false },
1672
+ { name: "endTime", type: "uint64", indexed: false },
1673
+ ],
1674
+ },
1675
+ {
1676
+ type: "event",
1677
+ name: "VestingScheduleCompleted",
1678
+ inputs: [
1679
+ { name: "id", type: "uint256", indexed: true },
1680
+ { name: "target", type: "address", indexed: true },
1681
+ { name: "token", type: "address", indexed: true },
1682
+ { name: "totalAmount", type: "uint256", indexed: false },
1683
+ ],
1684
+ },
1685
+ {
1686
+ type: "event",
1687
+ name: "TokensClaimed",
1688
+ inputs: [
1689
+ { name: "id", type: "uint256", indexed: true },
1690
+ { name: "target", type: "address", indexed: true },
1691
+ { name: "token", type: "address", indexed: true },
1692
+ { name: "amount", type: "uint256", indexed: false },
1693
+ { name: "claimedCliff", type: "bool", indexed: false },
1694
+ ],
1695
+ },
1696
+ ];
1697
+ export const workbenchFaucetAbi = [
1698
+ {
1699
+ type: "function",
1700
+ name: "drip",
1701
+ stateMutability: "nonpayable",
1702
+ inputs: [],
1703
+ outputs: [],
1704
+ },
1705
+ {
1706
+ type: "function",
1707
+ name: "assets",
1708
+ stateMutability: "view",
1709
+ inputs: [],
1710
+ outputs: [{ name: "", type: "address[]" }],
1711
+ },
1712
+ {
1713
+ type: "function",
1714
+ name: "assetCount",
1715
+ stateMutability: "view",
1716
+ inputs: [],
1717
+ outputs: [{ name: "", type: "uint256" }],
1718
+ },
1719
+ {
1720
+ type: "function",
1721
+ name: "dripOf",
1722
+ stateMutability: "view",
1723
+ inputs: [{ name: "token", type: "address" }],
1724
+ outputs: [{ name: "", type: "uint256" }],
1725
+ },
1726
+ {
1727
+ type: "event",
1728
+ name: "Dripped",
1729
+ inputs: [{ name: "account", type: "address", indexed: true }],
1730
+ },
1731
+ ];
1732
+ const abyssPoolKeyComponents = [
1733
+ { internalType: "address", name: "token0", type: "address" },
1734
+ { internalType: "address", name: "token1", type: "address" },
1735
+ { internalType: "enum PoolProfile", name: "profile", type: "uint8" },
1736
+ { internalType: "uint24", name: "fee", type: "uint24" },
1737
+ { internalType: "bool", name: "quoteIsToken0", type: "bool" },
1738
+ { internalType: "bytes32", name: "oracleConfigId", type: "bytes32" },
1739
+ ];
1740
+ const abyssLiquidationRouteHopComponents = [
1741
+ {
1742
+ components: abyssPoolKeyComponents,
1743
+ internalType: "struct PoolKey",
1744
+ name: "key",
1745
+ type: "tuple",
1746
+ },
1747
+ { internalType: "bool", name: "zeroForOne", type: "bool" },
1748
+ { internalType: "uint160", name: "sqrtPriceLimitX96", type: "uint160" },
1749
+ ];
1750
+ const abyssLiquidationRequestComponents = [
1751
+ { internalType: "address", name: "borrower", type: "address" },
1752
+ { internalType: "address", name: "collateralAsset", type: "address" },
1753
+ { internalType: "address", name: "debtAsset", type: "address" },
1754
+ { internalType: "uint256", name: "debtToCover", type: "uint256" },
1755
+ { internalType: "uint256", name: "minimumProfit", type: "uint256" },
1756
+ { internalType: "uint256", name: "deadline", type: "uint256" },
1757
+ ];
1758
+ export const abyssLiquidationExecutorAbi = [
1759
+ {
1760
+ type: "constructor",
1761
+ inputs: [
1762
+ { internalType: "address", name: "lendingPool_", type: "address" },
1763
+ { internalType: "address", name: "abyssRouter_", type: "address" },
1764
+ { internalType: "address", name: "abyssFactory_", type: "address" },
1765
+ { internalType: "address", name: "owner_", type: "address" },
1766
+ { internalType: "address", name: "profitRecipient_", type: "address" },
1767
+ ],
1768
+ stateMutability: "nonpayable",
1769
+ },
1770
+ {
1771
+ type: "function",
1772
+ name: "executeLiquidation",
1773
+ inputs: [
1774
+ {
1775
+ components: abyssLiquidationRequestComponents,
1776
+ internalType: "struct AbyssLiquidationExecutor.LiquidationRequest",
1777
+ name: "request",
1778
+ type: "tuple",
1779
+ },
1780
+ ],
1781
+ outputs: [{ internalType: "uint256", name: "profit", type: "uint256" }],
1782
+ stateMutability: "nonpayable",
1783
+ },
1784
+ {
1785
+ type: "function",
1786
+ name: "executeOperation",
1787
+ inputs: [
1788
+ { internalType: "address[]", name: "assets", type: "address[]" },
1789
+ { internalType: "uint256[]", name: "amounts", type: "uint256[]" },
1790
+ { internalType: "uint256[]", name: "premiums", type: "uint256[]" },
1791
+ { internalType: "address", name: "initiator", type: "address" },
1792
+ { internalType: "bytes", name: "params", type: "bytes" },
1793
+ ],
1794
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
1795
+ stateMutability: "nonpayable",
1796
+ },
1797
+ {
1798
+ type: "function",
1799
+ name: "setOperator",
1800
+ inputs: [
1801
+ { internalType: "address", name: "operator", type: "address" },
1802
+ { internalType: "bool", name: "allowed", type: "bool" },
1803
+ ],
1804
+ outputs: [],
1805
+ stateMutability: "nonpayable",
1806
+ },
1807
+ {
1808
+ type: "function",
1809
+ name: "setProfitRecipient",
1810
+ inputs: [{ internalType: "address", name: "profitRecipient_", type: "address" }],
1811
+ outputs: [],
1812
+ stateMutability: "nonpayable",
1813
+ },
1814
+ {
1815
+ type: "function",
1816
+ name: "setRoute",
1817
+ inputs: [
1818
+ { internalType: "address", name: "collateralAsset", type: "address" },
1819
+ { internalType: "address", name: "debtAsset", type: "address" },
1820
+ {
1821
+ components: abyssLiquidationRouteHopComponents,
1822
+ internalType: "struct AbyssLiquidationExecutor.RouteHop[]",
1823
+ name: "hops",
1824
+ type: "tuple[]",
1825
+ },
1826
+ { internalType: "uint256", name: "minimumProfit", type: "uint256" },
1827
+ ],
1828
+ outputs: [],
1829
+ stateMutability: "nonpayable",
1830
+ },
1831
+ {
1832
+ type: "function",
1833
+ name: "removeRoute",
1834
+ inputs: [
1835
+ { internalType: "address", name: "collateralAsset", type: "address" },
1836
+ { internalType: "address", name: "debtAsset", type: "address" },
1837
+ ],
1838
+ outputs: [],
1839
+ stateMutability: "nonpayable",
1840
+ },
1841
+ {
1842
+ type: "function",
1843
+ name: "routeInfo",
1844
+ inputs: [
1845
+ { internalType: "address", name: "collateralAsset", type: "address" },
1846
+ { internalType: "address", name: "debtAsset", type: "address" },
1847
+ ],
1848
+ outputs: [
1849
+ { internalType: "bool", name: "enabled", type: "bool" },
1850
+ { internalType: "uint256", name: "minimumProfit", type: "uint256" },
1851
+ { internalType: "uint256", name: "hopCount", type: "uint256" },
1852
+ { internalType: "bytes32", name: "routeHash", type: "bytes32" },
1853
+ ],
1854
+ stateMutability: "view",
1855
+ },
1856
+ {
1857
+ type: "function",
1858
+ name: "routeHop",
1859
+ inputs: [
1860
+ { internalType: "address", name: "collateralAsset", type: "address" },
1861
+ { internalType: "address", name: "debtAsset", type: "address" },
1862
+ { internalType: "uint256", name: "index", type: "uint256" },
1863
+ ],
1864
+ outputs: [
1865
+ {
1866
+ components: abyssLiquidationRouteHopComponents,
1867
+ internalType: "struct AbyssLiquidationExecutor.RouteHop",
1868
+ name: "hop",
1869
+ type: "tuple",
1870
+ },
1871
+ ],
1872
+ stateMutability: "view",
1873
+ },
1874
+ ];
1875
+ //# sourceMappingURL=abis.js.map