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