@underscore-finance/sdk 1.2.20-next.0 → 1.2.20-next.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 (254) hide show
  1. package/.claude/settings.local.json +31 -0
  2. package/.eslintrc.json +27 -0
  3. package/.prettierrc +9 -0
  4. package/.tool-versions +1 -0
  5. package/LICENSE +41 -0
  6. package/LICENSE_DATE.md +34 -0
  7. package/LICENSE_GRANTS.md +33 -0
  8. package/LICENSE_INFO.md +90 -0
  9. package/README.md +116 -17
  10. package/dapp.config.js +154 -0
  11. package/package.json +17 -44
  12. package/src/getSwapInstructions.ts +55 -0
  13. package/src/index.ts +192 -0
  14. package/tsconfig.json +18 -0
  15. package/AGENTS.md +0 -162
  16. package/abis.json +0 -181875
  17. package/addresses.json +0 -76
  18. package/dist/contracts/AaveV3.d.ts +0 -2594
  19. package/dist/contracts/AaveV3.d.ts.map +0 -1
  20. package/dist/contracts/AaveV3.js +0 -3272
  21. package/dist/contracts/AeroClassic.d.ts +0 -2118
  22. package/dist/contracts/AeroClassic.d.ts.map +0 -1
  23. package/dist/contracts/AeroClassic.js +0 -2679
  24. package/dist/contracts/AeroSlipstream.d.ts +0 -2256
  25. package/dist/contracts/AeroSlipstream.d.ts.map +0 -1
  26. package/dist/contracts/AeroSlipstream.js +0 -2848
  27. package/dist/contracts/AgentSenderGeneric.d.ts +0 -4129
  28. package/dist/contracts/AgentSenderGeneric.d.ts.map +0 -1
  29. package/dist/contracts/AgentSenderGeneric.js +0 -5397
  30. package/dist/contracts/AgentSenderSpecial.d.ts +0 -1997
  31. package/dist/contracts/AgentSenderSpecial.d.ts.map +0 -1
  32. package/dist/contracts/AgentSenderSpecial.js +0 -2532
  33. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts +0 -2245
  34. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts.map +0 -1
  35. package/dist/contracts/AgentSenderSpecialSigHelper.js +0 -2971
  36. package/dist/contracts/AgentWrapper.d.ts +0 -2520
  37. package/dist/contracts/AgentWrapper.d.ts.map +0 -1
  38. package/dist/contracts/AgentWrapper.js +0 -3389
  39. package/dist/contracts/AgentWrapperV1.d.ts +0 -3789
  40. package/dist/contracts/AgentWrapperV1.d.ts.map +0 -1
  41. package/dist/contracts/AgentWrapperV1.js +0 -4945
  42. package/dist/contracts/AgentWrapperV2.d.ts +0 -2494
  43. package/dist/contracts/AgentWrapperV2.d.ts.map +0 -1
  44. package/dist/contracts/AgentWrapperV2.js +0 -3354
  45. package/dist/contracts/Appraiser.d.ts +0 -577
  46. package/dist/contracts/Appraiser.d.ts.map +0 -1
  47. package/dist/contracts/Appraiser.js +0 -735
  48. package/dist/contracts/Avantis.d.ts +0 -2606
  49. package/dist/contracts/Avantis.d.ts.map +0 -1
  50. package/dist/contracts/Avantis.js +0 -3282
  51. package/dist/contracts/Billing.d.ts +0 -381
  52. package/dist/contracts/Billing.d.ts.map +0 -1
  53. package/dist/contracts/Billing.js +0 -451
  54. package/dist/contracts/ChequeBook.d.ts +0 -1704
  55. package/dist/contracts/ChequeBook.d.ts.map +0 -1
  56. package/dist/contracts/ChequeBook.js +0 -1922
  57. package/dist/contracts/CompoundV3.d.ts +0 -2622
  58. package/dist/contracts/CompoundV3.d.ts.map +0 -1
  59. package/dist/contracts/CompoundV3.js +0 -3304
  60. package/dist/contracts/ConvertVaultToken.d.ts +0 -64
  61. package/dist/contracts/ConvertVaultToken.d.ts.map +0 -1
  62. package/dist/contracts/ConvertVaultToken.js +0 -75
  63. package/dist/contracts/Curve.d.ts +0 -1107
  64. package/dist/contracts/Curve.d.ts.map +0 -1
  65. package/dist/contracts/Curve.js +0 -1379
  66. package/dist/contracts/DefaultsBase.d.ts +0 -306
  67. package/dist/contracts/DefaultsBase.d.ts.map +0 -1
  68. package/dist/contracts/DefaultsBase.js +0 -331
  69. package/dist/contracts/ERC20.d.ts +0 -288
  70. package/dist/contracts/ERC20.d.ts.map +0 -1
  71. package/dist/contracts/ERC20.js +0 -359
  72. package/dist/contracts/EarnVault.d.ts +0 -1733
  73. package/dist/contracts/EarnVault.d.ts.map +0 -1
  74. package/dist/contracts/EarnVault.js +0 -2235
  75. package/dist/contracts/EarnVaultAgent.d.ts +0 -1033
  76. package/dist/contracts/EarnVaultAgent.d.ts.map +0 -1
  77. package/dist/contracts/EarnVaultAgent.js +0 -1296
  78. package/dist/contracts/EarnVaultAgentSigHelper.d.ts +0 -905
  79. package/dist/contracts/EarnVaultAgentSigHelper.d.ts.map +0 -1
  80. package/dist/contracts/EarnVaultAgentSigHelper.js +0 -1198
  81. package/dist/contracts/Euler.d.ts +0 -2662
  82. package/dist/contracts/Euler.d.ts.map +0 -1
  83. package/dist/contracts/Euler.js +0 -3350
  84. package/dist/contracts/ExtraFi.d.ts +0 -2637
  85. package/dist/contracts/ExtraFi.d.ts.map +0 -1
  86. package/dist/contracts/ExtraFi.js +0 -3323
  87. package/dist/contracts/Fluid.d.ts +0 -2634
  88. package/dist/contracts/Fluid.d.ts.map +0 -1
  89. package/dist/contracts/Fluid.js +0 -3318
  90. package/dist/contracts/FortyAcres.d.ts +0 -2620
  91. package/dist/contracts/FortyAcres.d.ts.map +0 -1
  92. package/dist/contracts/FortyAcres.js +0 -3300
  93. package/dist/contracts/Hatchery.d.ts +0 -392
  94. package/dist/contracts/Hatchery.d.ts.map +0 -1
  95. package/dist/contracts/Hatchery.js +0 -472
  96. package/dist/contracts/Helpers.d.ts +0 -1463
  97. package/dist/contracts/Helpers.d.ts.map +0 -1
  98. package/dist/contracts/Helpers.js +0 -1763
  99. package/dist/contracts/HighCommand.d.ts +0 -2129
  100. package/dist/contracts/HighCommand.d.ts.map +0 -1
  101. package/dist/contracts/HighCommand.js +0 -2429
  102. package/dist/contracts/Kernel.d.ts +0 -387
  103. package/dist/contracts/Kernel.d.ts.map +0 -1
  104. package/dist/contracts/Kernel.js +0 -442
  105. package/dist/contracts/Ledger.d.ts +0 -708
  106. package/dist/contracts/Ledger.d.ts.map +0 -1
  107. package/dist/contracts/Ledger.js +0 -854
  108. package/dist/contracts/LegoBook.d.ts +0 -1463
  109. package/dist/contracts/LegoBook.d.ts.map +0 -1
  110. package/dist/contracts/LegoBook.js +0 -1763
  111. package/dist/contracts/LegoTools.d.ts +0 -1913
  112. package/dist/contracts/LegoTools.d.ts.map +0 -1
  113. package/dist/contracts/LegoTools.js +0 -2402
  114. package/dist/contracts/LevgVault.d.ts +0 -2115
  115. package/dist/contracts/LevgVault.d.ts.map +0 -1
  116. package/dist/contracts/LevgVault.js +0 -2733
  117. package/dist/contracts/LevgVaultAgent.d.ts +0 -1955
  118. package/dist/contracts/LevgVaultAgent.d.ts.map +0 -1
  119. package/dist/contracts/LevgVaultAgent.js +0 -2508
  120. package/dist/contracts/LevgVaultAgentSigHelper.d.ts +0 -2221
  121. package/dist/contracts/LevgVaultAgentSigHelper.d.ts.map +0 -1
  122. package/dist/contracts/LevgVaultAgentSigHelper.js +0 -2963
  123. package/dist/contracts/LevgVaultHelper.d.ts +0 -977
  124. package/dist/contracts/LevgVaultHelper.d.ts.map +0 -1
  125. package/dist/contracts/LevgVaultHelper.js +0 -1289
  126. package/dist/contracts/LevgVaultTools.d.ts +0 -2629
  127. package/dist/contracts/LevgVaultTools.d.ts.map +0 -1
  128. package/dist/contracts/LevgVaultTools.js +0 -3560
  129. package/dist/contracts/LootDistributor.d.ts +0 -1053
  130. package/dist/contracts/LootDistributor.d.ts.map +0 -1
  131. package/dist/contracts/LootDistributor.js +0 -1291
  132. package/dist/contracts/Migrator.d.ts +0 -289
  133. package/dist/contracts/Migrator.d.ts.map +0 -1
  134. package/dist/contracts/Migrator.js +0 -348
  135. package/dist/contracts/MissionControl.d.ts +0 -1405
  136. package/dist/contracts/MissionControl.d.ts.map +0 -1
  137. package/dist/contracts/MissionControl.js +0 -1592
  138. package/dist/contracts/Moonwell.d.ts +0 -2623
  139. package/dist/contracts/Moonwell.d.ts.map +0 -1
  140. package/dist/contracts/Moonwell.js +0 -3304
  141. package/dist/contracts/Morpho.d.ts +0 -2662
  142. package/dist/contracts/Morpho.d.ts.map +0 -1
  143. package/dist/contracts/Morpho.js +0 -3350
  144. package/dist/contracts/Paymaster.d.ts +0 -1714
  145. package/dist/contracts/Paymaster.d.ts.map +0 -1
  146. package/dist/contracts/Paymaster.js +0 -2098
  147. package/dist/contracts/RipeLego.d.ts +0 -2913
  148. package/dist/contracts/RipeLego.d.ts.map +0 -1
  149. package/dist/contracts/RipeLego.js +0 -3643
  150. package/dist/contracts/Sentinel.d.ts +0 -2064
  151. package/dist/contracts/Sentinel.d.ts.map +0 -1
  152. package/dist/contracts/Sentinel.js +0 -2476
  153. package/dist/contracts/SignatureHelper.d.ts +0 -4250
  154. package/dist/contracts/SignatureHelper.d.ts.map +0 -1
  155. package/dist/contracts/SignatureHelper.js +0 -5714
  156. package/dist/contracts/SignatureHelperV1.d.ts +0 -4250
  157. package/dist/contracts/SignatureHelperV1.d.ts.map +0 -1
  158. package/dist/contracts/SignatureHelperV1.js +0 -5714
  159. package/dist/contracts/SkyPsm.d.ts +0 -2667
  160. package/dist/contracts/SkyPsm.d.ts.map +0 -1
  161. package/dist/contracts/SkyPsm.js +0 -3356
  162. package/dist/contracts/Switchboard.d.ts +0 -1483
  163. package/dist/contracts/Switchboard.d.ts.map +0 -1
  164. package/dist/contracts/Switchboard.js +0 -1790
  165. package/dist/contracts/SwitchboardAlpha.d.ts +0 -3161
  166. package/dist/contracts/SwitchboardAlpha.d.ts.map +0 -1
  167. package/dist/contracts/SwitchboardAlpha.js +0 -3771
  168. package/dist/contracts/SwitchboardBravo.d.ts +0 -1591
  169. package/dist/contracts/SwitchboardBravo.d.ts.map +0 -1
  170. package/dist/contracts/SwitchboardBravo.js +0 -1872
  171. package/dist/contracts/SwitchboardCharlie.d.ts +0 -3172
  172. package/dist/contracts/SwitchboardCharlie.d.ts.map +0 -1
  173. package/dist/contracts/SwitchboardCharlie.js +0 -3713
  174. package/dist/contracts/UnderscoreLego.d.ts +0 -2592
  175. package/dist/contracts/UnderscoreLego.d.ts.map +0 -1
  176. package/dist/contracts/UnderscoreLego.js +0 -3264
  177. package/dist/contracts/UndyAero.d.ts +0 -1733
  178. package/dist/contracts/UndyAero.d.ts.map +0 -1
  179. package/dist/contracts/UndyAero.js +0 -2235
  180. package/dist/contracts/UndyBtc.d.ts +0 -1733
  181. package/dist/contracts/UndyBtc.d.ts.map +0 -1
  182. package/dist/contracts/UndyBtc.js +0 -2235
  183. package/dist/contracts/UndyCbeth.d.ts +0 -1733
  184. package/dist/contracts/UndyCbeth.d.ts.map +0 -1
  185. package/dist/contracts/UndyCbeth.js +0 -2235
  186. package/dist/contracts/UndyEth.d.ts +0 -1733
  187. package/dist/contracts/UndyEth.d.ts.map +0 -1
  188. package/dist/contracts/UndyEth.js +0 -2235
  189. package/dist/contracts/UndyEurc.d.ts +0 -1733
  190. package/dist/contracts/UndyEurc.d.ts.map +0 -1
  191. package/dist/contracts/UndyEurc.js +0 -2235
  192. package/dist/contracts/UndyGho.d.ts +0 -1733
  193. package/dist/contracts/UndyGho.d.ts.map +0 -1
  194. package/dist/contracts/UndyGho.js +0 -2235
  195. package/dist/contracts/UndyHq.d.ts +0 -1677
  196. package/dist/contracts/UndyHq.d.ts.map +0 -1
  197. package/dist/contracts/UndyHq.js +0 -2026
  198. package/dist/contracts/UndyRewardsLego.d.ts +0 -1572
  199. package/dist/contracts/UndyRewardsLego.d.ts.map +0 -1
  200. package/dist/contracts/UndyRewardsLego.js +0 -1994
  201. package/dist/contracts/UndyUsd.d.ts +0 -1733
  202. package/dist/contracts/UndyUsd.d.ts.map +0 -1
  203. package/dist/contracts/UndyUsd.js +0 -2235
  204. package/dist/contracts/UndyUsdV2.d.ts +0 -1762
  205. package/dist/contracts/UndyUsdV2.d.ts.map +0 -1
  206. package/dist/contracts/UndyUsdV2.js +0 -2267
  207. package/dist/contracts/UndyUsds.d.ts +0 -1733
  208. package/dist/contracts/UndyUsds.d.ts.map +0 -1
  209. package/dist/contracts/UndyUsds.js +0 -2235
  210. package/dist/contracts/UndyVirtual.d.ts +0 -1762
  211. package/dist/contracts/UndyVirtual.d.ts.map +0 -1
  212. package/dist/contracts/UndyVirtual.js +0 -2267
  213. package/dist/contracts/UniswapV2.d.ts +0 -2118
  214. package/dist/contracts/UniswapV2.d.ts.map +0 -1
  215. package/dist/contracts/UniswapV2.js +0 -2679
  216. package/dist/contracts/UniswapV3.d.ts +0 -2256
  217. package/dist/contracts/UniswapV3.d.ts.map +0 -1
  218. package/dist/contracts/UniswapV3.js +0 -2848
  219. package/dist/contracts/UserWallet.d.ts +0 -2650
  220. package/dist/contracts/UserWallet.d.ts.map +0 -1
  221. package/dist/contracts/UserWallet.js +0 -3520
  222. package/dist/contracts/UserWalletConfig.d.ts +0 -3901
  223. package/dist/contracts/UserWalletConfig.d.ts.map +0 -1
  224. package/dist/contracts/UserWalletConfig.js +0 -4507
  225. package/dist/contracts/UserWalletConfigV1.d.ts +0 -3692
  226. package/dist/contracts/UserWalletConfigV1.d.ts.map +0 -1
  227. package/dist/contracts/UserWalletConfigV1.js +0 -4276
  228. package/dist/contracts/UserWalletSignatureHelper.d.ts +0 -4552
  229. package/dist/contracts/UserWalletSignatureHelper.d.ts.map +0 -1
  230. package/dist/contracts/UserWalletSignatureHelper.js +0 -6123
  231. package/dist/contracts/UserWalletV1.d.ts +0 -2650
  232. package/dist/contracts/UserWalletV1.d.ts.map +0 -1
  233. package/dist/contracts/UserWalletV1.js +0 -3520
  234. package/dist/contracts/VaultRegistry.d.ts +0 -3162
  235. package/dist/contracts/VaultRegistry.d.ts.map +0 -1
  236. package/dist/contracts/VaultRegistry.js +0 -3893
  237. package/dist/contracts/WalletBackpack.d.ts +0 -1248
  238. package/dist/contracts/WalletBackpack.d.ts.map +0 -1
  239. package/dist/contracts/WalletBackpack.js +0 -1519
  240. package/dist/contracts/Wasabi.d.ts +0 -2620
  241. package/dist/contracts/Wasabi.d.ts.map +0 -1
  242. package/dist/contracts/Wasabi.js +0 -3300
  243. package/dist/contracts/index.d.ts +0 -76
  244. package/dist/contracts/index.d.ts.map +0 -1
  245. package/dist/contracts/index.js +0 -79
  246. package/dist/contracts/sdk.d.ts +0 -156
  247. package/dist/contracts/sdk.d.ts.map +0 -1
  248. package/dist/contracts/sdk.js +0 -158
  249. package/dist/getSwapInstructions.d.ts +0 -34
  250. package/dist/getSwapInstructions.d.ts.map +0 -1
  251. package/dist/getSwapInstructions.js +0 -21
  252. package/dist/index.d.ts +0 -135
  253. package/dist/index.d.ts.map +0 -1
  254. package/dist/index.js +0 -137
