@underscore-finance/sdk 1.2.20-next.1 → 1.2.20-next.2

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 (284) hide show
  1. package/AGENTS.md +172 -0
  2. package/README.md +17 -116
  3. package/abis.json +193056 -0
  4. package/addresses.json +76 -0
  5. package/dist/contracts/AaveV3.d.ts +2594 -0
  6. package/dist/contracts/AaveV3.d.ts.map +1 -0
  7. package/dist/contracts/AaveV3.js +3272 -0
  8. package/dist/contracts/Addys.d.ts +124 -0
  9. package/dist/contracts/Addys.d.ts.map +1 -0
  10. package/dist/contracts/Addys.js +134 -0
  11. package/dist/contracts/AeroClassic.d.ts +2118 -0
  12. package/dist/contracts/AeroClassic.d.ts.map +1 -0
  13. package/dist/contracts/AeroClassic.js +2679 -0
  14. package/dist/contracts/AeroSlipstream.d.ts +2256 -0
  15. package/dist/contracts/AeroSlipstream.d.ts.map +1 -0
  16. package/dist/contracts/AeroSlipstream.js +2848 -0
  17. package/dist/contracts/AgentSenderGeneric.d.ts +4771 -0
  18. package/dist/contracts/AgentSenderGeneric.d.ts.map +1 -0
  19. package/dist/contracts/AgentSenderGeneric.js +6192 -0
  20. package/dist/contracts/AgentSenderSpecial.d.ts +2124 -0
  21. package/dist/contracts/AgentSenderSpecial.d.ts.map +1 -0
  22. package/dist/contracts/AgentSenderSpecial.js +2671 -0
  23. package/dist/contracts/AgentSenderSpecialAdmin.d.ts +984 -0
  24. package/dist/contracts/AgentSenderSpecialAdmin.d.ts.map +1 -0
  25. package/dist/contracts/AgentSenderSpecialAdmin.js +1185 -0
  26. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts +3180 -0
  27. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts.map +1 -0
  28. package/dist/contracts/AgentSenderSpecialSigHelper.js +4211 -0
  29. package/dist/contracts/AgentWrapper.d.ts +2678 -0
  30. package/dist/contracts/AgentWrapper.d.ts.map +1 -0
  31. package/dist/contracts/AgentWrapper.js +3602 -0
  32. package/dist/contracts/AgentWrapperV1.d.ts +3789 -0
  33. package/dist/contracts/AgentWrapperV1.d.ts.map +1 -0
  34. package/dist/contracts/AgentWrapperV1.js +4945 -0
  35. package/dist/contracts/AgentWrapperV2.d.ts +2494 -0
  36. package/dist/contracts/AgentWrapperV2.d.ts.map +1 -0
  37. package/dist/contracts/AgentWrapperV2.js +3354 -0
  38. package/dist/contracts/Appraiser.d.ts +577 -0
  39. package/dist/contracts/Appraiser.d.ts.map +1 -0
  40. package/dist/contracts/Appraiser.js +735 -0
  41. package/dist/contracts/Avantis.d.ts +2606 -0
  42. package/dist/contracts/Avantis.d.ts.map +1 -0
  43. package/dist/contracts/Avantis.js +3282 -0
  44. package/dist/contracts/Billing.d.ts +381 -0
  45. package/dist/contracts/Billing.d.ts.map +1 -0
  46. package/dist/contracts/Billing.js +451 -0
  47. package/dist/contracts/ChequeBook.d.ts +1860 -0
  48. package/dist/contracts/ChequeBook.d.ts.map +1 -0
  49. package/dist/contracts/ChequeBook.js +2131 -0
  50. package/dist/contracts/CompoundV3.d.ts +2622 -0
  51. package/dist/contracts/CompoundV3.d.ts.map +1 -0
  52. package/dist/contracts/CompoundV3.js +3304 -0
  53. package/dist/contracts/ConvertVaultToken.d.ts +64 -0
  54. package/dist/contracts/ConvertVaultToken.d.ts.map +1 -0
  55. package/dist/contracts/ConvertVaultToken.js +75 -0
  56. package/dist/contracts/Curve.d.ts +1107 -0
  57. package/dist/contracts/Curve.d.ts.map +1 -0
  58. package/dist/contracts/Curve.js +1379 -0
  59. package/dist/contracts/DefaultsBase.d.ts +306 -0
  60. package/dist/contracts/DefaultsBase.d.ts.map +1 -0
  61. package/dist/contracts/DefaultsBase.js +331 -0
  62. package/dist/contracts/DefaultsLocal.d.ts +320 -0
  63. package/dist/contracts/DefaultsLocal.d.ts.map +1 -0
  64. package/dist/contracts/DefaultsLocal.js +350 -0
  65. package/dist/contracts/ERC20.d.ts +813 -0
  66. package/dist/contracts/ERC20.d.ts.map +1 -0
  67. package/dist/contracts/ERC20.js +1006 -0
  68. package/dist/contracts/EarnVault.d.ts +1762 -0
  69. package/dist/contracts/EarnVault.d.ts.map +1 -0
  70. package/dist/contracts/EarnVault.js +2267 -0
  71. package/dist/contracts/EarnVaultAgent.d.ts +1160 -0
  72. package/dist/contracts/EarnVaultAgent.d.ts.map +1 -0
  73. package/dist/contracts/EarnVaultAgent.js +1435 -0
  74. package/dist/contracts/EarnVaultAgentSigHelper.d.ts +905 -0
  75. package/dist/contracts/EarnVaultAgentSigHelper.d.ts.map +1 -0
  76. package/dist/contracts/EarnVaultAgentSigHelper.js +1198 -0
  77. package/dist/contracts/EarnVaultWallet.d.ts +777 -0
  78. package/dist/contracts/EarnVaultWallet.d.ts.map +1 -0
  79. package/dist/contracts/EarnVaultWallet.js +987 -0
  80. package/dist/contracts/Erc20Token.d.ts +813 -0
  81. package/dist/contracts/Erc20Token.d.ts.map +1 -0
  82. package/dist/contracts/Erc20Token.js +1006 -0
  83. package/dist/contracts/Euler.d.ts +2662 -0
  84. package/dist/contracts/Euler.d.ts.map +1 -0
  85. package/dist/contracts/Euler.js +3350 -0
  86. package/dist/contracts/ExtraFi.d.ts +2637 -0
  87. package/dist/contracts/ExtraFi.d.ts.map +1 -0
  88. package/dist/contracts/ExtraFi.js +3323 -0
  89. package/dist/contracts/Fluid.d.ts +2634 -0
  90. package/dist/contracts/Fluid.d.ts.map +1 -0
  91. package/dist/contracts/Fluid.js +3318 -0
  92. package/dist/contracts/FortyAcres.d.ts +2620 -0
  93. package/dist/contracts/FortyAcres.d.ts.map +1 -0
  94. package/dist/contracts/FortyAcres.js +3300 -0
  95. package/dist/contracts/Hatchery.d.ts +392 -0
  96. package/dist/contracts/Hatchery.d.ts.map +1 -0
  97. package/dist/contracts/Hatchery.js +472 -0
  98. package/dist/contracts/Helpers.d.ts +1463 -0
  99. package/dist/contracts/Helpers.d.ts.map +1 -0
  100. package/dist/contracts/Helpers.js +1763 -0
  101. package/dist/contracts/HighCommand.d.ts +2169 -0
  102. package/dist/contracts/HighCommand.d.ts.map +1 -0
  103. package/dist/contracts/HighCommand.js +2474 -0
  104. package/dist/contracts/Kernel.d.ts +391 -0
  105. package/dist/contracts/Kernel.d.ts.map +1 -0
  106. package/dist/contracts/Kernel.js +446 -0
  107. package/dist/contracts/Ledger.d.ts +637 -0
  108. package/dist/contracts/Ledger.d.ts.map +1 -0
  109. package/dist/contracts/Ledger.js +759 -0
  110. package/dist/contracts/LegoBook.d.ts +1463 -0
  111. package/dist/contracts/LegoBook.d.ts.map +1 -0
  112. package/dist/contracts/LegoBook.js +1763 -0
  113. package/dist/contracts/LegoTools.d.ts +1913 -0
  114. package/dist/contracts/LegoTools.d.ts.map +1 -0
  115. package/dist/contracts/LegoTools.js +2402 -0
  116. package/dist/contracts/LevgVault.d.ts +2115 -0
  117. package/dist/contracts/LevgVault.d.ts.map +1 -0
  118. package/dist/contracts/LevgVault.js +2733 -0
  119. package/dist/contracts/LevgVaultAgent.d.ts +2013 -0
  120. package/dist/contracts/LevgVaultAgent.d.ts.map +1 -0
  121. package/dist/contracts/LevgVaultAgent.js +2563 -0
  122. package/dist/contracts/LevgVaultAgentSigHelper.d.ts +2221 -0
  123. package/dist/contracts/LevgVaultAgentSigHelper.d.ts.map +1 -0
  124. package/dist/contracts/LevgVaultAgentSigHelper.js +2963 -0
  125. package/dist/contracts/LevgVaultHelper.d.ts +977 -0
  126. package/dist/contracts/LevgVaultHelper.d.ts.map +1 -0
  127. package/dist/contracts/LevgVaultHelper.js +1289 -0
  128. package/dist/contracts/LevgVaultTools.d.ts +2629 -0
  129. package/dist/contracts/LevgVaultTools.d.ts.map +1 -0
  130. package/dist/contracts/LevgVaultTools.js +3560 -0
  131. package/dist/contracts/LevgVaultWallet.d.ts +1119 -0
  132. package/dist/contracts/LevgVaultWallet.d.ts.map +1 -0
  133. package/dist/contracts/LevgVaultWallet.js +1439 -0
  134. package/dist/contracts/LocalGov.d.ts +427 -0
  135. package/dist/contracts/LocalGov.d.ts.map +1 -0
  136. package/dist/contracts/LocalGov.js +507 -0
  137. package/dist/contracts/LootDistributor.d.ts +1053 -0
  138. package/dist/contracts/LootDistributor.d.ts.map +1 -0
  139. package/dist/contracts/LootDistributor.js +1291 -0
  140. package/dist/contracts/Migrator.d.ts +449 -0
  141. package/dist/contracts/Migrator.d.ts.map +1 -0
  142. package/dist/contracts/Migrator.js +535 -0
  143. package/dist/contracts/MissionControl.d.ts +1405 -0
  144. package/dist/contracts/MissionControl.d.ts.map +1 -0
  145. package/dist/contracts/MissionControl.js +1592 -0
  146. package/dist/contracts/Moonwell.d.ts +2623 -0
  147. package/dist/contracts/Moonwell.d.ts.map +1 -0
  148. package/dist/contracts/Moonwell.js +3304 -0
  149. package/dist/contracts/Morpho.d.ts +2662 -0
  150. package/dist/contracts/Morpho.d.ts.map +1 -0
  151. package/dist/contracts/Morpho.js +3350 -0
  152. package/dist/contracts/Ownership.d.ts +414 -0
  153. package/dist/contracts/Ownership.d.ts.map +1 -0
  154. package/dist/contracts/Ownership.js +472 -0
  155. package/dist/contracts/Paymaster.d.ts +1511 -0
  156. package/dist/contracts/Paymaster.d.ts.map +1 -0
  157. package/dist/contracts/Paymaster.js +1812 -0
  158. package/dist/contracts/RipeLego.d.ts +2913 -0
  159. package/dist/contracts/RipeLego.d.ts.map +1 -0
  160. package/dist/contracts/RipeLego.js +3643 -0
  161. package/dist/contracts/Sentinel.d.ts +2067 -0
  162. package/dist/contracts/Sentinel.d.ts.map +1 -0
  163. package/dist/contracts/Sentinel.js +2480 -0
  164. package/dist/contracts/SignatureHelper.d.ts +4250 -0
  165. package/dist/contracts/SignatureHelper.d.ts.map +1 -0
  166. package/dist/contracts/SignatureHelper.js +5714 -0
  167. package/dist/contracts/SignatureHelperV1.d.ts +4250 -0
  168. package/dist/contracts/SignatureHelperV1.d.ts.map +1 -0
  169. package/dist/contracts/SignatureHelperV1.js +5714 -0
  170. package/dist/contracts/SkyPsm.d.ts +2667 -0
  171. package/dist/contracts/SkyPsm.d.ts.map +1 -0
  172. package/dist/contracts/SkyPsm.js +3356 -0
  173. package/dist/contracts/Switchboard.d.ts +1483 -0
  174. package/dist/contracts/Switchboard.d.ts.map +1 -0
  175. package/dist/contracts/Switchboard.js +1790 -0
  176. package/dist/contracts/SwitchboardAlpha.d.ts +3161 -0
  177. package/dist/contracts/SwitchboardAlpha.d.ts.map +1 -0
  178. package/dist/contracts/SwitchboardAlpha.js +3771 -0
  179. package/dist/contracts/SwitchboardBravo.d.ts +1591 -0
  180. package/dist/contracts/SwitchboardBravo.d.ts.map +1 -0
  181. package/dist/contracts/SwitchboardBravo.js +1872 -0
  182. package/dist/contracts/SwitchboardCharlie.d.ts +3172 -0
  183. package/dist/contracts/SwitchboardCharlie.d.ts.map +1 -0
  184. package/dist/contracts/SwitchboardCharlie.js +3713 -0
  185. package/dist/contracts/UnderscoreLego.d.ts +2592 -0
  186. package/dist/contracts/UnderscoreLego.d.ts.map +1 -0
  187. package/dist/contracts/UnderscoreLego.js +3264 -0
  188. package/dist/contracts/UndyAero.d.ts +1733 -0
  189. package/dist/contracts/UndyAero.d.ts.map +1 -0
  190. package/dist/contracts/UndyAero.js +2235 -0
  191. package/dist/contracts/UndyBtc.d.ts +1733 -0
  192. package/dist/contracts/UndyBtc.d.ts.map +1 -0
  193. package/dist/contracts/UndyBtc.js +2235 -0
  194. package/dist/contracts/UndyCbeth.d.ts +1733 -0
  195. package/dist/contracts/UndyCbeth.d.ts.map +1 -0
  196. package/dist/contracts/UndyCbeth.js +2235 -0
  197. package/dist/contracts/UndyEth.d.ts +1733 -0
  198. package/dist/contracts/UndyEth.d.ts.map +1 -0
  199. package/dist/contracts/UndyEth.js +2235 -0
  200. package/dist/contracts/UndyEurc.d.ts +1733 -0
  201. package/dist/contracts/UndyEurc.d.ts.map +1 -0
  202. package/dist/contracts/UndyEurc.js +2235 -0
  203. package/dist/contracts/UndyGho.d.ts +1733 -0
  204. package/dist/contracts/UndyGho.d.ts.map +1 -0
  205. package/dist/contracts/UndyGho.js +2235 -0
  206. package/dist/contracts/UndyHq.d.ts +1677 -0
  207. package/dist/contracts/UndyHq.d.ts.map +1 -0
  208. package/dist/contracts/UndyHq.js +2026 -0
  209. package/dist/contracts/UndyRewardsLego.d.ts +1572 -0
  210. package/dist/contracts/UndyRewardsLego.d.ts.map +1 -0
  211. package/dist/contracts/UndyRewardsLego.js +1994 -0
  212. package/dist/contracts/UndyToken.d.ts +821 -0
  213. package/dist/contracts/UndyToken.d.ts.map +1 -0
  214. package/dist/contracts/UndyToken.js +1017 -0
  215. package/dist/contracts/UndyUsd.d.ts +1733 -0
  216. package/dist/contracts/UndyUsd.d.ts.map +1 -0
  217. package/dist/contracts/UndyUsd.js +2235 -0
  218. package/dist/contracts/UndyUsdV2.d.ts +1762 -0
  219. package/dist/contracts/UndyUsdV2.d.ts.map +1 -0
  220. package/dist/contracts/UndyUsdV2.js +2267 -0
  221. package/dist/contracts/UndyUsds.d.ts +1733 -0
  222. package/dist/contracts/UndyUsds.d.ts.map +1 -0
  223. package/dist/contracts/UndyUsds.js +2235 -0
  224. package/dist/contracts/UndyVirtual.d.ts +1762 -0
  225. package/dist/contracts/UndyVirtual.d.ts.map +1 -0
  226. package/dist/contracts/UndyVirtual.js +2267 -0
  227. package/dist/contracts/UniswapV2.d.ts +2118 -0
  228. package/dist/contracts/UniswapV2.d.ts.map +1 -0
  229. package/dist/contracts/UniswapV2.js +2679 -0
  230. package/dist/contracts/UniswapV3.d.ts +2256 -0
  231. package/dist/contracts/UniswapV3.d.ts.map +1 -0
  232. package/dist/contracts/UniswapV3.js +2848 -0
  233. package/dist/contracts/UserWallet.d.ts +2650 -0
  234. package/dist/contracts/UserWallet.d.ts.map +1 -0
  235. package/dist/contracts/UserWallet.js +3520 -0
  236. package/dist/contracts/UserWalletConfig.d.ts +3918 -0
  237. package/dist/contracts/UserWalletConfig.d.ts.map +1 -0
  238. package/dist/contracts/UserWalletConfig.js +4527 -0
  239. package/dist/contracts/UserWalletConfigV1.d.ts +3692 -0
  240. package/dist/contracts/UserWalletConfigV1.d.ts.map +1 -0
  241. package/dist/contracts/UserWalletConfigV1.js +4276 -0
  242. package/dist/contracts/UserWalletSignatureHelper.d.ts +5558 -0
  243. package/dist/contracts/UserWalletSignatureHelper.d.ts.map +1 -0
  244. package/dist/contracts/UserWalletSignatureHelper.js +7480 -0
  245. package/dist/contracts/UserWalletV1.d.ts +2650 -0
  246. package/dist/contracts/UserWalletV1.d.ts.map +1 -0
  247. package/dist/contracts/UserWalletV1.js +3520 -0
  248. package/dist/contracts/VaultErc20Token.d.ts +522 -0
  249. package/dist/contracts/VaultErc20Token.d.ts.map +1 -0
  250. package/dist/contracts/VaultErc20Token.js +658 -0
  251. package/dist/contracts/VaultRegistry.d.ts +3162 -0
  252. package/dist/contracts/VaultRegistry.d.ts.map +1 -0
  253. package/dist/contracts/VaultRegistry.js +3893 -0
  254. package/dist/contracts/WalletBackpack.d.ts +1248 -0
  255. package/dist/contracts/WalletBackpack.d.ts.map +1 -0
  256. package/dist/contracts/WalletBackpack.js +1519 -0
  257. package/dist/contracts/Wasabi.d.ts +2620 -0
  258. package/dist/contracts/Wasabi.d.ts.map +1 -0
  259. package/dist/contracts/Wasabi.js +3300 -0
  260. package/dist/contracts/index.d.ts +86 -0
  261. package/dist/contracts/index.d.ts.map +1 -0
  262. package/dist/contracts/index.js +89 -0
  263. package/dist/contracts/sdk.d.ts +176 -0
  264. package/dist/contracts/sdk.d.ts.map +1 -0
  265. package/dist/contracts/sdk.js +178 -0
  266. package/dist/getSwapInstructions.d.ts +34 -0
  267. package/dist/getSwapInstructions.d.ts.map +1 -0
  268. package/dist/getSwapInstructions.js +21 -0
  269. package/dist/index.d.ts +135 -0
  270. package/dist/index.d.ts.map +1 -0
  271. package/dist/index.js +137 -0
  272. package/package.json +44 -17
  273. package/.claude/settings.local.json +0 -31
  274. package/.eslintrc.json +0 -27
  275. package/.prettierrc +0 -9
  276. package/.tool-versions +0 -1
  277. package/LICENSE +0 -41
  278. package/LICENSE_DATE.md +0 -34
  279. package/LICENSE_GRANTS.md +0 -33
  280. package/LICENSE_INFO.md +0 -90
  281. package/dapp.config.js +0 -154
  282. package/src/getSwapInstructions.ts +0 -55
  283. package/src/index.ts +0 -192
  284. package/tsconfig.json +0 -18
@@ -0,0 +1,2402 @@
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
+ }