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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/AGENTS.md +172 -0
  2. package/README.md +17 -116
  3. package/abis.json +193056 -0
  4. package/addresses.json +76 -0
  5. package/dist/contracts/AaveV3.d.ts +2594 -0
  6. package/dist/contracts/AaveV3.d.ts.map +1 -0
  7. package/dist/contracts/AaveV3.js +3272 -0
  8. package/dist/contracts/Addys.d.ts +124 -0
  9. package/dist/contracts/Addys.d.ts.map +1 -0
  10. package/dist/contracts/Addys.js +134 -0
  11. package/dist/contracts/AeroClassic.d.ts +2118 -0
  12. package/dist/contracts/AeroClassic.d.ts.map +1 -0
  13. package/dist/contracts/AeroClassic.js +2679 -0
  14. package/dist/contracts/AeroSlipstream.d.ts +2256 -0
  15. package/dist/contracts/AeroSlipstream.d.ts.map +1 -0
  16. package/dist/contracts/AeroSlipstream.js +2848 -0
  17. package/dist/contracts/AgentSenderGeneric.d.ts +4771 -0
  18. package/dist/contracts/AgentSenderGeneric.d.ts.map +1 -0
  19. package/dist/contracts/AgentSenderGeneric.js +6192 -0
  20. package/dist/contracts/AgentSenderSpecial.d.ts +2124 -0
  21. package/dist/contracts/AgentSenderSpecial.d.ts.map +1 -0
  22. package/dist/contracts/AgentSenderSpecial.js +2671 -0
  23. package/dist/contracts/AgentSenderSpecialAdmin.d.ts +984 -0
  24. package/dist/contracts/AgentSenderSpecialAdmin.d.ts.map +1 -0
  25. package/dist/contracts/AgentSenderSpecialAdmin.js +1185 -0
  26. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts +3180 -0
  27. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts.map +1 -0
  28. package/dist/contracts/AgentSenderSpecialSigHelper.js +4211 -0
  29. package/dist/contracts/AgentWrapper.d.ts +2678 -0
  30. package/dist/contracts/AgentWrapper.d.ts.map +1 -0
  31. package/dist/contracts/AgentWrapper.js +3602 -0
  32. package/dist/contracts/AgentWrapperV1.d.ts +3789 -0
  33. package/dist/contracts/AgentWrapperV1.d.ts.map +1 -0
  34. package/dist/contracts/AgentWrapperV1.js +4945 -0
  35. package/dist/contracts/AgentWrapperV2.d.ts +2494 -0
  36. package/dist/contracts/AgentWrapperV2.d.ts.map +1 -0
  37. package/dist/contracts/AgentWrapperV2.js +3354 -0
  38. package/dist/contracts/Appraiser.d.ts +577 -0
  39. package/dist/contracts/Appraiser.d.ts.map +1 -0
  40. package/dist/contracts/Appraiser.js +735 -0
  41. package/dist/contracts/Avantis.d.ts +2606 -0
  42. package/dist/contracts/Avantis.d.ts.map +1 -0
  43. package/dist/contracts/Avantis.js +3282 -0
  44. package/dist/contracts/Billing.d.ts +381 -0
  45. package/dist/contracts/Billing.d.ts.map +1 -0
  46. package/dist/contracts/Billing.js +451 -0
  47. package/dist/contracts/ChequeBook.d.ts +1860 -0
  48. package/dist/contracts/ChequeBook.d.ts.map +1 -0
  49. package/dist/contracts/ChequeBook.js +2131 -0
  50. package/dist/contracts/CompoundV3.d.ts +2622 -0
  51. package/dist/contracts/CompoundV3.d.ts.map +1 -0
  52. package/dist/contracts/CompoundV3.js +3304 -0
  53. package/dist/contracts/ConvertVaultToken.d.ts +64 -0
  54. package/dist/contracts/ConvertVaultToken.d.ts.map +1 -0
  55. package/dist/contracts/ConvertVaultToken.js +75 -0
  56. package/dist/contracts/Curve.d.ts +1107 -0
  57. package/dist/contracts/Curve.d.ts.map +1 -0
  58. package/dist/contracts/Curve.js +1379 -0
  59. package/dist/contracts/DefaultsBase.d.ts +306 -0
  60. package/dist/contracts/DefaultsBase.d.ts.map +1 -0
  61. package/dist/contracts/DefaultsBase.js +331 -0
  62. package/dist/contracts/DefaultsLocal.d.ts +320 -0
  63. package/dist/contracts/DefaultsLocal.d.ts.map +1 -0
  64. package/dist/contracts/DefaultsLocal.js +350 -0
  65. package/dist/contracts/ERC20.d.ts +813 -0
  66. package/dist/contracts/ERC20.d.ts.map +1 -0
  67. package/dist/contracts/ERC20.js +1006 -0
  68. package/dist/contracts/EarnVault.d.ts +1762 -0
  69. package/dist/contracts/EarnVault.d.ts.map +1 -0
  70. package/dist/contracts/EarnVault.js +2267 -0
  71. package/dist/contracts/EarnVaultAgent.d.ts +1160 -0
  72. package/dist/contracts/EarnVaultAgent.d.ts.map +1 -0
  73. package/dist/contracts/EarnVaultAgent.js +1435 -0
  74. package/dist/contracts/EarnVaultAgentSigHelper.d.ts +905 -0
  75. package/dist/contracts/EarnVaultAgentSigHelper.d.ts.map +1 -0
  76. package/dist/contracts/EarnVaultAgentSigHelper.js +1198 -0
  77. package/dist/contracts/EarnVaultWallet.d.ts +777 -0
  78. package/dist/contracts/EarnVaultWallet.d.ts.map +1 -0
  79. package/dist/contracts/EarnVaultWallet.js +987 -0
  80. package/dist/contracts/Erc20Token.d.ts +813 -0
  81. package/dist/contracts/Erc20Token.d.ts.map +1 -0
  82. package/dist/contracts/Erc20Token.js +1006 -0
  83. package/dist/contracts/Euler.d.ts +2662 -0
  84. package/dist/contracts/Euler.d.ts.map +1 -0
  85. package/dist/contracts/Euler.js +3350 -0
  86. package/dist/contracts/ExtraFi.d.ts +2637 -0
  87. package/dist/contracts/ExtraFi.d.ts.map +1 -0
  88. package/dist/contracts/ExtraFi.js +3323 -0
  89. package/dist/contracts/Fluid.d.ts +2634 -0
  90. package/dist/contracts/Fluid.d.ts.map +1 -0
  91. package/dist/contracts/Fluid.js +3318 -0
  92. package/dist/contracts/FortyAcres.d.ts +2620 -0
  93. package/dist/contracts/FortyAcres.d.ts.map +1 -0
  94. package/dist/contracts/FortyAcres.js +3300 -0
  95. package/dist/contracts/Hatchery.d.ts +392 -0
  96. package/dist/contracts/Hatchery.d.ts.map +1 -0
  97. package/dist/contracts/Hatchery.js +472 -0
  98. package/dist/contracts/Helpers.d.ts +1463 -0
  99. package/dist/contracts/Helpers.d.ts.map +1 -0
  100. package/dist/contracts/Helpers.js +1763 -0
  101. package/dist/contracts/HighCommand.d.ts +2169 -0
  102. package/dist/contracts/HighCommand.d.ts.map +1 -0
  103. package/dist/contracts/HighCommand.js +2474 -0
  104. package/dist/contracts/Kernel.d.ts +391 -0
  105. package/dist/contracts/Kernel.d.ts.map +1 -0
  106. package/dist/contracts/Kernel.js +446 -0
  107. package/dist/contracts/Ledger.d.ts +637 -0
  108. package/dist/contracts/Ledger.d.ts.map +1 -0
  109. package/dist/contracts/Ledger.js +759 -0
  110. package/dist/contracts/LegoBook.d.ts +1463 -0
  111. package/dist/contracts/LegoBook.d.ts.map +1 -0
  112. package/dist/contracts/LegoBook.js +1763 -0
  113. package/dist/contracts/LegoTools.d.ts +1913 -0
  114. package/dist/contracts/LegoTools.d.ts.map +1 -0
  115. package/dist/contracts/LegoTools.js +2402 -0
  116. package/dist/contracts/LevgVault.d.ts +2115 -0
  117. package/dist/contracts/LevgVault.d.ts.map +1 -0
  118. package/dist/contracts/LevgVault.js +2733 -0
  119. package/dist/contracts/LevgVaultAgent.d.ts +2013 -0
  120. package/dist/contracts/LevgVaultAgent.d.ts.map +1 -0
  121. package/dist/contracts/LevgVaultAgent.js +2563 -0
  122. package/dist/contracts/LevgVaultAgentSigHelper.d.ts +2221 -0
  123. package/dist/contracts/LevgVaultAgentSigHelper.d.ts.map +1 -0
  124. package/dist/contracts/LevgVaultAgentSigHelper.js +2963 -0
  125. package/dist/contracts/LevgVaultHelper.d.ts +977 -0
  126. package/dist/contracts/LevgVaultHelper.d.ts.map +1 -0
  127. package/dist/contracts/LevgVaultHelper.js +1289 -0
  128. package/dist/contracts/LevgVaultTools.d.ts +2629 -0
  129. package/dist/contracts/LevgVaultTools.d.ts.map +1 -0
  130. package/dist/contracts/LevgVaultTools.js +3560 -0
  131. package/dist/contracts/LevgVaultWallet.d.ts +1119 -0
  132. package/dist/contracts/LevgVaultWallet.d.ts.map +1 -0
  133. package/dist/contracts/LevgVaultWallet.js +1439 -0
  134. package/dist/contracts/LocalGov.d.ts +427 -0
  135. package/dist/contracts/LocalGov.d.ts.map +1 -0
  136. package/dist/contracts/LocalGov.js +507 -0
  137. package/dist/contracts/LootDistributor.d.ts +1053 -0
  138. package/dist/contracts/LootDistributor.d.ts.map +1 -0
  139. package/dist/contracts/LootDistributor.js +1291 -0
  140. package/dist/contracts/Migrator.d.ts +449 -0
  141. package/dist/contracts/Migrator.d.ts.map +1 -0
  142. package/dist/contracts/Migrator.js +535 -0
  143. package/dist/contracts/MissionControl.d.ts +1405 -0
  144. package/dist/contracts/MissionControl.d.ts.map +1 -0
  145. package/dist/contracts/MissionControl.js +1592 -0
  146. package/dist/contracts/Moonwell.d.ts +2623 -0
  147. package/dist/contracts/Moonwell.d.ts.map +1 -0
  148. package/dist/contracts/Moonwell.js +3304 -0
  149. package/dist/contracts/Morpho.d.ts +2662 -0
  150. package/dist/contracts/Morpho.d.ts.map +1 -0
  151. package/dist/contracts/Morpho.js +3350 -0
  152. package/dist/contracts/Ownership.d.ts +414 -0
  153. package/dist/contracts/Ownership.d.ts.map +1 -0
  154. package/dist/contracts/Ownership.js +472 -0
  155. package/dist/contracts/Paymaster.d.ts +1511 -0
  156. package/dist/contracts/Paymaster.d.ts.map +1 -0
  157. package/dist/contracts/Paymaster.js +1812 -0
  158. package/dist/contracts/RipeLego.d.ts +2913 -0
  159. package/dist/contracts/RipeLego.d.ts.map +1 -0
  160. package/dist/contracts/RipeLego.js +3643 -0
  161. package/dist/contracts/Sentinel.d.ts +2067 -0
  162. package/dist/contracts/Sentinel.d.ts.map +1 -0
  163. package/dist/contracts/Sentinel.js +2480 -0
  164. package/dist/contracts/SignatureHelper.d.ts +4250 -0
  165. package/dist/contracts/SignatureHelper.d.ts.map +1 -0
  166. package/dist/contracts/SignatureHelper.js +5714 -0
  167. package/dist/contracts/SignatureHelperV1.d.ts +4250 -0
  168. package/dist/contracts/SignatureHelperV1.d.ts.map +1 -0
  169. package/dist/contracts/SignatureHelperV1.js +5714 -0
  170. package/dist/contracts/SkyPsm.d.ts +2667 -0
  171. package/dist/contracts/SkyPsm.d.ts.map +1 -0
  172. package/dist/contracts/SkyPsm.js +3356 -0
  173. package/dist/contracts/Switchboard.d.ts +1483 -0
  174. package/dist/contracts/Switchboard.d.ts.map +1 -0
  175. package/dist/contracts/Switchboard.js +1790 -0
  176. package/dist/contracts/SwitchboardAlpha.d.ts +3161 -0
  177. package/dist/contracts/SwitchboardAlpha.d.ts.map +1 -0
  178. package/dist/contracts/SwitchboardAlpha.js +3771 -0
  179. package/dist/contracts/SwitchboardBravo.d.ts +1591 -0
  180. package/dist/contracts/SwitchboardBravo.d.ts.map +1 -0
  181. package/dist/contracts/SwitchboardBravo.js +1872 -0
  182. package/dist/contracts/SwitchboardCharlie.d.ts +3172 -0
  183. package/dist/contracts/SwitchboardCharlie.d.ts.map +1 -0
  184. package/dist/contracts/SwitchboardCharlie.js +3713 -0
  185. package/dist/contracts/UnderscoreLego.d.ts +2592 -0
  186. package/dist/contracts/UnderscoreLego.d.ts.map +1 -0
  187. package/dist/contracts/UnderscoreLego.js +3264 -0
  188. package/dist/contracts/UndyAero.d.ts +1733 -0
  189. package/dist/contracts/UndyAero.d.ts.map +1 -0
  190. package/dist/contracts/UndyAero.js +2235 -0
  191. package/dist/contracts/UndyBtc.d.ts +1733 -0
  192. package/dist/contracts/UndyBtc.d.ts.map +1 -0
  193. package/dist/contracts/UndyBtc.js +2235 -0
  194. package/dist/contracts/UndyCbeth.d.ts +1733 -0
  195. package/dist/contracts/UndyCbeth.d.ts.map +1 -0
  196. package/dist/contracts/UndyCbeth.js +2235 -0
  197. package/dist/contracts/UndyEth.d.ts +1733 -0
  198. package/dist/contracts/UndyEth.d.ts.map +1 -0
  199. package/dist/contracts/UndyEth.js +2235 -0
  200. package/dist/contracts/UndyEurc.d.ts +1733 -0
  201. package/dist/contracts/UndyEurc.d.ts.map +1 -0
  202. package/dist/contracts/UndyEurc.js +2235 -0
  203. package/dist/contracts/UndyGho.d.ts +1733 -0
  204. package/dist/contracts/UndyGho.d.ts.map +1 -0
  205. package/dist/contracts/UndyGho.js +2235 -0
  206. package/dist/contracts/UndyHq.d.ts +1677 -0
  207. package/dist/contracts/UndyHq.d.ts.map +1 -0
  208. package/dist/contracts/UndyHq.js +2026 -0
  209. package/dist/contracts/UndyRewardsLego.d.ts +1572 -0
  210. package/dist/contracts/UndyRewardsLego.d.ts.map +1 -0
  211. package/dist/contracts/UndyRewardsLego.js +1994 -0
  212. package/dist/contracts/UndyToken.d.ts +821 -0
  213. package/dist/contracts/UndyToken.d.ts.map +1 -0
  214. package/dist/contracts/UndyToken.js +1017 -0
  215. package/dist/contracts/UndyUsd.d.ts +1733 -0
  216. package/dist/contracts/UndyUsd.d.ts.map +1 -0
  217. package/dist/contracts/UndyUsd.js +2235 -0
  218. package/dist/contracts/UndyUsdV2.d.ts +1762 -0
  219. package/dist/contracts/UndyUsdV2.d.ts.map +1 -0
  220. package/dist/contracts/UndyUsdV2.js +2267 -0
  221. package/dist/contracts/UndyUsds.d.ts +1733 -0
  222. package/dist/contracts/UndyUsds.d.ts.map +1 -0
  223. package/dist/contracts/UndyUsds.js +2235 -0
  224. package/dist/contracts/UndyVirtual.d.ts +1762 -0
  225. package/dist/contracts/UndyVirtual.d.ts.map +1 -0
  226. package/dist/contracts/UndyVirtual.js +2267 -0
  227. package/dist/contracts/UniswapV2.d.ts +2118 -0
  228. package/dist/contracts/UniswapV2.d.ts.map +1 -0
  229. package/dist/contracts/UniswapV2.js +2679 -0
  230. package/dist/contracts/UniswapV3.d.ts +2256 -0
  231. package/dist/contracts/UniswapV3.d.ts.map +1 -0
  232. package/dist/contracts/UniswapV3.js +2848 -0
  233. package/dist/contracts/UserWallet.d.ts +2650 -0
  234. package/dist/contracts/UserWallet.d.ts.map +1 -0
  235. package/dist/contracts/UserWallet.js +3520 -0
  236. package/dist/contracts/UserWalletConfig.d.ts +3918 -0
  237. package/dist/contracts/UserWalletConfig.d.ts.map +1 -0
  238. package/dist/contracts/UserWalletConfig.js +4527 -0
  239. package/dist/contracts/UserWalletConfigV1.d.ts +3692 -0
  240. package/dist/contracts/UserWalletConfigV1.d.ts.map +1 -0
  241. package/dist/contracts/UserWalletConfigV1.js +4276 -0
  242. package/dist/contracts/UserWalletSignatureHelper.d.ts +5558 -0
  243. package/dist/contracts/UserWalletSignatureHelper.d.ts.map +1 -0
  244. package/dist/contracts/UserWalletSignatureHelper.js +7480 -0
  245. package/dist/contracts/UserWalletV1.d.ts +2650 -0
  246. package/dist/contracts/UserWalletV1.d.ts.map +1 -0
  247. package/dist/contracts/UserWalletV1.js +3520 -0
  248. package/dist/contracts/VaultErc20Token.d.ts +522 -0
  249. package/dist/contracts/VaultErc20Token.d.ts.map +1 -0
  250. package/dist/contracts/VaultErc20Token.js +658 -0
  251. package/dist/contracts/VaultRegistry.d.ts +3162 -0
  252. package/dist/contracts/VaultRegistry.d.ts.map +1 -0
  253. package/dist/contracts/VaultRegistry.js +3893 -0
  254. package/dist/contracts/WalletBackpack.d.ts +1248 -0
  255. package/dist/contracts/WalletBackpack.d.ts.map +1 -0
  256. package/dist/contracts/WalletBackpack.js +1519 -0
  257. package/dist/contracts/Wasabi.d.ts +2620 -0
  258. package/dist/contracts/Wasabi.d.ts.map +1 -0
  259. package/dist/contracts/Wasabi.js +3300 -0
  260. package/dist/contracts/index.d.ts +86 -0
  261. package/dist/contracts/index.d.ts.map +1 -0
  262. package/dist/contracts/index.js +89 -0
  263. package/dist/contracts/sdk.d.ts +176 -0
  264. package/dist/contracts/sdk.d.ts.map +1 -0
  265. package/dist/contracts/sdk.js +178 -0
  266. package/dist/getSwapInstructions.d.ts +34 -0
  267. package/dist/getSwapInstructions.d.ts.map +1 -0
  268. package/dist/getSwapInstructions.js +21 -0
  269. package/dist/index.d.ts +135 -0
  270. package/dist/index.d.ts.map +1 -0
  271. package/dist/index.js +137 -0
  272. package/package.json +44 -17
  273. package/.claude/settings.local.json +0 -31
  274. package/.eslintrc.json +0 -27
  275. package/.prettierrc +0 -9
  276. package/.tool-versions +0 -1
  277. package/LICENSE +0 -41
  278. package/LICENSE_DATE.md +0 -34
  279. package/LICENSE_GRANTS.md +0 -33
  280. package/LICENSE_INFO.md +0 -90
  281. package/dapp.config.js +0 -154
  282. package/src/getSwapInstructions.ts +0 -55
  283. package/src/index.ts +0 -192
  284. package/tsconfig.json +0 -18
