@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,1357 @@
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: 'CurveSwap',
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: 'CurveLiquidityAdded',
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: 'CurveLiquidityRemoved',
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: '_oracleRegistry',
1123
+ type: 'address',
1124
+ },
1125
+ ],
1126
+ outputs: [
1127
+ {
1128
+ name: '',
1129
+ type: 'uint256',
1130
+ },
1131
+ ],
1132
+ },
1133
+ {
1134
+ stateMutability: 'view',
1135
+ type: 'function',
1136
+ name: 'getAccessForLego',
1137
+ inputs: [
1138
+ {
1139
+ name: '_user',
1140
+ type: 'address',
1141
+ },
1142
+ {
1143
+ name: '_action',
1144
+ type: 'uint256',
1145
+ },
1146
+ ],
1147
+ outputs: [
1148
+ {
1149
+ name: '',
1150
+ type: 'address',
1151
+ },
1152
+ {
1153
+ name: '',
1154
+ type: 'string',
1155
+ },
1156
+ {
1157
+ name: '',
1158
+ type: 'uint256',
1159
+ },
1160
+ ],
1161
+ },
1162
+ {
1163
+ stateMutability: 'view',
1164
+ type: 'function',
1165
+ name: 'getPricePerShare',
1166
+ inputs: [
1167
+ {
1168
+ name: '_asset',
1169
+ type: 'address',
1170
+ },
1171
+ {
1172
+ name: '_decimals',
1173
+ type: 'uint256',
1174
+ },
1175
+ ],
1176
+ outputs: [
1177
+ {
1178
+ name: '',
1179
+ type: 'uint256',
1180
+ },
1181
+ ],
1182
+ },
1183
+ {
1184
+ stateMutability: 'view',
1185
+ type: 'function',
1186
+ name: 'CURVE_META_REGISTRY',
1187
+ inputs: [],
1188
+ outputs: [
1189
+ {
1190
+ name: '',
1191
+ type: 'address',
1192
+ },
1193
+ ],
1194
+ },
1195
+ {
1196
+ stateMutability: 'view',
1197
+ type: 'function',
1198
+ name: 'CURVE_REGISTRIES',
1199
+ inputs: [],
1200
+ outputs: [
1201
+ {
1202
+ name: '',
1203
+ type: 'tuple',
1204
+ components: [
1205
+ {
1206
+ name: 'StableSwapNg',
1207
+ type: 'address',
1208
+ },
1209
+ {
1210
+ name: 'TwoCryptoNg',
1211
+ type: 'address',
1212
+ },
1213
+ {
1214
+ name: 'TricryptoNg',
1215
+ type: 'address',
1216
+ },
1217
+ {
1218
+ name: 'TwoCrypto',
1219
+ type: 'address',
1220
+ },
1221
+ {
1222
+ name: 'MetaPool',
1223
+ type: 'address',
1224
+ },
1225
+ {
1226
+ name: 'RateProvider',
1227
+ type: 'address',
1228
+ },
1229
+ ],
1230
+ },
1231
+ ],
1232
+ },
1233
+ {
1234
+ stateMutability: 'nonpayable',
1235
+ type: 'constructor',
1236
+ inputs: [
1237
+ {
1238
+ name: '_undyHq',
1239
+ type: 'address',
1240
+ },
1241
+ {
1242
+ name: '_curveAddressProvider',
1243
+ type: 'address',
1244
+ },
1245
+ ],
1246
+ outputs: [],
1247
+ },
1248
+ ];
1249
+ export const deployAddress = '0x01A8Fa2Dbd240f197C820DE22e279150edE5BCF4';
1250
+ function getRequest(method, args, contractAddressOrOptions) {
1251
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1252
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
1253
+ const call = {
1254
+ contractName: 'Curve',
1255
+ method,
1256
+ args,
1257
+ address,
1258
+ deployAddress,
1259
+ defaultValue,
1260
+ getAbi: () => abi,
1261
+ with: (options) => {
1262
+ call.address = options.contractAddress;
1263
+ call.defaultValue = options.defaultValue;
1264
+ return call;
1265
+ },
1266
+ defaultTo: (defaultValue) => {
1267
+ call.defaultValue = defaultValue;
1268
+ return call;
1269
+ },
1270
+ at: (address) => {
1271
+ call.address = address;
1272
+ return call;
1273
+ },
1274
+ };
1275
+ return call;
1276
+ }
1277
+ export const call = {
1278
+ getAddys: (...args) => getRequest('getAddys', args),
1279
+ getUndyHq: (...args) => getRequest('getUndyHq', args),
1280
+ legoId: (...args) => getRequest('legoId', args),
1281
+ isPaused: (...args) => getRequest('isPaused', args),
1282
+ hasCapability: (...args) => getRequest('hasCapability', args),
1283
+ getRegistries: (...args) => getRequest('getRegistries', args),
1284
+ isYieldLego: (...args) => getRequest('isYieldLego', args),
1285
+ isDexLego: (...args) => getRequest('isDexLego', args),
1286
+ getLpToken: (...args) => getRequest('getLpToken', args),
1287
+ getPoolForLpToken: (...args) => getRequest('getPoolForLpToken', args),
1288
+ getCoreRouterPool: (...args) => getRequest('getCoreRouterPool', args),
1289
+ getDeepestLiqPool: (...args) => getRequest('getDeepestLiqPool', args),
1290
+ getBestSwapAmountOut: (...args) => getRequest('getBestSwapAmountOut', args),
1291
+ getSwapAmountOut: (...args) => getRequest('getSwapAmountOut', args),
1292
+ getBestSwapAmountIn: (...args) => getRequest('getBestSwapAmountIn', args),
1293
+ getSwapAmountIn: (...args) => getRequest('getSwapAmountIn', args),
1294
+ getAddLiqAmountsIn: (...args) => getRequest('getAddLiqAmountsIn', args),
1295
+ getRemoveLiqAmountsOut: (...args) => getRequest('getRemoveLiqAmountsOut', args),
1296
+ getPrice: (...args) => getRequest('getPrice', args),
1297
+ getPriceUnsafe: (...args) => getRequest('getPriceUnsafe', args),
1298
+ getAccessForLego: (...args) => getRequest('getAccessForLego', args),
1299
+ getPricePerShare: (...args) => getRequest('getPricePerShare', args),
1300
+ CURVE_META_REGISTRY: (...args) => getRequest('CURVE_META_REGISTRY', args),
1301
+ CURVE_REGISTRIES: (...args) => getRequest('CURVE_REGISTRIES', args),
1302
+ };
1303
+ function getMutation(functionName) {
1304
+ return {
1305
+ contractName: 'Curve',
1306
+ functionName,
1307
+ deployAddress,
1308
+ argsType: undefined,
1309
+ getAbi: () => abi,
1310
+ };
1311
+ }
1312
+ export const mutation = {
1313
+ pause: getMutation('pause'),
1314
+ recoverFunds: getMutation('recoverFunds'),
1315
+ recoverFundsMany: getMutation('recoverFundsMany'),
1316
+ swapTokens: getMutation('swapTokens'),
1317
+ addLiquidity: getMutation('addLiquidity'),
1318
+ removeLiquidity: getMutation('removeLiquidity'),
1319
+ };
1320
+ export function toSdk(publicClient, walletClient) {
1321
+ return {
1322
+ deployAddress,
1323
+ abi,
1324
+ // Queries
1325
+ getAddys: (...args) => singleQuery(publicClient, call.getAddys(...args)),
1326
+ getUndyHq: (...args) => singleQuery(publicClient, call.getUndyHq(...args)),
1327
+ legoId: (...args) => singleQuery(publicClient, call.legoId(...args)),
1328
+ isPaused: (...args) => singleQuery(publicClient, call.isPaused(...args)),
1329
+ hasCapability: (...args) => singleQuery(publicClient, call.hasCapability(...args)),
1330
+ getRegistries: (...args) => singleQuery(publicClient, call.getRegistries(...args)),
1331
+ isYieldLego: (...args) => singleQuery(publicClient, call.isYieldLego(...args)),
1332
+ isDexLego: (...args) => singleQuery(publicClient, call.isDexLego(...args)),
1333
+ getLpToken: (...args) => singleQuery(publicClient, call.getLpToken(...args)),
1334
+ getPoolForLpToken: (...args) => singleQuery(publicClient, call.getPoolForLpToken(...args)),
1335
+ getCoreRouterPool: (...args) => singleQuery(publicClient, call.getCoreRouterPool(...args)),
1336
+ getDeepestLiqPool: (...args) => singleQuery(publicClient, call.getDeepestLiqPool(...args)),
1337
+ getBestSwapAmountOut: (...args) => singleQuery(publicClient, call.getBestSwapAmountOut(...args)),
1338
+ getSwapAmountOut: (...args) => singleQuery(publicClient, call.getSwapAmountOut(...args)),
1339
+ getBestSwapAmountIn: (...args) => singleQuery(publicClient, call.getBestSwapAmountIn(...args)),
1340
+ getSwapAmountIn: (...args) => singleQuery(publicClient, call.getSwapAmountIn(...args)),
1341
+ getAddLiqAmountsIn: (...args) => singleQuery(publicClient, call.getAddLiqAmountsIn(...args)),
1342
+ getRemoveLiqAmountsOut: (...args) => singleQuery(publicClient, call.getRemoveLiqAmountsOut(...args)),
1343
+ getPrice: (...args) => singleQuery(publicClient, call.getPrice(...args)),
1344
+ getPriceUnsafe: (...args) => singleQuery(publicClient, call.getPriceUnsafe(...args)),
1345
+ getAccessForLego: (...args) => singleQuery(publicClient, call.getAccessForLego(...args)),
1346
+ getPricePerShare: (...args) => singleQuery(publicClient, call.getPricePerShare(...args)),
1347
+ CURVE_META_REGISTRY: (...args) => singleQuery(publicClient, call.CURVE_META_REGISTRY(...args)),
1348
+ CURVE_REGISTRIES: (...args) => singleQuery(publicClient, call.CURVE_REGISTRIES(...args)),
1349
+ // Mutations
1350
+ pause: (...args) => mutate(walletClient, mutation.pause)(...args),
1351
+ recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds)(...args),
1352
+ recoverFundsMany: (...args) => mutate(walletClient, mutation.recoverFundsMany)(...args),
1353
+ swapTokens: (...args) => mutate(walletClient, mutation.swapTokens)(...args),
1354
+ addLiquidity: (...args) => mutate(walletClient, mutation.addLiquidity)(...args),
1355
+ removeLiquidity: (...args) => mutate(walletClient, mutation.removeLiquidity)(...args),
1356
+ };
1357
+ }