@1delta/abis 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,952 @@
1
+ // Fluid VaultResolver ABI (deployed at 0xA5C3E16523eeeDDcC34706b0E6bE88b4c6EA95cC
2
+ // on every supported chain — same bytecode).
3
+ //
4
+ // Only the two functions actually consumed by the fetchers are kept:
5
+ // - getVaultsEntireData() → VaultEntireData[] (primary fetch)
6
+ // - getVaultEntireData(address) → VaultEntireData (chunked fallback)
7
+ //
8
+ // Struct fields match the verified contract byte-for-byte — reordering or
9
+ // dropping any field will break viem's tuple decoding.
10
+ export const FluidVaultResolverAbi = [
11
+ {
12
+ inputs: [
13
+ {
14
+ name: "vault_",
15
+ type: "address",
16
+ },
17
+ ],
18
+ name: "getVaultEntireData",
19
+ outputs: [
20
+ {
21
+ components: [
22
+ {
23
+ name: "vault",
24
+ type: "address",
25
+ },
26
+ {
27
+ name: "isSmartCol",
28
+ type: "bool",
29
+ },
30
+ {
31
+ name: "isSmartDebt",
32
+ type: "bool",
33
+ },
34
+ {
35
+ components: [
36
+ {
37
+ name: "liquidity",
38
+ type: "address",
39
+ },
40
+ {
41
+ name: "factory",
42
+ type: "address",
43
+ },
44
+ {
45
+ name: "operateImplementation",
46
+ type: "address",
47
+ },
48
+ {
49
+ name: "adminImplementation",
50
+ type: "address",
51
+ },
52
+ {
53
+ name: "secondaryImplementation",
54
+ type: "address",
55
+ },
56
+ {
57
+ name: "deployer",
58
+ type: "address",
59
+ },
60
+ {
61
+ name: "supply",
62
+ type: "address",
63
+ },
64
+ {
65
+ name: "borrow",
66
+ type: "address",
67
+ },
68
+ {
69
+ components: [
70
+ {
71
+ name: "token0",
72
+ type: "address",
73
+ },
74
+ {
75
+ name: "token1",
76
+ type: "address",
77
+ },
78
+ ],
79
+ name: "supplyToken",
80
+ type: "tuple",
81
+ },
82
+ {
83
+ components: [
84
+ {
85
+ name: "token0",
86
+ type: "address",
87
+ },
88
+ {
89
+ name: "token1",
90
+ type: "address",
91
+ },
92
+ ],
93
+ name: "borrowToken",
94
+ type: "tuple",
95
+ },
96
+ {
97
+ name: "vaultId",
98
+ type: "uint256",
99
+ },
100
+ {
101
+ name: "vaultType",
102
+ type: "uint256",
103
+ },
104
+ {
105
+ name: "supplyExchangePriceSlot",
106
+ type: "bytes32",
107
+ },
108
+ {
109
+ name: "borrowExchangePriceSlot",
110
+ type: "bytes32",
111
+ },
112
+ {
113
+ name: "userSupplySlot",
114
+ type: "bytes32",
115
+ },
116
+ {
117
+ name: "userBorrowSlot",
118
+ type: "bytes32",
119
+ },
120
+ ],
121
+ name: "constantVariables",
122
+ type: "tuple",
123
+ },
124
+ {
125
+ components: [
126
+ {
127
+ name: "supplyRateMagnifier",
128
+ type: "uint16",
129
+ },
130
+ {
131
+ name: "borrowRateMagnifier",
132
+ type: "uint16",
133
+ },
134
+ {
135
+ name: "collateralFactor",
136
+ type: "uint16",
137
+ },
138
+ {
139
+ name: "liquidationThreshold",
140
+ type: "uint16",
141
+ },
142
+ {
143
+ name: "liquidationMaxLimit",
144
+ type: "uint16",
145
+ },
146
+ {
147
+ name: "withdrawalGap",
148
+ type: "uint16",
149
+ },
150
+ {
151
+ name: "liquidationPenalty",
152
+ type: "uint16",
153
+ },
154
+ {
155
+ name: "borrowFee",
156
+ type: "uint16",
157
+ },
158
+ {
159
+ name: "oracle",
160
+ type: "address",
161
+ },
162
+ {
163
+ name: "oraclePriceOperate",
164
+ type: "uint256",
165
+ },
166
+ {
167
+ name: "oraclePriceLiquidate",
168
+ type: "uint256",
169
+ },
170
+ {
171
+ name: "rebalancer",
172
+ type: "address",
173
+ },
174
+ {
175
+ name: "lastUpdateTimestamp",
176
+ type: "uint256",
177
+ },
178
+ ],
179
+ name: "configs",
180
+ type: "tuple",
181
+ },
182
+ {
183
+ components: [
184
+ {
185
+ name: "lastStoredLiquiditySupplyExchangePrice",
186
+ type: "uint256",
187
+ },
188
+ {
189
+ name: "lastStoredLiquidityBorrowExchangePrice",
190
+ type: "uint256",
191
+ },
192
+ {
193
+ name: "lastStoredVaultSupplyExchangePrice",
194
+ type: "uint256",
195
+ },
196
+ {
197
+ name: "lastStoredVaultBorrowExchangePrice",
198
+ type: "uint256",
199
+ },
200
+ {
201
+ name: "liquiditySupplyExchangePrice",
202
+ type: "uint256",
203
+ },
204
+ {
205
+ name: "liquidityBorrowExchangePrice",
206
+ type: "uint256",
207
+ },
208
+ {
209
+ name: "vaultSupplyExchangePrice",
210
+ type: "uint256",
211
+ },
212
+ {
213
+ name: "vaultBorrowExchangePrice",
214
+ type: "uint256",
215
+ },
216
+ {
217
+ name: "supplyRateLiquidity",
218
+ type: "uint256",
219
+ },
220
+ {
221
+ name: "borrowRateLiquidity",
222
+ type: "uint256",
223
+ },
224
+ {
225
+ name: "supplyRateVault",
226
+ type: "int256",
227
+ },
228
+ {
229
+ name: "borrowRateVault",
230
+ type: "int256",
231
+ },
232
+ {
233
+ name: "rewardsOrFeeRateSupply",
234
+ type: "int256",
235
+ },
236
+ {
237
+ name: "rewardsOrFeeRateBorrow",
238
+ type: "int256",
239
+ },
240
+ ],
241
+ name: "exchangePricesAndRates",
242
+ type: "tuple",
243
+ },
244
+ {
245
+ components: [
246
+ {
247
+ name: "totalSupplyVault",
248
+ type: "uint256",
249
+ },
250
+ {
251
+ name: "totalBorrowVault",
252
+ type: "uint256",
253
+ },
254
+ {
255
+ name: "totalSupplyLiquidityOrDex",
256
+ type: "uint256",
257
+ },
258
+ {
259
+ name: "totalBorrowLiquidityOrDex",
260
+ type: "uint256",
261
+ },
262
+ {
263
+ name: "absorbedSupply",
264
+ type: "uint256",
265
+ },
266
+ {
267
+ name: "absorbedBorrow",
268
+ type: "uint256",
269
+ },
270
+ ],
271
+ name: "totalSupplyAndBorrow",
272
+ type: "tuple",
273
+ },
274
+ {
275
+ components: [
276
+ {
277
+ name: "withdrawLimit",
278
+ type: "uint256",
279
+ },
280
+ {
281
+ name: "withdrawableUntilLimit",
282
+ type: "uint256",
283
+ },
284
+ {
285
+ name: "withdrawable",
286
+ type: "uint256",
287
+ },
288
+ {
289
+ name: "borrowLimit",
290
+ type: "uint256",
291
+ },
292
+ {
293
+ name: "borrowableUntilLimit",
294
+ type: "uint256",
295
+ },
296
+ {
297
+ name: "borrowable",
298
+ type: "uint256",
299
+ },
300
+ {
301
+ name: "borrowLimitUtilization",
302
+ type: "uint256",
303
+ },
304
+ {
305
+ name: "minimumBorrowing",
306
+ type: "uint256",
307
+ },
308
+ ],
309
+ name: "limitsAndAvailability",
310
+ type: "tuple",
311
+ },
312
+ {
313
+ components: [
314
+ {
315
+ name: "totalPositions",
316
+ type: "uint256",
317
+ },
318
+ {
319
+ name: "topTick",
320
+ type: "int256",
321
+ },
322
+ {
323
+ name: "currentBranch",
324
+ type: "uint256",
325
+ },
326
+ {
327
+ name: "totalBranch",
328
+ type: "uint256",
329
+ },
330
+ {
331
+ name: "totalBorrow",
332
+ type: "uint256",
333
+ },
334
+ {
335
+ name: "totalSupply",
336
+ type: "uint256",
337
+ },
338
+ {
339
+ components: [
340
+ {
341
+ name: "status",
342
+ type: "uint256",
343
+ },
344
+ {
345
+ name: "minimaTick",
346
+ type: "int256",
347
+ },
348
+ {
349
+ name: "debtFactor",
350
+ type: "uint256",
351
+ },
352
+ {
353
+ name: "partials",
354
+ type: "uint256",
355
+ },
356
+ {
357
+ name: "debtLiquidity",
358
+ type: "uint256",
359
+ },
360
+ {
361
+ name: "baseBranchId",
362
+ type: "uint256",
363
+ },
364
+ {
365
+ name: "baseBranchMinima",
366
+ type: "int256",
367
+ },
368
+ ],
369
+ name: "currentBranchState",
370
+ type: "tuple",
371
+ },
372
+ ],
373
+ name: "vaultState",
374
+ type: "tuple",
375
+ },
376
+ {
377
+ components: [
378
+ {
379
+ name: "modeWithInterest",
380
+ type: "bool",
381
+ },
382
+ {
383
+ name: "supply",
384
+ type: "uint256",
385
+ },
386
+ {
387
+ name: "withdrawalLimit",
388
+ type: "uint256",
389
+ },
390
+ {
391
+ name: "lastUpdateTimestamp",
392
+ type: "uint256",
393
+ },
394
+ {
395
+ name: "expandPercent",
396
+ type: "uint256",
397
+ },
398
+ {
399
+ name: "expandDuration",
400
+ type: "uint256",
401
+ },
402
+ {
403
+ name: "baseWithdrawalLimit",
404
+ type: "uint256",
405
+ },
406
+ {
407
+ name: "withdrawableUntilLimit",
408
+ type: "uint256",
409
+ },
410
+ {
411
+ name: "withdrawable",
412
+ type: "uint256",
413
+ },
414
+ {
415
+ name: "decayEndTimestamp",
416
+ type: "uint256",
417
+ },
418
+ {
419
+ name: "decayAmount",
420
+ type: "uint256",
421
+ },
422
+ ],
423
+ name: "liquidityUserSupplyData",
424
+ type: "tuple",
425
+ },
426
+ {
427
+ components: [
428
+ {
429
+ name: "modeWithInterest",
430
+ type: "bool",
431
+ },
432
+ {
433
+ name: "borrow",
434
+ type: "uint256",
435
+ },
436
+ {
437
+ name: "borrowLimit",
438
+ type: "uint256",
439
+ },
440
+ {
441
+ name: "lastUpdateTimestamp",
442
+ type: "uint256",
443
+ },
444
+ {
445
+ name: "expandPercent",
446
+ type: "uint256",
447
+ },
448
+ {
449
+ name: "expandDuration",
450
+ type: "uint256",
451
+ },
452
+ {
453
+ name: "baseBorrowLimit",
454
+ type: "uint256",
455
+ },
456
+ {
457
+ name: "maxBorrowLimit",
458
+ type: "uint256",
459
+ },
460
+ {
461
+ name: "borrowableUntilLimit",
462
+ type: "uint256",
463
+ },
464
+ {
465
+ name: "borrowable",
466
+ type: "uint256",
467
+ },
468
+ {
469
+ name: "borrowLimitUtilization",
470
+ type: "uint256",
471
+ },
472
+ ],
473
+ name: "liquidityUserBorrowData",
474
+ type: "tuple",
475
+ },
476
+ ],
477
+ name: "vaultData_",
478
+ type: "tuple",
479
+ },
480
+ ],
481
+ stateMutability: "view",
482
+ type: "function",
483
+ },
484
+ {
485
+ inputs: [],
486
+ name: "getVaultsEntireData",
487
+ outputs: [
488
+ {
489
+ components: [
490
+ {
491
+ name: "vault",
492
+ type: "address",
493
+ },
494
+ {
495
+ name: "isSmartCol",
496
+ type: "bool",
497
+ },
498
+ {
499
+ name: "isSmartDebt",
500
+ type: "bool",
501
+ },
502
+ {
503
+ components: [
504
+ {
505
+ name: "liquidity",
506
+ type: "address",
507
+ },
508
+ {
509
+ name: "factory",
510
+ type: "address",
511
+ },
512
+ {
513
+ name: "operateImplementation",
514
+ type: "address",
515
+ },
516
+ {
517
+ name: "adminImplementation",
518
+ type: "address",
519
+ },
520
+ {
521
+ name: "secondaryImplementation",
522
+ type: "address",
523
+ },
524
+ {
525
+ name: "deployer",
526
+ type: "address",
527
+ },
528
+ {
529
+ name: "supply",
530
+ type: "address",
531
+ },
532
+ {
533
+ name: "borrow",
534
+ type: "address",
535
+ },
536
+ {
537
+ components: [
538
+ {
539
+ name: "token0",
540
+ type: "address",
541
+ },
542
+ {
543
+ name: "token1",
544
+ type: "address",
545
+ },
546
+ ],
547
+ name: "supplyToken",
548
+ type: "tuple",
549
+ },
550
+ {
551
+ components: [
552
+ {
553
+ name: "token0",
554
+ type: "address",
555
+ },
556
+ {
557
+ name: "token1",
558
+ type: "address",
559
+ },
560
+ ],
561
+ name: "borrowToken",
562
+ type: "tuple",
563
+ },
564
+ {
565
+ name: "vaultId",
566
+ type: "uint256",
567
+ },
568
+ {
569
+ name: "vaultType",
570
+ type: "uint256",
571
+ },
572
+ {
573
+ name: "supplyExchangePriceSlot",
574
+ type: "bytes32",
575
+ },
576
+ {
577
+ name: "borrowExchangePriceSlot",
578
+ type: "bytes32",
579
+ },
580
+ {
581
+ name: "userSupplySlot",
582
+ type: "bytes32",
583
+ },
584
+ {
585
+ name: "userBorrowSlot",
586
+ type: "bytes32",
587
+ },
588
+ ],
589
+ name: "constantVariables",
590
+ type: "tuple",
591
+ },
592
+ {
593
+ components: [
594
+ {
595
+ name: "supplyRateMagnifier",
596
+ type: "uint16",
597
+ },
598
+ {
599
+ name: "borrowRateMagnifier",
600
+ type: "uint16",
601
+ },
602
+ {
603
+ name: "collateralFactor",
604
+ type: "uint16",
605
+ },
606
+ {
607
+ name: "liquidationThreshold",
608
+ type: "uint16",
609
+ },
610
+ {
611
+ name: "liquidationMaxLimit",
612
+ type: "uint16",
613
+ },
614
+ {
615
+ name: "withdrawalGap",
616
+ type: "uint16",
617
+ },
618
+ {
619
+ name: "liquidationPenalty",
620
+ type: "uint16",
621
+ },
622
+ {
623
+ name: "borrowFee",
624
+ type: "uint16",
625
+ },
626
+ {
627
+ name: "oracle",
628
+ type: "address",
629
+ },
630
+ {
631
+ name: "oraclePriceOperate",
632
+ type: "uint256",
633
+ },
634
+ {
635
+ name: "oraclePriceLiquidate",
636
+ type: "uint256",
637
+ },
638
+ {
639
+ name: "rebalancer",
640
+ type: "address",
641
+ },
642
+ {
643
+ name: "lastUpdateTimestamp",
644
+ type: "uint256",
645
+ },
646
+ ],
647
+ name: "configs",
648
+ type: "tuple",
649
+ },
650
+ {
651
+ components: [
652
+ {
653
+ name: "lastStoredLiquiditySupplyExchangePrice",
654
+ type: "uint256",
655
+ },
656
+ {
657
+ name: "lastStoredLiquidityBorrowExchangePrice",
658
+ type: "uint256",
659
+ },
660
+ {
661
+ name: "lastStoredVaultSupplyExchangePrice",
662
+ type: "uint256",
663
+ },
664
+ {
665
+ name: "lastStoredVaultBorrowExchangePrice",
666
+ type: "uint256",
667
+ },
668
+ {
669
+ name: "liquiditySupplyExchangePrice",
670
+ type: "uint256",
671
+ },
672
+ {
673
+ name: "liquidityBorrowExchangePrice",
674
+ type: "uint256",
675
+ },
676
+ {
677
+ name: "vaultSupplyExchangePrice",
678
+ type: "uint256",
679
+ },
680
+ {
681
+ name: "vaultBorrowExchangePrice",
682
+ type: "uint256",
683
+ },
684
+ {
685
+ name: "supplyRateLiquidity",
686
+ type: "uint256",
687
+ },
688
+ {
689
+ name: "borrowRateLiquidity",
690
+ type: "uint256",
691
+ },
692
+ {
693
+ name: "supplyRateVault",
694
+ type: "int256",
695
+ },
696
+ {
697
+ name: "borrowRateVault",
698
+ type: "int256",
699
+ },
700
+ {
701
+ name: "rewardsOrFeeRateSupply",
702
+ type: "int256",
703
+ },
704
+ {
705
+ name: "rewardsOrFeeRateBorrow",
706
+ type: "int256",
707
+ },
708
+ ],
709
+ name: "exchangePricesAndRates",
710
+ type: "tuple",
711
+ },
712
+ {
713
+ components: [
714
+ {
715
+ name: "totalSupplyVault",
716
+ type: "uint256",
717
+ },
718
+ {
719
+ name: "totalBorrowVault",
720
+ type: "uint256",
721
+ },
722
+ {
723
+ name: "totalSupplyLiquidityOrDex",
724
+ type: "uint256",
725
+ },
726
+ {
727
+ name: "totalBorrowLiquidityOrDex",
728
+ type: "uint256",
729
+ },
730
+ {
731
+ name: "absorbedSupply",
732
+ type: "uint256",
733
+ },
734
+ {
735
+ name: "absorbedBorrow",
736
+ type: "uint256",
737
+ },
738
+ ],
739
+ name: "totalSupplyAndBorrow",
740
+ type: "tuple",
741
+ },
742
+ {
743
+ components: [
744
+ {
745
+ name: "withdrawLimit",
746
+ type: "uint256",
747
+ },
748
+ {
749
+ name: "withdrawableUntilLimit",
750
+ type: "uint256",
751
+ },
752
+ {
753
+ name: "withdrawable",
754
+ type: "uint256",
755
+ },
756
+ {
757
+ name: "borrowLimit",
758
+ type: "uint256",
759
+ },
760
+ {
761
+ name: "borrowableUntilLimit",
762
+ type: "uint256",
763
+ },
764
+ {
765
+ name: "borrowable",
766
+ type: "uint256",
767
+ },
768
+ {
769
+ name: "borrowLimitUtilization",
770
+ type: "uint256",
771
+ },
772
+ {
773
+ name: "minimumBorrowing",
774
+ type: "uint256",
775
+ },
776
+ ],
777
+ name: "limitsAndAvailability",
778
+ type: "tuple",
779
+ },
780
+ {
781
+ components: [
782
+ {
783
+ name: "totalPositions",
784
+ type: "uint256",
785
+ },
786
+ {
787
+ name: "topTick",
788
+ type: "int256",
789
+ },
790
+ {
791
+ name: "currentBranch",
792
+ type: "uint256",
793
+ },
794
+ {
795
+ name: "totalBranch",
796
+ type: "uint256",
797
+ },
798
+ {
799
+ name: "totalBorrow",
800
+ type: "uint256",
801
+ },
802
+ {
803
+ name: "totalSupply",
804
+ type: "uint256",
805
+ },
806
+ {
807
+ components: [
808
+ {
809
+ name: "status",
810
+ type: "uint256",
811
+ },
812
+ {
813
+ name: "minimaTick",
814
+ type: "int256",
815
+ },
816
+ {
817
+ name: "debtFactor",
818
+ type: "uint256",
819
+ },
820
+ {
821
+ name: "partials",
822
+ type: "uint256",
823
+ },
824
+ {
825
+ name: "debtLiquidity",
826
+ type: "uint256",
827
+ },
828
+ {
829
+ name: "baseBranchId",
830
+ type: "uint256",
831
+ },
832
+ {
833
+ name: "baseBranchMinima",
834
+ type: "int256",
835
+ },
836
+ ],
837
+ name: "currentBranchState",
838
+ type: "tuple",
839
+ },
840
+ ],
841
+ name: "vaultState",
842
+ type: "tuple",
843
+ },
844
+ {
845
+ components: [
846
+ {
847
+ name: "modeWithInterest",
848
+ type: "bool",
849
+ },
850
+ {
851
+ name: "supply",
852
+ type: "uint256",
853
+ },
854
+ {
855
+ name: "withdrawalLimit",
856
+ type: "uint256",
857
+ },
858
+ {
859
+ name: "lastUpdateTimestamp",
860
+ type: "uint256",
861
+ },
862
+ {
863
+ name: "expandPercent",
864
+ type: "uint256",
865
+ },
866
+ {
867
+ name: "expandDuration",
868
+ type: "uint256",
869
+ },
870
+ {
871
+ name: "baseWithdrawalLimit",
872
+ type: "uint256",
873
+ },
874
+ {
875
+ name: "withdrawableUntilLimit",
876
+ type: "uint256",
877
+ },
878
+ {
879
+ name: "withdrawable",
880
+ type: "uint256",
881
+ },
882
+ {
883
+ name: "decayEndTimestamp",
884
+ type: "uint256",
885
+ },
886
+ {
887
+ name: "decayAmount",
888
+ type: "uint256",
889
+ },
890
+ ],
891
+ name: "liquidityUserSupplyData",
892
+ type: "tuple",
893
+ },
894
+ {
895
+ components: [
896
+ {
897
+ name: "modeWithInterest",
898
+ type: "bool",
899
+ },
900
+ {
901
+ name: "borrow",
902
+ type: "uint256",
903
+ },
904
+ {
905
+ name: "borrowLimit",
906
+ type: "uint256",
907
+ },
908
+ {
909
+ name: "lastUpdateTimestamp",
910
+ type: "uint256",
911
+ },
912
+ {
913
+ name: "expandPercent",
914
+ type: "uint256",
915
+ },
916
+ {
917
+ name: "expandDuration",
918
+ type: "uint256",
919
+ },
920
+ {
921
+ name: "baseBorrowLimit",
922
+ type: "uint256",
923
+ },
924
+ {
925
+ name: "maxBorrowLimit",
926
+ type: "uint256",
927
+ },
928
+ {
929
+ name: "borrowableUntilLimit",
930
+ type: "uint256",
931
+ },
932
+ {
933
+ name: "borrowable",
934
+ type: "uint256",
935
+ },
936
+ {
937
+ name: "borrowLimitUtilization",
938
+ type: "uint256",
939
+ },
940
+ ],
941
+ name: "liquidityUserBorrowData",
942
+ type: "tuple",
943
+ },
944
+ ],
945
+ name: "vaultsData_",
946
+ type: "tuple[]",
947
+ },
948
+ ],
949
+ stateMutability: "view",
950
+ type: "function",
951
+ },
952
+ ];