@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,671 @@
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
+ name: 'UserWalletCreated',
9
+ inputs: [
10
+ {
11
+ name: 'mainAddr',
12
+ type: 'address',
13
+ indexed: true,
14
+ },
15
+ {
16
+ name: 'configAddr',
17
+ type: 'address',
18
+ indexed: true,
19
+ },
20
+ {
21
+ name: 'owner',
22
+ type: 'address',
23
+ indexed: true,
24
+ },
25
+ {
26
+ name: 'agent',
27
+ type: 'address',
28
+ indexed: false,
29
+ },
30
+ {
31
+ name: 'ambassador',
32
+ type: 'address',
33
+ indexed: false,
34
+ },
35
+ {
36
+ name: 'creator',
37
+ type: 'address',
38
+ indexed: false,
39
+ },
40
+ {
41
+ name: 'trialFundsAsset',
42
+ type: 'address',
43
+ indexed: false,
44
+ },
45
+ {
46
+ name: 'trialFundsAmount',
47
+ type: 'uint256',
48
+ indexed: false,
49
+ },
50
+ {
51
+ name: 'groupId',
52
+ type: 'uint256',
53
+ indexed: false,
54
+ },
55
+ ],
56
+ anonymous: false,
57
+ type: 'event',
58
+ },
59
+ {
60
+ name: 'AgentCreated',
61
+ inputs: [
62
+ {
63
+ name: 'agent',
64
+ type: 'address',
65
+ indexed: true,
66
+ },
67
+ {
68
+ name: 'owner',
69
+ type: 'address',
70
+ indexed: true,
71
+ },
72
+ {
73
+ name: 'creator',
74
+ type: 'address',
75
+ indexed: true,
76
+ },
77
+ {
78
+ name: 'groupId',
79
+ type: 'uint256',
80
+ indexed: false,
81
+ },
82
+ ],
83
+ anonymous: false,
84
+ type: 'event',
85
+ },
86
+ {
87
+ name: 'DepartmentPauseModified',
88
+ inputs: [
89
+ {
90
+ name: 'isPaused',
91
+ type: 'bool',
92
+ indexed: false,
93
+ },
94
+ ],
95
+ anonymous: false,
96
+ type: 'event',
97
+ },
98
+ {
99
+ name: 'DepartmentFundsRecovered',
100
+ inputs: [
101
+ {
102
+ name: 'asset',
103
+ type: 'address',
104
+ indexed: true,
105
+ },
106
+ {
107
+ name: 'recipient',
108
+ type: 'address',
109
+ indexed: true,
110
+ },
111
+ {
112
+ name: 'balance',
113
+ type: 'uint256',
114
+ indexed: false,
115
+ },
116
+ ],
117
+ anonymous: false,
118
+ type: 'event',
119
+ },
120
+ {
121
+ stateMutability: 'view',
122
+ type: 'function',
123
+ name: 'getAddys',
124
+ inputs: [],
125
+ outputs: [
126
+ {
127
+ name: '',
128
+ type: 'tuple',
129
+ components: [
130
+ {
131
+ name: 'hq',
132
+ type: 'address',
133
+ },
134
+ {
135
+ name: 'undyToken',
136
+ type: 'address',
137
+ },
138
+ {
139
+ name: 'ledger',
140
+ type: 'address',
141
+ },
142
+ {
143
+ name: 'missionControl',
144
+ type: 'address',
145
+ },
146
+ {
147
+ name: 'legoBook',
148
+ type: 'address',
149
+ },
150
+ {
151
+ name: 'switchboard',
152
+ type: 'address',
153
+ },
154
+ {
155
+ name: 'hatchery',
156
+ type: 'address',
157
+ },
158
+ {
159
+ name: 'lootDistributor',
160
+ type: 'address',
161
+ },
162
+ {
163
+ name: 'appraiser',
164
+ type: 'address',
165
+ },
166
+ {
167
+ name: 'walletBackpack',
168
+ type: 'address',
169
+ },
170
+ {
171
+ name: 'billing',
172
+ type: 'address',
173
+ },
174
+ ],
175
+ },
176
+ ],
177
+ },
178
+ {
179
+ stateMutability: 'view',
180
+ type: 'function',
181
+ name: 'getUndyHq',
182
+ inputs: [],
183
+ outputs: [
184
+ {
185
+ name: '',
186
+ type: 'address',
187
+ },
188
+ ],
189
+ },
190
+ {
191
+ stateMutability: 'view',
192
+ type: 'function',
193
+ name: 'canMintUndy',
194
+ inputs: [],
195
+ outputs: [
196
+ {
197
+ name: '',
198
+ type: 'bool',
199
+ },
200
+ ],
201
+ },
202
+ {
203
+ stateMutability: 'nonpayable',
204
+ type: 'function',
205
+ name: 'pause',
206
+ inputs: [
207
+ {
208
+ name: '_shouldPause',
209
+ type: 'bool',
210
+ },
211
+ ],
212
+ outputs: [],
213
+ },
214
+ {
215
+ stateMutability: 'nonpayable',
216
+ type: 'function',
217
+ name: 'recoverFunds',
218
+ inputs: [
219
+ {
220
+ name: '_recipient',
221
+ type: 'address',
222
+ },
223
+ {
224
+ name: '_asset',
225
+ type: 'address',
226
+ },
227
+ ],
228
+ outputs: [],
229
+ },
230
+ {
231
+ stateMutability: 'nonpayable',
232
+ type: 'function',
233
+ name: 'recoverFundsMany',
234
+ inputs: [
235
+ {
236
+ name: '_recipient',
237
+ type: 'address',
238
+ },
239
+ {
240
+ name: '_assets',
241
+ type: 'address[]',
242
+ },
243
+ ],
244
+ outputs: [],
245
+ },
246
+ {
247
+ stateMutability: 'view',
248
+ type: 'function',
249
+ name: 'isPaused',
250
+ inputs: [],
251
+ outputs: [
252
+ {
253
+ name: '',
254
+ type: 'bool',
255
+ },
256
+ ],
257
+ },
258
+ {
259
+ stateMutability: 'nonpayable',
260
+ type: 'function',
261
+ name: 'createUserWallet',
262
+ inputs: [],
263
+ outputs: [
264
+ {
265
+ name: '',
266
+ type: 'address',
267
+ },
268
+ ],
269
+ },
270
+ {
271
+ stateMutability: 'nonpayable',
272
+ type: 'function',
273
+ name: 'createUserWallet',
274
+ inputs: [
275
+ {
276
+ name: '_owner',
277
+ type: 'address',
278
+ },
279
+ ],
280
+ outputs: [
281
+ {
282
+ name: '',
283
+ type: 'address',
284
+ },
285
+ ],
286
+ },
287
+ {
288
+ stateMutability: 'nonpayable',
289
+ type: 'function',
290
+ name: 'createUserWallet',
291
+ inputs: [
292
+ {
293
+ name: '_owner',
294
+ type: 'address',
295
+ },
296
+ {
297
+ name: '_ambassador',
298
+ type: 'address',
299
+ },
300
+ ],
301
+ outputs: [
302
+ {
303
+ name: '',
304
+ type: 'address',
305
+ },
306
+ ],
307
+ },
308
+ {
309
+ stateMutability: 'nonpayable',
310
+ type: 'function',
311
+ name: 'createUserWallet',
312
+ inputs: [
313
+ {
314
+ name: '_owner',
315
+ type: 'address',
316
+ },
317
+ {
318
+ name: '_ambassador',
319
+ type: 'address',
320
+ },
321
+ {
322
+ name: '_shouldUseTrialFunds',
323
+ type: 'bool',
324
+ },
325
+ ],
326
+ outputs: [
327
+ {
328
+ name: '',
329
+ type: 'address',
330
+ },
331
+ ],
332
+ },
333
+ {
334
+ stateMutability: 'nonpayable',
335
+ type: 'function',
336
+ name: 'createUserWallet',
337
+ inputs: [
338
+ {
339
+ name: '_owner',
340
+ type: 'address',
341
+ },
342
+ {
343
+ name: '_ambassador',
344
+ type: 'address',
345
+ },
346
+ {
347
+ name: '_shouldUseTrialFunds',
348
+ type: 'bool',
349
+ },
350
+ {
351
+ name: '_groupId',
352
+ type: 'uint256',
353
+ },
354
+ ],
355
+ outputs: [
356
+ {
357
+ name: '',
358
+ type: 'address',
359
+ },
360
+ ],
361
+ },
362
+ {
363
+ stateMutability: 'nonpayable',
364
+ type: 'function',
365
+ name: 'createAgent',
366
+ inputs: [],
367
+ outputs: [
368
+ {
369
+ name: '',
370
+ type: 'address',
371
+ },
372
+ ],
373
+ },
374
+ {
375
+ stateMutability: 'nonpayable',
376
+ type: 'function',
377
+ name: 'createAgent',
378
+ inputs: [
379
+ {
380
+ name: '_owner',
381
+ type: 'address',
382
+ },
383
+ ],
384
+ outputs: [
385
+ {
386
+ name: '',
387
+ type: 'address',
388
+ },
389
+ ],
390
+ },
391
+ {
392
+ stateMutability: 'nonpayable',
393
+ type: 'function',
394
+ name: 'createAgent',
395
+ inputs: [
396
+ {
397
+ name: '_owner',
398
+ type: 'address',
399
+ },
400
+ {
401
+ name: '_groupId',
402
+ type: 'uint256',
403
+ },
404
+ ],
405
+ outputs: [
406
+ {
407
+ name: '',
408
+ type: 'address',
409
+ },
410
+ ],
411
+ },
412
+ {
413
+ stateMutability: 'nonpayable',
414
+ type: 'function',
415
+ name: 'clawBackTrialFunds',
416
+ inputs: [
417
+ {
418
+ name: '_user',
419
+ type: 'address',
420
+ },
421
+ ],
422
+ outputs: [
423
+ {
424
+ name: '',
425
+ type: 'uint256',
426
+ },
427
+ ],
428
+ },
429
+ {
430
+ stateMutability: 'view',
431
+ type: 'function',
432
+ name: 'canClawbackTrialFunds',
433
+ inputs: [
434
+ {
435
+ name: '_user',
436
+ type: 'address',
437
+ },
438
+ {
439
+ name: '_caller',
440
+ type: 'address',
441
+ },
442
+ ],
443
+ outputs: [
444
+ {
445
+ name: '',
446
+ type: 'bool',
447
+ },
448
+ ],
449
+ },
450
+ {
451
+ stateMutability: 'view',
452
+ type: 'function',
453
+ name: 'doesWalletStillHaveTrialFunds',
454
+ inputs: [
455
+ {
456
+ name: '_user',
457
+ type: 'address',
458
+ },
459
+ ],
460
+ outputs: [
461
+ {
462
+ name: '',
463
+ type: 'bool',
464
+ },
465
+ ],
466
+ },
467
+ {
468
+ stateMutability: 'view',
469
+ type: 'function',
470
+ name: 'doesWalletStillHaveTrialFundsWithAddys',
471
+ inputs: [
472
+ {
473
+ name: '_user',
474
+ type: 'address',
475
+ },
476
+ {
477
+ name: '_walletConfig',
478
+ type: 'address',
479
+ },
480
+ {
481
+ name: '_missionControl',
482
+ type: 'address',
483
+ },
484
+ {
485
+ name: '_legoBook',
486
+ type: 'address',
487
+ },
488
+ {
489
+ name: '_appraiser',
490
+ type: 'address',
491
+ },
492
+ {
493
+ name: '_ledger',
494
+ type: 'address',
495
+ },
496
+ ],
497
+ outputs: [
498
+ {
499
+ name: '',
500
+ type: 'bool',
501
+ },
502
+ ],
503
+ },
504
+ {
505
+ stateMutability: 'view',
506
+ type: 'function',
507
+ name: 'getAssetUsdValueConfig',
508
+ inputs: [
509
+ {
510
+ name: '_asset',
511
+ type: 'address',
512
+ },
513
+ ],
514
+ outputs: [
515
+ {
516
+ name: '',
517
+ type: 'tuple',
518
+ components: [
519
+ {
520
+ name: 'legoId',
521
+ type: 'uint256',
522
+ },
523
+ {
524
+ name: 'legoAddr',
525
+ type: 'address',
526
+ },
527
+ {
528
+ name: 'decimals',
529
+ type: 'uint256',
530
+ },
531
+ {
532
+ name: 'staleBlocks',
533
+ type: 'uint256',
534
+ },
535
+ {
536
+ name: 'isYieldAsset',
537
+ type: 'bool',
538
+ },
539
+ {
540
+ name: 'underlyingAsset',
541
+ type: 'address',
542
+ },
543
+ ],
544
+ },
545
+ ],
546
+ },
547
+ {
548
+ stateMutability: 'view',
549
+ type: 'function',
550
+ name: 'WETH',
551
+ inputs: [],
552
+ outputs: [
553
+ {
554
+ name: '',
555
+ type: 'address',
556
+ },
557
+ ],
558
+ },
559
+ {
560
+ stateMutability: 'view',
561
+ type: 'function',
562
+ name: 'ETH',
563
+ inputs: [],
564
+ outputs: [
565
+ {
566
+ name: '',
567
+ type: 'address',
568
+ },
569
+ ],
570
+ },
571
+ {
572
+ stateMutability: 'nonpayable',
573
+ type: 'constructor',
574
+ inputs: [
575
+ {
576
+ name: '_undyHq',
577
+ type: 'address',
578
+ },
579
+ {
580
+ name: '_wethAddr',
581
+ type: 'address',
582
+ },
583
+ {
584
+ name: '_ethAddr',
585
+ type: 'address',
586
+ },
587
+ ],
588
+ outputs: [],
589
+ },
590
+ ];
591
+ export const deployAddress = '0xFd89e4A3D9B97f4dD117c29Fa71c25aD904c590a';
592
+ function getRequest(method, args, contractAddressOrOptions) {
593
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
594
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
595
+ const call = {
596
+ contractName: 'Hatchery',
597
+ method,
598
+ args,
599
+ address,
600
+ deployAddress,
601
+ defaultValue,
602
+ getAbi: () => abi,
603
+ with: (options) => {
604
+ call.address = options.contractAddress;
605
+ call.defaultValue = options.defaultValue;
606
+ return call;
607
+ },
608
+ defaultTo: (defaultValue) => {
609
+ call.defaultValue = defaultValue;
610
+ return call;
611
+ },
612
+ at: (address) => {
613
+ call.address = address;
614
+ return call;
615
+ },
616
+ };
617
+ return call;
618
+ }
619
+ export const call = {
620
+ getAddys: (...args) => getRequest('getAddys', args),
621
+ getUndyHq: (...args) => getRequest('getUndyHq', args),
622
+ canMintUndy: (...args) => getRequest('canMintUndy', args),
623
+ isPaused: (...args) => getRequest('isPaused', args),
624
+ canClawbackTrialFunds: (...args) => getRequest('canClawbackTrialFunds', args),
625
+ doesWalletStillHaveTrialFunds: (...args) => getRequest('doesWalletStillHaveTrialFunds', args),
626
+ doesWalletStillHaveTrialFundsWithAddys: (...args) => getRequest('doesWalletStillHaveTrialFundsWithAddys', args),
627
+ getAssetUsdValueConfig: (...args) => getRequest('getAssetUsdValueConfig', args),
628
+ WETH: (...args) => getRequest('WETH', args),
629
+ ETH: (...args) => getRequest('ETH', args),
630
+ };
631
+ function getMutation(functionName) {
632
+ return {
633
+ contractName: 'Hatchery',
634
+ functionName,
635
+ deployAddress,
636
+ argsType: undefined,
637
+ getAbi: () => abi,
638
+ };
639
+ }
640
+ export const mutation = {
641
+ pause: getMutation('pause'),
642
+ recoverFunds: getMutation('recoverFunds'),
643
+ recoverFundsMany: getMutation('recoverFundsMany'),
644
+ createUserWallet: getMutation('createUserWallet'),
645
+ createAgent: getMutation('createAgent'),
646
+ clawBackTrialFunds: getMutation('clawBackTrialFunds'),
647
+ };
648
+ export function toSdk(publicClient, walletClient) {
649
+ return {
650
+ deployAddress,
651
+ abi,
652
+ // Queries
653
+ getAddys: (...args) => singleQuery(publicClient, call.getAddys(...args)),
654
+ getUndyHq: (...args) => singleQuery(publicClient, call.getUndyHq(...args)),
655
+ canMintUndy: (...args) => singleQuery(publicClient, call.canMintUndy(...args)),
656
+ isPaused: (...args) => singleQuery(publicClient, call.isPaused(...args)),
657
+ canClawbackTrialFunds: (...args) => singleQuery(publicClient, call.canClawbackTrialFunds(...args)),
658
+ doesWalletStillHaveTrialFunds: (...args) => singleQuery(publicClient, call.doesWalletStillHaveTrialFunds(...args)),
659
+ doesWalletStillHaveTrialFundsWithAddys: (...args) => singleQuery(publicClient, call.doesWalletStillHaveTrialFundsWithAddys(...args)),
660
+ getAssetUsdValueConfig: (...args) => singleQuery(publicClient, call.getAssetUsdValueConfig(...args)),
661
+ WETH: (...args) => singleQuery(publicClient, call.WETH(...args)),
662
+ ETH: (...args) => singleQuery(publicClient, call.ETH(...args)),
663
+ // Mutations
664
+ pause: (...args) => mutate(walletClient, mutation.pause)(...args),
665
+ recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds)(...args),
666
+ recoverFundsMany: (...args) => mutate(walletClient, mutation.recoverFundsMany)(...args),
667
+ createUserWallet: (...args) => mutate(walletClient, mutation.createUserWallet)(...args),
668
+ createAgent: (...args) => mutate(walletClient, mutation.createAgent)(...args),
669
+ clawBackTrialFunds: (...args) => mutate(walletClient, mutation.clawBackTrialFunds)(...args),
670
+ };
671
+ }