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