@@ -1,2679 +0,0 @@
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": "UniswapV2Swap",
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": "UniswapV2LiquidityAdded",
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": "UniswapV2LiquidityRemoved",
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": "_appraiser",
1128
- "type": "address"
1129
- }
1130
- ],
1131
- "outputs": [
1132
- {
1133
- "name": "",
1134
- "type": "uint256"
1135
- }
1136
- ]
1137
- },
1138
- {
1139
- "stateMutability": "nonpayable",
1140
- "type": "function",
1141
- "name": "depositForYield",
1142
- "inputs": [
1143
- {
1144
- "name": "_asset",
1145
- "type": "address"
1146
- },
1147
- {
1148
- "name": "_amount",
1149
- "type": "uint256"
1150
- },
1151
- {
1152
- "name": "_vaultAddr",
1153
- "type": "address"
1154
- },
1155
- {
1156
- "name": "_extraData",
1157
- "type": "bytes32"
1158
- },
1159
- {
1160
- "name": "_recipient",
1161
- "type": "address"
1162
- }
1163
- ],
1164
- "outputs": [
1165
- {
1166
- "name": "",
1167
- "type": "uint256"
1168
- },
1169
- {
1170
- "name": "",
1171
- "type": "address"
1172
- },
1173
- {
1174
- "name": "",
1175
- "type": "uint256"
1176
- },
1177
- {
1178
- "name": "",
1179
- "type": "uint256"
1180
- }
1181
- ]
1182
- },
1183
- {
1184
- "stateMutability": "nonpayable",
1185
- "type": "function",
1186
- "name": "depositForYield",
1187
- "inputs": [
1188
- {
1189
- "name": "_asset",
1190
- "type": "address"
1191
- },
1192
- {
1193
- "name": "_amount",
1194
- "type": "uint256"
1195
- },
1196
- {
1197
- "name": "_vaultAddr",
1198
- "type": "address"
1199
- },
1200
- {
1201
- "name": "_extraData",
1202
- "type": "bytes32"
1203
- },
1204
- {
1205
- "name": "_recipient",
1206
- "type": "address"
1207
- },
1208
- {
1209
- "name": "_miniAddys",
1210
- "type": "tuple",
1211
- "components": [
1212
- {
1213
- "name": "ledger",
1214
- "type": "address"
1215
- },
1216
- {
1217
- "name": "missionControl",
1218
- "type": "address"
1219
- },
1220
- {
1221
- "name": "legoBook",
1222
- "type": "address"
1223
- },
1224
- {
1225
- "name": "appraiser",
1226
- "type": "address"
1227
- }
1228
- ]
1229
- }
1230
- ],
1231
- "outputs": [
1232
- {
1233
- "name": "",
1234
- "type": "uint256"
1235
- },
1236
- {
1237
- "name": "",
1238
- "type": "address"
1239
- },
1240
- {
1241
- "name": "",
1242
- "type": "uint256"
1243
- },
1244
- {
1245
- "name": "",
1246
- "type": "uint256"
1247
- }
1248
- ]
1249
- },
1250
- {
1251
- "stateMutability": "nonpayable",
1252
- "type": "function",
1253
- "name": "withdrawFromYield",
1254
- "inputs": [
1255
- {
1256
- "name": "_vaultToken",
1257
- "type": "address"
1258
- },
1259
- {
1260
- "name": "_amount",
1261
- "type": "uint256"
1262
- },
1263
- {
1264
- "name": "_extraData",
1265
- "type": "bytes32"
1266
- },
1267
- {
1268
- "name": "_recipient",
1269
- "type": "address"
1270
- }
1271
- ],
1272
- "outputs": [
1273
- {
1274
- "name": "",
1275
- "type": "uint256"
1276
- },
1277
- {
1278
- "name": "",
1279
- "type": "address"
1280
- },
1281
- {
1282
- "name": "",
1283
- "type": "uint256"
1284
- },
1285
- {
1286
- "name": "",
1287
- "type": "uint256"
1288
- }
1289
- ]
1290
- },
1291
- {
1292
- "stateMutability": "nonpayable",
1293
- "type": "function",
1294
- "name": "withdrawFromYield",
1295
- "inputs": [
1296
- {
1297
- "name": "_vaultToken",
1298
- "type": "address"
1299
- },
1300
- {
1301
- "name": "_amount",
1302
- "type": "uint256"
1303
- },
1304
- {
1305
- "name": "_extraData",
1306
- "type": "bytes32"
1307
- },
1308
- {
1309
- "name": "_recipient",
1310
- "type": "address"
1311
- },
1312
- {
1313
- "name": "_miniAddys",
1314
- "type": "tuple",
1315
- "components": [
1316
- {
1317
- "name": "ledger",
1318
- "type": "address"
1319
- },
1320
- {
1321
- "name": "missionControl",
1322
- "type": "address"
1323
- },
1324
- {
1325
- "name": "legoBook",
1326
- "type": "address"
1327
- },
1328
- {
1329
- "name": "appraiser",
1330
- "type": "address"
1331
- }
1332
- ]
1333
- }
1334
- ],
1335
- "outputs": [
1336
- {
1337
- "name": "",
1338
- "type": "uint256"
1339
- },
1340
- {
1341
- "name": "",
1342
- "type": "address"
1343
- },
1344
- {
1345
- "name": "",
1346
- "type": "uint256"
1347
- },
1348
- {
1349
- "name": "",
1350
- "type": "uint256"
1351
- }
1352
- ]
1353
- },
1354
- {
1355
- "stateMutability": "nonpayable",
1356
- "type": "function",
1357
- "name": "mintOrRedeemAsset",
1358
- "inputs": [
1359
- {
1360
- "name": "_tokenIn",
1361
- "type": "address"
1362
- },
1363
- {
1364
- "name": "_tokenOut",
1365
- "type": "address"
1366
- },
1367
- {
1368
- "name": "_tokenInAmount",
1369
- "type": "uint256"
1370
- },
1371
- {
1372
- "name": "_minAmountOut",
1373
- "type": "uint256"
1374
- },
1375
- {
1376
- "name": "_extraData",
1377
- "type": "bytes32"
1378
- },
1379
- {
1380
- "name": "_recipient",
1381
- "type": "address"
1382
- }
1383
- ],
1384
- "outputs": [
1385
- {
1386
- "name": "",
1387
- "type": "uint256"
1388
- },
1389
- {
1390
- "name": "",
1391
- "type": "uint256"
1392
- },
1393
- {
1394
- "name": "",
1395
- "type": "bool"
1396
- },
1397
- {
1398
- "name": "",
1399
- "type": "uint256"
1400
- }
1401
- ]
1402
- },
1403
- {
1404
- "stateMutability": "nonpayable",
1405
- "type": "function",
1406
- "name": "mintOrRedeemAsset",
1407
- "inputs": [
1408
- {
1409
- "name": "_tokenIn",
1410
- "type": "address"
1411
- },
1412
- {
1413
- "name": "_tokenOut",
1414
- "type": "address"
1415
- },
1416
- {
1417
- "name": "_tokenInAmount",
1418
- "type": "uint256"
1419
- },
1420
- {
1421
- "name": "_minAmountOut",
1422
- "type": "uint256"
1423
- },
1424
- {
1425
- "name": "_extraData",
1426
- "type": "bytes32"
1427
- },
1428
- {
1429
- "name": "_recipient",
1430
- "type": "address"
1431
- },
1432
- {
1433
- "name": "_miniAddys",
1434
- "type": "tuple",
1435
- "components": [
1436
- {
1437
- "name": "ledger",
1438
- "type": "address"
1439
- },
1440
- {
1441
- "name": "missionControl",
1442
- "type": "address"
1443
- },
1444
- {
1445
- "name": "legoBook",
1446
- "type": "address"
1447
- },
1448
- {
1449
- "name": "appraiser",
1450
- "type": "address"
1451
- }
1452
- ]
1453
- }
1454
- ],
1455
- "outputs": [
1456
- {
1457
- "name": "",
1458
- "type": "uint256"
1459
- },
1460
- {
1461
- "name": "",
1462
- "type": "uint256"
1463
- },
1464
- {
1465
- "name": "",
1466
- "type": "bool"
1467
- },
1468
- {
1469
- "name": "",
1470
- "type": "uint256"
1471
- }
1472
- ]
1473
- },
1474
- {
1475
- "stateMutability": "nonpayable",
1476
- "type": "function",
1477
- "name": "confirmMintOrRedeemAsset",
1478
- "inputs": [
1479
- {
1480
- "name": "_tokenIn",
1481
- "type": "address"
1482
- },
1483
- {
1484
- "name": "_tokenOut",
1485
- "type": "address"
1486
- },
1487
- {
1488
- "name": "_extraData",
1489
- "type": "bytes32"
1490
- },
1491
- {
1492
- "name": "_recipient",
1493
- "type": "address"
1494
- }
1495
- ],
1496
- "outputs": [
1497
- {
1498
- "name": "",
1499
- "type": "uint256"
1500
- },
1501
- {
1502
- "name": "",
1503
- "type": "uint256"
1504
- }
1505
- ]
1506
- },
1507
- {
1508
- "stateMutability": "nonpayable",
1509
- "type": "function",
1510
- "name": "confirmMintOrRedeemAsset",
1511
- "inputs": [
1512
- {
1513
- "name": "_tokenIn",
1514
- "type": "address"
1515
- },
1516
- {
1517
- "name": "_tokenOut",
1518
- "type": "address"
1519
- },
1520
- {
1521
- "name": "_extraData",
1522
- "type": "bytes32"
1523
- },
1524
- {
1525
- "name": "_recipient",
1526
- "type": "address"
1527
- },
1528
- {
1529
- "name": "_miniAddys",
1530
- "type": "tuple",
1531
- "components": [
1532
- {
1533
- "name": "ledger",
1534
- "type": "address"
1535
- },
1536
- {
1537
- "name": "missionControl",
1538
- "type": "address"
1539
- },
1540
- {
1541
- "name": "legoBook",
1542
- "type": "address"
1543
- },
1544
- {
1545
- "name": "appraiser",
1546
- "type": "address"
1547
- }
1548
- ]
1549
- }
1550
- ],
1551
- "outputs": [
1552
- {
1553
- "name": "",
1554
- "type": "uint256"
1555
- },
1556
- {
1557
- "name": "",
1558
- "type": "uint256"
1559
- }
1560
- ]
1561
- },
1562
- {
1563
- "stateMutability": "nonpayable",
1564
- "type": "function",
1565
- "name": "addCollateral",
1566
- "inputs": [
1567
- {
1568
- "name": "_asset",
1569
- "type": "address"
1570
- },
1571
- {
1572
- "name": "_amount",
1573
- "type": "uint256"
1574
- },
1575
- {
1576
- "name": "_extraData",
1577
- "type": "bytes32"
1578
- },
1579
- {
1580
- "name": "_recipient",
1581
- "type": "address"
1582
- }
1583
- ],
1584
- "outputs": [
1585
- {
1586
- "name": "",
1587
- "type": "uint256"
1588
- },
1589
- {
1590
- "name": "",
1591
- "type": "uint256"
1592
- }
1593
- ]
1594
- },
1595
- {
1596
- "stateMutability": "nonpayable",
1597
- "type": "function",
1598
- "name": "addCollateral",
1599
- "inputs": [
1600
- {
1601
- "name": "_asset",
1602
- "type": "address"
1603
- },
1604
- {
1605
- "name": "_amount",
1606
- "type": "uint256"
1607
- },
1608
- {
1609
- "name": "_extraData",
1610
- "type": "bytes32"
1611
- },
1612
- {
1613
- "name": "_recipient",
1614
- "type": "address"
1615
- },
1616
- {
1617
- "name": "_miniAddys",
1618
- "type": "tuple",
1619
- "components": [
1620
- {
1621
- "name": "ledger",
1622
- "type": "address"
1623
- },
1624
- {
1625
- "name": "missionControl",
1626
- "type": "address"
1627
- },
1628
- {
1629
- "name": "legoBook",
1630
- "type": "address"
1631
- },
1632
- {
1633
- "name": "appraiser",
1634
- "type": "address"
1635
- }
1636
- ]
1637
- }
1638
- ],
1639
- "outputs": [
1640
- {
1641
- "name": "",
1642
- "type": "uint256"
1643
- },
1644
- {
1645
- "name": "",
1646
- "type": "uint256"
1647
- }
1648
- ]
1649
- },
1650
- {
1651
- "stateMutability": "nonpayable",
1652
- "type": "function",
1653
- "name": "removeCollateral",
1654
- "inputs": [
1655
- {
1656
- "name": "_asset",
1657
- "type": "address"
1658
- },
1659
- {
1660
- "name": "_amount",
1661
- "type": "uint256"
1662
- },
1663
- {
1664
- "name": "_extraData",
1665
- "type": "bytes32"
1666
- },
1667
- {
1668
- "name": "_recipient",
1669
- "type": "address"
1670
- }
1671
- ],
1672
- "outputs": [
1673
- {
1674
- "name": "",
1675
- "type": "uint256"
1676
- },
1677
- {
1678
- "name": "",
1679
- "type": "uint256"
1680
- }
1681
- ]
1682
- },
1683
- {
1684
- "stateMutability": "nonpayable",
1685
- "type": "function",
1686
- "name": "removeCollateral",
1687
- "inputs": [
1688
- {
1689
- "name": "_asset",
1690
- "type": "address"
1691
- },
1692
- {
1693
- "name": "_amount",
1694
- "type": "uint256"
1695
- },
1696
- {
1697
- "name": "_extraData",
1698
- "type": "bytes32"
1699
- },
1700
- {
1701
- "name": "_recipient",
1702
- "type": "address"
1703
- },
1704
- {
1705
- "name": "_miniAddys",
1706
- "type": "tuple",
1707
- "components": [
1708
- {
1709
- "name": "ledger",
1710
- "type": "address"
1711
- },
1712
- {
1713
- "name": "missionControl",
1714
- "type": "address"
1715
- },
1716
- {
1717
- "name": "legoBook",
1718
- "type": "address"
1719
- },
1720
- {
1721
- "name": "appraiser",
1722
- "type": "address"
1723
- }
1724
- ]
1725
- }
1726
- ],
1727
- "outputs": [
1728
- {
1729
- "name": "",
1730
- "type": "uint256"
1731
- },
1732
- {
1733
- "name": "",
1734
- "type": "uint256"
1735
- }
1736
- ]
1737
- },
1738
- {
1739
- "stateMutability": "nonpayable",
1740
- "type": "function",
1741
- "name": "borrow",
1742
- "inputs": [
1743
- {
1744
- "name": "_borrowAsset",
1745
- "type": "address"
1746
- },
1747
- {
1748
- "name": "_amount",
1749
- "type": "uint256"
1750
- },
1751
- {
1752
- "name": "_extraData",
1753
- "type": "bytes32"
1754
- },
1755
- {
1756
- "name": "_recipient",
1757
- "type": "address"
1758
- }
1759
- ],
1760
- "outputs": [
1761
- {
1762
- "name": "",
1763
- "type": "uint256"
1764
- },
1765
- {
1766
- "name": "",
1767
- "type": "uint256"
1768
- }
1769
- ]
1770
- },
1771
- {
1772
- "stateMutability": "nonpayable",
1773
- "type": "function",
1774
- "name": "borrow",
1775
- "inputs": [
1776
- {
1777
- "name": "_borrowAsset",
1778
- "type": "address"
1779
- },
1780
- {
1781
- "name": "_amount",
1782
- "type": "uint256"
1783
- },
1784
- {
1785
- "name": "_extraData",
1786
- "type": "bytes32"
1787
- },
1788
- {
1789
- "name": "_recipient",
1790
- "type": "address"
1791
- },
1792
- {
1793
- "name": "_miniAddys",
1794
- "type": "tuple",
1795
- "components": [
1796
- {
1797
- "name": "ledger",
1798
- "type": "address"
1799
- },
1800
- {
1801
- "name": "missionControl",
1802
- "type": "address"
1803
- },
1804
- {
1805
- "name": "legoBook",
1806
- "type": "address"
1807
- },
1808
- {
1809
- "name": "appraiser",
1810
- "type": "address"
1811
- }
1812
- ]
1813
- }
1814
- ],
1815
- "outputs": [
1816
- {
1817
- "name": "",
1818
- "type": "uint256"
1819
- },
1820
- {
1821
- "name": "",
1822
- "type": "uint256"
1823
- }
1824
- ]
1825
- },
1826
- {
1827
- "stateMutability": "nonpayable",
1828
- "type": "function",
1829
- "name": "repayDebt",
1830
- "inputs": [
1831
- {
1832
- "name": "_paymentAsset",
1833
- "type": "address"
1834
- },
1835
- {
1836
- "name": "_paymentAmount",
1837
- "type": "uint256"
1838
- },
1839
- {
1840
- "name": "_extraData",
1841
- "type": "bytes32"
1842
- },
1843
- {
1844
- "name": "_recipient",
1845
- "type": "address"
1846
- }
1847
- ],
1848
- "outputs": [
1849
- {
1850
- "name": "",
1851
- "type": "uint256"
1852
- },
1853
- {
1854
- "name": "",
1855
- "type": "uint256"
1856
- }
1857
- ]
1858
- },
1859
- {
1860
- "stateMutability": "nonpayable",
1861
- "type": "function",
1862
- "name": "repayDebt",
1863
- "inputs": [
1864
- {
1865
- "name": "_paymentAsset",
1866
- "type": "address"
1867
- },
1868
- {
1869
- "name": "_paymentAmount",
1870
- "type": "uint256"
1871
- },
1872
- {
1873
- "name": "_extraData",
1874
- "type": "bytes32"
1875
- },
1876
- {
1877
- "name": "_recipient",
1878
- "type": "address"
1879
- },
1880
- {
1881
- "name": "_miniAddys",
1882
- "type": "tuple",
1883
- "components": [
1884
- {
1885
- "name": "ledger",
1886
- "type": "address"
1887
- },
1888
- {
1889
- "name": "missionControl",
1890
- "type": "address"
1891
- },
1892
- {
1893
- "name": "legoBook",
1894
- "type": "address"
1895
- },
1896
- {
1897
- "name": "appraiser",
1898
- "type": "address"
1899
- }
1900
- ]
1901
- }
1902
- ],
1903
- "outputs": [
1904
- {
1905
- "name": "",
1906
- "type": "uint256"
1907
- },
1908
- {
1909
- "name": "",
1910
- "type": "uint256"
1911
- }
1912
- ]
1913
- },
1914
- {
1915
- "stateMutability": "nonpayable",
1916
- "type": "function",
1917
- "name": "claimRewards",
1918
- "inputs": [
1919
- {
1920
- "name": "_user",
1921
- "type": "address"
1922
- },
1923
- {
1924
- "name": "_rewardToken",
1925
- "type": "address"
1926
- },
1927
- {
1928
- "name": "_rewardAmount",
1929
- "type": "uint256"
1930
- },
1931
- {
1932
- "name": "_extraData",
1933
- "type": "bytes32"
1934
- }
1935
- ],
1936
- "outputs": [
1937
- {
1938
- "name": "",
1939
- "type": "uint256"
1940
- },
1941
- {
1942
- "name": "",
1943
- "type": "uint256"
1944
- }
1945
- ]
1946
- },
1947
- {
1948
- "stateMutability": "nonpayable",
1949
- "type": "function",
1950
- "name": "claimRewards",
1951
- "inputs": [
1952
- {
1953
- "name": "_user",
1954
- "type": "address"
1955
- },
1956
- {
1957
- "name": "_rewardToken",
1958
- "type": "address"
1959
- },
1960
- {
1961
- "name": "_rewardAmount",
1962
- "type": "uint256"
1963
- },
1964
- {
1965
- "name": "_extraData",
1966
- "type": "bytes32"
1967
- },
1968
- {
1969
- "name": "_miniAddys",
1970
- "type": "tuple",
1971
- "components": [
1972
- {
1973
- "name": "ledger",
1974
- "type": "address"
1975
- },
1976
- {
1977
- "name": "missionControl",
1978
- "type": "address"
1979
- },
1980
- {
1981
- "name": "legoBook",
1982
- "type": "address"
1983
- },
1984
- {
1985
- "name": "appraiser",
1986
- "type": "address"
1987
- }
1988
- ]
1989
- }
1990
- ],
1991
- "outputs": [
1992
- {
1993
- "name": "",
1994
- "type": "uint256"
1995
- },
1996
- {
1997
- "name": "",
1998
- "type": "uint256"
1999
- }
2000
- ]
2001
- },
2002
- {
2003
- "stateMutability": "nonpayable",
2004
- "type": "function",
2005
- "name": "claimIncentives",
2006
- "inputs": [
2007
- {
2008
- "name": "_user",
2009
- "type": "address"
2010
- },
2011
- {
2012
- "name": "_rewardToken",
2013
- "type": "address"
2014
- },
2015
- {
2016
- "name": "_rewardAmount",
2017
- "type": "uint256"
2018
- },
2019
- {
2020
- "name": "_proofs",
2021
- "type": "bytes32[]"
2022
- }
2023
- ],
2024
- "outputs": [
2025
- {
2026
- "name": "",
2027
- "type": "uint256"
2028
- },
2029
- {
2030
- "name": "",
2031
- "type": "uint256"
2032
- }
2033
- ]
2034
- },
2035
- {
2036
- "stateMutability": "nonpayable",
2037
- "type": "function",
2038
- "name": "claimIncentives",
2039
- "inputs": [
2040
- {
2041
- "name": "_user",
2042
- "type": "address"
2043
- },
2044
- {
2045
- "name": "_rewardToken",
2046
- "type": "address"
2047
- },
2048
- {
2049
- "name": "_rewardAmount",
2050
- "type": "uint256"
2051
- },
2052
- {
2053
- "name": "_proofs",
2054
- "type": "bytes32[]"
2055
- },
2056
- {
2057
- "name": "_miniAddys",
2058
- "type": "tuple",
2059
- "components": [
2060
- {
2061
- "name": "ledger",
2062
- "type": "address"
2063
- },
2064
- {
2065
- "name": "missionControl",
2066
- "type": "address"
2067
- },
2068
- {
2069
- "name": "legoBook",
2070
- "type": "address"
2071
- },
2072
- {
2073
- "name": "appraiser",
2074
- "type": "address"
2075
- }
2076
- ]
2077
- }
2078
- ],
2079
- "outputs": [
2080
- {
2081
- "name": "",
2082
- "type": "uint256"
2083
- },
2084
- {
2085
- "name": "",
2086
- "type": "uint256"
2087
- }
2088
- ]
2089
- },
2090
- {
2091
- "stateMutability": "nonpayable",
2092
- "type": "function",
2093
- "name": "addLiquidityConcentrated",
2094
- "inputs": [
2095
- {
2096
- "name": "_nftTokenId",
2097
- "type": "uint256"
2098
- },
2099
- {
2100
- "name": "_pool",
2101
- "type": "address"
2102
- },
2103
- {
2104
- "name": "_tokenA",
2105
- "type": "address"
2106
- },
2107
- {
2108
- "name": "_tokenB",
2109
- "type": "address"
2110
- },
2111
- {
2112
- "name": "_tickLower",
2113
- "type": "int24"
2114
- },
2115
- {
2116
- "name": "_tickUpper",
2117
- "type": "int24"
2118
- },
2119
- {
2120
- "name": "_amountA",
2121
- "type": "uint256"
2122
- },
2123
- {
2124
- "name": "_amountB",
2125
- "type": "uint256"
2126
- },
2127
- {
2128
- "name": "_minAmountA",
2129
- "type": "uint256"
2130
- },
2131
- {
2132
- "name": "_minAmountB",
2133
- "type": "uint256"
2134
- },
2135
- {
2136
- "name": "_extraData",
2137
- "type": "bytes32"
2138
- },
2139
- {
2140
- "name": "_recipient",
2141
- "type": "address"
2142
- }
2143
- ],
2144
- "outputs": [
2145
- {
2146
- "name": "",
2147
- "type": "uint256"
2148
- },
2149
- {
2150
- "name": "",
2151
- "type": "uint256"
2152
- },
2153
- {
2154
- "name": "",
2155
- "type": "uint256"
2156
- },
2157
- {
2158
- "name": "",
2159
- "type": "uint256"
2160
- },
2161
- {
2162
- "name": "",
2163
- "type": "uint256"
2164
- }
2165
- ]
2166
- },
2167
- {
2168
- "stateMutability": "nonpayable",
2169
- "type": "function",
2170
- "name": "addLiquidityConcentrated",
2171
- "inputs": [
2172
- {
2173
- "name": "_nftTokenId",
2174
- "type": "uint256"
2175
- },
2176
- {
2177
- "name": "_pool",
2178
- "type": "address"
2179
- },
2180
- {
2181
- "name": "_tokenA",
2182
- "type": "address"
2183
- },
2184
- {
2185
- "name": "_tokenB",
2186
- "type": "address"
2187
- },
2188
- {
2189
- "name": "_tickLower",
2190
- "type": "int24"
2191
- },
2192
- {
2193
- "name": "_tickUpper",
2194
- "type": "int24"
2195
- },
2196
- {
2197
- "name": "_amountA",
2198
- "type": "uint256"
2199
- },
2200
- {
2201
- "name": "_amountB",
2202
- "type": "uint256"
2203
- },
2204
- {
2205
- "name": "_minAmountA",
2206
- "type": "uint256"
2207
- },
2208
- {
2209
- "name": "_minAmountB",
2210
- "type": "uint256"
2211
- },
2212
- {
2213
- "name": "_extraData",
2214
- "type": "bytes32"
2215
- },
2216
- {
2217
- "name": "_recipient",
2218
- "type": "address"
2219
- },
2220
- {
2221
- "name": "_miniAddys",
2222
- "type": "tuple",
2223
- "components": [
2224
- {
2225
- "name": "ledger",
2226
- "type": "address"
2227
- },
2228
- {
2229
- "name": "missionControl",
2230
- "type": "address"
2231
- },
2232
- {
2233
- "name": "legoBook",
2234
- "type": "address"
2235
- },
2236
- {
2237
- "name": "appraiser",
2238
- "type": "address"
2239
- }
2240
- ]
2241
- }
2242
- ],
2243
- "outputs": [
2244
- {
2245
- "name": "",
2246
- "type": "uint256"
2247
- },
2248
- {
2249
- "name": "",
2250
- "type": "uint256"
2251
- },
2252
- {
2253
- "name": "",
2254
- "type": "uint256"
2255
- },
2256
- {
2257
- "name": "",
2258
- "type": "uint256"
2259
- },
2260
- {
2261
- "name": "",
2262
- "type": "uint256"
2263
- }
2264
- ]
2265
- },
2266
- {
2267
- "stateMutability": "nonpayable",
2268
- "type": "function",
2269
- "name": "removeLiquidityConcentrated",
2270
- "inputs": [
2271
- {
2272
- "name": "_nftTokenId",
2273
- "type": "uint256"
2274
- },
2275
- {
2276
- "name": "_pool",
2277
- "type": "address"
2278
- },
2279
- {
2280
- "name": "_tokenA",
2281
- "type": "address"
2282
- },
2283
- {
2284
- "name": "_tokenB",
2285
- "type": "address"
2286
- },
2287
- {
2288
- "name": "_liqToRemove",
2289
- "type": "uint256"
2290
- },
2291
- {
2292
- "name": "_minAmountA",
2293
- "type": "uint256"
2294
- },
2295
- {
2296
- "name": "_minAmountB",
2297
- "type": "uint256"
2298
- },
2299
- {
2300
- "name": "_extraData",
2301
- "type": "bytes32"
2302
- },
2303
- {
2304
- "name": "_recipient",
2305
- "type": "address"
2306
- }
2307
- ],
2308
- "outputs": [
2309
- {
2310
- "name": "",
2311
- "type": "uint256"
2312
- },
2313
- {
2314
- "name": "",
2315
- "type": "uint256"
2316
- },
2317
- {
2318
- "name": "",
2319
- "type": "uint256"
2320
- },
2321
- {
2322
- "name": "",
2323
- "type": "bool"
2324
- },
2325
- {
2326
- "name": "",
2327
- "type": "uint256"
2328
- }
2329
- ]
2330
- },
2331
- {
2332
- "stateMutability": "nonpayable",
2333
- "type": "function",
2334
- "name": "removeLiquidityConcentrated",
2335
- "inputs": [
2336
- {
2337
- "name": "_nftTokenId",
2338
- "type": "uint256"
2339
- },
2340
- {
2341
- "name": "_pool",
2342
- "type": "address"
2343
- },
2344
- {
2345
- "name": "_tokenA",
2346
- "type": "address"
2347
- },
2348
- {
2349
- "name": "_tokenB",
2350
- "type": "address"
2351
- },
2352
- {
2353
- "name": "_liqToRemove",
2354
- "type": "uint256"
2355
- },
2356
- {
2357
- "name": "_minAmountA",
2358
- "type": "uint256"
2359
- },
2360
- {
2361
- "name": "_minAmountB",
2362
- "type": "uint256"
2363
- },
2364
- {
2365
- "name": "_extraData",
2366
- "type": "bytes32"
2367
- },
2368
- {
2369
- "name": "_recipient",
2370
- "type": "address"
2371
- },
2372
- {
2373
- "name": "_miniAddys",
2374
- "type": "tuple",
2375
- "components": [
2376
- {
2377
- "name": "ledger",
2378
- "type": "address"
2379
- },
2380
- {
2381
- "name": "missionControl",
2382
- "type": "address"
2383
- },
2384
- {
2385
- "name": "legoBook",
2386
- "type": "address"
2387
- },
2388
- {
2389
- "name": "appraiser",
2390
- "type": "address"
2391
- }
2392
- ]
2393
- }
2394
- ],
2395
- "outputs": [
2396
- {
2397
- "name": "",
2398
- "type": "uint256"
2399
- },
2400
- {
2401
- "name": "",
2402
- "type": "uint256"
2403
- },
2404
- {
2405
- "name": "",
2406
- "type": "uint256"
2407
- },
2408
- {
2409
- "name": "",
2410
- "type": "bool"
2411
- },
2412
- {
2413
- "name": "",
2414
- "type": "uint256"
2415
- }
2416
- ]
2417
- },
2418
- {
2419
- "stateMutability": "view",
2420
- "type": "function",
2421
- "name": "getAccessForLego",
2422
- "inputs": [
2423
- {
2424
- "name": "_user",
2425
- "type": "address"
2426
- },
2427
- {
2428
- "name": "_action",
2429
- "type": "uint256"
2430
- }
2431
- ],
2432
- "outputs": [
2433
- {
2434
- "name": "",
2435
- "type": "address"
2436
- },
2437
- {
2438
- "name": "",
2439
- "type": "string"
2440
- },
2441
- {
2442
- "name": "",
2443
- "type": "uint256"
2444
- }
2445
- ]
2446
- },
2447
- {
2448
- "stateMutability": "view",
2449
- "type": "function",
2450
- "name": "UNISWAP_V2_FACTORY",
2451
- "inputs": [],
2452
- "outputs": [
2453
- {
2454
- "name": "",
2455
- "type": "address"
2456
- }
2457
- ]
2458
- },
2459
- {
2460
- "stateMutability": "view",
2461
- "type": "function",
2462
- "name": "UNISWAP_V2_ROUTER",
2463
- "inputs": [],
2464
- "outputs": [
2465
- {
2466
- "name": "",
2467
- "type": "address"
2468
- }
2469
- ]
2470
- },
2471
- {
2472
- "stateMutability": "view",
2473
- "type": "function",
2474
- "name": "RIPE_REGISTRY",
2475
- "inputs": [],
2476
- "outputs": [
2477
- {
2478
- "name": "",
2479
- "type": "address"
2480
- }
2481
- ]
2482
- },
2483
- {
2484
- "stateMutability": "view",
2485
- "type": "function",
2486
- "name": "coreRouterPool",
2487
- "inputs": [],
2488
- "outputs": [
2489
- {
2490
- "name": "",
2491
- "type": "address"
2492
- }
2493
- ]
2494
- },
2495
- {
2496
- "stateMutability": "nonpayable",
2497
- "type": "constructor",
2498
- "inputs": [
2499
- {
2500
- "name": "_undyHq",
2501
- "type": "address"
2502
- },
2503
- {
2504
- "name": "_uniswapV2Factory",
2505
- "type": "address"
2506
- },
2507
- {
2508
- "name": "_uniswapV2Router",
2509
- "type": "address"
2510
- },
2511
- {
2512
- "name": "_coreRouterPool",
2513
- "type": "address"
2514
- },
2515
- {
2516
- "name": "_ripeRegistry",
2517
- "type": "address"
2518
- }
2519
- ],
2520
- "outputs": []
2521
- }
2522
- ];
2523
- export const deployAddress = '0x95979aEF0F70887f31701944b658948890F56fd7';
2524
- function getRequest(method, args, contractAddressOrOptions) {
2525
- const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
2526
- const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
2527
- const call = {
2528
- contractName: 'UniswapV2',
2529
- method,
2530
- args,
2531
- address,
2532
- deployAddress,
2533
- defaultValue,
2534
- getAbi: () => abi,
2535
- with: (options) => {
2536
- call.address = options.contractAddress;
2537
- call.defaultValue = options.defaultValue;
2538
- return call;
2539
- },
2540
- defaultTo: (defaultValue) => {
2541
- call.defaultValue = defaultValue;
2542
- return call;
2543
- },
2544
- at: (address) => {
2545
- call.address = address;
2546
- return call;
2547
- },
2548
- };
2549
- return call;
2550
- }
2551
- export const call = {
2552
- getAddys: (...args) => getRequest('getAddys', args),
2553
- getUndyHq: (...args) => getRequest('getUndyHq', args),
2554
- legoId: (...args) => getRequest('legoId', args),
2555
- isPaused: (...args) => getRequest('isPaused', args),
2556
- hasCapability: (...args) => getRequest('hasCapability', args),
2557
- getRegistries: (...args) => getRequest('getRegistries', args),
2558
- isYieldLego: (...args) => getRequest('isYieldLego', args),
2559
- isDexLego: (...args) => getRequest('isDexLego', args),
2560
- getLpToken: (...args) => getRequest('getLpToken', args),
2561
- getPoolForLpToken: (...args) => getRequest('getPoolForLpToken', args),
2562
- getCoreRouterPool: (...args) => getRequest('getCoreRouterPool', args),
2563
- getDeepestLiqPool: (...args) => getRequest('getDeepestLiqPool', args),
2564
- getBestSwapAmountOut: (...args) => getRequest('getBestSwapAmountOut', args),
2565
- getSwapAmountOut: (...args) => getRequest('getSwapAmountOut', args),
2566
- getBestSwapAmountIn: (...args) => getRequest('getBestSwapAmountIn', args),
2567
- getSwapAmountIn: (...args) => getRequest('getSwapAmountIn', args),
2568
- getAddLiqAmountsIn: (...args) => getRequest('getAddLiqAmountsIn', args),
2569
- getRemoveLiqAmountsOut: (...args) => getRequest('getRemoveLiqAmountsOut', args),
2570
- getPrice: (...args) => getRequest('getPrice', args),
2571
- getPriceUnsafe: (...args) => getRequest('getPriceUnsafe', args),
2572
- getAccessForLego: (...args) => getRequest('getAccessForLego', args),
2573
- UNISWAP_V2_FACTORY: (...args) => getRequest('UNISWAP_V2_FACTORY', args),
2574
- UNISWAP_V2_ROUTER: (...args) => getRequest('UNISWAP_V2_ROUTER', args),
2575
- RIPE_REGISTRY: (...args) => getRequest('RIPE_REGISTRY', args),
2576
- coreRouterPool: (...args) => getRequest('coreRouterPool', args),
2577
- };
2578
- function getMutation(functionName) {
2579
- return {
2580
- contractName: 'UniswapV2',
2581
- functionName,
2582
- deployAddress,
2583
- argsType: undefined,
2584
- getAbi: () => abi,
2585
- };
2586
- }
2587
- export const mutation = {
2588
- pause: getMutation('pause'),
2589
- recoverFunds: getMutation('recoverFunds'),
2590
- recoverFundsMany: getMutation('recoverFundsMany'),
2591
- swapTokens: getMutation('swapTokens'),
2592
- addLiquidity: getMutation('addLiquidity'),
2593
- removeLiquidity: getMutation('removeLiquidity'),
2594
- depositForYield: getMutation('depositForYield'),
2595
- withdrawFromYield: getMutation('withdrawFromYield'),
2596
- mintOrRedeemAsset: getMutation('mintOrRedeemAsset'),
2597
- confirmMintOrRedeemAsset: getMutation('confirmMintOrRedeemAsset'),
2598
- addCollateral: getMutation('addCollateral'),
2599
- removeCollateral: getMutation('removeCollateral'),
2600
- borrow: getMutation('borrow'),
2601
- repayDebt: getMutation('repayDebt'),
2602
- claimRewards: getMutation('claimRewards'),
2603
- claimIncentives: getMutation('claimIncentives'),
2604
- addLiquidityConcentrated: getMutation('addLiquidityConcentrated'),
2605
- removeLiquidityConcentrated: getMutation('removeLiquidityConcentrated'),
2606
- };
2607
- export function parseEvents(eventName, events) {
2608
- return events.map((event) => {
2609
- return {
2610
- event,
2611
- parsed: parseEventLogs({
2612
- abi,
2613
- eventName,
2614
- logs: [event],
2615
- }),
2616
- };
2617
- });
2618
- }
2619
- export function getEventTopic(eventName) {
2620
- return encodeEventTopics({ abi, eventName })[0];
2621
- }
2622
- export function toSdk(publicClient, walletClient, addressResolver) {
2623
- return {
2624
- deployAddress,
2625
- abi,
2626
- events: {
2627
- UniswapV2Swap: { topic: getEventTopic('UniswapV2Swap'), parse: (events) => parseEvents('UniswapV2Swap', events) },
2628
- UniswapV2LiquidityAdded: { topic: getEventTopic('UniswapV2LiquidityAdded'), parse: (events) => parseEvents('UniswapV2LiquidityAdded', events) },
2629
- UniswapV2LiquidityRemoved: { topic: getEventTopic('UniswapV2LiquidityRemoved'), parse: (events) => parseEvents('UniswapV2LiquidityRemoved', events) },
2630
- LegoPauseModified: { topic: getEventTopic('LegoPauseModified'), parse: (events) => parseEvents('LegoPauseModified', events) },
2631
- LegoFundsRecovered: { topic: getEventTopic('LegoFundsRecovered'), parse: (events) => parseEvents('LegoFundsRecovered', events) },
2632
- },
2633
- // Queries
2634
- getAddys: (...args) => singleQuery(publicClient, call.getAddys(...args), {}, addressResolver),
2635
- getUndyHq: (...args) => singleQuery(publicClient, call.getUndyHq(...args), {}, addressResolver),
2636
- legoId: (...args) => singleQuery(publicClient, call.legoId(...args), {}, addressResolver),
2637
- isPaused: (...args) => singleQuery(publicClient, call.isPaused(...args), {}, addressResolver),
2638
- hasCapability: (...args) => singleQuery(publicClient, call.hasCapability(...args), {}, addressResolver),
2639
- getRegistries: (...args) => singleQuery(publicClient, call.getRegistries(...args), {}, addressResolver),
2640
- isYieldLego: (...args) => singleQuery(publicClient, call.isYieldLego(...args), {}, addressResolver),
2641
- isDexLego: (...args) => singleQuery(publicClient, call.isDexLego(...args), {}, addressResolver),
2642
- getLpToken: (...args) => singleQuery(publicClient, call.getLpToken(...args), {}, addressResolver),
2643
- getPoolForLpToken: (...args) => singleQuery(publicClient, call.getPoolForLpToken(...args), {}, addressResolver),
2644
- getCoreRouterPool: (...args) => singleQuery(publicClient, call.getCoreRouterPool(...args), {}, addressResolver),
2645
- getDeepestLiqPool: (...args) => singleQuery(publicClient, call.getDeepestLiqPool(...args), {}, addressResolver),
2646
- getBestSwapAmountOut: (...args) => singleQuery(publicClient, call.getBestSwapAmountOut(...args), {}, addressResolver),
2647
- getSwapAmountOut: (...args) => singleQuery(publicClient, call.getSwapAmountOut(...args), {}, addressResolver),
2648
- getBestSwapAmountIn: (...args) => singleQuery(publicClient, call.getBestSwapAmountIn(...args), {}, addressResolver),
2649
- getSwapAmountIn: (...args) => singleQuery(publicClient, call.getSwapAmountIn(...args), {}, addressResolver),
2650
- getAddLiqAmountsIn: (...args) => singleQuery(publicClient, call.getAddLiqAmountsIn(...args), {}, addressResolver),
2651
- getRemoveLiqAmountsOut: (...args) => singleQuery(publicClient, call.getRemoveLiqAmountsOut(...args), {}, addressResolver),
2652
- getPrice: (...args) => singleQuery(publicClient, call.getPrice(...args), {}, addressResolver),
2653
- getPriceUnsafe: (...args) => singleQuery(publicClient, call.getPriceUnsafe(...args), {}, addressResolver),
2654
- getAccessForLego: (...args) => singleQuery(publicClient, call.getAccessForLego(...args), {}, addressResolver),
2655
- UNISWAP_V2_FACTORY: (...args) => singleQuery(publicClient, call.UNISWAP_V2_FACTORY(...args), {}, addressResolver),
2656
- UNISWAP_V2_ROUTER: (...args) => singleQuery(publicClient, call.UNISWAP_V2_ROUTER(...args), {}, addressResolver),
2657
- RIPE_REGISTRY: (...args) => singleQuery(publicClient, call.RIPE_REGISTRY(...args), {}, addressResolver),
2658
- coreRouterPool: (...args) => singleQuery(publicClient, call.coreRouterPool(...args), {}, addressResolver),
2659
- // Mutations
2660
- pause: (...args) => mutate(walletClient, mutation.pause, { addressResolver })(...args),
2661
- recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds, { addressResolver })(...args),
2662
- recoverFundsMany: (...args) => mutate(walletClient, mutation.recoverFundsMany, { addressResolver })(...args),
2663
- swapTokens: (...args) => mutate(walletClient, mutation.swapTokens, { addressResolver })(...args),
2664
- addLiquidity: (...args) => mutate(walletClient, mutation.addLiquidity, { addressResolver })(...args),
2665
- removeLiquidity: (...args) => mutate(walletClient, mutation.removeLiquidity, { addressResolver })(...args),
2666
- depositForYield: (...args) => mutate(walletClient, mutation.depositForYield, { addressResolver })(...args),
2667
- withdrawFromYield: (...args) => mutate(walletClient, mutation.withdrawFromYield, { addressResolver })(...args),
2668
- mintOrRedeemAsset: (...args) => mutate(walletClient, mutation.mintOrRedeemAsset, { addressResolver })(...args),
2669
- confirmMintOrRedeemAsset: (...args) => mutate(walletClient, mutation.confirmMintOrRedeemAsset, { addressResolver })(...args),
2670
- addCollateral: (...args) => mutate(walletClient, mutation.addCollateral, { addressResolver })(...args),
2671
- removeCollateral: (...args) => mutate(walletClient, mutation.removeCollateral, { addressResolver })(...args),
2672
- borrow: (...args) => mutate(walletClient, mutation.borrow, { addressResolver })(...args),
2673
- repayDebt: (...args) => mutate(walletClient, mutation.repayDebt, { addressResolver })(...args),
2674
- claimRewards: (...args) => mutate(walletClient, mutation.claimRewards, { addressResolver })(...args),
2675
- claimIncentives: (...args) => mutate(walletClient, mutation.claimIncentives, { addressResolver })(...args),
2676
- addLiquidityConcentrated: (...args) => mutate(walletClient, mutation.addLiquidityConcentrated, { addressResolver })(...args),
2677
- removeLiquidityConcentrated: (...args) => mutate(walletClient, mutation.removeLiquidityConcentrated, { addressResolver })(...args),
2678
- };
2679
- }