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