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