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

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