@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/src/abis.ts ADDED
@@ -0,0 +1,1896 @@
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
+ ] as const;
595
+
596
+ export const protocolDataProviderAbi = [
597
+ {
598
+ type: "constructor",
599
+ inputs: [
600
+ {
601
+ name: "addressesProvider",
602
+ type: "address",
603
+ internalType: "contract ILendingPoolAddressesProvider",
604
+ },
605
+ ],
606
+ stateMutability: "nonpayable",
607
+ },
608
+ {
609
+ type: "function",
610
+ name: "ADDRESSES_PROVIDER",
611
+ inputs: [],
612
+ outputs: [
613
+ {
614
+ name: "",
615
+ type: "address",
616
+ internalType: "contract ILendingPoolAddressesProvider",
617
+ },
618
+ ],
619
+ stateMutability: "view",
620
+ },
621
+ {
622
+ type: "function",
623
+ name: "getAllATokens",
624
+ inputs: [],
625
+ outputs: [
626
+ {
627
+ name: "",
628
+ type: "tuple[]",
629
+ internalType: "struct AaveProtocolDataProvider.TokenData[]",
630
+ components: [
631
+ {
632
+ name: "symbol",
633
+ type: "string",
634
+ internalType: "string",
635
+ },
636
+ {
637
+ name: "tokenAddress",
638
+ type: "address",
639
+ internalType: "address",
640
+ },
641
+ ],
642
+ },
643
+ ],
644
+ stateMutability: "view",
645
+ },
646
+ {
647
+ type: "function",
648
+ name: "getAllReservesTokens",
649
+ inputs: [],
650
+ outputs: [
651
+ {
652
+ name: "",
653
+ type: "tuple[]",
654
+ internalType: "struct AaveProtocolDataProvider.TokenData[]",
655
+ components: [
656
+ {
657
+ name: "symbol",
658
+ type: "string",
659
+ internalType: "string",
660
+ },
661
+ {
662
+ name: "tokenAddress",
663
+ type: "address",
664
+ internalType: "address",
665
+ },
666
+ ],
667
+ },
668
+ ],
669
+ stateMutability: "view",
670
+ },
671
+ {
672
+ type: "function",
673
+ name: "getReserveConfigurationData",
674
+ inputs: [
675
+ {
676
+ name: "asset",
677
+ type: "address",
678
+ internalType: "address",
679
+ },
680
+ ],
681
+ outputs: [
682
+ {
683
+ name: "decimals",
684
+ type: "uint256",
685
+ internalType: "uint256",
686
+ },
687
+ {
688
+ name: "ltv",
689
+ type: "uint256",
690
+ internalType: "uint256",
691
+ },
692
+ {
693
+ name: "liquidationThreshold",
694
+ type: "uint256",
695
+ internalType: "uint256",
696
+ },
697
+ {
698
+ name: "liquidationBonus",
699
+ type: "uint256",
700
+ internalType: "uint256",
701
+ },
702
+ {
703
+ name: "reserveFactor",
704
+ type: "uint256",
705
+ internalType: "uint256",
706
+ },
707
+ {
708
+ name: "usageAsCollateralEnabled",
709
+ type: "bool",
710
+ internalType: "bool",
711
+ },
712
+ {
713
+ name: "borrowingEnabled",
714
+ type: "bool",
715
+ internalType: "bool",
716
+ },
717
+ {
718
+ name: "stableBorrowRateEnabled",
719
+ type: "bool",
720
+ internalType: "bool",
721
+ },
722
+ {
723
+ name: "isActive",
724
+ type: "bool",
725
+ internalType: "bool",
726
+ },
727
+ {
728
+ name: "isFrozen",
729
+ type: "bool",
730
+ internalType: "bool",
731
+ },
732
+ ],
733
+ stateMutability: "view",
734
+ },
735
+ {
736
+ type: "function",
737
+ name: "getReserveData",
738
+ inputs: [
739
+ {
740
+ name: "asset",
741
+ type: "address",
742
+ internalType: "address",
743
+ },
744
+ ],
745
+ outputs: [
746
+ {
747
+ name: "availableLiquidity",
748
+ type: "uint256",
749
+ internalType: "uint256",
750
+ },
751
+ {
752
+ name: "totalStableDebt",
753
+ type: "uint256",
754
+ internalType: "uint256",
755
+ },
756
+ {
757
+ name: "totalVariableDebt",
758
+ type: "uint256",
759
+ internalType: "uint256",
760
+ },
761
+ {
762
+ name: "liquidityRate",
763
+ type: "uint256",
764
+ internalType: "uint256",
765
+ },
766
+ {
767
+ name: "variableBorrowRate",
768
+ type: "uint256",
769
+ internalType: "uint256",
770
+ },
771
+ {
772
+ name: "stableBorrowRate",
773
+ type: "uint256",
774
+ internalType: "uint256",
775
+ },
776
+ {
777
+ name: "averageStableBorrowRate",
778
+ type: "uint256",
779
+ internalType: "uint256",
780
+ },
781
+ {
782
+ name: "liquidityIndex",
783
+ type: "uint256",
784
+ internalType: "uint256",
785
+ },
786
+ {
787
+ name: "variableBorrowIndex",
788
+ type: "uint256",
789
+ internalType: "uint256",
790
+ },
791
+ {
792
+ name: "lastUpdateTimestamp",
793
+ type: "uint40",
794
+ internalType: "uint40",
795
+ },
796
+ ],
797
+ stateMutability: "view",
798
+ },
799
+ {
800
+ type: "function",
801
+ name: "getReserveTokensAddresses",
802
+ inputs: [
803
+ {
804
+ name: "asset",
805
+ type: "address",
806
+ internalType: "address",
807
+ },
808
+ ],
809
+ outputs: [
810
+ {
811
+ name: "aTokenAddress",
812
+ type: "address",
813
+ internalType: "address",
814
+ },
815
+ {
816
+ name: "stableDebtTokenAddress",
817
+ type: "address",
818
+ internalType: "address",
819
+ },
820
+ {
821
+ name: "variableDebtTokenAddress",
822
+ type: "address",
823
+ internalType: "address",
824
+ },
825
+ ],
826
+ stateMutability: "view",
827
+ },
828
+ {
829
+ type: "function",
830
+ name: "getUserReserveData",
831
+ inputs: [
832
+ {
833
+ name: "asset",
834
+ type: "address",
835
+ internalType: "address",
836
+ },
837
+ {
838
+ name: "user",
839
+ type: "address",
840
+ internalType: "address",
841
+ },
842
+ ],
843
+ outputs: [
844
+ {
845
+ name: "currentATokenBalance",
846
+ type: "uint256",
847
+ internalType: "uint256",
848
+ },
849
+ {
850
+ name: "currentStableDebt",
851
+ type: "uint256",
852
+ internalType: "uint256",
853
+ },
854
+ {
855
+ name: "currentVariableDebt",
856
+ type: "uint256",
857
+ internalType: "uint256",
858
+ },
859
+ {
860
+ name: "principalStableDebt",
861
+ type: "uint256",
862
+ internalType: "uint256",
863
+ },
864
+ {
865
+ name: "scaledVariableDebt",
866
+ type: "uint256",
867
+ internalType: "uint256",
868
+ },
869
+ {
870
+ name: "stableBorrowRate",
871
+ type: "uint256",
872
+ internalType: "uint256",
873
+ },
874
+ {
875
+ name: "liquidityRate",
876
+ type: "uint256",
877
+ internalType: "uint256",
878
+ },
879
+ {
880
+ name: "stableRateLastUpdated",
881
+ type: "uint40",
882
+ internalType: "uint40",
883
+ },
884
+ {
885
+ name: "usageAsCollateralEnabled",
886
+ type: "bool",
887
+ internalType: "bool",
888
+ },
889
+ ],
890
+ stateMutability: "view",
891
+ },
892
+ {
893
+ type: "function",
894
+ name: "getReserveCaps",
895
+ inputs: [
896
+ {
897
+ name: "asset",
898
+ type: "address",
899
+ internalType: "address",
900
+ },
901
+ ],
902
+ outputs: [
903
+ {
904
+ name: "supplyCap",
905
+ type: "uint256",
906
+ internalType: "uint256",
907
+ },
908
+ {
909
+ name: "borrowCap",
910
+ type: "uint256",
911
+ internalType: "uint256",
912
+ },
913
+ ],
914
+ stateMutability: "view",
915
+ },
916
+ ] as const;
917
+
918
+ export const erc20Abi = [
919
+ {
920
+ type: "function",
921
+ name: "approve",
922
+ stateMutability: "nonpayable",
923
+ inputs: [
924
+ {
925
+ name: "spender",
926
+ type: "address",
927
+ },
928
+ {
929
+ name: "amount",
930
+ type: "uint256",
931
+ },
932
+ ],
933
+ outputs: [
934
+ {
935
+ type: "bool",
936
+ },
937
+ ],
938
+ },
939
+ {
940
+ type: "function",
941
+ name: "allowance",
942
+ stateMutability: "view",
943
+ inputs: [
944
+ {
945
+ name: "owner",
946
+ type: "address",
947
+ },
948
+ {
949
+ name: "spender",
950
+ type: "address",
951
+ },
952
+ ],
953
+ outputs: [
954
+ {
955
+ type: "uint256",
956
+ },
957
+ ],
958
+ },
959
+ {
960
+ type: "function",
961
+ name: "balanceOf",
962
+ stateMutability: "view",
963
+ inputs: [
964
+ {
965
+ name: "account",
966
+ type: "address",
967
+ },
968
+ ],
969
+ outputs: [
970
+ {
971
+ type: "uint256",
972
+ },
973
+ ],
974
+ },
975
+ {
976
+ type: "function",
977
+ name: "decimals",
978
+ stateMutability: "view",
979
+ inputs: [],
980
+ outputs: [
981
+ {
982
+ type: "uint8",
983
+ },
984
+ ],
985
+ },
986
+ {
987
+ type: "function",
988
+ name: "symbol",
989
+ stateMutability: "view",
990
+ inputs: [],
991
+ outputs: [
992
+ {
993
+ type: "string",
994
+ },
995
+ ],
996
+ },
997
+ {
998
+ type: "function",
999
+ name: "name",
1000
+ stateMutability: "view",
1001
+ inputs: [],
1002
+ outputs: [
1003
+ {
1004
+ type: "string",
1005
+ },
1006
+ ],
1007
+ },
1008
+ {
1009
+ type: "function",
1010
+ name: "totalSupply",
1011
+ stateMutability: "view",
1012
+ inputs: [],
1013
+ outputs: [
1014
+ {
1015
+ type: "uint256",
1016
+ },
1017
+ ],
1018
+ },
1019
+ ] as const;
1020
+
1021
+ export const aggregatorV3Abi = [
1022
+ {
1023
+ type: "function",
1024
+ name: "decimals",
1025
+ stateMutability: "view",
1026
+ inputs: [],
1027
+ outputs: [
1028
+ {
1029
+ type: "uint8",
1030
+ },
1031
+ ],
1032
+ },
1033
+ {
1034
+ type: "function",
1035
+ name: "latestRoundData",
1036
+ stateMutability: "view",
1037
+ inputs: [],
1038
+ outputs: [
1039
+ {
1040
+ name: "roundId",
1041
+ type: "uint80",
1042
+ },
1043
+ {
1044
+ name: "answer",
1045
+ type: "int256",
1046
+ },
1047
+ {
1048
+ name: "startedAt",
1049
+ type: "uint256",
1050
+ },
1051
+ {
1052
+ name: "updatedAt",
1053
+ type: "uint256",
1054
+ },
1055
+ {
1056
+ name: "answeredInRound",
1057
+ type: "uint80",
1058
+ },
1059
+ ],
1060
+ },
1061
+ {
1062
+ type: "function",
1063
+ name: "setAnswer",
1064
+ stateMutability: "nonpayable",
1065
+ inputs: [
1066
+ {
1067
+ name: "newAnswer",
1068
+ type: "int256",
1069
+ },
1070
+ ],
1071
+ outputs: [],
1072
+ },
1073
+ ] as const;
1074
+
1075
+ export const wethGatewayAbi = [
1076
+ {
1077
+ type: "function",
1078
+ name: "depositETH",
1079
+ stateMutability: "payable",
1080
+ inputs: [
1081
+ { name: "lendingPool", type: "address" },
1082
+ { name: "onBehalfOf", type: "address" },
1083
+ { name: "referralCode", type: "uint16" },
1084
+ ],
1085
+ outputs: [],
1086
+ },
1087
+ {
1088
+ type: "function",
1089
+ name: "withdrawETH",
1090
+ stateMutability: "nonpayable",
1091
+ inputs: [
1092
+ { name: "lendingPool", type: "address" },
1093
+ { name: "amount", type: "uint256" },
1094
+ { name: "to", type: "address" },
1095
+ ],
1096
+ outputs: [],
1097
+ },
1098
+ {
1099
+ type: "function",
1100
+ name: "repayETH",
1101
+ stateMutability: "payable",
1102
+ inputs: [
1103
+ { name: "lendingPool", type: "address" },
1104
+ { name: "amount", type: "uint256" },
1105
+ { name: "rateMode", type: "uint256" },
1106
+ { name: "onBehalfOf", type: "address" },
1107
+ ],
1108
+ outputs: [],
1109
+ },
1110
+ {
1111
+ type: "function",
1112
+ name: "borrowETH",
1113
+ stateMutability: "nonpayable",
1114
+ inputs: [
1115
+ { name: "lendingPool", type: "address" },
1116
+ { name: "amount", type: "uint256" },
1117
+ { name: "interesRateMode", type: "uint256" },
1118
+ { name: "referralCode", type: "uint16" },
1119
+ ],
1120
+ outputs: [],
1121
+ },
1122
+ {
1123
+ type: "function",
1124
+ name: "getWETHAddress",
1125
+ stateMutability: "view",
1126
+ inputs: [],
1127
+ outputs: [{ name: "", type: "address" }],
1128
+ },
1129
+ ] as const;
1130
+
1131
+ export const creditDelegationAbi = [
1132
+ {
1133
+ type: "function",
1134
+ name: "approveDelegation",
1135
+ stateMutability: "nonpayable",
1136
+ inputs: [
1137
+ { name: "delegatee", type: "address" },
1138
+ { name: "amount", type: "uint256" },
1139
+ ],
1140
+ outputs: [],
1141
+ },
1142
+ ] as const;
1143
+
1144
+ export const aaveOracleAbi = [
1145
+ {
1146
+ type: "function",
1147
+ name: "getAssetPrice",
1148
+ stateMutability: "view",
1149
+ inputs: [{ name: "asset", type: "address" }],
1150
+ outputs: [{ name: "", type: "uint256" }],
1151
+ },
1152
+ {
1153
+ type: "function",
1154
+ name: "getCollateralPrice",
1155
+ stateMutability: "view",
1156
+ inputs: [{ name: "asset", type: "address" }],
1157
+ outputs: [{ name: "", type: "uint256" }],
1158
+ },
1159
+ {
1160
+ type: "function",
1161
+ name: "getDebtPrice",
1162
+ stateMutability: "view",
1163
+ inputs: [{ name: "asset", type: "address" }],
1164
+ outputs: [{ name: "", type: "uint256" }],
1165
+ },
1166
+ {
1167
+ type: "function",
1168
+ name: "getAssetsPrices",
1169
+ stateMutability: "view",
1170
+ inputs: [{ name: "assets", type: "address[]" }],
1171
+ outputs: [{ name: "", type: "uint256[]" }],
1172
+ },
1173
+ {
1174
+ type: "function",
1175
+ name: "getSourceOfAsset",
1176
+ stateMutability: "view",
1177
+ inputs: [{ name: "asset", type: "address" }],
1178
+ outputs: [{ name: "", type: "address" }],
1179
+ },
1180
+ ] as const;
1181
+
1182
+ const lensReserveComponents = [
1183
+ { name: "token", type: "address" },
1184
+ { name: "aToken", type: "address" },
1185
+ { name: "stableDebtToken", type: "address" },
1186
+ { name: "variableDebtToken", type: "address" },
1187
+ { name: "decimals", type: "uint256" },
1188
+ { name: "isActive", type: "bool" },
1189
+ { name: "isFrozen", type: "bool" },
1190
+ { name: "borrowingEnabled", type: "bool" },
1191
+ { name: "stableBorrowEnabled", type: "bool" },
1192
+ { name: "collateralEnabled", type: "bool" },
1193
+ { name: "ltvBps", type: "uint256" },
1194
+ { name: "liquidationThresholdBps", type: "uint256" },
1195
+ { name: "liquidationBonusBps", type: "uint256" },
1196
+ { name: "reserveFactorBps", type: "uint256" },
1197
+ { name: "priceUsd", type: "uint256" },
1198
+ { name: "liquidityRate", type: "uint256" },
1199
+ { name: "variableBorrowRate", type: "uint256" },
1200
+ { name: "availableLiquidity", type: "uint256" },
1201
+ { name: "totalStableDebt", type: "uint256" },
1202
+ { name: "totalVariableDebt", type: "uint256" },
1203
+ { name: "supplyCap", type: "uint256" },
1204
+ { name: "borrowCap", type: "uint256" },
1205
+ { name: "collateralPriceUsd", type: "uint256" },
1206
+ { name: "debtPriceUsd", type: "uint256" },
1207
+ { name: "isIsolated", type: "bool" },
1208
+ { name: "borrowableInIsolation", type: "bool" },
1209
+ { name: "debtCeiling", type: "uint256" },
1210
+ { name: "isolationModeTotalDebt", type: "uint256" },
1211
+ ] as const;
1212
+
1213
+ const lensPositionComponents = [
1214
+ { name: "token", type: "address" },
1215
+ { name: "supplied", type: "uint256" },
1216
+ { name: "borrowed", type: "uint256" },
1217
+ { name: "wallet", type: "uint256" },
1218
+ { name: "isCollateral", type: "bool" },
1219
+ ] as const;
1220
+
1221
+ export const blackMarketLensAbi = [
1222
+ {
1223
+ type: "function",
1224
+ name: "MAX_LIMIT",
1225
+ stateMutability: "view",
1226
+ inputs: [],
1227
+ outputs: [{ name: "", type: "uint256" }],
1228
+ },
1229
+ {
1230
+ type: "function",
1231
+ name: "reserveCount",
1232
+ stateMutability: "view",
1233
+ inputs: [],
1234
+ outputs: [{ name: "", type: "uint256" }],
1235
+ },
1236
+ {
1237
+ type: "function",
1238
+ name: "auctionCount",
1239
+ stateMutability: "view",
1240
+ inputs: [],
1241
+ outputs: [{ name: "", type: "uint256" }],
1242
+ },
1243
+ {
1244
+ type: "function",
1245
+ name: "markets",
1246
+ stateMutability: "view",
1247
+ inputs: [
1248
+ { name: "offset", type: "uint256" },
1249
+ { name: "limit", type: "uint256" },
1250
+ ],
1251
+ outputs: [
1252
+ {
1253
+ name: "items",
1254
+ type: "tuple[]",
1255
+ components: [...lensReserveComponents],
1256
+ },
1257
+ { name: "total", type: "uint256" },
1258
+ ],
1259
+ },
1260
+ {
1261
+ type: "function",
1262
+ name: "market",
1263
+ stateMutability: "view",
1264
+ inputs: [{ name: "token", type: "address" }],
1265
+ outputs: [
1266
+ {
1267
+ name: "",
1268
+ type: "tuple",
1269
+ components: [...lensReserveComponents],
1270
+ },
1271
+ ],
1272
+ },
1273
+ {
1274
+ type: "function",
1275
+ name: "positions",
1276
+ stateMutability: "view",
1277
+ inputs: [
1278
+ { name: "user", type: "address" },
1279
+ { name: "offset", type: "uint256" },
1280
+ { name: "limit", type: "uint256" },
1281
+ ],
1282
+ outputs: [
1283
+ {
1284
+ name: "page",
1285
+ type: "tuple",
1286
+ components: [
1287
+ {
1288
+ name: "items",
1289
+ type: "tuple[]",
1290
+ components: [...lensPositionComponents],
1291
+ },
1292
+ { name: "total", type: "uint256" },
1293
+ { name: "totalCollateralWad", type: "uint256" },
1294
+ { name: "totalDebtWad", type: "uint256" },
1295
+ { name: "availableBorrowsWad", type: "uint256" },
1296
+ { name: "healthFactorWad", type: "uint256" },
1297
+ { name: "ltvBps", type: "uint256" },
1298
+ { name: "liquidationThresholdBps", type: "uint256" },
1299
+ { name: "nativeEth", type: "uint256" },
1300
+ ],
1301
+ },
1302
+ ],
1303
+ },
1304
+ {
1305
+ type: "function",
1306
+ name: "snapshot",
1307
+ stateMutability: "view",
1308
+ inputs: [
1309
+ { name: "user", type: "address" },
1310
+ { name: "offset", type: "uint256" },
1311
+ { name: "limit", type: "uint256" },
1312
+ ],
1313
+ outputs: [
1314
+ {
1315
+ name: "",
1316
+ type: "tuple",
1317
+ components: [
1318
+ {
1319
+ name: "markets",
1320
+ type: "tuple[]",
1321
+ components: [...lensReserveComponents],
1322
+ },
1323
+ { name: "marketTotal", type: "uint256" },
1324
+ {
1325
+ name: "positions",
1326
+ type: "tuple[]",
1327
+ components: [...lensPositionComponents],
1328
+ },
1329
+ { name: "positionTotal", type: "uint256" },
1330
+ { name: "totalCollateralWad", type: "uint256" },
1331
+ { name: "totalDebtWad", type: "uint256" },
1332
+ { name: "availableBorrowsWad", type: "uint256" },
1333
+ { name: "healthFactorWad", type: "uint256" },
1334
+ { name: "ltvBps", type: "uint256" },
1335
+ { name: "liquidationThresholdBps", type: "uint256" },
1336
+ { name: "nativeEth", type: "uint256" },
1337
+ ],
1338
+ },
1339
+ ],
1340
+ },
1341
+ {
1342
+ type: "function",
1343
+ name: "owner",
1344
+ stateMutability: "view",
1345
+ inputs: [],
1346
+ outputs: [{ name: "", type: "address" }],
1347
+ },
1348
+ ] as const;
1349
+
1350
+ export const uiPoolDataProviderAbi = [
1351
+ {
1352
+ type: "function",
1353
+ name: "MARKET_REFERENCE_CURRENCY_UNIT",
1354
+ stateMutability: "view",
1355
+ inputs: [],
1356
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
1357
+ },
1358
+ {
1359
+ type: "function",
1360
+ name: "getReservesData",
1361
+ stateMutability: "view",
1362
+ inputs: [
1363
+ {
1364
+ name: "provider",
1365
+ type: "address",
1366
+ internalType: "contract ILendingPoolAddressesProvider",
1367
+ },
1368
+ { name: "user", type: "address", internalType: "address" },
1369
+ ],
1370
+ outputs: [
1371
+ {
1372
+ name: "reservesData",
1373
+ type: "tuple[]",
1374
+ internalType: "struct IUiPoolDataProvider.AggregatedReserveData[]",
1375
+ components: [
1376
+ { name: "underlyingAsset", type: "address" },
1377
+ { name: "name", type: "string" },
1378
+ { name: "symbol", type: "string" },
1379
+ { name: "decimals", type: "uint256" },
1380
+ { name: "baseLTVasCollateral", type: "uint256" },
1381
+ { name: "reserveLiquidationThreshold", type: "uint256" },
1382
+ { name: "reserveLiquidationBonus", type: "uint256" },
1383
+ { name: "reserveFactor", type: "uint256" },
1384
+ { name: "usageAsCollateralEnabled", type: "bool" },
1385
+ { name: "borrowingEnabled", type: "bool" },
1386
+ { name: "stableBorrowRateEnabled", type: "bool" },
1387
+ { name: "isActive", type: "bool" },
1388
+ { name: "isFrozen", type: "bool" },
1389
+ { name: "liquidityIndex", type: "uint128" },
1390
+ { name: "variableBorrowIndex", type: "uint128" },
1391
+ { name: "liquidityRate", type: "uint128" },
1392
+ { name: "variableBorrowRate", type: "uint128" },
1393
+ { name: "stableBorrowRate", type: "uint128" },
1394
+ { name: "lastUpdateTimestamp", type: "uint40" },
1395
+ { name: "aTokenAddress", type: "address" },
1396
+ { name: "stableDebtTokenAddress", type: "address" },
1397
+ { name: "variableDebtTokenAddress", type: "address" },
1398
+ { name: "interestRateStrategyAddress", type: "address" },
1399
+ { name: "availableLiquidity", type: "uint256" },
1400
+ { name: "totalPrincipalStableDebt", type: "uint256" },
1401
+ { name: "averageStableRate", type: "uint256" },
1402
+ { name: "stableDebtLastUpdateTimestamp", type: "uint256" },
1403
+ { name: "totalScaledVariableDebt", type: "uint256" },
1404
+ { name: "priceInUsd", type: "uint256" },
1405
+ { name: "variableRateSlope1", type: "uint256" },
1406
+ { name: "variableRateSlope2", type: "uint256" },
1407
+ { name: "stableRateSlope1", type: "uint256" },
1408
+ { name: "stableRateSlope2", type: "uint256" },
1409
+ { name: "supplyCap", type: "uint256" },
1410
+ { name: "borrowCap", type: "uint256" },
1411
+ ],
1412
+ },
1413
+ {
1414
+ name: "userReservesData",
1415
+ type: "tuple[]",
1416
+ internalType: "struct IUiPoolDataProvider.UserReserveData[]",
1417
+ components: [
1418
+ { name: "underlyingAsset", type: "address" },
1419
+ { name: "scaledATokenBalance", type: "uint256" },
1420
+ { name: "usageAsCollateralEnabledOnUser", type: "bool" },
1421
+ { name: "stableBorrowRate", type: "uint256" },
1422
+ { name: "scaledVariableDebt", type: "uint256" },
1423
+ { name: "principalStableDebt", type: "uint256" },
1424
+ { name: "stableBorrowLastUpdateTimestamp", type: "uint256" },
1425
+ ],
1426
+ },
1427
+ { name: "marketReferenceCurrencyUnit", type: "uint256" },
1428
+ ],
1429
+ },
1430
+ {
1431
+ type: "function",
1432
+ name: "getUserReservesData",
1433
+ stateMutability: "view",
1434
+ inputs: [
1435
+ {
1436
+ name: "provider",
1437
+ type: "address",
1438
+ internalType: "contract ILendingPoolAddressesProvider",
1439
+ },
1440
+ { name: "user", type: "address", internalType: "address" },
1441
+ ],
1442
+ outputs: [
1443
+ {
1444
+ name: "userReservesData",
1445
+ type: "tuple[]",
1446
+ internalType: "struct IUiPoolDataProvider.UserReserveData[]",
1447
+ components: [
1448
+ { name: "underlyingAsset", type: "address" },
1449
+ { name: "scaledATokenBalance", type: "uint256" },
1450
+ { name: "usageAsCollateralEnabledOnUser", type: "bool" },
1451
+ { name: "stableBorrowRate", type: "uint256" },
1452
+ { name: "scaledVariableDebt", type: "uint256" },
1453
+ { name: "principalStableDebt", type: "uint256" },
1454
+ { name: "stableBorrowLastUpdateTimestamp", type: "uint256" },
1455
+ ],
1456
+ },
1457
+ ],
1458
+ },
1459
+ ] as const;
1460
+
1461
+ export const walletBalanceProviderAbi = [
1462
+ {
1463
+ type: "function",
1464
+ name: "getUserWalletBalances",
1465
+ stateMutability: "view",
1466
+ inputs: [
1467
+ { name: "provider", type: "address" },
1468
+ { name: "user", type: "address" },
1469
+ ],
1470
+ outputs: [
1471
+ { name: "", type: "address[]" },
1472
+ { name: "", type: "uint256[]" },
1473
+ ],
1474
+ },
1475
+ ] as const;
1476
+
1477
+ export const priceFeedAbi = [
1478
+ {
1479
+ type: "function",
1480
+ name: "fetchPrice",
1481
+ stateMutability: "view",
1482
+ inputs: [],
1483
+ outputs: [{ name: "", type: "uint256" }],
1484
+ },
1485
+ ] as const;
1486
+
1487
+ export const chainedPriceFeedAbi = [
1488
+ {
1489
+ type: "function",
1490
+ name: "base",
1491
+ stateMutability: "view",
1492
+ inputs: [],
1493
+ outputs: [{ name: "", type: "address" }],
1494
+ },
1495
+ {
1496
+ type: "function",
1497
+ name: "quoteUsd",
1498
+ stateMutability: "view",
1499
+ inputs: [],
1500
+ outputs: [{ name: "", type: "address" }],
1501
+ },
1502
+ {
1503
+ type: "function",
1504
+ name: "fetchPrice",
1505
+ stateMutability: "view",
1506
+ inputs: [],
1507
+ outputs: [{ name: "", type: "uint256" }],
1508
+ },
1509
+ {
1510
+ type: "function",
1511
+ name: "spotUsd",
1512
+ stateMutability: "view",
1513
+ inputs: [],
1514
+ outputs: [{ name: "", type: "uint256" }],
1515
+ },
1516
+ {
1517
+ type: "function",
1518
+ name: "fetchCollateralPrice",
1519
+ stateMutability: "view",
1520
+ inputs: [],
1521
+ outputs: [{ name: "", type: "uint256" }],
1522
+ },
1523
+ {
1524
+ type: "function",
1525
+ name: "fetchDebtPrice",
1526
+ stateMutability: "view",
1527
+ inputs: [],
1528
+ outputs: [{ name: "", type: "uint256" }],
1529
+ },
1530
+ ] as const;
1531
+
1532
+ const vestingSchedule = {
1533
+ type: "tuple",
1534
+ components: [
1535
+ { name: "creator", type: "address" },
1536
+ { name: "beneficiary", type: "address" },
1537
+ { name: "token", type: "address" },
1538
+ { name: "cliffTime", type: "uint64" },
1539
+ { name: "endTime", type: "uint64" },
1540
+ { name: "cliffAmount", type: "uint256" },
1541
+ { name: "totalAmount", type: "uint256" },
1542
+ { name: "releasedAmount", type: "uint256" },
1543
+ { name: "claimedCliffAmount", type: "bool" },
1544
+ ],
1545
+ } as const;
1546
+
1547
+ const vestingScheduleView = {
1548
+ type: "tuple",
1549
+ components: [
1550
+ { name: "id", type: "uint256" },
1551
+ { name: "creator", type: "address" },
1552
+ { name: "beneficiary", type: "address" },
1553
+ { name: "token", type: "address" },
1554
+ { name: "cliffTime", type: "uint64" },
1555
+ { name: "endTime", type: "uint64" },
1556
+ { name: "cliffAmount", type: "uint256" },
1557
+ { name: "totalAmount", type: "uint256" },
1558
+ { name: "releasedAmount", type: "uint256" },
1559
+ { name: "claimedCliffAmount", type: "bool" },
1560
+ { name: "claimable", type: "uint256" },
1561
+ ],
1562
+ } as const;
1563
+
1564
+ export const tokenVestingAbi = [
1565
+ {
1566
+ type: "function",
1567
+ name: "createVestingSchedule",
1568
+ stateMutability: "nonpayable",
1569
+ inputs: [
1570
+ { name: "target", type: "address" },
1571
+ { name: "token", type: "address" },
1572
+ { name: "cliffTime", type: "uint256" },
1573
+ { name: "endTime", type: "uint256" },
1574
+ { name: "cliffAmount", type: "uint256" },
1575
+ { name: "totalAmount", type: "uint256" },
1576
+ ],
1577
+ outputs: [{ name: "id", type: "uint256" }],
1578
+ },
1579
+ {
1580
+ type: "function",
1581
+ name: "claimTokens",
1582
+ stateMutability: "nonpayable",
1583
+ inputs: [{ name: "id", type: "uint256" }],
1584
+ outputs: [],
1585
+ },
1586
+ {
1587
+ type: "function",
1588
+ name: "getSchedule",
1589
+ stateMutability: "view",
1590
+ inputs: [{ name: "id", type: "uint256" }],
1591
+ outputs: [{ ...vestingSchedule, name: "" }],
1592
+ },
1593
+ {
1594
+ type: "function",
1595
+ name: "claimable",
1596
+ stateMutability: "view",
1597
+ inputs: [{ name: "id", type: "uint256" }],
1598
+ outputs: [{ name: "amount", type: "uint256" }],
1599
+ },
1600
+ {
1601
+ type: "function",
1602
+ name: "schedulesByBeneficiary",
1603
+ stateMutability: "view",
1604
+ inputs: [{ name: "beneficiary", type: "address" }],
1605
+ outputs: [{ name: "", type: "uint256[]" }],
1606
+ },
1607
+ {
1608
+ type: "function",
1609
+ name: "schedulesByCreator",
1610
+ stateMutability: "view",
1611
+ inputs: [{ name: "creator", type: "address" }],
1612
+ outputs: [{ name: "", type: "uint256[]" }],
1613
+ },
1614
+ {
1615
+ type: "function",
1616
+ name: "schedulesByToken",
1617
+ stateMutability: "view",
1618
+ inputs: [{ name: "token", type: "address" }],
1619
+ outputs: [{ name: "", type: "uint256[]" }],
1620
+ },
1621
+ {
1622
+ type: "function",
1623
+ name: "previewByIds",
1624
+ stateMutability: "view",
1625
+ inputs: [{ name: "ids", type: "uint256[]" }],
1626
+ outputs: [{ name: "rows", type: "tuple[]", components: vestingScheduleView.components }],
1627
+ },
1628
+ {
1629
+ type: "function",
1630
+ name: "previewByBeneficiary",
1631
+ stateMutability: "view",
1632
+ inputs: [{ name: "beneficiary", type: "address" }],
1633
+ outputs: [{ name: "", type: "tuple[]", components: vestingScheduleView.components }],
1634
+ },
1635
+ {
1636
+ type: "function",
1637
+ name: "previewByCreator",
1638
+ stateMutability: "view",
1639
+ inputs: [{ name: "creator", type: "address" }],
1640
+ outputs: [{ name: "", type: "tuple[]", components: vestingScheduleView.components }],
1641
+ },
1642
+ {
1643
+ type: "function",
1644
+ name: "previewByToken",
1645
+ stateMutability: "view",
1646
+ inputs: [{ name: "token", type: "address" }],
1647
+ outputs: [{ name: "", type: "tuple[]", components: vestingScheduleView.components }],
1648
+ },
1649
+ {
1650
+ type: "function",
1651
+ name: "lookup",
1652
+ stateMutability: "view",
1653
+ inputs: [
1654
+ { name: "wallet", type: "address" },
1655
+ { name: "token", type: "address" },
1656
+ ],
1657
+ outputs: [
1658
+ { name: "toWallet", type: "tuple[]", components: vestingScheduleView.components },
1659
+ { name: "fromWallet", type: "tuple[]", components: vestingScheduleView.components },
1660
+ { name: "ofToken", type: "tuple[]", components: vestingScheduleView.components },
1661
+ ],
1662
+ },
1663
+ {
1664
+ type: "function",
1665
+ name: "MAX_LOOKUP",
1666
+ stateMutability: "view",
1667
+ inputs: [],
1668
+ outputs: [{ name: "", type: "uint256" }],
1669
+ },
1670
+ {
1671
+ type: "function",
1672
+ name: "nextScheduleId",
1673
+ stateMutability: "view",
1674
+ inputs: [],
1675
+ outputs: [{ name: "", type: "uint256" }],
1676
+ },
1677
+ {
1678
+ type: "event",
1679
+ name: "VestingScheduleCreated",
1680
+ inputs: [
1681
+ { name: "id", type: "uint256", indexed: true },
1682
+ { name: "target", type: "address", indexed: true },
1683
+ { name: "token", type: "address", indexed: true },
1684
+ { name: "creator", type: "address", indexed: false },
1685
+ { name: "cliffAmount", type: "uint256", indexed: false },
1686
+ { name: "totalAmount", type: "uint256", indexed: false },
1687
+ { name: "cliffTime", type: "uint64", indexed: false },
1688
+ { name: "endTime", type: "uint64", indexed: false },
1689
+ ],
1690
+ },
1691
+ {
1692
+ type: "event",
1693
+ name: "VestingScheduleCompleted",
1694
+ inputs: [
1695
+ { name: "id", type: "uint256", indexed: true },
1696
+ { name: "target", type: "address", indexed: true },
1697
+ { name: "token", type: "address", indexed: true },
1698
+ { name: "totalAmount", type: "uint256", indexed: false },
1699
+ ],
1700
+ },
1701
+ {
1702
+ type: "event",
1703
+ name: "TokensClaimed",
1704
+ inputs: [
1705
+ { name: "id", type: "uint256", indexed: true },
1706
+ { name: "target", type: "address", indexed: true },
1707
+ { name: "token", type: "address", indexed: true },
1708
+ { name: "amount", type: "uint256", indexed: false },
1709
+ { name: "claimedCliff", type: "bool", indexed: false },
1710
+ ],
1711
+ },
1712
+ ] as const;
1713
+
1714
+ export const workbenchFaucetAbi = [
1715
+ {
1716
+ type: "function",
1717
+ name: "drip",
1718
+ stateMutability: "nonpayable",
1719
+ inputs: [],
1720
+ outputs: [],
1721
+ },
1722
+ {
1723
+ type: "function",
1724
+ name: "assets",
1725
+ stateMutability: "view",
1726
+ inputs: [],
1727
+ outputs: [{ name: "", type: "address[]" }],
1728
+ },
1729
+ {
1730
+ type: "function",
1731
+ name: "assetCount",
1732
+ stateMutability: "view",
1733
+ inputs: [],
1734
+ outputs: [{ name: "", type: "uint256" }],
1735
+ },
1736
+ {
1737
+ type: "function",
1738
+ name: "dripOf",
1739
+ stateMutability: "view",
1740
+ inputs: [{ name: "token", type: "address" }],
1741
+ outputs: [{ name: "", type: "uint256" }],
1742
+ },
1743
+ {
1744
+ type: "event",
1745
+ name: "Dripped",
1746
+ inputs: [{ name: "account", type: "address", indexed: true }],
1747
+ },
1748
+ ] as const;
1749
+
1750
+ const abyssPoolKeyComponents = [
1751
+ { internalType: "address", name: "token0", type: "address" },
1752
+ { internalType: "address", name: "token1", type: "address" },
1753
+ { internalType: "enum PoolProfile", name: "profile", type: "uint8" },
1754
+ { internalType: "uint24", name: "fee", type: "uint24" },
1755
+ { internalType: "bool", name: "quoteIsToken0", type: "bool" },
1756
+ { internalType: "bytes32", name: "oracleConfigId", type: "bytes32" },
1757
+ ] as const;
1758
+
1759
+ const abyssLiquidationRouteHopComponents = [
1760
+ {
1761
+ components: abyssPoolKeyComponents,
1762
+ internalType: "struct PoolKey",
1763
+ name: "key",
1764
+ type: "tuple",
1765
+ },
1766
+ { internalType: "bool", name: "zeroForOne", type: "bool" },
1767
+ { internalType: "uint160", name: "sqrtPriceLimitX96", type: "uint160" },
1768
+ ] as const;
1769
+
1770
+ const abyssLiquidationRequestComponents = [
1771
+ { internalType: "address", name: "borrower", type: "address" },
1772
+ { internalType: "address", name: "collateralAsset", type: "address" },
1773
+ { internalType: "address", name: "debtAsset", type: "address" },
1774
+ { internalType: "uint256", name: "debtToCover", type: "uint256" },
1775
+ { internalType: "uint256", name: "minimumProfit", type: "uint256" },
1776
+ { internalType: "uint256", name: "deadline", type: "uint256" },
1777
+ ] as const;
1778
+
1779
+ export const abyssLiquidationExecutorAbi = [
1780
+ {
1781
+ type: "constructor",
1782
+ inputs: [
1783
+ { internalType: "address", name: "lendingPool_", type: "address" },
1784
+ { internalType: "address", name: "abyssRouter_", type: "address" },
1785
+ { internalType: "address", name: "abyssFactory_", type: "address" },
1786
+ { internalType: "address", name: "owner_", type: "address" },
1787
+ { internalType: "address", name: "profitRecipient_", type: "address" },
1788
+ ],
1789
+ stateMutability: "nonpayable",
1790
+ },
1791
+ {
1792
+ type: "function",
1793
+ name: "executeLiquidation",
1794
+ inputs: [
1795
+ {
1796
+ components: abyssLiquidationRequestComponents,
1797
+ internalType: "struct AbyssLiquidationExecutor.LiquidationRequest",
1798
+ name: "request",
1799
+ type: "tuple",
1800
+ },
1801
+ ],
1802
+ outputs: [{ internalType: "uint256", name: "profit", type: "uint256" }],
1803
+ stateMutability: "nonpayable",
1804
+ },
1805
+ {
1806
+ type: "function",
1807
+ name: "executeOperation",
1808
+ inputs: [
1809
+ { internalType: "address[]", name: "assets", type: "address[]" },
1810
+ { internalType: "uint256[]", name: "amounts", type: "uint256[]" },
1811
+ { internalType: "uint256[]", name: "premiums", type: "uint256[]" },
1812
+ { internalType: "address", name: "initiator", type: "address" },
1813
+ { internalType: "bytes", name: "params", type: "bytes" },
1814
+ ],
1815
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
1816
+ stateMutability: "nonpayable",
1817
+ },
1818
+ {
1819
+ type: "function",
1820
+ name: "setOperator",
1821
+ inputs: [
1822
+ { internalType: "address", name: "operator", type: "address" },
1823
+ { internalType: "bool", name: "allowed", type: "bool" },
1824
+ ],
1825
+ outputs: [],
1826
+ stateMutability: "nonpayable",
1827
+ },
1828
+ {
1829
+ type: "function",
1830
+ name: "setProfitRecipient",
1831
+ inputs: [{ internalType: "address", name: "profitRecipient_", type: "address" }],
1832
+ outputs: [],
1833
+ stateMutability: "nonpayable",
1834
+ },
1835
+ {
1836
+ type: "function",
1837
+ name: "setRoute",
1838
+ inputs: [
1839
+ { internalType: "address", name: "collateralAsset", type: "address" },
1840
+ { internalType: "address", name: "debtAsset", type: "address" },
1841
+ {
1842
+ components: abyssLiquidationRouteHopComponents,
1843
+ internalType: "struct AbyssLiquidationExecutor.RouteHop[]",
1844
+ name: "hops",
1845
+ type: "tuple[]",
1846
+ },
1847
+ { internalType: "uint256", name: "minimumProfit", type: "uint256" },
1848
+ ],
1849
+ outputs: [],
1850
+ stateMutability: "nonpayable",
1851
+ },
1852
+ {
1853
+ type: "function",
1854
+ name: "removeRoute",
1855
+ inputs: [
1856
+ { internalType: "address", name: "collateralAsset", type: "address" },
1857
+ { internalType: "address", name: "debtAsset", type: "address" },
1858
+ ],
1859
+ outputs: [],
1860
+ stateMutability: "nonpayable",
1861
+ },
1862
+ {
1863
+ type: "function",
1864
+ name: "routeInfo",
1865
+ inputs: [
1866
+ { internalType: "address", name: "collateralAsset", type: "address" },
1867
+ { internalType: "address", name: "debtAsset", type: "address" },
1868
+ ],
1869
+ outputs: [
1870
+ { internalType: "bool", name: "enabled", type: "bool" },
1871
+ { internalType: "uint256", name: "minimumProfit", type: "uint256" },
1872
+ { internalType: "uint256", name: "hopCount", type: "uint256" },
1873
+ { internalType: "bytes32", name: "routeHash", type: "bytes32" },
1874
+ ],
1875
+ stateMutability: "view",
1876
+ },
1877
+ {
1878
+ type: "function",
1879
+ name: "routeHop",
1880
+ inputs: [
1881
+ { internalType: "address", name: "collateralAsset", type: "address" },
1882
+ { internalType: "address", name: "debtAsset", type: "address" },
1883
+ { internalType: "uint256", name: "index", type: "uint256" },
1884
+ ],
1885
+ outputs: [
1886
+ {
1887
+ components: abyssLiquidationRouteHopComponents,
1888
+ internalType: "struct AbyssLiquidationExecutor.RouteHop",
1889
+ name: "hop",
1890
+ type: "tuple",
1891
+ },
1892
+ ],
1893
+ stateMutability: "view",
1894
+ },
1895
+ ] as const;
1896
+