@underscore-finance/sdk 0.3.4 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/dist/contracts/AaveV3.d.ts +2120 -0
  2. package/dist/contracts/AaveV3.d.ts.map +1 -0
  3. package/dist/contracts/AaveV3.js +2714 -0
  4. package/dist/contracts/AeroClassic.d.ts +2017 -0
  5. package/dist/contracts/AeroClassic.d.ts.map +1 -0
  6. package/dist/contracts/AeroClassic.js +2567 -0
  7. package/dist/contracts/AeroSlipstream.d.ts +2113 -0
  8. package/dist/contracts/AeroSlipstream.d.ts.map +1 -0
  9. package/dist/contracts/AeroSlipstream.js +2692 -0
  10. package/dist/contracts/Agent.d.ts +2189 -1138
  11. package/dist/contracts/Agent.d.ts.map +1 -1
  12. package/dist/contracts/Agent.js +2807 -1343
  13. package/dist/contracts/AgentWrapper.d.ts +3760 -0
  14. package/dist/contracts/AgentWrapper.d.ts.map +1 -0
  15. package/dist/contracts/AgentWrapper.js +4922 -0
  16. package/dist/contracts/Appraiser.d.ts +997 -0
  17. package/dist/contracts/Appraiser.d.ts.map +1 -0
  18. package/dist/contracts/Appraiser.js +1285 -0
  19. package/dist/contracts/Billing.d.ts +420 -0
  20. package/dist/contracts/Billing.d.ts.map +1 -0
  21. package/dist/contracts/Billing.js +506 -0
  22. package/dist/contracts/ChequeBook.d.ts +1184 -0
  23. package/dist/contracts/ChequeBook.d.ts.map +1 -0
  24. package/dist/contracts/ChequeBook.js +1352 -0
  25. package/dist/contracts/CompoundV3.d.ts +2158 -0
  26. package/dist/contracts/CompoundV3.d.ts.map +1 -0
  27. package/dist/contracts/CompoundV3.js +2764 -0
  28. package/dist/contracts/Curve.d.ts +1077 -0
  29. package/dist/contracts/Curve.d.ts.map +1 -0
  30. package/dist/contracts/Curve.js +1357 -0
  31. package/dist/contracts/DefaultsBase.d.ts +290 -0
  32. package/dist/contracts/DefaultsBase.d.ts.map +1 -0
  33. package/dist/contracts/DefaultsBase.js +316 -0
  34. package/dist/contracts/Euler.d.ts +2172 -0
  35. package/dist/contracts/Euler.d.ts.map +1 -0
  36. package/dist/contracts/Euler.js +2782 -0
  37. package/dist/contracts/Fluid.d.ts +2106 -0
  38. package/dist/contracts/Fluid.d.ts.map +1 -0
  39. package/dist/contracts/Fluid.js +2696 -0
  40. package/dist/contracts/Hatchery.d.ts +541 -0
  41. package/dist/contracts/Hatchery.d.ts.map +1 -0
  42. package/dist/contracts/Hatchery.js +671 -0
  43. package/dist/contracts/HighCommand.d.ts +1868 -0
  44. package/dist/contracts/HighCommand.d.ts.map +1 -0
  45. package/dist/contracts/HighCommand.js +2149 -0
  46. package/dist/contracts/Kernel.d.ts +354 -0
  47. package/dist/contracts/Kernel.d.ts.map +1 -0
  48. package/dist/contracts/Kernel.js +412 -0
  49. package/dist/contracts/Ledger.d.ts +694 -0
  50. package/dist/contracts/Ledger.d.ts.map +1 -0
  51. package/dist/contracts/Ledger.js +834 -0
  52. package/dist/contracts/LegoBook.d.ts +1424 -0
  53. package/dist/contracts/LegoBook.d.ts.map +1 -0
  54. package/dist/contracts/LegoBook.js +1783 -0
  55. package/dist/contracts/LegoTools.d.ts +1898 -0
  56. package/dist/contracts/LegoTools.d.ts.map +1 -0
  57. package/dist/contracts/LegoTools.js +2378 -0
  58. package/dist/contracts/LegoUniswapV0_2.d.ts +1204 -0
  59. package/dist/contracts/LegoUniswapV0_2.d.ts.map +1 -0
  60. package/dist/contracts/LegoUniswapV0_2.js +1546 -0
  61. package/dist/contracts/LootDistributor.d.ts +996 -0
  62. package/dist/contracts/LootDistributor.d.ts.map +1 -0
  63. package/dist/contracts/LootDistributor.js +1255 -0
  64. package/dist/contracts/Migrator.d.ts +268 -0
  65. package/dist/contracts/Migrator.d.ts.map +1 -0
  66. package/dist/contracts/Migrator.js +324 -0
  67. package/dist/contracts/MissionControl.d.ts +1331 -0
  68. package/dist/contracts/MissionControl.d.ts.map +1 -0
  69. package/dist/contracts/MissionControl.js +1485 -0
  70. package/dist/contracts/Moonwell.d.ts +2137 -0
  71. package/dist/contracts/Moonwell.d.ts.map +1 -0
  72. package/dist/contracts/Moonwell.js +2737 -0
  73. package/dist/contracts/Morpho.d.ts +2172 -0
  74. package/dist/contracts/Morpho.d.ts.map +1 -0
  75. package/dist/contracts/Morpho.js +2782 -0
  76. package/dist/contracts/Paymaster.d.ts +1679 -0
  77. package/dist/contracts/Paymaster.d.ts.map +1 -0
  78. package/dist/contracts/Paymaster.js +2077 -0
  79. package/dist/contracts/RipeLego.d.ts +2263 -0
  80. package/dist/contracts/RipeLego.d.ts.map +1 -0
  81. package/dist/contracts/RipeLego.js +2891 -0
  82. package/dist/contracts/Sentinel.d.ts +1804 -0
  83. package/dist/contracts/Sentinel.d.ts.map +1 -0
  84. package/dist/contracts/Sentinel.js +2152 -0
  85. package/dist/contracts/Switchboard.d.ts +1395 -0
  86. package/dist/contracts/Switchboard.d.ts.map +1 -0
  87. package/dist/contracts/Switchboard.js +1746 -0
  88. package/dist/contracts/SwitchboardAlpha.d.ts +2228 -0
  89. package/dist/contracts/SwitchboardAlpha.d.ts.map +1 -0
  90. package/dist/contracts/SwitchboardAlpha.js +2743 -0
  91. package/dist/contracts/SwitchboardBravo.d.ts +1498 -0
  92. package/dist/contracts/SwitchboardBravo.d.ts.map +1 -0
  93. package/dist/contracts/SwitchboardBravo.js +1855 -0
  94. package/dist/contracts/UndyHq.d.ts +1580 -0
  95. package/dist/contracts/UndyHq.d.ts.map +1 -0
  96. package/dist/contracts/UndyHq.js +1986 -0
  97. package/dist/contracts/UniswapV2.d.ts +2017 -0
  98. package/dist/contracts/UniswapV2.d.ts.map +1 -0
  99. package/dist/contracts/UniswapV2.js +2567 -0
  100. package/dist/contracts/UniswapV3.d.ts +2113 -0
  101. package/dist/contracts/UniswapV3.d.ts.map +1 -0
  102. package/dist/contracts/UniswapV3.js +2692 -0
  103. package/dist/contracts/UserWallet.d.ts +1438 -784
  104. package/dist/contracts/UserWallet.d.ts.map +1 -1
  105. package/dist/contracts/UserWallet.js +1854 -935
  106. package/dist/contracts/UserWalletConfig.d.ts +3034 -1231
  107. package/dist/contracts/UserWalletConfig.d.ts.map +1 -1
  108. package/dist/contracts/UserWalletConfig.js +3395 -1407
  109. package/dist/contracts/WalletBackpack.d.ts +1183 -0
  110. package/dist/contracts/WalletBackpack.d.ts.map +1 -0
  111. package/dist/contracts/WalletBackpack.js +1484 -0
  112. package/dist/contracts/index.d.ts +72 -36
  113. package/dist/contracts/index.d.ts.map +1 -1
  114. package/dist/contracts/index.js +72 -36
  115. package/dist/contracts/sdk.d.ts +146 -72
  116. package/dist/contracts/sdk.d.ts.map +1 -1
  117. package/dist/contracts/sdk.js +146 -72
  118. package/dist/contracts/v0_1_AddyRegistry.d.ts +473 -0
  119. package/dist/contracts/v0_1_AddyRegistry.d.ts.map +1 -0
  120. package/dist/contracts/v0_1_AddyRegistry.js +594 -0
  121. package/dist/contracts/v0_1_Agent.d.ts +2631 -0
  122. package/dist/contracts/v0_1_Agent.d.ts.map +1 -0
  123. package/dist/contracts/v0_1_Agent.js +3372 -0
  124. package/dist/contracts/v0_1_AgentFactory.d.ts +1054 -0
  125. package/dist/contracts/v0_1_AgentFactory.d.ts.map +1 -0
  126. package/dist/contracts/v0_1_AgentFactory.js +1336 -0
  127. package/dist/contracts/v0_1_UserWallet.d.ts +1980 -0
  128. package/dist/contracts/v0_1_UserWallet.d.ts.map +1 -0
  129. package/dist/contracts/v0_1_UserWallet.js +2581 -0
  130. package/dist/contracts/v0_1_UserWalletConfig.d.ts +1400 -0
  131. package/dist/contracts/v0_1_UserWalletConfig.d.ts.map +1 -0
  132. package/dist/contracts/v0_1_UserWalletConfig.js +1676 -0
  133. package/dist/contracts/v0_2_AddyRegistry.d.ts +1050 -0
  134. package/dist/contracts/v0_2_AddyRegistry.d.ts.map +1 -0
  135. package/dist/contracts/v0_2_AddyRegistry.js +1313 -0
  136. package/dist/contracts/v0_2_Agent.d.ts +2709 -0
  137. package/dist/contracts/v0_2_Agent.d.ts.map +1 -0
  138. package/dist/contracts/v0_2_Agent.js +3458 -0
  139. package/dist/contracts/v0_2_AgentFactory.d.ts +1275 -0
  140. package/dist/contracts/v0_2_AgentFactory.d.ts.map +1 -0
  141. package/dist/contracts/v0_2_AgentFactory.js +1609 -0
  142. package/dist/contracts/v0_2_UserWallet.d.ts +1958 -0
  143. package/dist/contracts/v0_2_UserWallet.d.ts.map +1 -0
  144. package/dist/contracts/v0_2_UserWallet.js +2553 -0
  145. package/dist/contracts/v0_2_UserWalletConfig.d.ts +1468 -0
  146. package/dist/contracts/v0_2_UserWalletConfig.d.ts.map +1 -0
  147. package/dist/contracts/v0_2_UserWalletConfig.js +1764 -0
  148. package/dist/contracts/v0_3_AddyRegistry.d.ts +1109 -0
  149. package/dist/contracts/v0_3_AddyRegistry.d.ts.map +1 -0
  150. package/dist/contracts/v0_3_AddyRegistry.js +1392 -0
  151. package/dist/contracts/v0_3_Agent.d.ts +2709 -0
  152. package/dist/contracts/v0_3_Agent.d.ts.map +1 -0
  153. package/dist/contracts/v0_3_Agent.js +3458 -0
  154. package/dist/contracts/v0_3_AgentFactory.d.ts +1665 -0
  155. package/dist/contracts/v0_3_AgentFactory.d.ts.map +1 -0
  156. package/dist/contracts/v0_3_AgentFactory.js +2078 -0
  157. package/dist/contracts/v0_3_ChainlinkFeeds.d.ts +706 -0
  158. package/dist/contracts/v0_3_ChainlinkFeeds.d.ts.map +1 -0
  159. package/dist/contracts/v0_3_ChainlinkFeeds.js +900 -0
  160. package/dist/contracts/v0_3_LegoAaveV3.d.ts +1033 -0
  161. package/dist/contracts/v0_3_LegoAaveV3.d.ts.map +1 -0
  162. package/dist/contracts/v0_3_LegoAaveV3.js +1330 -0
  163. package/dist/contracts/v0_3_LegoAeroClassic.d.ts +1204 -0
  164. package/dist/contracts/v0_3_LegoAeroClassic.d.ts.map +1 -0
  165. package/dist/contracts/v0_3_LegoAeroClassic.js +1546 -0
  166. package/dist/contracts/v0_3_LegoAeroSlipstream.d.ts +1300 -0
  167. package/dist/contracts/v0_3_LegoAeroSlipstream.d.ts.map +1 -0
  168. package/dist/contracts/v0_3_LegoAeroSlipstream.js +1671 -0
  169. package/dist/contracts/v0_3_LegoCommon.d.ts +164 -0
  170. package/dist/contracts/v0_3_LegoCommon.d.ts.map +1 -0
  171. package/dist/contracts/v0_3_LegoCommon.js +202 -0
  172. package/dist/contracts/v0_3_LegoCompoundV3.d.ts +1060 -0
  173. package/dist/contracts/v0_3_LegoCompoundV3.d.ts.map +1 -0
  174. package/dist/contracts/v0_3_LegoCompoundV3.js +1365 -0
  175. package/dist/contracts/v0_3_LegoCredit.d.ts +140 -0
  176. package/dist/contracts/v0_3_LegoCredit.d.ts.map +1 -0
  177. package/dist/contracts/v0_3_LegoCredit.js +179 -0
  178. package/dist/contracts/v0_3_LegoCurve.d.ts +1189 -0
  179. package/dist/contracts/v0_3_LegoCurve.d.ts.map +1 -0
  180. package/dist/contracts/v0_3_LegoCurve.js +1519 -0
  181. package/dist/contracts/v0_3_LegoDex.d.ts +587 -0
  182. package/dist/contracts/v0_3_LegoDex.d.ts.map +1 -0
  183. package/dist/contracts/v0_3_LegoDex.js +774 -0
  184. package/dist/contracts/v0_3_LegoEuler.d.ts +1074 -0
  185. package/dist/contracts/v0_3_LegoEuler.d.ts.map +1 -0
  186. package/dist/contracts/v0_3_LegoEuler.js +1383 -0
  187. package/dist/contracts/v0_3_LegoFluid.d.ts +1025 -0
  188. package/dist/contracts/v0_3_LegoFluid.d.ts.map +1 -0
  189. package/dist/contracts/v0_3_LegoFluid.js +1320 -0
  190. package/dist/contracts/v0_3_LegoHelper.d.ts +1563 -0
  191. package/dist/contracts/v0_3_LegoHelper.d.ts.map +1 -0
  192. package/dist/contracts/v0_3_LegoHelper.js +1947 -0
  193. package/dist/contracts/v0_3_LegoMoonwell.d.ts +1042 -0
  194. package/dist/contracts/v0_3_LegoMoonwell.d.ts.map +1 -0
  195. package/dist/contracts/v0_3_LegoMoonwell.js +1342 -0
  196. package/dist/contracts/v0_3_LegoMorpho.d.ts +1074 -0
  197. package/dist/contracts/v0_3_LegoMorpho.d.ts.map +1 -0
  198. package/dist/contracts/v0_3_LegoMorpho.js +1383 -0
  199. package/dist/contracts/v0_3_LegoRegistry.d.ts +1079 -0
  200. package/dist/contracts/v0_3_LegoRegistry.d.ts.map +1 -0
  201. package/dist/contracts/v0_3_LegoRegistry.js +1368 -0
  202. package/dist/contracts/v0_3_LegoSky.d.ts +923 -0
  203. package/dist/contracts/v0_3_LegoSky.d.ts.map +1 -0
  204. package/dist/contracts/v0_3_LegoSky.js +1180 -0
  205. package/dist/contracts/v0_3_LegoUniswapV3.d.ts +1338 -0
  206. package/dist/contracts/v0_3_LegoUniswapV3.d.ts.map +1 -0
  207. package/dist/contracts/v0_3_LegoUniswapV3.js +1718 -0
  208. package/dist/contracts/v0_3_LegoYield.d.ts +390 -0
  209. package/dist/contracts/v0_3_LegoYield.d.ts.map +1 -0
  210. package/dist/contracts/v0_3_LegoYield.js +511 -0
  211. package/dist/contracts/v0_3_OracleParser.d.ts +207 -0
  212. package/dist/contracts/v0_3_OracleParser.d.ts.map +1 -0
  213. package/dist/contracts/v0_3_OracleParser.js +264 -0
  214. package/dist/contracts/v0_3_OracleRegistry.d.ts +1221 -0
  215. package/dist/contracts/v0_3_OracleRegistry.d.ts.map +1 -0
  216. package/dist/contracts/v0_3_OracleRegistry.js +1562 -0
  217. package/dist/contracts/v0_3_PriceSheets.d.ts +1127 -0
  218. package/dist/contracts/v0_3_PriceSheets.d.ts.map +1 -0
  219. package/dist/contracts/v0_3_PriceSheets.js +1383 -0
  220. package/dist/contracts/v0_3_PythFeeds.d.ts +640 -0
  221. package/dist/contracts/v0_3_PythFeeds.d.ts.map +1 -0
  222. package/dist/contracts/v0_3_PythFeeds.js +813 -0
  223. package/dist/contracts/v0_3_StorkFeeds.d.ts +640 -0
  224. package/dist/contracts/v0_3_StorkFeeds.d.ts.map +1 -0
  225. package/dist/contracts/v0_3_StorkFeeds.js +813 -0
  226. package/dist/contracts/v0_3_UserWallet.d.ts +1975 -0
  227. package/dist/contracts/v0_3_UserWallet.d.ts.map +1 -0
  228. package/dist/contracts/v0_3_UserWallet.js +2577 -0
  229. package/dist/contracts/v0_3_UserWalletConfig.d.ts +1852 -0
  230. package/dist/contracts/v0_3_UserWalletConfig.d.ts.map +1 -0
  231. package/dist/contracts/v0_3_UserWalletConfig.js +2263 -0
  232. package/dist/getContracts.d.ts +77 -0
  233. package/dist/getContracts.d.ts.map +1 -0
  234. package/dist/getContracts.js +67 -0
  235. package/dist/getLegacyContracts.d.ts +69 -0
  236. package/dist/getLegacyContracts.d.ts.map +1 -0
  237. package/dist/getLegacyContracts.js +55 -0
  238. package/dist/getSwapInstructions.d.ts +60 -0
  239. package/dist/getSwapInstructions.d.ts.map +1 -0
  240. package/dist/getSwapInstructions.js +41 -0
  241. package/dist/index.d.ts +7 -477
  242. package/dist/index.d.ts.map +1 -1
  243. package/dist/index.js +8 -182
  244. package/package.json +2 -2
