@instadapp/interop-x 0.0.0-dev.f39d622 → 0.0.0-dev.f45bd03
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/package.json +4 -2
- package/dist/src/abi/aaveV3Resolver.json +628 -0
- package/dist/src/abi/index.js +2 -0
- package/dist/src/constants/addresses.js +4 -2
- package/dist/src/db/models/transaction.js +1 -1
- package/dist/src/gnosis/actions/aaveV2/source.js +26 -1
- package/dist/src/gnosis/actions/aaveV2/target.js +16 -1
- package/dist/src/gnosis/actions/aaveV3/index.js +11 -0
- package/dist/src/gnosis/actions/aaveV3/source.js +74 -0
- package/dist/src/gnosis/actions/aaveV3/target.js +87 -0
- package/dist/src/gnosis/actions/index.js +2 -0
- package/dist/src/index.js +1 -1
- package/dist/src/providers/index.js +17 -0
- package/dist/src/providers/retry-provider.js +45 -0
- package/dist/src/tasks/InteropX/ProcessSubmitEvents.js +38 -10
- package/dist/src/tasks/InteropX/ProcessValidateEvents.js +28 -9
- package/dist/src/tasks/InteropX/SyncLogExecuteEvents.js +2 -1
- package/dist/src/tasks/InteropX/SyncLogSubmitEvents.js +2 -1
- package/dist/src/tasks/InteropX/SyncLogValidateEvents.js +2 -1
- package/dist/src/typechain/AaveV3Resolver.js +2 -0
- package/dist/src/typechain/factories/AaveV3Resolver__factory.js +887 -0
- package/dist/src/typechain/factories/index.js +3 -1
- package/dist/src/typechain/index.js +3 -1
- package/dist/src/utils/gnosis.js +42 -17
- package/dist/src/utils/validate.js +10 -14
- package/package.json +4 -2
- package/src/abi/aaveV3Resolver.json +628 -0
- package/src/abi/index.ts +2 -0
- package/src/constants/addresses.ts +6 -3
- package/src/db/models/transaction.ts +1 -1
- package/src/gnosis/actions/aaveV2/source.ts +58 -2
- package/src/gnosis/actions/aaveV2/target.ts +29 -2
- package/src/gnosis/actions/aaveV3/index.ts +9 -0
- package/src/gnosis/actions/aaveV3/source.ts +119 -0
- package/src/gnosis/actions/aaveV3/target.ts +142 -0
- package/src/gnosis/actions/index.ts +2 -0
- package/src/providers/index.ts +1 -0
- package/src/providers/retry-provider.ts +51 -0
- package/src/tasks/InteropX/ProcessSubmitEvents.ts +52 -13
- package/src/tasks/InteropX/ProcessValidateEvents.ts +39 -13
- package/src/tasks/InteropX/SyncLogExecuteEvents.ts +3 -2
- package/src/tasks/InteropX/SyncLogSubmitEvents.ts +3 -2
- package/src/tasks/InteropX/SyncLogValidateEvents.ts +3 -2
- package/src/typechain/AaveV3Resolver.ts +935 -0
- package/src/typechain/factories/AaveV3Resolver__factory.ts +894 -0
- package/src/typechain/factories/index.ts +1 -0
- package/src/typechain/index.ts +2 -0
- package/src/utils/gnosis.ts +75 -32
- package/src/utils/validate.ts +17 -19
package/dist/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@instadapp/interop-x",
|
3
|
-
"version": "0.0.0-dev.
|
3
|
+
"version": "0.0.0-dev.f45bd03",
|
4
4
|
"license": "MIT",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"engines": {
|
@@ -30,11 +30,12 @@
|
|
30
30
|
"axios": "^0.27.2",
|
31
31
|
"axios-retry": "^3.2.5",
|
32
32
|
"bignumber.js": "^9.0.2",
|
33
|
+
"bluebird": "^3.7.2",
|
33
34
|
"chalk": "4.1.2",
|
34
35
|
"dedent": "^0.7.0",
|
35
36
|
"dotenv": "^16.0.1",
|
36
37
|
"ethereumjs-util": "^7.1.4",
|
37
|
-
"ethers": "^5.6.
|
38
|
+
"ethers": "^5.6.8",
|
38
39
|
"ethers-multisend": "^2.1.1",
|
39
40
|
"expand-home-dir": "^0.0.3",
|
40
41
|
"fastify": "^3.29.0",
|
@@ -66,6 +67,7 @@
|
|
66
67
|
"devDependencies": {
|
67
68
|
"@typechain/ethers-v5": "^10.0.0",
|
68
69
|
"@types/async-retry": "^1.4.4",
|
70
|
+
"@types/bluebird": "^3.5.36",
|
69
71
|
"@types/bn.js": "^5.1.0",
|
70
72
|
"@types/dedent": "^0.7.0",
|
71
73
|
"@types/fs-extra": "^9.0.13",
|
@@ -0,0 +1,628 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"inputs": [
|
4
|
+
{
|
5
|
+
"internalType": "address",
|
6
|
+
"name": "_aavePoolAddressesProvider",
|
7
|
+
"type": "address"
|
8
|
+
},
|
9
|
+
{
|
10
|
+
"internalType": "address",
|
11
|
+
"name": "_aavePoolDataProvider",
|
12
|
+
"type": "address"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"internalType": "address",
|
16
|
+
"name": "_aaveUiDataProvider",
|
17
|
+
"type": "address"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"internalType": "address",
|
21
|
+
"name": "_chainLinkFeed",
|
22
|
+
"type": "address"
|
23
|
+
},
|
24
|
+
{ "internalType": "address", "name": "_instaIndex", "type": "address" },
|
25
|
+
{ "internalType": "address", "name": "_wnativeToken", "type": "address" }
|
26
|
+
],
|
27
|
+
"stateMutability": "nonpayable",
|
28
|
+
"type": "constructor"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"inputs": [],
|
32
|
+
"name": "aavePoolAddressesProvider",
|
33
|
+
"outputs": [
|
34
|
+
{
|
35
|
+
"internalType": "contract AaveLendingPoolProviderInterface",
|
36
|
+
"name": "",
|
37
|
+
"type": "address"
|
38
|
+
}
|
39
|
+
],
|
40
|
+
"stateMutability": "view",
|
41
|
+
"type": "function"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"inputs": [],
|
45
|
+
"name": "aavePoolDataProvider",
|
46
|
+
"outputs": [
|
47
|
+
{
|
48
|
+
"internalType": "contract AaveDataProviderInterface",
|
49
|
+
"name": "",
|
50
|
+
"type": "address"
|
51
|
+
}
|
52
|
+
],
|
53
|
+
"stateMutability": "view",
|
54
|
+
"type": "function"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"inputs": [],
|
58
|
+
"name": "chainLinkFeed",
|
59
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
60
|
+
"stateMutability": "view",
|
61
|
+
"type": "function"
|
62
|
+
},
|
63
|
+
{
|
64
|
+
"inputs": [
|
65
|
+
{ "internalType": "address", "name": "userAddress", "type": "address" },
|
66
|
+
{
|
67
|
+
"components": [
|
68
|
+
{
|
69
|
+
"components": [
|
70
|
+
{
|
71
|
+
"internalType": "address",
|
72
|
+
"name": "sourceToken",
|
73
|
+
"type": "address"
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"internalType": "address",
|
77
|
+
"name": "targetToken",
|
78
|
+
"type": "address"
|
79
|
+
},
|
80
|
+
{ "internalType": "uint256", "name": "amount", "type": "uint256" }
|
81
|
+
],
|
82
|
+
"internalType": "struct Variables.TokenInfo[]",
|
83
|
+
"name": "supply",
|
84
|
+
"type": "tuple[]"
|
85
|
+
},
|
86
|
+
{
|
87
|
+
"components": [
|
88
|
+
{
|
89
|
+
"internalType": "address",
|
90
|
+
"name": "sourceToken",
|
91
|
+
"type": "address"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"internalType": "address",
|
95
|
+
"name": "targetToken",
|
96
|
+
"type": "address"
|
97
|
+
},
|
98
|
+
{ "internalType": "uint256", "name": "amount", "type": "uint256" }
|
99
|
+
],
|
100
|
+
"internalType": "struct Variables.TokenInfo[]",
|
101
|
+
"name": "withdraw",
|
102
|
+
"type": "tuple[]"
|
103
|
+
}
|
104
|
+
],
|
105
|
+
"internalType": "struct Variables.Position",
|
106
|
+
"name": "position",
|
107
|
+
"type": "tuple"
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"internalType": "uint256",
|
111
|
+
"name": "safeRatioPercentage",
|
112
|
+
"type": "uint256"
|
113
|
+
},
|
114
|
+
{ "internalType": "bool", "name": "isTarget", "type": "bool" }
|
115
|
+
],
|
116
|
+
"name": "checkAaveV3Position",
|
117
|
+
"outputs": [
|
118
|
+
{
|
119
|
+
"components": [
|
120
|
+
{ "internalType": "bool", "name": "isOk", "type": "bool" },
|
121
|
+
{ "internalType": "uint256", "name": "ratio", "type": "uint256" },
|
122
|
+
{ "internalType": "uint256", "name": "maxRatio", "type": "uint256" },
|
123
|
+
{
|
124
|
+
"internalType": "uint256",
|
125
|
+
"name": "maxLiquidationRatio",
|
126
|
+
"type": "uint256"
|
127
|
+
},
|
128
|
+
{ "internalType": "uint256", "name": "ltv", "type": "uint256" },
|
129
|
+
{
|
130
|
+
"internalType": "uint256",
|
131
|
+
"name": "currentLiquidationThreshold",
|
132
|
+
"type": "uint256"
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"internalType": "uint256",
|
136
|
+
"name": "totalSupply",
|
137
|
+
"type": "uint256"
|
138
|
+
},
|
139
|
+
{
|
140
|
+
"internalType": "uint256",
|
141
|
+
"name": "totalBorrow",
|
142
|
+
"type": "uint256"
|
143
|
+
},
|
144
|
+
{ "internalType": "uint256", "name": "price", "type": "uint256" },
|
145
|
+
{ "internalType": "bool", "name": "isDsa", "type": "bool" }
|
146
|
+
],
|
147
|
+
"internalType": "struct Helpers.PositionData",
|
148
|
+
"name": "p",
|
149
|
+
"type": "tuple"
|
150
|
+
}
|
151
|
+
],
|
152
|
+
"stateMutability": "view",
|
153
|
+
"type": "function"
|
154
|
+
},
|
155
|
+
{
|
156
|
+
"inputs": [
|
157
|
+
{ "internalType": "address", "name": "userAddress", "type": "address" },
|
158
|
+
{
|
159
|
+
"components": [
|
160
|
+
{ "internalType": "address", "name": "targetDsa", "type": "address" },
|
161
|
+
{
|
162
|
+
"internalType": "uint256[]",
|
163
|
+
"name": "supplyAmts",
|
164
|
+
"type": "uint256[]"
|
165
|
+
},
|
166
|
+
{
|
167
|
+
"internalType": "uint256[]",
|
168
|
+
"name": "borrowAmts",
|
169
|
+
"type": "uint256[]"
|
170
|
+
},
|
171
|
+
{
|
172
|
+
"internalType": "address[]",
|
173
|
+
"name": "supplyTokens",
|
174
|
+
"type": "address[]"
|
175
|
+
},
|
176
|
+
{
|
177
|
+
"internalType": "address[]",
|
178
|
+
"name": "borrowTokens",
|
179
|
+
"type": "address[]"
|
180
|
+
}
|
181
|
+
],
|
182
|
+
"internalType": "struct Variables.AaveData",
|
183
|
+
"name": "data",
|
184
|
+
"type": "tuple"
|
185
|
+
},
|
186
|
+
{ "internalType": "bool", "name": "isTarget", "type": "bool" },
|
187
|
+
{ "internalType": "uint8", "name": "emodeId", "type": "uint8" }
|
188
|
+
],
|
189
|
+
"name": "checkBorrowToken",
|
190
|
+
"outputs": [
|
191
|
+
{ "internalType": "uint256", "name": "totalBorrow", "type": "uint256" },
|
192
|
+
{ "internalType": "bool", "name": "isOk", "type": "bool" }
|
193
|
+
],
|
194
|
+
"stateMutability": "view",
|
195
|
+
"type": "function"
|
196
|
+
},
|
197
|
+
{
|
198
|
+
"inputs": [
|
199
|
+
{ "internalType": "address", "name": "userAddress", "type": "address" },
|
200
|
+
{
|
201
|
+
"components": [
|
202
|
+
{
|
203
|
+
"components": [
|
204
|
+
{
|
205
|
+
"internalType": "address",
|
206
|
+
"name": "sourceToken",
|
207
|
+
"type": "address"
|
208
|
+
},
|
209
|
+
{
|
210
|
+
"internalType": "address",
|
211
|
+
"name": "targetToken",
|
212
|
+
"type": "address"
|
213
|
+
},
|
214
|
+
{ "internalType": "uint256", "name": "amount", "type": "uint256" }
|
215
|
+
],
|
216
|
+
"internalType": "struct Variables.TokenInfo[]",
|
217
|
+
"name": "supply",
|
218
|
+
"type": "tuple[]"
|
219
|
+
},
|
220
|
+
{
|
221
|
+
"components": [
|
222
|
+
{
|
223
|
+
"internalType": "address",
|
224
|
+
"name": "sourceToken",
|
225
|
+
"type": "address"
|
226
|
+
},
|
227
|
+
{
|
228
|
+
"internalType": "address",
|
229
|
+
"name": "targetToken",
|
230
|
+
"type": "address"
|
231
|
+
},
|
232
|
+
{ "internalType": "uint256", "name": "amount", "type": "uint256" }
|
233
|
+
],
|
234
|
+
"internalType": "struct Variables.TokenInfo[]",
|
235
|
+
"name": "withdraw",
|
236
|
+
"type": "tuple[]"
|
237
|
+
}
|
238
|
+
],
|
239
|
+
"internalType": "struct Variables.Position",
|
240
|
+
"name": "position",
|
241
|
+
"type": "tuple"
|
242
|
+
},
|
243
|
+
{
|
244
|
+
"internalType": "uint256",
|
245
|
+
"name": "safeRatioPercentage",
|
246
|
+
"type": "uint256"
|
247
|
+
},
|
248
|
+
{ "internalType": "bool", "name": "isTarget", "type": "bool" },
|
249
|
+
{ "internalType": "uint8", "name": "emodeId", "type": "uint8" }
|
250
|
+
],
|
251
|
+
"name": "checkPositionBeforeMigration",
|
252
|
+
"outputs": [
|
253
|
+
{
|
254
|
+
"components": [
|
255
|
+
{ "internalType": "bool", "name": "isOk", "type": "bool" },
|
256
|
+
{ "internalType": "uint256", "name": "ratio", "type": "uint256" },
|
257
|
+
{ "internalType": "uint256", "name": "maxRatio", "type": "uint256" },
|
258
|
+
{
|
259
|
+
"internalType": "uint256",
|
260
|
+
"name": "maxLiquidationRatio",
|
261
|
+
"type": "uint256"
|
262
|
+
},
|
263
|
+
{ "internalType": "uint256", "name": "ltv", "type": "uint256" },
|
264
|
+
{
|
265
|
+
"internalType": "uint256",
|
266
|
+
"name": "currentLiquidationThreshold",
|
267
|
+
"type": "uint256"
|
268
|
+
},
|
269
|
+
{
|
270
|
+
"internalType": "uint256",
|
271
|
+
"name": "totalSupply",
|
272
|
+
"type": "uint256"
|
273
|
+
},
|
274
|
+
{
|
275
|
+
"internalType": "uint256",
|
276
|
+
"name": "totalBorrow",
|
277
|
+
"type": "uint256"
|
278
|
+
},
|
279
|
+
{ "internalType": "uint256", "name": "price", "type": "uint256" },
|
280
|
+
{ "internalType": "bool", "name": "isDsa", "type": "bool" }
|
281
|
+
],
|
282
|
+
"internalType": "struct Helpers.PositionData",
|
283
|
+
"name": "positionData",
|
284
|
+
"type": "tuple"
|
285
|
+
}
|
286
|
+
],
|
287
|
+
"stateMutability": "view",
|
288
|
+
"type": "function"
|
289
|
+
},
|
290
|
+
{
|
291
|
+
"inputs": [
|
292
|
+
{ "internalType": "address", "name": "userAddress", "type": "address" },
|
293
|
+
{
|
294
|
+
"components": [
|
295
|
+
{ "internalType": "address", "name": "targetDsa", "type": "address" },
|
296
|
+
{
|
297
|
+
"internalType": "uint256[]",
|
298
|
+
"name": "supplyAmts",
|
299
|
+
"type": "uint256[]"
|
300
|
+
},
|
301
|
+
{
|
302
|
+
"internalType": "uint256[]",
|
303
|
+
"name": "borrowAmts",
|
304
|
+
"type": "uint256[]"
|
305
|
+
},
|
306
|
+
{
|
307
|
+
"internalType": "address[]",
|
308
|
+
"name": "supplyTokens",
|
309
|
+
"type": "address[]"
|
310
|
+
},
|
311
|
+
{
|
312
|
+
"internalType": "address[]",
|
313
|
+
"name": "borrowTokens",
|
314
|
+
"type": "address[]"
|
315
|
+
}
|
316
|
+
],
|
317
|
+
"internalType": "struct Variables.AaveData",
|
318
|
+
"name": "data",
|
319
|
+
"type": "tuple"
|
320
|
+
},
|
321
|
+
{ "internalType": "bool", "name": "isTarget", "type": "bool" },
|
322
|
+
{ "internalType": "uint8", "name": "emodeId", "type": "uint8" }
|
323
|
+
],
|
324
|
+
"name": "checkSupplyToken",
|
325
|
+
"outputs": [
|
326
|
+
{ "internalType": "uint256", "name": "totalSupply", "type": "uint256" },
|
327
|
+
{
|
328
|
+
"internalType": "uint256",
|
329
|
+
"name": "totalMaxBorrow",
|
330
|
+
"type": "uint256"
|
331
|
+
},
|
332
|
+
{
|
333
|
+
"internalType": "uint256",
|
334
|
+
"name": "totalMaxLiquidation",
|
335
|
+
"type": "uint256"
|
336
|
+
},
|
337
|
+
{ "internalType": "bool", "name": "isOk", "type": "bool" }
|
338
|
+
],
|
339
|
+
"stateMutability": "view",
|
340
|
+
"type": "function"
|
341
|
+
},
|
342
|
+
{
|
343
|
+
"inputs": [
|
344
|
+
{ "internalType": "address", "name": "user", "type": "address" },
|
345
|
+
{
|
346
|
+
"internalType": "uint256",
|
347
|
+
"name": "totalBorrowMove",
|
348
|
+
"type": "uint256"
|
349
|
+
},
|
350
|
+
{
|
351
|
+
"internalType": "uint256",
|
352
|
+
"name": "totalMaxLiquidationMove",
|
353
|
+
"type": "uint256"
|
354
|
+
}
|
355
|
+
],
|
356
|
+
"name": "checkUserPositionAfterMigration",
|
357
|
+
"outputs": [{ "internalType": "bool", "name": "isOk", "type": "bool" }],
|
358
|
+
"stateMutability": "view",
|
359
|
+
"type": "function"
|
360
|
+
},
|
361
|
+
{
|
362
|
+
"inputs": [],
|
363
|
+
"name": "getBaseCurrencyInfo",
|
364
|
+
"outputs": [
|
365
|
+
{
|
366
|
+
"components": [
|
367
|
+
{
|
368
|
+
"internalType": "uint256",
|
369
|
+
"name": "marketReferenceCurrencyUnit",
|
370
|
+
"type": "uint256"
|
371
|
+
},
|
372
|
+
{
|
373
|
+
"internalType": "int256",
|
374
|
+
"name": "marketReferenceCurrencyPriceInUsd",
|
375
|
+
"type": "int256"
|
376
|
+
},
|
377
|
+
{
|
378
|
+
"internalType": "int256",
|
379
|
+
"name": "networkBaseTokenPriceInUsd",
|
380
|
+
"type": "int256"
|
381
|
+
},
|
382
|
+
{
|
383
|
+
"internalType": "uint8",
|
384
|
+
"name": "networkBaseTokenPriceDecimals",
|
385
|
+
"type": "uint8"
|
386
|
+
}
|
387
|
+
],
|
388
|
+
"internalType": "struct BaseCurrencyInfo",
|
389
|
+
"name": "baseCurrencyInfo",
|
390
|
+
"type": "tuple"
|
391
|
+
}
|
392
|
+
],
|
393
|
+
"stateMutability": "view",
|
394
|
+
"type": "function"
|
395
|
+
},
|
396
|
+
{
|
397
|
+
"inputs": [
|
398
|
+
{ "internalType": "address[]", "name": "_tokens", "type": "address[]" },
|
399
|
+
{ "internalType": "uint8", "name": "emodeId", "type": "uint8" }
|
400
|
+
],
|
401
|
+
"name": "getTokenInfos",
|
402
|
+
"outputs": [
|
403
|
+
{
|
404
|
+
"components": [
|
405
|
+
{ "internalType": "uint256", "name": "decimals", "type": "uint256" },
|
406
|
+
{ "internalType": "uint256", "name": "ltv", "type": "uint256" },
|
407
|
+
{ "internalType": "uint256", "name": "tl", "type": "uint256" },
|
408
|
+
{
|
409
|
+
"internalType": "bool",
|
410
|
+
"name": "enabledAsCollateral",
|
411
|
+
"type": "bool"
|
412
|
+
},
|
413
|
+
{
|
414
|
+
"internalType": "bool",
|
415
|
+
"name": "borrowingEnabled",
|
416
|
+
"type": "bool"
|
417
|
+
},
|
418
|
+
{ "internalType": "bool", "name": "isActive", "type": "bool" },
|
419
|
+
{ "internalType": "bool", "name": "isFrozen", "type": "bool" },
|
420
|
+
{
|
421
|
+
"internalType": "uint256",
|
422
|
+
"name": "availableLiquidity",
|
423
|
+
"type": "uint256"
|
424
|
+
},
|
425
|
+
{
|
426
|
+
"internalType": "uint256",
|
427
|
+
"name": "totalOverallDebt",
|
428
|
+
"type": "uint256"
|
429
|
+
}
|
430
|
+
],
|
431
|
+
"internalType": "struct Helpers.ReserveConfigData[]",
|
432
|
+
"name": "reserveConfigData",
|
433
|
+
"type": "tuple[]"
|
434
|
+
}
|
435
|
+
],
|
436
|
+
"stateMutability": "view",
|
437
|
+
"type": "function"
|
438
|
+
},
|
439
|
+
{
|
440
|
+
"inputs": [
|
441
|
+
{ "internalType": "address[]", "name": "tokens", "type": "address[]" }
|
442
|
+
],
|
443
|
+
"name": "getTokensPrices",
|
444
|
+
"outputs": [
|
445
|
+
{
|
446
|
+
"internalType": "uint256[]",
|
447
|
+
"name": "tokenPricesInEth",
|
448
|
+
"type": "uint256[]"
|
449
|
+
}
|
450
|
+
],
|
451
|
+
"stateMutability": "view",
|
452
|
+
"type": "function"
|
453
|
+
},
|
454
|
+
{
|
455
|
+
"inputs": [],
|
456
|
+
"name": "instaIndex",
|
457
|
+
"outputs": [
|
458
|
+
{
|
459
|
+
"internalType": "contract IndexInterface",
|
460
|
+
"name": "",
|
461
|
+
"type": "address"
|
462
|
+
}
|
463
|
+
],
|
464
|
+
"stateMutability": "view",
|
465
|
+
"type": "function"
|
466
|
+
},
|
467
|
+
{
|
468
|
+
"inputs": [],
|
469
|
+
"name": "instaList",
|
470
|
+
"outputs": [
|
471
|
+
{
|
472
|
+
"internalType": "contract ListInterface",
|
473
|
+
"name": "",
|
474
|
+
"type": "address"
|
475
|
+
}
|
476
|
+
],
|
477
|
+
"stateMutability": "view",
|
478
|
+
"type": "function"
|
479
|
+
},
|
480
|
+
{
|
481
|
+
"inputs": [
|
482
|
+
{ "internalType": "address", "name": "user", "type": "address" }
|
483
|
+
],
|
484
|
+
"name": "isPositionInEmode",
|
485
|
+
"outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }],
|
486
|
+
"stateMutability": "view",
|
487
|
+
"type": "function"
|
488
|
+
},
|
489
|
+
{
|
490
|
+
"inputs": [
|
491
|
+
{ "internalType": "address", "name": "user", "type": "address" },
|
492
|
+
{
|
493
|
+
"internalType": "uint256",
|
494
|
+
"name": "safeRatioPercentage",
|
495
|
+
"type": "uint256"
|
496
|
+
}
|
497
|
+
],
|
498
|
+
"name": "isPositionSafe",
|
499
|
+
"outputs": [
|
500
|
+
{ "internalType": "bool", "name": "isOk", "type": "bool" },
|
501
|
+
{ "internalType": "uint256", "name": "userTl", "type": "uint256" },
|
502
|
+
{ "internalType": "uint256", "name": "userLtv", "type": "uint256" }
|
503
|
+
],
|
504
|
+
"stateMutability": "view",
|
505
|
+
"type": "function"
|
506
|
+
},
|
507
|
+
{
|
508
|
+
"inputs": [],
|
509
|
+
"name": "marketReferenceCurrencyPriceInUsdProxyAggregator",
|
510
|
+
"outputs": [
|
511
|
+
{
|
512
|
+
"internalType": "contract IEACAggregatorProxy",
|
513
|
+
"name": "",
|
514
|
+
"type": "address"
|
515
|
+
}
|
516
|
+
],
|
517
|
+
"stateMutability": "view",
|
518
|
+
"type": "function"
|
519
|
+
},
|
520
|
+
{
|
521
|
+
"inputs": [],
|
522
|
+
"name": "nativeToken",
|
523
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
524
|
+
"stateMutability": "view",
|
525
|
+
"type": "function"
|
526
|
+
},
|
527
|
+
{
|
528
|
+
"inputs": [],
|
529
|
+
"name": "networkBaseTokenPriceInUsdProxyAggregator",
|
530
|
+
"outputs": [
|
531
|
+
{
|
532
|
+
"internalType": "contract IEACAggregatorProxy",
|
533
|
+
"name": "",
|
534
|
+
"type": "address"
|
535
|
+
}
|
536
|
+
],
|
537
|
+
"stateMutability": "view",
|
538
|
+
"type": "function"
|
539
|
+
},
|
540
|
+
{
|
541
|
+
"inputs": [
|
542
|
+
{
|
543
|
+
"components": [
|
544
|
+
{
|
545
|
+
"components": [
|
546
|
+
{
|
547
|
+
"internalType": "address",
|
548
|
+
"name": "sourceToken",
|
549
|
+
"type": "address"
|
550
|
+
},
|
551
|
+
{
|
552
|
+
"internalType": "address",
|
553
|
+
"name": "targetToken",
|
554
|
+
"type": "address"
|
555
|
+
},
|
556
|
+
{ "internalType": "uint256", "name": "amount", "type": "uint256" }
|
557
|
+
],
|
558
|
+
"internalType": "struct Variables.TokenInfo[]",
|
559
|
+
"name": "supply",
|
560
|
+
"type": "tuple[]"
|
561
|
+
},
|
562
|
+
{
|
563
|
+
"components": [
|
564
|
+
{
|
565
|
+
"internalType": "address",
|
566
|
+
"name": "sourceToken",
|
567
|
+
"type": "address"
|
568
|
+
},
|
569
|
+
{
|
570
|
+
"internalType": "address",
|
571
|
+
"name": "targetToken",
|
572
|
+
"type": "address"
|
573
|
+
},
|
574
|
+
{ "internalType": "uint256", "name": "amount", "type": "uint256" }
|
575
|
+
],
|
576
|
+
"internalType": "struct Variables.TokenInfo[]",
|
577
|
+
"name": "withdraw",
|
578
|
+
"type": "tuple[]"
|
579
|
+
}
|
580
|
+
],
|
581
|
+
"internalType": "struct Variables.Position",
|
582
|
+
"name": "position",
|
583
|
+
"type": "tuple"
|
584
|
+
},
|
585
|
+
{ "internalType": "bool", "name": "isTarget", "type": "bool" }
|
586
|
+
],
|
587
|
+
"name": "sortData",
|
588
|
+
"outputs": [
|
589
|
+
{
|
590
|
+
"components": [
|
591
|
+
{ "internalType": "address", "name": "targetDsa", "type": "address" },
|
592
|
+
{
|
593
|
+
"internalType": "uint256[]",
|
594
|
+
"name": "supplyAmts",
|
595
|
+
"type": "uint256[]"
|
596
|
+
},
|
597
|
+
{
|
598
|
+
"internalType": "uint256[]",
|
599
|
+
"name": "borrowAmts",
|
600
|
+
"type": "uint256[]"
|
601
|
+
},
|
602
|
+
{
|
603
|
+
"internalType": "address[]",
|
604
|
+
"name": "supplyTokens",
|
605
|
+
"type": "address[]"
|
606
|
+
},
|
607
|
+
{
|
608
|
+
"internalType": "address[]",
|
609
|
+
"name": "borrowTokens",
|
610
|
+
"type": "address[]"
|
611
|
+
}
|
612
|
+
],
|
613
|
+
"internalType": "struct Variables.AaveData",
|
614
|
+
"name": "aaveData",
|
615
|
+
"type": "tuple"
|
616
|
+
}
|
617
|
+
],
|
618
|
+
"stateMutability": "view",
|
619
|
+
"type": "function"
|
620
|
+
},
|
621
|
+
{
|
622
|
+
"inputs": [],
|
623
|
+
"name": "wnativeToken",
|
624
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
625
|
+
"stateMutability": "view",
|
626
|
+
"type": "function"
|
627
|
+
}
|
628
|
+
]
|
package/dist/src/abi/index.js
CHANGED
@@ -10,6 +10,7 @@ const connectors_1 = require("./connectors");
|
|
10
10
|
const instList_json_1 = __importDefault(require("./instList.json"));
|
11
11
|
const balanceResolver_json_1 = __importDefault(require("./balanceResolver.json"));
|
12
12
|
const aaveV2Resolver_json_1 = __importDefault(require("./aaveV2Resolver.json"));
|
13
|
+
const aaveV3Resolver_json_1 = __importDefault(require("./aaveV3Resolver.json"));
|
13
14
|
exports.default = {
|
14
15
|
gnosisSafe: gnosisSafe_json_1.default,
|
15
16
|
erc20: erc20_json_1.default,
|
@@ -18,4 +19,5 @@ exports.default = {
|
|
18
19
|
instList: instList_json_1.default,
|
19
20
|
balanceResolver: balanceResolver_json_1.default,
|
20
21
|
aaveV2Resolver: aaveV2Resolver_json_1.default,
|
22
|
+
aaveV3Resolver: aaveV3Resolver_json_1.default,
|
21
23
|
};
|