@underscore-finance/sdk 1.2.20-next.0 → 1.2.20-next.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 (254) hide show
  1. package/.claude/settings.local.json +31 -0
  2. package/.eslintrc.json +27 -0
  3. package/.prettierrc +9 -0
  4. package/.tool-versions +1 -0
  5. package/LICENSE +41 -0
  6. package/LICENSE_DATE.md +34 -0
  7. package/LICENSE_GRANTS.md +33 -0
  8. package/LICENSE_INFO.md +90 -0
  9. package/README.md +116 -17
  10. package/dapp.config.js +154 -0
  11. package/package.json +17 -44
  12. package/src/getSwapInstructions.ts +55 -0
  13. package/src/index.ts +192 -0
  14. package/tsconfig.json +18 -0
  15. package/AGENTS.md +0 -162
  16. package/abis.json +0 -181875
  17. package/addresses.json +0 -76
  18. package/dist/contracts/AaveV3.d.ts +0 -2594
  19. package/dist/contracts/AaveV3.d.ts.map +0 -1
  20. package/dist/contracts/AaveV3.js +0 -3272
  21. package/dist/contracts/AeroClassic.d.ts +0 -2118
  22. package/dist/contracts/AeroClassic.d.ts.map +0 -1
  23. package/dist/contracts/AeroClassic.js +0 -2679
  24. package/dist/contracts/AeroSlipstream.d.ts +0 -2256
  25. package/dist/contracts/AeroSlipstream.d.ts.map +0 -1
  26. package/dist/contracts/AeroSlipstream.js +0 -2848
  27. package/dist/contracts/AgentSenderGeneric.d.ts +0 -4129
  28. package/dist/contracts/AgentSenderGeneric.d.ts.map +0 -1
  29. package/dist/contracts/AgentSenderGeneric.js +0 -5397
  30. package/dist/contracts/AgentSenderSpecial.d.ts +0 -1997
  31. package/dist/contracts/AgentSenderSpecial.d.ts.map +0 -1
  32. package/dist/contracts/AgentSenderSpecial.js +0 -2532
  33. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts +0 -2245
  34. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts.map +0 -1
  35. package/dist/contracts/AgentSenderSpecialSigHelper.js +0 -2971
  36. package/dist/contracts/AgentWrapper.d.ts +0 -2520
  37. package/dist/contracts/AgentWrapper.d.ts.map +0 -1
  38. package/dist/contracts/AgentWrapper.js +0 -3389
  39. package/dist/contracts/AgentWrapperV1.d.ts +0 -3789
  40. package/dist/contracts/AgentWrapperV1.d.ts.map +0 -1
  41. package/dist/contracts/AgentWrapperV1.js +0 -4945
  42. package/dist/contracts/AgentWrapperV2.d.ts +0 -2494
  43. package/dist/contracts/AgentWrapperV2.d.ts.map +0 -1
  44. package/dist/contracts/AgentWrapperV2.js +0 -3354
  45. package/dist/contracts/Appraiser.d.ts +0 -577
  46. package/dist/contracts/Appraiser.d.ts.map +0 -1
  47. package/dist/contracts/Appraiser.js +0 -735
  48. package/dist/contracts/Avantis.d.ts +0 -2606
  49. package/dist/contracts/Avantis.d.ts.map +0 -1
  50. package/dist/contracts/Avantis.js +0 -3282
  51. package/dist/contracts/Billing.d.ts +0 -381
  52. package/dist/contracts/Billing.d.ts.map +0 -1
  53. package/dist/contracts/Billing.js +0 -451
  54. package/dist/contracts/ChequeBook.d.ts +0 -1704
  55. package/dist/contracts/ChequeBook.d.ts.map +0 -1
  56. package/dist/contracts/ChequeBook.js +0 -1922
  57. package/dist/contracts/CompoundV3.d.ts +0 -2622
  58. package/dist/contracts/CompoundV3.d.ts.map +0 -1
  59. package/dist/contracts/CompoundV3.js +0 -3304
  60. package/dist/contracts/ConvertVaultToken.d.ts +0 -64
  61. package/dist/contracts/ConvertVaultToken.d.ts.map +0 -1
  62. package/dist/contracts/ConvertVaultToken.js +0 -75
  63. package/dist/contracts/Curve.d.ts +0 -1107
  64. package/dist/contracts/Curve.d.ts.map +0 -1
  65. package/dist/contracts/Curve.js +0 -1379
  66. package/dist/contracts/DefaultsBase.d.ts +0 -306
  67. package/dist/contracts/DefaultsBase.d.ts.map +0 -1
  68. package/dist/contracts/DefaultsBase.js +0 -331
  69. package/dist/contracts/ERC20.d.ts +0 -288
  70. package/dist/contracts/ERC20.d.ts.map +0 -1
  71. package/dist/contracts/ERC20.js +0 -359
  72. package/dist/contracts/EarnVault.d.ts +0 -1733
  73. package/dist/contracts/EarnVault.d.ts.map +0 -1
  74. package/dist/contracts/EarnVault.js +0 -2235
  75. package/dist/contracts/EarnVaultAgent.d.ts +0 -1033
  76. package/dist/contracts/EarnVaultAgent.d.ts.map +0 -1
  77. package/dist/contracts/EarnVaultAgent.js +0 -1296
  78. package/dist/contracts/EarnVaultAgentSigHelper.d.ts +0 -905
  79. package/dist/contracts/EarnVaultAgentSigHelper.d.ts.map +0 -1
  80. package/dist/contracts/EarnVaultAgentSigHelper.js +0 -1198
  81. package/dist/contracts/Euler.d.ts +0 -2662
  82. package/dist/contracts/Euler.d.ts.map +0 -1
  83. package/dist/contracts/Euler.js +0 -3350
  84. package/dist/contracts/ExtraFi.d.ts +0 -2637
  85. package/dist/contracts/ExtraFi.d.ts.map +0 -1
  86. package/dist/contracts/ExtraFi.js +0 -3323
  87. package/dist/contracts/Fluid.d.ts +0 -2634
  88. package/dist/contracts/Fluid.d.ts.map +0 -1
  89. package/dist/contracts/Fluid.js +0 -3318
  90. package/dist/contracts/FortyAcres.d.ts +0 -2620
  91. package/dist/contracts/FortyAcres.d.ts.map +0 -1
  92. package/dist/contracts/FortyAcres.js +0 -3300
  93. package/dist/contracts/Hatchery.d.ts +0 -392
  94. package/dist/contracts/Hatchery.d.ts.map +0 -1
  95. package/dist/contracts/Hatchery.js +0 -472
  96. package/dist/contracts/Helpers.d.ts +0 -1463
  97. package/dist/contracts/Helpers.d.ts.map +0 -1
  98. package/dist/contracts/Helpers.js +0 -1763
  99. package/dist/contracts/HighCommand.d.ts +0 -2129
  100. package/dist/contracts/HighCommand.d.ts.map +0 -1
  101. package/dist/contracts/HighCommand.js +0 -2429
  102. package/dist/contracts/Kernel.d.ts +0 -387
  103. package/dist/contracts/Kernel.d.ts.map +0 -1
  104. package/dist/contracts/Kernel.js +0 -442
  105. package/dist/contracts/Ledger.d.ts +0 -708
  106. package/dist/contracts/Ledger.d.ts.map +0 -1
  107. package/dist/contracts/Ledger.js +0 -854
  108. package/dist/contracts/LegoBook.d.ts +0 -1463
  109. package/dist/contracts/LegoBook.d.ts.map +0 -1
  110. package/dist/contracts/LegoBook.js +0 -1763
  111. package/dist/contracts/LegoTools.d.ts +0 -1913
  112. package/dist/contracts/LegoTools.d.ts.map +0 -1
  113. package/dist/contracts/LegoTools.js +0 -2402
  114. package/dist/contracts/LevgVault.d.ts +0 -2115
  115. package/dist/contracts/LevgVault.d.ts.map +0 -1
  116. package/dist/contracts/LevgVault.js +0 -2733
  117. package/dist/contracts/LevgVaultAgent.d.ts +0 -1955
  118. package/dist/contracts/LevgVaultAgent.d.ts.map +0 -1
  119. package/dist/contracts/LevgVaultAgent.js +0 -2508
  120. package/dist/contracts/LevgVaultAgentSigHelper.d.ts +0 -2221
  121. package/dist/contracts/LevgVaultAgentSigHelper.d.ts.map +0 -1
  122. package/dist/contracts/LevgVaultAgentSigHelper.js +0 -2963
  123. package/dist/contracts/LevgVaultHelper.d.ts +0 -977
  124. package/dist/contracts/LevgVaultHelper.d.ts.map +0 -1
  125. package/dist/contracts/LevgVaultHelper.js +0 -1289
  126. package/dist/contracts/LevgVaultTools.d.ts +0 -2629
  127. package/dist/contracts/LevgVaultTools.d.ts.map +0 -1
  128. package/dist/contracts/LevgVaultTools.js +0 -3560
  129. package/dist/contracts/LootDistributor.d.ts +0 -1053
  130. package/dist/contracts/LootDistributor.d.ts.map +0 -1
  131. package/dist/contracts/LootDistributor.js +0 -1291
  132. package/dist/contracts/Migrator.d.ts +0 -289
  133. package/dist/contracts/Migrator.d.ts.map +0 -1
  134. package/dist/contracts/Migrator.js +0 -348
  135. package/dist/contracts/MissionControl.d.ts +0 -1405
  136. package/dist/contracts/MissionControl.d.ts.map +0 -1
  137. package/dist/contracts/MissionControl.js +0 -1592
  138. package/dist/contracts/Moonwell.d.ts +0 -2623
  139. package/dist/contracts/Moonwell.d.ts.map +0 -1
  140. package/dist/contracts/Moonwell.js +0 -3304
  141. package/dist/contracts/Morpho.d.ts +0 -2662
  142. package/dist/contracts/Morpho.d.ts.map +0 -1
  143. package/dist/contracts/Morpho.js +0 -3350
  144. package/dist/contracts/Paymaster.d.ts +0 -1714
  145. package/dist/contracts/Paymaster.d.ts.map +0 -1
  146. package/dist/contracts/Paymaster.js +0 -2098
  147. package/dist/contracts/RipeLego.d.ts +0 -2913
  148. package/dist/contracts/RipeLego.d.ts.map +0 -1
  149. package/dist/contracts/RipeLego.js +0 -3643
  150. package/dist/contracts/Sentinel.d.ts +0 -2064
  151. package/dist/contracts/Sentinel.d.ts.map +0 -1
  152. package/dist/contracts/Sentinel.js +0 -2476
  153. package/dist/contracts/SignatureHelper.d.ts +0 -4250
  154. package/dist/contracts/SignatureHelper.d.ts.map +0 -1
  155. package/dist/contracts/SignatureHelper.js +0 -5714
  156. package/dist/contracts/SignatureHelperV1.d.ts +0 -4250
  157. package/dist/contracts/SignatureHelperV1.d.ts.map +0 -1
  158. package/dist/contracts/SignatureHelperV1.js +0 -5714
  159. package/dist/contracts/SkyPsm.d.ts +0 -2667
  160. package/dist/contracts/SkyPsm.d.ts.map +0 -1
  161. package/dist/contracts/SkyPsm.js +0 -3356
  162. package/dist/contracts/Switchboard.d.ts +0 -1483
  163. package/dist/contracts/Switchboard.d.ts.map +0 -1
  164. package/dist/contracts/Switchboard.js +0 -1790
  165. package/dist/contracts/SwitchboardAlpha.d.ts +0 -3161
  166. package/dist/contracts/SwitchboardAlpha.d.ts.map +0 -1
  167. package/dist/contracts/SwitchboardAlpha.js +0 -3771
  168. package/dist/contracts/SwitchboardBravo.d.ts +0 -1591
  169. package/dist/contracts/SwitchboardBravo.d.ts.map +0 -1
  170. package/dist/contracts/SwitchboardBravo.js +0 -1872
  171. package/dist/contracts/SwitchboardCharlie.d.ts +0 -3172
  172. package/dist/contracts/SwitchboardCharlie.d.ts.map +0 -1
  173. package/dist/contracts/SwitchboardCharlie.js +0 -3713
  174. package/dist/contracts/UnderscoreLego.d.ts +0 -2592
  175. package/dist/contracts/UnderscoreLego.d.ts.map +0 -1
  176. package/dist/contracts/UnderscoreLego.js +0 -3264
  177. package/dist/contracts/UndyAero.d.ts +0 -1733
  178. package/dist/contracts/UndyAero.d.ts.map +0 -1
  179. package/dist/contracts/UndyAero.js +0 -2235
  180. package/dist/contracts/UndyBtc.d.ts +0 -1733
  181. package/dist/contracts/UndyBtc.d.ts.map +0 -1
  182. package/dist/contracts/UndyBtc.js +0 -2235
  183. package/dist/contracts/UndyCbeth.d.ts +0 -1733
  184. package/dist/contracts/UndyCbeth.d.ts.map +0 -1
  185. package/dist/contracts/UndyCbeth.js +0 -2235
  186. package/dist/contracts/UndyEth.d.ts +0 -1733
  187. package/dist/contracts/UndyEth.d.ts.map +0 -1
  188. package/dist/contracts/UndyEth.js +0 -2235
  189. package/dist/contracts/UndyEurc.d.ts +0 -1733
  190. package/dist/contracts/UndyEurc.d.ts.map +0 -1
  191. package/dist/contracts/UndyEurc.js +0 -2235
  192. package/dist/contracts/UndyGho.d.ts +0 -1733
  193. package/dist/contracts/UndyGho.d.ts.map +0 -1
  194. package/dist/contracts/UndyGho.js +0 -2235
  195. package/dist/contracts/UndyHq.d.ts +0 -1677
  196. package/dist/contracts/UndyHq.d.ts.map +0 -1
  197. package/dist/contracts/UndyHq.js +0 -2026
  198. package/dist/contracts/UndyRewardsLego.d.ts +0 -1572
  199. package/dist/contracts/UndyRewardsLego.d.ts.map +0 -1
  200. package/dist/contracts/UndyRewardsLego.js +0 -1994
  201. package/dist/contracts/UndyUsd.d.ts +0 -1733
  202. package/dist/contracts/UndyUsd.d.ts.map +0 -1
  203. package/dist/contracts/UndyUsd.js +0 -2235
  204. package/dist/contracts/UndyUsdV2.d.ts +0 -1762
  205. package/dist/contracts/UndyUsdV2.d.ts.map +0 -1
  206. package/dist/contracts/UndyUsdV2.js +0 -2267
  207. package/dist/contracts/UndyUsds.d.ts +0 -1733
  208. package/dist/contracts/UndyUsds.d.ts.map +0 -1
  209. package/dist/contracts/UndyUsds.js +0 -2235
  210. package/dist/contracts/UndyVirtual.d.ts +0 -1762
  211. package/dist/contracts/UndyVirtual.d.ts.map +0 -1
  212. package/dist/contracts/UndyVirtual.js +0 -2267
  213. package/dist/contracts/UniswapV2.d.ts +0 -2118
  214. package/dist/contracts/UniswapV2.d.ts.map +0 -1
  215. package/dist/contracts/UniswapV2.js +0 -2679
  216. package/dist/contracts/UniswapV3.d.ts +0 -2256
  217. package/dist/contracts/UniswapV3.d.ts.map +0 -1
  218. package/dist/contracts/UniswapV3.js +0 -2848
  219. package/dist/contracts/UserWallet.d.ts +0 -2650
  220. package/dist/contracts/UserWallet.d.ts.map +0 -1
  221. package/dist/contracts/UserWallet.js +0 -3520
  222. package/dist/contracts/UserWalletConfig.d.ts +0 -3901
  223. package/dist/contracts/UserWalletConfig.d.ts.map +0 -1
  224. package/dist/contracts/UserWalletConfig.js +0 -4507
  225. package/dist/contracts/UserWalletConfigV1.d.ts +0 -3692
  226. package/dist/contracts/UserWalletConfigV1.d.ts.map +0 -1
  227. package/dist/contracts/UserWalletConfigV1.js +0 -4276
  228. package/dist/contracts/UserWalletSignatureHelper.d.ts +0 -4552
  229. package/dist/contracts/UserWalletSignatureHelper.d.ts.map +0 -1
  230. package/dist/contracts/UserWalletSignatureHelper.js +0 -6123
  231. package/dist/contracts/UserWalletV1.d.ts +0 -2650
  232. package/dist/contracts/UserWalletV1.d.ts.map +0 -1
  233. package/dist/contracts/UserWalletV1.js +0 -3520
  234. package/dist/contracts/VaultRegistry.d.ts +0 -3162
  235. package/dist/contracts/VaultRegistry.d.ts.map +0 -1
  236. package/dist/contracts/VaultRegistry.js +0 -3893
  237. package/dist/contracts/WalletBackpack.d.ts +0 -1248
  238. package/dist/contracts/WalletBackpack.d.ts.map +0 -1
  239. package/dist/contracts/WalletBackpack.js +0 -1519
  240. package/dist/contracts/Wasabi.d.ts +0 -2620
  241. package/dist/contracts/Wasabi.d.ts.map +0 -1
  242. package/dist/contracts/Wasabi.js +0 -3300
  243. package/dist/contracts/index.d.ts +0 -76
  244. package/dist/contracts/index.d.ts.map +0 -1
  245. package/dist/contracts/index.js +0 -79
  246. package/dist/contracts/sdk.d.ts +0 -156
  247. package/dist/contracts/sdk.d.ts.map +0 -1
  248. package/dist/contracts/sdk.js +0 -158
  249. package/dist/getSwapInstructions.d.ts +0 -34
  250. package/dist/getSwapInstructions.d.ts.map +0 -1
  251. package/dist/getSwapInstructions.js +0 -21
  252. package/dist/index.d.ts +0 -135
  253. package/dist/index.d.ts.map +0 -1
  254. package/dist/index.js +0 -137