@@ -0,0 +1,1342 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /* @ts-nocheck */
5
+ import { singleQuery, mutate } from '@dappql/async';
6
+ export const abi = [
7
+ {
8
+ anonymous: false,
9
+ inputs: [
10
+ {
11
+ indexed: true,
12
+ name: 'sender',
13
+ type: 'address',
14
+ },
15
+ {
16
+ indexed: true,
17
+ name: 'asset',
18
+ type: 'address',
19
+ },
20
+ {
21
+ indexed: true,
22
+ name: 'vaultToken',
23
+ type: 'address',
24
+ },
25
+ {
26
+ indexed: false,
27
+ name: 'assetAmountDeposited',
28
+ type: 'uint256',
29
+ },
30
+ {
31
+ indexed: false,
32
+ name: 'usdValue',
33
+ type: 'uint256',
34
+ },
35
+ {
36
+ indexed: false,
37
+ name: 'vaultTokenAmountReceived',
38
+ type: 'uint256',
39
+ },
40
+ {
41
+ indexed: false,
42
+ name: 'recipient',
43
+ type: 'address',
44
+ },
45
+ ],
46
+ name: 'MoonwellDeposit',
47
+ type: 'event',
48
+ },
49
+ {
50
+ anonymous: false,
51
+ inputs: [
52
+ {
53
+ indexed: true,
54
+ name: 'sender',
55
+ type: 'address',
56
+ },
57
+ {
58
+ indexed: true,
59
+ name: 'asset',
60
+ type: 'address',
61
+ },
62
+ {
63
+ indexed: true,
64
+ name: 'vaultToken',
65
+ type: 'address',
66
+ },
67
+ {
68
+ indexed: false,
69
+ name: 'assetAmountReceived',
70
+ type: 'uint256',
71
+ },
72
+ {
73
+ indexed: false,
74
+ name: 'usdValue',
75
+ type: 'uint256',
76
+ },
77
+ {
78
+ indexed: false,
79
+ name: 'vaultTokenAmountBurned',
80
+ type: 'uint256',
81
+ },
82
+ {
83
+ indexed: false,
84
+ name: 'recipient',
85
+ type: 'address',
86
+ },
87
+ ],
88
+ name: 'MoonwellWithdrawal',
89
+ type: 'event',
90
+ },
91
+ {
92
+ anonymous: false,
93
+ inputs: [
94
+ {
95
+ indexed: true,
96
+ name: 'asset',
97
+ type: 'address',
98
+ },
99
+ {
100
+ indexed: true,
101
+ name: 'recipient',
102
+ type: 'address',
103
+ },
104
+ {
105
+ indexed: false,
106
+ name: 'amount',
107
+ type: 'uint256',
108
+ },
109
+ ],
110
+ name: 'MoonwellFundsRecovered',
111
+ type: 'event',
112
+ },
113
+ {
114
+ anonymous: false,
115
+ inputs: [
116
+ {
117
+ indexed: false,
118
+ name: 'legoId',
119
+ type: 'uint256',
120
+ },
121
+ ],
122
+ name: 'MoonwellLegoIdSet',
123
+ type: 'event',
124
+ },
125
+ {
126
+ anonymous: false,
127
+ inputs: [
128
+ {
129
+ indexed: false,
130
+ name: 'isActivated',
131
+ type: 'bool',
132
+ },
133
+ ],
134
+ name: 'MoonwellActivated',
135
+ type: 'event',
136
+ },
137
+ {
138
+ anonymous: false,
139
+ inputs: [
140
+ {
141
+ indexed: true,
142
+ name: 'prevGov',
143
+ type: 'address',
144
+ },
145
+ {
146
+ indexed: true,
147
+ name: 'newGov',
148
+ type: 'address',
149
+ },
150
+ {
151
+ indexed: false,
152
+ name: 'confirmBlock',
153
+ type: 'uint256',
154
+ },
155
+ ],
156
+ name: 'GovChangeInitiated',
157
+ type: 'event',
158
+ },
159
+ {
160
+ anonymous: false,
161
+ inputs: [
162
+ {
163
+ indexed: true,
164
+ name: 'prevGov',
165
+ type: 'address',
166
+ },
167
+ {
168
+ indexed: true,
169
+ name: 'newGov',
170
+ type: 'address',
171
+ },
172
+ {
173
+ indexed: false,
174
+ name: 'initiatedBlock',
175
+ type: 'uint256',
176
+ },
177
+ {
178
+ indexed: false,
179
+ name: 'confirmBlock',
180
+ type: 'uint256',
181
+ },
182
+ ],
183
+ name: 'GovChangeConfirmed',
184
+ type: 'event',
185
+ },
186
+ {
187
+ anonymous: false,
188
+ inputs: [
189
+ {
190
+ indexed: true,
191
+ name: 'cancelledGov',
192
+ type: 'address',
193
+ },
194
+ {
195
+ indexed: false,
196
+ name: 'initiatedBlock',
197
+ type: 'uint256',
198
+ },
199
+ {
200
+ indexed: false,
201
+ name: 'confirmBlock',
202
+ type: 'uint256',
203
+ },
204
+ ],
205
+ name: 'GovChangeCancelled',
206
+ type: 'event',
207
+ },
208
+ {
209
+ anonymous: false,
210
+ inputs: [
211
+ {
212
+ indexed: false,
213
+ name: 'delayBlocks',
214
+ type: 'uint256',
215
+ },
216
+ ],
217
+ name: 'GovChangeDelaySet',
218
+ type: 'event',
219
+ },
220
+ {
221
+ anonymous: false,
222
+ inputs: [
223
+ {
224
+ indexed: true,
225
+ name: 'asset',
226
+ type: 'address',
227
+ },
228
+ {
229
+ indexed: true,
230
+ name: 'vaultToken',
231
+ type: 'address',
232
+ },
233
+ ],
234
+ name: 'AssetOpportunityAdded',
235
+ type: 'event',
236
+ },
237
+ {
238
+ anonymous: false,
239
+ inputs: [
240
+ {
241
+ indexed: true,
242
+ name: 'asset',
243
+ type: 'address',
244
+ },
245
+ {
246
+ indexed: true,
247
+ name: 'vaultToken',
248
+ type: 'address',
249
+ },
250
+ ],
251
+ name: 'AssetOpportunityRemoved',
252
+ type: 'event',
253
+ },
254
+ {
255
+ inputs: [
256
+ {
257
+ name: '_asset',
258
+ type: 'address',
259
+ },
260
+ ],
261
+ name: 'getAssetOpportunities',
262
+ outputs: [
263
+ {
264
+ name: '',
265
+ type: 'address[]',
266
+ },
267
+ ],
268
+ stateMutability: 'view',
269
+ type: 'function',
270
+ },
271
+ {
272
+ inputs: [],
273
+ name: 'getAssets',
274
+ outputs: [
275
+ {
276
+ name: '',
277
+ type: 'address[]',
278
+ },
279
+ ],
280
+ stateMutability: 'view',
281
+ type: 'function',
282
+ },
283
+ {
284
+ inputs: [
285
+ {
286
+ name: 'arg0',
287
+ type: 'address',
288
+ },
289
+ {
290
+ name: 'arg1',
291
+ type: 'uint256',
292
+ },
293
+ ],
294
+ name: 'assetOpportunities',
295
+ outputs: [
296
+ {
297
+ name: '',
298
+ type: 'address',
299
+ },
300
+ ],
301
+ stateMutability: 'view',
302
+ type: 'function',
303
+ },
304
+ {
305
+ inputs: [
306
+ {
307
+ name: 'arg0',
308
+ type: 'address',
309
+ },
310
+ {
311
+ name: 'arg1',
312
+ type: 'address',
313
+ },
314
+ ],
315
+ name: 'indexOfAssetOpportunity',
316
+ outputs: [
317
+ {
318
+ name: '',
319
+ type: 'uint256',
320
+ },
321
+ ],
322
+ stateMutability: 'view',
323
+ type: 'function',
324
+ },
325
+ {
326
+ inputs: [
327
+ {
328
+ name: 'arg0',
329
+ type: 'address',
330
+ },
331
+ ],
332
+ name: 'numAssetOpportunities',
333
+ outputs: [
334
+ {
335
+ name: '',
336
+ type: 'uint256',
337
+ },
338
+ ],
339
+ stateMutability: 'view',
340
+ type: 'function',
341
+ },
342
+ {
343
+ inputs: [
344
+ {
345
+ name: 'arg0',
346
+ type: 'address',
347
+ },
348
+ ],
349
+ name: 'vaultToAsset',
350
+ outputs: [
351
+ {
352
+ name: '',
353
+ type: 'address',
354
+ },
355
+ ],
356
+ stateMutability: 'view',
357
+ type: 'function',
358
+ },
359
+ {
360
+ inputs: [
361
+ {
362
+ name: 'arg0',
363
+ type: 'uint256',
364
+ },
365
+ ],
366
+ name: 'assets',
367
+ outputs: [
368
+ {
369
+ name: '',
370
+ type: 'address',
371
+ },
372
+ ],
373
+ stateMutability: 'view',
374
+ type: 'function',
375
+ },
376
+ {
377
+ inputs: [
378
+ {
379
+ name: 'arg0',
380
+ type: 'address',
381
+ },
382
+ ],
383
+ name: 'indexOfAsset',
384
+ outputs: [
385
+ {
386
+ name: '',
387
+ type: 'uint256',
388
+ },
389
+ ],
390
+ stateMutability: 'view',
391
+ type: 'function',
392
+ },
393
+ {
394
+ inputs: [],
395
+ name: 'numAssets',
396
+ outputs: [
397
+ {
398
+ name: '',
399
+ type: 'uint256',
400
+ },
401
+ ],
402
+ stateMutability: 'view',
403
+ type: 'function',
404
+ },
405
+ {
406
+ inputs: [
407
+ {
408
+ name: '_address',
409
+ type: 'address',
410
+ },
411
+ ],
412
+ name: 'canGovern',
413
+ outputs: [
414
+ {
415
+ name: '',
416
+ type: 'bool',
417
+ },
418
+ ],
419
+ stateMutability: 'view',
420
+ type: 'function',
421
+ },
422
+ {
423
+ inputs: [],
424
+ name: 'hasPendingGovChange',
425
+ outputs: [
426
+ {
427
+ name: '',
428
+ type: 'bool',
429
+ },
430
+ ],
431
+ stateMutability: 'view',
432
+ type: 'function',
433
+ },
434
+ {
435
+ inputs: [
436
+ {
437
+ name: '_newGov',
438
+ type: 'address',
439
+ },
440
+ ],
441
+ name: 'changeGovernance',
442
+ outputs: [],
443
+ stateMutability: 'nonpayable',
444
+ type: 'function',
445
+ },
446
+ {
447
+ inputs: [],
448
+ name: 'confirmGovernanceChange',
449
+ outputs: [],
450
+ stateMutability: 'nonpayable',
451
+ type: 'function',
452
+ },
453
+ {
454
+ inputs: [],
455
+ name: 'cancelGovernanceChange',
456
+ outputs: [],
457
+ stateMutability: 'nonpayable',
458
+ type: 'function',
459
+ },
460
+ {
461
+ inputs: [
462
+ {
463
+ name: '_numBlocks',
464
+ type: 'uint256',
465
+ },
466
+ ],
467
+ name: 'setGovernanceChangeDelay',
468
+ outputs: [],
469
+ stateMutability: 'nonpayable',
470
+ type: 'function',
471
+ },
472
+ {
473
+ inputs: [],
474
+ name: 'governance',
475
+ outputs: [
476
+ {
477
+ name: '',
478
+ type: 'address',
479
+ },
480
+ ],
481
+ stateMutability: 'view',
482
+ type: 'function',
483
+ },
484
+ {
485
+ inputs: [],
486
+ name: 'pendingGov',
487
+ outputs: [
488
+ {
489
+ components: [
490
+ {
491
+ name: 'newGov',
492
+ type: 'address',
493
+ },
494
+ {
495
+ name: 'initiatedBlock',
496
+ type: 'uint256',
497
+ },
498
+ {
499
+ name: 'confirmBlock',
500
+ type: 'uint256',
501
+ },
502
+ ],
503
+ name: '',
504
+ type: 'tuple',
505
+ },
506
+ ],
507
+ stateMutability: 'view',
508
+ type: 'function',
509
+ },
510
+ {
511
+ inputs: [],
512
+ name: 'govChangeDelay',
513
+ outputs: [
514
+ {
515
+ name: '',
516
+ type: 'uint256',
517
+ },
518
+ ],
519
+ stateMutability: 'view',
520
+ type: 'function',
521
+ },
522
+ {
523
+ inputs: [],
524
+ name: 'MIN_GOV_CHANGE_DELAY',
525
+ outputs: [
526
+ {
527
+ name: '',
528
+ type: 'uint256',
529
+ },
530
+ ],
531
+ stateMutability: 'view',
532
+ type: 'function',
533
+ },
534
+ {
535
+ inputs: [],
536
+ name: 'MAX_GOV_CHANGE_DELAY',
537
+ outputs: [
538
+ {
539
+ name: '',
540
+ type: 'uint256',
541
+ },
542
+ ],
543
+ stateMutability: 'view',
544
+ type: 'function',
545
+ },
546
+ {
547
+ stateMutability: 'payable',
548
+ type: 'fallback',
549
+ },
550
+ {
551
+ inputs: [],
552
+ name: 'getRegistries',
553
+ outputs: [
554
+ {
555
+ name: '',
556
+ type: 'address[]',
557
+ },
558
+ ],
559
+ stateMutability: 'view',
560
+ type: 'function',
561
+ },
562
+ {
563
+ inputs: [
564
+ {
565
+ name: '_user',
566
+ type: 'address',
567
+ },
568
+ ],
569
+ name: 'getAccessForLego',
570
+ outputs: [
571
+ {
572
+ name: '',
573
+ type: 'address',
574
+ },
575
+ {
576
+ name: '',
577
+ type: 'string',
578
+ },
579
+ {
580
+ name: '',
581
+ type: 'uint256',
582
+ },
583
+ ],
584
+ stateMutability: 'view',
585
+ type: 'function',
586
+ },
587
+ {
588
+ inputs: [
589
+ {
590
+ name: '_vaultToken',
591
+ type: 'address',
592
+ },
593
+ ],
594
+ name: 'isVaultToken',
595
+ outputs: [
596
+ {
597
+ name: '',
598
+ type: 'bool',
599
+ },
600
+ ],
601
+ stateMutability: 'view',
602
+ type: 'function',
603
+ },
604
+ {
605
+ inputs: [
606
+ {
607
+ name: '_vaultToken',
608
+ type: 'address',
609
+ },
610
+ ],
611
+ name: 'getUnderlyingAsset',
612
+ outputs: [
613
+ {
614
+ name: '',
615
+ type: 'address',
616
+ },
617
+ ],
618
+ stateMutability: 'view',
619
+ type: 'function',
620
+ },
621
+ {
622
+ inputs: [
623
+ {
624
+ name: '_vaultToken',
625
+ type: 'address',
626
+ },
627
+ {
628
+ name: '_vaultTokenAmount',
629
+ type: 'uint256',
630
+ },
631
+ ],
632
+ name: 'getUnderlyingAmount',
633
+ outputs: [
634
+ {
635
+ name: '',
636
+ type: 'uint256',
637
+ },
638
+ ],
639
+ stateMutability: 'view',
640
+ type: 'function',
641
+ },
642
+ {
643
+ inputs: [
644
+ {
645
+ name: '_asset',
646
+ type: 'address',
647
+ },
648
+ {
649
+ name: '_assetAmount',
650
+ type: 'uint256',
651
+ },
652
+ {
653
+ name: '_vaultToken',
654
+ type: 'address',
655
+ },
656
+ ],
657
+ name: 'getVaultTokenAmount',
658
+ outputs: [
659
+ {
660
+ name: '',
661
+ type: 'uint256',
662
+ },
663
+ ],
664
+ stateMutability: 'view',
665
+ type: 'function',
666
+ },
667
+ {
668
+ inputs: [
669
+ {
670
+ name: '_vaultToken',
671
+ type: 'address',
672
+ },
673
+ {
674
+ name: '_vaultTokenAmount',
675
+ type: 'uint256',
676
+ },
677
+ ],
678
+ name: 'getUsdValueOfVaultToken',
679
+ outputs: [
680
+ {
681
+ name: '',
682
+ type: 'uint256',
683
+ },
684
+ ],
685
+ stateMutability: 'view',
686
+ type: 'function',
687
+ },
688
+ {
689
+ inputs: [
690
+ {
691
+ name: '_vaultToken',
692
+ type: 'address',
693
+ },
694
+ {
695
+ name: '_vaultTokenAmount',
696
+ type: 'uint256',
697
+ },
698
+ {
699
+ name: '_oracleRegistry',
700
+ type: 'address',
701
+ },
702
+ ],
703
+ name: 'getUsdValueOfVaultToken',
704
+ outputs: [
705
+ {
706
+ name: '',
707
+ type: 'uint256',
708
+ },
709
+ ],
710
+ stateMutability: 'view',
711
+ type: 'function',
712
+ },
713
+ {
714
+ inputs: [
715
+ {
716
+ name: '_vaultToken',
717
+ type: 'address',
718
+ },
719
+ {
720
+ name: '_vaultTokenAmount',
721
+ type: 'uint256',
722
+ },
723
+ ],
724
+ name: 'getUnderlyingData',
725
+ outputs: [
726
+ {
727
+ name: '',
728
+ type: 'address',
729
+ },
730
+ {
731
+ name: '',
732
+ type: 'uint256',
733
+ },
734
+ {
735
+ name: '',
736
+ type: 'uint256',
737
+ },
738
+ ],
739
+ stateMutability: 'view',
740
+ type: 'function',
741
+ },
742
+ {
743
+ inputs: [
744
+ {
745
+ name: '_vaultToken',
746
+ type: 'address',
747
+ },
748
+ {
749
+ name: '_vaultTokenAmount',
750
+ type: 'uint256',
751
+ },
752
+ {
753
+ name: '_oracleRegistry',
754
+ type: 'address',
755
+ },
756
+ ],
757
+ name: 'getUnderlyingData',
758
+ outputs: [
759
+ {
760
+ name: '',
761
+ type: 'address',
762
+ },
763
+ {
764
+ name: '',
765
+ type: 'uint256',
766
+ },
767
+ {
768
+ name: '',
769
+ type: 'uint256',
770
+ },
771
+ ],
772
+ stateMutability: 'view',
773
+ type: 'function',
774
+ },
775
+ {
776
+ inputs: [
777
+ {
778
+ name: '_vaultToken',
779
+ type: 'address',
780
+ },
781
+ ],
782
+ name: 'totalAssets',
783
+ outputs: [
784
+ {
785
+ name: '',
786
+ type: 'uint256',
787
+ },
788
+ ],
789
+ stateMutability: 'view',
790
+ type: 'function',
791
+ },
792
+ {
793
+ inputs: [
794
+ {
795
+ name: '_vaultToken',
796
+ type: 'address',
797
+ },
798
+ ],
799
+ name: 'totalBorrows',
800
+ outputs: [
801
+ {
802
+ name: '',
803
+ type: 'uint256',
804
+ },
805
+ ],
806
+ stateMutability: 'view',
807
+ type: 'function',
808
+ },
809
+ {
810
+ inputs: [
811
+ {
812
+ name: '_asset',
813
+ type: 'address',
814
+ },
815
+ {
816
+ name: '_amount',
817
+ type: 'uint256',
818
+ },
819
+ {
820
+ name: '_vault',
821
+ type: 'address',
822
+ },
823
+ {
824
+ name: '_recipient',
825
+ type: 'address',
826
+ },
827
+ ],
828
+ name: 'depositTokens',
829
+ outputs: [
830
+ {
831
+ name: '',
832
+ type: 'uint256',
833
+ },
834
+ {
835
+ name: '',
836
+ type: 'address',
837
+ },
838
+ {
839
+ name: '',
840
+ type: 'uint256',
841
+ },
842
+ {
843
+ name: '',
844
+ type: 'uint256',
845
+ },
846
+ {
847
+ name: '',
848
+ type: 'uint256',
849
+ },
850
+ ],
851
+ stateMutability: 'nonpayable',
852
+ type: 'function',
853
+ },
854
+ {
855
+ inputs: [
856
+ {
857
+ name: '_asset',
858
+ type: 'address',
859
+ },
860
+ {
861
+ name: '_amount',
862
+ type: 'uint256',
863
+ },
864
+ {
865
+ name: '_vault',
866
+ type: 'address',
867
+ },
868
+ {
869
+ name: '_recipient',
870
+ type: 'address',
871
+ },
872
+ {
873
+ name: '_oracleRegistry',
874
+ type: 'address',
875
+ },
876
+ ],
877
+ name: 'depositTokens',
878
+ outputs: [
879
+ {
880
+ name: '',
881
+ type: 'uint256',
882
+ },
883
+ {
884
+ name: '',
885
+ type: 'address',
886
+ },
887
+ {
888
+ name: '',
889
+ type: 'uint256',
890
+ },
891
+ {
892
+ name: '',
893
+ type: 'uint256',
894
+ },
895
+ {
896
+ name: '',
897
+ type: 'uint256',
898
+ },
899
+ ],
900
+ stateMutability: 'nonpayable',
901
+ type: 'function',
902
+ },
903
+ {
904
+ inputs: [
905
+ {
906
+ name: '_asset',
907
+ type: 'address',
908
+ },
909
+ {
910
+ name: '_amount',
911
+ type: 'uint256',
912
+ },
913
+ {
914
+ name: '_vaultToken',
915
+ type: 'address',
916
+ },
917
+ {
918
+ name: '_recipient',
919
+ type: 'address',
920
+ },
921
+ ],
922
+ name: 'withdrawTokens',
923
+ outputs: [
924
+ {
925
+ name: '',
926
+ type: 'uint256',
927
+ },
928
+ {
929
+ name: '',
930
+ type: 'uint256',
931
+ },
932
+ {
933
+ name: '',
934
+ type: 'uint256',
935
+ },
936
+ {
937
+ name: '',
938
+ type: 'uint256',
939
+ },
940
+ ],
941
+ stateMutability: 'nonpayable',
942
+ type: 'function',
943
+ },
944
+ {
945
+ inputs: [
946
+ {
947
+ name: '_asset',
948
+ type: 'address',
949
+ },
950
+ {
951
+ name: '_amount',
952
+ type: 'uint256',
953
+ },
954
+ {
955
+ name: '_vaultToken',
956
+ type: 'address',
957
+ },
958
+ {
959
+ name: '_recipient',
960
+ type: 'address',
961
+ },
962
+ {
963
+ name: '_oracleRegistry',
964
+ type: 'address',
965
+ },
966
+ ],
967
+ name: 'withdrawTokens',
968
+ outputs: [
969
+ {
970
+ name: '',
971
+ type: 'uint256',
972
+ },
973
+ {
974
+ name: '',
975
+ type: 'uint256',
976
+ },
977
+ {
978
+ name: '',
979
+ type: 'uint256',
980
+ },
981
+ {
982
+ name: '',
983
+ type: 'uint256',
984
+ },
985
+ ],
986
+ stateMutability: 'nonpayable',
987
+ type: 'function',
988
+ },
989
+ {
990
+ inputs: [
991
+ {
992
+ name: '_user',
993
+ type: 'address',
994
+ },
995
+ {
996
+ name: '_market',
997
+ type: 'address',
998
+ },
999
+ {
1000
+ name: '_rewardToken',
1001
+ type: 'address',
1002
+ },
1003
+ {
1004
+ name: '_rewardAmount',
1005
+ type: 'uint256',
1006
+ },
1007
+ {
1008
+ name: '_proof',
1009
+ type: 'bytes32',
1010
+ },
1011
+ ],
1012
+ name: 'claimRewards',
1013
+ outputs: [],
1014
+ stateMutability: 'nonpayable',
1015
+ type: 'function',
1016
+ },
1017
+ {
1018
+ inputs: [
1019
+ {
1020
+ name: '_user',
1021
+ type: 'address',
1022
+ },
1023
+ ],
1024
+ name: 'hasClaimableRewards',
1025
+ outputs: [
1026
+ {
1027
+ name: '',
1028
+ type: 'bool',
1029
+ },
1030
+ ],
1031
+ stateMutability: 'view',
1032
+ type: 'function',
1033
+ },
1034
+ {
1035
+ inputs: [
1036
+ {
1037
+ name: '_asset',
1038
+ type: 'address',
1039
+ },
1040
+ {
1041
+ name: '_vault',
1042
+ type: 'address',
1043
+ },
1044
+ ],
1045
+ name: 'addAssetOpportunity',
1046
+ outputs: [
1047
+ {
1048
+ name: '',
1049
+ type: 'bool',
1050
+ },
1051
+ ],
1052
+ stateMutability: 'nonpayable',
1053
+ type: 'function',
1054
+ },
1055
+ {
1056
+ inputs: [
1057
+ {
1058
+ name: '_asset',
1059
+ type: 'address',
1060
+ },
1061
+ {
1062
+ name: '_vault',
1063
+ type: 'address',
1064
+ },
1065
+ ],
1066
+ name: 'removeAssetOpportunity',
1067
+ outputs: [
1068
+ {
1069
+ name: '',
1070
+ type: 'bool',
1071
+ },
1072
+ ],
1073
+ stateMutability: 'nonpayable',
1074
+ type: 'function',
1075
+ },
1076
+ {
1077
+ inputs: [
1078
+ {
1079
+ name: '_asset',
1080
+ type: 'address',
1081
+ },
1082
+ {
1083
+ name: '_recipient',
1084
+ type: 'address',
1085
+ },
1086
+ ],
1087
+ name: 'recoverFunds',
1088
+ outputs: [
1089
+ {
1090
+ name: '',
1091
+ type: 'bool',
1092
+ },
1093
+ ],
1094
+ stateMutability: 'nonpayable',
1095
+ type: 'function',
1096
+ },
1097
+ {
1098
+ inputs: [
1099
+ {
1100
+ name: '_legoId',
1101
+ type: 'uint256',
1102
+ },
1103
+ ],
1104
+ name: 'setLegoId',
1105
+ outputs: [
1106
+ {
1107
+ name: '',
1108
+ type: 'bool',
1109
+ },
1110
+ ],
1111
+ stateMutability: 'nonpayable',
1112
+ type: 'function',
1113
+ },
1114
+ {
1115
+ inputs: [
1116
+ {
1117
+ name: '_shouldActivate',
1118
+ type: 'bool',
1119
+ },
1120
+ ],
1121
+ name: 'activate',
1122
+ outputs: [],
1123
+ stateMutability: 'nonpayable',
1124
+ type: 'function',
1125
+ },
1126
+ {
1127
+ inputs: [],
1128
+ name: 'MOONWELL_COMPTROLLER',
1129
+ outputs: [
1130
+ {
1131
+ name: '',
1132
+ type: 'address',
1133
+ },
1134
+ ],
1135
+ stateMutability: 'view',
1136
+ type: 'function',
1137
+ },
1138
+ {
1139
+ inputs: [],
1140
+ name: 'legoId',
1141
+ outputs: [
1142
+ {
1143
+ name: '',
1144
+ type: 'uint256',
1145
+ },
1146
+ ],
1147
+ stateMutability: 'view',
1148
+ type: 'function',
1149
+ },
1150
+ {
1151
+ inputs: [],
1152
+ name: 'isActivated',
1153
+ outputs: [
1154
+ {
1155
+ name: '',
1156
+ type: 'bool',
1157
+ },
1158
+ ],
1159
+ stateMutability: 'view',
1160
+ type: 'function',
1161
+ },
1162
+ {
1163
+ inputs: [],
1164
+ name: 'ADDY_REGISTRY',
1165
+ outputs: [
1166
+ {
1167
+ name: '',
1168
+ type: 'address',
1169
+ },
1170
+ ],
1171
+ stateMutability: 'view',
1172
+ type: 'function',
1173
+ },
1174
+ {
1175
+ inputs: [],
1176
+ name: 'WETH',
1177
+ outputs: [
1178
+ {
1179
+ name: '',
1180
+ type: 'address',
1181
+ },
1182
+ ],
1183
+ stateMutability: 'view',
1184
+ type: 'function',
1185
+ },
1186
+ {
1187
+ inputs: [
1188
+ {
1189
+ name: '_moonwellComptroller',
1190
+ type: 'address',
1191
+ },
1192
+ {
1193
+ name: '_addyRegistry',
1194
+ type: 'address',
1195
+ },
1196
+ {
1197
+ name: '_wethAddr',
1198
+ type: 'address',
1199
+ },
1200
+ ],
1201
+ outputs: [],
1202
+ stateMutability: 'nonpayable',
1203
+ type: 'constructor',
1204
+ },
1205
+ ];
1206
+ export const deployAddress = '0x3890573c04A13d1D982104c7DaDb17F66cb1aE6c';
1207
+ function getRequest(method, args, contractAddressOrOptions) {
1208
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1209
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
1210
+ const call = {
1211
+ contractName: 'v0_3_LegoMoonwell',
1212
+ method,
1213
+ args,
1214
+ address,
1215
+ deployAddress,
1216
+ defaultValue,
1217
+ getAbi: () => abi,
1218
+ with: (options) => {
1219
+ call.address = options.contractAddress;
1220
+ call.defaultValue = options.defaultValue;
1221
+ return call;
1222
+ },
1223
+ defaultTo: (defaultValue) => {
1224
+ call.defaultValue = defaultValue;
1225
+ return call;
1226
+ },
1227
+ at: (address) => {
1228
+ call.address = address;
1229
+ return call;
1230
+ },
1231
+ };
1232
+ return call;
1233
+ }
1234
+ export const call = {
1235
+ getAssetOpportunities: (...args) => getRequest('getAssetOpportunities', args),
1236
+ getAssets: (...args) => getRequest('getAssets', args),
1237
+ assetOpportunities: (...args) => getRequest('assetOpportunities', args),
1238
+ indexOfAssetOpportunity: (...args) => getRequest('indexOfAssetOpportunity', args),
1239
+ numAssetOpportunities: (...args) => getRequest('numAssetOpportunities', args),
1240
+ vaultToAsset: (...args) => getRequest('vaultToAsset', args),
1241
+ assets: (...args) => getRequest('assets', args),
1242
+ indexOfAsset: (...args) => getRequest('indexOfAsset', args),
1243
+ numAssets: (...args) => getRequest('numAssets', args),
1244
+ canGovern: (...args) => getRequest('canGovern', args),
1245
+ hasPendingGovChange: (...args) => getRequest('hasPendingGovChange', args),
1246
+ governance: (...args) => getRequest('governance', args),
1247
+ pendingGov: (...args) => getRequest('pendingGov', args),
1248
+ govChangeDelay: (...args) => getRequest('govChangeDelay', args),
1249
+ MIN_GOV_CHANGE_DELAY: (...args) => getRequest('MIN_GOV_CHANGE_DELAY', args),
1250
+ MAX_GOV_CHANGE_DELAY: (...args) => getRequest('MAX_GOV_CHANGE_DELAY', args),
1251
+ getRegistries: (...args) => getRequest('getRegistries', args),
1252
+ getAccessForLego: (...args) => getRequest('getAccessForLego', args),
1253
+ isVaultToken: (...args) => getRequest('isVaultToken', args),
1254
+ getUnderlyingAsset: (...args) => getRequest('getUnderlyingAsset', args),
1255
+ getUnderlyingAmount: (...args) => getRequest('getUnderlyingAmount', args),
1256
+ getVaultTokenAmount: (...args) => getRequest('getVaultTokenAmount', args),
1257
+ getUsdValueOfVaultToken: (...args) => getRequest('getUsdValueOfVaultToken', args),
1258
+ getUnderlyingData: (...args) => getRequest('getUnderlyingData', args),
1259
+ totalAssets: (...args) => getRequest('totalAssets', args),
1260
+ totalBorrows: (...args) => getRequest('totalBorrows', args),
1261
+ hasClaimableRewards: (...args) => getRequest('hasClaimableRewards', args),
1262
+ MOONWELL_COMPTROLLER: (...args) => getRequest('MOONWELL_COMPTROLLER', args),
1263
+ legoId: (...args) => getRequest('legoId', args),
1264
+ isActivated: (...args) => getRequest('isActivated', args),
1265
+ ADDY_REGISTRY: (...args) => getRequest('ADDY_REGISTRY', args),
1266
+ WETH: (...args) => getRequest('WETH', args),
1267
+ };
1268
+ function getMutation(functionName) {
1269
+ return {
1270
+ contractName: 'v0_3_LegoMoonwell',
1271
+ functionName,
1272
+ deployAddress,
1273
+ argsType: undefined,
1274
+ getAbi: () => abi,
1275
+ };
1276
+ }
1277
+ export const mutation = {
1278
+ changeGovernance: getMutation('changeGovernance'),
1279
+ confirmGovernanceChange: getMutation('confirmGovernanceChange'),
1280
+ cancelGovernanceChange: getMutation('cancelGovernanceChange'),
1281
+ setGovernanceChangeDelay: getMutation('setGovernanceChangeDelay'),
1282
+ depositTokens: getMutation('depositTokens'),
1283
+ withdrawTokens: getMutation('withdrawTokens'),
1284
+ claimRewards: getMutation('claimRewards'),
1285
+ addAssetOpportunity: getMutation('addAssetOpportunity'),
1286
+ removeAssetOpportunity: getMutation('removeAssetOpportunity'),
1287
+ recoverFunds: getMutation('recoverFunds'),
1288
+ setLegoId: getMutation('setLegoId'),
1289
+ activate: getMutation('activate'),
1290
+ };
1291
+ export function toSdk(publicClient, walletClient) {
1292
+ return {
1293
+ deployAddress,
1294
+ abi,
1295
+ // Queries
1296
+ getAssetOpportunities: (...args) => singleQuery(publicClient, call.getAssetOpportunities(...args)),
1297
+ getAssets: (...args) => singleQuery(publicClient, call.getAssets(...args)),
1298
+ assetOpportunities: (...args) => singleQuery(publicClient, call.assetOpportunities(...args)),
1299
+ indexOfAssetOpportunity: (...args) => singleQuery(publicClient, call.indexOfAssetOpportunity(...args)),
1300
+ numAssetOpportunities: (...args) => singleQuery(publicClient, call.numAssetOpportunities(...args)),
1301
+ vaultToAsset: (...args) => singleQuery(publicClient, call.vaultToAsset(...args)),
1302
+ assets: (...args) => singleQuery(publicClient, call.assets(...args)),
1303
+ indexOfAsset: (...args) => singleQuery(publicClient, call.indexOfAsset(...args)),
1304
+ numAssets: (...args) => singleQuery(publicClient, call.numAssets(...args)),
1305
+ canGovern: (...args) => singleQuery(publicClient, call.canGovern(...args)),
1306
+ hasPendingGovChange: (...args) => singleQuery(publicClient, call.hasPendingGovChange(...args)),
1307
+ governance: (...args) => singleQuery(publicClient, call.governance(...args)),
1308
+ pendingGov: (...args) => singleQuery(publicClient, call.pendingGov(...args)),
1309
+ govChangeDelay: (...args) => singleQuery(publicClient, call.govChangeDelay(...args)),
1310
+ MIN_GOV_CHANGE_DELAY: (...args) => singleQuery(publicClient, call.MIN_GOV_CHANGE_DELAY(...args)),
1311
+ MAX_GOV_CHANGE_DELAY: (...args) => singleQuery(publicClient, call.MAX_GOV_CHANGE_DELAY(...args)),
1312
+ getRegistries: (...args) => singleQuery(publicClient, call.getRegistries(...args)),
1313
+ getAccessForLego: (...args) => singleQuery(publicClient, call.getAccessForLego(...args)),
1314
+ isVaultToken: (...args) => singleQuery(publicClient, call.isVaultToken(...args)),
1315
+ getUnderlyingAsset: (...args) => singleQuery(publicClient, call.getUnderlyingAsset(...args)),
1316
+ getUnderlyingAmount: (...args) => singleQuery(publicClient, call.getUnderlyingAmount(...args)),
1317
+ getVaultTokenAmount: (...args) => singleQuery(publicClient, call.getVaultTokenAmount(...args)),
1318
+ getUsdValueOfVaultToken: (...args) => singleQuery(publicClient, call.getUsdValueOfVaultToken(...args)),
1319
+ getUnderlyingData: (...args) => singleQuery(publicClient, call.getUnderlyingData(...args)),
1320
+ totalAssets: (...args) => singleQuery(publicClient, call.totalAssets(...args)),
1321
+ totalBorrows: (...args) => singleQuery(publicClient, call.totalBorrows(...args)),
1322
+ hasClaimableRewards: (...args) => singleQuery(publicClient, call.hasClaimableRewards(...args)),
1323
+ MOONWELL_COMPTROLLER: (...args) => singleQuery(publicClient, call.MOONWELL_COMPTROLLER(...args)),
1324
+ legoId: (...args) => singleQuery(publicClient, call.legoId(...args)),
1325
+ isActivated: (...args) => singleQuery(publicClient, call.isActivated(...args)),
1326
+ ADDY_REGISTRY: (...args) => singleQuery(publicClient, call.ADDY_REGISTRY(...args)),
1327
+ WETH: (...args) => singleQuery(publicClient, call.WETH(...args)),
1328
+ // Mutations
1329
+ changeGovernance: (...args) => mutate(walletClient, mutation.changeGovernance)(...args),
1330
+ confirmGovernanceChange: (...args) => mutate(walletClient, mutation.confirmGovernanceChange)(...args),
1331
+ cancelGovernanceChange: (...args) => mutate(walletClient, mutation.cancelGovernanceChange)(...args),
1332
+ setGovernanceChangeDelay: (...args) => mutate(walletClient, mutation.setGovernanceChangeDelay)(...args),
1333
+ depositTokens: (...args) => mutate(walletClient, mutation.depositTokens)(...args),
1334
+ withdrawTokens: (...args) => mutate(walletClient, mutation.withdrawTokens)(...args),
1335
+ claimRewards: (...args) => mutate(walletClient, mutation.claimRewards)(...args),
1336
+ addAssetOpportunity: (...args) => mutate(walletClient, mutation.addAssetOpportunity)(...args),
1337
+ removeAssetOpportunity: (...args) => mutate(walletClient, mutation.removeAssetOpportunity)(...args),
1338
+ recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds)(...args),
1339
+ setLegoId: (...args) => mutate(walletClient, mutation.setLegoId)(...args),
1340
+ activate: (...args) => mutate(walletClient, mutation.activate)(...args),
1341
+ };
1342
+ }