@@ -0,0 +1,1379 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /* @ts-nocheck */
5
+ import { singleQuery, mutate } from '@dappql/async';
6
+ import { encodeEventTopics, parseEventLogs } from 'viem';
7
+ export const abi = [
8
+ {
9
+ "name": "CurveSwap",
10
+ "inputs": [
11
+ {
12
+ "name": "sender",
13
+ "type": "address",
14
+ "indexed": true
15
+ },
16
+ {
17
+ "name": "tokenIn",
18
+ "type": "address",
19
+ "indexed": true
20
+ },
21
+ {
22
+ "name": "tokenOut",
23
+ "type": "address",
24
+ "indexed": true
25
+ },
26
+ {
27
+ "name": "amountIn",
28
+ "type": "uint256",
29
+ "indexed": false
30
+ },
31
+ {
32
+ "name": "amountOut",
33
+ "type": "uint256",
34
+ "indexed": false
35
+ },
36
+ {
37
+ "name": "usdValue",
38
+ "type": "uint256",
39
+ "indexed": false
40
+ },
41
+ {
42
+ "name": "numTokens",
43
+ "type": "uint256",
44
+ "indexed": false
45
+ },
46
+ {
47
+ "name": "recipient",
48
+ "type": "address",
49
+ "indexed": false
50
+ }
51
+ ],
52
+ "anonymous": false,
53
+ "type": "event"
54
+ },
55
+ {
56
+ "name": "CurveLiquidityAdded",
57
+ "inputs": [
58
+ {
59
+ "name": "sender",
60
+ "type": "address",
61
+ "indexed": true
62
+ },
63
+ {
64
+ "name": "tokenA",
65
+ "type": "address",
66
+ "indexed": true
67
+ },
68
+ {
69
+ "name": "tokenB",
70
+ "type": "address",
71
+ "indexed": true
72
+ },
73
+ {
74
+ "name": "amountA",
75
+ "type": "uint256",
76
+ "indexed": false
77
+ },
78
+ {
79
+ "name": "amountB",
80
+ "type": "uint256",
81
+ "indexed": false
82
+ },
83
+ {
84
+ "name": "lpAmountReceived",
85
+ "type": "uint256",
86
+ "indexed": false
87
+ },
88
+ {
89
+ "name": "usdValue",
90
+ "type": "uint256",
91
+ "indexed": false
92
+ },
93
+ {
94
+ "name": "recipient",
95
+ "type": "address",
96
+ "indexed": false
97
+ }
98
+ ],
99
+ "anonymous": false,
100
+ "type": "event"
101
+ },
102
+ {
103
+ "name": "CurveLiquidityRemoved",
104
+ "inputs": [
105
+ {
106
+ "name": "sender",
107
+ "type": "address",
108
+ "indexed": false
109
+ },
110
+ {
111
+ "name": "pool",
112
+ "type": "address",
113
+ "indexed": true
114
+ },
115
+ {
116
+ "name": "tokenA",
117
+ "type": "address",
118
+ "indexed": true
119
+ },
120
+ {
121
+ "name": "tokenB",
122
+ "type": "address",
123
+ "indexed": true
124
+ },
125
+ {
126
+ "name": "amountA",
127
+ "type": "uint256",
128
+ "indexed": false
129
+ },
130
+ {
131
+ "name": "amountB",
132
+ "type": "uint256",
133
+ "indexed": false
134
+ },
135
+ {
136
+ "name": "lpToken",
137
+ "type": "address",
138
+ "indexed": false
139
+ },
140
+ {
141
+ "name": "lpAmountBurned",
142
+ "type": "uint256",
143
+ "indexed": false
144
+ },
145
+ {
146
+ "name": "usdValue",
147
+ "type": "uint256",
148
+ "indexed": false
149
+ },
150
+ {
151
+ "name": "recipient",
152
+ "type": "address",
153
+ "indexed": false
154
+ }
155
+ ],
156
+ "anonymous": false,
157
+ "type": "event"
158
+ },
159
+ {
160
+ "name": "LegoPauseModified",
161
+ "inputs": [
162
+ {
163
+ "name": "isPaused",
164
+ "type": "bool",
165
+ "indexed": false
166
+ }
167
+ ],
168
+ "anonymous": false,
169
+ "type": "event"
170
+ },
171
+ {
172
+ "name": "LegoFundsRecovered",
173
+ "inputs": [
174
+ {
175
+ "name": "asset",
176
+ "type": "address",
177
+ "indexed": true
178
+ },
179
+ {
180
+ "name": "recipient",
181
+ "type": "address",
182
+ "indexed": true
183
+ },
184
+ {
185
+ "name": "balance",
186
+ "type": "uint256",
187
+ "indexed": false
188
+ }
189
+ ],
190
+ "anonymous": false,
191
+ "type": "event"
192
+ },
193
+ {
194
+ "stateMutability": "view",
195
+ "type": "function",
196
+ "name": "getAddys",
197
+ "inputs": [],
198
+ "outputs": [
199
+ {
200
+ "name": "",
201
+ "type": "tuple",
202
+ "components": [
203
+ {
204
+ "name": "hq",
205
+ "type": "address"
206
+ },
207
+ {
208
+ "name": "undyToken",
209
+ "type": "address"
210
+ },
211
+ {
212
+ "name": "ledger",
213
+ "type": "address"
214
+ },
215
+ {
216
+ "name": "missionControl",
217
+ "type": "address"
218
+ },
219
+ {
220
+ "name": "legoBook",
221
+ "type": "address"
222
+ },
223
+ {
224
+ "name": "switchboard",
225
+ "type": "address"
226
+ },
227
+ {
228
+ "name": "hatchery",
229
+ "type": "address"
230
+ },
231
+ {
232
+ "name": "lootDistributor",
233
+ "type": "address"
234
+ },
235
+ {
236
+ "name": "appraiser",
237
+ "type": "address"
238
+ },
239
+ {
240
+ "name": "walletBackpack",
241
+ "type": "address"
242
+ },
243
+ {
244
+ "name": "billing",
245
+ "type": "address"
246
+ },
247
+ {
248
+ "name": "vaultRegistry",
249
+ "type": "address"
250
+ }
251
+ ]
252
+ }
253
+ ]
254
+ },
255
+ {
256
+ "stateMutability": "view",
257
+ "type": "function",
258
+ "name": "getUndyHq",
259
+ "inputs": [],
260
+ "outputs": [
261
+ {
262
+ "name": "",
263
+ "type": "address"
264
+ }
265
+ ]
266
+ },
267
+ {
268
+ "stateMutability": "nonpayable",
269
+ "type": "function",
270
+ "name": "pause",
271
+ "inputs": [
272
+ {
273
+ "name": "_shouldPause",
274
+ "type": "bool"
275
+ }
276
+ ],
277
+ "outputs": []
278
+ },
279
+ {
280
+ "stateMutability": "nonpayable",
281
+ "type": "function",
282
+ "name": "recoverFunds",
283
+ "inputs": [
284
+ {
285
+ "name": "_recipient",
286
+ "type": "address"
287
+ },
288
+ {
289
+ "name": "_asset",
290
+ "type": "address"
291
+ }
292
+ ],
293
+ "outputs": []
294
+ },
295
+ {
296
+ "stateMutability": "nonpayable",
297
+ "type": "function",
298
+ "name": "recoverFundsMany",
299
+ "inputs": [
300
+ {
301
+ "name": "_recipient",
302
+ "type": "address"
303
+ },
304
+ {
305
+ "name": "_assets",
306
+ "type": "address[]"
307
+ }
308
+ ],
309
+ "outputs": []
310
+ },
311
+ {
312
+ "stateMutability": "view",
313
+ "type": "function",
314
+ "name": "legoId",
315
+ "inputs": [],
316
+ "outputs": [
317
+ {
318
+ "name": "",
319
+ "type": "uint256"
320
+ }
321
+ ]
322
+ },
323
+ {
324
+ "stateMutability": "view",
325
+ "type": "function",
326
+ "name": "isPaused",
327
+ "inputs": [],
328
+ "outputs": [
329
+ {
330
+ "name": "",
331
+ "type": "bool"
332
+ }
333
+ ]
334
+ },
335
+ {
336
+ "stateMutability": "view",
337
+ "type": "function",
338
+ "name": "hasCapability",
339
+ "inputs": [
340
+ {
341
+ "name": "_action",
342
+ "type": "uint256"
343
+ }
344
+ ],
345
+ "outputs": [
346
+ {
347
+ "name": "",
348
+ "type": "bool"
349
+ }
350
+ ]
351
+ },
352
+ {
353
+ "stateMutability": "view",
354
+ "type": "function",
355
+ "name": "getRegistries",
356
+ "inputs": [],
357
+ "outputs": [
358
+ {
359
+ "name": "",
360
+ "type": "address[]"
361
+ }
362
+ ]
363
+ },
364
+ {
365
+ "stateMutability": "view",
366
+ "type": "function",
367
+ "name": "isYieldLego",
368
+ "inputs": [],
369
+ "outputs": [
370
+ {
371
+ "name": "",
372
+ "type": "bool"
373
+ }
374
+ ]
375
+ },
376
+ {
377
+ "stateMutability": "view",
378
+ "type": "function",
379
+ "name": "isDexLego",
380
+ "inputs": [],
381
+ "outputs": [
382
+ {
383
+ "name": "",
384
+ "type": "bool"
385
+ }
386
+ ]
387
+ },
388
+ {
389
+ "stateMutability": "nonpayable",
390
+ "type": "function",
391
+ "name": "swapTokens",
392
+ "inputs": [
393
+ {
394
+ "name": "_amountIn",
395
+ "type": "uint256"
396
+ },
397
+ {
398
+ "name": "_minAmountOut",
399
+ "type": "uint256"
400
+ },
401
+ {
402
+ "name": "_tokenPath",
403
+ "type": "address[]"
404
+ },
405
+ {
406
+ "name": "_poolPath",
407
+ "type": "address[]"
408
+ },
409
+ {
410
+ "name": "_recipient",
411
+ "type": "address"
412
+ }
413
+ ],
414
+ "outputs": [
415
+ {
416
+ "name": "",
417
+ "type": "uint256"
418
+ },
419
+ {
420
+ "name": "",
421
+ "type": "uint256"
422
+ },
423
+ {
424
+ "name": "",
425
+ "type": "uint256"
426
+ }
427
+ ]
428
+ },
429
+ {
430
+ "stateMutability": "nonpayable",
431
+ "type": "function",
432
+ "name": "swapTokens",
433
+ "inputs": [
434
+ {
435
+ "name": "_amountIn",
436
+ "type": "uint256"
437
+ },
438
+ {
439
+ "name": "_minAmountOut",
440
+ "type": "uint256"
441
+ },
442
+ {
443
+ "name": "_tokenPath",
444
+ "type": "address[]"
445
+ },
446
+ {
447
+ "name": "_poolPath",
448
+ "type": "address[]"
449
+ },
450
+ {
451
+ "name": "_recipient",
452
+ "type": "address"
453
+ },
454
+ {
455
+ "name": "_miniAddys",
456
+ "type": "tuple",
457
+ "components": [
458
+ {
459
+ "name": "ledger",
460
+ "type": "address"
461
+ },
462
+ {
463
+ "name": "missionControl",
464
+ "type": "address"
465
+ },
466
+ {
467
+ "name": "legoBook",
468
+ "type": "address"
469
+ },
470
+ {
471
+ "name": "appraiser",
472
+ "type": "address"
473
+ }
474
+ ]
475
+ }
476
+ ],
477
+ "outputs": [
478
+ {
479
+ "name": "",
480
+ "type": "uint256"
481
+ },
482
+ {
483
+ "name": "",
484
+ "type": "uint256"
485
+ },
486
+ {
487
+ "name": "",
488
+ "type": "uint256"
489
+ }
490
+ ]
491
+ },
492
+ {
493
+ "stateMutability": "nonpayable",
494
+ "type": "function",
495
+ "name": "addLiquidity",
496
+ "inputs": [
497
+ {
498
+ "name": "_pool",
499
+ "type": "address"
500
+ },
501
+ {
502
+ "name": "_tokenA",
503
+ "type": "address"
504
+ },
505
+ {
506
+ "name": "_tokenB",
507
+ "type": "address"
508
+ },
509
+ {
510
+ "name": "_amountA",
511
+ "type": "uint256"
512
+ },
513
+ {
514
+ "name": "_amountB",
515
+ "type": "uint256"
516
+ },
517
+ {
518
+ "name": "_minAmountA",
519
+ "type": "uint256"
520
+ },
521
+ {
522
+ "name": "_minAmountB",
523
+ "type": "uint256"
524
+ },
525
+ {
526
+ "name": "_minLpAmount",
527
+ "type": "uint256"
528
+ },
529
+ {
530
+ "name": "_extraData",
531
+ "type": "bytes32"
532
+ },
533
+ {
534
+ "name": "_recipient",
535
+ "type": "address"
536
+ }
537
+ ],
538
+ "outputs": [
539
+ {
540
+ "name": "",
541
+ "type": "address"
542
+ },
543
+ {
544
+ "name": "",
545
+ "type": "uint256"
546
+ },
547
+ {
548
+ "name": "",
549
+ "type": "uint256"
550
+ },
551
+ {
552
+ "name": "",
553
+ "type": "uint256"
554
+ },
555
+ {
556
+ "name": "",
557
+ "type": "uint256"
558
+ }
559
+ ]
560
+ },
561
+ {
562
+ "stateMutability": "nonpayable",
563
+ "type": "function",
564
+ "name": "addLiquidity",
565
+ "inputs": [
566
+ {
567
+ "name": "_pool",
568
+ "type": "address"
569
+ },
570
+ {
571
+ "name": "_tokenA",
572
+ "type": "address"
573
+ },
574
+ {
575
+ "name": "_tokenB",
576
+ "type": "address"
577
+ },
578
+ {
579
+ "name": "_amountA",
580
+ "type": "uint256"
581
+ },
582
+ {
583
+ "name": "_amountB",
584
+ "type": "uint256"
585
+ },
586
+ {
587
+ "name": "_minAmountA",
588
+ "type": "uint256"
589
+ },
590
+ {
591
+ "name": "_minAmountB",
592
+ "type": "uint256"
593
+ },
594
+ {
595
+ "name": "_minLpAmount",
596
+ "type": "uint256"
597
+ },
598
+ {
599
+ "name": "_extraData",
600
+ "type": "bytes32"
601
+ },
602
+ {
603
+ "name": "_recipient",
604
+ "type": "address"
605
+ },
606
+ {
607
+ "name": "_miniAddys",
608
+ "type": "tuple",
609
+ "components": [
610
+ {
611
+ "name": "ledger",
612
+ "type": "address"
613
+ },
614
+ {
615
+ "name": "missionControl",
616
+ "type": "address"
617
+ },
618
+ {
619
+ "name": "legoBook",
620
+ "type": "address"
621
+ },
622
+ {
623
+ "name": "appraiser",
624
+ "type": "address"
625
+ }
626
+ ]
627
+ }
628
+ ],
629
+ "outputs": [
630
+ {
631
+ "name": "",
632
+ "type": "address"
633
+ },
634
+ {
635
+ "name": "",
636
+ "type": "uint256"
637
+ },
638
+ {
639
+ "name": "",
640
+ "type": "uint256"
641
+ },
642
+ {
643
+ "name": "",
644
+ "type": "uint256"
645
+ },
646
+ {
647
+ "name": "",
648
+ "type": "uint256"
649
+ }
650
+ ]
651
+ },
652
+ {
653
+ "stateMutability": "nonpayable",
654
+ "type": "function",
655
+ "name": "removeLiquidity",
656
+ "inputs": [
657
+ {
658
+ "name": "_pool",
659
+ "type": "address"
660
+ },
661
+ {
662
+ "name": "_tokenA",
663
+ "type": "address"
664
+ },
665
+ {
666
+ "name": "_tokenB",
667
+ "type": "address"
668
+ },
669
+ {
670
+ "name": "_lpToken",
671
+ "type": "address"
672
+ },
673
+ {
674
+ "name": "_lpAmount",
675
+ "type": "uint256"
676
+ },
677
+ {
678
+ "name": "_minAmountA",
679
+ "type": "uint256"
680
+ },
681
+ {
682
+ "name": "_minAmountB",
683
+ "type": "uint256"
684
+ },
685
+ {
686
+ "name": "_extraData",
687
+ "type": "bytes32"
688
+ },
689
+ {
690
+ "name": "_recipient",
691
+ "type": "address"
692
+ }
693
+ ],
694
+ "outputs": [
695
+ {
696
+ "name": "",
697
+ "type": "uint256"
698
+ },
699
+ {
700
+ "name": "",
701
+ "type": "uint256"
702
+ },
703
+ {
704
+ "name": "",
705
+ "type": "uint256"
706
+ },
707
+ {
708
+ "name": "",
709
+ "type": "uint256"
710
+ }
711
+ ]
712
+ },
713
+ {
714
+ "stateMutability": "nonpayable",
715
+ "type": "function",
716
+ "name": "removeLiquidity",
717
+ "inputs": [
718
+ {
719
+ "name": "_pool",
720
+ "type": "address"
721
+ },
722
+ {
723
+ "name": "_tokenA",
724
+ "type": "address"
725
+ },
726
+ {
727
+ "name": "_tokenB",
728
+ "type": "address"
729
+ },
730
+ {
731
+ "name": "_lpToken",
732
+ "type": "address"
733
+ },
734
+ {
735
+ "name": "_lpAmount",
736
+ "type": "uint256"
737
+ },
738
+ {
739
+ "name": "_minAmountA",
740
+ "type": "uint256"
741
+ },
742
+ {
743
+ "name": "_minAmountB",
744
+ "type": "uint256"
745
+ },
746
+ {
747
+ "name": "_extraData",
748
+ "type": "bytes32"
749
+ },
750
+ {
751
+ "name": "_recipient",
752
+ "type": "address"
753
+ },
754
+ {
755
+ "name": "_miniAddys",
756
+ "type": "tuple",
757
+ "components": [
758
+ {
759
+ "name": "ledger",
760
+ "type": "address"
761
+ },
762
+ {
763
+ "name": "missionControl",
764
+ "type": "address"
765
+ },
766
+ {
767
+ "name": "legoBook",
768
+ "type": "address"
769
+ },
770
+ {
771
+ "name": "appraiser",
772
+ "type": "address"
773
+ }
774
+ ]
775
+ }
776
+ ],
777
+ "outputs": [
778
+ {
779
+ "name": "",
780
+ "type": "uint256"
781
+ },
782
+ {
783
+ "name": "",
784
+ "type": "uint256"
785
+ },
786
+ {
787
+ "name": "",
788
+ "type": "uint256"
789
+ },
790
+ {
791
+ "name": "",
792
+ "type": "uint256"
793
+ }
794
+ ]
795
+ },
796
+ {
797
+ "stateMutability": "view",
798
+ "type": "function",
799
+ "name": "getLpToken",
800
+ "inputs": [
801
+ {
802
+ "name": "_pool",
803
+ "type": "address"
804
+ }
805
+ ],
806
+ "outputs": [
807
+ {
808
+ "name": "",
809
+ "type": "address"
810
+ }
811
+ ]
812
+ },
813
+ {
814
+ "stateMutability": "view",
815
+ "type": "function",
816
+ "name": "getPoolForLpToken",
817
+ "inputs": [
818
+ {
819
+ "name": "_lpToken",
820
+ "type": "address"
821
+ }
822
+ ],
823
+ "outputs": [
824
+ {
825
+ "name": "",
826
+ "type": "address"
827
+ }
828
+ ]
829
+ },
830
+ {
831
+ "stateMutability": "view",
832
+ "type": "function",
833
+ "name": "getCoreRouterPool",
834
+ "inputs": [],
835
+ "outputs": [
836
+ {
837
+ "name": "",
838
+ "type": "address"
839
+ }
840
+ ]
841
+ },
842
+ {
843
+ "stateMutability": "view",
844
+ "type": "function",
845
+ "name": "getDeepestLiqPool",
846
+ "inputs": [
847
+ {
848
+ "name": "_tokenA",
849
+ "type": "address"
850
+ },
851
+ {
852
+ "name": "_tokenB",
853
+ "type": "address"
854
+ }
855
+ ],
856
+ "outputs": [
857
+ {
858
+ "name": "",
859
+ "type": "tuple",
860
+ "components": [
861
+ {
862
+ "name": "pool",
863
+ "type": "address"
864
+ },
865
+ {
866
+ "name": "fee",
867
+ "type": "uint256"
868
+ },
869
+ {
870
+ "name": "liquidity",
871
+ "type": "uint256"
872
+ },
873
+ {
874
+ "name": "numCoins",
875
+ "type": "uint256"
876
+ }
877
+ ]
878
+ }
879
+ ]
880
+ },
881
+ {
882
+ "stateMutability": "view",
883
+ "type": "function",
884
+ "name": "getBestSwapAmountOut",
885
+ "inputs": [
886
+ {
887
+ "name": "_tokenIn",
888
+ "type": "address"
889
+ },
890
+ {
891
+ "name": "_tokenOut",
892
+ "type": "address"
893
+ },
894
+ {
895
+ "name": "_amountIn",
896
+ "type": "uint256"
897
+ }
898
+ ],
899
+ "outputs": [
900
+ {
901
+ "name": "",
902
+ "type": "address"
903
+ },
904
+ {
905
+ "name": "",
906
+ "type": "uint256"
907
+ }
908
+ ]
909
+ },
910
+ {
911
+ "stateMutability": "view",
912
+ "type": "function",
913
+ "name": "getSwapAmountOut",
914
+ "inputs": [
915
+ {
916
+ "name": "_pool",
917
+ "type": "address"
918
+ },
919
+ {
920
+ "name": "_tokenIn",
921
+ "type": "address"
922
+ },
923
+ {
924
+ "name": "_tokenOut",
925
+ "type": "address"
926
+ },
927
+ {
928
+ "name": "_amountIn",
929
+ "type": "uint256"
930
+ }
931
+ ],
932
+ "outputs": [
933
+ {
934
+ "name": "",
935
+ "type": "uint256"
936
+ }
937
+ ]
938
+ },
939
+ {
940
+ "stateMutability": "view",
941
+ "type": "function",
942
+ "name": "getBestSwapAmountIn",
943
+ "inputs": [
944
+ {
945
+ "name": "_tokenIn",
946
+ "type": "address"
947
+ },
948
+ {
949
+ "name": "_tokenOut",
950
+ "type": "address"
951
+ },
952
+ {
953
+ "name": "_amountOut",
954
+ "type": "uint256"
955
+ }
956
+ ],
957
+ "outputs": [
958
+ {
959
+ "name": "",
960
+ "type": "address"
961
+ },
962
+ {
963
+ "name": "",
964
+ "type": "uint256"
965
+ }
966
+ ]
967
+ },
968
+ {
969
+ "stateMutability": "view",
970
+ "type": "function",
971
+ "name": "getSwapAmountIn",
972
+ "inputs": [
973
+ {
974
+ "name": "_pool",
975
+ "type": "address"
976
+ },
977
+ {
978
+ "name": "_tokenIn",
979
+ "type": "address"
980
+ },
981
+ {
982
+ "name": "_tokenOut",
983
+ "type": "address"
984
+ },
985
+ {
986
+ "name": "_amountOut",
987
+ "type": "uint256"
988
+ }
989
+ ],
990
+ "outputs": [
991
+ {
992
+ "name": "",
993
+ "type": "uint256"
994
+ }
995
+ ]
996
+ },
997
+ {
998
+ "stateMutability": "view",
999
+ "type": "function",
1000
+ "name": "getAddLiqAmountsIn",
1001
+ "inputs": [
1002
+ {
1003
+ "name": "_pool",
1004
+ "type": "address"
1005
+ },
1006
+ {
1007
+ "name": "_tokenA",
1008
+ "type": "address"
1009
+ },
1010
+ {
1011
+ "name": "_tokenB",
1012
+ "type": "address"
1013
+ },
1014
+ {
1015
+ "name": "_availAmountA",
1016
+ "type": "uint256"
1017
+ },
1018
+ {
1019
+ "name": "_availAmountB",
1020
+ "type": "uint256"
1021
+ }
1022
+ ],
1023
+ "outputs": [
1024
+ {
1025
+ "name": "",
1026
+ "type": "uint256"
1027
+ },
1028
+ {
1029
+ "name": "",
1030
+ "type": "uint256"
1031
+ },
1032
+ {
1033
+ "name": "",
1034
+ "type": "uint256"
1035
+ }
1036
+ ]
1037
+ },
1038
+ {
1039
+ "stateMutability": "view",
1040
+ "type": "function",
1041
+ "name": "getRemoveLiqAmountsOut",
1042
+ "inputs": [
1043
+ {
1044
+ "name": "_pool",
1045
+ "type": "address"
1046
+ },
1047
+ {
1048
+ "name": "_tokenA",
1049
+ "type": "address"
1050
+ },
1051
+ {
1052
+ "name": "_tokenB",
1053
+ "type": "address"
1054
+ },
1055
+ {
1056
+ "name": "_lpAmount",
1057
+ "type": "uint256"
1058
+ }
1059
+ ],
1060
+ "outputs": [
1061
+ {
1062
+ "name": "",
1063
+ "type": "uint256"
1064
+ },
1065
+ {
1066
+ "name": "",
1067
+ "type": "uint256"
1068
+ }
1069
+ ]
1070
+ },
1071
+ {
1072
+ "stateMutability": "view",
1073
+ "type": "function",
1074
+ "name": "getPrice",
1075
+ "inputs": [
1076
+ {
1077
+ "name": "_asset",
1078
+ "type": "address"
1079
+ },
1080
+ {
1081
+ "name": "_decimals",
1082
+ "type": "uint256"
1083
+ }
1084
+ ],
1085
+ "outputs": [
1086
+ {
1087
+ "name": "",
1088
+ "type": "uint256"
1089
+ }
1090
+ ]
1091
+ },
1092
+ {
1093
+ "stateMutability": "view",
1094
+ "type": "function",
1095
+ "name": "getPriceUnsafe",
1096
+ "inputs": [
1097
+ {
1098
+ "name": "_pool",
1099
+ "type": "address"
1100
+ },
1101
+ {
1102
+ "name": "_targetToken",
1103
+ "type": "address"
1104
+ }
1105
+ ],
1106
+ "outputs": [
1107
+ {
1108
+ "name": "",
1109
+ "type": "uint256"
1110
+ }
1111
+ ]
1112
+ },
1113
+ {
1114
+ "stateMutability": "view",
1115
+ "type": "function",
1116
+ "name": "getPriceUnsafe",
1117
+ "inputs": [
1118
+ {
1119
+ "name": "_pool",
1120
+ "type": "address"
1121
+ },
1122
+ {
1123
+ "name": "_targetToken",
1124
+ "type": "address"
1125
+ },
1126
+ {
1127
+ "name": "_oracleRegistry",
1128
+ "type": "address"
1129
+ }
1130
+ ],
1131
+ "outputs": [
1132
+ {
1133
+ "name": "",
1134
+ "type": "uint256"
1135
+ }
1136
+ ]
1137
+ },
1138
+ {
1139
+ "stateMutability": "view",
1140
+ "type": "function",
1141
+ "name": "getAccessForLego",
1142
+ "inputs": [
1143
+ {
1144
+ "name": "_user",
1145
+ "type": "address"
1146
+ },
1147
+ {
1148
+ "name": "_action",
1149
+ "type": "uint256"
1150
+ }
1151
+ ],
1152
+ "outputs": [
1153
+ {
1154
+ "name": "",
1155
+ "type": "address"
1156
+ },
1157
+ {
1158
+ "name": "",
1159
+ "type": "string"
1160
+ },
1161
+ {
1162
+ "name": "",
1163
+ "type": "uint256"
1164
+ }
1165
+ ]
1166
+ },
1167
+ {
1168
+ "stateMutability": "view",
1169
+ "type": "function",
1170
+ "name": "CURVE_META_REGISTRY",
1171
+ "inputs": [],
1172
+ "outputs": [
1173
+ {
1174
+ "name": "",
1175
+ "type": "address"
1176
+ }
1177
+ ]
1178
+ },
1179
+ {
1180
+ "stateMutability": "view",
1181
+ "type": "function",
1182
+ "name": "CURVE_REGISTRIES",
1183
+ "inputs": [],
1184
+ "outputs": [
1185
+ {
1186
+ "name": "",
1187
+ "type": "tuple",
1188
+ "components": [
1189
+ {
1190
+ "name": "StableSwapNg",
1191
+ "type": "address"
1192
+ },
1193
+ {
1194
+ "name": "TwoCryptoNg",
1195
+ "type": "address"
1196
+ },
1197
+ {
1198
+ "name": "TricryptoNg",
1199
+ "type": "address"
1200
+ },
1201
+ {
1202
+ "name": "TwoCrypto",
1203
+ "type": "address"
1204
+ },
1205
+ {
1206
+ "name": "MetaPool",
1207
+ "type": "address"
1208
+ },
1209
+ {
1210
+ "name": "RateProvider",
1211
+ "type": "address"
1212
+ }
1213
+ ]
1214
+ }
1215
+ ]
1216
+ },
1217
+ {
1218
+ "stateMutability": "view",
1219
+ "type": "function",
1220
+ "name": "RIPE_REGISTRY",
1221
+ "inputs": [],
1222
+ "outputs": [
1223
+ {
1224
+ "name": "",
1225
+ "type": "address"
1226
+ }
1227
+ ]
1228
+ },
1229
+ {
1230
+ "stateMutability": "nonpayable",
1231
+ "type": "constructor",
1232
+ "inputs": [
1233
+ {
1234
+ "name": "_undyHq",
1235
+ "type": "address"
1236
+ },
1237
+ {
1238
+ "name": "_curveAddressProvider",
1239
+ "type": "address"
1240
+ },
1241
+ {
1242
+ "name": "_ripeRegistry",
1243
+ "type": "address"
1244
+ }
1245
+ ],
1246
+ "outputs": []
1247
+ }
1248
+ ];
1249
+ export const deployAddress = '0x7192867D67329800345750f5A281Ce1352C3dF65';
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
+ CURVE_META_REGISTRY: (...args) => getRequest('CURVE_META_REGISTRY', args),
1300
+ CURVE_REGISTRIES: (...args) => getRequest('CURVE_REGISTRIES', args),
1301
+ RIPE_REGISTRY: (...args) => getRequest('RIPE_REGISTRY', 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 parseEvents(eventName, events) {
1321
+ return events.map((event) => {
1322
+ return {
1323
+ event,
1324
+ parsed: parseEventLogs({
1325
+ abi,
1326
+ eventName,
1327
+ logs: [event],
1328
+ }),
1329
+ };
1330
+ });
1331
+ }
1332
+ export function getEventTopic(eventName) {
1333
+ return encodeEventTopics({ abi, eventName })[0];
1334
+ }
1335
+ export function toSdk(publicClient, walletClient, addressResolver) {
1336
+ return {
1337
+ deployAddress,
1338
+ abi,
1339
+ events: {
1340
+ CurveSwap: { topic: getEventTopic('CurveSwap'), parse: (events) => parseEvents('CurveSwap', events) },
1341
+ CurveLiquidityAdded: { topic: getEventTopic('CurveLiquidityAdded'), parse: (events) => parseEvents('CurveLiquidityAdded', events) },
1342
+ CurveLiquidityRemoved: { topic: getEventTopic('CurveLiquidityRemoved'), parse: (events) => parseEvents('CurveLiquidityRemoved', events) },
1343
+ LegoPauseModified: { topic: getEventTopic('LegoPauseModified'), parse: (events) => parseEvents('LegoPauseModified', events) },
1344
+ LegoFundsRecovered: { topic: getEventTopic('LegoFundsRecovered'), parse: (events) => parseEvents('LegoFundsRecovered', events) },
1345
+ },
1346
+ // Queries
1347
+ getAddys: (...args) => singleQuery(publicClient, call.getAddys(...args), {}, addressResolver),
1348
+ getUndyHq: (...args) => singleQuery(publicClient, call.getUndyHq(...args), {}, addressResolver),
1349
+ legoId: (...args) => singleQuery(publicClient, call.legoId(...args), {}, addressResolver),
1350
+ isPaused: (...args) => singleQuery(publicClient, call.isPaused(...args), {}, addressResolver),
1351
+ hasCapability: (...args) => singleQuery(publicClient, call.hasCapability(...args), {}, addressResolver),
1352
+ getRegistries: (...args) => singleQuery(publicClient, call.getRegistries(...args), {}, addressResolver),
1353
+ isYieldLego: (...args) => singleQuery(publicClient, call.isYieldLego(...args), {}, addressResolver),
1354
+ isDexLego: (...args) => singleQuery(publicClient, call.isDexLego(...args), {}, addressResolver),
1355
+ getLpToken: (...args) => singleQuery(publicClient, call.getLpToken(...args), {}, addressResolver),
1356
+ getPoolForLpToken: (...args) => singleQuery(publicClient, call.getPoolForLpToken(...args), {}, addressResolver),
1357
+ getCoreRouterPool: (...args) => singleQuery(publicClient, call.getCoreRouterPool(...args), {}, addressResolver),
1358
+ getDeepestLiqPool: (...args) => singleQuery(publicClient, call.getDeepestLiqPool(...args), {}, addressResolver),
1359
+ getBestSwapAmountOut: (...args) => singleQuery(publicClient, call.getBestSwapAmountOut(...args), {}, addressResolver),
1360
+ getSwapAmountOut: (...args) => singleQuery(publicClient, call.getSwapAmountOut(...args), {}, addressResolver),
1361
+ getBestSwapAmountIn: (...args) => singleQuery(publicClient, call.getBestSwapAmountIn(...args), {}, addressResolver),
1362
+ getSwapAmountIn: (...args) => singleQuery(publicClient, call.getSwapAmountIn(...args), {}, addressResolver),
1363
+ getAddLiqAmountsIn: (...args) => singleQuery(publicClient, call.getAddLiqAmountsIn(...args), {}, addressResolver),
1364
+ getRemoveLiqAmountsOut: (...args) => singleQuery(publicClient, call.getRemoveLiqAmountsOut(...args), {}, addressResolver),
1365
+ getPrice: (...args) => singleQuery(publicClient, call.getPrice(...args), {}, addressResolver),
1366
+ getPriceUnsafe: (...args) => singleQuery(publicClient, call.getPriceUnsafe(...args), {}, addressResolver),
1367
+ getAccessForLego: (...args) => singleQuery(publicClient, call.getAccessForLego(...args), {}, addressResolver),
1368
+ CURVE_META_REGISTRY: (...args) => singleQuery(publicClient, call.CURVE_META_REGISTRY(...args), {}, addressResolver),
1369
+ CURVE_REGISTRIES: (...args) => singleQuery(publicClient, call.CURVE_REGISTRIES(...args), {}, addressResolver),
1370
+ RIPE_REGISTRY: (...args) => singleQuery(publicClient, call.RIPE_REGISTRY(...args), {}, addressResolver),
1371
+ // Mutations
1372
+ pause: (...args) => mutate(walletClient, mutation.pause, { addressResolver })(...args),
1373
+ recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds, { addressResolver })(...args),
1374
+ recoverFundsMany: (...args) => mutate(walletClient, mutation.recoverFundsMany, { addressResolver })(...args),
1375
+ swapTokens: (...args) => mutate(walletClient, mutation.swapTokens, { addressResolver })(...args),
1376
+ addLiquidity: (...args) => mutate(walletClient, mutation.addLiquidity, { addressResolver })(...args),
1377
+ removeLiquidity: (...args) => mutate(walletClient, mutation.removeLiquidity, { addressResolver })(...args),
1378
+ };
1379
+ }