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