@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,1273 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /* @ts-nocheck */
5
+ import { singleQuery, mutate } from '@dappql/async';
6
+ export const abi = [
7
+ {
8
+ name: 'NonceIncremented',
9
+ inputs: [
10
+ {
11
+ name: 'userWallet',
12
+ type: 'address',
13
+ indexed: false,
14
+ },
15
+ {
16
+ name: 'oldNonce',
17
+ type: 'uint256',
18
+ indexed: false,
19
+ },
20
+ {
21
+ name: 'newNonce',
22
+ type: 'uint256',
23
+ indexed: false,
24
+ },
25
+ ],
26
+ anonymous: false,
27
+ type: 'event',
28
+ },
29
+ {
30
+ name: 'OwnershipChangeInitiated',
31
+ inputs: [
32
+ {
33
+ name: 'prevOwner',
34
+ type: 'address',
35
+ indexed: true,
36
+ },
37
+ {
38
+ name: 'newOwner',
39
+ type: 'address',
40
+ indexed: true,
41
+ },
42
+ {
43
+ name: 'confirmBlock',
44
+ type: 'uint256',
45
+ indexed: false,
46
+ },
47
+ ],
48
+ anonymous: false,
49
+ type: 'event',
50
+ },
51
+ {
52
+ name: 'OwnershipChangeConfirmed',
53
+ inputs: [
54
+ {
55
+ name: 'prevOwner',
56
+ type: 'address',
57
+ indexed: true,
58
+ },
59
+ {
60
+ name: 'newOwner',
61
+ type: 'address',
62
+ indexed: true,
63
+ },
64
+ {
65
+ name: 'initiatedBlock',
66
+ type: 'uint256',
67
+ indexed: false,
68
+ },
69
+ {
70
+ name: 'confirmBlock',
71
+ type: 'uint256',
72
+ indexed: false,
73
+ },
74
+ ],
75
+ anonymous: false,
76
+ type: 'event',
77
+ },
78
+ {
79
+ name: 'OwnershipChangeCancelled',
80
+ inputs: [
81
+ {
82
+ name: 'cancelledOwner',
83
+ type: 'address',
84
+ indexed: true,
85
+ },
86
+ {
87
+ name: 'cancelledBy',
88
+ type: 'address',
89
+ indexed: true,
90
+ },
91
+ {
92
+ name: 'initiatedBlock',
93
+ type: 'uint256',
94
+ indexed: false,
95
+ },
96
+ {
97
+ name: 'confirmBlock',
98
+ type: 'uint256',
99
+ indexed: false,
100
+ },
101
+ ],
102
+ anonymous: false,
103
+ type: 'event',
104
+ },
105
+ {
106
+ name: 'OwnershipTimeLockSet',
107
+ inputs: [
108
+ {
109
+ name: 'numBlocks',
110
+ type: 'uint256',
111
+ indexed: false,
112
+ },
113
+ ],
114
+ anonymous: false,
115
+ type: 'event',
116
+ },
117
+ {
118
+ stateMutability: 'nonpayable',
119
+ type: 'function',
120
+ name: 'changeOwnership',
121
+ inputs: [
122
+ {
123
+ name: '_newOwner',
124
+ type: 'address',
125
+ },
126
+ ],
127
+ outputs: [],
128
+ },
129
+ {
130
+ stateMutability: 'nonpayable',
131
+ type: 'function',
132
+ name: 'confirmOwnershipChange',
133
+ inputs: [],
134
+ outputs: [],
135
+ },
136
+ {
137
+ stateMutability: 'nonpayable',
138
+ type: 'function',
139
+ name: 'cancelOwnershipChange',
140
+ inputs: [],
141
+ outputs: [],
142
+ },
143
+ {
144
+ stateMutability: 'view',
145
+ type: 'function',
146
+ name: 'hasPendingOwnerChange',
147
+ inputs: [],
148
+ outputs: [
149
+ {
150
+ name: '',
151
+ type: 'bool',
152
+ },
153
+ ],
154
+ },
155
+ {
156
+ stateMutability: 'nonpayable',
157
+ type: 'function',
158
+ name: 'setOwnershipTimeLock',
159
+ inputs: [
160
+ {
161
+ name: '_numBlocks',
162
+ type: 'uint256',
163
+ },
164
+ ],
165
+ outputs: [],
166
+ },
167
+ {
168
+ stateMutability: 'view',
169
+ type: 'function',
170
+ name: 'owner',
171
+ inputs: [],
172
+ outputs: [
173
+ {
174
+ name: '',
175
+ type: 'address',
176
+ },
177
+ ],
178
+ },
179
+ {
180
+ stateMutability: 'view',
181
+ type: 'function',
182
+ name: 'ownershipTimeLock',
183
+ inputs: [],
184
+ outputs: [
185
+ {
186
+ name: '',
187
+ type: 'uint256',
188
+ },
189
+ ],
190
+ },
191
+ {
192
+ stateMutability: 'view',
193
+ type: 'function',
194
+ name: 'pendingOwner',
195
+ inputs: [],
196
+ outputs: [
197
+ {
198
+ name: '',
199
+ type: 'tuple',
200
+ components: [
201
+ {
202
+ name: 'newOwner',
203
+ type: 'address',
204
+ },
205
+ {
206
+ name: 'initiatedBlock',
207
+ type: 'uint256',
208
+ },
209
+ {
210
+ name: 'confirmBlock',
211
+ type: 'uint256',
212
+ },
213
+ ],
214
+ },
215
+ ],
216
+ },
217
+ {
218
+ stateMutability: 'view',
219
+ type: 'function',
220
+ name: 'MIN_OWNERSHIP_TIMELOCK',
221
+ inputs: [],
222
+ outputs: [
223
+ {
224
+ name: '',
225
+ type: 'uint256',
226
+ },
227
+ ],
228
+ },
229
+ {
230
+ stateMutability: 'view',
231
+ type: 'function',
232
+ name: 'MAX_OWNERSHIP_TIMELOCK',
233
+ inputs: [],
234
+ outputs: [
235
+ {
236
+ name: '',
237
+ type: 'uint256',
238
+ },
239
+ ],
240
+ },
241
+ {
242
+ stateMutability: 'nonpayable',
243
+ type: 'function',
244
+ name: 'depositForYield',
245
+ inputs: [
246
+ {
247
+ name: '_userWallet',
248
+ type: 'address',
249
+ },
250
+ {
251
+ name: '_legoId',
252
+ type: 'uint256',
253
+ },
254
+ {
255
+ name: '_asset',
256
+ type: 'address',
257
+ },
258
+ ],
259
+ outputs: [
260
+ {
261
+ name: '',
262
+ type: 'uint256',
263
+ },
264
+ {
265
+ name: '',
266
+ type: 'address',
267
+ },
268
+ {
269
+ name: '',
270
+ type: 'uint256',
271
+ },
272
+ {
273
+ name: '',
274
+ type: 'uint256',
275
+ },
276
+ ],
277
+ },
278
+ {
279
+ stateMutability: 'nonpayable',
280
+ type: 'function',
281
+ name: 'depositForYield',
282
+ inputs: [
283
+ {
284
+ name: '_userWallet',
285
+ type: 'address',
286
+ },
287
+ {
288
+ name: '_legoId',
289
+ type: 'uint256',
290
+ },
291
+ {
292
+ name: '_asset',
293
+ type: 'address',
294
+ },
295
+ {
296
+ name: '_vaultAddr',
297
+ type: 'address',
298
+ },
299
+ ],
300
+ outputs: [
301
+ {
302
+ name: '',
303
+ type: 'uint256',
304
+ },
305
+ {
306
+ name: '',
307
+ type: 'address',
308
+ },
309
+ {
310
+ name: '',
311
+ type: 'uint256',
312
+ },
313
+ {
314
+ name: '',
315
+ type: 'uint256',
316
+ },
317
+ ],
318
+ },
319
+ {
320
+ stateMutability: 'nonpayable',
321
+ type: 'function',
322
+ name: 'depositForYield',
323
+ inputs: [
324
+ {
325
+ name: '_userWallet',
326
+ type: 'address',
327
+ },
328
+ {
329
+ name: '_legoId',
330
+ type: 'uint256',
331
+ },
332
+ {
333
+ name: '_asset',
334
+ type: 'address',
335
+ },
336
+ {
337
+ name: '_vaultAddr',
338
+ type: 'address',
339
+ },
340
+ {
341
+ name: '_amount',
342
+ type: 'uint256',
343
+ },
344
+ ],
345
+ outputs: [
346
+ {
347
+ name: '',
348
+ type: 'uint256',
349
+ },
350
+ {
351
+ name: '',
352
+ type: 'address',
353
+ },
354
+ {
355
+ name: '',
356
+ type: 'uint256',
357
+ },
358
+ {
359
+ name: '',
360
+ type: 'uint256',
361
+ },
362
+ ],
363
+ },
364
+ {
365
+ stateMutability: 'nonpayable',
366
+ type: 'function',
367
+ name: 'depositForYield',
368
+ inputs: [
369
+ {
370
+ name: '_userWallet',
371
+ type: 'address',
372
+ },
373
+ {
374
+ name: '_legoId',
375
+ type: 'uint256',
376
+ },
377
+ {
378
+ name: '_asset',
379
+ type: 'address',
380
+ },
381
+ {
382
+ name: '_vaultAddr',
383
+ type: 'address',
384
+ },
385
+ {
386
+ name: '_amount',
387
+ type: 'uint256',
388
+ },
389
+ {
390
+ name: '_extraData',
391
+ type: 'bytes32',
392
+ },
393
+ ],
394
+ outputs: [
395
+ {
396
+ name: '',
397
+ type: 'uint256',
398
+ },
399
+ {
400
+ name: '',
401
+ type: 'address',
402
+ },
403
+ {
404
+ name: '',
405
+ type: 'uint256',
406
+ },
407
+ {
408
+ name: '',
409
+ type: 'uint256',
410
+ },
411
+ ],
412
+ },
413
+ {
414
+ stateMutability: 'nonpayable',
415
+ type: 'function',
416
+ name: 'depositForYield',
417
+ inputs: [
418
+ {
419
+ name: '_userWallet',
420
+ type: 'address',
421
+ },
422
+ {
423
+ name: '_legoId',
424
+ type: 'uint256',
425
+ },
426
+ {
427
+ name: '_asset',
428
+ type: 'address',
429
+ },
430
+ {
431
+ name: '_vaultAddr',
432
+ type: 'address',
433
+ },
434
+ {
435
+ name: '_amount',
436
+ type: 'uint256',
437
+ },
438
+ {
439
+ name: '_extraData',
440
+ type: 'bytes32',
441
+ },
442
+ {
443
+ name: '_sig',
444
+ type: 'tuple',
445
+ components: [
446
+ {
447
+ name: 'signature',
448
+ type: 'bytes',
449
+ },
450
+ {
451
+ name: 'nonce',
452
+ type: 'uint256',
453
+ },
454
+ {
455
+ name: 'expiration',
456
+ type: 'uint256',
457
+ },
458
+ ],
459
+ },
460
+ ],
461
+ outputs: [
462
+ {
463
+ name: '',
464
+ type: 'uint256',
465
+ },
466
+ {
467
+ name: '',
468
+ type: 'address',
469
+ },
470
+ {
471
+ name: '',
472
+ type: 'uint256',
473
+ },
474
+ {
475
+ name: '',
476
+ type: 'uint256',
477
+ },
478
+ ],
479
+ },
480
+ {
481
+ stateMutability: 'nonpayable',
482
+ type: 'function',
483
+ name: 'withdrawFromYield',
484
+ inputs: [
485
+ {
486
+ name: '_userWallet',
487
+ type: 'address',
488
+ },
489
+ {
490
+ name: '_legoId',
491
+ type: 'uint256',
492
+ },
493
+ {
494
+ name: '_vaultToken',
495
+ type: 'address',
496
+ },
497
+ ],
498
+ outputs: [
499
+ {
500
+ name: '',
501
+ type: 'uint256',
502
+ },
503
+ {
504
+ name: '',
505
+ type: 'address',
506
+ },
507
+ {
508
+ name: '',
509
+ type: 'uint256',
510
+ },
511
+ {
512
+ name: '',
513
+ type: 'uint256',
514
+ },
515
+ ],
516
+ },
517
+ {
518
+ stateMutability: 'nonpayable',
519
+ type: 'function',
520
+ name: 'withdrawFromYield',
521
+ inputs: [
522
+ {
523
+ name: '_userWallet',
524
+ type: 'address',
525
+ },
526
+ {
527
+ name: '_legoId',
528
+ type: 'uint256',
529
+ },
530
+ {
531
+ name: '_vaultToken',
532
+ type: 'address',
533
+ },
534
+ {
535
+ name: '_amount',
536
+ type: 'uint256',
537
+ },
538
+ ],
539
+ outputs: [
540
+ {
541
+ name: '',
542
+ type: 'uint256',
543
+ },
544
+ {
545
+ name: '',
546
+ type: 'address',
547
+ },
548
+ {
549
+ name: '',
550
+ type: 'uint256',
551
+ },
552
+ {
553
+ name: '',
554
+ type: 'uint256',
555
+ },
556
+ ],
557
+ },
558
+ {
559
+ stateMutability: 'nonpayable',
560
+ type: 'function',
561
+ name: 'withdrawFromYield',
562
+ inputs: [
563
+ {
564
+ name: '_userWallet',
565
+ type: 'address',
566
+ },
567
+ {
568
+ name: '_legoId',
569
+ type: 'uint256',
570
+ },
571
+ {
572
+ name: '_vaultToken',
573
+ type: 'address',
574
+ },
575
+ {
576
+ name: '_amount',
577
+ type: 'uint256',
578
+ },
579
+ {
580
+ name: '_extraData',
581
+ type: 'bytes32',
582
+ },
583
+ ],
584
+ outputs: [
585
+ {
586
+ name: '',
587
+ type: 'uint256',
588
+ },
589
+ {
590
+ name: '',
591
+ type: 'address',
592
+ },
593
+ {
594
+ name: '',
595
+ type: 'uint256',
596
+ },
597
+ {
598
+ name: '',
599
+ type: 'uint256',
600
+ },
601
+ ],
602
+ },
603
+ {
604
+ stateMutability: 'nonpayable',
605
+ type: 'function',
606
+ name: 'withdrawFromYield',
607
+ inputs: [
608
+ {
609
+ name: '_userWallet',
610
+ type: 'address',
611
+ },
612
+ {
613
+ name: '_legoId',
614
+ type: 'uint256',
615
+ },
616
+ {
617
+ name: '_vaultToken',
618
+ type: 'address',
619
+ },
620
+ {
621
+ name: '_amount',
622
+ type: 'uint256',
623
+ },
624
+ {
625
+ name: '_extraData',
626
+ type: 'bytes32',
627
+ },
628
+ {
629
+ name: '_sig',
630
+ type: 'tuple',
631
+ components: [
632
+ {
633
+ name: 'signature',
634
+ type: 'bytes',
635
+ },
636
+ {
637
+ name: 'nonce',
638
+ type: 'uint256',
639
+ },
640
+ {
641
+ name: 'expiration',
642
+ type: 'uint256',
643
+ },
644
+ ],
645
+ },
646
+ ],
647
+ outputs: [
648
+ {
649
+ name: '',
650
+ type: 'uint256',
651
+ },
652
+ {
653
+ name: '',
654
+ type: 'address',
655
+ },
656
+ {
657
+ name: '',
658
+ type: 'uint256',
659
+ },
660
+ {
661
+ name: '',
662
+ type: 'uint256',
663
+ },
664
+ ],
665
+ },
666
+ {
667
+ stateMutability: 'nonpayable',
668
+ type: 'function',
669
+ name: 'swapTokens',
670
+ inputs: [
671
+ {
672
+ name: '_userWallet',
673
+ type: 'address',
674
+ },
675
+ {
676
+ name: '_swapInstructions',
677
+ type: 'tuple[]',
678
+ components: [
679
+ {
680
+ name: 'legoId',
681
+ type: 'uint256',
682
+ },
683
+ {
684
+ name: 'amountIn',
685
+ type: 'uint256',
686
+ },
687
+ {
688
+ name: 'minAmountOut',
689
+ type: 'uint256',
690
+ },
691
+ {
692
+ name: 'tokenPath',
693
+ type: 'address[]',
694
+ },
695
+ {
696
+ name: 'poolPath',
697
+ type: 'address[]',
698
+ },
699
+ ],
700
+ },
701
+ ],
702
+ outputs: [
703
+ {
704
+ name: '',
705
+ type: 'address',
706
+ },
707
+ {
708
+ name: '',
709
+ type: 'uint256',
710
+ },
711
+ {
712
+ name: '',
713
+ type: 'address',
714
+ },
715
+ {
716
+ name: '',
717
+ type: 'uint256',
718
+ },
719
+ {
720
+ name: '',
721
+ type: 'uint256',
722
+ },
723
+ ],
724
+ },
725
+ {
726
+ stateMutability: 'nonpayable',
727
+ type: 'function',
728
+ name: 'swapTokens',
729
+ inputs: [
730
+ {
731
+ name: '_userWallet',
732
+ type: 'address',
733
+ },
734
+ {
735
+ name: '_swapInstructions',
736
+ type: 'tuple[]',
737
+ components: [
738
+ {
739
+ name: 'legoId',
740
+ type: 'uint256',
741
+ },
742
+ {
743
+ name: 'amountIn',
744
+ type: 'uint256',
745
+ },
746
+ {
747
+ name: 'minAmountOut',
748
+ type: 'uint256',
749
+ },
750
+ {
751
+ name: 'tokenPath',
752
+ type: 'address[]',
753
+ },
754
+ {
755
+ name: 'poolPath',
756
+ type: 'address[]',
757
+ },
758
+ ],
759
+ },
760
+ {
761
+ name: '_sig',
762
+ type: 'tuple',
763
+ components: [
764
+ {
765
+ name: 'signature',
766
+ type: 'bytes',
767
+ },
768
+ {
769
+ name: 'nonce',
770
+ type: 'uint256',
771
+ },
772
+ {
773
+ name: 'expiration',
774
+ type: 'uint256',
775
+ },
776
+ ],
777
+ },
778
+ ],
779
+ outputs: [
780
+ {
781
+ name: '',
782
+ type: 'address',
783
+ },
784
+ {
785
+ name: '',
786
+ type: 'uint256',
787
+ },
788
+ {
789
+ name: '',
790
+ type: 'address',
791
+ },
792
+ {
793
+ name: '',
794
+ type: 'uint256',
795
+ },
796
+ {
797
+ name: '',
798
+ type: 'uint256',
799
+ },
800
+ ],
801
+ },
802
+ {
803
+ stateMutability: 'nonpayable',
804
+ type: 'function',
805
+ name: 'claimIncentives',
806
+ inputs: [
807
+ {
808
+ name: '_userWallet',
809
+ type: 'address',
810
+ },
811
+ {
812
+ name: '_legoId',
813
+ type: 'uint256',
814
+ },
815
+ ],
816
+ outputs: [
817
+ {
818
+ name: '',
819
+ type: 'uint256',
820
+ },
821
+ {
822
+ name: '',
823
+ type: 'uint256',
824
+ },
825
+ ],
826
+ },
827
+ {
828
+ stateMutability: 'nonpayable',
829
+ type: 'function',
830
+ name: 'claimIncentives',
831
+ inputs: [
832
+ {
833
+ name: '_userWallet',
834
+ type: 'address',
835
+ },
836
+ {
837
+ name: '_legoId',
838
+ type: 'uint256',
839
+ },
840
+ {
841
+ name: '_rewardToken',
842
+ type: 'address',
843
+ },
844
+ ],
845
+ outputs: [
846
+ {
847
+ name: '',
848
+ type: 'uint256',
849
+ },
850
+ {
851
+ name: '',
852
+ type: 'uint256',
853
+ },
854
+ ],
855
+ },
856
+ {
857
+ stateMutability: 'nonpayable',
858
+ type: 'function',
859
+ name: 'claimIncentives',
860
+ inputs: [
861
+ {
862
+ name: '_userWallet',
863
+ type: 'address',
864
+ },
865
+ {
866
+ name: '_legoId',
867
+ type: 'uint256',
868
+ },
869
+ {
870
+ name: '_rewardToken',
871
+ type: 'address',
872
+ },
873
+ {
874
+ name: '_rewardAmount',
875
+ type: 'uint256',
876
+ },
877
+ ],
878
+ outputs: [
879
+ {
880
+ name: '',
881
+ type: 'uint256',
882
+ },
883
+ {
884
+ name: '',
885
+ type: 'uint256',
886
+ },
887
+ ],
888
+ },
889
+ {
890
+ stateMutability: 'nonpayable',
891
+ type: 'function',
892
+ name: 'claimIncentives',
893
+ inputs: [
894
+ {
895
+ name: '_userWallet',
896
+ type: 'address',
897
+ },
898
+ {
899
+ name: '_legoId',
900
+ type: 'uint256',
901
+ },
902
+ {
903
+ name: '_rewardToken',
904
+ type: 'address',
905
+ },
906
+ {
907
+ name: '_rewardAmount',
908
+ type: 'uint256',
909
+ },
910
+ {
911
+ name: '_proofs',
912
+ type: 'bytes32[]',
913
+ },
914
+ ],
915
+ outputs: [
916
+ {
917
+ name: '',
918
+ type: 'uint256',
919
+ },
920
+ {
921
+ name: '',
922
+ type: 'uint256',
923
+ },
924
+ ],
925
+ },
926
+ {
927
+ stateMutability: 'nonpayable',
928
+ type: 'function',
929
+ name: 'claimIncentives',
930
+ inputs: [
931
+ {
932
+ name: '_userWallet',
933
+ type: 'address',
934
+ },
935
+ {
936
+ name: '_legoId',
937
+ type: 'uint256',
938
+ },
939
+ {
940
+ name: '_rewardToken',
941
+ type: 'address',
942
+ },
943
+ {
944
+ name: '_rewardAmount',
945
+ type: 'uint256',
946
+ },
947
+ {
948
+ name: '_proofs',
949
+ type: 'bytes32[]',
950
+ },
951
+ {
952
+ name: '_sig',
953
+ type: 'tuple',
954
+ components: [
955
+ {
956
+ name: 'signature',
957
+ type: 'bytes',
958
+ },
959
+ {
960
+ name: 'nonce',
961
+ type: 'uint256',
962
+ },
963
+ {
964
+ name: 'expiration',
965
+ type: 'uint256',
966
+ },
967
+ ],
968
+ },
969
+ ],
970
+ outputs: [
971
+ {
972
+ name: '',
973
+ type: 'uint256',
974
+ },
975
+ {
976
+ name: '',
977
+ type: 'uint256',
978
+ },
979
+ ],
980
+ },
981
+ {
982
+ stateMutability: 'nonpayable',
983
+ type: 'function',
984
+ name: 'performBatchActions',
985
+ inputs: [
986
+ {
987
+ name: '_userWallet',
988
+ type: 'address',
989
+ },
990
+ {
991
+ name: '_instructions',
992
+ type: 'tuple[]',
993
+ components: [
994
+ {
995
+ name: 'usePrevAmountOut',
996
+ type: 'bool',
997
+ },
998
+ {
999
+ name: 'action',
1000
+ type: 'uint8',
1001
+ },
1002
+ {
1003
+ name: 'legoId',
1004
+ type: 'uint16',
1005
+ },
1006
+ {
1007
+ name: 'asset',
1008
+ type: 'address',
1009
+ },
1010
+ {
1011
+ name: 'target',
1012
+ type: 'address',
1013
+ },
1014
+ {
1015
+ name: 'amount',
1016
+ type: 'uint256',
1017
+ },
1018
+ {
1019
+ name: 'extraData',
1020
+ type: 'bytes32',
1021
+ },
1022
+ ],
1023
+ },
1024
+ ],
1025
+ outputs: [
1026
+ {
1027
+ name: '',
1028
+ type: 'bool',
1029
+ },
1030
+ ],
1031
+ },
1032
+ {
1033
+ stateMutability: 'nonpayable',
1034
+ type: 'function',
1035
+ name: 'performBatchActions',
1036
+ inputs: [
1037
+ {
1038
+ name: '_userWallet',
1039
+ type: 'address',
1040
+ },
1041
+ {
1042
+ name: '_instructions',
1043
+ type: 'tuple[]',
1044
+ components: [
1045
+ {
1046
+ name: 'usePrevAmountOut',
1047
+ type: 'bool',
1048
+ },
1049
+ {
1050
+ name: 'action',
1051
+ type: 'uint8',
1052
+ },
1053
+ {
1054
+ name: 'legoId',
1055
+ type: 'uint16',
1056
+ },
1057
+ {
1058
+ name: 'asset',
1059
+ type: 'address',
1060
+ },
1061
+ {
1062
+ name: 'target',
1063
+ type: 'address',
1064
+ },
1065
+ {
1066
+ name: 'amount',
1067
+ type: 'uint256',
1068
+ },
1069
+ {
1070
+ name: 'extraData',
1071
+ type: 'bytes32',
1072
+ },
1073
+ ],
1074
+ },
1075
+ {
1076
+ name: '_sig',
1077
+ type: 'tuple',
1078
+ components: [
1079
+ {
1080
+ name: 'signature',
1081
+ type: 'bytes',
1082
+ },
1083
+ {
1084
+ name: 'nonce',
1085
+ type: 'uint256',
1086
+ },
1087
+ {
1088
+ name: 'expiration',
1089
+ type: 'uint256',
1090
+ },
1091
+ ],
1092
+ },
1093
+ ],
1094
+ outputs: [
1095
+ {
1096
+ name: '',
1097
+ type: 'bool',
1098
+ },
1099
+ ],
1100
+ },
1101
+ {
1102
+ stateMutability: 'nonpayable',
1103
+ type: 'function',
1104
+ name: 'incrementNonce',
1105
+ inputs: [
1106
+ {
1107
+ name: '_userWallet',
1108
+ type: 'address',
1109
+ },
1110
+ ],
1111
+ outputs: [],
1112
+ },
1113
+ {
1114
+ stateMutability: 'view',
1115
+ type: 'function',
1116
+ name: 'getNonce',
1117
+ inputs: [
1118
+ {
1119
+ name: '_userWallet',
1120
+ type: 'address',
1121
+ },
1122
+ ],
1123
+ outputs: [
1124
+ {
1125
+ name: '',
1126
+ type: 'uint256',
1127
+ },
1128
+ ],
1129
+ },
1130
+ {
1131
+ stateMutability: 'view',
1132
+ type: 'function',
1133
+ name: 'groupId',
1134
+ inputs: [],
1135
+ outputs: [
1136
+ {
1137
+ name: '',
1138
+ type: 'uint256',
1139
+ },
1140
+ ],
1141
+ },
1142
+ {
1143
+ stateMutability: 'view',
1144
+ type: 'function',
1145
+ name: 'currentNonce',
1146
+ inputs: [
1147
+ {
1148
+ name: 'arg0',
1149
+ type: 'address',
1150
+ },
1151
+ ],
1152
+ outputs: [
1153
+ {
1154
+ name: '',
1155
+ type: 'uint256',
1156
+ },
1157
+ ],
1158
+ },
1159
+ {
1160
+ stateMutability: 'nonpayable',
1161
+ type: 'constructor',
1162
+ inputs: [
1163
+ {
1164
+ name: '_undyHq',
1165
+ type: 'address',
1166
+ },
1167
+ {
1168
+ name: '_owner',
1169
+ type: 'address',
1170
+ },
1171
+ {
1172
+ name: '_groupId',
1173
+ type: 'uint256',
1174
+ },
1175
+ {
1176
+ name: '_minTimeLock',
1177
+ type: 'uint256',
1178
+ },
1179
+ {
1180
+ name: '_maxTimeLock',
1181
+ type: 'uint256',
1182
+ },
1183
+ ],
1184
+ outputs: [],
1185
+ },
1186
+ ];
1187
+ export const deployAddress = '0x6B014c7BE0fCA7801133Db96737378CCE85230a7';
1188
+ function getRequest(method, args, contractAddressOrOptions) {
1189
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1190
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
1191
+ const call = {
1192
+ contractName: 'EarnVaultAgent',
1193
+ method,
1194
+ args,
1195
+ address,
1196
+ deployAddress,
1197
+ defaultValue,
1198
+ getAbi: () => abi,
1199
+ with: (options) => {
1200
+ call.address = options.contractAddress;
1201
+ call.defaultValue = options.defaultValue;
1202
+ return call;
1203
+ },
1204
+ defaultTo: (defaultValue) => {
1205
+ call.defaultValue = defaultValue;
1206
+ return call;
1207
+ },
1208
+ at: (address) => {
1209
+ call.address = address;
1210
+ return call;
1211
+ },
1212
+ };
1213
+ return call;
1214
+ }
1215
+ export const call = {
1216
+ hasPendingOwnerChange: (...args) => getRequest('hasPendingOwnerChange', args),
1217
+ owner: (...args) => getRequest('owner', args),
1218
+ ownershipTimeLock: (...args) => getRequest('ownershipTimeLock', args),
1219
+ pendingOwner: (...args) => getRequest('pendingOwner', args),
1220
+ MIN_OWNERSHIP_TIMELOCK: (...args) => getRequest('MIN_OWNERSHIP_TIMELOCK', args),
1221
+ MAX_OWNERSHIP_TIMELOCK: (...args) => getRequest('MAX_OWNERSHIP_TIMELOCK', args),
1222
+ getNonce: (...args) => getRequest('getNonce', args),
1223
+ groupId: (...args) => getRequest('groupId', args),
1224
+ currentNonce: (...args) => getRequest('currentNonce', args),
1225
+ };
1226
+ function getMutation(functionName) {
1227
+ return {
1228
+ contractName: 'EarnVaultAgent',
1229
+ functionName,
1230
+ deployAddress,
1231
+ argsType: undefined,
1232
+ getAbi: () => abi,
1233
+ };
1234
+ }
1235
+ export const mutation = {
1236
+ changeOwnership: getMutation('changeOwnership'),
1237
+ confirmOwnershipChange: getMutation('confirmOwnershipChange'),
1238
+ cancelOwnershipChange: getMutation('cancelOwnershipChange'),
1239
+ setOwnershipTimeLock: getMutation('setOwnershipTimeLock'),
1240
+ depositForYield: getMutation('depositForYield'),
1241
+ withdrawFromYield: getMutation('withdrawFromYield'),
1242
+ swapTokens: getMutation('swapTokens'),
1243
+ claimIncentives: getMutation('claimIncentives'),
1244
+ performBatchActions: getMutation('performBatchActions'),
1245
+ incrementNonce: getMutation('incrementNonce'),
1246
+ };
1247
+ export function toSdk(publicClient, walletClient) {
1248
+ return {
1249
+ deployAddress,
1250
+ abi,
1251
+ // Queries
1252
+ hasPendingOwnerChange: (...args) => singleQuery(publicClient, call.hasPendingOwnerChange(...args)),
1253
+ owner: (...args) => singleQuery(publicClient, call.owner(...args)),
1254
+ ownershipTimeLock: (...args) => singleQuery(publicClient, call.ownershipTimeLock(...args)),
1255
+ pendingOwner: (...args) => singleQuery(publicClient, call.pendingOwner(...args)),
1256
+ MIN_OWNERSHIP_TIMELOCK: (...args) => singleQuery(publicClient, call.MIN_OWNERSHIP_TIMELOCK(...args)),
1257
+ MAX_OWNERSHIP_TIMELOCK: (...args) => singleQuery(publicClient, call.MAX_OWNERSHIP_TIMELOCK(...args)),
1258
+ getNonce: (...args) => singleQuery(publicClient, call.getNonce(...args)),
1259
+ groupId: (...args) => singleQuery(publicClient, call.groupId(...args)),
1260
+ currentNonce: (...args) => singleQuery(publicClient, call.currentNonce(...args)),
1261
+ // Mutations
1262
+ changeOwnership: (...args) => mutate(walletClient, mutation.changeOwnership)(...args),
1263
+ confirmOwnershipChange: (...args) => mutate(walletClient, mutation.confirmOwnershipChange)(...args),
1264
+ cancelOwnershipChange: (...args) => mutate(walletClient, mutation.cancelOwnershipChange)(...args),
1265
+ setOwnershipTimeLock: (...args) => mutate(walletClient, mutation.setOwnershipTimeLock)(...args),
1266
+ depositForYield: (...args) => mutate(walletClient, mutation.depositForYield)(...args),
1267
+ withdrawFromYield: (...args) => mutate(walletClient, mutation.withdrawFromYield)(...args),
1268
+ swapTokens: (...args) => mutate(walletClient, mutation.swapTokens)(...args),
1269
+ claimIncentives: (...args) => mutate(walletClient, mutation.claimIncentives)(...args),
1270
+ performBatchActions: (...args) => mutate(walletClient, mutation.performBatchActions)(...args),
1271
+ incrementNonce: (...args) => mutate(walletClient, mutation.incrementNonce)(...args),
1272
+ };
1273
+ }