@@ -1,2971 +0,0 @@
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": "getAddCollateralAndBorrowHash",
11
- "inputs": [
12
- {
13
- "name": "_agentSender",
14
- "type": "address"
15
- },
16
- {
17
- "name": "_userWallet",
18
- "type": "address"
19
- },
20
- {
21
- "name": "_debtLegoId",
22
- "type": "uint256"
23
- }
24
- ],
25
- "outputs": [
26
- {
27
- "name": "",
28
- "type": "bytes32"
29
- },
30
- {
31
- "name": "",
32
- "type": "uint256"
33
- },
34
- {
35
- "name": "",
36
- "type": "uint256"
37
- }
38
- ]
39
- },
40
- {
41
- "stateMutability": "view",
42
- "type": "function",
43
- "name": "getAddCollateralAndBorrowHash",
44
- "inputs": [
45
- {
46
- "name": "_agentSender",
47
- "type": "address"
48
- },
49
- {
50
- "name": "_userWallet",
51
- "type": "address"
52
- },
53
- {
54
- "name": "_debtLegoId",
55
- "type": "uint256"
56
- },
57
- {
58
- "name": "_addCollateralAssets",
59
- "type": "tuple[]",
60
- "components": [
61
- {
62
- "name": "vaultId",
63
- "type": "uint256"
64
- },
65
- {
66
- "name": "asset",
67
- "type": "address"
68
- },
69
- {
70
- "name": "amount",
71
- "type": "uint256"
72
- }
73
- ]
74
- }
75
- ],
76
- "outputs": [
77
- {
78
- "name": "",
79
- "type": "bytes32"
80
- },
81
- {
82
- "name": "",
83
- "type": "uint256"
84
- },
85
- {
86
- "name": "",
87
- "type": "uint256"
88
- }
89
- ]
90
- },
91
- {
92
- "stateMutability": "view",
93
- "type": "function",
94
- "name": "getAddCollateralAndBorrowHash",
95
- "inputs": [
96
- {
97
- "name": "_agentSender",
98
- "type": "address"
99
- },
100
- {
101
- "name": "_userWallet",
102
- "type": "address"
103
- },
104
- {
105
- "name": "_debtLegoId",
106
- "type": "uint256"
107
- },
108
- {
109
- "name": "_addCollateralAssets",
110
- "type": "tuple[]",
111
- "components": [
112
- {
113
- "name": "vaultId",
114
- "type": "uint256"
115
- },
116
- {
117
- "name": "asset",
118
- "type": "address"
119
- },
120
- {
121
- "name": "amount",
122
- "type": "uint256"
123
- }
124
- ]
125
- },
126
- {
127
- "name": "_greenBorrowAmount",
128
- "type": "uint256"
129
- }
130
- ],
131
- "outputs": [
132
- {
133
- "name": "",
134
- "type": "bytes32"
135
- },
136
- {
137
- "name": "",
138
- "type": "uint256"
139
- },
140
- {
141
- "name": "",
142
- "type": "uint256"
143
- }
144
- ]
145
- },
146
- {
147
- "stateMutability": "view",
148
- "type": "function",
149
- "name": "getAddCollateralAndBorrowHash",
150
- "inputs": [
151
- {
152
- "name": "_agentSender",
153
- "type": "address"
154
- },
155
- {
156
- "name": "_userWallet",
157
- "type": "address"
158
- },
159
- {
160
- "name": "_debtLegoId",
161
- "type": "uint256"
162
- },
163
- {
164
- "name": "_addCollateralAssets",
165
- "type": "tuple[]",
166
- "components": [
167
- {
168
- "name": "vaultId",
169
- "type": "uint256"
170
- },
171
- {
172
- "name": "asset",
173
- "type": "address"
174
- },
175
- {
176
- "name": "amount",
177
- "type": "uint256"
178
- }
179
- ]
180
- },
181
- {
182
- "name": "_greenBorrowAmount",
183
- "type": "uint256"
184
- },
185
- {
186
- "name": "_wantsSavingsGreen",
187
- "type": "bool"
188
- }
189
- ],
190
- "outputs": [
191
- {
192
- "name": "",
193
- "type": "bytes32"
194
- },
195
- {
196
- "name": "",
197
- "type": "uint256"
198
- },
199
- {
200
- "name": "",
201
- "type": "uint256"
202
- }
203
- ]
204
- },
205
- {
206
- "stateMutability": "view",
207
- "type": "function",
208
- "name": "getAddCollateralAndBorrowHash",
209
- "inputs": [
210
- {
211
- "name": "_agentSender",
212
- "type": "address"
213
- },
214
- {
215
- "name": "_userWallet",
216
- "type": "address"
217
- },
218
- {
219
- "name": "_debtLegoId",
220
- "type": "uint256"
221
- },
222
- {
223
- "name": "_addCollateralAssets",
224
- "type": "tuple[]",
225
- "components": [
226
- {
227
- "name": "vaultId",
228
- "type": "uint256"
229
- },
230
- {
231
- "name": "asset",
232
- "type": "address"
233
- },
234
- {
235
- "name": "amount",
236
- "type": "uint256"
237
- }
238
- ]
239
- },
240
- {
241
- "name": "_greenBorrowAmount",
242
- "type": "uint256"
243
- },
244
- {
245
- "name": "_wantsSavingsGreen",
246
- "type": "bool"
247
- },
248
- {
249
- "name": "_shouldEnterStabPool",
250
- "type": "bool"
251
- }
252
- ],
253
- "outputs": [
254
- {
255
- "name": "",
256
- "type": "bytes32"
257
- },
258
- {
259
- "name": "",
260
- "type": "uint256"
261
- },
262
- {
263
- "name": "",
264
- "type": "uint256"
265
- }
266
- ]
267
- },
268
- {
269
- "stateMutability": "view",
270
- "type": "function",
271
- "name": "getAddCollateralAndBorrowHash",
272
- "inputs": [
273
- {
274
- "name": "_agentSender",
275
- "type": "address"
276
- },
277
- {
278
- "name": "_userWallet",
279
- "type": "address"
280
- },
281
- {
282
- "name": "_debtLegoId",
283
- "type": "uint256"
284
- },
285
- {
286
- "name": "_addCollateralAssets",
287
- "type": "tuple[]",
288
- "components": [
289
- {
290
- "name": "vaultId",
291
- "type": "uint256"
292
- },
293
- {
294
- "name": "asset",
295
- "type": "address"
296
- },
297
- {
298
- "name": "amount",
299
- "type": "uint256"
300
- }
301
- ]
302
- },
303
- {
304
- "name": "_greenBorrowAmount",
305
- "type": "uint256"
306
- },
307
- {
308
- "name": "_wantsSavingsGreen",
309
- "type": "bool"
310
- },
311
- {
312
- "name": "_shouldEnterStabPool",
313
- "type": "bool"
314
- },
315
- {
316
- "name": "_swapInstructions",
317
- "type": "tuple[]",
318
- "components": [
319
- {
320
- "name": "legoId",
321
- "type": "uint256"
322
- },
323
- {
324
- "name": "amountIn",
325
- "type": "uint256"
326
- },
327
- {
328
- "name": "minAmountOut",
329
- "type": "uint256"
330
- },
331
- {
332
- "name": "tokenPath",
333
- "type": "address[]"
334
- },
335
- {
336
- "name": "poolPath",
337
- "type": "address[]"
338
- }
339
- ]
340
- }
341
- ],
342
- "outputs": [
343
- {
344
- "name": "",
345
- "type": "bytes32"
346
- },
347
- {
348
- "name": "",
349
- "type": "uint256"
350
- },
351
- {
352
- "name": "",
353
- "type": "uint256"
354
- }
355
- ]
356
- },
357
- {
358
- "stateMutability": "view",
359
- "type": "function",
360
- "name": "getAddCollateralAndBorrowHash",
361
- "inputs": [
362
- {
363
- "name": "_agentSender",
364
- "type": "address"
365
- },
366
- {
367
- "name": "_userWallet",
368
- "type": "address"
369
- },
370
- {
371
- "name": "_debtLegoId",
372
- "type": "uint256"
373
- },
374
- {
375
- "name": "_addCollateralAssets",
376
- "type": "tuple[]",
377
- "components": [
378
- {
379
- "name": "vaultId",
380
- "type": "uint256"
381
- },
382
- {
383
- "name": "asset",
384
- "type": "address"
385
- },
386
- {
387
- "name": "amount",
388
- "type": "uint256"
389
- }
390
- ]
391
- },
392
- {
393
- "name": "_greenBorrowAmount",
394
- "type": "uint256"
395
- },
396
- {
397
- "name": "_wantsSavingsGreen",
398
- "type": "bool"
399
- },
400
- {
401
- "name": "_shouldEnterStabPool",
402
- "type": "bool"
403
- },
404
- {
405
- "name": "_swapInstructions",
406
- "type": "tuple[]",
407
- "components": [
408
- {
409
- "name": "legoId",
410
- "type": "uint256"
411
- },
412
- {
413
- "name": "amountIn",
414
- "type": "uint256"
415
- },
416
- {
417
- "name": "minAmountOut",
418
- "type": "uint256"
419
- },
420
- {
421
- "name": "tokenPath",
422
- "type": "address[]"
423
- },
424
- {
425
- "name": "poolPath",
426
- "type": "address[]"
427
- }
428
- ]
429
- },
430
- {
431
- "name": "_yieldPosition",
432
- "type": "tuple",
433
- "components": [
434
- {
435
- "name": "legoId",
436
- "type": "uint256"
437
- },
438
- {
439
- "name": "asset",
440
- "type": "address"
441
- },
442
- {
443
- "name": "amount",
444
- "type": "uint256"
445
- },
446
- {
447
- "name": "vaultAddr",
448
- "type": "address"
449
- }
450
- ]
451
- }
452
- ],
453
- "outputs": [
454
- {
455
- "name": "",
456
- "type": "bytes32"
457
- },
458
- {
459
- "name": "",
460
- "type": "uint256"
461
- },
462
- {
463
- "name": "",
464
- "type": "uint256"
465
- }
466
- ]
467
- },
468
- {
469
- "stateMutability": "view",
470
- "type": "function",
471
- "name": "getAddCollateralAndBorrowHash",
472
- "inputs": [
473
- {
474
- "name": "_agentSender",
475
- "type": "address"
476
- },
477
- {
478
- "name": "_userWallet",
479
- "type": "address"
480
- },
481
- {
482
- "name": "_debtLegoId",
483
- "type": "uint256"
484
- },
485
- {
486
- "name": "_addCollateralAssets",
487
- "type": "tuple[]",
488
- "components": [
489
- {
490
- "name": "vaultId",
491
- "type": "uint256"
492
- },
493
- {
494
- "name": "asset",
495
- "type": "address"
496
- },
497
- {
498
- "name": "amount",
499
- "type": "uint256"
500
- }
501
- ]
502
- },
503
- {
504
- "name": "_greenBorrowAmount",
505
- "type": "uint256"
506
- },
507
- {
508
- "name": "_wantsSavingsGreen",
509
- "type": "bool"
510
- },
511
- {
512
- "name": "_shouldEnterStabPool",
513
- "type": "bool"
514
- },
515
- {
516
- "name": "_swapInstructions",
517
- "type": "tuple[]",
518
- "components": [
519
- {
520
- "name": "legoId",
521
- "type": "uint256"
522
- },
523
- {
524
- "name": "amountIn",
525
- "type": "uint256"
526
- },
527
- {
528
- "name": "minAmountOut",
529
- "type": "uint256"
530
- },
531
- {
532
- "name": "tokenPath",
533
- "type": "address[]"
534
- },
535
- {
536
- "name": "poolPath",
537
- "type": "address[]"
538
- }
539
- ]
540
- },
541
- {
542
- "name": "_yieldPosition",
543
- "type": "tuple",
544
- "components": [
545
- {
546
- "name": "legoId",
547
- "type": "uint256"
548
- },
549
- {
550
- "name": "asset",
551
- "type": "address"
552
- },
553
- {
554
- "name": "amount",
555
- "type": "uint256"
556
- },
557
- {
558
- "name": "vaultAddr",
559
- "type": "address"
560
- }
561
- ]
562
- },
563
- {
564
- "name": "_nonce",
565
- "type": "uint256"
566
- }
567
- ],
568
- "outputs": [
569
- {
570
- "name": "",
571
- "type": "bytes32"
572
- },
573
- {
574
- "name": "",
575
- "type": "uint256"
576
- },
577
- {
578
- "name": "",
579
- "type": "uint256"
580
- }
581
- ]
582
- },
583
- {
584
- "stateMutability": "view",
585
- "type": "function",
586
- "name": "getAddCollateralAndBorrowHash",
587
- "inputs": [
588
- {
589
- "name": "_agentSender",
590
- "type": "address"
591
- },
592
- {
593
- "name": "_userWallet",
594
- "type": "address"
595
- },
596
- {
597
- "name": "_debtLegoId",
598
- "type": "uint256"
599
- },
600
- {
601
- "name": "_addCollateralAssets",
602
- "type": "tuple[]",
603
- "components": [
604
- {
605
- "name": "vaultId",
606
- "type": "uint256"
607
- },
608
- {
609
- "name": "asset",
610
- "type": "address"
611
- },
612
- {
613
- "name": "amount",
614
- "type": "uint256"
615
- }
616
- ]
617
- },
618
- {
619
- "name": "_greenBorrowAmount",
620
- "type": "uint256"
621
- },
622
- {
623
- "name": "_wantsSavingsGreen",
624
- "type": "bool"
625
- },
626
- {
627
- "name": "_shouldEnterStabPool",
628
- "type": "bool"
629
- },
630
- {
631
- "name": "_swapInstructions",
632
- "type": "tuple[]",
633
- "components": [
634
- {
635
- "name": "legoId",
636
- "type": "uint256"
637
- },
638
- {
639
- "name": "amountIn",
640
- "type": "uint256"
641
- },
642
- {
643
- "name": "minAmountOut",
644
- "type": "uint256"
645
- },
646
- {
647
- "name": "tokenPath",
648
- "type": "address[]"
649
- },
650
- {
651
- "name": "poolPath",
652
- "type": "address[]"
653
- }
654
- ]
655
- },
656
- {
657
- "name": "_yieldPosition",
658
- "type": "tuple",
659
- "components": [
660
- {
661
- "name": "legoId",
662
- "type": "uint256"
663
- },
664
- {
665
- "name": "asset",
666
- "type": "address"
667
- },
668
- {
669
- "name": "amount",
670
- "type": "uint256"
671
- },
672
- {
673
- "name": "vaultAddr",
674
- "type": "address"
675
- }
676
- ]
677
- },
678
- {
679
- "name": "_nonce",
680
- "type": "uint256"
681
- },
682
- {
683
- "name": "_expiration",
684
- "type": "uint256"
685
- }
686
- ],
687
- "outputs": [
688
- {
689
- "name": "",
690
- "type": "bytes32"
691
- },
692
- {
693
- "name": "",
694
- "type": "uint256"
695
- },
696
- {
697
- "name": "",
698
- "type": "uint256"
699
- }
700
- ]
701
- },
702
- {
703
- "stateMutability": "view",
704
- "type": "function",
705
- "name": "getRepayAndWithdrawHash",
706
- "inputs": [
707
- {
708
- "name": "_agentSender",
709
- "type": "address"
710
- },
711
- {
712
- "name": "_userWallet",
713
- "type": "address"
714
- },
715
- {
716
- "name": "_debtLegoId",
717
- "type": "uint256"
718
- }
719
- ],
720
- "outputs": [
721
- {
722
- "name": "",
723
- "type": "bytes32"
724
- },
725
- {
726
- "name": "",
727
- "type": "uint256"
728
- },
729
- {
730
- "name": "",
731
- "type": "uint256"
732
- }
733
- ]
734
- },
735
- {
736
- "stateMutability": "view",
737
- "type": "function",
738
- "name": "getRepayAndWithdrawHash",
739
- "inputs": [
740
- {
741
- "name": "_agentSender",
742
- "type": "address"
743
- },
744
- {
745
- "name": "_userWallet",
746
- "type": "address"
747
- },
748
- {
749
- "name": "_debtLegoId",
750
- "type": "uint256"
751
- },
752
- {
753
- "name": "_deleverageAssets",
754
- "type": "tuple[]",
755
- "components": [
756
- {
757
- "name": "vaultId",
758
- "type": "uint256"
759
- },
760
- {
761
- "name": "asset",
762
- "type": "address"
763
- },
764
- {
765
- "name": "targetRepayAmount",
766
- "type": "uint256"
767
- }
768
- ]
769
- }
770
- ],
771
- "outputs": [
772
- {
773
- "name": "",
774
- "type": "bytes32"
775
- },
776
- {
777
- "name": "",
778
- "type": "uint256"
779
- },
780
- {
781
- "name": "",
782
- "type": "uint256"
783
- }
784
- ]
785
- },
786
- {
787
- "stateMutability": "view",
788
- "type": "function",
789
- "name": "getRepayAndWithdrawHash",
790
- "inputs": [
791
- {
792
- "name": "_agentSender",
793
- "type": "address"
794
- },
795
- {
796
- "name": "_userWallet",
797
- "type": "address"
798
- },
799
- {
800
- "name": "_debtLegoId",
801
- "type": "uint256"
802
- },
803
- {
804
- "name": "_deleverageAssets",
805
- "type": "tuple[]",
806
- "components": [
807
- {
808
- "name": "vaultId",
809
- "type": "uint256"
810
- },
811
- {
812
- "name": "asset",
813
- "type": "address"
814
- },
815
- {
816
- "name": "targetRepayAmount",
817
- "type": "uint256"
818
- }
819
- ]
820
- },
821
- {
822
- "name": "_yieldPosition",
823
- "type": "tuple",
824
- "components": [
825
- {
826
- "name": "legoId",
827
- "type": "uint256"
828
- },
829
- {
830
- "name": "vaultToken",
831
- "type": "address"
832
- },
833
- {
834
- "name": "vaultTokenAmount",
835
- "type": "uint256"
836
- }
837
- ]
838
- }
839
- ],
840
- "outputs": [
841
- {
842
- "name": "",
843
- "type": "bytes32"
844
- },
845
- {
846
- "name": "",
847
- "type": "uint256"
848
- },
849
- {
850
- "name": "",
851
- "type": "uint256"
852
- }
853
- ]
854
- },
855
- {
856
- "stateMutability": "view",
857
- "type": "function",
858
- "name": "getRepayAndWithdrawHash",
859
- "inputs": [
860
- {
861
- "name": "_agentSender",
862
- "type": "address"
863
- },
864
- {
865
- "name": "_userWallet",
866
- "type": "address"
867
- },
868
- {
869
- "name": "_debtLegoId",
870
- "type": "uint256"
871
- },
872
- {
873
- "name": "_deleverageAssets",
874
- "type": "tuple[]",
875
- "components": [
876
- {
877
- "name": "vaultId",
878
- "type": "uint256"
879
- },
880
- {
881
- "name": "asset",
882
- "type": "address"
883
- },
884
- {
885
- "name": "targetRepayAmount",
886
- "type": "uint256"
887
- }
888
- ]
889
- },
890
- {
891
- "name": "_yieldPosition",
892
- "type": "tuple",
893
- "components": [
894
- {
895
- "name": "legoId",
896
- "type": "uint256"
897
- },
898
- {
899
- "name": "vaultToken",
900
- "type": "address"
901
- },
902
- {
903
- "name": "vaultTokenAmount",
904
- "type": "uint256"
905
- }
906
- ]
907
- },
908
- {
909
- "name": "_swapInstructions",
910
- "type": "tuple[]",
911
- "components": [
912
- {
913
- "name": "legoId",
914
- "type": "uint256"
915
- },
916
- {
917
- "name": "amountIn",
918
- "type": "uint256"
919
- },
920
- {
921
- "name": "minAmountOut",
922
- "type": "uint256"
923
- },
924
- {
925
- "name": "tokenPath",
926
- "type": "address[]"
927
- },
928
- {
929
- "name": "poolPath",
930
- "type": "address[]"
931
- }
932
- ]
933
- }
934
- ],
935
- "outputs": [
936
- {
937
- "name": "",
938
- "type": "bytes32"
939
- },
940
- {
941
- "name": "",
942
- "type": "uint256"
943
- },
944
- {
945
- "name": "",
946
- "type": "uint256"
947
- }
948
- ]
949
- },
950
- {
951
- "stateMutability": "view",
952
- "type": "function",
953
- "name": "getRepayAndWithdrawHash",
954
- "inputs": [
955
- {
956
- "name": "_agentSender",
957
- "type": "address"
958
- },
959
- {
960
- "name": "_userWallet",
961
- "type": "address"
962
- },
963
- {
964
- "name": "_debtLegoId",
965
- "type": "uint256"
966
- },
967
- {
968
- "name": "_deleverageAssets",
969
- "type": "tuple[]",
970
- "components": [
971
- {
972
- "name": "vaultId",
973
- "type": "uint256"
974
- },
975
- {
976
- "name": "asset",
977
- "type": "address"
978
- },
979
- {
980
- "name": "targetRepayAmount",
981
- "type": "uint256"
982
- }
983
- ]
984
- },
985
- {
986
- "name": "_yieldPosition",
987
- "type": "tuple",
988
- "components": [
989
- {
990
- "name": "legoId",
991
- "type": "uint256"
992
- },
993
- {
994
- "name": "vaultToken",
995
- "type": "address"
996
- },
997
- {
998
- "name": "vaultTokenAmount",
999
- "type": "uint256"
1000
- }
1001
- ]
1002
- },
1003
- {
1004
- "name": "_swapInstructions",
1005
- "type": "tuple[]",
1006
- "components": [
1007
- {
1008
- "name": "legoId",
1009
- "type": "uint256"
1010
- },
1011
- {
1012
- "name": "amountIn",
1013
- "type": "uint256"
1014
- },
1015
- {
1016
- "name": "minAmountOut",
1017
- "type": "uint256"
1018
- },
1019
- {
1020
- "name": "tokenPath",
1021
- "type": "address[]"
1022
- },
1023
- {
1024
- "name": "poolPath",
1025
- "type": "address[]"
1026
- }
1027
- ]
1028
- },
1029
- {
1030
- "name": "_repayAsset",
1031
- "type": "address"
1032
- }
1033
- ],
1034
- "outputs": [
1035
- {
1036
- "name": "",
1037
- "type": "bytes32"
1038
- },
1039
- {
1040
- "name": "",
1041
- "type": "uint256"
1042
- },
1043
- {
1044
- "name": "",
1045
- "type": "uint256"
1046
- }
1047
- ]
1048
- },
1049
- {
1050
- "stateMutability": "view",
1051
- "type": "function",
1052
- "name": "getRepayAndWithdrawHash",
1053
- "inputs": [
1054
- {
1055
- "name": "_agentSender",
1056
- "type": "address"
1057
- },
1058
- {
1059
- "name": "_userWallet",
1060
- "type": "address"
1061
- },
1062
- {
1063
- "name": "_debtLegoId",
1064
- "type": "uint256"
1065
- },
1066
- {
1067
- "name": "_deleverageAssets",
1068
- "type": "tuple[]",
1069
- "components": [
1070
- {
1071
- "name": "vaultId",
1072
- "type": "uint256"
1073
- },
1074
- {
1075
- "name": "asset",
1076
- "type": "address"
1077
- },
1078
- {
1079
- "name": "targetRepayAmount",
1080
- "type": "uint256"
1081
- }
1082
- ]
1083
- },
1084
- {
1085
- "name": "_yieldPosition",
1086
- "type": "tuple",
1087
- "components": [
1088
- {
1089
- "name": "legoId",
1090
- "type": "uint256"
1091
- },
1092
- {
1093
- "name": "vaultToken",
1094
- "type": "address"
1095
- },
1096
- {
1097
- "name": "vaultTokenAmount",
1098
- "type": "uint256"
1099
- }
1100
- ]
1101
- },
1102
- {
1103
- "name": "_swapInstructions",
1104
- "type": "tuple[]",
1105
- "components": [
1106
- {
1107
- "name": "legoId",
1108
- "type": "uint256"
1109
- },
1110
- {
1111
- "name": "amountIn",
1112
- "type": "uint256"
1113
- },
1114
- {
1115
- "name": "minAmountOut",
1116
- "type": "uint256"
1117
- },
1118
- {
1119
- "name": "tokenPath",
1120
- "type": "address[]"
1121
- },
1122
- {
1123
- "name": "poolPath",
1124
- "type": "address[]"
1125
- }
1126
- ]
1127
- },
1128
- {
1129
- "name": "_repayAsset",
1130
- "type": "address"
1131
- },
1132
- {
1133
- "name": "_repayAmount",
1134
- "type": "uint256"
1135
- }
1136
- ],
1137
- "outputs": [
1138
- {
1139
- "name": "",
1140
- "type": "bytes32"
1141
- },
1142
- {
1143
- "name": "",
1144
- "type": "uint256"
1145
- },
1146
- {
1147
- "name": "",
1148
- "type": "uint256"
1149
- }
1150
- ]
1151
- },
1152
- {
1153
- "stateMutability": "view",
1154
- "type": "function",
1155
- "name": "getRepayAndWithdrawHash",
1156
- "inputs": [
1157
- {
1158
- "name": "_agentSender",
1159
- "type": "address"
1160
- },
1161
- {
1162
- "name": "_userWallet",
1163
- "type": "address"
1164
- },
1165
- {
1166
- "name": "_debtLegoId",
1167
- "type": "uint256"
1168
- },
1169
- {
1170
- "name": "_deleverageAssets",
1171
- "type": "tuple[]",
1172
- "components": [
1173
- {
1174
- "name": "vaultId",
1175
- "type": "uint256"
1176
- },
1177
- {
1178
- "name": "asset",
1179
- "type": "address"
1180
- },
1181
- {
1182
- "name": "targetRepayAmount",
1183
- "type": "uint256"
1184
- }
1185
- ]
1186
- },
1187
- {
1188
- "name": "_yieldPosition",
1189
- "type": "tuple",
1190
- "components": [
1191
- {
1192
- "name": "legoId",
1193
- "type": "uint256"
1194
- },
1195
- {
1196
- "name": "vaultToken",
1197
- "type": "address"
1198
- },
1199
- {
1200
- "name": "vaultTokenAmount",
1201
- "type": "uint256"
1202
- }
1203
- ]
1204
- },
1205
- {
1206
- "name": "_swapInstructions",
1207
- "type": "tuple[]",
1208
- "components": [
1209
- {
1210
- "name": "legoId",
1211
- "type": "uint256"
1212
- },
1213
- {
1214
- "name": "amountIn",
1215
- "type": "uint256"
1216
- },
1217
- {
1218
- "name": "minAmountOut",
1219
- "type": "uint256"
1220
- },
1221
- {
1222
- "name": "tokenPath",
1223
- "type": "address[]"
1224
- },
1225
- {
1226
- "name": "poolPath",
1227
- "type": "address[]"
1228
- }
1229
- ]
1230
- },
1231
- {
1232
- "name": "_repayAsset",
1233
- "type": "address"
1234
- },
1235
- {
1236
- "name": "_repayAmount",
1237
- "type": "uint256"
1238
- },
1239
- {
1240
- "name": "_removeCollateralAssets",
1241
- "type": "tuple[]",
1242
- "components": [
1243
- {
1244
- "name": "vaultId",
1245
- "type": "uint256"
1246
- },
1247
- {
1248
- "name": "asset",
1249
- "type": "address"
1250
- },
1251
- {
1252
- "name": "amount",
1253
- "type": "uint256"
1254
- }
1255
- ]
1256
- }
1257
- ],
1258
- "outputs": [
1259
- {
1260
- "name": "",
1261
- "type": "bytes32"
1262
- },
1263
- {
1264
- "name": "",
1265
- "type": "uint256"
1266
- },
1267
- {
1268
- "name": "",
1269
- "type": "uint256"
1270
- }
1271
- ]
1272
- },
1273
- {
1274
- "stateMutability": "view",
1275
- "type": "function",
1276
- "name": "getRepayAndWithdrawHash",
1277
- "inputs": [
1278
- {
1279
- "name": "_agentSender",
1280
- "type": "address"
1281
- },
1282
- {
1283
- "name": "_userWallet",
1284
- "type": "address"
1285
- },
1286
- {
1287
- "name": "_debtLegoId",
1288
- "type": "uint256"
1289
- },
1290
- {
1291
- "name": "_deleverageAssets",
1292
- "type": "tuple[]",
1293
- "components": [
1294
- {
1295
- "name": "vaultId",
1296
- "type": "uint256"
1297
- },
1298
- {
1299
- "name": "asset",
1300
- "type": "address"
1301
- },
1302
- {
1303
- "name": "targetRepayAmount",
1304
- "type": "uint256"
1305
- }
1306
- ]
1307
- },
1308
- {
1309
- "name": "_yieldPosition",
1310
- "type": "tuple",
1311
- "components": [
1312
- {
1313
- "name": "legoId",
1314
- "type": "uint256"
1315
- },
1316
- {
1317
- "name": "vaultToken",
1318
- "type": "address"
1319
- },
1320
- {
1321
- "name": "vaultTokenAmount",
1322
- "type": "uint256"
1323
- }
1324
- ]
1325
- },
1326
- {
1327
- "name": "_swapInstructions",
1328
- "type": "tuple[]",
1329
- "components": [
1330
- {
1331
- "name": "legoId",
1332
- "type": "uint256"
1333
- },
1334
- {
1335
- "name": "amountIn",
1336
- "type": "uint256"
1337
- },
1338
- {
1339
- "name": "minAmountOut",
1340
- "type": "uint256"
1341
- },
1342
- {
1343
- "name": "tokenPath",
1344
- "type": "address[]"
1345
- },
1346
- {
1347
- "name": "poolPath",
1348
- "type": "address[]"
1349
- }
1350
- ]
1351
- },
1352
- {
1353
- "name": "_repayAsset",
1354
- "type": "address"
1355
- },
1356
- {
1357
- "name": "_repayAmount",
1358
- "type": "uint256"
1359
- },
1360
- {
1361
- "name": "_removeCollateralAssets",
1362
- "type": "tuple[]",
1363
- "components": [
1364
- {
1365
- "name": "vaultId",
1366
- "type": "uint256"
1367
- },
1368
- {
1369
- "name": "asset",
1370
- "type": "address"
1371
- },
1372
- {
1373
- "name": "amount",
1374
- "type": "uint256"
1375
- }
1376
- ]
1377
- },
1378
- {
1379
- "name": "_nonce",
1380
- "type": "uint256"
1381
- }
1382
- ],
1383
- "outputs": [
1384
- {
1385
- "name": "",
1386
- "type": "bytes32"
1387
- },
1388
- {
1389
- "name": "",
1390
- "type": "uint256"
1391
- },
1392
- {
1393
- "name": "",
1394
- "type": "uint256"
1395
- }
1396
- ]
1397
- },
1398
- {
1399
- "stateMutability": "view",
1400
- "type": "function",
1401
- "name": "getRepayAndWithdrawHash",
1402
- "inputs": [
1403
- {
1404
- "name": "_agentSender",
1405
- "type": "address"
1406
- },
1407
- {
1408
- "name": "_userWallet",
1409
- "type": "address"
1410
- },
1411
- {
1412
- "name": "_debtLegoId",
1413
- "type": "uint256"
1414
- },
1415
- {
1416
- "name": "_deleverageAssets",
1417
- "type": "tuple[]",
1418
- "components": [
1419
- {
1420
- "name": "vaultId",
1421
- "type": "uint256"
1422
- },
1423
- {
1424
- "name": "asset",
1425
- "type": "address"
1426
- },
1427
- {
1428
- "name": "targetRepayAmount",
1429
- "type": "uint256"
1430
- }
1431
- ]
1432
- },
1433
- {
1434
- "name": "_yieldPosition",
1435
- "type": "tuple",
1436
- "components": [
1437
- {
1438
- "name": "legoId",
1439
- "type": "uint256"
1440
- },
1441
- {
1442
- "name": "vaultToken",
1443
- "type": "address"
1444
- },
1445
- {
1446
- "name": "vaultTokenAmount",
1447
- "type": "uint256"
1448
- }
1449
- ]
1450
- },
1451
- {
1452
- "name": "_swapInstructions",
1453
- "type": "tuple[]",
1454
- "components": [
1455
- {
1456
- "name": "legoId",
1457
- "type": "uint256"
1458
- },
1459
- {
1460
- "name": "amountIn",
1461
- "type": "uint256"
1462
- },
1463
- {
1464
- "name": "minAmountOut",
1465
- "type": "uint256"
1466
- },
1467
- {
1468
- "name": "tokenPath",
1469
- "type": "address[]"
1470
- },
1471
- {
1472
- "name": "poolPath",
1473
- "type": "address[]"
1474
- }
1475
- ]
1476
- },
1477
- {
1478
- "name": "_repayAsset",
1479
- "type": "address"
1480
- },
1481
- {
1482
- "name": "_repayAmount",
1483
- "type": "uint256"
1484
- },
1485
- {
1486
- "name": "_removeCollateralAssets",
1487
- "type": "tuple[]",
1488
- "components": [
1489
- {
1490
- "name": "vaultId",
1491
- "type": "uint256"
1492
- },
1493
- {
1494
- "name": "asset",
1495
- "type": "address"
1496
- },
1497
- {
1498
- "name": "amount",
1499
- "type": "uint256"
1500
- }
1501
- ]
1502
- },
1503
- {
1504
- "name": "_nonce",
1505
- "type": "uint256"
1506
- },
1507
- {
1508
- "name": "_expiration",
1509
- "type": "uint256"
1510
- }
1511
- ],
1512
- "outputs": [
1513
- {
1514
- "name": "",
1515
- "type": "bytes32"
1516
- },
1517
- {
1518
- "name": "",
1519
- "type": "uint256"
1520
- },
1521
- {
1522
- "name": "",
1523
- "type": "uint256"
1524
- }
1525
- ]
1526
- },
1527
- {
1528
- "stateMutability": "view",
1529
- "type": "function",
1530
- "name": "getRebalanceYieldPositionsWithSwapHash",
1531
- "inputs": [
1532
- {
1533
- "name": "_agentSender",
1534
- "type": "address"
1535
- },
1536
- {
1537
- "name": "_userWallet",
1538
- "type": "address"
1539
- }
1540
- ],
1541
- "outputs": [
1542
- {
1543
- "name": "",
1544
- "type": "bytes32"
1545
- },
1546
- {
1547
- "name": "",
1548
- "type": "uint256"
1549
- },
1550
- {
1551
- "name": "",
1552
- "type": "uint256"
1553
- }
1554
- ]
1555
- },
1556
- {
1557
- "stateMutability": "view",
1558
- "type": "function",
1559
- "name": "getRebalanceYieldPositionsWithSwapHash",
1560
- "inputs": [
1561
- {
1562
- "name": "_agentSender",
1563
- "type": "address"
1564
- },
1565
- {
1566
- "name": "_userWallet",
1567
- "type": "address"
1568
- },
1569
- {
1570
- "name": "_withdrawFrom",
1571
- "type": "tuple[]",
1572
- "components": [
1573
- {
1574
- "name": "legoId",
1575
- "type": "uint256"
1576
- },
1577
- {
1578
- "name": "vaultToken",
1579
- "type": "address"
1580
- },
1581
- {
1582
- "name": "vaultTokenAmount",
1583
- "type": "uint256"
1584
- }
1585
- ]
1586
- }
1587
- ],
1588
- "outputs": [
1589
- {
1590
- "name": "",
1591
- "type": "bytes32"
1592
- },
1593
- {
1594
- "name": "",
1595
- "type": "uint256"
1596
- },
1597
- {
1598
- "name": "",
1599
- "type": "uint256"
1600
- }
1601
- ]
1602
- },
1603
- {
1604
- "stateMutability": "view",
1605
- "type": "function",
1606
- "name": "getRebalanceYieldPositionsWithSwapHash",
1607
- "inputs": [
1608
- {
1609
- "name": "_agentSender",
1610
- "type": "address"
1611
- },
1612
- {
1613
- "name": "_userWallet",
1614
- "type": "address"
1615
- },
1616
- {
1617
- "name": "_withdrawFrom",
1618
- "type": "tuple[]",
1619
- "components": [
1620
- {
1621
- "name": "legoId",
1622
- "type": "uint256"
1623
- },
1624
- {
1625
- "name": "vaultToken",
1626
- "type": "address"
1627
- },
1628
- {
1629
- "name": "vaultTokenAmount",
1630
- "type": "uint256"
1631
- }
1632
- ]
1633
- },
1634
- {
1635
- "name": "_swapInstructions",
1636
- "type": "tuple[]",
1637
- "components": [
1638
- {
1639
- "name": "legoId",
1640
- "type": "uint256"
1641
- },
1642
- {
1643
- "name": "amountIn",
1644
- "type": "uint256"
1645
- },
1646
- {
1647
- "name": "minAmountOut",
1648
- "type": "uint256"
1649
- },
1650
- {
1651
- "name": "tokenPath",
1652
- "type": "address[]"
1653
- },
1654
- {
1655
- "name": "poolPath",
1656
- "type": "address[]"
1657
- }
1658
- ]
1659
- }
1660
- ],
1661
- "outputs": [
1662
- {
1663
- "name": "",
1664
- "type": "bytes32"
1665
- },
1666
- {
1667
- "name": "",
1668
- "type": "uint256"
1669
- },
1670
- {
1671
- "name": "",
1672
- "type": "uint256"
1673
- }
1674
- ]
1675
- },
1676
- {
1677
- "stateMutability": "view",
1678
- "type": "function",
1679
- "name": "getRebalanceYieldPositionsWithSwapHash",
1680
- "inputs": [
1681
- {
1682
- "name": "_agentSender",
1683
- "type": "address"
1684
- },
1685
- {
1686
- "name": "_userWallet",
1687
- "type": "address"
1688
- },
1689
- {
1690
- "name": "_withdrawFrom",
1691
- "type": "tuple[]",
1692
- "components": [
1693
- {
1694
- "name": "legoId",
1695
- "type": "uint256"
1696
- },
1697
- {
1698
- "name": "vaultToken",
1699
- "type": "address"
1700
- },
1701
- {
1702
- "name": "vaultTokenAmount",
1703
- "type": "uint256"
1704
- }
1705
- ]
1706
- },
1707
- {
1708
- "name": "_swapInstructions",
1709
- "type": "tuple[]",
1710
- "components": [
1711
- {
1712
- "name": "legoId",
1713
- "type": "uint256"
1714
- },
1715
- {
1716
- "name": "amountIn",
1717
- "type": "uint256"
1718
- },
1719
- {
1720
- "name": "minAmountOut",
1721
- "type": "uint256"
1722
- },
1723
- {
1724
- "name": "tokenPath",
1725
- "type": "address[]"
1726
- },
1727
- {
1728
- "name": "poolPath",
1729
- "type": "address[]"
1730
- }
1731
- ]
1732
- },
1733
- {
1734
- "name": "_depositTo",
1735
- "type": "tuple[]",
1736
- "components": [
1737
- {
1738
- "name": "legoId",
1739
- "type": "uint256"
1740
- },
1741
- {
1742
- "name": "asset",
1743
- "type": "address"
1744
- },
1745
- {
1746
- "name": "amount",
1747
- "type": "uint256"
1748
- },
1749
- {
1750
- "name": "vaultAddr",
1751
- "type": "address"
1752
- }
1753
- ]
1754
- }
1755
- ],
1756
- "outputs": [
1757
- {
1758
- "name": "",
1759
- "type": "bytes32"
1760
- },
1761
- {
1762
- "name": "",
1763
- "type": "uint256"
1764
- },
1765
- {
1766
- "name": "",
1767
- "type": "uint256"
1768
- }
1769
- ]
1770
- },
1771
- {
1772
- "stateMutability": "view",
1773
- "type": "function",
1774
- "name": "getRebalanceYieldPositionsWithSwapHash",
1775
- "inputs": [
1776
- {
1777
- "name": "_agentSender",
1778
- "type": "address"
1779
- },
1780
- {
1781
- "name": "_userWallet",
1782
- "type": "address"
1783
- },
1784
- {
1785
- "name": "_withdrawFrom",
1786
- "type": "tuple[]",
1787
- "components": [
1788
- {
1789
- "name": "legoId",
1790
- "type": "uint256"
1791
- },
1792
- {
1793
- "name": "vaultToken",
1794
- "type": "address"
1795
- },
1796
- {
1797
- "name": "vaultTokenAmount",
1798
- "type": "uint256"
1799
- }
1800
- ]
1801
- },
1802
- {
1803
- "name": "_swapInstructions",
1804
- "type": "tuple[]",
1805
- "components": [
1806
- {
1807
- "name": "legoId",
1808
- "type": "uint256"
1809
- },
1810
- {
1811
- "name": "amountIn",
1812
- "type": "uint256"
1813
- },
1814
- {
1815
- "name": "minAmountOut",
1816
- "type": "uint256"
1817
- },
1818
- {
1819
- "name": "tokenPath",
1820
- "type": "address[]"
1821
- },
1822
- {
1823
- "name": "poolPath",
1824
- "type": "address[]"
1825
- }
1826
- ]
1827
- },
1828
- {
1829
- "name": "_depositTo",
1830
- "type": "tuple[]",
1831
- "components": [
1832
- {
1833
- "name": "legoId",
1834
- "type": "uint256"
1835
- },
1836
- {
1837
- "name": "asset",
1838
- "type": "address"
1839
- },
1840
- {
1841
- "name": "amount",
1842
- "type": "uint256"
1843
- },
1844
- {
1845
- "name": "vaultAddr",
1846
- "type": "address"
1847
- }
1848
- ]
1849
- },
1850
- {
1851
- "name": "_transferTo",
1852
- "type": "tuple[]",
1853
- "components": [
1854
- {
1855
- "name": "asset",
1856
- "type": "address"
1857
- },
1858
- {
1859
- "name": "amount",
1860
- "type": "uint256"
1861
- },
1862
- {
1863
- "name": "recipient",
1864
- "type": "address"
1865
- }
1866
- ]
1867
- }
1868
- ],
1869
- "outputs": [
1870
- {
1871
- "name": "",
1872
- "type": "bytes32"
1873
- },
1874
- {
1875
- "name": "",
1876
- "type": "uint256"
1877
- },
1878
- {
1879
- "name": "",
1880
- "type": "uint256"
1881
- }
1882
- ]
1883
- },
1884
- {
1885
- "stateMutability": "view",
1886
- "type": "function",
1887
- "name": "getRebalanceYieldPositionsWithSwapHash",
1888
- "inputs": [
1889
- {
1890
- "name": "_agentSender",
1891
- "type": "address"
1892
- },
1893
- {
1894
- "name": "_userWallet",
1895
- "type": "address"
1896
- },
1897
- {
1898
- "name": "_withdrawFrom",
1899
- "type": "tuple[]",
1900
- "components": [
1901
- {
1902
- "name": "legoId",
1903
- "type": "uint256"
1904
- },
1905
- {
1906
- "name": "vaultToken",
1907
- "type": "address"
1908
- },
1909
- {
1910
- "name": "vaultTokenAmount",
1911
- "type": "uint256"
1912
- }
1913
- ]
1914
- },
1915
- {
1916
- "name": "_swapInstructions",
1917
- "type": "tuple[]",
1918
- "components": [
1919
- {
1920
- "name": "legoId",
1921
- "type": "uint256"
1922
- },
1923
- {
1924
- "name": "amountIn",
1925
- "type": "uint256"
1926
- },
1927
- {
1928
- "name": "minAmountOut",
1929
- "type": "uint256"
1930
- },
1931
- {
1932
- "name": "tokenPath",
1933
- "type": "address[]"
1934
- },
1935
- {
1936
- "name": "poolPath",
1937
- "type": "address[]"
1938
- }
1939
- ]
1940
- },
1941
- {
1942
- "name": "_depositTo",
1943
- "type": "tuple[]",
1944
- "components": [
1945
- {
1946
- "name": "legoId",
1947
- "type": "uint256"
1948
- },
1949
- {
1950
- "name": "asset",
1951
- "type": "address"
1952
- },
1953
- {
1954
- "name": "amount",
1955
- "type": "uint256"
1956
- },
1957
- {
1958
- "name": "vaultAddr",
1959
- "type": "address"
1960
- }
1961
- ]
1962
- },
1963
- {
1964
- "name": "_transferTo",
1965
- "type": "tuple[]",
1966
- "components": [
1967
- {
1968
- "name": "asset",
1969
- "type": "address"
1970
- },
1971
- {
1972
- "name": "amount",
1973
- "type": "uint256"
1974
- },
1975
- {
1976
- "name": "recipient",
1977
- "type": "address"
1978
- }
1979
- ]
1980
- },
1981
- {
1982
- "name": "_nonce",
1983
- "type": "uint256"
1984
- }
1985
- ],
1986
- "outputs": [
1987
- {
1988
- "name": "",
1989
- "type": "bytes32"
1990
- },
1991
- {
1992
- "name": "",
1993
- "type": "uint256"
1994
- },
1995
- {
1996
- "name": "",
1997
- "type": "uint256"
1998
- }
1999
- ]
2000
- },
2001
- {
2002
- "stateMutability": "view",
2003
- "type": "function",
2004
- "name": "getRebalanceYieldPositionsWithSwapHash",
2005
- "inputs": [
2006
- {
2007
- "name": "_agentSender",
2008
- "type": "address"
2009
- },
2010
- {
2011
- "name": "_userWallet",
2012
- "type": "address"
2013
- },
2014
- {
2015
- "name": "_withdrawFrom",
2016
- "type": "tuple[]",
2017
- "components": [
2018
- {
2019
- "name": "legoId",
2020
- "type": "uint256"
2021
- },
2022
- {
2023
- "name": "vaultToken",
2024
- "type": "address"
2025
- },
2026
- {
2027
- "name": "vaultTokenAmount",
2028
- "type": "uint256"
2029
- }
2030
- ]
2031
- },
2032
- {
2033
- "name": "_swapInstructions",
2034
- "type": "tuple[]",
2035
- "components": [
2036
- {
2037
- "name": "legoId",
2038
- "type": "uint256"
2039
- },
2040
- {
2041
- "name": "amountIn",
2042
- "type": "uint256"
2043
- },
2044
- {
2045
- "name": "minAmountOut",
2046
- "type": "uint256"
2047
- },
2048
- {
2049
- "name": "tokenPath",
2050
- "type": "address[]"
2051
- },
2052
- {
2053
- "name": "poolPath",
2054
- "type": "address[]"
2055
- }
2056
- ]
2057
- },
2058
- {
2059
- "name": "_depositTo",
2060
- "type": "tuple[]",
2061
- "components": [
2062
- {
2063
- "name": "legoId",
2064
- "type": "uint256"
2065
- },
2066
- {
2067
- "name": "asset",
2068
- "type": "address"
2069
- },
2070
- {
2071
- "name": "amount",
2072
- "type": "uint256"
2073
- },
2074
- {
2075
- "name": "vaultAddr",
2076
- "type": "address"
2077
- }
2078
- ]
2079
- },
2080
- {
2081
- "name": "_transferTo",
2082
- "type": "tuple[]",
2083
- "components": [
2084
- {
2085
- "name": "asset",
2086
- "type": "address"
2087
- },
2088
- {
2089
- "name": "amount",
2090
- "type": "uint256"
2091
- },
2092
- {
2093
- "name": "recipient",
2094
- "type": "address"
2095
- }
2096
- ]
2097
- },
2098
- {
2099
- "name": "_nonce",
2100
- "type": "uint256"
2101
- },
2102
- {
2103
- "name": "_expiration",
2104
- "type": "uint256"
2105
- }
2106
- ],
2107
- "outputs": [
2108
- {
2109
- "name": "",
2110
- "type": "bytes32"
2111
- },
2112
- {
2113
- "name": "",
2114
- "type": "uint256"
2115
- },
2116
- {
2117
- "name": "",
2118
- "type": "uint256"
2119
- }
2120
- ]
2121
- },
2122
- {
2123
- "stateMutability": "view",
2124
- "type": "function",
2125
- "name": "getClaimIncentivesAndSwapHash",
2126
- "inputs": [
2127
- {
2128
- "name": "_agentSender",
2129
- "type": "address"
2130
- },
2131
- {
2132
- "name": "_userWallet",
2133
- "type": "address"
2134
- }
2135
- ],
2136
- "outputs": [
2137
- {
2138
- "name": "",
2139
- "type": "bytes32"
2140
- },
2141
- {
2142
- "name": "",
2143
- "type": "uint256"
2144
- },
2145
- {
2146
- "name": "",
2147
- "type": "uint256"
2148
- }
2149
- ]
2150
- },
2151
- {
2152
- "stateMutability": "view",
2153
- "type": "function",
2154
- "name": "getClaimIncentivesAndSwapHash",
2155
- "inputs": [
2156
- {
2157
- "name": "_agentSender",
2158
- "type": "address"
2159
- },
2160
- {
2161
- "name": "_userWallet",
2162
- "type": "address"
2163
- },
2164
- {
2165
- "name": "_rewardLegoId",
2166
- "type": "uint256"
2167
- }
2168
- ],
2169
- "outputs": [
2170
- {
2171
- "name": "",
2172
- "type": "bytes32"
2173
- },
2174
- {
2175
- "name": "",
2176
- "type": "uint256"
2177
- },
2178
- {
2179
- "name": "",
2180
- "type": "uint256"
2181
- }
2182
- ]
2183
- },
2184
- {
2185
- "stateMutability": "view",
2186
- "type": "function",
2187
- "name": "getClaimIncentivesAndSwapHash",
2188
- "inputs": [
2189
- {
2190
- "name": "_agentSender",
2191
- "type": "address"
2192
- },
2193
- {
2194
- "name": "_userWallet",
2195
- "type": "address"
2196
- },
2197
- {
2198
- "name": "_rewardLegoId",
2199
- "type": "uint256"
2200
- },
2201
- {
2202
- "name": "_rewardToken",
2203
- "type": "address"
2204
- }
2205
- ],
2206
- "outputs": [
2207
- {
2208
- "name": "",
2209
- "type": "bytes32"
2210
- },
2211
- {
2212
- "name": "",
2213
- "type": "uint256"
2214
- },
2215
- {
2216
- "name": "",
2217
- "type": "uint256"
2218
- }
2219
- ]
2220
- },
2221
- {
2222
- "stateMutability": "view",
2223
- "type": "function",
2224
- "name": "getClaimIncentivesAndSwapHash",
2225
- "inputs": [
2226
- {
2227
- "name": "_agentSender",
2228
- "type": "address"
2229
- },
2230
- {
2231
- "name": "_userWallet",
2232
- "type": "address"
2233
- },
2234
- {
2235
- "name": "_rewardLegoId",
2236
- "type": "uint256"
2237
- },
2238
- {
2239
- "name": "_rewardToken",
2240
- "type": "address"
2241
- },
2242
- {
2243
- "name": "_rewardAmount",
2244
- "type": "uint256"
2245
- }
2246
- ],
2247
- "outputs": [
2248
- {
2249
- "name": "",
2250
- "type": "bytes32"
2251
- },
2252
- {
2253
- "name": "",
2254
- "type": "uint256"
2255
- },
2256
- {
2257
- "name": "",
2258
- "type": "uint256"
2259
- }
2260
- ]
2261
- },
2262
- {
2263
- "stateMutability": "view",
2264
- "type": "function",
2265
- "name": "getClaimIncentivesAndSwapHash",
2266
- "inputs": [
2267
- {
2268
- "name": "_agentSender",
2269
- "type": "address"
2270
- },
2271
- {
2272
- "name": "_userWallet",
2273
- "type": "address"
2274
- },
2275
- {
2276
- "name": "_rewardLegoId",
2277
- "type": "uint256"
2278
- },
2279
- {
2280
- "name": "_rewardToken",
2281
- "type": "address"
2282
- },
2283
- {
2284
- "name": "_rewardAmount",
2285
- "type": "uint256"
2286
- },
2287
- {
2288
- "name": "_rewardProofs",
2289
- "type": "bytes32[]"
2290
- }
2291
- ],
2292
- "outputs": [
2293
- {
2294
- "name": "",
2295
- "type": "bytes32"
2296
- },
2297
- {
2298
- "name": "",
2299
- "type": "uint256"
2300
- },
2301
- {
2302
- "name": "",
2303
- "type": "uint256"
2304
- }
2305
- ]
2306
- },
2307
- {
2308
- "stateMutability": "view",
2309
- "type": "function",
2310
- "name": "getClaimIncentivesAndSwapHash",
2311
- "inputs": [
2312
- {
2313
- "name": "_agentSender",
2314
- "type": "address"
2315
- },
2316
- {
2317
- "name": "_userWallet",
2318
- "type": "address"
2319
- },
2320
- {
2321
- "name": "_rewardLegoId",
2322
- "type": "uint256"
2323
- },
2324
- {
2325
- "name": "_rewardToken",
2326
- "type": "address"
2327
- },
2328
- {
2329
- "name": "_rewardAmount",
2330
- "type": "uint256"
2331
- },
2332
- {
2333
- "name": "_rewardProofs",
2334
- "type": "bytes32[]"
2335
- },
2336
- {
2337
- "name": "_swapInstructions",
2338
- "type": "tuple[]",
2339
- "components": [
2340
- {
2341
- "name": "legoId",
2342
- "type": "uint256"
2343
- },
2344
- {
2345
- "name": "amountIn",
2346
- "type": "uint256"
2347
- },
2348
- {
2349
- "name": "minAmountOut",
2350
- "type": "uint256"
2351
- },
2352
- {
2353
- "name": "tokenPath",
2354
- "type": "address[]"
2355
- },
2356
- {
2357
- "name": "poolPath",
2358
- "type": "address[]"
2359
- }
2360
- ]
2361
- }
2362
- ],
2363
- "outputs": [
2364
- {
2365
- "name": "",
2366
- "type": "bytes32"
2367
- },
2368
- {
2369
- "name": "",
2370
- "type": "uint256"
2371
- },
2372
- {
2373
- "name": "",
2374
- "type": "uint256"
2375
- }
2376
- ]
2377
- },
2378
- {
2379
- "stateMutability": "view",
2380
- "type": "function",
2381
- "name": "getClaimIncentivesAndSwapHash",
2382
- "inputs": [
2383
- {
2384
- "name": "_agentSender",
2385
- "type": "address"
2386
- },
2387
- {
2388
- "name": "_userWallet",
2389
- "type": "address"
2390
- },
2391
- {
2392
- "name": "_rewardLegoId",
2393
- "type": "uint256"
2394
- },
2395
- {
2396
- "name": "_rewardToken",
2397
- "type": "address"
2398
- },
2399
- {
2400
- "name": "_rewardAmount",
2401
- "type": "uint256"
2402
- },
2403
- {
2404
- "name": "_rewardProofs",
2405
- "type": "bytes32[]"
2406
- },
2407
- {
2408
- "name": "_swapInstructions",
2409
- "type": "tuple[]",
2410
- "components": [
2411
- {
2412
- "name": "legoId",
2413
- "type": "uint256"
2414
- },
2415
- {
2416
- "name": "amountIn",
2417
- "type": "uint256"
2418
- },
2419
- {
2420
- "name": "minAmountOut",
2421
- "type": "uint256"
2422
- },
2423
- {
2424
- "name": "tokenPath",
2425
- "type": "address[]"
2426
- },
2427
- {
2428
- "name": "poolPath",
2429
- "type": "address[]"
2430
- }
2431
- ]
2432
- },
2433
- {
2434
- "name": "_depositTo",
2435
- "type": "tuple[]",
2436
- "components": [
2437
- {
2438
- "name": "legoId",
2439
- "type": "uint256"
2440
- },
2441
- {
2442
- "name": "asset",
2443
- "type": "address"
2444
- },
2445
- {
2446
- "name": "amount",
2447
- "type": "uint256"
2448
- },
2449
- {
2450
- "name": "vaultAddr",
2451
- "type": "address"
2452
- }
2453
- ]
2454
- }
2455
- ],
2456
- "outputs": [
2457
- {
2458
- "name": "",
2459
- "type": "bytes32"
2460
- },
2461
- {
2462
- "name": "",
2463
- "type": "uint256"
2464
- },
2465
- {
2466
- "name": "",
2467
- "type": "uint256"
2468
- }
2469
- ]
2470
- },
2471
- {
2472
- "stateMutability": "view",
2473
- "type": "function",
2474
- "name": "getClaimIncentivesAndSwapHash",
2475
- "inputs": [
2476
- {
2477
- "name": "_agentSender",
2478
- "type": "address"
2479
- },
2480
- {
2481
- "name": "_userWallet",
2482
- "type": "address"
2483
- },
2484
- {
2485
- "name": "_rewardLegoId",
2486
- "type": "uint256"
2487
- },
2488
- {
2489
- "name": "_rewardToken",
2490
- "type": "address"
2491
- },
2492
- {
2493
- "name": "_rewardAmount",
2494
- "type": "uint256"
2495
- },
2496
- {
2497
- "name": "_rewardProofs",
2498
- "type": "bytes32[]"
2499
- },
2500
- {
2501
- "name": "_swapInstructions",
2502
- "type": "tuple[]",
2503
- "components": [
2504
- {
2505
- "name": "legoId",
2506
- "type": "uint256"
2507
- },
2508
- {
2509
- "name": "amountIn",
2510
- "type": "uint256"
2511
- },
2512
- {
2513
- "name": "minAmountOut",
2514
- "type": "uint256"
2515
- },
2516
- {
2517
- "name": "tokenPath",
2518
- "type": "address[]"
2519
- },
2520
- {
2521
- "name": "poolPath",
2522
- "type": "address[]"
2523
- }
2524
- ]
2525
- },
2526
- {
2527
- "name": "_depositTo",
2528
- "type": "tuple[]",
2529
- "components": [
2530
- {
2531
- "name": "legoId",
2532
- "type": "uint256"
2533
- },
2534
- {
2535
- "name": "asset",
2536
- "type": "address"
2537
- },
2538
- {
2539
- "name": "amount",
2540
- "type": "uint256"
2541
- },
2542
- {
2543
- "name": "vaultAddr",
2544
- "type": "address"
2545
- }
2546
- ]
2547
- },
2548
- {
2549
- "name": "_debtLegoId",
2550
- "type": "uint256"
2551
- }
2552
- ],
2553
- "outputs": [
2554
- {
2555
- "name": "",
2556
- "type": "bytes32"
2557
- },
2558
- {
2559
- "name": "",
2560
- "type": "uint256"
2561
- },
2562
- {
2563
- "name": "",
2564
- "type": "uint256"
2565
- }
2566
- ]
2567
- },
2568
- {
2569
- "stateMutability": "view",
2570
- "type": "function",
2571
- "name": "getClaimIncentivesAndSwapHash",
2572
- "inputs": [
2573
- {
2574
- "name": "_agentSender",
2575
- "type": "address"
2576
- },
2577
- {
2578
- "name": "_userWallet",
2579
- "type": "address"
2580
- },
2581
- {
2582
- "name": "_rewardLegoId",
2583
- "type": "uint256"
2584
- },
2585
- {
2586
- "name": "_rewardToken",
2587
- "type": "address"
2588
- },
2589
- {
2590
- "name": "_rewardAmount",
2591
- "type": "uint256"
2592
- },
2593
- {
2594
- "name": "_rewardProofs",
2595
- "type": "bytes32[]"
2596
- },
2597
- {
2598
- "name": "_swapInstructions",
2599
- "type": "tuple[]",
2600
- "components": [
2601
- {
2602
- "name": "legoId",
2603
- "type": "uint256"
2604
- },
2605
- {
2606
- "name": "amountIn",
2607
- "type": "uint256"
2608
- },
2609
- {
2610
- "name": "minAmountOut",
2611
- "type": "uint256"
2612
- },
2613
- {
2614
- "name": "tokenPath",
2615
- "type": "address[]"
2616
- },
2617
- {
2618
- "name": "poolPath",
2619
- "type": "address[]"
2620
- }
2621
- ]
2622
- },
2623
- {
2624
- "name": "_depositTo",
2625
- "type": "tuple[]",
2626
- "components": [
2627
- {
2628
- "name": "legoId",
2629
- "type": "uint256"
2630
- },
2631
- {
2632
- "name": "asset",
2633
- "type": "address"
2634
- },
2635
- {
2636
- "name": "amount",
2637
- "type": "uint256"
2638
- },
2639
- {
2640
- "name": "vaultAddr",
2641
- "type": "address"
2642
- }
2643
- ]
2644
- },
2645
- {
2646
- "name": "_debtLegoId",
2647
- "type": "uint256"
2648
- },
2649
- {
2650
- "name": "_addCollateralAssets",
2651
- "type": "tuple[]",
2652
- "components": [
2653
- {
2654
- "name": "vaultId",
2655
- "type": "uint256"
2656
- },
2657
- {
2658
- "name": "asset",
2659
- "type": "address"
2660
- },
2661
- {
2662
- "name": "amount",
2663
- "type": "uint256"
2664
- }
2665
- ]
2666
- }
2667
- ],
2668
- "outputs": [
2669
- {
2670
- "name": "",
2671
- "type": "bytes32"
2672
- },
2673
- {
2674
- "name": "",
2675
- "type": "uint256"
2676
- },
2677
- {
2678
- "name": "",
2679
- "type": "uint256"
2680
- }
2681
- ]
2682
- },
2683
- {
2684
- "stateMutability": "view",
2685
- "type": "function",
2686
- "name": "getClaimIncentivesAndSwapHash",
2687
- "inputs": [
2688
- {
2689
- "name": "_agentSender",
2690
- "type": "address"
2691
- },
2692
- {
2693
- "name": "_userWallet",
2694
- "type": "address"
2695
- },
2696
- {
2697
- "name": "_rewardLegoId",
2698
- "type": "uint256"
2699
- },
2700
- {
2701
- "name": "_rewardToken",
2702
- "type": "address"
2703
- },
2704
- {
2705
- "name": "_rewardAmount",
2706
- "type": "uint256"
2707
- },
2708
- {
2709
- "name": "_rewardProofs",
2710
- "type": "bytes32[]"
2711
- },
2712
- {
2713
- "name": "_swapInstructions",
2714
- "type": "tuple[]",
2715
- "components": [
2716
- {
2717
- "name": "legoId",
2718
- "type": "uint256"
2719
- },
2720
- {
2721
- "name": "amountIn",
2722
- "type": "uint256"
2723
- },
2724
- {
2725
- "name": "minAmountOut",
2726
- "type": "uint256"
2727
- },
2728
- {
2729
- "name": "tokenPath",
2730
- "type": "address[]"
2731
- },
2732
- {
2733
- "name": "poolPath",
2734
- "type": "address[]"
2735
- }
2736
- ]
2737
- },
2738
- {
2739
- "name": "_depositTo",
2740
- "type": "tuple[]",
2741
- "components": [
2742
- {
2743
- "name": "legoId",
2744
- "type": "uint256"
2745
- },
2746
- {
2747
- "name": "asset",
2748
- "type": "address"
2749
- },
2750
- {
2751
- "name": "amount",
2752
- "type": "uint256"
2753
- },
2754
- {
2755
- "name": "vaultAddr",
2756
- "type": "address"
2757
- }
2758
- ]
2759
- },
2760
- {
2761
- "name": "_debtLegoId",
2762
- "type": "uint256"
2763
- },
2764
- {
2765
- "name": "_addCollateralAssets",
2766
- "type": "tuple[]",
2767
- "components": [
2768
- {
2769
- "name": "vaultId",
2770
- "type": "uint256"
2771
- },
2772
- {
2773
- "name": "asset",
2774
- "type": "address"
2775
- },
2776
- {
2777
- "name": "amount",
2778
- "type": "uint256"
2779
- }
2780
- ]
2781
- },
2782
- {
2783
- "name": "_nonce",
2784
- "type": "uint256"
2785
- }
2786
- ],
2787
- "outputs": [
2788
- {
2789
- "name": "",
2790
- "type": "bytes32"
2791
- },
2792
- {
2793
- "name": "",
2794
- "type": "uint256"
2795
- },
2796
- {
2797
- "name": "",
2798
- "type": "uint256"
2799
- }
2800
- ]
2801
- },
2802
- {
2803
- "stateMutability": "view",
2804
- "type": "function",
2805
- "name": "getClaimIncentivesAndSwapHash",
2806
- "inputs": [
2807
- {
2808
- "name": "_agentSender",
2809
- "type": "address"
2810
- },
2811
- {
2812
- "name": "_userWallet",
2813
- "type": "address"
2814
- },
2815
- {
2816
- "name": "_rewardLegoId",
2817
- "type": "uint256"
2818
- },
2819
- {
2820
- "name": "_rewardToken",
2821
- "type": "address"
2822
- },
2823
- {
2824
- "name": "_rewardAmount",
2825
- "type": "uint256"
2826
- },
2827
- {
2828
- "name": "_rewardProofs",
2829
- "type": "bytes32[]"
2830
- },
2831
- {
2832
- "name": "_swapInstructions",
2833
- "type": "tuple[]",
2834
- "components": [
2835
- {
2836
- "name": "legoId",
2837
- "type": "uint256"
2838
- },
2839
- {
2840
- "name": "amountIn",
2841
- "type": "uint256"
2842
- },
2843
- {
2844
- "name": "minAmountOut",
2845
- "type": "uint256"
2846
- },
2847
- {
2848
- "name": "tokenPath",
2849
- "type": "address[]"
2850
- },
2851
- {
2852
- "name": "poolPath",
2853
- "type": "address[]"
2854
- }
2855
- ]
2856
- },
2857
- {
2858
- "name": "_depositTo",
2859
- "type": "tuple[]",
2860
- "components": [
2861
- {
2862
- "name": "legoId",
2863
- "type": "uint256"
2864
- },
2865
- {
2866
- "name": "asset",
2867
- "type": "address"
2868
- },
2869
- {
2870
- "name": "amount",
2871
- "type": "uint256"
2872
- },
2873
- {
2874
- "name": "vaultAddr",
2875
- "type": "address"
2876
- }
2877
- ]
2878
- },
2879
- {
2880
- "name": "_debtLegoId",
2881
- "type": "uint256"
2882
- },
2883
- {
2884
- "name": "_addCollateralAssets",
2885
- "type": "tuple[]",
2886
- "components": [
2887
- {
2888
- "name": "vaultId",
2889
- "type": "uint256"
2890
- },
2891
- {
2892
- "name": "asset",
2893
- "type": "address"
2894
- },
2895
- {
2896
- "name": "amount",
2897
- "type": "uint256"
2898
- }
2899
- ]
2900
- },
2901
- {
2902
- "name": "_nonce",
2903
- "type": "uint256"
2904
- },
2905
- {
2906
- "name": "_expiration",
2907
- "type": "uint256"
2908
- }
2909
- ],
2910
- "outputs": [
2911
- {
2912
- "name": "",
2913
- "type": "bytes32"
2914
- },
2915
- {
2916
- "name": "",
2917
- "type": "uint256"
2918
- },
2919
- {
2920
- "name": "",
2921
- "type": "uint256"
2922
- }
2923
- ]
2924
- }
2925
- ];
2926
- export const deployAddress = '0xB9d44E8b964466A2bB1BE747F2e92CD03c4b6D9a';
2927
- function getRequest(method, args, contractAddressOrOptions) {
2928
- const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
2929
- const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
2930
- const call = {
2931
- contractName: 'AgentSenderSpecialSigHelper',
2932
- method,
2933
- args,
2934
- address,
2935
- deployAddress,
2936
- defaultValue,
2937
- getAbi: () => abi,
2938
- with: (options) => {
2939
- call.address = options.contractAddress;
2940
- call.defaultValue = options.defaultValue;
2941
- return call;
2942
- },
2943
- defaultTo: (defaultValue) => {
2944
- call.defaultValue = defaultValue;
2945
- return call;
2946
- },
2947
- at: (address) => {
2948
- call.address = address;
2949
- return call;
2950
- },
2951
- };
2952
- return call;
2953
- }
2954
- export const call = {
2955
- getAddCollateralAndBorrowHash: (...args) => getRequest('getAddCollateralAndBorrowHash', args),
2956
- getRepayAndWithdrawHash: (...args) => getRequest('getRepayAndWithdrawHash', args),
2957
- getRebalanceYieldPositionsWithSwapHash: (...args) => getRequest('getRebalanceYieldPositionsWithSwapHash', args),
2958
- getClaimIncentivesAndSwapHash: (...args) => getRequest('getClaimIncentivesAndSwapHash', args),
2959
- };
2960
- export function toSdk(deployAddress, publicClient, walletClient, addressResolver) {
2961
- return {
2962
- deployAddress,
2963
- abi,
2964
- // Queries
2965
- getAddCollateralAndBorrowHash: (...args) => singleQuery(publicClient, call.getAddCollateralAndBorrowHash(...args).at(deployAddress), {}, addressResolver),
2966
- getRepayAndWithdrawHash: (...args) => singleQuery(publicClient, call.getRepayAndWithdrawHash(...args).at(deployAddress), {}, addressResolver),
2967
- getRebalanceYieldPositionsWithSwapHash: (...args) => singleQuery(publicClient, call.getRebalanceYieldPositionsWithSwapHash(...args).at(deployAddress), {}, addressResolver),
2968
- getClaimIncentivesAndSwapHash: (...args) => singleQuery(publicClient, call.getClaimIncentivesAndSwapHash(...args).at(deployAddress), {}, addressResolver),
2969
- // Mutations
2970
- };
2971
- }