@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,3643 +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": "RipeCollateralDeposit",
10
- "inputs": [
11
- {
12
- "name": "sender",
13
- "type": "address",
14
- "indexed": true
15
- },
16
- {
17
- "name": "asset",
18
- "type": "address",
19
- "indexed": true
20
- },
21
- {
22
- "name": "assetAmountDeposited",
23
- "type": "uint256",
24
- "indexed": false
25
- },
26
- {
27
- "name": "vaultIdOrLock",
28
- "type": "uint256",
29
- "indexed": false
30
- },
31
- {
32
- "name": "usdValue",
33
- "type": "uint256",
34
- "indexed": false
35
- },
36
- {
37
- "name": "recipient",
38
- "type": "address",
39
- "indexed": false
40
- }
41
- ],
42
- "anonymous": false,
43
- "type": "event"
44
- },
45
- {
46
- "name": "RipeCollateralWithdrawal",
47
- "inputs": [
48
- {
49
- "name": "sender",
50
- "type": "address",
51
- "indexed": true
52
- },
53
- {
54
- "name": "asset",
55
- "type": "address",
56
- "indexed": true
57
- },
58
- {
59
- "name": "assetAmountReceived",
60
- "type": "uint256",
61
- "indexed": false
62
- },
63
- {
64
- "name": "vaultId",
65
- "type": "uint256",
66
- "indexed": false
67
- },
68
- {
69
- "name": "usdValue",
70
- "type": "uint256",
71
- "indexed": false
72
- },
73
- {
74
- "name": "recipient",
75
- "type": "address",
76
- "indexed": false
77
- }
78
- ],
79
- "anonymous": false,
80
- "type": "event"
81
- },
82
- {
83
- "name": "RipeBorrow",
84
- "inputs": [
85
- {
86
- "name": "sender",
87
- "type": "address",
88
- "indexed": true
89
- },
90
- {
91
- "name": "asset",
92
- "type": "address",
93
- "indexed": true
94
- },
95
- {
96
- "name": "assetAmountBorrowed",
97
- "type": "uint256",
98
- "indexed": false
99
- },
100
- {
101
- "name": "usdValue",
102
- "type": "uint256",
103
- "indexed": false
104
- },
105
- {
106
- "name": "recipient",
107
- "type": "address",
108
- "indexed": false
109
- }
110
- ],
111
- "anonymous": false,
112
- "type": "event"
113
- },
114
- {
115
- "name": "RipeRepay",
116
- "inputs": [
117
- {
118
- "name": "sender",
119
- "type": "address",
120
- "indexed": true
121
- },
122
- {
123
- "name": "asset",
124
- "type": "address",
125
- "indexed": true
126
- },
127
- {
128
- "name": "assetAmountRepaid",
129
- "type": "uint256",
130
- "indexed": false
131
- },
132
- {
133
- "name": "usdValue",
134
- "type": "uint256",
135
- "indexed": false
136
- },
137
- {
138
- "name": "recipient",
139
- "type": "address",
140
- "indexed": false
141
- }
142
- ],
143
- "anonymous": false,
144
- "type": "event"
145
- },
146
- {
147
- "name": "RipeClaimRewards",
148
- "inputs": [
149
- {
150
- "name": "sender",
151
- "type": "address",
152
- "indexed": true
153
- },
154
- {
155
- "name": "asset",
156
- "type": "address",
157
- "indexed": true
158
- },
159
- {
160
- "name": "ripeClaimed",
161
- "type": "uint256",
162
- "indexed": false
163
- },
164
- {
165
- "name": "usdValue",
166
- "type": "uint256",
167
- "indexed": false
168
- },
169
- {
170
- "name": "recipient",
171
- "type": "address",
172
- "indexed": false
173
- }
174
- ],
175
- "anonymous": false,
176
- "type": "event"
177
- },
178
- {
179
- "name": "RipeSavingsGreenDeposit",
180
- "inputs": [
181
- {
182
- "name": "sender",
183
- "type": "address",
184
- "indexed": true
185
- },
186
- {
187
- "name": "asset",
188
- "type": "address",
189
- "indexed": true
190
- },
191
- {
192
- "name": "vaultToken",
193
- "type": "address",
194
- "indexed": true
195
- },
196
- {
197
- "name": "assetAmountDeposited",
198
- "type": "uint256",
199
- "indexed": false
200
- },
201
- {
202
- "name": "usdValue",
203
- "type": "uint256",
204
- "indexed": false
205
- },
206
- {
207
- "name": "vaultTokenAmountReceived",
208
- "type": "uint256",
209
- "indexed": false
210
- },
211
- {
212
- "name": "recipient",
213
- "type": "address",
214
- "indexed": false
215
- }
216
- ],
217
- "anonymous": false,
218
- "type": "event"
219
- },
220
- {
221
- "name": "RipeSavingsGreenWithdrawal",
222
- "inputs": [
223
- {
224
- "name": "sender",
225
- "type": "address",
226
- "indexed": true
227
- },
228
- {
229
- "name": "asset",
230
- "type": "address",
231
- "indexed": true
232
- },
233
- {
234
- "name": "vaultToken",
235
- "type": "address",
236
- "indexed": true
237
- },
238
- {
239
- "name": "assetAmountReceived",
240
- "type": "uint256",
241
- "indexed": false
242
- },
243
- {
244
- "name": "usdValue",
245
- "type": "uint256",
246
- "indexed": false
247
- },
248
- {
249
- "name": "vaultTokenAmountBurned",
250
- "type": "uint256",
251
- "indexed": false
252
- },
253
- {
254
- "name": "recipient",
255
- "type": "address",
256
- "indexed": false
257
- }
258
- ],
259
- "anonymous": false,
260
- "type": "event"
261
- },
262
- {
263
- "name": "RipeEndaomentPsmSwap",
264
- "inputs": [
265
- {
266
- "name": "sender",
267
- "type": "address",
268
- "indexed": true
269
- },
270
- {
271
- "name": "tokenIn",
272
- "type": "address",
273
- "indexed": true
274
- },
275
- {
276
- "name": "tokenOut",
277
- "type": "address",
278
- "indexed": true
279
- },
280
- {
281
- "name": "amountIn",
282
- "type": "uint256",
283
- "indexed": false
284
- },
285
- {
286
- "name": "amountOut",
287
- "type": "uint256",
288
- "indexed": false
289
- },
290
- {
291
- "name": "usdValue",
292
- "type": "uint256",
293
- "indexed": false
294
- },
295
- {
296
- "name": "numTokens",
297
- "type": "uint256",
298
- "indexed": false
299
- },
300
- {
301
- "name": "recipient",
302
- "type": "address",
303
- "indexed": false
304
- }
305
- ],
306
- "anonymous": false,
307
- "type": "event"
308
- },
309
- {
310
- "name": "LegoPauseModified",
311
- "inputs": [
312
- {
313
- "name": "isPaused",
314
- "type": "bool",
315
- "indexed": false
316
- }
317
- ],
318
- "anonymous": false,
319
- "type": "event"
320
- },
321
- {
322
- "name": "LegoFundsRecovered",
323
- "inputs": [
324
- {
325
- "name": "asset",
326
- "type": "address",
327
- "indexed": true
328
- },
329
- {
330
- "name": "recipient",
331
- "type": "address",
332
- "indexed": true
333
- },
334
- {
335
- "name": "balance",
336
- "type": "uint256",
337
- "indexed": false
338
- }
339
- ],
340
- "anonymous": false,
341
- "type": "event"
342
- },
343
- {
344
- "name": "SnapShotPriceConfigSet",
345
- "inputs": [
346
- {
347
- "name": "minSnapshotDelay",
348
- "type": "uint256",
349
- "indexed": false
350
- },
351
- {
352
- "name": "maxNumSnapshots",
353
- "type": "uint256",
354
- "indexed": false
355
- },
356
- {
357
- "name": "maxUpsideDeviation",
358
- "type": "uint256",
359
- "indexed": false
360
- },
361
- {
362
- "name": "staleTime",
363
- "type": "uint256",
364
- "indexed": false
365
- }
366
- ],
367
- "anonymous": false,
368
- "type": "event"
369
- },
370
- {
371
- "name": "AssetOpportunityAdded",
372
- "inputs": [
373
- {
374
- "name": "asset",
375
- "type": "address",
376
- "indexed": true
377
- },
378
- {
379
- "name": "vaultAddr",
380
- "type": "address",
381
- "indexed": true
382
- }
383
- ],
384
- "anonymous": false,
385
- "type": "event"
386
- },
387
- {
388
- "name": "AssetOpportunityRemoved",
389
- "inputs": [
390
- {
391
- "name": "asset",
392
- "type": "address",
393
- "indexed": true
394
- },
395
- {
396
- "name": "vaultAddr",
397
- "type": "address",
398
- "indexed": true
399
- }
400
- ],
401
- "anonymous": false,
402
- "type": "event"
403
- },
404
- {
405
- "name": "PricePerShareSnapShotAdded",
406
- "inputs": [
407
- {
408
- "name": "vaultToken",
409
- "type": "address",
410
- "indexed": true
411
- },
412
- {
413
- "name": "totalSupply",
414
- "type": "uint256",
415
- "indexed": false
416
- },
417
- {
418
- "name": "pricePerShare",
419
- "type": "uint256",
420
- "indexed": false
421
- },
422
- {
423
- "name": "lastAveragePricePerShare",
424
- "type": "uint256",
425
- "indexed": false
426
- }
427
- ],
428
- "anonymous": false,
429
- "type": "event"
430
- },
431
- {
432
- "stateMutability": "view",
433
- "type": "function",
434
- "name": "getAddys",
435
- "inputs": [],
436
- "outputs": [
437
- {
438
- "name": "",
439
- "type": "tuple",
440
- "components": [
441
- {
442
- "name": "hq",
443
- "type": "address"
444
- },
445
- {
446
- "name": "undyToken",
447
- "type": "address"
448
- },
449
- {
450
- "name": "ledger",
451
- "type": "address"
452
- },
453
- {
454
- "name": "missionControl",
455
- "type": "address"
456
- },
457
- {
458
- "name": "legoBook",
459
- "type": "address"
460
- },
461
- {
462
- "name": "switchboard",
463
- "type": "address"
464
- },
465
- {
466
- "name": "hatchery",
467
- "type": "address"
468
- },
469
- {
470
- "name": "lootDistributor",
471
- "type": "address"
472
- },
473
- {
474
- "name": "appraiser",
475
- "type": "address"
476
- },
477
- {
478
- "name": "walletBackpack",
479
- "type": "address"
480
- },
481
- {
482
- "name": "billing",
483
- "type": "address"
484
- },
485
- {
486
- "name": "vaultRegistry",
487
- "type": "address"
488
- }
489
- ]
490
- }
491
- ]
492
- },
493
- {
494
- "stateMutability": "view",
495
- "type": "function",
496
- "name": "getUndyHq",
497
- "inputs": [],
498
- "outputs": [
499
- {
500
- "name": "",
501
- "type": "address"
502
- }
503
- ]
504
- },
505
- {
506
- "stateMutability": "view",
507
- "type": "function",
508
- "name": "isLegoAsset",
509
- "inputs": [
510
- {
511
- "name": "_asset",
512
- "type": "address"
513
- }
514
- ],
515
- "outputs": [
516
- {
517
- "name": "",
518
- "type": "bool"
519
- }
520
- ]
521
- },
522
- {
523
- "stateMutability": "view",
524
- "type": "function",
525
- "name": "getAssetOpportunities",
526
- "inputs": [
527
- {
528
- "name": "_asset",
529
- "type": "address"
530
- }
531
- ],
532
- "outputs": [
533
- {
534
- "name": "",
535
- "type": "address[]"
536
- }
537
- ]
538
- },
539
- {
540
- "stateMutability": "view",
541
- "type": "function",
542
- "name": "getAssets",
543
- "inputs": [],
544
- "outputs": [
545
- {
546
- "name": "",
547
- "type": "address[]"
548
- }
549
- ]
550
- },
551
- {
552
- "stateMutability": "view",
553
- "type": "function",
554
- "name": "isAssetOpportunity",
555
- "inputs": [
556
- {
557
- "name": "_asset",
558
- "type": "address"
559
- },
560
- {
561
- "name": "_vaultAddr",
562
- "type": "address"
563
- }
564
- ],
565
- "outputs": [
566
- {
567
- "name": "",
568
- "type": "bool"
569
- }
570
- ]
571
- },
572
- {
573
- "stateMutability": "view",
574
- "type": "function",
575
- "name": "getNumLegoAssets",
576
- "inputs": [],
577
- "outputs": [
578
- {
579
- "name": "",
580
- "type": "uint256"
581
- }
582
- ]
583
- },
584
- {
585
- "stateMutability": "nonpayable",
586
- "type": "function",
587
- "name": "pause",
588
- "inputs": [
589
- {
590
- "name": "_shouldPause",
591
- "type": "bool"
592
- }
593
- ],
594
- "outputs": []
595
- },
596
- {
597
- "stateMutability": "nonpayable",
598
- "type": "function",
599
- "name": "recoverFunds",
600
- "inputs": [
601
- {
602
- "name": "_recipient",
603
- "type": "address"
604
- },
605
- {
606
- "name": "_asset",
607
- "type": "address"
608
- }
609
- ],
610
- "outputs": []
611
- },
612
- {
613
- "stateMutability": "nonpayable",
614
- "type": "function",
615
- "name": "recoverFundsMany",
616
- "inputs": [
617
- {
618
- "name": "_recipient",
619
- "type": "address"
620
- },
621
- {
622
- "name": "_assets",
623
- "type": "address[]"
624
- }
625
- ],
626
- "outputs": []
627
- },
628
- {
629
- "stateMutability": "view",
630
- "type": "function",
631
- "name": "getWeightedPricePerShare",
632
- "inputs": [
633
- {
634
- "name": "_vaultToken",
635
- "type": "address"
636
- }
637
- ],
638
- "outputs": [
639
- {
640
- "name": "",
641
- "type": "uint256"
642
- }
643
- ]
644
- },
645
- {
646
- "stateMutability": "view",
647
- "type": "function",
648
- "name": "getLatestSnapshot",
649
- "inputs": [
650
- {
651
- "name": "_vaultToken",
652
- "type": "address"
653
- },
654
- {
655
- "name": "_pricePerShare",
656
- "type": "uint256"
657
- }
658
- ],
659
- "outputs": [
660
- {
661
- "name": "",
662
- "type": "tuple",
663
- "components": [
664
- {
665
- "name": "totalSupply",
666
- "type": "uint256"
667
- },
668
- {
669
- "name": "pricePerShare",
670
- "type": "uint256"
671
- },
672
- {
673
- "name": "lastUpdate",
674
- "type": "uint256"
675
- }
676
- ]
677
- }
678
- ]
679
- },
680
- {
681
- "stateMutability": "nonpayable",
682
- "type": "function",
683
- "name": "setSnapShotPriceConfig",
684
- "inputs": [
685
- {
686
- "name": "_config",
687
- "type": "tuple",
688
- "components": [
689
- {
690
- "name": "minSnapshotDelay",
691
- "type": "uint256"
692
- },
693
- {
694
- "name": "maxNumSnapshots",
695
- "type": "uint256"
696
- },
697
- {
698
- "name": "maxUpsideDeviation",
699
- "type": "uint256"
700
- },
701
- {
702
- "name": "staleTime",
703
- "type": "uint256"
704
- }
705
- ]
706
- }
707
- ],
708
- "outputs": []
709
- },
710
- {
711
- "stateMutability": "view",
712
- "type": "function",
713
- "name": "isValidPriceConfig",
714
- "inputs": [
715
- {
716
- "name": "_config",
717
- "type": "tuple",
718
- "components": [
719
- {
720
- "name": "minSnapshotDelay",
721
- "type": "uint256"
722
- },
723
- {
724
- "name": "maxNumSnapshots",
725
- "type": "uint256"
726
- },
727
- {
728
- "name": "maxUpsideDeviation",
729
- "type": "uint256"
730
- },
731
- {
732
- "name": "staleTime",
733
- "type": "uint256"
734
- }
735
- ]
736
- }
737
- ],
738
- "outputs": [
739
- {
740
- "name": "",
741
- "type": "bool"
742
- }
743
- ]
744
- },
745
- {
746
- "stateMutability": "view",
747
- "type": "function",
748
- "name": "vaultToAsset",
749
- "inputs": [
750
- {
751
- "name": "arg0",
752
- "type": "address"
753
- }
754
- ],
755
- "outputs": [
756
- {
757
- "name": "",
758
- "type": "tuple",
759
- "components": [
760
- {
761
- "name": "underlyingAsset",
762
- "type": "address"
763
- },
764
- {
765
- "name": "decimals",
766
- "type": "uint256"
767
- },
768
- {
769
- "name": "lastAveragePricePerShare",
770
- "type": "uint256"
771
- }
772
- ]
773
- }
774
- ]
775
- },
776
- {
777
- "stateMutability": "view",
778
- "type": "function",
779
- "name": "assetOpportunities",
780
- "inputs": [
781
- {
782
- "name": "arg0",
783
- "type": "address"
784
- },
785
- {
786
- "name": "arg1",
787
- "type": "uint256"
788
- }
789
- ],
790
- "outputs": [
791
- {
792
- "name": "",
793
- "type": "address"
794
- }
795
- ]
796
- },
797
- {
798
- "stateMutability": "view",
799
- "type": "function",
800
- "name": "indexOfAssetOpportunity",
801
- "inputs": [
802
- {
803
- "name": "arg0",
804
- "type": "address"
805
- },
806
- {
807
- "name": "arg1",
808
- "type": "address"
809
- }
810
- ],
811
- "outputs": [
812
- {
813
- "name": "",
814
- "type": "uint256"
815
- }
816
- ]
817
- },
818
- {
819
- "stateMutability": "view",
820
- "type": "function",
821
- "name": "numAssetOpportunities",
822
- "inputs": [
823
- {
824
- "name": "arg0",
825
- "type": "address"
826
- }
827
- ],
828
- "outputs": [
829
- {
830
- "name": "",
831
- "type": "uint256"
832
- }
833
- ]
834
- },
835
- {
836
- "stateMutability": "view",
837
- "type": "function",
838
- "name": "assets",
839
- "inputs": [
840
- {
841
- "name": "arg0",
842
- "type": "uint256"
843
- }
844
- ],
845
- "outputs": [
846
- {
847
- "name": "",
848
- "type": "address"
849
- }
850
- ]
851
- },
852
- {
853
- "stateMutability": "view",
854
- "type": "function",
855
- "name": "indexOfAsset",
856
- "inputs": [
857
- {
858
- "name": "arg0",
859
- "type": "address"
860
- }
861
- ],
862
- "outputs": [
863
- {
864
- "name": "",
865
- "type": "uint256"
866
- }
867
- ]
868
- },
869
- {
870
- "stateMutability": "view",
871
- "type": "function",
872
- "name": "numAssets",
873
- "inputs": [],
874
- "outputs": [
875
- {
876
- "name": "",
877
- "type": "uint256"
878
- }
879
- ]
880
- },
881
- {
882
- "stateMutability": "view",
883
- "type": "function",
884
- "name": "snapShotData",
885
- "inputs": [
886
- {
887
- "name": "arg0",
888
- "type": "address"
889
- }
890
- ],
891
- "outputs": [
892
- {
893
- "name": "",
894
- "type": "tuple",
895
- "components": [
896
- {
897
- "name": "lastSnapShot",
898
- "type": "tuple",
899
- "components": [
900
- {
901
- "name": "totalSupply",
902
- "type": "uint256"
903
- },
904
- {
905
- "name": "pricePerShare",
906
- "type": "uint256"
907
- },
908
- {
909
- "name": "lastUpdate",
910
- "type": "uint256"
911
- }
912
- ]
913
- },
914
- {
915
- "name": "nextIndex",
916
- "type": "uint256"
917
- }
918
- ]
919
- }
920
- ]
921
- },
922
- {
923
- "stateMutability": "view",
924
- "type": "function",
925
- "name": "snapShots",
926
- "inputs": [
927
- {
928
- "name": "arg0",
929
- "type": "address"
930
- },
931
- {
932
- "name": "arg1",
933
- "type": "uint256"
934
- }
935
- ],
936
- "outputs": [
937
- {
938
- "name": "",
939
- "type": "tuple",
940
- "components": [
941
- {
942
- "name": "totalSupply",
943
- "type": "uint256"
944
- },
945
- {
946
- "name": "pricePerShare",
947
- "type": "uint256"
948
- },
949
- {
950
- "name": "lastUpdate",
951
- "type": "uint256"
952
- }
953
- ]
954
- }
955
- ]
956
- },
957
- {
958
- "stateMutability": "view",
959
- "type": "function",
960
- "name": "snapShotPriceConfig",
961
- "inputs": [],
962
- "outputs": [
963
- {
964
- "name": "",
965
- "type": "tuple",
966
- "components": [
967
- {
968
- "name": "minSnapshotDelay",
969
- "type": "uint256"
970
- },
971
- {
972
- "name": "maxNumSnapshots",
973
- "type": "uint256"
974
- },
975
- {
976
- "name": "maxUpsideDeviation",
977
- "type": "uint256"
978
- },
979
- {
980
- "name": "staleTime",
981
- "type": "uint256"
982
- }
983
- ]
984
- }
985
- ]
986
- },
987
- {
988
- "stateMutability": "view",
989
- "type": "function",
990
- "name": "isPaused",
991
- "inputs": [],
992
- "outputs": [
993
- {
994
- "name": "",
995
- "type": "bool"
996
- }
997
- ]
998
- },
999
- {
1000
- "stateMutability": "view",
1001
- "type": "function",
1002
- "name": "hasCapability",
1003
- "inputs": [
1004
- {
1005
- "name": "_action",
1006
- "type": "uint256"
1007
- }
1008
- ],
1009
- "outputs": [
1010
- {
1011
- "name": "",
1012
- "type": "bool"
1013
- }
1014
- ]
1015
- },
1016
- {
1017
- "stateMutability": "view",
1018
- "type": "function",
1019
- "name": "getRegistries",
1020
- "inputs": [],
1021
- "outputs": [
1022
- {
1023
- "name": "",
1024
- "type": "address[]"
1025
- }
1026
- ]
1027
- },
1028
- {
1029
- "stateMutability": "view",
1030
- "type": "function",
1031
- "name": "isYieldLego",
1032
- "inputs": [],
1033
- "outputs": [
1034
- {
1035
- "name": "",
1036
- "type": "bool"
1037
- }
1038
- ]
1039
- },
1040
- {
1041
- "stateMutability": "view",
1042
- "type": "function",
1043
- "name": "isDexLego",
1044
- "inputs": [],
1045
- "outputs": [
1046
- {
1047
- "name": "",
1048
- "type": "bool"
1049
- }
1050
- ]
1051
- },
1052
- {
1053
- "stateMutability": "view",
1054
- "type": "function",
1055
- "name": "getUnderlyingAsset",
1056
- "inputs": [
1057
- {
1058
- "name": "_vaultToken",
1059
- "type": "address"
1060
- }
1061
- ],
1062
- "outputs": [
1063
- {
1064
- "name": "",
1065
- "type": "address"
1066
- }
1067
- ]
1068
- },
1069
- {
1070
- "stateMutability": "view",
1071
- "type": "function",
1072
- "name": "getUnderlyingBalances",
1073
- "inputs": [
1074
- {
1075
- "name": "_vaultToken",
1076
- "type": "address"
1077
- },
1078
- {
1079
- "name": "_vaultTokenBalance",
1080
- "type": "uint256"
1081
- }
1082
- ],
1083
- "outputs": [
1084
- {
1085
- "name": "",
1086
- "type": "uint256"
1087
- },
1088
- {
1089
- "name": "",
1090
- "type": "uint256"
1091
- }
1092
- ]
1093
- },
1094
- {
1095
- "stateMutability": "view",
1096
- "type": "function",
1097
- "name": "getUnderlyingAmount",
1098
- "inputs": [
1099
- {
1100
- "name": "_vaultToken",
1101
- "type": "address"
1102
- },
1103
- {
1104
- "name": "_vaultTokenAmount",
1105
- "type": "uint256"
1106
- }
1107
- ],
1108
- "outputs": [
1109
- {
1110
- "name": "",
1111
- "type": "uint256"
1112
- }
1113
- ]
1114
- },
1115
- {
1116
- "stateMutability": "view",
1117
- "type": "function",
1118
- "name": "getUnderlyingAmountSafe",
1119
- "inputs": [
1120
- {
1121
- "name": "_vaultToken",
1122
- "type": "address"
1123
- },
1124
- {
1125
- "name": "_vaultTokenBalance",
1126
- "type": "uint256"
1127
- }
1128
- ],
1129
- "outputs": [
1130
- {
1131
- "name": "",
1132
- "type": "uint256"
1133
- }
1134
- ]
1135
- },
1136
- {
1137
- "stateMutability": "view",
1138
- "type": "function",
1139
- "name": "getUnderlyingData",
1140
- "inputs": [
1141
- {
1142
- "name": "_vaultToken",
1143
- "type": "address"
1144
- },
1145
- {
1146
- "name": "_vaultTokenAmount",
1147
- "type": "uint256"
1148
- }
1149
- ],
1150
- "outputs": [
1151
- {
1152
- "name": "",
1153
- "type": "address"
1154
- },
1155
- {
1156
- "name": "",
1157
- "type": "uint256"
1158
- },
1159
- {
1160
- "name": "",
1161
- "type": "uint256"
1162
- }
1163
- ]
1164
- },
1165
- {
1166
- "stateMutability": "view",
1167
- "type": "function",
1168
- "name": "getUnderlyingData",
1169
- "inputs": [
1170
- {
1171
- "name": "_vaultToken",
1172
- "type": "address"
1173
- },
1174
- {
1175
- "name": "_vaultTokenAmount",
1176
- "type": "uint256"
1177
- },
1178
- {
1179
- "name": "_appraiser",
1180
- "type": "address"
1181
- }
1182
- ],
1183
- "outputs": [
1184
- {
1185
- "name": "",
1186
- "type": "address"
1187
- },
1188
- {
1189
- "name": "",
1190
- "type": "uint256"
1191
- },
1192
- {
1193
- "name": "",
1194
- "type": "uint256"
1195
- }
1196
- ]
1197
- },
1198
- {
1199
- "stateMutability": "view",
1200
- "type": "function",
1201
- "name": "getUsdValueOfVaultToken",
1202
- "inputs": [
1203
- {
1204
- "name": "_vaultToken",
1205
- "type": "address"
1206
- },
1207
- {
1208
- "name": "_vaultTokenAmount",
1209
- "type": "uint256"
1210
- }
1211
- ],
1212
- "outputs": [
1213
- {
1214
- "name": "",
1215
- "type": "uint256"
1216
- }
1217
- ]
1218
- },
1219
- {
1220
- "stateMutability": "view",
1221
- "type": "function",
1222
- "name": "getUsdValueOfVaultToken",
1223
- "inputs": [
1224
- {
1225
- "name": "_vaultToken",
1226
- "type": "address"
1227
- },
1228
- {
1229
- "name": "_vaultTokenAmount",
1230
- "type": "uint256"
1231
- },
1232
- {
1233
- "name": "_appraiser",
1234
- "type": "address"
1235
- }
1236
- ],
1237
- "outputs": [
1238
- {
1239
- "name": "",
1240
- "type": "uint256"
1241
- }
1242
- ]
1243
- },
1244
- {
1245
- "stateMutability": "view",
1246
- "type": "function",
1247
- "name": "isRebasing",
1248
- "inputs": [],
1249
- "outputs": [
1250
- {
1251
- "name": "",
1252
- "type": "bool"
1253
- }
1254
- ]
1255
- },
1256
- {
1257
- "stateMutability": "view",
1258
- "type": "function",
1259
- "name": "getPricePerShare",
1260
- "inputs": [
1261
- {
1262
- "name": "_vaultToken",
1263
- "type": "address"
1264
- }
1265
- ],
1266
- "outputs": [
1267
- {
1268
- "name": "",
1269
- "type": "uint256"
1270
- }
1271
- ]
1272
- },
1273
- {
1274
- "stateMutability": "view",
1275
- "type": "function",
1276
- "name": "getPricePerShare",
1277
- "inputs": [
1278
- {
1279
- "name": "_vaultToken",
1280
- "type": "address"
1281
- },
1282
- {
1283
- "name": "_decimals",
1284
- "type": "uint256"
1285
- }
1286
- ],
1287
- "outputs": [
1288
- {
1289
- "name": "",
1290
- "type": "uint256"
1291
- }
1292
- ]
1293
- },
1294
- {
1295
- "stateMutability": "view",
1296
- "type": "function",
1297
- "name": "getVaultTokenAmount",
1298
- "inputs": [
1299
- {
1300
- "name": "_asset",
1301
- "type": "address"
1302
- },
1303
- {
1304
- "name": "_assetAmount",
1305
- "type": "uint256"
1306
- },
1307
- {
1308
- "name": "_vaultToken",
1309
- "type": "address"
1310
- }
1311
- ],
1312
- "outputs": [
1313
- {
1314
- "name": "",
1315
- "type": "uint256"
1316
- }
1317
- ]
1318
- },
1319
- {
1320
- "stateMutability": "view",
1321
- "type": "function",
1322
- "name": "totalAssets",
1323
- "inputs": [
1324
- {
1325
- "name": "_vaultToken",
1326
- "type": "address"
1327
- }
1328
- ],
1329
- "outputs": [
1330
- {
1331
- "name": "",
1332
- "type": "uint256"
1333
- }
1334
- ]
1335
- },
1336
- {
1337
- "stateMutability": "view",
1338
- "type": "function",
1339
- "name": "totalBorrows",
1340
- "inputs": [
1341
- {
1342
- "name": "_vaultToken",
1343
- "type": "address"
1344
- }
1345
- ],
1346
- "outputs": [
1347
- {
1348
- "name": "",
1349
- "type": "uint256"
1350
- }
1351
- ]
1352
- },
1353
- {
1354
- "stateMutability": "view",
1355
- "type": "function",
1356
- "name": "getAvailLiquidity",
1357
- "inputs": [
1358
- {
1359
- "name": "_vaultToken",
1360
- "type": "address"
1361
- }
1362
- ],
1363
- "outputs": [
1364
- {
1365
- "name": "",
1366
- "type": "uint256"
1367
- }
1368
- ]
1369
- },
1370
- {
1371
- "stateMutability": "view",
1372
- "type": "function",
1373
- "name": "getUtilizationRatio",
1374
- "inputs": [
1375
- {
1376
- "name": "_vaultToken",
1377
- "type": "address"
1378
- }
1379
- ],
1380
- "outputs": [
1381
- {
1382
- "name": "",
1383
- "type": "uint256"
1384
- }
1385
- ]
1386
- },
1387
- {
1388
- "stateMutability": "view",
1389
- "type": "function",
1390
- "name": "isEligibleForYieldBonus",
1391
- "inputs": [
1392
- {
1393
- "name": "_asset",
1394
- "type": "address"
1395
- }
1396
- ],
1397
- "outputs": [
1398
- {
1399
- "name": "",
1400
- "type": "bool"
1401
- }
1402
- ]
1403
- },
1404
- {
1405
- "stateMutability": "view",
1406
- "type": "function",
1407
- "name": "getWithdrawalFees",
1408
- "inputs": [
1409
- {
1410
- "name": "_vaultToken",
1411
- "type": "address"
1412
- },
1413
- {
1414
- "name": "_vaultTokenAmount",
1415
- "type": "uint256"
1416
- }
1417
- ],
1418
- "outputs": [
1419
- {
1420
- "name": "",
1421
- "type": "uint256"
1422
- }
1423
- ]
1424
- },
1425
- {
1426
- "stateMutability": "view",
1427
- "type": "function",
1428
- "name": "canRegisterVaultToken",
1429
- "inputs": [
1430
- {
1431
- "name": "_asset",
1432
- "type": "address"
1433
- },
1434
- {
1435
- "name": "_vaultToken",
1436
- "type": "address"
1437
- }
1438
- ],
1439
- "outputs": [
1440
- {
1441
- "name": "",
1442
- "type": "bool"
1443
- }
1444
- ]
1445
- },
1446
- {
1447
- "stateMutability": "nonpayable",
1448
- "type": "function",
1449
- "name": "registerVaultTokenLocally",
1450
- "inputs": [
1451
- {
1452
- "name": "_asset",
1453
- "type": "address"
1454
- },
1455
- {
1456
- "name": "_vaultAddr",
1457
- "type": "address"
1458
- }
1459
- ],
1460
- "outputs": [
1461
- {
1462
- "name": "",
1463
- "type": "tuple",
1464
- "components": [
1465
- {
1466
- "name": "underlyingAsset",
1467
- "type": "address"
1468
- },
1469
- {
1470
- "name": "decimals",
1471
- "type": "uint256"
1472
- },
1473
- {
1474
- "name": "lastAveragePricePerShare",
1475
- "type": "uint256"
1476
- }
1477
- ]
1478
- }
1479
- ]
1480
- },
1481
- {
1482
- "stateMutability": "nonpayable",
1483
- "type": "function",
1484
- "name": "deregisterVaultTokenLocally",
1485
- "inputs": [
1486
- {
1487
- "name": "_asset",
1488
- "type": "address"
1489
- },
1490
- {
1491
- "name": "_vaultAddr",
1492
- "type": "address"
1493
- }
1494
- ],
1495
- "outputs": []
1496
- },
1497
- {
1498
- "stateMutability": "nonpayable",
1499
- "type": "function",
1500
- "name": "addPriceSnapshot",
1501
- "inputs": [
1502
- {
1503
- "name": "_vaultToken",
1504
- "type": "address"
1505
- }
1506
- ],
1507
- "outputs": [
1508
- {
1509
- "name": "",
1510
- "type": "bool"
1511
- }
1512
- ]
1513
- },
1514
- {
1515
- "stateMutability": "nonpayable",
1516
- "type": "function",
1517
- "name": "depositForYield",
1518
- "inputs": [
1519
- {
1520
- "name": "_asset",
1521
- "type": "address"
1522
- },
1523
- {
1524
- "name": "_amount",
1525
- "type": "uint256"
1526
- },
1527
- {
1528
- "name": "_vaultAddr",
1529
- "type": "address"
1530
- },
1531
- {
1532
- "name": "_extraData",
1533
- "type": "bytes32"
1534
- },
1535
- {
1536
- "name": "_recipient",
1537
- "type": "address"
1538
- }
1539
- ],
1540
- "outputs": [
1541
- {
1542
- "name": "",
1543
- "type": "uint256"
1544
- },
1545
- {
1546
- "name": "",
1547
- "type": "address"
1548
- },
1549
- {
1550
- "name": "",
1551
- "type": "uint256"
1552
- },
1553
- {
1554
- "name": "",
1555
- "type": "uint256"
1556
- }
1557
- ]
1558
- },
1559
- {
1560
- "stateMutability": "nonpayable",
1561
- "type": "function",
1562
- "name": "depositForYield",
1563
- "inputs": [
1564
- {
1565
- "name": "_asset",
1566
- "type": "address"
1567
- },
1568
- {
1569
- "name": "_amount",
1570
- "type": "uint256"
1571
- },
1572
- {
1573
- "name": "_vaultAddr",
1574
- "type": "address"
1575
- },
1576
- {
1577
- "name": "_extraData",
1578
- "type": "bytes32"
1579
- },
1580
- {
1581
- "name": "_recipient",
1582
- "type": "address"
1583
- },
1584
- {
1585
- "name": "_miniAddys",
1586
- "type": "tuple",
1587
- "components": [
1588
- {
1589
- "name": "ledger",
1590
- "type": "address"
1591
- },
1592
- {
1593
- "name": "missionControl",
1594
- "type": "address"
1595
- },
1596
- {
1597
- "name": "legoBook",
1598
- "type": "address"
1599
- },
1600
- {
1601
- "name": "appraiser",
1602
- "type": "address"
1603
- }
1604
- ]
1605
- }
1606
- ],
1607
- "outputs": [
1608
- {
1609
- "name": "",
1610
- "type": "uint256"
1611
- },
1612
- {
1613
- "name": "",
1614
- "type": "address"
1615
- },
1616
- {
1617
- "name": "",
1618
- "type": "uint256"
1619
- },
1620
- {
1621
- "name": "",
1622
- "type": "uint256"
1623
- }
1624
- ]
1625
- },
1626
- {
1627
- "stateMutability": "nonpayable",
1628
- "type": "function",
1629
- "name": "withdrawFromYield",
1630
- "inputs": [
1631
- {
1632
- "name": "_vaultToken",
1633
- "type": "address"
1634
- },
1635
- {
1636
- "name": "_amount",
1637
- "type": "uint256"
1638
- },
1639
- {
1640
- "name": "_extraData",
1641
- "type": "bytes32"
1642
- },
1643
- {
1644
- "name": "_recipient",
1645
- "type": "address"
1646
- }
1647
- ],
1648
- "outputs": [
1649
- {
1650
- "name": "",
1651
- "type": "uint256"
1652
- },
1653
- {
1654
- "name": "",
1655
- "type": "address"
1656
- },
1657
- {
1658
- "name": "",
1659
- "type": "uint256"
1660
- },
1661
- {
1662
- "name": "",
1663
- "type": "uint256"
1664
- }
1665
- ]
1666
- },
1667
- {
1668
- "stateMutability": "nonpayable",
1669
- "type": "function",
1670
- "name": "withdrawFromYield",
1671
- "inputs": [
1672
- {
1673
- "name": "_vaultToken",
1674
- "type": "address"
1675
- },
1676
- {
1677
- "name": "_amount",
1678
- "type": "uint256"
1679
- },
1680
- {
1681
- "name": "_extraData",
1682
- "type": "bytes32"
1683
- },
1684
- {
1685
- "name": "_recipient",
1686
- "type": "address"
1687
- },
1688
- {
1689
- "name": "_miniAddys",
1690
- "type": "tuple",
1691
- "components": [
1692
- {
1693
- "name": "ledger",
1694
- "type": "address"
1695
- },
1696
- {
1697
- "name": "missionControl",
1698
- "type": "address"
1699
- },
1700
- {
1701
- "name": "legoBook",
1702
- "type": "address"
1703
- },
1704
- {
1705
- "name": "appraiser",
1706
- "type": "address"
1707
- }
1708
- ]
1709
- }
1710
- ],
1711
- "outputs": [
1712
- {
1713
- "name": "",
1714
- "type": "uint256"
1715
- },
1716
- {
1717
- "name": "",
1718
- "type": "address"
1719
- },
1720
- {
1721
- "name": "",
1722
- "type": "uint256"
1723
- },
1724
- {
1725
- "name": "",
1726
- "type": "uint256"
1727
- }
1728
- ]
1729
- },
1730
- {
1731
- "stateMutability": "nonpayable",
1732
- "type": "function",
1733
- "name": "swapTokens",
1734
- "inputs": [
1735
- {
1736
- "name": "_amountIn",
1737
- "type": "uint256"
1738
- },
1739
- {
1740
- "name": "_minAmountOut",
1741
- "type": "uint256"
1742
- },
1743
- {
1744
- "name": "_tokenPath",
1745
- "type": "address[]"
1746
- },
1747
- {
1748
- "name": "_poolPath",
1749
- "type": "address[]"
1750
- },
1751
- {
1752
- "name": "_recipient",
1753
- "type": "address"
1754
- }
1755
- ],
1756
- "outputs": [
1757
- {
1758
- "name": "",
1759
- "type": "uint256"
1760
- },
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": "swapTokens",
1775
- "inputs": [
1776
- {
1777
- "name": "_amountIn",
1778
- "type": "uint256"
1779
- },
1780
- {
1781
- "name": "_minAmountOut",
1782
- "type": "uint256"
1783
- },
1784
- {
1785
- "name": "_tokenPath",
1786
- "type": "address[]"
1787
- },
1788
- {
1789
- "name": "_poolPath",
1790
- "type": "address[]"
1791
- },
1792
- {
1793
- "name": "_recipient",
1794
- "type": "address"
1795
- },
1796
- {
1797
- "name": "_miniAddys",
1798
- "type": "tuple",
1799
- "components": [
1800
- {
1801
- "name": "ledger",
1802
- "type": "address"
1803
- },
1804
- {
1805
- "name": "missionControl",
1806
- "type": "address"
1807
- },
1808
- {
1809
- "name": "legoBook",
1810
- "type": "address"
1811
- },
1812
- {
1813
- "name": "appraiser",
1814
- "type": "address"
1815
- }
1816
- ]
1817
- }
1818
- ],
1819
- "outputs": [
1820
- {
1821
- "name": "",
1822
- "type": "uint256"
1823
- },
1824
- {
1825
- "name": "",
1826
- "type": "uint256"
1827
- },
1828
- {
1829
- "name": "",
1830
- "type": "uint256"
1831
- }
1832
- ]
1833
- },
1834
- {
1835
- "stateMutability": "nonpayable",
1836
- "type": "function",
1837
- "name": "addCollateral",
1838
- "inputs": [
1839
- {
1840
- "name": "_asset",
1841
- "type": "address"
1842
- },
1843
- {
1844
- "name": "_amount",
1845
- "type": "uint256"
1846
- },
1847
- {
1848
- "name": "_extraData",
1849
- "type": "bytes32"
1850
- },
1851
- {
1852
- "name": "_recipient",
1853
- "type": "address"
1854
- }
1855
- ],
1856
- "outputs": [
1857
- {
1858
- "name": "",
1859
- "type": "uint256"
1860
- },
1861
- {
1862
- "name": "",
1863
- "type": "uint256"
1864
- }
1865
- ]
1866
- },
1867
- {
1868
- "stateMutability": "nonpayable",
1869
- "type": "function",
1870
- "name": "addCollateral",
1871
- "inputs": [
1872
- {
1873
- "name": "_asset",
1874
- "type": "address"
1875
- },
1876
- {
1877
- "name": "_amount",
1878
- "type": "uint256"
1879
- },
1880
- {
1881
- "name": "_extraData",
1882
- "type": "bytes32"
1883
- },
1884
- {
1885
- "name": "_recipient",
1886
- "type": "address"
1887
- },
1888
- {
1889
- "name": "_miniAddys",
1890
- "type": "tuple",
1891
- "components": [
1892
- {
1893
- "name": "ledger",
1894
- "type": "address"
1895
- },
1896
- {
1897
- "name": "missionControl",
1898
- "type": "address"
1899
- },
1900
- {
1901
- "name": "legoBook",
1902
- "type": "address"
1903
- },
1904
- {
1905
- "name": "appraiser",
1906
- "type": "address"
1907
- }
1908
- ]
1909
- }
1910
- ],
1911
- "outputs": [
1912
- {
1913
- "name": "",
1914
- "type": "uint256"
1915
- },
1916
- {
1917
- "name": "",
1918
- "type": "uint256"
1919
- }
1920
- ]
1921
- },
1922
- {
1923
- "stateMutability": "nonpayable",
1924
- "type": "function",
1925
- "name": "removeCollateral",
1926
- "inputs": [
1927
- {
1928
- "name": "_asset",
1929
- "type": "address"
1930
- },
1931
- {
1932
- "name": "_amount",
1933
- "type": "uint256"
1934
- },
1935
- {
1936
- "name": "_extraData",
1937
- "type": "bytes32"
1938
- },
1939
- {
1940
- "name": "_recipient",
1941
- "type": "address"
1942
- }
1943
- ],
1944
- "outputs": [
1945
- {
1946
- "name": "",
1947
- "type": "uint256"
1948
- },
1949
- {
1950
- "name": "",
1951
- "type": "uint256"
1952
- }
1953
- ]
1954
- },
1955
- {
1956
- "stateMutability": "nonpayable",
1957
- "type": "function",
1958
- "name": "removeCollateral",
1959
- "inputs": [
1960
- {
1961
- "name": "_asset",
1962
- "type": "address"
1963
- },
1964
- {
1965
- "name": "_amount",
1966
- "type": "uint256"
1967
- },
1968
- {
1969
- "name": "_extraData",
1970
- "type": "bytes32"
1971
- },
1972
- {
1973
- "name": "_recipient",
1974
- "type": "address"
1975
- },
1976
- {
1977
- "name": "_miniAddys",
1978
- "type": "tuple",
1979
- "components": [
1980
- {
1981
- "name": "ledger",
1982
- "type": "address"
1983
- },
1984
- {
1985
- "name": "missionControl",
1986
- "type": "address"
1987
- },
1988
- {
1989
- "name": "legoBook",
1990
- "type": "address"
1991
- },
1992
- {
1993
- "name": "appraiser",
1994
- "type": "address"
1995
- }
1996
- ]
1997
- }
1998
- ],
1999
- "outputs": [
2000
- {
2001
- "name": "",
2002
- "type": "uint256"
2003
- },
2004
- {
2005
- "name": "",
2006
- "type": "uint256"
2007
- }
2008
- ]
2009
- },
2010
- {
2011
- "stateMutability": "nonpayable",
2012
- "type": "function",
2013
- "name": "borrow",
2014
- "inputs": [
2015
- {
2016
- "name": "_borrowAsset",
2017
- "type": "address"
2018
- },
2019
- {
2020
- "name": "_amount",
2021
- "type": "uint256"
2022
- },
2023
- {
2024
- "name": "_extraData",
2025
- "type": "bytes32"
2026
- },
2027
- {
2028
- "name": "_recipient",
2029
- "type": "address"
2030
- }
2031
- ],
2032
- "outputs": [
2033
- {
2034
- "name": "",
2035
- "type": "uint256"
2036
- },
2037
- {
2038
- "name": "",
2039
- "type": "uint256"
2040
- }
2041
- ]
2042
- },
2043
- {
2044
- "stateMutability": "nonpayable",
2045
- "type": "function",
2046
- "name": "borrow",
2047
- "inputs": [
2048
- {
2049
- "name": "_borrowAsset",
2050
- "type": "address"
2051
- },
2052
- {
2053
- "name": "_amount",
2054
- "type": "uint256"
2055
- },
2056
- {
2057
- "name": "_extraData",
2058
- "type": "bytes32"
2059
- },
2060
- {
2061
- "name": "_recipient",
2062
- "type": "address"
2063
- },
2064
- {
2065
- "name": "_miniAddys",
2066
- "type": "tuple",
2067
- "components": [
2068
- {
2069
- "name": "ledger",
2070
- "type": "address"
2071
- },
2072
- {
2073
- "name": "missionControl",
2074
- "type": "address"
2075
- },
2076
- {
2077
- "name": "legoBook",
2078
- "type": "address"
2079
- },
2080
- {
2081
- "name": "appraiser",
2082
- "type": "address"
2083
- }
2084
- ]
2085
- }
2086
- ],
2087
- "outputs": [
2088
- {
2089
- "name": "",
2090
- "type": "uint256"
2091
- },
2092
- {
2093
- "name": "",
2094
- "type": "uint256"
2095
- }
2096
- ]
2097
- },
2098
- {
2099
- "stateMutability": "nonpayable",
2100
- "type": "function",
2101
- "name": "repayDebt",
2102
- "inputs": [
2103
- {
2104
- "name": "_paymentAsset",
2105
- "type": "address"
2106
- },
2107
- {
2108
- "name": "_paymentAmount",
2109
- "type": "uint256"
2110
- },
2111
- {
2112
- "name": "_extraData",
2113
- "type": "bytes32"
2114
- },
2115
- {
2116
- "name": "_recipient",
2117
- "type": "address"
2118
- }
2119
- ],
2120
- "outputs": [
2121
- {
2122
- "name": "",
2123
- "type": "uint256"
2124
- },
2125
- {
2126
- "name": "",
2127
- "type": "uint256"
2128
- }
2129
- ]
2130
- },
2131
- {
2132
- "stateMutability": "nonpayable",
2133
- "type": "function",
2134
- "name": "repayDebt",
2135
- "inputs": [
2136
- {
2137
- "name": "_paymentAsset",
2138
- "type": "address"
2139
- },
2140
- {
2141
- "name": "_paymentAmount",
2142
- "type": "uint256"
2143
- },
2144
- {
2145
- "name": "_extraData",
2146
- "type": "bytes32"
2147
- },
2148
- {
2149
- "name": "_recipient",
2150
- "type": "address"
2151
- },
2152
- {
2153
- "name": "_miniAddys",
2154
- "type": "tuple",
2155
- "components": [
2156
- {
2157
- "name": "ledger",
2158
- "type": "address"
2159
- },
2160
- {
2161
- "name": "missionControl",
2162
- "type": "address"
2163
- },
2164
- {
2165
- "name": "legoBook",
2166
- "type": "address"
2167
- },
2168
- {
2169
- "name": "appraiser",
2170
- "type": "address"
2171
- }
2172
- ]
2173
- }
2174
- ],
2175
- "outputs": [
2176
- {
2177
- "name": "",
2178
- "type": "uint256"
2179
- },
2180
- {
2181
- "name": "",
2182
- "type": "uint256"
2183
- }
2184
- ]
2185
- },
2186
- {
2187
- "stateMutability": "nonpayable",
2188
- "type": "function",
2189
- "name": "deleverageWithSpecificAssets",
2190
- "inputs": [
2191
- {
2192
- "name": "_assets",
2193
- "type": "tuple[]",
2194
- "components": [
2195
- {
2196
- "name": "vaultId",
2197
- "type": "uint256"
2198
- },
2199
- {
2200
- "name": "asset",
2201
- "type": "address"
2202
- },
2203
- {
2204
- "name": "targetRepayAmount",
2205
- "type": "uint256"
2206
- }
2207
- ]
2208
- },
2209
- {
2210
- "name": "_user",
2211
- "type": "address"
2212
- }
2213
- ],
2214
- "outputs": [
2215
- {
2216
- "name": "",
2217
- "type": "uint256"
2218
- }
2219
- ]
2220
- },
2221
- {
2222
- "stateMutability": "nonpayable",
2223
- "type": "function",
2224
- "name": "deleverageUser",
2225
- "inputs": [
2226
- {
2227
- "name": "_user",
2228
- "type": "address"
2229
- }
2230
- ],
2231
- "outputs": [
2232
- {
2233
- "name": "",
2234
- "type": "uint256"
2235
- }
2236
- ]
2237
- },
2238
- {
2239
- "stateMutability": "nonpayable",
2240
- "type": "function",
2241
- "name": "deleverageUser",
2242
- "inputs": [
2243
- {
2244
- "name": "_user",
2245
- "type": "address"
2246
- },
2247
- {
2248
- "name": "_targetRepayAmount",
2249
- "type": "uint256"
2250
- }
2251
- ],
2252
- "outputs": [
2253
- {
2254
- "name": "",
2255
- "type": "uint256"
2256
- }
2257
- ]
2258
- },
2259
- {
2260
- "stateMutability": "view",
2261
- "type": "function",
2262
- "name": "getUserDebtAmount",
2263
- "inputs": [
2264
- {
2265
- "name": "_user",
2266
- "type": "address"
2267
- }
2268
- ],
2269
- "outputs": [
2270
- {
2271
- "name": "",
2272
- "type": "uint256"
2273
- }
2274
- ]
2275
- },
2276
- {
2277
- "stateMutability": "nonpayable",
2278
- "type": "function",
2279
- "name": "claimIncentives",
2280
- "inputs": [
2281
- {
2282
- "name": "_user",
2283
- "type": "address"
2284
- },
2285
- {
2286
- "name": "_rewardToken",
2287
- "type": "address"
2288
- },
2289
- {
2290
- "name": "_rewardAmount",
2291
- "type": "uint256"
2292
- },
2293
- {
2294
- "name": "_proofs",
2295
- "type": "bytes32[]"
2296
- }
2297
- ],
2298
- "outputs": [
2299
- {
2300
- "name": "",
2301
- "type": "uint256"
2302
- },
2303
- {
2304
- "name": "",
2305
- "type": "uint256"
2306
- }
2307
- ]
2308
- },
2309
- {
2310
- "stateMutability": "nonpayable",
2311
- "type": "function",
2312
- "name": "claimIncentives",
2313
- "inputs": [
2314
- {
2315
- "name": "_user",
2316
- "type": "address"
2317
- },
2318
- {
2319
- "name": "_rewardToken",
2320
- "type": "address"
2321
- },
2322
- {
2323
- "name": "_rewardAmount",
2324
- "type": "uint256"
2325
- },
2326
- {
2327
- "name": "_proofs",
2328
- "type": "bytes32[]"
2329
- },
2330
- {
2331
- "name": "_miniAddys",
2332
- "type": "tuple",
2333
- "components": [
2334
- {
2335
- "name": "ledger",
2336
- "type": "address"
2337
- },
2338
- {
2339
- "name": "missionControl",
2340
- "type": "address"
2341
- },
2342
- {
2343
- "name": "legoBook",
2344
- "type": "address"
2345
- },
2346
- {
2347
- "name": "appraiser",
2348
- "type": "address"
2349
- }
2350
- ]
2351
- }
2352
- ],
2353
- "outputs": [
2354
- {
2355
- "name": "",
2356
- "type": "uint256"
2357
- },
2358
- {
2359
- "name": "",
2360
- "type": "uint256"
2361
- }
2362
- ]
2363
- },
2364
- {
2365
- "stateMutability": "nonpayable",
2366
- "type": "function",
2367
- "name": "claimRewards",
2368
- "inputs": [
2369
- {
2370
- "name": "_user",
2371
- "type": "address"
2372
- },
2373
- {
2374
- "name": "_rewardToken",
2375
- "type": "address"
2376
- },
2377
- {
2378
- "name": "_rewardAmount",
2379
- "type": "uint256"
2380
- },
2381
- {
2382
- "name": "_extraData",
2383
- "type": "bytes32"
2384
- }
2385
- ],
2386
- "outputs": [
2387
- {
2388
- "name": "",
2389
- "type": "uint256"
2390
- },
2391
- {
2392
- "name": "",
2393
- "type": "uint256"
2394
- }
2395
- ]
2396
- },
2397
- {
2398
- "stateMutability": "nonpayable",
2399
- "type": "function",
2400
- "name": "claimRewards",
2401
- "inputs": [
2402
- {
2403
- "name": "_user",
2404
- "type": "address"
2405
- },
2406
- {
2407
- "name": "_rewardToken",
2408
- "type": "address"
2409
- },
2410
- {
2411
- "name": "_rewardAmount",
2412
- "type": "uint256"
2413
- },
2414
- {
2415
- "name": "_extraData",
2416
- "type": "bytes32"
2417
- },
2418
- {
2419
- "name": "_miniAddys",
2420
- "type": "tuple",
2421
- "components": [
2422
- {
2423
- "name": "ledger",
2424
- "type": "address"
2425
- },
2426
- {
2427
- "name": "missionControl",
2428
- "type": "address"
2429
- },
2430
- {
2431
- "name": "legoBook",
2432
- "type": "address"
2433
- },
2434
- {
2435
- "name": "appraiser",
2436
- "type": "address"
2437
- }
2438
- ]
2439
- }
2440
- ],
2441
- "outputs": [
2442
- {
2443
- "name": "",
2444
- "type": "uint256"
2445
- },
2446
- {
2447
- "name": "",
2448
- "type": "uint256"
2449
- }
2450
- ]
2451
- },
2452
- {
2453
- "stateMutability": "view",
2454
- "type": "function",
2455
- "name": "hasClaimableRewards",
2456
- "inputs": [
2457
- {
2458
- "name": "_user",
2459
- "type": "address"
2460
- }
2461
- ],
2462
- "outputs": [
2463
- {
2464
- "name": "",
2465
- "type": "bool"
2466
- }
2467
- ]
2468
- },
2469
- {
2470
- "stateMutability": "view",
2471
- "type": "function",
2472
- "name": "getAccessForLego",
2473
- "inputs": [
2474
- {
2475
- "name": "_user",
2476
- "type": "address"
2477
- },
2478
- {
2479
- "name": "_action",
2480
- "type": "uint256"
2481
- }
2482
- ],
2483
- "outputs": [
2484
- {
2485
- "name": "",
2486
- "type": "address"
2487
- },
2488
- {
2489
- "name": "",
2490
- "type": "string"
2491
- },
2492
- {
2493
- "name": "",
2494
- "type": "uint256"
2495
- }
2496
- ]
2497
- },
2498
- {
2499
- "stateMutability": "nonpayable",
2500
- "type": "function",
2501
- "name": "mintOrRedeemAsset",
2502
- "inputs": [
2503
- {
2504
- "name": "_tokenIn",
2505
- "type": "address"
2506
- },
2507
- {
2508
- "name": "_tokenOut",
2509
- "type": "address"
2510
- },
2511
- {
2512
- "name": "_tokenInAmount",
2513
- "type": "uint256"
2514
- },
2515
- {
2516
- "name": "_minAmountOut",
2517
- "type": "uint256"
2518
- },
2519
- {
2520
- "name": "_extraData",
2521
- "type": "bytes32"
2522
- },
2523
- {
2524
- "name": "_recipient",
2525
- "type": "address"
2526
- }
2527
- ],
2528
- "outputs": [
2529
- {
2530
- "name": "",
2531
- "type": "uint256"
2532
- },
2533
- {
2534
- "name": "",
2535
- "type": "uint256"
2536
- },
2537
- {
2538
- "name": "",
2539
- "type": "bool"
2540
- },
2541
- {
2542
- "name": "",
2543
- "type": "uint256"
2544
- }
2545
- ]
2546
- },
2547
- {
2548
- "stateMutability": "nonpayable",
2549
- "type": "function",
2550
- "name": "mintOrRedeemAsset",
2551
- "inputs": [
2552
- {
2553
- "name": "_tokenIn",
2554
- "type": "address"
2555
- },
2556
- {
2557
- "name": "_tokenOut",
2558
- "type": "address"
2559
- },
2560
- {
2561
- "name": "_tokenInAmount",
2562
- "type": "uint256"
2563
- },
2564
- {
2565
- "name": "_minAmountOut",
2566
- "type": "uint256"
2567
- },
2568
- {
2569
- "name": "_extraData",
2570
- "type": "bytes32"
2571
- },
2572
- {
2573
- "name": "_recipient",
2574
- "type": "address"
2575
- },
2576
- {
2577
- "name": "_miniAddys",
2578
- "type": "tuple",
2579
- "components": [
2580
- {
2581
- "name": "ledger",
2582
- "type": "address"
2583
- },
2584
- {
2585
- "name": "missionControl",
2586
- "type": "address"
2587
- },
2588
- {
2589
- "name": "legoBook",
2590
- "type": "address"
2591
- },
2592
- {
2593
- "name": "appraiser",
2594
- "type": "address"
2595
- }
2596
- ]
2597
- }
2598
- ],
2599
- "outputs": [
2600
- {
2601
- "name": "",
2602
- "type": "uint256"
2603
- },
2604
- {
2605
- "name": "",
2606
- "type": "uint256"
2607
- },
2608
- {
2609
- "name": "",
2610
- "type": "bool"
2611
- },
2612
- {
2613
- "name": "",
2614
- "type": "uint256"
2615
- }
2616
- ]
2617
- },
2618
- {
2619
- "stateMutability": "nonpayable",
2620
- "type": "function",
2621
- "name": "confirmMintOrRedeemAsset",
2622
- "inputs": [
2623
- {
2624
- "name": "_tokenIn",
2625
- "type": "address"
2626
- },
2627
- {
2628
- "name": "_tokenOut",
2629
- "type": "address"
2630
- },
2631
- {
2632
- "name": "_extraData",
2633
- "type": "bytes32"
2634
- },
2635
- {
2636
- "name": "_recipient",
2637
- "type": "address"
2638
- }
2639
- ],
2640
- "outputs": [
2641
- {
2642
- "name": "",
2643
- "type": "uint256"
2644
- },
2645
- {
2646
- "name": "",
2647
- "type": "uint256"
2648
- }
2649
- ]
2650
- },
2651
- {
2652
- "stateMutability": "nonpayable",
2653
- "type": "function",
2654
- "name": "confirmMintOrRedeemAsset",
2655
- "inputs": [
2656
- {
2657
- "name": "_tokenIn",
2658
- "type": "address"
2659
- },
2660
- {
2661
- "name": "_tokenOut",
2662
- "type": "address"
2663
- },
2664
- {
2665
- "name": "_extraData",
2666
- "type": "bytes32"
2667
- },
2668
- {
2669
- "name": "_recipient",
2670
- "type": "address"
2671
- },
2672
- {
2673
- "name": "_miniAddys",
2674
- "type": "tuple",
2675
- "components": [
2676
- {
2677
- "name": "ledger",
2678
- "type": "address"
2679
- },
2680
- {
2681
- "name": "missionControl",
2682
- "type": "address"
2683
- },
2684
- {
2685
- "name": "legoBook",
2686
- "type": "address"
2687
- },
2688
- {
2689
- "name": "appraiser",
2690
- "type": "address"
2691
- }
2692
- ]
2693
- }
2694
- ],
2695
- "outputs": [
2696
- {
2697
- "name": "",
2698
- "type": "uint256"
2699
- },
2700
- {
2701
- "name": "",
2702
- "type": "uint256"
2703
- }
2704
- ]
2705
- },
2706
- {
2707
- "stateMutability": "nonpayable",
2708
- "type": "function",
2709
- "name": "addLiquidity",
2710
- "inputs": [
2711
- {
2712
- "name": "_pool",
2713
- "type": "address"
2714
- },
2715
- {
2716
- "name": "_tokenA",
2717
- "type": "address"
2718
- },
2719
- {
2720
- "name": "_tokenB",
2721
- "type": "address"
2722
- },
2723
- {
2724
- "name": "_amountA",
2725
- "type": "uint256"
2726
- },
2727
- {
2728
- "name": "_amountB",
2729
- "type": "uint256"
2730
- },
2731
- {
2732
- "name": "_minAmountA",
2733
- "type": "uint256"
2734
- },
2735
- {
2736
- "name": "_minAmountB",
2737
- "type": "uint256"
2738
- },
2739
- {
2740
- "name": "_minLpAmount",
2741
- "type": "uint256"
2742
- },
2743
- {
2744
- "name": "_extraData",
2745
- "type": "bytes32"
2746
- },
2747
- {
2748
- "name": "_recipient",
2749
- "type": "address"
2750
- }
2751
- ],
2752
- "outputs": [
2753
- {
2754
- "name": "",
2755
- "type": "address"
2756
- },
2757
- {
2758
- "name": "",
2759
- "type": "uint256"
2760
- },
2761
- {
2762
- "name": "",
2763
- "type": "uint256"
2764
- },
2765
- {
2766
- "name": "",
2767
- "type": "uint256"
2768
- },
2769
- {
2770
- "name": "",
2771
- "type": "uint256"
2772
- }
2773
- ]
2774
- },
2775
- {
2776
- "stateMutability": "nonpayable",
2777
- "type": "function",
2778
- "name": "addLiquidity",
2779
- "inputs": [
2780
- {
2781
- "name": "_pool",
2782
- "type": "address"
2783
- },
2784
- {
2785
- "name": "_tokenA",
2786
- "type": "address"
2787
- },
2788
- {
2789
- "name": "_tokenB",
2790
- "type": "address"
2791
- },
2792
- {
2793
- "name": "_amountA",
2794
- "type": "uint256"
2795
- },
2796
- {
2797
- "name": "_amountB",
2798
- "type": "uint256"
2799
- },
2800
- {
2801
- "name": "_minAmountA",
2802
- "type": "uint256"
2803
- },
2804
- {
2805
- "name": "_minAmountB",
2806
- "type": "uint256"
2807
- },
2808
- {
2809
- "name": "_minLpAmount",
2810
- "type": "uint256"
2811
- },
2812
- {
2813
- "name": "_extraData",
2814
- "type": "bytes32"
2815
- },
2816
- {
2817
- "name": "_recipient",
2818
- "type": "address"
2819
- },
2820
- {
2821
- "name": "_miniAddys",
2822
- "type": "tuple",
2823
- "components": [
2824
- {
2825
- "name": "ledger",
2826
- "type": "address"
2827
- },
2828
- {
2829
- "name": "missionControl",
2830
- "type": "address"
2831
- },
2832
- {
2833
- "name": "legoBook",
2834
- "type": "address"
2835
- },
2836
- {
2837
- "name": "appraiser",
2838
- "type": "address"
2839
- }
2840
- ]
2841
- }
2842
- ],
2843
- "outputs": [
2844
- {
2845
- "name": "",
2846
- "type": "address"
2847
- },
2848
- {
2849
- "name": "",
2850
- "type": "uint256"
2851
- },
2852
- {
2853
- "name": "",
2854
- "type": "uint256"
2855
- },
2856
- {
2857
- "name": "",
2858
- "type": "uint256"
2859
- },
2860
- {
2861
- "name": "",
2862
- "type": "uint256"
2863
- }
2864
- ]
2865
- },
2866
- {
2867
- "stateMutability": "nonpayable",
2868
- "type": "function",
2869
- "name": "removeLiquidity",
2870
- "inputs": [
2871
- {
2872
- "name": "_pool",
2873
- "type": "address"
2874
- },
2875
- {
2876
- "name": "_tokenA",
2877
- "type": "address"
2878
- },
2879
- {
2880
- "name": "_tokenB",
2881
- "type": "address"
2882
- },
2883
- {
2884
- "name": "_lpToken",
2885
- "type": "address"
2886
- },
2887
- {
2888
- "name": "_lpAmount",
2889
- "type": "uint256"
2890
- },
2891
- {
2892
- "name": "_minAmountA",
2893
- "type": "uint256"
2894
- },
2895
- {
2896
- "name": "_minAmountB",
2897
- "type": "uint256"
2898
- },
2899
- {
2900
- "name": "_extraData",
2901
- "type": "bytes32"
2902
- },
2903
- {
2904
- "name": "_recipient",
2905
- "type": "address"
2906
- }
2907
- ],
2908
- "outputs": [
2909
- {
2910
- "name": "",
2911
- "type": "uint256"
2912
- },
2913
- {
2914
- "name": "",
2915
- "type": "uint256"
2916
- },
2917
- {
2918
- "name": "",
2919
- "type": "uint256"
2920
- },
2921
- {
2922
- "name": "",
2923
- "type": "uint256"
2924
- }
2925
- ]
2926
- },
2927
- {
2928
- "stateMutability": "nonpayable",
2929
- "type": "function",
2930
- "name": "removeLiquidity",
2931
- "inputs": [
2932
- {
2933
- "name": "_pool",
2934
- "type": "address"
2935
- },
2936
- {
2937
- "name": "_tokenA",
2938
- "type": "address"
2939
- },
2940
- {
2941
- "name": "_tokenB",
2942
- "type": "address"
2943
- },
2944
- {
2945
- "name": "_lpToken",
2946
- "type": "address"
2947
- },
2948
- {
2949
- "name": "_lpAmount",
2950
- "type": "uint256"
2951
- },
2952
- {
2953
- "name": "_minAmountA",
2954
- "type": "uint256"
2955
- },
2956
- {
2957
- "name": "_minAmountB",
2958
- "type": "uint256"
2959
- },
2960
- {
2961
- "name": "_extraData",
2962
- "type": "bytes32"
2963
- },
2964
- {
2965
- "name": "_recipient",
2966
- "type": "address"
2967
- },
2968
- {
2969
- "name": "_miniAddys",
2970
- "type": "tuple",
2971
- "components": [
2972
- {
2973
- "name": "ledger",
2974
- "type": "address"
2975
- },
2976
- {
2977
- "name": "missionControl",
2978
- "type": "address"
2979
- },
2980
- {
2981
- "name": "legoBook",
2982
- "type": "address"
2983
- },
2984
- {
2985
- "name": "appraiser",
2986
- "type": "address"
2987
- }
2988
- ]
2989
- }
2990
- ],
2991
- "outputs": [
2992
- {
2993
- "name": "",
2994
- "type": "uint256"
2995
- },
2996
- {
2997
- "name": "",
2998
- "type": "uint256"
2999
- },
3000
- {
3001
- "name": "",
3002
- "type": "uint256"
3003
- },
3004
- {
3005
- "name": "",
3006
- "type": "uint256"
3007
- }
3008
- ]
3009
- },
3010
- {
3011
- "stateMutability": "nonpayable",
3012
- "type": "function",
3013
- "name": "addLiquidityConcentrated",
3014
- "inputs": [
3015
- {
3016
- "name": "_nftTokenId",
3017
- "type": "uint256"
3018
- },
3019
- {
3020
- "name": "_pool",
3021
- "type": "address"
3022
- },
3023
- {
3024
- "name": "_tokenA",
3025
- "type": "address"
3026
- },
3027
- {
3028
- "name": "_tokenB",
3029
- "type": "address"
3030
- },
3031
- {
3032
- "name": "_tickLower",
3033
- "type": "int24"
3034
- },
3035
- {
3036
- "name": "_tickUpper",
3037
- "type": "int24"
3038
- },
3039
- {
3040
- "name": "_amountA",
3041
- "type": "uint256"
3042
- },
3043
- {
3044
- "name": "_amountB",
3045
- "type": "uint256"
3046
- },
3047
- {
3048
- "name": "_minAmountA",
3049
- "type": "uint256"
3050
- },
3051
- {
3052
- "name": "_minAmountB",
3053
- "type": "uint256"
3054
- },
3055
- {
3056
- "name": "_extraData",
3057
- "type": "bytes32"
3058
- },
3059
- {
3060
- "name": "_recipient",
3061
- "type": "address"
3062
- }
3063
- ],
3064
- "outputs": [
3065
- {
3066
- "name": "",
3067
- "type": "uint256"
3068
- },
3069
- {
3070
- "name": "",
3071
- "type": "uint256"
3072
- },
3073
- {
3074
- "name": "",
3075
- "type": "uint256"
3076
- },
3077
- {
3078
- "name": "",
3079
- "type": "uint256"
3080
- },
3081
- {
3082
- "name": "",
3083
- "type": "uint256"
3084
- }
3085
- ]
3086
- },
3087
- {
3088
- "stateMutability": "nonpayable",
3089
- "type": "function",
3090
- "name": "addLiquidityConcentrated",
3091
- "inputs": [
3092
- {
3093
- "name": "_nftTokenId",
3094
- "type": "uint256"
3095
- },
3096
- {
3097
- "name": "_pool",
3098
- "type": "address"
3099
- },
3100
- {
3101
- "name": "_tokenA",
3102
- "type": "address"
3103
- },
3104
- {
3105
- "name": "_tokenB",
3106
- "type": "address"
3107
- },
3108
- {
3109
- "name": "_tickLower",
3110
- "type": "int24"
3111
- },
3112
- {
3113
- "name": "_tickUpper",
3114
- "type": "int24"
3115
- },
3116
- {
3117
- "name": "_amountA",
3118
- "type": "uint256"
3119
- },
3120
- {
3121
- "name": "_amountB",
3122
- "type": "uint256"
3123
- },
3124
- {
3125
- "name": "_minAmountA",
3126
- "type": "uint256"
3127
- },
3128
- {
3129
- "name": "_minAmountB",
3130
- "type": "uint256"
3131
- },
3132
- {
3133
- "name": "_extraData",
3134
- "type": "bytes32"
3135
- },
3136
- {
3137
- "name": "_recipient",
3138
- "type": "address"
3139
- },
3140
- {
3141
- "name": "_miniAddys",
3142
- "type": "tuple",
3143
- "components": [
3144
- {
3145
- "name": "ledger",
3146
- "type": "address"
3147
- },
3148
- {
3149
- "name": "missionControl",
3150
- "type": "address"
3151
- },
3152
- {
3153
- "name": "legoBook",
3154
- "type": "address"
3155
- },
3156
- {
3157
- "name": "appraiser",
3158
- "type": "address"
3159
- }
3160
- ]
3161
- }
3162
- ],
3163
- "outputs": [
3164
- {
3165
- "name": "",
3166
- "type": "uint256"
3167
- },
3168
- {
3169
- "name": "",
3170
- "type": "uint256"
3171
- },
3172
- {
3173
- "name": "",
3174
- "type": "uint256"
3175
- },
3176
- {
3177
- "name": "",
3178
- "type": "uint256"
3179
- },
3180
- {
3181
- "name": "",
3182
- "type": "uint256"
3183
- }
3184
- ]
3185
- },
3186
- {
3187
- "stateMutability": "nonpayable",
3188
- "type": "function",
3189
- "name": "removeLiquidityConcentrated",
3190
- "inputs": [
3191
- {
3192
- "name": "_nftTokenId",
3193
- "type": "uint256"
3194
- },
3195
- {
3196
- "name": "_pool",
3197
- "type": "address"
3198
- },
3199
- {
3200
- "name": "_tokenA",
3201
- "type": "address"
3202
- },
3203
- {
3204
- "name": "_tokenB",
3205
- "type": "address"
3206
- },
3207
- {
3208
- "name": "_liqToRemove",
3209
- "type": "uint256"
3210
- },
3211
- {
3212
- "name": "_minAmountA",
3213
- "type": "uint256"
3214
- },
3215
- {
3216
- "name": "_minAmountB",
3217
- "type": "uint256"
3218
- },
3219
- {
3220
- "name": "_extraData",
3221
- "type": "bytes32"
3222
- },
3223
- {
3224
- "name": "_recipient",
3225
- "type": "address"
3226
- }
3227
- ],
3228
- "outputs": [
3229
- {
3230
- "name": "",
3231
- "type": "uint256"
3232
- },
3233
- {
3234
- "name": "",
3235
- "type": "uint256"
3236
- },
3237
- {
3238
- "name": "",
3239
- "type": "uint256"
3240
- },
3241
- {
3242
- "name": "",
3243
- "type": "bool"
3244
- },
3245
- {
3246
- "name": "",
3247
- "type": "uint256"
3248
- }
3249
- ]
3250
- },
3251
- {
3252
- "stateMutability": "nonpayable",
3253
- "type": "function",
3254
- "name": "removeLiquidityConcentrated",
3255
- "inputs": [
3256
- {
3257
- "name": "_nftTokenId",
3258
- "type": "uint256"
3259
- },
3260
- {
3261
- "name": "_pool",
3262
- "type": "address"
3263
- },
3264
- {
3265
- "name": "_tokenA",
3266
- "type": "address"
3267
- },
3268
- {
3269
- "name": "_tokenB",
3270
- "type": "address"
3271
- },
3272
- {
3273
- "name": "_liqToRemove",
3274
- "type": "uint256"
3275
- },
3276
- {
3277
- "name": "_minAmountA",
3278
- "type": "uint256"
3279
- },
3280
- {
3281
- "name": "_minAmountB",
3282
- "type": "uint256"
3283
- },
3284
- {
3285
- "name": "_extraData",
3286
- "type": "bytes32"
3287
- },
3288
- {
3289
- "name": "_recipient",
3290
- "type": "address"
3291
- },
3292
- {
3293
- "name": "_miniAddys",
3294
- "type": "tuple",
3295
- "components": [
3296
- {
3297
- "name": "ledger",
3298
- "type": "address"
3299
- },
3300
- {
3301
- "name": "missionControl",
3302
- "type": "address"
3303
- },
3304
- {
3305
- "name": "legoBook",
3306
- "type": "address"
3307
- },
3308
- {
3309
- "name": "appraiser",
3310
- "type": "address"
3311
- }
3312
- ]
3313
- }
3314
- ],
3315
- "outputs": [
3316
- {
3317
- "name": "",
3318
- "type": "uint256"
3319
- },
3320
- {
3321
- "name": "",
3322
- "type": "uint256"
3323
- },
3324
- {
3325
- "name": "",
3326
- "type": "uint256"
3327
- },
3328
- {
3329
- "name": "",
3330
- "type": "bool"
3331
- },
3332
- {
3333
- "name": "",
3334
- "type": "uint256"
3335
- }
3336
- ]
3337
- },
3338
- {
3339
- "stateMutability": "view",
3340
- "type": "function",
3341
- "name": "RIPE_REGISTRY",
3342
- "inputs": [],
3343
- "outputs": [
3344
- {
3345
- "name": "",
3346
- "type": "address"
3347
- }
3348
- ]
3349
- },
3350
- {
3351
- "stateMutability": "view",
3352
- "type": "function",
3353
- "name": "RIPE_GREEN_TOKEN",
3354
- "inputs": [],
3355
- "outputs": [
3356
- {
3357
- "name": "",
3358
- "type": "address"
3359
- }
3360
- ]
3361
- },
3362
- {
3363
- "stateMutability": "view",
3364
- "type": "function",
3365
- "name": "RIPE_SAVINGS_GREEN",
3366
- "inputs": [],
3367
- "outputs": [
3368
- {
3369
- "name": "",
3370
- "type": "address"
3371
- }
3372
- ]
3373
- },
3374
- {
3375
- "stateMutability": "view",
3376
- "type": "function",
3377
- "name": "RIPE_TOKEN",
3378
- "inputs": [],
3379
- "outputs": [
3380
- {
3381
- "name": "",
3382
- "type": "address"
3383
- }
3384
- ]
3385
- },
3386
- {
3387
- "stateMutability": "view",
3388
- "type": "function",
3389
- "name": "USDC",
3390
- "inputs": [],
3391
- "outputs": [
3392
- {
3393
- "name": "",
3394
- "type": "address"
3395
- }
3396
- ]
3397
- },
3398
- {
3399
- "stateMutability": "nonpayable",
3400
- "type": "constructor",
3401
- "inputs": [
3402
- {
3403
- "name": "_undyHq",
3404
- "type": "address"
3405
- },
3406
- {
3407
- "name": "_ripeRegistry",
3408
- "type": "address"
3409
- },
3410
- {
3411
- "name": "_usdc",
3412
- "type": "address"
3413
- }
3414
- ],
3415
- "outputs": []
3416
- }
3417
- ];
3418
- export const deployAddress = '0x9F3962973370998f25e985A3a8a6A5ef3D42361B';
3419
- function getRequest(method, args, contractAddressOrOptions) {
3420
- const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
3421
- const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
3422
- const call = {
3423
- contractName: 'RipeLego',
3424
- method,
3425
- args,
3426
- address,
3427
- deployAddress,
3428
- defaultValue,
3429
- getAbi: () => abi,
3430
- with: (options) => {
3431
- call.address = options.contractAddress;
3432
- call.defaultValue = options.defaultValue;
3433
- return call;
3434
- },
3435
- defaultTo: (defaultValue) => {
3436
- call.defaultValue = defaultValue;
3437
- return call;
3438
- },
3439
- at: (address) => {
3440
- call.address = address;
3441
- return call;
3442
- },
3443
- };
3444
- return call;
3445
- }
3446
- export const call = {
3447
- getAddys: (...args) => getRequest('getAddys', args),
3448
- getUndyHq: (...args) => getRequest('getUndyHq', args),
3449
- isLegoAsset: (...args) => getRequest('isLegoAsset', args),
3450
- getAssetOpportunities: (...args) => getRequest('getAssetOpportunities', args),
3451
- getAssets: (...args) => getRequest('getAssets', args),
3452
- isAssetOpportunity: (...args) => getRequest('isAssetOpportunity', args),
3453
- getNumLegoAssets: (...args) => getRequest('getNumLegoAssets', args),
3454
- getWeightedPricePerShare: (...args) => getRequest('getWeightedPricePerShare', args),
3455
- getLatestSnapshot: (...args) => getRequest('getLatestSnapshot', args),
3456
- isValidPriceConfig: (...args) => getRequest('isValidPriceConfig', args),
3457
- vaultToAsset: (...args) => getRequest('vaultToAsset', args),
3458
- assetOpportunities: (...args) => getRequest('assetOpportunities', args),
3459
- indexOfAssetOpportunity: (...args) => getRequest('indexOfAssetOpportunity', args),
3460
- numAssetOpportunities: (...args) => getRequest('numAssetOpportunities', args),
3461
- assets: (...args) => getRequest('assets', args),
3462
- indexOfAsset: (...args) => getRequest('indexOfAsset', args),
3463
- numAssets: (...args) => getRequest('numAssets', args),
3464
- snapShotData: (...args) => getRequest('snapShotData', args),
3465
- snapShots: (...args) => getRequest('snapShots', args),
3466
- snapShotPriceConfig: (...args) => getRequest('snapShotPriceConfig', args),
3467
- isPaused: (...args) => getRequest('isPaused', args),
3468
- hasCapability: (...args) => getRequest('hasCapability', args),
3469
- getRegistries: (...args) => getRequest('getRegistries', args),
3470
- isYieldLego: (...args) => getRequest('isYieldLego', args),
3471
- isDexLego: (...args) => getRequest('isDexLego', args),
3472
- getUnderlyingAsset: (...args) => getRequest('getUnderlyingAsset', args),
3473
- getUnderlyingBalances: (...args) => getRequest('getUnderlyingBalances', args),
3474
- getUnderlyingAmount: (...args) => getRequest('getUnderlyingAmount', args),
3475
- getUnderlyingAmountSafe: (...args) => getRequest('getUnderlyingAmountSafe', args),
3476
- getUnderlyingData: (...args) => getRequest('getUnderlyingData', args),
3477
- getUsdValueOfVaultToken: (...args) => getRequest('getUsdValueOfVaultToken', args),
3478
- isRebasing: (...args) => getRequest('isRebasing', args),
3479
- getPricePerShare: (...args) => getRequest('getPricePerShare', args),
3480
- getVaultTokenAmount: (...args) => getRequest('getVaultTokenAmount', args),
3481
- totalAssets: (...args) => getRequest('totalAssets', args),
3482
- totalBorrows: (...args) => getRequest('totalBorrows', args),
3483
- getAvailLiquidity: (...args) => getRequest('getAvailLiquidity', args),
3484
- getUtilizationRatio: (...args) => getRequest('getUtilizationRatio', args),
3485
- isEligibleForYieldBonus: (...args) => getRequest('isEligibleForYieldBonus', args),
3486
- getWithdrawalFees: (...args) => getRequest('getWithdrawalFees', args),
3487
- canRegisterVaultToken: (...args) => getRequest('canRegisterVaultToken', args),
3488
- getUserDebtAmount: (...args) => getRequest('getUserDebtAmount', args),
3489
- hasClaimableRewards: (...args) => getRequest('hasClaimableRewards', args),
3490
- getAccessForLego: (...args) => getRequest('getAccessForLego', args),
3491
- RIPE_REGISTRY: (...args) => getRequest('RIPE_REGISTRY', args),
3492
- RIPE_GREEN_TOKEN: (...args) => getRequest('RIPE_GREEN_TOKEN', args),
3493
- RIPE_SAVINGS_GREEN: (...args) => getRequest('RIPE_SAVINGS_GREEN', args),
3494
- RIPE_TOKEN: (...args) => getRequest('RIPE_TOKEN', args),
3495
- USDC: (...args) => getRequest('USDC', args),
3496
- };
3497
- function getMutation(functionName) {
3498
- return {
3499
- contractName: 'RipeLego',
3500
- functionName,
3501
- deployAddress,
3502
- argsType: undefined,
3503
- getAbi: () => abi,
3504
- };
3505
- }
3506
- export const mutation = {
3507
- pause: getMutation('pause'),
3508
- recoverFunds: getMutation('recoverFunds'),
3509
- recoverFundsMany: getMutation('recoverFundsMany'),
3510
- setSnapShotPriceConfig: getMutation('setSnapShotPriceConfig'),
3511
- registerVaultTokenLocally: getMutation('registerVaultTokenLocally'),
3512
- deregisterVaultTokenLocally: getMutation('deregisterVaultTokenLocally'),
3513
- addPriceSnapshot: getMutation('addPriceSnapshot'),
3514
- depositForYield: getMutation('depositForYield'),
3515
- withdrawFromYield: getMutation('withdrawFromYield'),
3516
- swapTokens: getMutation('swapTokens'),
3517
- addCollateral: getMutation('addCollateral'),
3518
- removeCollateral: getMutation('removeCollateral'),
3519
- borrow: getMutation('borrow'),
3520
- repayDebt: getMutation('repayDebt'),
3521
- deleverageWithSpecificAssets: getMutation('deleverageWithSpecificAssets'),
3522
- deleverageUser: getMutation('deleverageUser'),
3523
- claimIncentives: getMutation('claimIncentives'),
3524
- claimRewards: getMutation('claimRewards'),
3525
- mintOrRedeemAsset: getMutation('mintOrRedeemAsset'),
3526
- confirmMintOrRedeemAsset: getMutation('confirmMintOrRedeemAsset'),
3527
- addLiquidity: getMutation('addLiquidity'),
3528
- removeLiquidity: getMutation('removeLiquidity'),
3529
- addLiquidityConcentrated: getMutation('addLiquidityConcentrated'),
3530
- removeLiquidityConcentrated: getMutation('removeLiquidityConcentrated'),
3531
- };
3532
- export function parseEvents(eventName, events) {
3533
- return events.map((event) => {
3534
- return {
3535
- event,
3536
- parsed: parseEventLogs({
3537
- abi,
3538
- eventName,
3539
- logs: [event],
3540
- }),
3541
- };
3542
- });
3543
- }
3544
- export function getEventTopic(eventName) {
3545
- return encodeEventTopics({ abi, eventName })[0];
3546
- }
3547
- export function toSdk(publicClient, walletClient, addressResolver) {
3548
- return {
3549
- deployAddress,
3550
- abi,
3551
- events: {
3552
- RipeCollateralDeposit: { topic: getEventTopic('RipeCollateralDeposit'), parse: (events) => parseEvents('RipeCollateralDeposit', events) },
3553
- RipeCollateralWithdrawal: { topic: getEventTopic('RipeCollateralWithdrawal'), parse: (events) => parseEvents('RipeCollateralWithdrawal', events) },
3554
- RipeBorrow: { topic: getEventTopic('RipeBorrow'), parse: (events) => parseEvents('RipeBorrow', events) },
3555
- RipeRepay: { topic: getEventTopic('RipeRepay'), parse: (events) => parseEvents('RipeRepay', events) },
3556
- RipeClaimRewards: { topic: getEventTopic('RipeClaimRewards'), parse: (events) => parseEvents('RipeClaimRewards', events) },
3557
- RipeSavingsGreenDeposit: { topic: getEventTopic('RipeSavingsGreenDeposit'), parse: (events) => parseEvents('RipeSavingsGreenDeposit', events) },
3558
- RipeSavingsGreenWithdrawal: { topic: getEventTopic('RipeSavingsGreenWithdrawal'), parse: (events) => parseEvents('RipeSavingsGreenWithdrawal', events) },
3559
- RipeEndaomentPsmSwap: { topic: getEventTopic('RipeEndaomentPsmSwap'), parse: (events) => parseEvents('RipeEndaomentPsmSwap', events) },
3560
- LegoPauseModified: { topic: getEventTopic('LegoPauseModified'), parse: (events) => parseEvents('LegoPauseModified', events) },
3561
- LegoFundsRecovered: { topic: getEventTopic('LegoFundsRecovered'), parse: (events) => parseEvents('LegoFundsRecovered', events) },
3562
- SnapShotPriceConfigSet: { topic: getEventTopic('SnapShotPriceConfigSet'), parse: (events) => parseEvents('SnapShotPriceConfigSet', events) },
3563
- AssetOpportunityAdded: { topic: getEventTopic('AssetOpportunityAdded'), parse: (events) => parseEvents('AssetOpportunityAdded', events) },
3564
- AssetOpportunityRemoved: { topic: getEventTopic('AssetOpportunityRemoved'), parse: (events) => parseEvents('AssetOpportunityRemoved', events) },
3565
- PricePerShareSnapShotAdded: { topic: getEventTopic('PricePerShareSnapShotAdded'), parse: (events) => parseEvents('PricePerShareSnapShotAdded', events) },
3566
- },
3567
- // Queries
3568
- getAddys: (...args) => singleQuery(publicClient, call.getAddys(...args), {}, addressResolver),
3569
- getUndyHq: (...args) => singleQuery(publicClient, call.getUndyHq(...args), {}, addressResolver),
3570
- isLegoAsset: (...args) => singleQuery(publicClient, call.isLegoAsset(...args), {}, addressResolver),
3571
- getAssetOpportunities: (...args) => singleQuery(publicClient, call.getAssetOpportunities(...args), {}, addressResolver),
3572
- getAssets: (...args) => singleQuery(publicClient, call.getAssets(...args), {}, addressResolver),
3573
- isAssetOpportunity: (...args) => singleQuery(publicClient, call.isAssetOpportunity(...args), {}, addressResolver),
3574
- getNumLegoAssets: (...args) => singleQuery(publicClient, call.getNumLegoAssets(...args), {}, addressResolver),
3575
- getWeightedPricePerShare: (...args) => singleQuery(publicClient, call.getWeightedPricePerShare(...args), {}, addressResolver),
3576
- getLatestSnapshot: (...args) => singleQuery(publicClient, call.getLatestSnapshot(...args), {}, addressResolver),
3577
- isValidPriceConfig: (...args) => singleQuery(publicClient, call.isValidPriceConfig(...args), {}, addressResolver),
3578
- vaultToAsset: (...args) => singleQuery(publicClient, call.vaultToAsset(...args), {}, addressResolver),
3579
- assetOpportunities: (...args) => singleQuery(publicClient, call.assetOpportunities(...args), {}, addressResolver),
3580
- indexOfAssetOpportunity: (...args) => singleQuery(publicClient, call.indexOfAssetOpportunity(...args), {}, addressResolver),
3581
- numAssetOpportunities: (...args) => singleQuery(publicClient, call.numAssetOpportunities(...args), {}, addressResolver),
3582
- assets: (...args) => singleQuery(publicClient, call.assets(...args), {}, addressResolver),
3583
- indexOfAsset: (...args) => singleQuery(publicClient, call.indexOfAsset(...args), {}, addressResolver),
3584
- numAssets: (...args) => singleQuery(publicClient, call.numAssets(...args), {}, addressResolver),
3585
- snapShotData: (...args) => singleQuery(publicClient, call.snapShotData(...args), {}, addressResolver),
3586
- snapShots: (...args) => singleQuery(publicClient, call.snapShots(...args), {}, addressResolver),
3587
- snapShotPriceConfig: (...args) => singleQuery(publicClient, call.snapShotPriceConfig(...args), {}, addressResolver),
3588
- isPaused: (...args) => singleQuery(publicClient, call.isPaused(...args), {}, addressResolver),
3589
- hasCapability: (...args) => singleQuery(publicClient, call.hasCapability(...args), {}, addressResolver),
3590
- getRegistries: (...args) => singleQuery(publicClient, call.getRegistries(...args), {}, addressResolver),
3591
- isYieldLego: (...args) => singleQuery(publicClient, call.isYieldLego(...args), {}, addressResolver),
3592
- isDexLego: (...args) => singleQuery(publicClient, call.isDexLego(...args), {}, addressResolver),
3593
- getUnderlyingAsset: (...args) => singleQuery(publicClient, call.getUnderlyingAsset(...args), {}, addressResolver),
3594
- getUnderlyingBalances: (...args) => singleQuery(publicClient, call.getUnderlyingBalances(...args), {}, addressResolver),
3595
- getUnderlyingAmount: (...args) => singleQuery(publicClient, call.getUnderlyingAmount(...args), {}, addressResolver),
3596
- getUnderlyingAmountSafe: (...args) => singleQuery(publicClient, call.getUnderlyingAmountSafe(...args), {}, addressResolver),
3597
- getUnderlyingData: (...args) => singleQuery(publicClient, call.getUnderlyingData(...args), {}, addressResolver),
3598
- getUsdValueOfVaultToken: (...args) => singleQuery(publicClient, call.getUsdValueOfVaultToken(...args), {}, addressResolver),
3599
- isRebasing: (...args) => singleQuery(publicClient, call.isRebasing(...args), {}, addressResolver),
3600
- getPricePerShare: (...args) => singleQuery(publicClient, call.getPricePerShare(...args), {}, addressResolver),
3601
- getVaultTokenAmount: (...args) => singleQuery(publicClient, call.getVaultTokenAmount(...args), {}, addressResolver),
3602
- totalAssets: (...args) => singleQuery(publicClient, call.totalAssets(...args), {}, addressResolver),
3603
- totalBorrows: (...args) => singleQuery(publicClient, call.totalBorrows(...args), {}, addressResolver),
3604
- getAvailLiquidity: (...args) => singleQuery(publicClient, call.getAvailLiquidity(...args), {}, addressResolver),
3605
- getUtilizationRatio: (...args) => singleQuery(publicClient, call.getUtilizationRatio(...args), {}, addressResolver),
3606
- isEligibleForYieldBonus: (...args) => singleQuery(publicClient, call.isEligibleForYieldBonus(...args), {}, addressResolver),
3607
- getWithdrawalFees: (...args) => singleQuery(publicClient, call.getWithdrawalFees(...args), {}, addressResolver),
3608
- canRegisterVaultToken: (...args) => singleQuery(publicClient, call.canRegisterVaultToken(...args), {}, addressResolver),
3609
- getUserDebtAmount: (...args) => singleQuery(publicClient, call.getUserDebtAmount(...args), {}, addressResolver),
3610
- hasClaimableRewards: (...args) => singleQuery(publicClient, call.hasClaimableRewards(...args), {}, addressResolver),
3611
- getAccessForLego: (...args) => singleQuery(publicClient, call.getAccessForLego(...args), {}, addressResolver),
3612
- RIPE_REGISTRY: (...args) => singleQuery(publicClient, call.RIPE_REGISTRY(...args), {}, addressResolver),
3613
- RIPE_GREEN_TOKEN: (...args) => singleQuery(publicClient, call.RIPE_GREEN_TOKEN(...args), {}, addressResolver),
3614
- RIPE_SAVINGS_GREEN: (...args) => singleQuery(publicClient, call.RIPE_SAVINGS_GREEN(...args), {}, addressResolver),
3615
- RIPE_TOKEN: (...args) => singleQuery(publicClient, call.RIPE_TOKEN(...args), {}, addressResolver),
3616
- USDC: (...args) => singleQuery(publicClient, call.USDC(...args), {}, addressResolver),
3617
- // Mutations
3618
- pause: (...args) => mutate(walletClient, mutation.pause, { addressResolver })(...args),
3619
- recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds, { addressResolver })(...args),
3620
- recoverFundsMany: (...args) => mutate(walletClient, mutation.recoverFundsMany, { addressResolver })(...args),
3621
- setSnapShotPriceConfig: (...args) => mutate(walletClient, mutation.setSnapShotPriceConfig, { addressResolver })(...args),
3622
- registerVaultTokenLocally: (...args) => mutate(walletClient, mutation.registerVaultTokenLocally, { addressResolver })(...args),
3623
- deregisterVaultTokenLocally: (...args) => mutate(walletClient, mutation.deregisterVaultTokenLocally, { addressResolver })(...args),
3624
- addPriceSnapshot: (...args) => mutate(walletClient, mutation.addPriceSnapshot, { addressResolver })(...args),
3625
- depositForYield: (...args) => mutate(walletClient, mutation.depositForYield, { addressResolver })(...args),
3626
- withdrawFromYield: (...args) => mutate(walletClient, mutation.withdrawFromYield, { addressResolver })(...args),
3627
- swapTokens: (...args) => mutate(walletClient, mutation.swapTokens, { addressResolver })(...args),
3628
- addCollateral: (...args) => mutate(walletClient, mutation.addCollateral, { addressResolver })(...args),
3629
- removeCollateral: (...args) => mutate(walletClient, mutation.removeCollateral, { addressResolver })(...args),
3630
- borrow: (...args) => mutate(walletClient, mutation.borrow, { addressResolver })(...args),
3631
- repayDebt: (...args) => mutate(walletClient, mutation.repayDebt, { addressResolver })(...args),
3632
- deleverageWithSpecificAssets: (...args) => mutate(walletClient, mutation.deleverageWithSpecificAssets, { addressResolver })(...args),
3633
- deleverageUser: (...args) => mutate(walletClient, mutation.deleverageUser, { addressResolver })(...args),
3634
- claimIncentives: (...args) => mutate(walletClient, mutation.claimIncentives, { addressResolver })(...args),
3635
- claimRewards: (...args) => mutate(walletClient, mutation.claimRewards, { addressResolver })(...args),
3636
- mintOrRedeemAsset: (...args) => mutate(walletClient, mutation.mintOrRedeemAsset, { addressResolver })(...args),
3637
- confirmMintOrRedeemAsset: (...args) => mutate(walletClient, mutation.confirmMintOrRedeemAsset, { addressResolver })(...args),
3638
- addLiquidity: (...args) => mutate(walletClient, mutation.addLiquidity, { addressResolver })(...args),
3639
- removeLiquidity: (...args) => mutate(walletClient, mutation.removeLiquidity, { addressResolver })(...args),
3640
- addLiquidityConcentrated: (...args) => mutate(walletClient, mutation.addLiquidityConcentrated, { addressResolver })(...args),
3641
- removeLiquidityConcentrated: (...args) => mutate(walletClient, mutation.removeLiquidityConcentrated, { addressResolver })(...args),
3642
- };
3643
- }