@instadapp/interop-x 0.0.0-dev.e916c22 → 0.0.0-dev.ea4acf6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. package/dist/package.json +9 -2
  2. package/dist/src/abi/aaveV2Resolver.json +832 -0
  3. package/dist/src/abi/aaveV3Resolver.json +628 -0
  4. package/dist/src/abi/balanceResolver.json +211 -0
  5. package/dist/src/abi/index.js +6 -0
  6. package/dist/src/api/index.js +7 -0
  7. package/dist/src/constants/addresses.js +6 -0
  8. package/dist/src/constants/capPerChain.js +8 -0
  9. package/dist/src/constants/index.js +2 -0
  10. package/dist/src/constants/tokens.js +44 -44
  11. package/dist/src/constants/wrappedNativeToken.js +8 -0
  12. package/dist/src/crons/index.js +3 -0
  13. package/dist/src/crons/prices.js +16 -0
  14. package/dist/src/db/models/transaction.js +1 -1
  15. package/dist/src/errors/index.js +30 -0
  16. package/dist/src/gnosis/actions/aaveV2/source.js +26 -1
  17. package/dist/src/gnosis/actions/aaveV2/target.js +18 -4
  18. package/dist/src/gnosis/actions/aaveV3/index.js +11 -0
  19. package/dist/src/gnosis/actions/aaveV3/source.js +74 -0
  20. package/dist/src/gnosis/actions/aaveV3/target.js +87 -0
  21. package/dist/src/gnosis/actions/index.js +2 -0
  22. package/dist/src/index.js +2 -1
  23. package/dist/src/providers/index.js +17 -0
  24. package/dist/src/providers/retry-provider.js +45 -0
  25. package/dist/src/services/Prices.js +74 -0
  26. package/dist/src/services/index.js +8 -0
  27. package/dist/src/tasks/InteropX/{ProcessSubmitSubmitEvents.js → ProcessSubmitEvents.js} +108 -14
  28. package/dist/src/tasks/InteropX/ProcessValidateEvents.js +30 -10
  29. package/dist/src/tasks/InteropX/SyncLogExecuteEvents.js +3 -2
  30. package/dist/src/tasks/InteropX/SyncLogSubmitEvents.js +3 -2
  31. package/dist/src/tasks/InteropX/SyncLogValidateEvents.js +3 -2
  32. package/dist/src/tasks/index.js +3 -4
  33. package/dist/src/typechain/AaveV2Resolver.js +2 -0
  34. package/dist/src/typechain/AaveV3Resolver.js +2 -0
  35. package/dist/src/typechain/BalanceResolver.js +2 -0
  36. package/dist/src/typechain/factories/AaveV2Resolver__factory.js +1191 -0
  37. package/dist/src/typechain/factories/AaveV3Resolver__factory.js +887 -0
  38. package/dist/src/typechain/factories/BalanceResolver__factory.js +228 -0
  39. package/dist/src/typechain/factories/index.js +7 -1
  40. package/dist/src/typechain/index.js +7 -1
  41. package/dist/src/utils/async.js +18 -0
  42. package/dist/src/utils/dsa.js +36 -0
  43. package/dist/src/utils/formatting.js +67 -0
  44. package/dist/src/utils/gnosis.js +87 -0
  45. package/dist/src/utils/http.js +10 -0
  46. package/dist/src/utils/index.js +22 -220
  47. package/dist/src/utils/interop.js +16 -0
  48. package/dist/src/utils/tokens.js +22 -0
  49. package/dist/src/utils/validate.js +111 -0
  50. package/dist/src/utils/web3.js +93 -0
  51. package/package.json +9 -2
  52. package/src/abi/aaveV2Resolver.json +832 -0
  53. package/src/abi/aaveV3Resolver.json +628 -0
  54. package/src/abi/balanceResolver.json +211 -0
  55. package/src/abi/index.ts +6 -0
  56. package/src/api/index.ts +8 -0
  57. package/src/constants/addresses.ts +18 -1
  58. package/src/constants/capPerChain.ts +5 -0
  59. package/src/constants/index.ts +2 -0
  60. package/src/constants/tokens.ts +44 -44
  61. package/src/constants/wrappedNativeToken.ts +5 -0
  62. package/src/crons/index.ts +1 -0
  63. package/src/crons/prices.ts +12 -0
  64. package/src/db/models/transaction.ts +1 -1
  65. package/src/errors/index.ts +26 -0
  66. package/src/gnosis/actions/aaveV2/source.ts +56 -3
  67. package/src/gnosis/actions/aaveV2/target.ts +30 -11
  68. package/src/gnosis/actions/aaveV3/index.ts +9 -0
  69. package/src/gnosis/actions/aaveV3/source.ts +119 -0
  70. package/src/gnosis/actions/aaveV3/target.ts +142 -0
  71. package/src/gnosis/actions/index.ts +2 -0
  72. package/src/index.ts +1 -0
  73. package/src/providers/index.ts +1 -0
  74. package/src/providers/retry-provider.ts +51 -0
  75. package/src/services/Prices.ts +89 -0
  76. package/src/services/index.ts +1 -0
  77. package/src/tasks/InteropX/{ProcessSubmitSubmitEvents.ts → ProcessSubmitEvents.ts} +135 -20
  78. package/src/tasks/InteropX/ProcessValidateEvents.ts +42 -19
  79. package/src/tasks/InteropX/SyncLogExecuteEvents.ts +5 -6
  80. package/src/tasks/InteropX/SyncLogSubmitEvents.ts +6 -7
  81. package/src/tasks/InteropX/SyncLogValidateEvents.ts +6 -7
  82. package/src/tasks/index.ts +3 -4
  83. package/src/typechain/AaveV2Resolver.ts +1017 -0
  84. package/src/typechain/AaveV3Resolver.ts +935 -0
  85. package/src/typechain/BalanceResolver.ts +266 -0
  86. package/src/typechain/factories/AaveV2Resolver__factory.ts +1198 -0
  87. package/src/typechain/factories/AaveV3Resolver__factory.ts +894 -0
  88. package/src/typechain/factories/BalanceResolver__factory.ts +235 -0
  89. package/src/typechain/factories/index.ts +3 -0
  90. package/src/typechain/index.ts +6 -0
  91. package/src/utils/async.ts +22 -0
  92. package/src/utils/dsa.ts +56 -0
  93. package/src/utils/formatting.ts +68 -0
  94. package/src/utils/gnosis.ts +166 -0
  95. package/src/utils/http.ts +6 -0
  96. package/src/utils/index.ts +9 -365
  97. package/src/utils/interop.ts +28 -0
  98. package/src/utils/tokens.ts +21 -0
  99. package/src/utils/validate.ts +179 -0
  100. package/src/utils/web3.ts +132 -0
