@underscore-finance/sdk 1.1.2 → 1.2.1

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 (181) hide show
  1. package/dist/contracts/AaveV3.d.ts +126 -13
  2. package/dist/contracts/AaveV3.d.ts.map +1 -1
  3. package/dist/contracts/AaveV3.js +159 -13
  4. package/dist/contracts/AeroClassic.d.ts +85 -0
  5. package/dist/contracts/AeroClassic.d.ts.map +1 -1
  6. package/dist/contracts/AeroClassic.js +109 -1
  7. package/dist/contracts/AeroSlipstream.d.ts +119 -0
  8. package/dist/contracts/AeroSlipstream.d.ts.map +1 -1
  9. package/dist/contracts/AeroSlipstream.js +151 -1
  10. package/dist/contracts/AgentSenderGeneric.d.ts +4027 -0
  11. package/dist/contracts/AgentSenderGeneric.d.ts.map +1 -0
  12. package/dist/contracts/AgentSenderGeneric.js +5280 -0
  13. package/dist/contracts/AgentSenderSpecial.d.ts +1968 -0
  14. package/dist/contracts/AgentSenderSpecial.d.ts.map +1 -0
  15. package/dist/contracts/AgentSenderSpecial.js +2509 -0
  16. package/dist/contracts/AgentWrapper.d.ts +170 -1462
  17. package/dist/contracts/AgentWrapper.d.ts.map +1 -1
  18. package/dist/contracts/AgentWrapper.js +262 -1869
  19. package/dist/contracts/AgentWrapperV1.d.ts +3760 -0
  20. package/dist/contracts/AgentWrapperV1.d.ts.map +1 -0
  21. package/dist/contracts/AgentWrapperV1.js +4922 -0
  22. package/dist/contracts/Appraiser.d.ts +18 -459
  23. package/dist/contracts/Appraiser.d.ts.map +1 -1
  24. package/dist/contracts/Appraiser.js +75 -649
  25. package/dist/contracts/Avantis.d.ts +2565 -0
  26. package/dist/contracts/Avantis.d.ts.map +1 -0
  27. package/dist/contracts/Avantis.js +3256 -0
  28. package/dist/contracts/Billing.d.ts +4 -68
  29. package/dist/contracts/Billing.d.ts.map +1 -1
  30. package/dist/contracts/Billing.js +5 -82
  31. package/dist/contracts/ChequeBook.d.ts +52 -1
  32. package/dist/contracts/ChequeBook.d.ts.map +1 -1
  33. package/dist/contracts/ChequeBook.js +53 -1
  34. package/dist/contracts/CompoundV3.d.ts +126 -13
  35. package/dist/contracts/CompoundV3.d.ts.map +1 -1
  36. package/dist/contracts/CompoundV3.js +159 -13
  37. package/dist/contracts/ConvertVaultToken.d.ts +63 -0
  38. package/dist/contracts/ConvertVaultToken.d.ts.map +1 -0
  39. package/dist/contracts/ConvertVaultToken.js +75 -0
  40. package/dist/contracts/Curve.d.ts +14 -0
  41. package/dist/contracts/Curve.d.ts.map +1 -1
  42. package/dist/contracts/Curve.js +19 -1
  43. package/dist/contracts/DefaultsBase.d.ts +45 -56
  44. package/dist/contracts/DefaultsBase.d.ts.map +1 -1
  45. package/dist/contracts/DefaultsBase.js +45 -59
  46. package/dist/contracts/EarnVault.d.ts +1680 -0
  47. package/dist/contracts/EarnVault.d.ts.map +1 -0
  48. package/dist/contracts/EarnVault.js +2206 -0
  49. package/dist/contracts/EarnVaultAgent.d.ts +1004 -0
  50. package/dist/contracts/EarnVaultAgent.d.ts.map +1 -0
  51. package/dist/contracts/EarnVaultAgent.js +1273 -0
  52. package/dist/contracts/EarnVaultAgentSigHelper.d.ts +904 -0
  53. package/dist/contracts/EarnVaultAgentSigHelper.d.ts.map +1 -0
  54. package/dist/contracts/EarnVaultAgentSigHelper.js +1198 -0
  55. package/dist/contracts/Euler.d.ts +131 -14
  56. package/dist/contracts/Euler.d.ts.map +1 -1
  57. package/dist/contracts/Euler.js +164 -13
  58. package/dist/contracts/Fluid.d.ts +159 -14
  59. package/dist/contracts/Fluid.d.ts.map +1 -1
  60. package/dist/contracts/Fluid.js +200 -13
  61. package/dist/contracts/FortyAcres.d.ts +145 -14
  62. package/dist/contracts/FortyAcres.d.ts.map +1 -1
  63. package/dist/contracts/FortyAcres.js +182 -13
  64. package/dist/contracts/Hatchery.d.ts +6 -176
  65. package/dist/contracts/Hatchery.d.ts.map +1 -1
  66. package/dist/contracts/Hatchery.js +5 -225
  67. package/dist/contracts/HighCommand.d.ts +237 -1
  68. package/dist/contracts/HighCommand.d.ts.map +1 -1
  69. package/dist/contracts/HighCommand.js +259 -1
  70. package/dist/contracts/Kernel.d.ts +8 -0
  71. package/dist/contracts/Kernel.d.ts.map +1 -1
  72. package/dist/contracts/Kernel.js +9 -1
  73. package/dist/contracts/LegoBook.js +1 -1
  74. package/dist/contracts/LegoTools.js +1 -1
  75. package/dist/contracts/LevgVaultHelper.d.ts +1070 -0
  76. package/dist/contracts/LevgVaultHelper.d.ts.map +1 -0
  77. package/dist/contracts/LevgVaultHelper.js +1414 -0
  78. package/dist/contracts/LootDistributor.d.ts +49 -131
  79. package/dist/contracts/LootDistributor.d.ts.map +1 -1
  80. package/dist/contracts/LootDistributor.js +58 -157
  81. package/dist/contracts/Migrator.d.ts +4 -0
  82. package/dist/contracts/Migrator.d.ts.map +1 -1
  83. package/dist/contracts/Migrator.js +5 -1
  84. package/dist/contracts/MissionControl.d.ts +211 -295
  85. package/dist/contracts/MissionControl.d.ts.map +1 -1
  86. package/dist/contracts/MissionControl.js +216 -305
  87. package/dist/contracts/Moonwell.d.ts +131 -14
  88. package/dist/contracts/Moonwell.d.ts.map +1 -1
  89. package/dist/contracts/Moonwell.js +164 -13
  90. package/dist/contracts/Morpho.d.ts +131 -14
  91. package/dist/contracts/Morpho.d.ts.map +1 -1
  92. package/dist/contracts/Morpho.js +164 -13
  93. package/dist/contracts/Paymaster.d.ts +4 -0
  94. package/dist/contracts/Paymaster.d.ts.map +1 -1
  95. package/dist/contracts/Paymaster.js +5 -1
  96. package/dist/contracts/RipeLego.d.ts +267 -81
  97. package/dist/contracts/RipeLego.d.ts.map +1 -1
  98. package/dist/contracts/RipeLego.js +322 -87
  99. package/dist/contracts/Sentinel.d.ts +275 -7
  100. package/dist/contracts/Sentinel.d.ts.map +1 -1
  101. package/dist/contracts/Sentinel.js +331 -7
  102. package/dist/contracts/SkyPsm.d.ts +2622 -0
  103. package/dist/contracts/SkyPsm.d.ts.map +1 -0
  104. package/dist/contracts/SkyPsm.js +3329 -0
  105. package/dist/contracts/Switchboard.d.ts +7 -0
  106. package/dist/contracts/Switchboard.d.ts.map +1 -1
  107. package/dist/contracts/Switchboard.js +9 -1
  108. package/dist/contracts/SwitchboardAlpha.d.ts +499 -264
  109. package/dist/contracts/SwitchboardAlpha.d.ts.map +1 -1
  110. package/dist/contracts/SwitchboardAlpha.js +566 -282
  111. package/dist/contracts/SwitchboardBravo.d.ts +4 -24
  112. package/dist/contracts/SwitchboardBravo.d.ts.map +1 -1
  113. package/dist/contracts/SwitchboardBravo.js +5 -32
  114. package/dist/contracts/SwitchboardCharlie.d.ts +1796 -343
  115. package/dist/contracts/SwitchboardCharlie.d.ts.map +1 -1
  116. package/dist/contracts/SwitchboardCharlie.js +2178 -368
  117. package/dist/contracts/UnderscoreLego.d.ts +129 -15
  118. package/dist/contracts/UnderscoreLego.d.ts.map +1 -1
  119. package/dist/contracts/UnderscoreLego.js +161 -14
  120. package/dist/contracts/UndyAero.d.ts +1680 -0
  121. package/dist/contracts/UndyAero.d.ts.map +1 -0
  122. package/dist/contracts/UndyAero.js +2206 -0
  123. package/dist/contracts/UndyBtc.d.ts +209 -16
  124. package/dist/contracts/UndyBtc.d.ts.map +1 -1
  125. package/dist/contracts/UndyBtc.js +267 -16
  126. package/dist/contracts/UndyCbeth.d.ts +1680 -0
  127. package/dist/contracts/UndyCbeth.d.ts.map +1 -0
  128. package/dist/contracts/UndyCbeth.js +2206 -0
  129. package/dist/contracts/UndyEth.d.ts +209 -16
  130. package/dist/contracts/UndyEth.d.ts.map +1 -1
  131. package/dist/contracts/UndyEth.js +267 -16
  132. package/dist/contracts/UndyEurc.d.ts +1680 -0
  133. package/dist/contracts/UndyEurc.d.ts.map +1 -0
  134. package/dist/contracts/UndyEurc.js +2206 -0
  135. package/dist/contracts/UndyGho.d.ts +1680 -0
  136. package/dist/contracts/UndyGho.d.ts.map +1 -0
  137. package/dist/contracts/UndyGho.js +2206 -0
  138. package/dist/contracts/UndyUsd.d.ts +209 -16
  139. package/dist/contracts/UndyUsd.d.ts.map +1 -1
  140. package/dist/contracts/UndyUsd.js +267 -16
  141. package/dist/contracts/UndyUsds.d.ts +1680 -0
  142. package/dist/contracts/UndyUsds.d.ts.map +1 -0
  143. package/dist/contracts/UndyUsds.js +2206 -0
  144. package/dist/contracts/UniswapV2.d.ts +85 -0
  145. package/dist/contracts/UniswapV2.d.ts.map +1 -1
  146. package/dist/contracts/UniswapV2.js +109 -1
  147. package/dist/contracts/UniswapV3.d.ts +119 -0
  148. package/dist/contracts/UniswapV3.d.ts.map +1 -1
  149. package/dist/contracts/UniswapV3.js +151 -1
  150. package/dist/contracts/UserWallet.d.ts +12 -8
  151. package/dist/contracts/UserWallet.d.ts.map +1 -1
  152. package/dist/contracts/UserWallet.js +13 -9
  153. package/dist/contracts/UserWalletConfig.d.ts +198 -56
  154. package/dist/contracts/UserWalletConfig.d.ts.map +1 -1
  155. package/dist/contracts/UserWalletConfig.js +225 -72
  156. package/dist/contracts/UserWalletConfigV1.d.ts +3655 -0
  157. package/dist/contracts/UserWalletConfigV1.d.ts.map +1 -0
  158. package/dist/contracts/UserWalletConfigV1.js +4251 -0
  159. package/dist/contracts/UserWalletV1.d.ts +2633 -0
  160. package/dist/contracts/UserWalletV1.d.ts.map +1 -0
  161. package/dist/contracts/UserWalletV1.js +3500 -0
  162. package/dist/contracts/VaultRegistry.d.ts +848 -85
  163. package/dist/contracts/VaultRegistry.d.ts.map +1 -1
  164. package/dist/contracts/VaultRegistry.js +1078 -83
  165. package/dist/contracts/WalletBackpack.d.ts +4 -0
  166. package/dist/contracts/WalletBackpack.d.ts.map +1 -1
  167. package/dist/contracts/WalletBackpack.js +5 -1
  168. package/dist/contracts/Wasabi.d.ts +2579 -0
  169. package/dist/contracts/Wasabi.d.ts.map +1 -0
  170. package/dist/contracts/Wasabi.js +3274 -0
  171. package/dist/contracts/index.d.ts +18 -1
  172. package/dist/contracts/index.d.ts.map +1 -1
  173. package/dist/contracts/index.js +18 -1
  174. package/dist/contracts/sdk.d.ts +36 -2
  175. package/dist/contracts/sdk.d.ts.map +1 -1
  176. package/dist/contracts/sdk.js +36 -2
  177. package/dist/getSwapInstructions.js +1 -1
  178. package/dist/index.d.ts +33 -6
  179. package/dist/index.d.ts.map +1 -1
  180. package/dist/index.js +13 -7
  181. package/package.json +2 -2
