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