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