@@ -0,0 +1,1414 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /* @ts-nocheck */
5
+ import { singleQuery } from '@dappql/async';
6
+ export const abi = [
7
+ {
8
+ stateMutability: 'view',
9
+ type: 'function',
10
+ name: 'getAddys',
11
+ inputs: [],
12
+ outputs: [
13
+ {
14
+ name: '',
15
+ type: 'tuple',
16
+ components: [
17
+ {
18
+ name: 'hq',
19
+ type: 'address',
20
+ },
21
+ {
22
+ name: 'undyToken',
23
+ type: 'address',
24
+ },
25
+ {
26
+ name: 'ledger',
27
+ type: 'address',
28
+ },
29
+ {
30
+ name: 'missionControl',
31
+ type: 'address',
32
+ },
33
+ {
34
+ name: 'legoBook',
35
+ type: 'address',
36
+ },
37
+ {
38
+ name: 'switchboard',
39
+ type: 'address',
40
+ },
41
+ {
42
+ name: 'hatchery',
43
+ type: 'address',
44
+ },
45
+ {
46
+ name: 'lootDistributor',
47
+ type: 'address',
48
+ },
49
+ {
50
+ name: 'appraiser',
51
+ type: 'address',
52
+ },
53
+ {
54
+ name: 'walletBackpack',
55
+ type: 'address',
56
+ },
57
+ {
58
+ name: 'billing',
59
+ type: 'address',
60
+ },
61
+ {
62
+ name: 'vaultRegistry',
63
+ type: 'address',
64
+ },
65
+ ],
66
+ },
67
+ ],
68
+ },
69
+ {
70
+ stateMutability: 'view',
71
+ type: 'function',
72
+ name: 'getUndyHq',
73
+ inputs: [],
74
+ outputs: [
75
+ {
76
+ name: '',
77
+ type: 'address',
78
+ },
79
+ ],
80
+ },
81
+ {
82
+ stateMutability: 'view',
83
+ type: 'function',
84
+ name: 'getSwappableUsdcAmount',
85
+ inputs: [
86
+ {
87
+ name: '_wallet',
88
+ type: 'address',
89
+ },
90
+ {
91
+ name: '_amountIn',
92
+ type: 'uint256',
93
+ },
94
+ {
95
+ name: '_currentBalance',
96
+ type: 'uint256',
97
+ },
98
+ {
99
+ name: '_leverageVaultToken',
100
+ type: 'address',
101
+ },
102
+ {
103
+ name: '_leverageVaultTokenLegoId',
104
+ type: 'uint256',
105
+ },
106
+ {
107
+ name: '_leverageVaultTokenRipeVaultId',
108
+ type: 'uint256',
109
+ },
110
+ ],
111
+ outputs: [
112
+ {
113
+ name: '',
114
+ type: 'uint256',
115
+ },
116
+ ],
117
+ },
118
+ {
119
+ stateMutability: 'view',
120
+ type: 'function',
121
+ name: 'getSwappableUsdcAmount',
122
+ inputs: [
123
+ {
124
+ name: '_wallet',
125
+ type: 'address',
126
+ },
127
+ {
128
+ name: '_amountIn',
129
+ type: 'uint256',
130
+ },
131
+ {
132
+ name: '_currentBalance',
133
+ type: 'uint256',
134
+ },
135
+ {
136
+ name: '_leverageVaultToken',
137
+ type: 'address',
138
+ },
139
+ {
140
+ name: '_leverageVaultTokenLegoId',
141
+ type: 'uint256',
142
+ },
143
+ {
144
+ name: '_leverageVaultTokenRipeVaultId',
145
+ type: 'uint256',
146
+ },
147
+ {
148
+ name: '_usdc',
149
+ type: 'address',
150
+ },
151
+ ],
152
+ outputs: [
153
+ {
154
+ name: '',
155
+ type: 'uint256',
156
+ },
157
+ ],
158
+ },
159
+ {
160
+ stateMutability: 'view',
161
+ type: 'function',
162
+ name: 'getSwappableUsdcAmount',
163
+ inputs: [
164
+ {
165
+ name: '_wallet',
166
+ type: 'address',
167
+ },
168
+ {
169
+ name: '_amountIn',
170
+ type: 'uint256',
171
+ },
172
+ {
173
+ name: '_currentBalance',
174
+ type: 'uint256',
175
+ },
176
+ {
177
+ name: '_leverageVaultToken',
178
+ type: 'address',
179
+ },
180
+ {
181
+ name: '_leverageVaultTokenLegoId',
182
+ type: 'uint256',
183
+ },
184
+ {
185
+ name: '_leverageVaultTokenRipeVaultId',
186
+ type: 'uint256',
187
+ },
188
+ {
189
+ name: '_usdc',
190
+ type: 'address',
191
+ },
192
+ {
193
+ name: '_green',
194
+ type: 'address',
195
+ },
196
+ ],
197
+ outputs: [
198
+ {
199
+ name: '',
200
+ type: 'uint256',
201
+ },
202
+ ],
203
+ },
204
+ {
205
+ stateMutability: 'view',
206
+ type: 'function',
207
+ name: 'getSwappableUsdcAmount',
208
+ inputs: [
209
+ {
210
+ name: '_wallet',
211
+ type: 'address',
212
+ },
213
+ {
214
+ name: '_amountIn',
215
+ type: 'uint256',
216
+ },
217
+ {
218
+ name: '_currentBalance',
219
+ type: 'uint256',
220
+ },
221
+ {
222
+ name: '_leverageVaultToken',
223
+ type: 'address',
224
+ },
225
+ {
226
+ name: '_leverageVaultTokenLegoId',
227
+ type: 'uint256',
228
+ },
229
+ {
230
+ name: '_leverageVaultTokenRipeVaultId',
231
+ type: 'uint256',
232
+ },
233
+ {
234
+ name: '_usdc',
235
+ type: 'address',
236
+ },
237
+ {
238
+ name: '_green',
239
+ type: 'address',
240
+ },
241
+ {
242
+ name: '_savingsGreen',
243
+ type: 'address',
244
+ },
245
+ ],
246
+ outputs: [
247
+ {
248
+ name: '',
249
+ type: 'uint256',
250
+ },
251
+ ],
252
+ },
253
+ {
254
+ stateMutability: 'view',
255
+ type: 'function',
256
+ name: 'getSwappableUsdcAmount',
257
+ inputs: [
258
+ {
259
+ name: '_wallet',
260
+ type: 'address',
261
+ },
262
+ {
263
+ name: '_amountIn',
264
+ type: 'uint256',
265
+ },
266
+ {
267
+ name: '_currentBalance',
268
+ type: 'uint256',
269
+ },
270
+ {
271
+ name: '_leverageVaultToken',
272
+ type: 'address',
273
+ },
274
+ {
275
+ name: '_leverageVaultTokenLegoId',
276
+ type: 'uint256',
277
+ },
278
+ {
279
+ name: '_leverageVaultTokenRipeVaultId',
280
+ type: 'uint256',
281
+ },
282
+ {
283
+ name: '_usdc',
284
+ type: 'address',
285
+ },
286
+ {
287
+ name: '_green',
288
+ type: 'address',
289
+ },
290
+ {
291
+ name: '_savingsGreen',
292
+ type: 'address',
293
+ },
294
+ {
295
+ name: '_legoBook',
296
+ type: 'address',
297
+ },
298
+ ],
299
+ outputs: [
300
+ {
301
+ name: '',
302
+ type: 'uint256',
303
+ },
304
+ ],
305
+ },
306
+ {
307
+ stateMutability: 'view',
308
+ type: 'function',
309
+ name: 'getMaxBorrowAmount',
310
+ inputs: [
311
+ {
312
+ name: '_wallet',
313
+ type: 'address',
314
+ },
315
+ {
316
+ name: '_underlyingAsset',
317
+ type: 'address',
318
+ },
319
+ {
320
+ name: '_collateralVaultToken',
321
+ type: 'address',
322
+ },
323
+ {
324
+ name: '_collateralVaultTokenLegoId',
325
+ type: 'uint256',
326
+ },
327
+ {
328
+ name: '_collateralVaultTokenRipeVaultId',
329
+ type: 'uint256',
330
+ },
331
+ {
332
+ name: '_netUserCapital',
333
+ type: 'uint256',
334
+ },
335
+ {
336
+ name: '_maxDebtRatio',
337
+ type: 'uint256',
338
+ },
339
+ {
340
+ name: '_isUsdcVault',
341
+ type: 'bool',
342
+ },
343
+ ],
344
+ outputs: [
345
+ {
346
+ name: '',
347
+ type: 'uint256',
348
+ },
349
+ ],
350
+ },
351
+ {
352
+ stateMutability: 'view',
353
+ type: 'function',
354
+ name: 'getMaxBorrowAmount',
355
+ inputs: [
356
+ {
357
+ name: '_wallet',
358
+ type: 'address',
359
+ },
360
+ {
361
+ name: '_underlyingAsset',
362
+ type: 'address',
363
+ },
364
+ {
365
+ name: '_collateralVaultToken',
366
+ type: 'address',
367
+ },
368
+ {
369
+ name: '_collateralVaultTokenLegoId',
370
+ type: 'uint256',
371
+ },
372
+ {
373
+ name: '_collateralVaultTokenRipeVaultId',
374
+ type: 'uint256',
375
+ },
376
+ {
377
+ name: '_netUserCapital',
378
+ type: 'uint256',
379
+ },
380
+ {
381
+ name: '_maxDebtRatio',
382
+ type: 'uint256',
383
+ },
384
+ {
385
+ name: '_isUsdcVault',
386
+ type: 'bool',
387
+ },
388
+ {
389
+ name: '_legoBook',
390
+ type: 'address',
391
+ },
392
+ ],
393
+ outputs: [
394
+ {
395
+ name: '',
396
+ type: 'uint256',
397
+ },
398
+ ],
399
+ },
400
+ {
401
+ stateMutability: 'view',
402
+ type: 'function',
403
+ name: 'performPostSwapValidation',
404
+ inputs: [
405
+ {
406
+ name: '_tokenIn',
407
+ type: 'address',
408
+ },
409
+ {
410
+ name: '_tokenInAmount',
411
+ type: 'uint256',
412
+ },
413
+ {
414
+ name: '_tokenOut',
415
+ type: 'address',
416
+ },
417
+ {
418
+ name: '_tokenOutAmount',
419
+ type: 'uint256',
420
+ },
421
+ {
422
+ name: '_usdcSlippageAllowed',
423
+ type: 'uint256',
424
+ },
425
+ {
426
+ name: '_greenSlippageAllowed',
427
+ type: 'uint256',
428
+ },
429
+ ],
430
+ outputs: [
431
+ {
432
+ name: '',
433
+ type: 'bool',
434
+ },
435
+ ],
436
+ },
437
+ {
438
+ stateMutability: 'view',
439
+ type: 'function',
440
+ name: 'performPostSwapValidation',
441
+ inputs: [
442
+ {
443
+ name: '_tokenIn',
444
+ type: 'address',
445
+ },
446
+ {
447
+ name: '_tokenInAmount',
448
+ type: 'uint256',
449
+ },
450
+ {
451
+ name: '_tokenOut',
452
+ type: 'address',
453
+ },
454
+ {
455
+ name: '_tokenOutAmount',
456
+ type: 'uint256',
457
+ },
458
+ {
459
+ name: '_usdcSlippageAllowed',
460
+ type: 'uint256',
461
+ },
462
+ {
463
+ name: '_greenSlippageAllowed',
464
+ type: 'uint256',
465
+ },
466
+ {
467
+ name: '_usdc',
468
+ type: 'address',
469
+ },
470
+ ],
471
+ outputs: [
472
+ {
473
+ name: '',
474
+ type: 'bool',
475
+ },
476
+ ],
477
+ },
478
+ {
479
+ stateMutability: 'view',
480
+ type: 'function',
481
+ name: 'performPostSwapValidation',
482
+ inputs: [
483
+ {
484
+ name: '_tokenIn',
485
+ type: 'address',
486
+ },
487
+ {
488
+ name: '_tokenInAmount',
489
+ type: 'uint256',
490
+ },
491
+ {
492
+ name: '_tokenOut',
493
+ type: 'address',
494
+ },
495
+ {
496
+ name: '_tokenOutAmount',
497
+ type: 'uint256',
498
+ },
499
+ {
500
+ name: '_usdcSlippageAllowed',
501
+ type: 'uint256',
502
+ },
503
+ {
504
+ name: '_greenSlippageAllowed',
505
+ type: 'uint256',
506
+ },
507
+ {
508
+ name: '_usdc',
509
+ type: 'address',
510
+ },
511
+ {
512
+ name: '_green',
513
+ type: 'address',
514
+ },
515
+ ],
516
+ outputs: [
517
+ {
518
+ name: '',
519
+ type: 'bool',
520
+ },
521
+ ],
522
+ },
523
+ {
524
+ stateMutability: 'view',
525
+ type: 'function',
526
+ name: 'getTotalAssetsForUsdcVault',
527
+ inputs: [
528
+ {
529
+ name: '_wallet',
530
+ type: 'address',
531
+ },
532
+ {
533
+ name: '_collateralVaultToken',
534
+ type: 'address',
535
+ },
536
+ {
537
+ name: '_collateralVaultTokenLegoId',
538
+ type: 'uint256',
539
+ },
540
+ {
541
+ name: '_collateralVaultTokenRipeVaultId',
542
+ type: 'uint256',
543
+ },
544
+ {
545
+ name: '_leverageVaultToken',
546
+ type: 'address',
547
+ },
548
+ {
549
+ name: '_leverageVaultTokenLegoId',
550
+ type: 'uint256',
551
+ },
552
+ {
553
+ name: '_leverageVaultTokenRipeVaultId',
554
+ type: 'uint256',
555
+ },
556
+ ],
557
+ outputs: [
558
+ {
559
+ name: '',
560
+ type: 'uint256',
561
+ },
562
+ ],
563
+ },
564
+ {
565
+ stateMutability: 'view',
566
+ type: 'function',
567
+ name: 'getTotalAssetsForUsdcVault',
568
+ inputs: [
569
+ {
570
+ name: '_wallet',
571
+ type: 'address',
572
+ },
573
+ {
574
+ name: '_collateralVaultToken',
575
+ type: 'address',
576
+ },
577
+ {
578
+ name: '_collateralVaultTokenLegoId',
579
+ type: 'uint256',
580
+ },
581
+ {
582
+ name: '_collateralVaultTokenRipeVaultId',
583
+ type: 'uint256',
584
+ },
585
+ {
586
+ name: '_leverageVaultToken',
587
+ type: 'address',
588
+ },
589
+ {
590
+ name: '_leverageVaultTokenLegoId',
591
+ type: 'uint256',
592
+ },
593
+ {
594
+ name: '_leverageVaultTokenRipeVaultId',
595
+ type: 'uint256',
596
+ },
597
+ {
598
+ name: '_shouldGetMax',
599
+ type: 'bool',
600
+ },
601
+ ],
602
+ outputs: [
603
+ {
604
+ name: '',
605
+ type: 'uint256',
606
+ },
607
+ ],
608
+ },
609
+ {
610
+ stateMutability: 'view',
611
+ type: 'function',
612
+ name: 'getTotalAssetsForUsdcVault',
613
+ inputs: [
614
+ {
615
+ name: '_wallet',
616
+ type: 'address',
617
+ },
618
+ {
619
+ name: '_collateralVaultToken',
620
+ type: 'address',
621
+ },
622
+ {
623
+ name: '_collateralVaultTokenLegoId',
624
+ type: 'uint256',
625
+ },
626
+ {
627
+ name: '_collateralVaultTokenRipeVaultId',
628
+ type: 'uint256',
629
+ },
630
+ {
631
+ name: '_leverageVaultToken',
632
+ type: 'address',
633
+ },
634
+ {
635
+ name: '_leverageVaultTokenLegoId',
636
+ type: 'uint256',
637
+ },
638
+ {
639
+ name: '_leverageVaultTokenRipeVaultId',
640
+ type: 'uint256',
641
+ },
642
+ {
643
+ name: '_shouldGetMax',
644
+ type: 'bool',
645
+ },
646
+ {
647
+ name: '_usdc',
648
+ type: 'address',
649
+ },
650
+ ],
651
+ outputs: [
652
+ {
653
+ name: '',
654
+ type: 'uint256',
655
+ },
656
+ ],
657
+ },
658
+ {
659
+ stateMutability: 'view',
660
+ type: 'function',
661
+ name: 'getTotalAssetsForUsdcVault',
662
+ inputs: [
663
+ {
664
+ name: '_wallet',
665
+ type: 'address',
666
+ },
667
+ {
668
+ name: '_collateralVaultToken',
669
+ type: 'address',
670
+ },
671
+ {
672
+ name: '_collateralVaultTokenLegoId',
673
+ type: 'uint256',
674
+ },
675
+ {
676
+ name: '_collateralVaultTokenRipeVaultId',
677
+ type: 'uint256',
678
+ },
679
+ {
680
+ name: '_leverageVaultToken',
681
+ type: 'address',
682
+ },
683
+ {
684
+ name: '_leverageVaultTokenLegoId',
685
+ type: 'uint256',
686
+ },
687
+ {
688
+ name: '_leverageVaultTokenRipeVaultId',
689
+ type: 'uint256',
690
+ },
691
+ {
692
+ name: '_shouldGetMax',
693
+ type: 'bool',
694
+ },
695
+ {
696
+ name: '_usdc',
697
+ type: 'address',
698
+ },
699
+ {
700
+ name: '_green',
701
+ type: 'address',
702
+ },
703
+ ],
704
+ outputs: [
705
+ {
706
+ name: '',
707
+ type: 'uint256',
708
+ },
709
+ ],
710
+ },
711
+ {
712
+ stateMutability: 'view',
713
+ type: 'function',
714
+ name: 'getTotalAssetsForUsdcVault',
715
+ inputs: [
716
+ {
717
+ name: '_wallet',
718
+ type: 'address',
719
+ },
720
+ {
721
+ name: '_collateralVaultToken',
722
+ type: 'address',
723
+ },
724
+ {
725
+ name: '_collateralVaultTokenLegoId',
726
+ type: 'uint256',
727
+ },
728
+ {
729
+ name: '_collateralVaultTokenRipeVaultId',
730
+ type: 'uint256',
731
+ },
732
+ {
733
+ name: '_leverageVaultToken',
734
+ type: 'address',
735
+ },
736
+ {
737
+ name: '_leverageVaultTokenLegoId',
738
+ type: 'uint256',
739
+ },
740
+ {
741
+ name: '_leverageVaultTokenRipeVaultId',
742
+ type: 'uint256',
743
+ },
744
+ {
745
+ name: '_shouldGetMax',
746
+ type: 'bool',
747
+ },
748
+ {
749
+ name: '_usdc',
750
+ type: 'address',
751
+ },
752
+ {
753
+ name: '_green',
754
+ type: 'address',
755
+ },
756
+ {
757
+ name: '_savingsGreen',
758
+ type: 'address',
759
+ },
760
+ ],
761
+ outputs: [
762
+ {
763
+ name: '',
764
+ type: 'uint256',
765
+ },
766
+ ],
767
+ },
768
+ {
769
+ stateMutability: 'view',
770
+ type: 'function',
771
+ name: 'getTotalAssetsForUsdcVault',
772
+ inputs: [
773
+ {
774
+ name: '_wallet',
775
+ type: 'address',
776
+ },
777
+ {
778
+ name: '_collateralVaultToken',
779
+ type: 'address',
780
+ },
781
+ {
782
+ name: '_collateralVaultTokenLegoId',
783
+ type: 'uint256',
784
+ },
785
+ {
786
+ name: '_collateralVaultTokenRipeVaultId',
787
+ type: 'uint256',
788
+ },
789
+ {
790
+ name: '_leverageVaultToken',
791
+ type: 'address',
792
+ },
793
+ {
794
+ name: '_leverageVaultTokenLegoId',
795
+ type: 'uint256',
796
+ },
797
+ {
798
+ name: '_leverageVaultTokenRipeVaultId',
799
+ type: 'uint256',
800
+ },
801
+ {
802
+ name: '_shouldGetMax',
803
+ type: 'bool',
804
+ },
805
+ {
806
+ name: '_usdc',
807
+ type: 'address',
808
+ },
809
+ {
810
+ name: '_green',
811
+ type: 'address',
812
+ },
813
+ {
814
+ name: '_savingsGreen',
815
+ type: 'address',
816
+ },
817
+ {
818
+ name: '_legoBook',
819
+ type: 'address',
820
+ },
821
+ ],
822
+ outputs: [
823
+ {
824
+ name: '',
825
+ type: 'uint256',
826
+ },
827
+ ],
828
+ },
829
+ {
830
+ stateMutability: 'view',
831
+ type: 'function',
832
+ name: 'getTotalAssetsForNonUsdcVault',
833
+ inputs: [
834
+ {
835
+ name: '_wallet',
836
+ type: 'address',
837
+ },
838
+ {
839
+ name: '_underlyingAsset',
840
+ type: 'address',
841
+ },
842
+ {
843
+ name: '_collateralVaultToken',
844
+ type: 'address',
845
+ },
846
+ {
847
+ name: '_collateralVaultTokenLegoId',
848
+ type: 'uint256',
849
+ },
850
+ {
851
+ name: '_collateralVaultTokenRipeVaultId',
852
+ type: 'uint256',
853
+ },
854
+ {
855
+ name: '_leverageVaultToken',
856
+ type: 'address',
857
+ },
858
+ {
859
+ name: '_leverageVaultTokenLegoId',
860
+ type: 'uint256',
861
+ },
862
+ {
863
+ name: '_leverageVaultTokenRipeVaultId',
864
+ type: 'uint256',
865
+ },
866
+ ],
867
+ outputs: [
868
+ {
869
+ name: '',
870
+ type: 'uint256',
871
+ },
872
+ ],
873
+ },
874
+ {
875
+ stateMutability: 'view',
876
+ type: 'function',
877
+ name: 'getTotalAssetsForNonUsdcVault',
878
+ inputs: [
879
+ {
880
+ name: '_wallet',
881
+ type: 'address',
882
+ },
883
+ {
884
+ name: '_underlyingAsset',
885
+ type: 'address',
886
+ },
887
+ {
888
+ name: '_collateralVaultToken',
889
+ type: 'address',
890
+ },
891
+ {
892
+ name: '_collateralVaultTokenLegoId',
893
+ type: 'uint256',
894
+ },
895
+ {
896
+ name: '_collateralVaultTokenRipeVaultId',
897
+ type: 'uint256',
898
+ },
899
+ {
900
+ name: '_leverageVaultToken',
901
+ type: 'address',
902
+ },
903
+ {
904
+ name: '_leverageVaultTokenLegoId',
905
+ type: 'uint256',
906
+ },
907
+ {
908
+ name: '_leverageVaultTokenRipeVaultId',
909
+ type: 'uint256',
910
+ },
911
+ {
912
+ name: '_shouldGetMax',
913
+ type: 'bool',
914
+ },
915
+ ],
916
+ outputs: [
917
+ {
918
+ name: '',
919
+ type: 'uint256',
920
+ },
921
+ ],
922
+ },
923
+ {
924
+ stateMutability: 'view',
925
+ type: 'function',
926
+ name: 'getTotalAssetsForNonUsdcVault',
927
+ inputs: [
928
+ {
929
+ name: '_wallet',
930
+ type: 'address',
931
+ },
932
+ {
933
+ name: '_underlyingAsset',
934
+ type: 'address',
935
+ },
936
+ {
937
+ name: '_collateralVaultToken',
938
+ type: 'address',
939
+ },
940
+ {
941
+ name: '_collateralVaultTokenLegoId',
942
+ type: 'uint256',
943
+ },
944
+ {
945
+ name: '_collateralVaultTokenRipeVaultId',
946
+ type: 'uint256',
947
+ },
948
+ {
949
+ name: '_leverageVaultToken',
950
+ type: 'address',
951
+ },
952
+ {
953
+ name: '_leverageVaultTokenLegoId',
954
+ type: 'uint256',
955
+ },
956
+ {
957
+ name: '_leverageVaultTokenRipeVaultId',
958
+ type: 'uint256',
959
+ },
960
+ {
961
+ name: '_shouldGetMax',
962
+ type: 'bool',
963
+ },
964
+ {
965
+ name: '_usdc',
966
+ type: 'address',
967
+ },
968
+ ],
969
+ outputs: [
970
+ {
971
+ name: '',
972
+ type: 'uint256',
973
+ },
974
+ ],
975
+ },
976
+ {
977
+ stateMutability: 'view',
978
+ type: 'function',
979
+ name: 'getTotalAssetsForNonUsdcVault',
980
+ inputs: [
981
+ {
982
+ name: '_wallet',
983
+ type: 'address',
984
+ },
985
+ {
986
+ name: '_underlyingAsset',
987
+ type: 'address',
988
+ },
989
+ {
990
+ name: '_collateralVaultToken',
991
+ type: 'address',
992
+ },
993
+ {
994
+ name: '_collateralVaultTokenLegoId',
995
+ type: 'uint256',
996
+ },
997
+ {
998
+ name: '_collateralVaultTokenRipeVaultId',
999
+ type: 'uint256',
1000
+ },
1001
+ {
1002
+ name: '_leverageVaultToken',
1003
+ type: 'address',
1004
+ },
1005
+ {
1006
+ name: '_leverageVaultTokenLegoId',
1007
+ type: 'uint256',
1008
+ },
1009
+ {
1010
+ name: '_leverageVaultTokenRipeVaultId',
1011
+ type: 'uint256',
1012
+ },
1013
+ {
1014
+ name: '_shouldGetMax',
1015
+ type: 'bool',
1016
+ },
1017
+ {
1018
+ name: '_usdc',
1019
+ type: 'address',
1020
+ },
1021
+ {
1022
+ name: '_green',
1023
+ type: 'address',
1024
+ },
1025
+ ],
1026
+ outputs: [
1027
+ {
1028
+ name: '',
1029
+ type: 'uint256',
1030
+ },
1031
+ ],
1032
+ },
1033
+ {
1034
+ stateMutability: 'view',
1035
+ type: 'function',
1036
+ name: 'getTotalAssetsForNonUsdcVault',
1037
+ inputs: [
1038
+ {
1039
+ name: '_wallet',
1040
+ type: 'address',
1041
+ },
1042
+ {
1043
+ name: '_underlyingAsset',
1044
+ type: 'address',
1045
+ },
1046
+ {
1047
+ name: '_collateralVaultToken',
1048
+ type: 'address',
1049
+ },
1050
+ {
1051
+ name: '_collateralVaultTokenLegoId',
1052
+ type: 'uint256',
1053
+ },
1054
+ {
1055
+ name: '_collateralVaultTokenRipeVaultId',
1056
+ type: 'uint256',
1057
+ },
1058
+ {
1059
+ name: '_leverageVaultToken',
1060
+ type: 'address',
1061
+ },
1062
+ {
1063
+ name: '_leverageVaultTokenLegoId',
1064
+ type: 'uint256',
1065
+ },
1066
+ {
1067
+ name: '_leverageVaultTokenRipeVaultId',
1068
+ type: 'uint256',
1069
+ },
1070
+ {
1071
+ name: '_shouldGetMax',
1072
+ type: 'bool',
1073
+ },
1074
+ {
1075
+ name: '_usdc',
1076
+ type: 'address',
1077
+ },
1078
+ {
1079
+ name: '_green',
1080
+ type: 'address',
1081
+ },
1082
+ {
1083
+ name: '_savingsGreen',
1084
+ type: 'address',
1085
+ },
1086
+ ],
1087
+ outputs: [
1088
+ {
1089
+ name: '',
1090
+ type: 'uint256',
1091
+ },
1092
+ ],
1093
+ },
1094
+ {
1095
+ stateMutability: 'view',
1096
+ type: 'function',
1097
+ name: 'getTotalAssetsForNonUsdcVault',
1098
+ inputs: [
1099
+ {
1100
+ name: '_wallet',
1101
+ type: 'address',
1102
+ },
1103
+ {
1104
+ name: '_underlyingAsset',
1105
+ type: 'address',
1106
+ },
1107
+ {
1108
+ name: '_collateralVaultToken',
1109
+ type: 'address',
1110
+ },
1111
+ {
1112
+ name: '_collateralVaultTokenLegoId',
1113
+ type: 'uint256',
1114
+ },
1115
+ {
1116
+ name: '_collateralVaultTokenRipeVaultId',
1117
+ type: 'uint256',
1118
+ },
1119
+ {
1120
+ name: '_leverageVaultToken',
1121
+ type: 'address',
1122
+ },
1123
+ {
1124
+ name: '_leverageVaultTokenLegoId',
1125
+ type: 'uint256',
1126
+ },
1127
+ {
1128
+ name: '_leverageVaultTokenRipeVaultId',
1129
+ type: 'uint256',
1130
+ },
1131
+ {
1132
+ name: '_shouldGetMax',
1133
+ type: 'bool',
1134
+ },
1135
+ {
1136
+ name: '_usdc',
1137
+ type: 'address',
1138
+ },
1139
+ {
1140
+ name: '_green',
1141
+ type: 'address',
1142
+ },
1143
+ {
1144
+ name: '_savingsGreen',
1145
+ type: 'address',
1146
+ },
1147
+ {
1148
+ name: '_legoBook',
1149
+ type: 'address',
1150
+ },
1151
+ ],
1152
+ outputs: [
1153
+ {
1154
+ name: '',
1155
+ type: 'uint256',
1156
+ },
1157
+ ],
1158
+ },
1159
+ {
1160
+ stateMutability: 'view',
1161
+ type: 'function',
1162
+ name: 'getCollateralBalance',
1163
+ inputs: [
1164
+ {
1165
+ name: '_user',
1166
+ type: 'address',
1167
+ },
1168
+ {
1169
+ name: '_asset',
1170
+ type: 'address',
1171
+ },
1172
+ {
1173
+ name: '_ripeVaultId',
1174
+ type: 'uint256',
1175
+ },
1176
+ ],
1177
+ outputs: [
1178
+ {
1179
+ name: '',
1180
+ type: 'uint256',
1181
+ },
1182
+ ],
1183
+ },
1184
+ {
1185
+ stateMutability: 'view',
1186
+ type: 'function',
1187
+ name: 'getCollateralBalance',
1188
+ inputs: [
1189
+ {
1190
+ name: '_user',
1191
+ type: 'address',
1192
+ },
1193
+ {
1194
+ name: '_asset',
1195
+ type: 'address',
1196
+ },
1197
+ {
1198
+ name: '_ripeVaultId',
1199
+ type: 'uint256',
1200
+ },
1201
+ {
1202
+ name: '_vaultBook',
1203
+ type: 'address',
1204
+ },
1205
+ ],
1206
+ outputs: [
1207
+ {
1208
+ name: '',
1209
+ type: 'uint256',
1210
+ },
1211
+ ],
1212
+ },
1213
+ {
1214
+ stateMutability: 'view',
1215
+ type: 'function',
1216
+ name: 'isSupportedAssetInVault',
1217
+ inputs: [
1218
+ {
1219
+ name: '_vaultId',
1220
+ type: 'uint256',
1221
+ },
1222
+ {
1223
+ name: '_asset',
1224
+ type: 'address',
1225
+ },
1226
+ ],
1227
+ outputs: [
1228
+ {
1229
+ name: '',
1230
+ type: 'bool',
1231
+ },
1232
+ ],
1233
+ },
1234
+ {
1235
+ stateMutability: 'view',
1236
+ type: 'function',
1237
+ name: 'getVaultBookAndDeleverage',
1238
+ inputs: [],
1239
+ outputs: [
1240
+ {
1241
+ name: '',
1242
+ type: 'address',
1243
+ },
1244
+ {
1245
+ name: '',
1246
+ type: 'address',
1247
+ },
1248
+ ],
1249
+ },
1250
+ {
1251
+ stateMutability: 'view',
1252
+ type: 'function',
1253
+ name: 'isValidVaultToken',
1254
+ inputs: [
1255
+ {
1256
+ name: '_underlyingAsset',
1257
+ type: 'address',
1258
+ },
1259
+ {
1260
+ name: '_vaultToken',
1261
+ type: 'address',
1262
+ },
1263
+ {
1264
+ name: '_ripeVaultId',
1265
+ type: 'uint256',
1266
+ },
1267
+ {
1268
+ name: '_legoId',
1269
+ type: 'uint256',
1270
+ },
1271
+ ],
1272
+ outputs: [
1273
+ {
1274
+ name: '',
1275
+ type: 'bool',
1276
+ },
1277
+ ],
1278
+ },
1279
+ {
1280
+ stateMutability: 'view',
1281
+ type: 'function',
1282
+ name: 'RIPE_REGISTRY',
1283
+ inputs: [],
1284
+ outputs: [
1285
+ {
1286
+ name: '',
1287
+ type: 'address',
1288
+ },
1289
+ ],
1290
+ },
1291
+ {
1292
+ stateMutability: 'view',
1293
+ type: 'function',
1294
+ name: 'GREEN_TOKEN',
1295
+ inputs: [],
1296
+ outputs: [
1297
+ {
1298
+ name: '',
1299
+ type: 'address',
1300
+ },
1301
+ ],
1302
+ },
1303
+ {
1304
+ stateMutability: 'view',
1305
+ type: 'function',
1306
+ name: 'SAVINGS_GREEN',
1307
+ inputs: [],
1308
+ outputs: [
1309
+ {
1310
+ name: '',
1311
+ type: 'address',
1312
+ },
1313
+ ],
1314
+ },
1315
+ {
1316
+ stateMutability: 'view',
1317
+ type: 'function',
1318
+ name: 'USDC',
1319
+ inputs: [],
1320
+ outputs: [
1321
+ {
1322
+ name: '',
1323
+ type: 'address',
1324
+ },
1325
+ ],
1326
+ },
1327
+ {
1328
+ stateMutability: 'nonpayable',
1329
+ type: 'constructor',
1330
+ inputs: [
1331
+ {
1332
+ name: '_undyHq',
1333
+ type: 'address',
1334
+ },
1335
+ {
1336
+ name: '_ripeRegistry',
1337
+ type: 'address',
1338
+ },
1339
+ {
1340
+ name: '_usdc',
1341
+ type: 'address',
1342
+ },
1343
+ ],
1344
+ outputs: [],
1345
+ },
1346
+ ];
1347
+ export const deployAddress = '0xCCE531215D9841E3D69b1Db4e31e1005331DAe4c';
1348
+ function getRequest(method, args, contractAddressOrOptions) {
1349
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1350
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
1351
+ const call = {
1352
+ contractName: 'LevgVaultHelper',
1353
+ method,
1354
+ args,
1355
+ address,
1356
+ deployAddress,
1357
+ defaultValue,
1358
+ getAbi: () => abi,
1359
+ with: (options) => {
1360
+ call.address = options.contractAddress;
1361
+ call.defaultValue = options.defaultValue;
1362
+ return call;
1363
+ },
1364
+ defaultTo: (defaultValue) => {
1365
+ call.defaultValue = defaultValue;
1366
+ return call;
1367
+ },
1368
+ at: (address) => {
1369
+ call.address = address;
1370
+ return call;
1371
+ },
1372
+ };
1373
+ return call;
1374
+ }
1375
+ export const call = {
1376
+ getAddys: (...args) => getRequest('getAddys', args),
1377
+ getUndyHq: (...args) => getRequest('getUndyHq', args),
1378
+ getSwappableUsdcAmount: (...args) => getRequest('getSwappableUsdcAmount', args),
1379
+ getMaxBorrowAmount: (...args) => getRequest('getMaxBorrowAmount', args),
1380
+ performPostSwapValidation: (...args) => getRequest('performPostSwapValidation', args),
1381
+ getTotalAssetsForUsdcVault: (...args) => getRequest('getTotalAssetsForUsdcVault', args),
1382
+ getTotalAssetsForNonUsdcVault: (...args) => getRequest('getTotalAssetsForNonUsdcVault', args),
1383
+ getCollateralBalance: (...args) => getRequest('getCollateralBalance', args),
1384
+ isSupportedAssetInVault: (...args) => getRequest('isSupportedAssetInVault', args),
1385
+ getVaultBookAndDeleverage: (...args) => getRequest('getVaultBookAndDeleverage', args),
1386
+ isValidVaultToken: (...args) => getRequest('isValidVaultToken', args),
1387
+ RIPE_REGISTRY: (...args) => getRequest('RIPE_REGISTRY', args),
1388
+ GREEN_TOKEN: (...args) => getRequest('GREEN_TOKEN', args),
1389
+ SAVINGS_GREEN: (...args) => getRequest('SAVINGS_GREEN', args),
1390
+ USDC: (...args) => getRequest('USDC', args),
1391
+ };
1392
+ export function toSdk(publicClient, walletClient) {
1393
+ return {
1394
+ deployAddress,
1395
+ abi,
1396
+ // Queries
1397
+ getAddys: (...args) => singleQuery(publicClient, call.getAddys(...args)),
1398
+ getUndyHq: (...args) => singleQuery(publicClient, call.getUndyHq(...args)),
1399
+ getSwappableUsdcAmount: (...args) => singleQuery(publicClient, call.getSwappableUsdcAmount(...args)),
1400
+ getMaxBorrowAmount: (...args) => singleQuery(publicClient, call.getMaxBorrowAmount(...args)),
1401
+ performPostSwapValidation: (...args) => singleQuery(publicClient, call.performPostSwapValidation(...args)),
1402
+ getTotalAssetsForUsdcVault: (...args) => singleQuery(publicClient, call.getTotalAssetsForUsdcVault(...args)),
1403
+ getTotalAssetsForNonUsdcVault: (...args) => singleQuery(publicClient, call.getTotalAssetsForNonUsdcVault(...args)),
1404
+ getCollateralBalance: (...args) => singleQuery(publicClient, call.getCollateralBalance(...args)),
1405
+ isSupportedAssetInVault: (...args) => singleQuery(publicClient, call.isSupportedAssetInVault(...args)),
1406
+ getVaultBookAndDeleverage: (...args) => singleQuery(publicClient, call.getVaultBookAndDeleverage(...args)),
1407
+ isValidVaultToken: (...args) => singleQuery(publicClient, call.isValidVaultToken(...args)),
1408
+ RIPE_REGISTRY: (...args) => singleQuery(publicClient, call.RIPE_REGISTRY(...args)),
1409
+ GREEN_TOKEN: (...args) => singleQuery(publicClient, call.GREEN_TOKEN(...args)),
1410
+ SAVINGS_GREEN: (...args) => singleQuery(publicClient, call.SAVINGS_GREEN(...args)),
1411
+ USDC: (...args) => singleQuery(publicClient, call.USDC(...args)),
1412
+ // Mutations
1413
+ };
1414
+ }