@@ -0,0 +1,894 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import { Contract, Signer, utils } from "ethers";
6
+ import type { Provider } from "@ethersproject/providers";
7
+ import type {
8
+ AaveV3Resolver,
9
+ AaveV3ResolverInterface,
10
+ } from "../AaveV3Resolver";
11
+
12
+ const _abi = [
13
+ {
14
+ inputs: [
15
+ {
16
+ internalType: "address",
17
+ name: "_aavePoolAddressesProvider",
18
+ type: "address",
19
+ },
20
+ {
21
+ internalType: "address",
22
+ name: "_aavePoolDataProvider",
23
+ type: "address",
24
+ },
25
+ {
26
+ internalType: "address",
27
+ name: "_aaveUiDataProvider",
28
+ type: "address",
29
+ },
30
+ {
31
+ internalType: "address",
32
+ name: "_chainLinkFeed",
33
+ type: "address",
34
+ },
35
+ {
36
+ internalType: "address",
37
+ name: "_instaIndex",
38
+ type: "address",
39
+ },
40
+ {
41
+ internalType: "address",
42
+ name: "_wnativeToken",
43
+ type: "address",
44
+ },
45
+ ],
46
+ stateMutability: "nonpayable",
47
+ type: "constructor",
48
+ },
49
+ {
50
+ inputs: [],
51
+ name: "aavePoolAddressesProvider",
52
+ outputs: [
53
+ {
54
+ internalType: "contract AaveLendingPoolProviderInterface",
55
+ name: "",
56
+ type: "address",
57
+ },
58
+ ],
59
+ stateMutability: "view",
60
+ type: "function",
61
+ },
62
+ {
63
+ inputs: [],
64
+ name: "aavePoolDataProvider",
65
+ outputs: [
66
+ {
67
+ internalType: "contract AaveDataProviderInterface",
68
+ name: "",
69
+ type: "address",
70
+ },
71
+ ],
72
+ stateMutability: "view",
73
+ type: "function",
74
+ },
75
+ {
76
+ inputs: [],
77
+ name: "chainLinkFeed",
78
+ outputs: [
79
+ {
80
+ internalType: "address",
81
+ name: "",
82
+ type: "address",
83
+ },
84
+ ],
85
+ stateMutability: "view",
86
+ type: "function",
87
+ },
88
+ {
89
+ inputs: [
90
+ {
91
+ internalType: "address",
92
+ name: "userAddress",
93
+ type: "address",
94
+ },
95
+ {
96
+ components: [
97
+ {
98
+ components: [
99
+ {
100
+ internalType: "address",
101
+ name: "sourceToken",
102
+ type: "address",
103
+ },
104
+ {
105
+ internalType: "address",
106
+ name: "targetToken",
107
+ type: "address",
108
+ },
109
+ {
110
+ internalType: "uint256",
111
+ name: "amount",
112
+ type: "uint256",
113
+ },
114
+ ],
115
+ internalType: "struct Variables.TokenInfo[]",
116
+ name: "supply",
117
+ type: "tuple[]",
118
+ },
119
+ {
120
+ components: [
121
+ {
122
+ internalType: "address",
123
+ name: "sourceToken",
124
+ type: "address",
125
+ },
126
+ {
127
+ internalType: "address",
128
+ name: "targetToken",
129
+ type: "address",
130
+ },
131
+ {
132
+ internalType: "uint256",
133
+ name: "amount",
134
+ type: "uint256",
135
+ },
136
+ ],
137
+ internalType: "struct Variables.TokenInfo[]",
138
+ name: "withdraw",
139
+ type: "tuple[]",
140
+ },
141
+ ],
142
+ internalType: "struct Variables.Position",
143
+ name: "position",
144
+ type: "tuple",
145
+ },
146
+ {
147
+ internalType: "uint256",
148
+ name: "safeRatioPercentage",
149
+ type: "uint256",
150
+ },
151
+ {
152
+ internalType: "bool",
153
+ name: "isTarget",
154
+ type: "bool",
155
+ },
156
+ ],
157
+ name: "checkAaveV3Position",
158
+ outputs: [
159
+ {
160
+ components: [
161
+ {
162
+ internalType: "bool",
163
+ name: "isOk",
164
+ type: "bool",
165
+ },
166
+ {
167
+ internalType: "uint256",
168
+ name: "ratio",
169
+ type: "uint256",
170
+ },
171
+ {
172
+ internalType: "uint256",
173
+ name: "maxRatio",
174
+ type: "uint256",
175
+ },
176
+ {
177
+ internalType: "uint256",
178
+ name: "maxLiquidationRatio",
179
+ type: "uint256",
180
+ },
181
+ {
182
+ internalType: "uint256",
183
+ name: "ltv",
184
+ type: "uint256",
185
+ },
186
+ {
187
+ internalType: "uint256",
188
+ name: "currentLiquidationThreshold",
189
+ type: "uint256",
190
+ },
191
+ {
192
+ internalType: "uint256",
193
+ name: "totalSupply",
194
+ type: "uint256",
195
+ },
196
+ {
197
+ internalType: "uint256",
198
+ name: "totalBorrow",
199
+ type: "uint256",
200
+ },
201
+ {
202
+ internalType: "uint256",
203
+ name: "price",
204
+ type: "uint256",
205
+ },
206
+ {
207
+ internalType: "bool",
208
+ name: "isDsa",
209
+ type: "bool",
210
+ },
211
+ ],
212
+ internalType: "struct Helpers.PositionData",
213
+ name: "p",
214
+ type: "tuple",
215
+ },
216
+ ],
217
+ stateMutability: "view",
218
+ type: "function",
219
+ },
220
+ {
221
+ inputs: [
222
+ {
223
+ internalType: "address",
224
+ name: "userAddress",
225
+ type: "address",
226
+ },
227
+ {
228
+ components: [
229
+ {
230
+ internalType: "address",
231
+ name: "targetDsa",
232
+ type: "address",
233
+ },
234
+ {
235
+ internalType: "uint256[]",
236
+ name: "supplyAmts",
237
+ type: "uint256[]",
238
+ },
239
+ {
240
+ internalType: "uint256[]",
241
+ name: "borrowAmts",
242
+ type: "uint256[]",
243
+ },
244
+ {
245
+ internalType: "address[]",
246
+ name: "supplyTokens",
247
+ type: "address[]",
248
+ },
249
+ {
250
+ internalType: "address[]",
251
+ name: "borrowTokens",
252
+ type: "address[]",
253
+ },
254
+ ],
255
+ internalType: "struct Variables.AaveData",
256
+ name: "data",
257
+ type: "tuple",
258
+ },
259
+ {
260
+ internalType: "bool",
261
+ name: "isTarget",
262
+ type: "bool",
263
+ },
264
+ {
265
+ internalType: "uint8",
266
+ name: "emodeId",
267
+ type: "uint8",
268
+ },
269
+ ],
270
+ name: "checkBorrowToken",
271
+ outputs: [
272
+ {
273
+ internalType: "uint256",
274
+ name: "totalBorrow",
275
+ type: "uint256",
276
+ },
277
+ {
278
+ internalType: "bool",
279
+ name: "isOk",
280
+ type: "bool",
281
+ },
282
+ ],
283
+ stateMutability: "view",
284
+ type: "function",
285
+ },
286
+ {
287
+ inputs: [
288
+ {
289
+ internalType: "address",
290
+ name: "userAddress",
291
+ type: "address",
292
+ },
293
+ {
294
+ components: [
295
+ {
296
+ components: [
297
+ {
298
+ internalType: "address",
299
+ name: "sourceToken",
300
+ type: "address",
301
+ },
302
+ {
303
+ internalType: "address",
304
+ name: "targetToken",
305
+ type: "address",
306
+ },
307
+ {
308
+ internalType: "uint256",
309
+ name: "amount",
310
+ type: "uint256",
311
+ },
312
+ ],
313
+ internalType: "struct Variables.TokenInfo[]",
314
+ name: "supply",
315
+ type: "tuple[]",
316
+ },
317
+ {
318
+ components: [
319
+ {
320
+ internalType: "address",
321
+ name: "sourceToken",
322
+ type: "address",
323
+ },
324
+ {
325
+ internalType: "address",
326
+ name: "targetToken",
327
+ type: "address",
328
+ },
329
+ {
330
+ internalType: "uint256",
331
+ name: "amount",
332
+ type: "uint256",
333
+ },
334
+ ],
335
+ internalType: "struct Variables.TokenInfo[]",
336
+ name: "withdraw",
337
+ type: "tuple[]",
338
+ },
339
+ ],
340
+ internalType: "struct Variables.Position",
341
+ name: "position",
342
+ type: "tuple",
343
+ },
344
+ {
345
+ internalType: "uint256",
346
+ name: "safeRatioPercentage",
347
+ type: "uint256",
348
+ },
349
+ {
350
+ internalType: "bool",
351
+ name: "isTarget",
352
+ type: "bool",
353
+ },
354
+ {
355
+ internalType: "uint8",
356
+ name: "emodeId",
357
+ type: "uint8",
358
+ },
359
+ ],
360
+ name: "checkPositionBeforeMigration",
361
+ outputs: [
362
+ {
363
+ components: [
364
+ {
365
+ internalType: "bool",
366
+ name: "isOk",
367
+ type: "bool",
368
+ },
369
+ {
370
+ internalType: "uint256",
371
+ name: "ratio",
372
+ type: "uint256",
373
+ },
374
+ {
375
+ internalType: "uint256",
376
+ name: "maxRatio",
377
+ type: "uint256",
378
+ },
379
+ {
380
+ internalType: "uint256",
381
+ name: "maxLiquidationRatio",
382
+ type: "uint256",
383
+ },
384
+ {
385
+ internalType: "uint256",
386
+ name: "ltv",
387
+ type: "uint256",
388
+ },
389
+ {
390
+ internalType: "uint256",
391
+ name: "currentLiquidationThreshold",
392
+ type: "uint256",
393
+ },
394
+ {
395
+ internalType: "uint256",
396
+ name: "totalSupply",
397
+ type: "uint256",
398
+ },
399
+ {
400
+ internalType: "uint256",
401
+ name: "totalBorrow",
402
+ type: "uint256",
403
+ },
404
+ {
405
+ internalType: "uint256",
406
+ name: "price",
407
+ type: "uint256",
408
+ },
409
+ {
410
+ internalType: "bool",
411
+ name: "isDsa",
412
+ type: "bool",
413
+ },
414
+ ],
415
+ internalType: "struct Helpers.PositionData",
416
+ name: "positionData",
417
+ type: "tuple",
418
+ },
419
+ ],
420
+ stateMutability: "view",
421
+ type: "function",
422
+ },
423
+ {
424
+ inputs: [
425
+ {
426
+ internalType: "address",
427
+ name: "userAddress",
428
+ type: "address",
429
+ },
430
+ {
431
+ components: [
432
+ {
433
+ internalType: "address",
434
+ name: "targetDsa",
435
+ type: "address",
436
+ },
437
+ {
438
+ internalType: "uint256[]",
439
+ name: "supplyAmts",
440
+ type: "uint256[]",
441
+ },
442
+ {
443
+ internalType: "uint256[]",
444
+ name: "borrowAmts",
445
+ type: "uint256[]",
446
+ },
447
+ {
448
+ internalType: "address[]",
449
+ name: "supplyTokens",
450
+ type: "address[]",
451
+ },
452
+ {
453
+ internalType: "address[]",
454
+ name: "borrowTokens",
455
+ type: "address[]",
456
+ },
457
+ ],
458
+ internalType: "struct Variables.AaveData",
459
+ name: "data",
460
+ type: "tuple",
461
+ },
462
+ {
463
+ internalType: "bool",
464
+ name: "isTarget",
465
+ type: "bool",
466
+ },
467
+ {
468
+ internalType: "uint8",
469
+ name: "emodeId",
470
+ type: "uint8",
471
+ },
472
+ ],
473
+ name: "checkSupplyToken",
474
+ outputs: [
475
+ {
476
+ internalType: "uint256",
477
+ name: "totalSupply",
478
+ type: "uint256",
479
+ },
480
+ {
481
+ internalType: "uint256",
482
+ name: "totalMaxBorrow",
483
+ type: "uint256",
484
+ },
485
+ {
486
+ internalType: "uint256",
487
+ name: "totalMaxLiquidation",
488
+ type: "uint256",
489
+ },
490
+ {
491
+ internalType: "bool",
492
+ name: "isOk",
493
+ type: "bool",
494
+ },
495
+ ],
496
+ stateMutability: "view",
497
+ type: "function",
498
+ },
499
+ {
500
+ inputs: [
501
+ {
502
+ internalType: "address",
503
+ name: "user",
504
+ type: "address",
505
+ },
506
+ {
507
+ internalType: "uint256",
508
+ name: "totalBorrowMove",
509
+ type: "uint256",
510
+ },
511
+ {
512
+ internalType: "uint256",
513
+ name: "totalMaxLiquidationMove",
514
+ type: "uint256",
515
+ },
516
+ ],
517
+ name: "checkUserPositionAfterMigration",
518
+ outputs: [
519
+ {
520
+ internalType: "bool",
521
+ name: "isOk",
522
+ type: "bool",
523
+ },
524
+ ],
525
+ stateMutability: "view",
526
+ type: "function",
527
+ },
528
+ {
529
+ inputs: [],
530
+ name: "getBaseCurrencyInfo",
531
+ outputs: [
532
+ {
533
+ components: [
534
+ {
535
+ internalType: "uint256",
536
+ name: "marketReferenceCurrencyUnit",
537
+ type: "uint256",
538
+ },
539
+ {
540
+ internalType: "int256",
541
+ name: "marketReferenceCurrencyPriceInUsd",
542
+ type: "int256",
543
+ },
544
+ {
545
+ internalType: "int256",
546
+ name: "networkBaseTokenPriceInUsd",
547
+ type: "int256",
548
+ },
549
+ {
550
+ internalType: "uint8",
551
+ name: "networkBaseTokenPriceDecimals",
552
+ type: "uint8",
553
+ },
554
+ ],
555
+ internalType: "struct BaseCurrencyInfo",
556
+ name: "baseCurrencyInfo",
557
+ type: "tuple",
558
+ },
559
+ ],
560
+ stateMutability: "view",
561
+ type: "function",
562
+ },
563
+ {
564
+ inputs: [
565
+ {
566
+ internalType: "address[]",
567
+ name: "_tokens",
568
+ type: "address[]",
569
+ },
570
+ {
571
+ internalType: "uint8",
572
+ name: "emodeId",
573
+ type: "uint8",
574
+ },
575
+ ],
576
+ name: "getTokenInfos",
577
+ outputs: [
578
+ {
579
+ components: [
580
+ {
581
+ internalType: "uint256",
582
+ name: "decimals",
583
+ type: "uint256",
584
+ },
585
+ {
586
+ internalType: "uint256",
587
+ name: "ltv",
588
+ type: "uint256",
589
+ },
590
+ {
591
+ internalType: "uint256",
592
+ name: "tl",
593
+ type: "uint256",
594
+ },
595
+ {
596
+ internalType: "bool",
597
+ name: "enabledAsCollateral",
598
+ type: "bool",
599
+ },
600
+ {
601
+ internalType: "bool",
602
+ name: "borrowingEnabled",
603
+ type: "bool",
604
+ },
605
+ {
606
+ internalType: "bool",
607
+ name: "isActive",
608
+ type: "bool",
609
+ },
610
+ {
611
+ internalType: "bool",
612
+ name: "isFrozen",
613
+ type: "bool",
614
+ },
615
+ {
616
+ internalType: "uint256",
617
+ name: "availableLiquidity",
618
+ type: "uint256",
619
+ },
620
+ {
621
+ internalType: "uint256",
622
+ name: "totalOverallDebt",
623
+ type: "uint256",
624
+ },
625
+ ],
626
+ internalType: "struct Helpers.ReserveConfigData[]",
627
+ name: "reserveConfigData",
628
+ type: "tuple[]",
629
+ },
630
+ ],
631
+ stateMutability: "view",
632
+ type: "function",
633
+ },
634
+ {
635
+ inputs: [
636
+ {
637
+ internalType: "address[]",
638
+ name: "tokens",
639
+ type: "address[]",
640
+ },
641
+ ],
642
+ name: "getTokensPrices",
643
+ outputs: [
644
+ {
645
+ internalType: "uint256[]",
646
+ name: "tokenPricesInEth",
647
+ type: "uint256[]",
648
+ },
649
+ ],
650
+ stateMutability: "view",
651
+ type: "function",
652
+ },
653
+ {
654
+ inputs: [],
655
+ name: "instaIndex",
656
+ outputs: [
657
+ {
658
+ internalType: "contract IndexInterface",
659
+ name: "",
660
+ type: "address",
661
+ },
662
+ ],
663
+ stateMutability: "view",
664
+ type: "function",
665
+ },
666
+ {
667
+ inputs: [],
668
+ name: "instaList",
669
+ outputs: [
670
+ {
671
+ internalType: "contract ListInterface",
672
+ name: "",
673
+ type: "address",
674
+ },
675
+ ],
676
+ stateMutability: "view",
677
+ type: "function",
678
+ },
679
+ {
680
+ inputs: [
681
+ {
682
+ internalType: "address",
683
+ name: "user",
684
+ type: "address",
685
+ },
686
+ ],
687
+ name: "isPositionInEmode",
688
+ outputs: [
689
+ {
690
+ internalType: "uint8",
691
+ name: "",
692
+ type: "uint8",
693
+ },
694
+ ],
695
+ stateMutability: "view",
696
+ type: "function",
697
+ },
698
+ {
699
+ inputs: [
700
+ {
701
+ internalType: "address",
702
+ name: "user",
703
+ type: "address",
704
+ },
705
+ {
706
+ internalType: "uint256",
707
+ name: "safeRatioPercentage",
708
+ type: "uint256",
709
+ },
710
+ ],
711
+ name: "isPositionSafe",
712
+ outputs: [
713
+ {
714
+ internalType: "bool",
715
+ name: "isOk",
716
+ type: "bool",
717
+ },
718
+ {
719
+ internalType: "uint256",
720
+ name: "userTl",
721
+ type: "uint256",
722
+ },
723
+ {
724
+ internalType: "uint256",
725
+ name: "userLtv",
726
+ type: "uint256",
727
+ },
728
+ ],
729
+ stateMutability: "view",
730
+ type: "function",
731
+ },
732
+ {
733
+ inputs: [],
734
+ name: "marketReferenceCurrencyPriceInUsdProxyAggregator",
735
+ outputs: [
736
+ {
737
+ internalType: "contract IEACAggregatorProxy",
738
+ name: "",
739
+ type: "address",
740
+ },
741
+ ],
742
+ stateMutability: "view",
743
+ type: "function",
744
+ },
745
+ {
746
+ inputs: [],
747
+ name: "nativeToken",
748
+ outputs: [
749
+ {
750
+ internalType: "address",
751
+ name: "",
752
+ type: "address",
753
+ },
754
+ ],
755
+ stateMutability: "view",
756
+ type: "function",
757
+ },
758
+ {
759
+ inputs: [],
760
+ name: "networkBaseTokenPriceInUsdProxyAggregator",
761
+ outputs: [
762
+ {
763
+ internalType: "contract IEACAggregatorProxy",
764
+ name: "",
765
+ type: "address",
766
+ },
767
+ ],
768
+ stateMutability: "view",
769
+ type: "function",
770
+ },
771
+ {
772
+ inputs: [
773
+ {
774
+ components: [
775
+ {
776
+ components: [
777
+ {
778
+ internalType: "address",
779
+ name: "sourceToken",
780
+ type: "address",
781
+ },
782
+ {
783
+ internalType: "address",
784
+ name: "targetToken",
785
+ type: "address",
786
+ },
787
+ {
788
+ internalType: "uint256",
789
+ name: "amount",
790
+ type: "uint256",
791
+ },
792
+ ],
793
+ internalType: "struct Variables.TokenInfo[]",
794
+ name: "supply",
795
+ type: "tuple[]",
796
+ },
797
+ {
798
+ components: [
799
+ {
800
+ internalType: "address",
801
+ name: "sourceToken",
802
+ type: "address",
803
+ },
804
+ {
805
+ internalType: "address",
806
+ name: "targetToken",
807
+ type: "address",
808
+ },
809
+ {
810
+ internalType: "uint256",
811
+ name: "amount",
812
+ type: "uint256",
813
+ },
814
+ ],
815
+ internalType: "struct Variables.TokenInfo[]",
816
+ name: "withdraw",
817
+ type: "tuple[]",
818
+ },
819
+ ],
820
+ internalType: "struct Variables.Position",
821
+ name: "position",
822
+ type: "tuple",
823
+ },
824
+ {
825
+ internalType: "bool",
826
+ name: "isTarget",
827
+ type: "bool",
828
+ },
829
+ ],
830
+ name: "sortData",
831
+ outputs: [
832
+ {
833
+ components: [
834
+ {
835
+ internalType: "address",
836
+ name: "targetDsa",
837
+ type: "address",
838
+ },
839
+ {
840
+ internalType: "uint256[]",
841
+ name: "supplyAmts",
842
+ type: "uint256[]",
843
+ },
844
+ {
845
+ internalType: "uint256[]",
846
+ name: "borrowAmts",
847
+ type: "uint256[]",
848
+ },
849
+ {
850
+ internalType: "address[]",
851
+ name: "supplyTokens",
852
+ type: "address[]",
853
+ },
854
+ {
855
+ internalType: "address[]",
856
+ name: "borrowTokens",
857
+ type: "address[]",
858
+ },
859
+ ],
860
+ internalType: "struct Variables.AaveData",
861
+ name: "aaveData",
862
+ type: "tuple",
863
+ },
864
+ ],
865
+ stateMutability: "view",
866
+ type: "function",
867
+ },
868
+ {
869
+ inputs: [],
870
+ name: "wnativeToken",
871
+ outputs: [
872
+ {
873
+ internalType: "address",
874
+ name: "",
875
+ type: "address",
876
+ },
877
+ ],
878
+ stateMutability: "view",
879
+ type: "function",
880
+ },
881
+ ];
882
+
883
+ export class AaveV3Resolver__factory {
884
+ static readonly abi = _abi;
885
+ static createInterface(): AaveV3ResolverInterface {
886
+ return new utils.Interface(_abi) as AaveV3ResolverInterface;
887
+ }
888
+ static connect(
889
+ address: string,
890
+ signerOrProvider: Signer | Provider
891
+ ): AaveV3Resolver {
892
+ return new Contract(address, _abi, signerOrProvider) as AaveV3Resolver;
893
+ }
894
+ }